Linux LVM逻辑卷错误恢复一例

使用LVM建立了一个逻辑卷为/dev/mapper/test-test。

由于异常关机,造了逻辑卷错误,无法挂载。

 

于是检查逻辑卷,提示:

# fsck.ext3 -f /dev/mapper/test-test
e2fsck 1.38 (30-Jun-2005)
fsck.ext3: Attempt to read block from filesystem resulted in short read while trying to open /dev/mapper/test-test
Could this be a zero-length partition?

 

然后,查看了一下这个逻辑卷的信息:

# mkfs.ext3 -n /dev/mapper/test-test
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
6553600 inodes, 13107200 blocks
655360 blocks (5.00%) reserved for the super user
First data block=0
400 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

 

然后,尝试了一下,用备用超级块来修复:

# fsck.ext3 -b 163840 /dev/mapper/test-test
e2fsck 1.38 (30-Jun-2005)
fsck.ext3: Attempt to read block from filesystem resulted in short read while trying to open /dev/mapper/test-test
Could this be a zero-length partition?

 

结果仍然报错。那就再试试重启lvm服务吧,执行

/etc/init.d/lvm stop

/etc/init.d/lvm start

然后再执行:

# fsck.ext3 -b 163840 /dev/mapper/test-test
e2fsck 1.38 (30-Jun-2005)
ext3 recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
/dev/mapper/test-test: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/mapper/test-test: ***** FILE SYSTEM WAS MODIFIED *****
/dev/mapper/test-test: 31/6553600 files (3.2% non-contiguous), 1823265/13107200 blocks

 

执行/etc/init.d/checkfs.sh start,也可检查、修复文件系统。

 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值