简体   繁体   English

Mongodb给出“有足够的空间”错误,提示“磁盘空间不足时无法获取写锁定”

[英]Mongodb gives “Can't take a write lock > while out of disk space” error with plenty of space

I have mongodb running on a linux server with 90% disk usage (as confirmed by df). 我的mongodb在90%磁盘使用率的Linux服务器上运行(由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 } db.dropDatabase(){“ ok”:0,“ errmsg”:“在磁盘空间不足时无法获取写锁定”,“ code”:14031}

'df -k' shows: 'df -k'显示:

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. 磁盘最初用尽了磁盘空间,但是后来我删除了许多文件并清除了10%,但错误仍然存​​在。

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. 因此,事实证明mongodb需要的空间与您正在处理的数据库的大小一样多。 This is crazy. 这太疯狂了。 What I had to do, is to clear as much disk space as the size of the db. 我要做的是清除与db大小一样多的磁盘空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM