Linux虚拟机(lvm)报Unmount and run xfs_repair

原因:因为突然断电,导致机器关闭

结果:发现有一台虚拟机无法启动,一直报错 Unmount and run xfs_repair

分析:主机异常掉电后里面的虚拟机无法启动,主要是损坏的分区

解决办法:

原因:看出来应该是dm-0分区损坏,修复就可以了

1:启动虚拟机E进入单用户模式

2:在linux16开头的哪一行后面添加rd.break,ctrl+x进入救援模式

 

3:分析dm-0

ls -l /dev/mapper

 

4:卸载目录

umount /dev/mapper/centos-root

 5:修复目录

xfs_repair -L /dev/mapper/centos-root

 6:重启机器

init 6

修复完成

 

xfs_repair -h
xfs_repair: invalid option -- 'h'
Usage: xfs_repair [options] device

Options:
-f The device is a file
-L Force log zeroing. Do this as a last resort.
-l logdev Specifies the device where the external log resides.
-m maxmem Maximum amount of memory to be used in megabytes.
-n No modify mode, just checks the filesystem for damage.
-P Disables prefetching.
-r rtdev Specifies the device where the realtime section resides.
-v Verbose output.
-c subopts Change filesystem parameters - use xfs_admin.
-o subopts Override default behaviour, refer to man page.
-t interval Reporting interval in minutes.
-d Repair dangerously.
-V Reports version and exits.

  • 18
    点赞
  • 49
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 9
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南宫乘风

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值