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. 问题解决
-- 由于未umount卸载挂载目录,导致报错,只需要再次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
复制
4. 缩容有风险,尽量不要缩容
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。