I have mongodb running on a linux server with 90% disk usage (as confirmed by df). Every operation is causing the following error:
db.dropDatabase() { "ok" : 0, "errmsg" : "Can't take a write lock while out of disk space", "code" : 14031 }
'df -k' shows:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 16380820 14622652 1657920 90% /
devtmpfs 2015972 56 2015916 1% /dev
tmpfs 2024984 0 2024984 0% /dev/shm
There seems to be plenty of disk space. Is it possible that the database is corrupted? The disk had originally ran out of disk space but then I deleted many files and cleared 10% but the error persists.
Can anyone recommend what next steps to take?
Thanks
So it turns out that mongodb requires as much space as the size of the database you are dealing with. This is crazy. What I had to do, is to clear as much disk space as the size of the db.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.