Failed mounts and restore drills
Quick answer
When a filesystem fails to mount, confirm the intended device, filesystem type, options and target before any change. A successful restore must be verified, not merely copied.
A mount-point directory can exist even when the intended filesystem is not mounted. Verify the actual mount source before copying data, then restore into an isolated location and compare expected content and metadata. A copied file count alone is insufficient evidence of recovery.
Prepare the practice environment
Run python3 lab-fixtures/troubleshooting/setup.py from the extracted root as an ordinary user. Enter the printed fresh private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. Run each snippet in a separate Bash process, not your interactive shell. Only private files are used; optional examples require an authorized snapshot VM. Do not change live services, mounts, policies or resource limits. All supplied records are fictional; no host incident records are collected. Review the lab guide.
Prerequisites
Review: High load, OOM and resource limits.
How it works
Inspect findmnt for current state, lsblk -f and blkid for available authorized devices, and the relevant fstab entry; never assume a device name is stable. Compare the expected UUID, filesystem type and mount target. Network mounts may fail because of DNS, reachability, server authorization or credentials. A read-only remount can signal a filesystem error; preserve evidence and backups before repair. Do not force a read-write remount or run repair against a mounted filesystem without filesystem-specific guidance. In a snapshot VM, validate the corrected configuration and recover through console access if boot fails. Restore data into a new private directory rather than overwrite the only copy; compare expected bytes, modes, ownership where relevant, and application consistency. Verify recovery objectives and record actual limitations. Roll back to the preserved configuration or snapshot if validation fails, and prevent recurrence with stable identifiers, monitoring and routine restore drills. Here fstab uses fictional UUIDs and no mount is attempted.
Try the examples
findmnt --fstab --tab-file ./fstab.sample -rn -o TARGET,FSTYPEThis parses the sample, not the current mount table; it cannot establish that the device exists.
Expected stdout:
/mnt/bm-data ext4Compare an invented device inventory with the private fstab. Do not change the host configuration.
Expected stdout:
UUID mismatch; stop before mountingThe helper uses rsync in a fresh directory and checks bytes and mode before modifying only the restored copy to demonstrate rejection.
Expected stdout:
restore verified; corrupted copy rejectedCommon mistakes
Do not mount unknown devices, force filesystem repair or overwrite the only backup. A checksum alone cannot establish application-level consistency.
Practice
Inspect the sample fstab, explain the UUID mismatch, then restore the private sample and verify the positive and negative checks. Write a VM-only rollback and prevention plan.
Related references
Study: findmnt, rsync. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Failed mounts and restore drills — Knowledge Check
Apply troubleshooting concepts to synthetic fixtures and VM-only scenarios.
Which field should match the intended filesystem identity?
Does parsing fstab prove that mounting will succeed?
Where should the first restore be attempted?
What should follow byte verification for a database backup?