[SERVER-32451] Cannot start mongod with a missing wiredTiger database Created: 22/Dec/17 Updated: 26/Jan/18 Resolved: 22/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | 3.2.17 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Greg | Assignee: | Kelsey Schubert |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | (In a clean, empty directory): ) Then, disconnect and stop the mongod process. Remove the folder "tmp" and its contents in the dbpath location. Restart mongod (same command as before) |
||||||||
| Participants: | |||||||||
| Description |
|
I cannot restart the mongo server when a wiredtiger file is missing. Ideally, I'd like to drop/ignore this database allowing me to access any others. 2017-12-21T17:14:15.690-0800 I CONTROL [initandlisten] MongoDB starting : pid=30787 port=27018 dbpath=. 64-bit host=greg-laptop , storage: { dbPath: ".", directoryPerDB: true, engine: "wiredTiger" } } |
| Comments |
| Comment by Greg [ 22/Dec/17 ] |
|
For future googlers tearing their hair out. I managed to recover from this... Build and install wiredtiger: http://source.wiredtiger.com/2.6.0/build-posix.html In the mongodb dir: Copy over .wt files from somewhere else and change the name to match these names, with a .wt extension at the end. I made a new empty db in another mongod, and then copied over these empty files $ wiredtiger/wt -v -h . -C "extensions=[wiredtiger/ext/compressors/snappy/.libs/libwiredtiger_snappy.so]" -R salvage table:MassDB_compil912/collection-24-7867037548174310433 Then restarted mongod and dropped the dbs. Thanks in part to http://www.alexbevi.com/blog/2016/02/10/recovering-a-wiredtiger-collection-from-a-corrupt-mongodb-installation/ as I'd never have figure out this snappy extension shit... |
| Comment by Greg [ 22/Dec/17 ] |
|
Thanks Kelsey, |
| Comment by Kelsey Schubert [ 22/Dec/17 ] |
|
Hi stuppie, Thanks for the report. This improvement is tracked in Kind regards, |