[DOCS-1239] Pre-existing mongod.lock file is OK, provided current mongod can flock it Created: 14/Mar/13  Updated: 05/Jun/14  Resolved: 05/Nov/13

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.2

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Zack Brown
Resolution: Done Votes: 0
Labels: newwriter
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates DOCS-1862 Page in manual needed on how to deal ... Closed
Participants:
Days since reply: 10 years, 48 weeks, 6 days ago

 Description   

http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/ states:

If the mongod.lock file in the data directory specified by dbpath, /data/db by default, is not a zero-byte file, then mongod will refuse to start, and you will find a message that contains the following line in your MongoDB log our output:

I tested this, and mongod started up just fine when I had a pre-existing lock file. The server code appears to only assert when the file cannot be opened or a lock obtained by the current mongod process. In my case above, I didn't have another process (mongod or otherwise) running with a lock on that file, so the new mongod happily started and took over the old lock file.


Generated at Thu Feb 08 07:40:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.