眼前多少难甘事,自古男儿当自强。这篇文章主要讲述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.
【Linux虚拟机(lvm)报Unmount and run xfs_repair】
推荐阅读
- python linux 上 RS485通信 Modbus协议
- [Linux用户空间编程-2](进程间通信 - 消息队列的使用)
- linux fedora升级操作
- 升级openssh
- 一只会铲史的猫(我开发的软件一览)
- [Linux用户空间编程-1](Linux进程间主要的通信方式)
- linux fedora35禁用或启用仓库
- ruoyi-cloud 实施部署
- [Linux用户空间编程-3](Linux定时机制的几种实现方法)