ITPub博客

首页 > 数据库 > NoSQL > MongoDB报错Insufficient free space for journal files的解决方法

MongoDB报错Insufficient free space for journal files的解决方法

原创 NoSQL 作者:chenfeng 时间:2016-02-01 11:36:21 0 删除 编辑

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

请登录后发表评论 登录
全部评论
交流MySQL,PolarDB/PolarDB-X,PostgreSQL,MongoDB和Redis技术。

注册时间:2015-12-07

  • 博文量
    784
  • 访问量
    2691068