fsck (File System Consistency Check) is a command-line utility used to check and repair the consistency of a Linux file system. Think of it as a "disk doctor" that can fix corrupted inodes, missing metadata, or directory structure errors.
NEVER run
fsck on a mounted (active) file system!Running repairs on a disk that is currently being written to by the OS will almost certainly result in severe data corruption. You must unmount the disk first.
How to check your Root Filesystem
Since you cannot unmount the root partition (/) while the Operating System is running, you must perform this check from an external environment.
Step 1: Boot into Rescue Mode
- Log in to the MyTilaa Dashboard.
- Select your VPS and click Start in rescue mode.
- Wait for the server to reboot into the Live CD environment.
- Open the Video Display console or login via SSH (if configured).
Step 2: Identify the Partition
Once in Rescue Mode, find the partition you want to check. Tilaa VPSs usually use vda.
lsblk
Look for the largest partition (e.g., /dev/vda1 or /dev/vda2).
Step 3: Run the Check
Run the command on the unmounted partition. We recommend adding the -y flag to automatically fix non-critical errors.
# Syntax: fsck -y [partition]
fsck -y /dev/vda1
What the output means:
- Clean: No errors found.
- FILE SYSTEM WAS MODIFIED: Errors were found and fixed.
Common Options & Flags
You can customize the behavior of fsck with the following flags:
| Flag | Function |
|---|---|
-y |
Yes to All: Automatically repair detected errors without asking for confirmation every time. |
-n |
No (Dry Run): Scan the disk and report errors, but do not make any changes. Safe to run on mounted disks. |
-f |
Force: Force a check even if the file system is marked as "Clean". |
Recovered Data (lost+found)
If fsck finds data segments that do not belong to a known file (orphaned data), it places them in the /lost+found directory on that partition.
After the repair, you can mount the disk and check this folder to see if any critical data was recovered there.