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

Ensure the server is running in an unmounted environment before proceeding.

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

Find the device name of the partition you want to check.

Use lsblk to list all partitions on your server and identify the device name of the target partition:

Terminal
lsblk

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 the unmounted target partition and automatically fix any errors found.

Run fsck on your target partition. The -y flag automatically answers all repair prompts with "yes" — replace /dev/sda3 with your actual partition:

Terminal
fsck -y /dev/sda3

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

Exit the SSH session and cancel rescue mode via the PowerPanel.

Once fsck completes and reports the filesystem as clean, exit the SSH session:

Terminal
exit

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.