Recover database after SERVER-15369

38 views
Skip to first unread message

Vlad Miller

unread,
Jul 2, 2015, 9:08:39 AM7/2/15
to mongod...@googlegroups.com
Hello, 

My dev database got corrupted because of this issue https://groups.google.com/forum/#!msg/mongodb-user/gPjazaAePoo/SVAmv31CwDwJ

Invariant failure _name == nsToDatabaseSubstring( ns ) src/mongo/db/catalog/database.cpp 439


Is there any way to recover it? I had only one database? Maybe I could recompile mongod and override nsToDatabaseSubstring function to return name I needed?
We spend a lot of time writing content for our app and unfortunately didn't made a backup.

Stephen Steneker

unread,
Jul 2, 2015, 11:37:31 PM7/2/15
to mongod...@googlegroups.com, vl...@kiidu.com
Hi Vlad,

I saw you also posted this question on StackOverflow and were able to restore your data by copying the db files to a new mongod instance:

That sounds like an unusual fix if the data files were actually corrupted, so it seems likely there was another issue at play.

The error message you mention doesn't necessarily mean you encountered SERVER-15369. This specific issue only affects environments with:
  • certain 3.x Linux kernels, including Ubuntu 12.x, 14.x, and Fedora 20; and
  • VMWare platform, including VMWare ESXi, Fusion, and Workstation; and
  • virtual SCSI disks managed by LVM
Irrespective of the issue that may have caused your error, recompiling MongoDB to ignore errors or return an "expected" result will also not help fix any underlying data corruption.

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages