1

I am playing with LVM and while doing lvreduce. I now get this error:

[root@localhost raja]# e2fsck -f /dev/vg1/lvol2
e2fsck 1.41.12 (17-May-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/vg1/lvol2

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>

How can I fix this?

4
  • You did resize the FS before reducing the lv, right?
    – Mat
    Commented Dec 29, 2013 at 11:10
  • @Mat while reducing the file system I am getting some error with superblocks , thats why I went for e2fsck and stopped.
    – Raja G
    Commented Dec 29, 2013 at 11:11
  • Did you run lvreduce already or not?
    – Mat
    Commented Dec 29, 2013 at 11:12
  • No I didnt, I first reduce the filesystem then only I can go for lvreduce.
    – Raja G
    Commented Dec 29, 2013 at 11:15

1 Answer 1

2

If the filesystem is really on that device, running mkfs.ext4 with the same arguments plus a -n will give you a list of superblocks that you can use as alternates. Eg:

# mkfs.ext4 -n /dev/vg1/lvol2

... Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Then you can run e2fsck -b 32768 /dev/vg1/lvol2 or other backup superblock to see if it will fix it. PS: 32768 is a typical backup block while the other locations depend on the size of the partition.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .