Hands-on Lab·CompTIA Linux+
Storage faults: full, out of inodes, and busy
Three storage faults are built on purpose on a 32 MB loop filesystem, so nothing on the host is at risk. A disk that fills, a disk with plenty of space and no inodes left, and a mount that refuses to unmount - each with the command that names the cause, and one where df and du disagree by 26 megabytes and both are right.
Troubleshooting Guide 25 of 28 Intermediate
- OSUbuntu 26.04 LTS
- Kernel7.0.0-30-generic
- systemd259
- Mandatory access controlAppArmor on Ubuntu, SELinux enforcing on Alma
- TimeAbout 26 min
- Firewallufw / nftables 1.1.6 - firewalld / nftables 1.1.5
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LPLUS-A01 | 192.168.0.73 | Ubuntu 26.04 LTS | Debian-family host - apt, ufw, netplan, AppArmor | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a machine reports it is out of space, or a filesystem will not unmount during a maintenance window. This matters because the same error message covers two unrelated causes, and because deleting the big file does not always give the space back.
- reading
df -handdf -ias two different questions about the same filesystem - recognising inode exhaustion from an error message that mentions space
- explaining a disagreement between
dfandduand resolving it withlsof +L1 - recovering space from a deleted file without a reboot
- finding the process that is holding a mount with
fuser -mandlsof +D - building a disposable filesystem on a loop device to practise any of this safely
Before you start
- a-disk-a-filesystem-and-a-mount-that-survives
-
A small filesystem to break on purpose
-
Fault one: no space left
-
The space df can see and du cannot find
-
Fault two: no space left, with the space still there
-
Fault three: a mount that will not unmount
-
Putting the machine back