df gives wrong size information

df gives wrong size information

Post by Ze Ya » Mon, 22 Sep 1997 04:00:00



fdisk gives the followin (and it is correct):

        Disk /dev/hdb: 64 heads, 63 sectors, 528 cylinders
        Units = cylinders of 4032 * 512 bytes

           Device Boot   Begin    Start      End   Blocks   Id  System
        /dev/hdb1            1        1      499  1005952+  83  Linux native
        /dev/hdb2          500      500      528    58464   82  Linux swap

This is from df
        Filesystem         1024-blocks  Used Available Capacity Mounted on
        /dev/hdb1             879261  280075   548889     34%   /

The total blocks '87....' is wrong.

Anyone knows why?

 
 
 

df gives wrong size information

Post by Mark Hea » Tue, 23 Sep 1997 04:00:00


: This is from df
:       Filesystem         1024-blocks  Used Available Capacity Mounted on
:       /dev/hdb1             879261  280075   548889     34%   /

: The total blocks '87....' is wrong.

You mean expr 280075 + 548889 = 828964 not 879261

: Anyone knows why?

by default ext2 filesystem reserves 5% for the superuser.

try
man tune2fs

--
-- mark heath - Netspace Online Systems.  http://www.netspace.net.au/
Obnoxious Usenet Habits #73. Use a 120-line ASCII graphic of Spock as
your signature.
:wq

 
 
 

df gives wrong size information

Post by Ze Ya » Wed, 24 Sep 1997 04:00:00




>: This is from df
>:   Filesystem         1024-blocks  Used Available Capacity Mounted on
>:   /dev/hdb1             879261  280075   548889     34%   /
>: The total blocks '87....' is wrong.
>You mean expr 280075 + 548889 = 828964 not 879261
>: Anyone knows why?

No, my disk is more than 1GB, this is the partition information.
More than 100 MB is missing.

        Disk /dev/hdb: 64 heads, 63 sectors, 528 cylinders
        Units = cylinders of 4032 * 512 bytes

          Device Boot   Begin    Start      End   Blocks   Id  System
        /dev/hdb1            1        1      499  1005952+  83  Linux native
        /dev/hdb2          500      500      528    58464   82  Linux swap

Quote:>by default ext2 filesystem reserves 5% for the superuser.

 
 
 

df gives wrong size information

Post by Mark Hea » Thu, 25 Sep 1997 04:00:00


: No, my disk is more than 1GB, this is the partition information.
: More than 100 MB is missing.

fdisk:
/dev/hda4          204      204      621   842688   83  Linux native

df:
/dev/hda4             815598  673352   100112     87%   /usr

So as you can see there is a bit of filesystem overhead  (3.2%)  which is
considerably less than your system.

Perhaps mke2fs was given the wrong (or read the wrong) device size when
making the filesystem.  

Have you tried running mke2fs on the device again?  (backup or transfer
the system first of course)

Maybe it will incorrectly report the device size.  You can specify the
filesystem size on the mke2fs command line.

--
-- mark heath - Netspace Online Systems.  http://www.netspace.net.au/
Filesystem  512-blocks     Used    Avail Capacity  Mounted on
/dev/sd0a       237918   231950   -13066   106%    /
:wq

 
 
 

df gives wrong size information

Post by Earl Frym » Thu, 02 Oct 1997 04:00:00




Quote:>fdisk gives the followin (and it is correct):

>    Disk /dev/hdb: 64 heads, 63 sectors, 528 cylinders
>    Units = cylinders of 4032 * 512 bytes

>       Device Boot   Begin    Start      End   Blocks   Id  System
>    /dev/hdb1            1        1      499  1005952+  83  Linux native
>    /dev/hdb2          500      500      528    58464   82  Linux swap

>This is from df
>    Filesystem         1024-blocks  Used Available Capacity Mounted on
>    /dev/hdb1             879261  280075   548889     34%   /

>The total blocks '87....' is wrong.

>Anyone knows why?

It looks like you specified the bytes-per-inode for the file system to
be 1024.  This setting will use approximately one eighth of the partition
blocks for inodes; in your case about 125000 blocks.  The 879261 is the
total file system space including the 5% reserved for root.  The Used
plus Available is the 95% of the file system space accessable by normal
users.

Earl Fryman

 
 
 

1. 'df' and 'du' show wrong sizes

Adabas D 10.0 Linux Business
Redhat 4.0 / RedHat 4.2

I've installed Adabas D an created an new DB using xcontrol. The Data,  
SysDev, DataDev and Transactionlog have been added to the same partition  
/dev/sdb5 aka /home/adabas. In the result the filesizes shown by 'ls -l'  
are correct, the device space shown with 'df' or 'du' is not. Has anyone  
seen this before? I have done a filesystemcheck with e2fsck but it doesnot  
detect any error.

Moving the files to another volume and back solves the problem.

Frank

Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/sdb5             303251   26150   261440      9%   /home/adabas


total 26151
drwxr-xr-x   3 adabas   adabas       1024 May  1 00:21 .
drwxr-xr-x  47 root     root         1024 Mar 27 19:39 ..
drwxr-xr-x   2 root     root        12288 Apr 30 13:01 lost+found
-rw-r--r--   1 adabas   database      204 Apr 30 14:45 util1.prot
-rw-r--r--   1 adabas   database 102404096 May  1 00:34 www.data
-rw-r--r--   1 adabas   database  1527808 May  1 03:04 www.sys
-rw-r--r--   1 adabas   database 20484096 May  1 00:38 www.trans
-rw-r--r--   1 adabas   database      240 Apr 30 23:56 xparam.prot


12      lost+found
1       util1.prot
5434    www.data
617     www.sys
20084   www.trans
1       xparam.prot

2. libXaw3d segmentation fault

3. df shows wrong size

4. Forwarded message 2

5. HELP: /var filesystem fills. df information != du information

6. Lpdeamon

7. fdisk and cfdisk giving incorrect partition size information

8. Logitech mouse problems

9. SCSI tape gives 'wrong block size'

10. Mount size wrong with Partition size.

11. wrong free disk space if I use df-command

12. df and du give different analyses

13. du and df give different results