df
and du
both incorrectly report that my root partition, a 100GB SSD, has no remaining space and uses 100G respectively; 85G in /home/steven
alone. A simple summing of the disk usage provided by du
, however, reports less than 13G used.
How can I fix this?
Specifically:
~ » du -sh ~
85G /home/steven
~ » du -b ~ | wc -l
15041
~ » du -h ~ | sort -h | tail -n 1
85G /home/steven # 91088489808 bytes if using -b for du
~ » du -b ~ | sort -n | head -n 15040 | cut -f 1 | perl -ne 'BEGIN{$i=0;}$i+=$_;END{print $i.qq|\n|;}'
12735983847 # 11-12G, roughly
There's a huge discrepancy between 85G and 11G or 12G, obviously. I ran lsof +L1
and eliminated all of the processes with files marked deleted
, but still no luck.
I have several soft links in $HOME
pointing to directories (e.g., repos
) on an external hard drive, which may be an issue based on some Stack Exchange posts I read, but I can't seem to understand it.
What should I do next?
tune2fs -m 0 /dev/...
?du
after running that, unfortunately, but it did free up 5G perdf
./home
filesystem. If it's on root you actually need that space, just probably not as much space as it reserved automatically.kill -9
on all of the PIDs. Won't that release the file handles? Also, how much space would you recommend allocating?