LoginSignup
27
26

More than 5 years have passed since last update.

mongodb 起動エラー時の対処方法-journallog

Posted at

mongodbの起動時に発生したエラーの対処

/var/log/mongo/mongod.log

Thu Feb  7 10:32:26 [initandlisten] options: { config: "/etc/mongod.conf", dbpath: "/var/lib/mongo", fork: "true", logappend: "true", logpath: "/var/log/mongo/mongod.log", pidfilepath: "/var/run/mongodb/mongod.pid" }
Thu Feb  7 10:32:26 [initandlisten] journal dir=/var/lib/mongo/journal
Thu Feb  7 10:32:26 [initandlisten] recover : no journal files present, no recovery needed
Thu Feb  7 10:32:26 [initandlisten] 
Thu Feb  7 10:32:26 [initandlisten] ERROR: Insufficient free space for journal files
Thu Feb  7 10:32:26 [initandlisten] Please make at least 3379MB available in /var/lib/mongo/journal or use --smallfiles
Thu Feb  7 10:32:26 [initandlisten] 
Thu Feb  7 10:32:26 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
Thu Feb  7 10:32:26 dbexit: 

mongodbはjournalログをデフォルトで有効にし、その場合3.5Gのファイルを確保する。
ディスクに余裕がない場合は、この時点でエラーになる。

開発時などはjournalログを無効にすると解消する。

/etc/mongod.conf

変更前
#nojournal = true
変更後
nojournal = true

これでエラー解消。

27
26
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
27
26