Bug 117799 - (FS FAT32)df does not properly report free space
(FS FAT32)df does not properly report free space
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-08 13:47 EST by Youssef Makki
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-29 16:10:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Youssef Makki 2004-03-08 13:47:09 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040211 Firefox/0.8

Description of problem:
df -h does not properly report correct free space on one of my drives.
The hard drive in question is a Western Digital 160GB drive, split
into 2 80GB partitions using the WD boot cd that ships with it, and
formatted as FAT32 for storage. It is reporting I have 1.9GB free,
whereas the number is closer to 4.83GB, checked in Windows. The reason
I know this is accurate is because the drive was full to the brim, and
I deleted data roughly equivalent to that amount.
I might also add that ever since I initially installed this drive and
it was still empty, df wasn't being nice either.  I never saved the
output, but it was reporting above 100% free space, maybe 110%, and
for 'Avail' it had "75G Z" or some odd way of reporting it.

The real problem is that Linux things the drive is full, whereas it
really isn't. That might be related to something other than df of
course, but this is how far my knowledge takes me.

Version-Release number of selected component (if applicable):
coreutils-5.0-24

How reproducible:
Always

Steps to Reproduce:
1. execute df -h
2.
3.
    

Actual Results:  Incorrect free space is reported on 1 drive.

Expected Results:  Accurate free space should be reported.

Additional info:

kernel-2.4.22-1.2174.nptl

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              18G  7.5G  9.0G  46% /
/dev/hda2              99M  6.2M   88M   7% /boot
none                  252M     0  252M   0% /dev/shm
/dev/hdb1              75G   73G  1.9G  98% /mnt/storage1
/dev/hdb5              75G   24G   51G  32% /mnt/storage2
/dev/hda1              19G  8.5G   11G  46% /mnt/win2k


# fdisk -l
 
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      2433  19543041    7  HPFS/NTFS
/dev/hda2          2434      2446    104422+  83  Linux
/dev/hda3          2447      4735  18386392+  83  Linux
/dev/hda4          4736      4865   1044225    f  Win95 Ext'd (LBA)
/dev/hda5          4736      4865   1044193+  82  Linux swap
 
Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1      9729  78148161    c  Win95 FAT32 (LBA)
/dev/hdb2          9730     19457  78140160    f  Win95 Ext'd (LBA)
/dev/hdb5          9730     19457  78140128+   b  Win95 FAT32



# hdparm -gi /dev/hdb
 
/dev/hdb:
 geometry     = 19457/255/63, sectors = 312581808, start = 0
 
 Model=WDC WD1600JB-00FUA0, FwRev=15.05R15, SerialNo=WD-WMAES1283746
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs
FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: device does not report version:
 
 * signifies the current active mode
Comment 1 Tim Waugh 2004-03-08 13:51:45 EST
Just to be clear, it's /dev/hdb1 you're talking about?

Please show the output of:

strace -estatfs df /dev/hdb1
du -s /mnt/storage1

Thanks.
Comment 2 Youssef Makki 2004-03-08 14:17:22 EST
Yes, it's /dev/hdb1. Although now I'm suspicious and intend to check
the second storage partition too.

# strace -estatfs df /dev/hdb1
Filesystem           1K-blocks      Used Available Use% Mounted on
statfs("/mnt/storage1", {f_type="MSDOS_SUPER_MAGIC", f_bsize=32768,
f_blocks=2441533, f_bfree=60943, f_bavail=60943, f_files=0, f_ffree=0,
f_fsid={0, 0}, f_namelen=260, f_frsize=0}) = 0
/dev/hdb1             78129056  76178880   1950176  98% /mnt/storage1

# du -s /mnt/storage1
73055968        /mnt/storage1


Thank you.
Comment 3 Tim Waugh 2004-03-09 10:03:57 EST
df is just reporting what the kernel tells it.
Comment 4 David Lawrence 2004-09-29 16:10:15 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.