rhel 5 will not boot – No such file or directory while trying to open /dev/volgroup01/logvol

Shot myself in the foot the other day trying add space to a file system /logical volume ext4 based.  Turns out the original logical volumes were created without the use of fdisk (pvcreate probably).
I went into fdisk – and added a new partition to the same device that (this was where I made the mistake) – and then on a reboot got this error and the system fell into an emergency mode – single user root.

No such file or directory while trying to open /dev/volgroup01/logvol

I could not successfully boot until:
Fortunately for me the file system that I corrupted temporarily did not house any thing critical so all I had to do temporarily was comment that file system out of the /etc/fstab.  The problem was that emergency mode starts up by default in read only mode for ALL file systems, would not let me change /etc/fstab – because it was read only to comment out the failing / missing logical volume.
Temp fix:

mount -o remount,rw /

This got the root file system mounted read write so I could change fstab, so then I:

commented out the failing mount out of /etc/fstab

Ok, so now “voila” the system would boot – but one of my (non-essential to booting) logical volumes was missing.
What to do?  Called Redhat Tech Support at 888-733-4281
After a while – I had to call in twice – otherwise they were not going to call me back and this was a downed production system.
Once to create the ticket – and the second time (after it got assigned to a technician) I insisted I be connected by phone witht that technician.
Finally, I talked to Redhat tech support and the nice person there… informed me that I had corrupted the metadata that was previously setup by adding a partition to a /dev/sdb device that was setup without using fdisk.  He also informed me that using fdisk is possible with logical volume manager if you use it to start with.  If you create the partition in another manner – I guess I did do that way back with pvcreate – and had forgotten – don’t use fdisk as it will wipe out you logical volume.
Fortunately the Redhat support person helped me get it back.  What saved me was I didn’t mess with the logical partition that was missing… so the following steps put it back.

fdisk /dev/sdb – then deleted the partition – that I never should have created (hint “d” command deletes a partition – careful dangerous command)
partprobe
pvscan
vgchange -ay
and put my /etc/fstab back the way if was
mount -a

Ok, so this rambling posting is mostly for my own reference… but if you get something out of it… that’s a “good thang”, Mike

Leave a Comment

Scroll to Top