Linux fails to mount partitions on boot
Posted on 2011-05-12
OK weird scenario here. We have a machine that have been mounting a partition under the device id of /dev/cciss/c1d1p1 (it's own drive and separate partition from the rest of the system drive and/or boot drive). this gets mounted to /opt/imsdb as denoted in the /etc/fstab.
After an unknown cause, the /opt/imsdb partition no longer mounts and the system will drop you to a shell before getting a chance to boot.
After entering rescue mode I type "mount -n -o remount,rw /" to make the filesystem read/writable.
After in r/w mode I edit the fstab and comment out the bad partition /dev/cciss/c1d1p1 /opt/imsdb.
After this I save the fstab and reboot and everything boots up fine.
I go in to remount the /dev/cciss/c1d1p1 partition and it does not recognize the device at all.
After some testing I find that running "partprobe" re-probes the partition table and discovers the drive and it is now OK to mount the drive again but only after running the following commands:
#e2label /dev/cciss/c1d1p1 /opt/imsdb
#mount /dev/cciss/c1d1p1 /opt/imsdb
Then everything works perfectly fine. BUT...
We need this to work as it should using the /etc/fstab. So I tried to add the commands to the rc.local so it does all of this on boot.
basically, after all of this, it boils down to partprobe needs to be run before the system tries to mount partitions from the /etc/fstab. Is there a way to do this? If not, any recommendations such as kernel updates or system patches, etc (not recommended for this scenario though)