web-dev-qa-db-ja.com

失敗した修復dbのクリーンアップ:パス:/ var / lib / docker / wesfgr / repair / _tmp_repairDatabase_0

Dockerコンテナー(単一ノード)でMMAPを使用してMongoDB 3.0.6を実行します。ファイルシステムがいっぱいで、他のパスで修復を行いました。

2016-10-03T08:58:51.186+0200 I INDEX    [initandlisten]          building index using bulk method
2016-10-03T08:58:51.186+0200 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T08:58:51.186+0200 I INDEX    [initandlisten] build index on: 6JzeOdlsErBwx4Fc.fb31a88b-cdfc-440b-81f8-d333dcd9527bs properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "6JzeOdlsErBwx4Fc.fb31a88b-cdfc-440b-81f8-d333dcd9527bs" }
2016-10-03T08:58:51.186+0200 I INDEX    [initandlisten]          building index using bulk method
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] build index on: 6JzeOdlsErBwx4Fc.fb362dbf-a5d9-445b-a052-1166f0c522a7 properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "6JzeOdlsErBwx4Fc.fb362dbf-a5d9-445b-a052-1166f0c522a7" }
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten]          building index using bulk method
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] build index on: 6JzeOdlsErBwx4Fc.fb38d789-61a7-40ff-a63f-146244df4475 properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "6JzeOdlsErBwx4Fc.fb38d789-61a7-40ff-a63f-146244df4475" }
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten]          building index using bulk method
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] error: hashtable namespace index max chain reached:1335
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] error: hashtable namespace index max chain reached:1335
2016-10-03T08:58:51.349+0200 I STORAGE  [initandlisten] cleaning up failed repair db: 6JzeOdlsErBwx4Fc path: /var/lib/docker/wesfgr/repair/_tmp_repairDatabase_0
2016-10-03T08:58:51.570+0200 I STORAGE  [initandlisten] exception in initAndListen: 10081 too many namespaces/collections, terminating
2016-10-03T08:58:51.570+0200 I CONTROL  [initandlisten] now exiting
2016-10-03T08:58:51.570+0200 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2016-10-03T08:58:51.570+0200 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2016-10-03T08:58:51.570+0200 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2016-10-03T08:58:51.570+0200 I NETWORK  [initandlisten] shutdown: going to close sockets...
2016-10-03T08:58:51.570+0200 I STORAGE  [initandlisten] shutdown: waiting for fs preallocator...
2016-10-03T08:58:51.570+0200 I STORAGE  [initandlisten] shutdown: closing all files...
2016-10-03T08:58:51.579+0200 I STORAGE  [initandlisten] closeAllFiles() finished
2016-10-03T08:58:51.580+0200 I STORAGE  [initandlisten] shutdown: removing fs lock...
2016-10-03T08:58:51.580+0200 I CONTROL  [initandlisten] dbexit:  rc: 100

エラーはたくさんありますが、MongoDBは修復後に正常に起動しました。このエラーはどういう意味ですか?長期的に一貫性のないDBはありますか?

2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] error: hashtable namespace index max chain reached:1335
2016-10-03T08:58:51.187+0200 I INDEX    [initandlisten] error: hashtable namespace index max chain reached:1335
2016-10-03T08:58:51.349+0200 I STORAGE  [initandlisten] cleaning up failed repair db: 6JzeOdlsErBwx4Fc path: /var/lib/docker/wesfgr/repair/_tmp_repairDatabase_0
2016-10-03T08:58:51.570+0200 I STORAGE  [initandlisten] exception in initAndListen: 10081 too many namespaces/collections, terminating

ログのそれらの行の多くを再起動した後:

2016-10-03T07:03:41.458+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.458+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.459+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.460+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.460+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.460+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.461+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.461+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.461+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.462+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.462+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.463+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.464+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.464+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.464+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.464+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.464+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.464+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.464+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.465+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.466+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.466+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
2016-10-03T07:03:41.466+0000 I INDEX    [initandlisten] warning: hashtable namespace index long chain
3
Ivanov

名前空間ファイルがまだ壊れているようですが、MMAPv1のデータベースのコレクションの最大数に達したときに同様のエラーが発生します。これを修正してより一貫した状態のデータベースを取得するには、新しいデータベースでコレクションを再作成してみてください。

認証を有効にしている場合は、管理データベースでこれを行う必要があります。ここでの実際のキーは、to:フィールドの新しいデータベースであることに注意してください。

use admin;
db.runCommand( { renameCollection: "db1.collection1", to: "db2.collection1" });

現在、データベース内のコレクションごとにこれを繰り返し、既存のファイルシステムにコレクションを再作成するための十分なスペースがあることを確認してください。それが完了したら、(念のため)バックアップして古いデータベースを削除することをお勧めします。

2
Adam C