We have a system that is setup to have a redundant filesystem including the boot partitions. We are at a point now that the system does not boot properly on either boot partitions. When booting, it says it can't locate the volume group.
When booting on the CentOS rescue disk, fdisk -l sees all the partitions:
1st Raid has
/dev/sda1 Boot
/dev/sda2 swap
/dev/sda3 LVM
2nd Raid has
/dev/sdc1 Boot
/dev/sdc2 swap
/dev/sdc3 LVM
There is also a 3rd LVM on a raid disk that is there for only data. This is not being read either.
When running pvscan, it says "No matching physical volumes found". Is there a way to see why it does not recognize the LVM physical volumes?
Best Answer
will give you very extensive output about why vgscan considers any specific volume being part of a volume group. You also could run
pvs -a
to see a summary of your physical volumes alongside with volume group assignments."no label detected" sounds pretty sad. You are sure that it is a LVM2 partition and not, say, a partition used by md-raid? You could check using
mdadm --examine /dev/sdc3
. And please postfdisk -l /dev/sdc
Ah, then you will be in the lucky position (irony here, sorry) to try LVM recovery due to presumably damaged data structures. There is a howto about LVM recovery which might give you a starting point - try loading your VG configuration either from the disk itself (using
dd if=/dev/sdc3 bs=512 count=255 skip=1
) or from the /etc/lvm/backup folder of your former root filesystem (which I understand is on /dev/sdc1) into /etc/lvm/backup/ and re-issuing thevgscan
command.This is expected - both, VG and LV configs is cleartext within binary structures.