MongoDBのインストールエラー現象: ERROR: Insufficient free space for journal files
1.エラーメッセージ:
ERROR: Insufficient free space for journal files
2.mongodbのインストール
[root@localhost bin]# pwd
/my_service/mongodb-linux-x86_64-2.2.2/bin
[root@localhost bin]# ./mongod
./mongod –help for help and startup options
Tue Jan 1 04:48:51 [initandlisten] MongoDB starting : pid=4807 port=27017 dbpath=/data/db/ 64-bit host=localhost.localdomain
Tue Jan 1 04:48:51 [initandlisten] db version v2.2.2, pdfile version 4.5
Tue Jan 1 04:48:51 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Tue Jan 1 04:48:51 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Tue Jan 1 04:48:51 [initandlisten] options: {}
Tue Jan 1 04:48:51 [initandlisten] journal dir=/data/db/journal
Tue Jan 1 04:48:51 [initandlisten] recover : no journal files present, no recovery needed
Tue Jan 1 04:48:51 [initandlisten]
Tue Jan 1 04:48:51 [initandlisten] ERROR: Insufficient free space for journal files
Tue Jan 1 04:48:51 [initandlisten] Please make at least 3379MB available in /data/db/journal or use –smallfiles
Tue Jan 1 04:48:51 [initandlisten]
Tue Jan 1 04:48:51 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
Tue Jan 1 04:48:51 dbexit:
Tue Jan 1 04:48:51 [initandlisten] shutdown: going to close listening sockets…
Tue Jan 1 04:48:51 [initandlisten] shutdown: going to flush diaglog…
Tue Jan 1 04:48:51 [initandlisten] shutdown: going to close sockets…
Tue Jan 1 04:48:51 [initandlisten] shutdown: waiting for fs preallocator…
Tue Jan 1 04:48:51 [initandlisten] shutdown: lock for final commit…
Tue Jan 1 04:48:51 [initandlisten] shutdown: final commit…
Tue Jan 1 04:48:51 [initandlisten] shutdown: closing all files…
Tue Jan 1 04:48:51 [initandlisten] closeAllFiles() finished
Tue Jan 1 04:48:51 [initandlisten] journalCleanup…
Tue Jan 1 04:48:51 [initandlisten] removeJournalFiles
Tue Jan 1 04:48:51 [initandlisten] shutdown: removing fs lock…
Tue Jan 1 04:48:51 dbexit: really exiting now
3.解決対策:
[root@localhost bin]# ./mongod –smallfiles
4.クライアントを起動
[root@localhost bin]# ./mongo
MongoDB shell version: 2.2.2
connecting to: test
> show dbs
local (empty)
test 0.0625GB
> use test
switched to db test