[ubuntu-uk] df and du give different results

Chris Rowson christopherrowson at gmail.com
Thu Jan 3 12:49:13 GMT 2008


I'm running a Dapper webserver and I'm having terrible problems with
du and df giving different results:

df -h gives me.....

Filesystem            Size  Used Avail Use% Mounted on
                       29G   27G  347M  99% /
varrun                252M   52K  252M   1% /var/run
varlock               252M  4.0K  252M   1% /var/lock
udev                  252M   52K  252M   1% /dev
devshm                252M     0  252M   0% /dev/shm
                      1.4T  710G  671G  52% /media/netbackup
/dev/sda5             228M   14M  203M   7% /boot

sudo du -hs /* gives me.....

3.1M    /bin
9.4M    /boot
0       /cdrom
172K    /dev
2.6M    /etc
39M     /home
4.0K    /initrd
0       /initrd.img
76M     /lib
48K     /lost+found
263G    /media
4.0K    /mnt
4.0K    /opt
514M    /proc
20K     /root
8.1M    /sbin
4.0K    /srv
0       /sys
12K     /tmp
263M    /usr
14G     /var
0       /vmlinuz

Now that just doesn't add up.

I wondered if it might be a problem with open files, so I've tried

lsof | grep deleted and lsof | grep DEL

They showed Apache2 and MySQL had some files open so I restarted them.
This didn't help so I restarted the server. Still no joy!!

Please help me :-O


More information about the ubuntu-uk mailing list