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

Re: after lvreduce : Either the superblock or the partition table is likely to be corrupt!



FM wrote:
TO reduce shrink a lvm volume, I used :
 umount filesystem
e2fsck -f filesystem
resize2fs (offline disk resize)
lvreduce

everything seems to be find :
lvdisplay show me the new size and if I mount the filseystem I saw the new size. But if I have use fsck to check the fs I have :
The filesystem size (according to the superblock) is 432537600 blocks
The physical size of the device is 430511104 blocks
Either the superblock or the partition table is likely to be corrupt!

Oops.

Was it the good technic to  reduce a lvm filsystem ?
Can I recover from this error ?

Don't know if you're going to be able to recover. You might be able to grow the logical volume a bit and have everything be OK or fsck might be able to fix things up. Don't know.

The technique is similar to one I use, but I insert an extra step: unmount, e2fsck, resize2fs to over-shrink, lvreduce, resize2fs to grow a bit. So, if I want to shink a file system to, say, 10G, I would first shrink it to 9G (say), shrink the logical volume to 10G and then grow the file system to fit the logical volume. That extra, final step doesn't take very long. This way I avoid the possibility of rounding errors in the various sizes. I've done this several times and not had a problem so far. Of course, it's always highly recommended to do a backup first which is absolutely no comfort when you haven't and you've got problems!

jch


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