4 ms·
Nobody thinks about inodes until suddenly your disk is full, but df tell you it is not ;)
by buildbot 4y ago
Nobody thinks about inodes until suddenly your disk is full, but df tell you it is not ;)
- zvr 4y agoOf course, the same df can show you what's happening with inodes, if used with the -i flag.
- buildbot 4y agoThis is true! Once I figured out what to search for, df was able to confirm what the problem was for me.
- jaxrtech 4y agoYou should be able to see inode usage with `df -i`, no? I usually use `df -Tih` (print the file system type, list inode usage, in human-readable format). I've had the other case where `df` says the disk is full with plenty of inodes left, but then `ncdu` says there is plenty of space (supposedly). Lo' and behold, you have some borked process still holding GBs of log files open that you thought you "deleted" -- really unlinked from a directory. tl;dr: Don't forget `lsof +L1` to find pesky processes that are holding files open that you unlinked from a directory but have yet to be actually marked as deleted on the filesystem [1]. The space on disk won't be freed until the process closes the files or is terminated. (Technically, the open files are associated with a mount point, not the file system itself, which makes dealing with symbolic links across file systems somewhat confusing.) [1]: For example, see https://unix.stackexchange.com/a/141639/332116 https://unix.stackexchange.com/a/141639/332116)
- macintux 4y agoYou have to know to ask, though.
- buildbot 4y agoExactly that took a bit of random walking to find!
- jrumbut 4y agoDid you have to learn about lsof +L1 the painful way like I had to learn about df -i (every office phone ringing at once, emails filling up with alerts, etc) or were you wise from the beginning?
- panzagl 4y agoI learned about the inotify limit last week in a similar way...