[linux-lvm] Recovering Data From LVM
Martin Ebourne
lists at ebourne.me.uk
Sat Sep 17 16:02:29 UTC 2005
On Sat, 2005-09-17 at 08:51 -0500, michael at stellarimagination.com wrote:
> The problem is that there does not appear to be any logical volumes in the
> volume group. This was the original layout of the disks:
>
> /dev/hda1 ext3 102MB 1 13
> /dev/hda2 lvm 39104MB 14 4998
>
> VolGroup00 Size 39040
> LogVol00 / ext3 38272
> LogVol01 swap 768
> ...
> I suspect that I corrupted the structure of the LVM when I was trying to
> mount it originally. At one point I had run "vgcreate oldhdd /dev/hb2" or
> something to that effect. None of the processes took more than a second,
> so I strongly believe that the data itself is still there.
Looks like you need to restore the original metadata to the drive, from
before you accidentally modified it. You'll find a history of metadata
backups in /etc/lvm/archives. Pick the last one that looks good (read
them, they're text files) and use vgcfgrestore to write it back to the
drive.
Then "vgchange -ay" should find the volume group and make all the
logical volumes active.
Cheers,
Martin.
More information about the linux-lvm
mailing list