← Whiteboard questions

A server runs out of disk space

Troubleshooting, Medium

An alert says the root volume of a Linux server is full, and the application cannot write. What you see: - df -h / shows 50 GB size, 50 GB used, 0 available (100%). - df -i / shows 8% of inodes used. - du -xsh /* adds up to only 11 GB. Say which commands you run, in order, what explains the missing 39 GB, how you free space safely without losing live data, and how you stop it happening again.

Examples

Input df -h / and df -i /
Output Blocks: 50 GB size, 50 GB used, 0 available (100%). Inodes: 8% used.
Why The numbers from the statement. Read both before you choose the next command.
Input sudo du -xh --max-depth=1 / | sort -h | tail -4
Output 6.1G /var, 3.2G /usr, 0.9G /home, 11G /
Why Shows where the visible files are and how much they add up to. Compare the total with what df reports.
Input Decoy: du -sh /var/cache/apt /var/lib/apt/lists
Output About 1.2 GB.
Why Real waste you could clean, but small next to the amount that is missing.

Constraints

Your answer must contain

A server runs out of disk space · OpsKarma