ext4 lvreduce报错Either the superblock or the partition table is likely to be corrupt!

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

4. 缩容有风险,尽量不要缩容

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值