[svlug] df reports incorrect space usage
Andy
anand at gmx.net
Mon Dec 6 20:25:19 PST 2004
Hi,
== myconfig ==
Running on a P4, 1.7GHz with 640MB SDRAM, with MDK9.1 and a customized
Kernel, with a KDE desktop. (Intel 845GLLY mobo with 40G HDD, Home PC)
[andy at ferrari andy]$ uname -a
Linux ferrari.ncs 2.4.21-0.13oracle817 #16 Thu Jan 1 00:08:48 IST 2004
i686 unknown unknown GNU/Linux
== myconfig ==
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 in the mail.
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 at ferrari andy]# 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/partX)
Now,
[root at ferrari andy]# 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
And,
[root at ferrari andy]# du /mnt/win_c
...
7.6G /mnt/win_c (Which is correct, but df reports only 3MB free!)
Earlier the df o/p for win_c used to be fine. I carried out some
maintenance on win_c freeing up diskspace in excess of 1.5 GB and
since then df o/p has been coming wrong
[root at ferrari andy]# 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 win32 installables over 700 MB in sizes and this
information has changed since then.
[root at ferrari andy]# du /mnt/win_e
...
9.3G /mnt/win_e (This is correct)
My fstab entries are as follows,
[root at ferrari andy]# 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
Any pointers to where I should be looking at will be really helpful.
Thanks
More information about the svlug
mailing list