[linux-lvm] Rebuilding ext4 filesystem on an LV

Bryan Whitehead driver at megahappy.net
Mon Jul 5 05:54:46 UTC 2010


Dig deep into your memory (or just try different combos) of running
mkfs.ext4 -n /dev/yourVG/yourLV

-n is like a dry run so you can look for the alternate superblock locations.

Using the above info, run fsck.ext4 -b <alt location> /dev/yourVG/yourLV

Even if it can find an alternate superblock, I'm not confident the
fsck would be able to help much…

That said, I think you might be out of luck. Go ahead and give it a
shot, I'm curious how much data you'll get.

On Sun, Jul 4, 2010 at 6:30 PM, Ken Bass <daytooner at gmail.com> wrote:
> In short:
>
> - originally created LV with several physical drives (5)
> - formatted LV for ext4
> - one physical drive got many sectors trashed. Those included the partition
> and metadata.
> - did the following to recover the LV (VolGroupX-LogVolX):
> ---pvcreate --uuid <original uuid>  /dev/sdX  (successfully created)
> ---vgcfgrestore VolGroupX (restsored volume group VolGroupX)
> ---vgscan  (found volume group "VolGroupX" using metadata type lvm2)
> --- vgchange -ay VolGroupX ( note response:
> " device-mapper: reload ioctl failed: Invalid argument.
>  1 logical volume(s) in volume group "VolGroupX" now active")
>
> At this pont, /dev/mapper/VolGroupX-LogVolX exists, but I can't run any
> utilities on it, since it can't find any superblock. For example:
> ________________
> [root at Elmer ken] # e2fsck  /dev/mapper/VolGroupX-LogVolX
> e2fsck 1.41.9 (22-Aug-2009)
> e2fsck: Invalid argument while trying to open /dev/mapper/VolGroupX-LogVolX
>
> The superblock could not be read or does not describe a correct ext2
> filesystem.  If the device is valid and it really contains an ext2
> filesystem (and not swap or ufs or something else), then the superblock
> is corrupt, and you might try running e2fsck with an alternate superblock:
>     e2fsck -b 8193 <device>
>
> [root at Elmer ken] #
> _________________________
> I really want to recover at least the data on the 4 other drives, and any
> data left from this drive as well.
>
> Any help will be greatly appreciated.
>
> TIA
>
> ken
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>




More information about the linux-lvm mailing list