ERROR: Insufficient free space for journal files
原因: 因为journal至少以2G的数量进行增长,当磁盘空间不足时,会报错Insufficient free space for journal files.
解决方案1:清理磁盘空间,要大于2G。
解决方案2: 在启动mongo时加上--smallfiles参数,例如: mongod --smallfiles,或者修改
/etc/mongodb.conf,找到storage.smallFiles,修改以下行:
smallfiles = true
检查配置是否生效:
> use admin
switched to db admin
> db.runCommand({getCmdLineOpts:1});