[linux-lvm] resize of LV causing superblock corruption ( Bad magic number ). how to prevent/fix?

Bryn M. Reeves bmr at redhat.com
Mon Jul 22 09:58:27 UTC 2013


This is an fdisk rather than LVM2 problem.

Compare:

On 07/21/2013 09:34 PM, darx at sent.com wrote:
> 	fdisk -l /dev/VGTEST/test_root | grep Linux
> 		/dev/VGTEST/test_root1            2048     8388607    
                                                  ^^^^
> 		4193280   83  Linux

vs.:


> 	fdisk -l /dev/VGTEST/test_root | grep Linux
> 		/dev/VGTEST/test_root1              32    25165823   
                                                    ^^
> 		12582896   83  Linux

I.e. your fdisk program moved the start of the partition. That'll pretty
much break any file system that has fixed superblock locations.

Either use an fdisk that matches the defaults used when the partition
was first created or ensure you are using sector display units (looks
like you are - 2048 == 1MiB which is the default used by modern fdisks
from util-linux) and carefully match the start location when
deleting/re-adding.

Btw this is fixable as long as you can still find the correct starting
sector.

Regards,
Bryn.




More information about the linux-lvm mailing list