Once you know which resource ran out, find where it was spent and free only what you are allowed to.
du walks directories and adds up what they contain. With a depth limit it breaks the usage down by subdirectory:
-x keeps the walk within one filesystem: without it the report includes everything mounted inside the path. Replace /PATH with the directory you are investigating. With the --inodes option, du counts files and directories, which is to say the inodes spent.
The two reports often point at different directories; search by the resource that ran out. Do not hide Permission denied messages during the walk: a skipped directory drops out of the report.
A directory name like cache or tmp gives no permission to delete: that comes from the task statement or the service owner. Remove a specific subdirectory, and afterwards test a write as the user whose write failed: root bypasses permissions and can hide another cause.
In the exercise the volume is rebuilt: tmp holds two disposable directories, and the task does not say which one blocks writes.
Find what took the inodes
Files cannot be created in /mnt/lab-data again. From tmp, remove only the subdirectory (uploads or thumbs) that causes this, since the service still needs the other one; leave data alone. Then, as your own user, create report.txt in the volume root with the line report-ok.
Goals · 0 of 2
- Free the inodes by removing the right directory from tmp not done yet
- Write report.txt as your own user not done yet