df reports incorrect space usage
Hi,
I am facing with this weird problem. df is reporting incorrect disk
space usage! Running du instead, reports correct space usage. I have
listed the outputs of both the commands.
I have 40 GB HDD with 4 ~10GB partitions. I have setup the linux part
on the last 10 GB, with 4 partitions namely /boot, /swp, /home and /root.
The incorrect sizes are w.r.t the fat32 partitions. Disk space usage
for the ext3 partitions are correct.
My partition table is as follows,
[root@ferrari anand]# fdisk -l
Disk /dev/ide/host0/bus1/target0/lun0/disc: 40.0 GB, 40060919808 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
lun0/part1 * 1 1216 9767488+ c Win95 FAT32 (LBA)
lun0/part2 1217 4870 29350755 f Win95 Ext'd (LBA)
lun0/part5 1217 2432 9767488+ b Win95 FAT32
lun0/part6 2433 3648 9767488+ b Win95 FAT32
lun0/part7 3649 3660 96358+ 83 Linux
lun0/part8 3661 3727 538146 82 Linux swap
lun0/part9 3728 4238 4104576 83 Linux
lun0/part10 4239 4870 5076508+ 83 Linux
(Note: Formatted o/p, dev is -> dev/ide/host0/bus1/target0/lun0/part1)
[root@ferrari anand]# uname -a
Linux ferrari.ncs 2.4.21-0.13oracle817 #16 Thu Jan 1 00:08:48 IST 2004
i686 unknown unknown GNU/Linux
[root@ferrari anand]# df
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/hdc9 3946 3384 362 91% /
/dev/hdc7 92 17 70 20% /boot
/dev/hdc10 4880 4495 386 93% /home
/dev/hdc1 9530 9527 3 100% /mnt/win_c
/dev/hdc5 9530 8981 550 95% /mnt/win_d
/dev/hdc6 9530 9460 70 100% /mnt/win_e
Now,
[root@ferrari anand]# du /mnt/win_c
...
7.6G /mnt/win_c (Which is correct, but df reports only 3MB free!)
[root@ferrari anand]# du /mnt/win_d
...
8.8G /mnt/win_d (Again wrong!)
(This is new. Earlier I use to always get 100% free for df. I recently
deleted some installables over 700 MB is size and this information has
changed since then)
[root@ferrari anand]# du /mnt/win_e
...
9.3G /mnt/win_e (This is correct)
My fstab entries are as follows,
[root@ferrari anand]# cat /etc/fstab
/dev/hdc9 / ext3 defaults 1 1
/dev/hdc7 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hdc10 /home ext3 defaults 1 2
none /mnt/cdrom supermount
dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount
dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hdc1 /mnt/win_c vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hdc5 /mnt/win_d vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hdc6 /mnt/win_e vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hdc8 swap swap defaults 0 0
/dev/sda1 /mnt/memory_card auto
user,iocharset=iso8859-1,kudzu,codepage=850,noauto,umask=0,exec 0 0
My mtab file is,
[root@ferrari anand]# cat /etc/mtab
/dev/hdc9 / ext3 rw 0 0
none /proc proc rw 0 0
none /proc/bus/usb usbdevfs rw 0 0
none /dev devfs rw 0 0
/dev/hdc7 /boot ext3 rw 0 0
none /dev/pts devpts rw,mode=0620 0 0
/dev/hdc10 /home ext3 rw 0 0
none /mnt/cdrom supermount
ro,dev=/dev/scd0,fs=auto,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount
rw,sync,dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,codepage=850,umask=0
0 0
/dev/hdc1 /mnt/win_c vfat rw,iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hdc5 /mnt/win_d vfat rw,iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hdc6 /mnt/win_e vfat rw,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
Any pointers to where I should be looking at will be really helpful.
Thanks,
-Anand
Reply to: