[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] recovering data from inside a partitioned lv



Hi,

> Server has been rebooted, and now only /dev/vg1/lv1 is shown.  parted
> can open the lv and shows 1 partition inside, but doesn't understand
> ext3 volumes, so can't copy the partition to another disk.  tune2fs
> can't see /dev/vg1/lv1p1, or I'd use that to change the fs type to ext2.
I think the partition entry under /dev is missing. After the initial
fdisk it was created.
So two ways to recover:
-Open fdisk on the lv. Do not do any changes, but leave and (w)rite. I'd
say the entries lv1p1 will be re-created then. Mount it, copy the data
and get rid of partition.
-Use loop device. This is much more complicated but will work, though:
losetup -o$[512*63] /dev/loop1 /dev/vg1/lv1
So it will create a loop device /dev/loop1 from lv1 with an offset of
512*63 (default blocksize and partitioning schema, may vary thought) .
And then simply mount the loop device with the "-o loop" option for
mount. Copy and get rid of partition.

Hope this helps, let us know if it does.
GReetings

Christian


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]