Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: df -h showing ...

  1. #1
    Join Date
    Feb 2011
    Location
    127.0.0.1
    Posts
    472

    Default df -h showing ...

    I wanted to find out how much free space I have on my HDD, so I issued:

    Code:
    df -h
    and I got:

    Code:
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1        19G  7.9G  9.4G  46% /
    devtmpfs        986M   16K  986M   1% /dev
    tmpfs           999M   80K  999M   1% /dev/shm
    tmpfs           999M  3.2M  996M   1% /run
    tmpfs           999M     0  999M   0% /sys/fs/cgroup
    tmpfs           999M  3.2M  996M   1% /var/lock
    tmpfs           999M  3.2M  996M   1% /var/run
    /dev/sda6        92G   73G   15G  84% /home
    FWIW, 7.9G added to 9.4G is not 19G (on sda1). Also, 73G added to 15G is not 92G...am I being silly?
    Reliable + rider = RiDeR PlUs
    ...if you find this helpful, click on the star below...
    +-+ +-+
    |r| |+|
    +-+ +-+

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: df -h showing ...

    On 2013-12-29 13:06, riderplus wrote:
    > FWIW, 7.9G added to 9.4G is not 19G (on sda1). Also, 73G added to 15G is
    > not 92G...am I being silly?


    btrfs, perhaps?

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  3. #3
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: df -h showing ...

    riderplus wrote:
    >
    > I wanted to find out how much free space I have on my HDD, so I issued:
    >
    >
    > Code:
    > --------------------
    > df -h
    > --------------------
    >


    Try df -H with a capital H

    Code:
    df -H
    --
    Version 3.10.2
    openSUSE 13.1 (Bottle) (x86_64) 64-bit
    Kernel Linux 3.11.6-4-desktop
    Where are my penguins :- https://features.opensuse.org/316767

  4. #4
    Join Date
    Feb 2011
    Location
    127.0.0.1
    Posts
    472

    Default Re: df -h showing ...

    Quote Originally Posted by robin_listas View Post
    On 2013-12-29 13:06, riderplus wrote:
    > FWIW, 7.9G added to 9.4G is not 19G (on sda1). Also, 73G added to 15G is
    > not 92G...am I being silly?


    btrfs, perhaps?

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))
    Since BTRFS file system is experimental, I am not so familiar with it, so I have no idea why the partitions seem to be bigger
    Reliable + rider = RiDeR PlUs
    ...if you find this helpful, click on the star below...
    +-+ +-+
    |r| |+|
    +-+ +-+

  5. #5
    Join Date
    Feb 2011
    Location
    127.0.0.1
    Posts
    472

    Default Re: df -h showing ...

    Quote Originally Posted by vazhavandan View Post
    riderplus wrote:
    >
    > I wanted to find out how much free space I have on my HDD, so I issued:
    >
    >
    > Code:
    > --------------------
    > df -h
    > --------------------
    >


    Try df -H with a capital H

    Code:
    df -H
    --
    Version 3.10.2
    openSUSE 13.1 (Bottle) (x86_64) 64-bit
    Kernel Linux 3.11.6-4-desktop
    Where are my penguins :- https://features.opensuse.org/316767
    Code:
    df -H
    Code:
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1        20G  8.8G  9.9G  48% /
    devtmpfs        1.1G   17k  1.1G   1% /dev
    tmpfs           1.1G  103k  1.1G   1% /dev/shm
    tmpfs           1.1G  3.5M  1.1G   1% /run
    tmpfs           1.1G     0  1.1G   0% /sys/fs/cgroup
    tmpfs           1.1G  3.5M  1.1G   1% /var/lock
    tmpfs           1.1G  3.5M  1.1G   1% /var/run
    /dev/sda6        99G   78G   16G  84% /home
    yeah...but still...there is a difference (9.9G + 8.8G is not equal to 20G on sda1)...weird for me.
    Reliable + rider = RiDeR PlUs
    ...if you find this helpful, click on the star below...
    +-+ +-+
    |r| |+|
    +-+ +-+

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: df -h showing ...

    On 2013-12-29 13:56, riderplus wrote:

    >
    > Since BTRFS file system is experimental, I am not so familiar with it,
    > so I have no idea why the partitions seem to be bigger


    Not experimental. But as btrfs stores old copies of files as snapshots, and those copies use space
    that doesn't show in all commands, well, it would explain the discrepancy.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,670
    Blog Entries
    3

    Default Re: df -h showing ...

    Quote Originally Posted by riderplus View Post
    FWIW, 7.9G added to 9.4G is not 19G (on sda1). Also, 73G added to 15G is not 92G...am I being silly?
    In my case, they add up for NTFS and FAT file systems, but not for ext2 or ext4.

    I'm pretty sure that this is unix tradition. Used + Avail should add up to 100%, but a file system can actually be filled to about 105%. Non-root processes cannot write over 100%, but root can continue until it is really full. The idea is supposed to be to keep some space unused so that sector allocation can be done in a way that minimizes fragmentation problems.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  8. #8
    Join Date
    Jun 2008
    Location
    Kansas City Area, Missouri, USA
    Posts
    7,236

    Default Re: df -h showing ...

    On 12/29/2013 08:16 AM, nrickert wrote:
    >
    > riderplus;2612227 Wrote:
    >> FWIW, 7.9G added to 9.4G is not 19G (on sda1). Also, 73G added to 15G is
    >> not 92G...am I being silly?

    >
    > In my case, they add up for NTFS and FAT file systems, but not for ext2
    > or ext4.
    >
    > I'm pretty sure that this is unix tradition. Used + Avail should add up
    > to 100%, but a file system can actually be filled to about 105%.
    > Non-root processes cannot write over 100%, but root can continue until
    > it is really full. The idea is supposed to be to keep some space unused
    > so that sector allocation can be done in a way that minimizes
    > fragmentation problems.


    Close. A vanilla mkfs for extX file systems reserves 5% of the disk space for
    exclusive use by root. With this reserve, the system can still boot even if the
    disk has been filled by non-root users. That gives the user a chance to recover
    from a runaway condition without needing to find and boot a rescue disk. That 5%
    accounts for most, if not all, of your "missing" disk.

    If you want to reduce the amount of the reserved space, 'man mkfs.ext4' will
    tell you how to do it.



  9. #9
    Join Date
    Sep 2012
    Posts
    7,095

    Default Re: df -h showing ...

    Quote Originally Posted by lwfinger View Post
    If you want to reduce the amount of the reserved space, 'man mkfs.ext4' will
    tell you how to do it.
    It can also be changed online after creation with tune2fs.

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: df -h showing ...

    On 2013-12-29 17:37, Larry Finger wrote:

    > rescue disk. That 5% accounts for most, if not all, of your "missing" disk.
    >


    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 19G 7.9G 9.4G 46% /

    (19-7.9-9.4)/19 = 0.89

    That's more than 5% lost, it is 11%.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •