Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1239

Pre-existing mongod.lock file is OK, provided current mongod can flock it

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • v1.2
    • Affects Version/s: None
    • Component/s: manual
    • Labels:

      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.

            Assignee:
            zack.brown@10gen.com Zack Brown
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              11 years, 7 weeks, 1 day ago