MongoDB報錯Insufficient free space for journal files的解決方法

chenfeng發表於2016-02-01

原因: 因為journal至少以2G的數量進行增長,當磁碟空間不足時,會報錯Insufficient free space for journal files.
解決方案: 在啟動mongo時加上--smallfiles引數,例如: mongod --smallfiles,或者修改
/etc/mongodb.conf,找到storage.smallFiles,修改以下行:
smallfiles = true
檢查配置是否生效:
> use admin
switched to db admin
> db.runCommand({getCmdLineOpts:1});

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-1985097/,如需轉載,請註明出處,否則將追究法律責任。

相關文章