If your server fails to boot or shows filesystem errors, you can run a filesystem check via the rescue system.
Note: Always create a Snapshot or Backup before running repair operations, as filesystem repairs can in rare cases lead to data loss.
-
Enable the rescue system
As explained in this getting started:
- Select the server
- Navigate to "Rescue" and click on "Enable rescue & power cycle"
- After the reboot, connect to the server as root user.
-
Check mounts
Make sure the disk is not mounted before running the check. If you mounted it earlier, unmount it first:
umount /mntRun
lsblkand identify the names of the partitions (e.g.sda1). In the steps below, replacesda1with the name of your partitions.
-
Check filesystems
- Primary disk
The
fsck -y /dev/sda1-yflag automatically answers "yes" to all repair prompts. For a more cautious approach, omit-yand confirm each fix manually.
-
Other filesystems
Use the matching tool:
Filesystem Tool ext2/3/4 fsck.ext4 /dev/sda1 XFS xfs_repair /dev/sda1 Btrfs btrfs check --repair /dev/sda1
- Primary disk
-
Restart the server
Restart your server to leave the rescue system:
reboot
After reboot, you should be able to log in the normal system again.