Red Hat Bugzilla – Bug 155819
statfs reports wrong values for FAT fs
Last modified: 2015-01-04 17:19:07 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Description of problem:
I have an external USB 2.0 hard-drive from LaCie (250Gb), and "df -h" never shows any more that 64Kb of used space on it (even though there are more that 2.8Gb there).
The only partition on the drive is formatted with vfat. However, this doesn't happen with another vfat partition (~75Gb) I have on my PATA drive.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. plug the drive
2. mount it
3. df -h
Actual Results: "df" says that there are only 64 used on the drive.
Expected Results: The line for the external drive should report correct used space for it.
I've tried kernel-2.6.11-1.19_FC3 from http://people.redhat.com/davej/kernels/Fedora/FC3/RPMS.kernel/ and the problem persists.
[carlos@auriga ~]$ df -h /media/LACIE/
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 234G 64K 234G 1% /media/LACIE
[carlos@auriga ~]$ df /media/LACIE/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 245051840 64 245051776 1% /media/LACIE
kernel-2.6.11-1.21_FC3 still shows this problem.
BTW, I also tried "coreutils-5.2.1-44" from "development", and it also has this
I've changed this to coreutils, but I now changed it back. the attached code
proves that "statfs" returns wrong values.
Created attachment 114120 [details]
how was this vfat partition created ?
I wonder if its some variant we dont support yet.
I don't really know, the disk was already formatted when I buyed it.
However, I found the problem. The fs itself was corrupt, and "dosfsck" (2.11 on
Debian) showed two issues (backup FAT different from the original FAT and
free-cluster with errors).
I reformatted it and now the problem is gone.
Fool of me to trust Windows' "check disk", which said everything was just fine...
BTW, I wonder where this problem came from... The only incident happening with
it was bug #155472 (or it could have been like that already at buy time).
I'll close this bug then.