Module 5: Real incidents
Incident: the disk is filling up
An alert says the disk is filling up. You've got all the commands for this now, so the steps only tell you what to find out.
● Runs 100% in your browser. Nothing here can harm a real system.
Step 1 of 6
Confirm it
Before anything else, see how bad it is, and on which filesystem.
Your task
See how full the disks are.
guest@ohsudo: ~ — Ubuntu 24.04
Starting the terminal…
What you'll practice
- Confirm it. Before anything else, see how bad it is, and on which filesystem.
- Which top folder?.
-xstays on one filesystem, so it won't wander into others. Errors about folders you can't read are just noise, so usesudo, and throw away what's left. - Go deeper. Follow the biggest one down, a level at a time, until you reach the cause.
- Name the files.
findgoes straight to the big files, wherever they are. - Free the space safely. Here's the trap: deleting a log that a program has open doesn't free the space until that program closes it.
truncate -s 0empties a file in place, which is safe either way.debug.log.1is an old, rotated log, so it isn't needed. - Check the result. Check that the space came back. Then the real fix is making sure it doesn't happen again, with log rotation, and asking why something logs so much at debug level.