Repairing Filesystems with fsck
fsck (filesystem check) is a standard Linux utility for checking and repairing filesystem inconsistencies — necessary after an unsafe shutdown, a hard reboot via the PowerPanel, or when disk errors or data corruption are suspected.
Critical: Never run fsck on a mounted filesystem — doing so can cause severe data corruption and catastrophic data loss. This process must be performed via rescue mode, where your server's drives are unmounted by default.
Step 1: Start the Linux Rescue System
Boot your server into the Linux Rescue System first — only there can the drives be safely checked, as they are unmounted by default.
Step 2: Identify the Partition
Use lsblk -f to list all partitions and their filesystem types (column FSTYPE) on your server and identify the device name of the target partition:
Note the name of the target partition — e.g. /dev/sda3, or for software RAID /dev/md2.
Step 3: Run the Filesystem Check
Run fsck on your target partition. The -y flag automatically answers all repair prompts with "yes" — replace /dev/sda3 with your actual partition. For XFS (default on AlmaLinux and Rocky Linux), use xfs_repair /dev/sda3 instead:
The filesystem check can take several minutes on large drives. Do not interrupt the process — aborting mid-repair can cause further damage.
Step 4: Reboot
Once fsck completes and reports the filesystem as clean, exit the SSH session:
Then go to your PowerPanel and cancel rescue mode so the server reboots normally. → Cancelling rescue mode
Further Documentation
For more information on fsck options and filesystem types, refer to the official Linux man page.