HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

cleaning up failed repair db: path: /var/lib/docker/wesfgr/repair/_tmp_repairDatabase_0

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
varpathrepairlibdockerfailedwesfgrcleaning_tmp_repairdatabase_0

Problem

We run MongoDB 3.0.6 with MMAP in Docker container (single node). The filesystem was full and I did a repair with other path.

```
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+

Solution

It looks like your namespace file is still corrupt, you get similar errors when you hit the max number of collections for a database in MMAPv1. To try to fix this up and get a database that is in a more consistent state you can try recreating your collections in a new database.

If you have auth enabled, you will need to do this in the admin database - note that the real key here is the new database in the to: field:

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


Repeat that for each collection in the database at present, and make sure you have enough space to recreate your collection on the existing filesystem. Once that is done I would recommend backing up (just in case) and removing the old database.

Code Snippets

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

Context

StackExchange Database Administrators Q#151297, answer score: 2

Revisions (0)

No revisions yet.