RHEL XFS-File system Repair
Pre-repair Activity
- Ensure Proper Data Backup (OR) at least a new snapshot
- Attach the OS Disk to the VM
Action Plan
Boot the system into Rescue mode from an installation DVD
List and activate the volumes in order to scan them
Repair the File system using xfs_repair
Reboot the server from OS HDD
Boot a system into Rescue mode from an installation boot medium
Step-1: Boot the Red Hat 8 system from an installation source that can be a DVD image, ISO image, or USB drive. We will boot the system with the ISO image as it is easy to mount anywhere like a Physical system or Virtual system.
Step 2: Once the system has successfully booted from the ISO image, the boot screen will
appear. Select the ‘Troubleshooting’ option and press enter

Step-3: In the next screen, select the ‘Rescue a Red Hat Linux system’ option and press
enter

Step-4: When prompted to mount disks on the next screen, select the option '3 (Skip to shell)'.
and hit ‘ENTER’.

Step-5: If you’re using LVM, activate the volumes in order to scan them.
# lvm vgchange -ay

Step-6: File system checker utilities such as ‘xfs_repair’ and ‘e2fsck’ guarantee only metadata
consistency across the file system, they don’t know about actual data stored within the file
system and are not data recovery tools. These applications are expected to detect and
repair at least some inconsistencies.
For LVM Volume:
# xfs_repair /dev/mapper/[vg]-[lv]
# xfs_repair /dev/mapper/rhel-root

- The VM will reboot when you enter the exit command.
- Select the option to boot from a hard drive or to unmount the CD and
boot the VM in normal mode
badblocks
andSMART
– Megidd Dec 15 '21 at 12:01