disk full but df says there is room
"No space left on device" with free gigabytes: the disk is out of inodes, the slots for files. Find the folder with too many small files.
disksfiles
steps
-
df -hthe space left
-
df -ithe inodes left: IUse% at 100% is the problem
-
sudo du --inodes -xd 1 / | sort -n | tailthe folders with the most files, at the top of the disk (GNU)
-
sudo find /var -xdev -type f | cut -d/ -f2-4 | sort | uniq -c | sort -n | tailwhere under /var the files are
notes
- The usual ones: session or cache folders, mail queues, old kernels' headers. Delete what you know is safe.
commands used
dfdufind
Each has a page in lore: lore df opens it.
create a large file
Make a file of a given size, for testing disks, uploads or swap.
find big files
Find the files that take the most room, on a whole disk or in a folder.
free disk space
Find what fills a disk, then clear what is safe to clear: old package files, logs, caches.
see the size of files and folders
How much room each file and folder takes, here or anywhere, biggest last.