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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • v1.2
    • None
    • manual

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 48 weeks, 6 days ago