原因: 因为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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15498/viewspace-1985097/