If MongoDB is refusing to start up and you see this message:
************** old lock file: \data\db\mongod.lock. probably means unclean shutdown, but there are no journal files to recover. this is likely human error or filesystem corruption. found 1 dbs. see: http://dochub.mongodb.org/core/repair for more information *************
… see the instructions pointed to by the suggested URL.
Try starting up with the –repair option. When it completes, restart the server process as normal.
If you have the ‘probably means unclean shutdown’ message, remove the mongod.lock file by hand and then restart with –repair
2 Replies to “Recovering MondoDB from an unclean shutdown”
Please How do I remove the mongod.lock file I’ve searched but couldn’t find it. And I have followed all the instructions for unclean shut down but still getting same issues
Does the error you are seeing tell you where the .lock file is located? e.g. in the error I was seeing, the error message told me it was located (on my Mac), at: datadbmongod.lock