2

运行 mongorestore 失败了,这在我之前从未发生过。这次我在两个节点副本配置的主服务器上进行恢复:

bash-4.1$ mongorestore mas
connected to: 127.0.0.1
2015-01-16T02:01:50.692-0500 mas/app.bson
2015-01-16T02:01:50.692-0500    going into namespace [mas.app]
1 objects found
2015-01-16T02:01:50.692-0500    Creating index: { key: { _id: 1 }, name: "_id_", ns: "mas.app" }
Error creating index mas.app: 18825 err: "couldn't create file /mongoDB-data/mas.ns"
Aborted

显示的结果df -h还有很多空格:

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       50G  3.2G   44G   7% /
tmpfs           3.6G     0  3.6G   0% /dev/shm
/dev/xvdb        50G  4.4G   43G  10% /mongoDB-data

原始文件/mongoDB-data

bash-4.1$ ls -l /mongoDB-data/
total 4356132
drwxr-xr-x. 2 mongod mongod       4096 Jan 16 01:42 journal
-rw-------. 1 mongod mongod   67108864 Jan 16 01:42 local.0
-rw-------. 1 mongod mongod 2146435072 Sep  4 20:06 local.1
-rw-------. 1 mongod mongod 2146435072 Sep  4 20:06 local.2
-rw-------. 1 mongod mongod   16777216 Jan 16 01:42 local.ns
drwx------. 2 root   root        16384 Sep 17 01:49 lost+found
-rwxr-xr-x. 1 mongod mongod          6 Jan 16 01:42 mongod.lock
-rw-------. 1 mongod mongod   67108864 Sep  4 20:06 test.0
-rw-------. 1 mongod mongod   16777216 Sep  4 20:06 test.ns
4

0 回答 0