Rescuing a dead lvm install

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.

The device mapper module is present - but not lvm - let's sort that out

modprobe dm_mod
apt-get update
apt-get install lvm2

Now we can start using it. Let's get the tool symlinks in place

cd /sbin
ln -s lvmiopversion vgscan
ln -s lvmoipversion vgchange

Now we can look at the data

vgscan
vgchange -a y
cd /mnt
mkdir home
mount -t xfs /dev/mapper/vg0-home home

Notes - I've got xfs logical volumes. All the volumes that were not on the dead disk are mountable. I had already run the vgreduce command before this point.

My thanks to Klaus Pieper and the debian-users mailing list for this one Smiling A life saver.

Technorati Tags:

Reply

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <pre> <hr>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • Replace [debbug:xxxxx] with a link to the relevant debian bug.
  • Images can be added to this post.
  • You may link to Gallery2 items on this site using a special syntax.
  • Insert Google Map macro.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options