电脑开机一直卡在了 挂在 /sysroot ,尝试了进入单用户模式,结果不行,然后找光盘进入救援模式,在挂载的时候一直循环卡住,无法操作
具体提示(大概单词,具体单词记不住了):
xfs_log error 5 returned
然而修复的时候提示:
xfs_repair device or resource busy
我查看有没有挂载,也并没有发现挂载,所以我就拆掉了硬盘挂在了自己的主机上(我是加完开机的,所以已经识别了)。
- 查看新硬盘的lvm
vgscan -v --mknodes
- 激活lvm
vgchange -a y
- 尝试使用mount挂载,应该是挂载不上的,可以查看具体报错
mount /dev/卷组名/lv名 /mnt
- 修复
xfs_repair /dev/卷组名/lv名
- 如果提示
the filesystem has valuable metadata changes in a log which needs to be replayed \ mount the filesystem to replay the log and umount it before the -L option to destroy the log \ and attmpt a repairnot that destroying the log may cause corruption -- please \ attempt a mount of the file system before doing this # xfs_repair -L /dev/mapper/卷名
- xfs_repair 命令解释
-n 只检查不修复 不加参数 修复磁盘 -L 说明:-L是修复xfs文件系统的最后手段,慎重选择,它会清空日志,有可能会丢失用户数据和文件。
- 也可以使用光盘救援模式 进行上述操作
xfs 在Ubuntu 1804的包名:xfsprogs
参考网址:https://www.cnblogs.com/linkenpark/p/7873202.html