Linux administration isn't my thing so I'm a bit over my head here.
System information:
/proc/version -> Linux version 2.6.18-028stab091.2
/etc/debian_version -> 5.0.8
Whenever the server is shutdown & restarted, MongoDB isn't coming up. It looks like mongod isn't shutting down cleanly. The .lock file is still present & I can't bring it up manually until I remove this and run a --repair. If I look in mongod's log file I don't see the shutdown sequence, it just goes from a query to the startup.
Wed Jul 13 17:57:49 [conn1] update ps.profiles query: { blah blah blah } 224ms
Thu Jul 14 07:07:51 MongoDB starting : pid=1167 port=27017 dbpath=/srv/db/ProfileServer 64-bit
I can see that the scripts are in place to handle shutdown & restart:
$ ls -l /etc/rc0.d/*mongodb
lrwxrwxrwx 1 root root 17 Feb 17 09:46 /etc/rc0.d/K20mongodb -> ../init.d/mongodb
$ ls -l /etc/rc2.d/*mongodb
lrwxrwxrwx 1 root root 17 Feb 17 09:46 /etc/rc2.d/S20mongodb -> ../init.d/mongodb
$ ls -l /etc/rc6.d/*mongodb
lrwxrwxrwx 1 root root 17 Feb 17 09:46 /etc/rc6.d/K20mongodb -> ../init.d/mongodb
I know that the scripts work. By running
sudo /etc/init.d/mongodb stop
sudo /etc/init.d/mongodb start
I see in the logs
... various other shutdown messages ...
Thu Jul 14 08:42:06 [interruptThread] shutdown: removing fs lock...
Thu Jul 14 08:42:06 dbexit: really exiting now
Thu Jul 14 08:42:12 MongoDB starting : pid=3184 port=27017 dbpath=/srv/db/ProfileServer 64-bit
Am I doing something obviously wrong? Is there any log file that will let me trace through the runlevel change?