Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3639

--repair fails if mongodb.lock file exists (and has data) if journaling on (but there are no journal files)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 2.1.2
    • Component/s: Storage
    • Labels:
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL

      Description

      Since journaling is now enabled by default (1.9.2+) then a repair will fail if the lock file has data from a previous run without journaling on. A repair should run even if there are no journal files when journaling is on (now default).

      FAILS:
      $mongod --port 7777 --dbpath /tmp/repairme/ --repair
      Wed Aug 17 16:14:08 [initandlisten] MongoDB starting : pid=17963 port=7777 dbpath=/tmp/repairme/ 64-bit host=lamest.local
      Wed Aug 17 16:14:08 [initandlisten]
      Wed Aug 17 16:14:08 [initandlisten] ** NOTE: This is a development version (1.9.2) of MongoDB.
      Wed Aug 17 16:14:08 [initandlisten] ** Not recommended for production.
      Wed Aug 17 16:14:08 [initandlisten]
      Wed Aug 17 16:14:08 [initandlisten] db version v1.9.2, pdfile version 4.5
      Wed Aug 17 16:14:08 [initandlisten] git version: be8931b7eee5f6efa111cd0ad8f45ccfcffca6ca
      Wed Aug 17 16:14:08 [initandlisten] build info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
      Wed Aug 17 16:14:08 [initandlisten] options:

      { dbpath: "/tmp/repairme/", port: 7777, repair: true }

      **************
      old lock file: /tmp/repairme/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
      *************
      Wed Aug 17 16:14:08 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
      Wed Aug 17 16:14:08 dbexit:
      Wed Aug 17 16:14:08 [initandlisten] shutdown: going to close listening sockets...
      Wed Aug 17 16:14:08 [initandlisten] shutdown: going to flush diaglog...
      Wed Aug 17 16:14:08 [initandlisten] shutdown: going to close sockets...
      Wed Aug 17 16:14:08 [initandlisten] shutdown: waiting for fs preallocator...
      Wed Aug 17 16:14:08 [initandlisten] shutdown: lock for final commit...
      Wed Aug 17 16:14:08 [initandlisten] shutdown: final commit...
      Wed Aug 17 16:14:08 [initandlisten] shutdown: closing all files...
      Wed Aug 17 16:14:08 [initandlisten] closeAllFiles() finished
      Wed Aug 17 16:14:08 dbexit: really exiting now

      SUCCEEDS:
      $mongod --port 7777 --dbpath /tmp/repairme/ --repair --nojournal
      ....

        Attachments

          Activity

            People

            Assignee:
            redbeard0531 Mathias Stearn
            Reporter:
            scotthernandez Scott Hernandez
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: