一、现象
CenOS 7启动信息中报:
[FAILED] Failed to mount /sysroot
.........
原因应该是:造成包含分区信息的元数据的损坏
二、解决
$: xfs_repair -v -L /dev/dm-0
$: reboot
三、xfs_repair使用方法
[root@arm97 ~]# 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. #强制log归零。这是最后一招。
-l logdev Specifies the device where the external log resides. # logdev指定外部日志所在的设备。
-m maxmem Maximum amount of memory to be used in megabytes. #maxmem以兆为单位使用的最大内存量。
-n No modify mode, just checks the filesystem for damage. #没有修改模式,只是检查文件系统是否损坏。
-P Disables prefetching. #禁用预取。
-r rtdev Specifies the device where the realtime section resides. #rtdev指定实时部分所在的设备
-v Verbose output. #详细的输出
-c subopts Change filesystem parameters - use xfs_admin. #子选项更改文件系统参数-使用xfs_admin
-o subopts Override default behaviour, refer to man page. #子选项覆盖默认行为,请参阅手册页
-t interval Reporting interval in seconds. #interval报告间隔(以秒为单位)
-d Repair dangerously. #修理危险
-V Reports version and exits. #报告版本和退出
其他问题可去下面的链接看看,是否有你想要的答案:
https://www.cnblogs.com/awakenedy/articles/9156059.html 《Centos 7 LVM xfs文件系统修复》