Mongodb - 无法将dbpath设置为指向另一个卷

时间:2014-06-26 15:04:07

标签: mongodb ubuntu

/etc/mongodb.conf:

# Where to store the data.
dbpath=/vol3/var/lib/mongodb

$ mongo

MongoDB shell version: 2.4.9
connecting to: test
Thu Jun 26 15:01:24.017 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed

$ less +G /var/log/mongodb/mongodb.log

Thu Jun 26 14:16:26.462 initAndListen中的[initandlisten]异常:10296

*********************************************************************
 ERROR: dbpath (/vol3/var/lib/mongodb) does not exist.
 Create this directory or give existing directory in --dbpath.
 See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************
, terminating
Thu Jun 26 14:16:26.462 dbexit: 
Thu Jun 26 14:16:26.462 [initandlisten] shutdown: going to close listening sockets...
Thu Jun 26 14:16:26.462 [initandlisten] shutdown: going to flush diaglog...
Thu Jun 26 14:16:26.462 [initandlisten] shutdown: going to close sockets...
Thu Jun 26 14:16:26.462 [initandlisten] shutdown: waiting for fs preallocator...
Thu Jun 26 14:16:26.462 [initandlisten] shutdown: lock for final commit...
Thu Jun 26 14:16:26.462 [initandlisten] shutdown: final commit...
Thu Jun 26 14:16:26.462 [initandlisten] shutdown: closing all files...
Thu Jun 26 14:16:26.462 [initandlisten] closeAllFiles() finished
Thu Jun 26 14:16:26.462 dbexit: really exiting now

$ ls -lah /vol3/var/lib/mongodb

ubuntu@ip-172-31-41-33:~$ ls -lah /vol3/var/lib/mongodb
total 45G
drwxr-xr-x  4 mongodb mongodb 4.0K Jun 26 14:14 .
drwxr-xr-x 42 root    root    4.0K Apr 24 06:50 ..
drwxr-xr-x  2 mongodb mongodb 4.0K May 21 08:56 journal
-rw-------  1 mongodb mongodb  64M May 20 09:34 test.0
-rw-------  1 mongodb mongodb 128M May 20 09:34 test.1
-rw-------  1 mongodb mongodb  16M May 20 09:34 test.ns
drwxr-xr-x  2 mongodb mongodb 4.0K May 13 23:33 vita
-rw-------  1 mongodb mongodb  64M May 20 09:37 vita.0
-rw-------  1 mongodb mongodb 128M May 17 11:51 vita.1
-rw-------  1 mongodb mongodb 2.0G May 20 09:39 vita.10
-rw-------  1 mongodb mongodb 2.0G May 20 09:39 vita.11
-rw-------  1 mongodb mongodb 2.0G May 17 18:58 vita.12
-rw-------  1 mongodb mongodb 2.0G May 17 19:05 vita.13
-rw-------  1 mongodb mongodb 2.0G May 15 23:47 vita.14
-rw-------  1 mongodb mongodb 2.0G May 15 15:09 vita.15
-rw-------  1 mongodb mongodb 2.0G May 17 11:50 vita.16
-rw-------  1 mongodb mongodb 2.0G May 16 12:36 vita.17
-rw-------  1 mongodb mongodb 2.0G May 16 13:20 vita.18
-rw-------  1 mongodb mongodb 2.0G May 16 13:59 vita.19
-rw-------  1 mongodb mongodb 256M May 17 11:51 vita.2
-rw-------  1 mongodb mongodb 2.0G May 16 14:39 vita.20
-rw-------  1 mongodb mongodb 2.0G May 16 15:20 vita.21
-rw-------  1 mongodb mongodb 2.0G May 16 16:02 vita.22
-rw-------  1 mongodb mongodb 2.0G May 17 16:31 vita.23
-rw-------  1 mongodb mongodb 2.0G May 17 19:00 vita.24
-rw-------  1 mongodb mongodb 2.0G May 18 08:23 vita.25
-rw-------  1 mongodb mongodb 512M May 17 11:51 vita.3
-rw-------  1 mongodb mongodb 1.0G May 17 11:51 vita.4
-rw-------  1 mongodb mongodb 2.0G May 17 11:51 vita.5
-rw-------  1 mongodb mongodb 2.0G May 17 21:42 vita.6
-rw-------  1 mongodb mongodb 2.0G May 17 18:56 vita.7
-rw-------  1 mongodb mongodb 2.0G May 17 19:04 vita.8
-rw-------  1 mongodb mongodb 2.0G May 17 17:25 vita.9
-rw-------  1 mongodb mongodb  16M May 20 09:39 vita.ns
创建的

/vol3是从/ dev / xvdf中创建的,你可以看到文件在那里。 任何关于错误的线索将不胜感激。

0 个答案:

没有答案