虚拟机断电后无法正常启动。
[ 3.853121] XFS (dm-0): Please umount the filesystem and rectify the problem(s)
[ 3•0M521] systemd-fstab-generator[444]: Failed to open /sysroot/etc/fstab: Input/output error
Generating "/run/in itramfs/rdsosreport.txt"
Entering emergency mode. Exit the shell to continue.
Type "journaletl” to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.
参照网上的解决方法是(大部分的情况但我不行):
xfs_repair -v -L /dev/dm-0
输入后得到:
xfs_repair: cannot open /dev/dm-0: Device or resource busy
继续看日志(输入journalctl):
[ 3.852991] XFS (dm-0): Unmount and run xfs_repair
系统提示,需要先umount,再执行 xfs_repair 命令
所以,先umount,dm-0 是centos-root 的软连接
umount /dev/mapper/centos-root
xfs_repair -v -L /dev/mapper/centos-root
init 6
完毕!