Bug 135596

Summary: df shows huge negative free diskspace value
Product: [Fedora] Fedora Reporter: Bernd Bartmann <bernd.bartmann>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-13 22:02:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bernd Bartmann 2004-10-13 18:07:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

Description of problem:
df gives this really strange output on my notebook:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda5              9621848   6592740   2540332  73% /
/dev/hda1               194442 -18446744073709445828    290191 101% /boot
none                    517816         0    517816   0% /dev/shm


Here is fdisk -l:

Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
                                                                     
            
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          25      200781   83  Linux
/dev/hda2              26         150     1004062+  82  Linux swap
/dev/hda3   *         151        2583    19543072+   7  HPFS/NTFS
/dev/hda4            2584        4864    18322132+   f  W95 Ext'd (LBA)
/dev/hda5            2584        3800     9775521   83  Linux
/dev/hda6            3801        4864     8546548+  83  Linux

and mount:
/dev/hda5 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


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


How reproducible:
Always

Steps to Reproduce:
1. run df
2.
3.
    

Additional info:

Comment 1 Tim Waugh 2004-10-13 18:14:28 UTC
Please provide the 'log' file from:

strace -estatfs64 df /boot 2>log


Comment 2 Tim Waugh 2004-10-13 18:14:51 UTC
Also, what kernels have run on that machine since /boot was last fsck'd?

Comment 3 Bernd Bartmann 2004-10-13 18:27:21 UTC
The /boot partition is shared between FC2 and FC3Test1/2.
I had all the official FC2 errata kernels and the FC3Test1/2 kernels +
update kernels that appeared in rawhide on this filesystem.

I forgot to add th output if du /boot which seems correct:
13      /boot/lost+found
212     /boot/grub
13755   /boot

This is all that I get in log from strace -estatfs64 df /boot 2>log:

statfs64("/boot", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=1024,
f_blocks=194442, f_bfree=300230, f_bavail=290191, f_files=50200,
f_ffree=50137, f_fsid={0, 0}, f_namelen=255, f_frsize=1024}) = 0


Comment 4 Tim Waugh 2004-10-13 22:02:09 UTC
The filesystem has been corrupted by an FC3test kernel.  Unmount
/boot, fsck -f /boot, remount it, and see if df doesn't show sensible
numbers then.