XFS file is missing abnormal power down the server, the operating system will not boot properly

I. Background

Because of an unexpected power failure, resulting in xfs file system is damaged, boot directly into emergency mode, this server is using lvm format, xfs file system

Second, the solution process

1, making u disk boot disk, plug into the control node, and then restart the server, into rescue mode

Production u disk boot disk, omit the process, restart the server, select u disk boot

2, Procedure

vgchange  -ay    //激活控制节点的lv和vg
xfs_repair    /dev/mapper/centos-root     //修复文件系统
如果这一步不成功,那么需要执行 xfs_repair -L /dev/mapper/centos-root ,但是这样会丢失文件。操作需谨慎。
mount /dev/mapper/centos-root   /mnt/sysimage/             //尝试挂载

Guess you like

Origin www.cnblogs.com/yanling-coder/p/12160862.html