-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Usability
-
None
-
Environment:Ubuntu 10.04
Short story - add a 'repair' option the main control script (the one you can invoke with 'start', 'stop', 'restart' etc options.) To do a repair I should be able to do:
sudo service mongodb repair
Justification: currently if you use the packaged build then doing a repair is a pain.
First of all you don't even know it is needed. I killed the server with -9 to demonstrate this:
$ ps -ef | grep mongodb
rogerb 14098 2352 0 15:24 pts/0 00:00:00 grep mongodb
$ sudo service mongodb start
mongodb start/running, process 14105
$ ps -ef | grep mongodb
rogerb 14110 2352 0 15:24 pts/0 00:00:00 grep mongodb
As you can see the server is not running, start claims it is, but it isn't. On checking the logs you find the message about the lockfile.
To actually do the repair requires two things. Firstly you have to figure out where the lock file is and delete it. For packaged builds this information is known. See also SERVER-1609.
Secondly you have to run repair with the right user and data directories. config files etc. All this is annoying to string together and the packaged build already knows all those values.