brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: df -i shows a full disk that still has free gigabytes

Disk
~/tips/tip-disk-df-i-inodes

df -i /var

Shows how many inodes are used on each filesystem, which explains a disk that is full with free space left.

“No space left on device” with plenty of free gigabytes is confusing until you look at inodes.

df -i /var
df -h /var

Every file uses one inode, and on ext4 the number of inodes is fixed when the filesystem is made. A directory full of millions of tiny files, such as session or cache files, can use them all while df -h still shows free space. If IUse% is at 100%, delete the small files. XFS and Btrfs allocate inodes dynamically, so the problem is mostly an ext4 one.

Further reading: df manual page

More Disk tips sudo e2freefrag /dev/sdb1 sudo smartctl -a --json /dev/sda | jq '.smart_status.passed' lsscsi -s udisksctl power-off -b /dev/sdX du -sh — .[!.]* * 2>/dev/null | sort -h All Disk tips (44) All topics

Link