1. 缩小ext4 lv未按照步骤导致缩小之后挂载报错
# mount -a
The filesystem size (according to the superblock) is xxxx blocks
The physical size of the device is xxxx blocks
Either the superblock or the partition table is likely to be corrupt!
2. 故障回放
# lvreduce -L 99G /dev/pgdata/lvol0 -- 未umount,直接lvreduce
# mount -a -- 报错
The filesystem size (according to the superblock) is xxxx blocks
The physical size of the device is xxxx blocks
Either the superblock or the partition table is likely to be corrupt!
3. 问题解决
-- 只需要再次lvresize将lv扩容至原来大小,再按照正规流程走一遍即可解决
# umount /pgdata
# lvresize -L 199G /dev/pgdata/lvol0 --扩容至原来lv大小
# e2fsck -f /dev/mapper/pgdata-lvol0 --检查ext4文件系统,并校正
# lvreduce -L 99G /dev/pgdata/lvol0 --lvreduce缩容
# e2fsck -f /dev/mapper/pgdata-lvol0 --检查ext4文件系统,并校正
或者使用resize2fs刷新,lvresize -r、fsadm也可以达到此目的
# resize2fs /dev/mapper/pgdata-lvo10
本文介绍了一次在未正确操作的情况下尝试缩小ext4逻辑卷(LV)导致的文件系统错误及其修复过程。文章详细记录了故障现象、不当操作步骤及正确的恢复流程,包括使用lvresize、e2fsck等工具。

2881

被折叠的 条评论
为什么被折叠?



