Rescue Mode

How can we help?

Guides and technical documentation for your Server4You dedicated server or VPS.

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.

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 -f to list all partitions and their filesystem types (column FSTYPE) on your server and identify the device name of the target partition:

Terminal
lsblk -f

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. For XFS (default on AlmaLinux and Rocky Linux), use xfs_repair /dev/sda3 instead:

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.