虚拟机 硬盘满后宕机启动错误

虚拟机 磁盘空间 100% , 忘记做 计划删除log, 宕机,重启后报错:

Entering emergency mode exit the shell to continue. Type "journalctl" to view system logs.

虚拟机 硬盘满后宕机启动错误

输入 journalctl 查看日志,红色字体提示错误

failed to mount /sysroot. 
Dependency failed for Initrd root File System. 
Dependency failed for Reload configuration from the Real Root.
 

查看你的磁盘盘符 我的是xvda3

执行命令:xfs_repair -v -L /dev/xvda3

-L 选项指定强制日志清零,强制xfs_repair将日志归零,即使它包含脏数据(元数据更改)。

执行完成后重启。

进入系统后删除log即可, 计划任务及时跟进 删除log。