[SERVER-1609] repair should clear lock file Created: 10/Aug/10  Updated: 12/Jul/16  Resolved: 04/Apr/11

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 1.6.0
Fix Version/s: 1.9.0

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Mathias Stearn
Resolution: Done Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Participants:

 Description   

Someone asked if repair can automatically clear the lock file. Do we want to implement that?

aaron-staples-macbook-pro:mongo3 aaron$ ./mongod --repair
Tue Aug 10 10:48:53 MongoDB starting : pid=61129 port=27017 dbpath=/data/db/ 64-bit
Tue Aug 10 10:48:53 db version v1.6.0, pdfile version 4.5
Tue Aug 10 10:48:53 git version: 2c7f164b653f0d703947572ede064aed41cc2185
Tue Aug 10 10:48:53 sys info: Darwin aaron-staples-macbook-pro.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_42

                            • old lock file: /data/db/mongod.lock. probably means unclean shutdown
                              recommend removing file and running --repair
                              see: http://dochub.mongodb.org/core/repair for more information
                              *************



 Comments   
Comment by auto [ 04/Apr/11 ]

Author:

{u'login': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: Dont error out due to lockfile when running with --repair SERVER-1609
Branch: master
https://github.com/mongodb/mongo/commit/e73c3aac9d5a594b0e1bf23643b2b48e025bf51a

Comment by Dimitris Balaouras [ 10/Aug/10 ]

Another option: add --unlock parameter to unlock the file

Generated at Thu Feb 08 02:57:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.