I just finished running fsck on an LVM and was having some issues since I was actually trying to run the check on the disk itself rather then the LVM. I completely forgot that you needed to run it on the actual individual LVM’s which prompted me to add this to our blog for others and also for quick reference for the future. Here is how you do it.
First thing that has to be done is to either reboot your system into Single User:
[root@localhost ~]# init 1
or you can boot into rescue mode with any linux install disk. (Method I use)
After putting the linux disk in the system and waiting for it to boot you will get the below prompt. With an option to press F5
Once the screen changes type:
boot: linux rescue nomount
The installer will run to get your language and keyboard layout then you will be dropped to a prompt. Now you will need to scan for your LVM’s to do this we need to run the following commands.
# lvm vgscan
# lvm lvchange -ay /dev/VolGroup01/LogVol00
and you can run lvm lvs to list your Volume Groups and Volume Names. so that you can use this to run the e2fsck command.
# lvm lvs
LV VG Attr LSize
LogVol00 VolGroup01 -wi-a- 68.97g
Once you have this information you can now run e2fsck.
e2fsck -y /dev/VolGroup01/LogVol00
That is it, remember to reboot the system and your Disk should be all fixed up.