[linux-lvm] accidently formatted a physical volume...
Andreas Dilger
adilger at clusterfs.com
Tue Aug 20 13:55:02 UTC 2002
On Aug 20, 2002 13:20 -0500, Kirby C. Bohling wrote:
> In the end, LVM is an abstraction for a block device. So I'd create
> a file and connect a loopback that was the same size as the LV. So pull a
> physical extent, figure out if it is associated with the lv you're
> recovering. Take the lv extent offset it is, and seek the extent size *
> logical extent number and write it to the loopback device. Throwing
> away the LVM metadata. Now, you can take this big pile of bits to an
> ext2/3 guru, and ask them how to glean as much data as possible out of
> it. If the LV was completely on one disk, it should just fsck and
> mount. Assuming you didn't specify the sizes, and do a lot of resizing
> of the LV's that should be the case. Possibly asking the ext2/3 guru
> what the holes should be filled in with, and put that there. I'd guess
> zero's. This trick should work on both sets of disks, but it'll be
> easier to pull off with known good meta-data.
Run something like "gpart" or build the findsuper program in
e2fsprogs/misc, which should give you a pretty good idea of where things
are put on the disk.
Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/
More information about the linux-lvm
mailing list