Repair of Linux LVM xfs file system

Today, due to the non-normal computer shut down, resulting in the virtual machine file system, such as newspaper:

generating “/run/initramfs/rdsosreport.txt”
entering emergencymode.
exit the shell to continue
type “journalctl” 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。这样的错误。

After Baidu to solve the problem that the solution is very nice! ! ! Pretending this note, summarizing and sharing.

Repair steps:

"1" ls -l / dev / mapper

"2" mkdir / mnt

"3" mount / dev / mapper / cl_muban-root / mnt # Here you can also operate dm-0 in the prompt (ie, / dev / dm-0, in fact, / dev / mapper / cl_muban-root is a link to / dev / dm -0)

Or mount / dev / dm-0 / mnt 

《4》  umount /mnt

《5》  xfs_repair  /dev/mapper/cl_muban-root   或   xfs_repair  /dev/dm-0

"6" init 6 (reboot the system directly reboot)

 

 Repair command xfs_repair:

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.
-l logdev Specifies the device where the external log resides.
-m maxmem Maximum amount of memory to be used in megabytes.
-n No modify mode, just checks the filesystem for damage.
-P Disables prefetching.
-r rtdev Specifies the device where the realtime section resides.
-v Verbose output.
-c subopts Change filesystem parameters - use xfs_admin.
-o subopts Override default behaviour, refer to man page.
-t interval Reporting interval in minutes.
-d Repair dangerously.
-V Reports version and exits.
Although this problem solved, but know these, but do not know why, should again return late.

Guess you like

Origin www.cnblogs.com/zhihongming/p/11618428.html