2

I'm running Debian 6.x

df -h tells me this:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              19G   17G  696M  97% /
....

But these numbers don't add up...

# for D in $(ls -1 / | grep -vE "(home|media)"); do echo -n "$D ..........."; du -ch $D | grep total; done;
bin ...........6.0M     total
boot ...........14M     total
dev ...........256K     total
etc ...........19M      total
initrd.img ...........0 total
lib ...........96M      total
lost+found ...........16K       total
mnt ...........4.0K     total
opt ...........4.0K     total
proc ...........du: cannot access `proc/25117/task/25117/fd/3': No such file or directory
du: cannot access `proc/25117/task/25117/fdinfo/3': No such file or directory
du: cannot access `proc/25117/fd/3': No such file or directory
du: cannot access `proc/25117/fdinfo/3': No such file or directory
0       total
root ...........643M    total
sbin ...........4.7M    total
selinux ...........4.0K total
srv ...........200K     total
sys ...........0        total
tmp ...........308K     total
usr ...........4.0K     usr/src/linux-headers-2.6.32-5-686/include/config/mtdram/total
4.5G    total
var ...........677M     total
vmlinuz ...........0    total

I've rebooted and it reports the same. What am I'm missing? Where's the discrepancy?

1 Answers1

1

Ah-ah...

I had a scheduled backup script that was propagating to /media/external-hdd but the script appears to be failing in it's check of whether the drive is mounted, causing it to use the actual mounting point as the target, filling up the root filesystem.