I have most of my debian boxes using lvm2. On one (sadly my main server I was getting):
Incorrect metadata area header checksum
but everything seemed to be working.
So - I ran vgscan. This stated that there was a problem on /dev/hdd. Well - /dev/hdd is a cdrom unit - so no lvm there.
I edited /etc/lvm/lvm.conf and changed
filter = [ "r|/dev/cdrom|" ]
to
filter = [ "r|/dev/cdrom|", "r|/dev/hdd|" ]
which solves the issue for me.
One of my machines has an lvm2 volume group spread across three disks. One died - here's how I rescued some of the data
Very luckily - the dead disk contained one whole logical volume - used for media storage. This meant that all the other logical volumes were there - but - lvm wouldn't start.
If I'd found out about it in time then this should have been enough:
vgreduce --removemissing vg0
However - by the time I found that the system was in a worse state (wouldn't boot even to single user mode).
So - here's how I got the data off using knoppix.
Boot to knoppix then switch to a tty.
All you need to know is found here http://deb.riseup.net/storage/encryption/dmcrypt/
Comments
Had a powercut over most of Oslo. When this box came up the partition table on /dev/hdb was totally gone.
Now - this is not good since most of the partitions on the box are lvm2 partitions using physical volumes on both hda and hdb.
First thing to try was to look in /etc/lvm/archive for the latest vol group descriptor. This stated that the lvm partition was installed on /dev/hdb (note - no idea how I managed that - or why). Nothing would work using hdb sadly so a new partition hdb1 of type lvm was added spanning the whole disk. pvdisplay stated that it couldn't find a device with a given UUID. Some googling led to the following:
This machine is a debian sarge install (2.6 kernel). During installation - it was set up with root as ext3, some swap - and the rest of the disk as an lvm area. All partitions within this area are xfs. All the work was done by the debian installer. Now - we have a new disk which I needed to add.
So - since this is an already running box - the debian installer can't really be used - let's use the actual utilities.
All of the required steps are documented on the LVM HOWTO
First - we need to decide if we are going to use the whole disk or a partition. In this case - the whole disk /dev/hdb. To be able to do this - any existing partition table must be removed