ZFS and df weirdness

Jeremy Faulkner gldisater at gmail.com
Sun Jul 5 17:07:29 UTC 2009


Dan Naumov wrote:
> Hello list.
> 
> I have a single 2tb disk used on a 7.2-release/amd64 system with a
> small part of it given to UFS and most of the disk given to a single
> "simple" zfs pool with several filesystems without redundancy. I've
> noticed a really weird thing regarding what "df" reports regarding the
> "total space" of one of my filesystems:
> 
> atom# zpool list
> NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
> tank                   1.80T    294G   1.51T    15%  ONLINE     -
> 
> atom# zfs list
> NAME              USED  AVAIL  REFER  MOUNTPOINT
> tank              294G  1.48T    18K  none
> tank/DATA         292G  1.48T   292G  /DATA
> tank/home         216K  1.48T    21K  /home
> tank/home/jago    132K  1.48T   132K  /home/jago
> tank/home/karni    62K  1.48T    62K  /home/karni
> tank/usr         1.33G  1.48T    18K  none
> tank/usr/local    455M  1.48T   455M  /usr/local
> tank/usr/obj       18K  1.48T    18K  /usr/obj
> tank/usr/ports    412M  1.48T   412M  /usr/ports
> tank/usr/src      495M  1.48T   495M  /usr/src
> tank/var          320K  1.48T    18K  none
> tank/var/log      302K  1.48T   302K  /var/log
> 
> atom# df
> Filesystem      1K-blocks       Used      Avail Capacity  Mounted on
> /dev/ad12s1a      16244334   1032310   13912478     7%    /
> devfs                    1         1          0   100%    /dev
> linprocfs                4         4          0   100%    /usr/compat/linux/proc
> tank/DATA       1897835904 306397056 1591438848    16%    /DATA
> tank/home       1591438848         0 1591438848     0%    /home
> tank/home/jago  1591438976       128 1591438848     0%    /home/jago
> tank/home/karni 1591438848         0 1591438848     0%    /home/karni
> tank/usr/local  1591905024    466176 1591438848     0%    /usr/local
> tank/usr/obj    1591438848         0 1591438848     0%    /usr/obj
> tank/usr/ports  1591860864    422016 1591438848     0%    /usr/ports
> tank/usr/src    1591945600    506752 1591438848     0%    /usr/src
> tank/var/log    1591439104       256 1591438848     0%    /var/log
> 
> atom# df -h
> Filesystem         Size    Used   Avail Capacity  Mounted on
> /dev/ad12s1a        15G    1.0G     13G     7%    /
> devfs              1.0K    1.0K      0B   100%    /dev
> linprocfs          4.0K    4.0K      0B   100%    /usr/compat/linux/proc
> tank/DATA          1.8T    292G    1.5T    16%    /DATA
> tank/home          1.5T      0B    1.5T     0%    /home
> tank/home/jago     1.5T    128K    1.5T     0%    /home/jago
> tank/home/karni    1.5T      0B    1.5T     0%    /home/karni
> tank/usr/local     1.5T    455M    1.5T     0%    /usr/local
> tank/usr/obj       1.5T      0B    1.5T     0%    /usr/obj
> tank/usr/ports     1.5T    412M    1.5T     0%    /usr/ports
> tank/usr/src       1.5T    495M    1.5T     0%    /usr/src
> tank/var/log       1.5T    256K    1.5T     0%    /var/log
> 
> Considering that every single filesystem is part of the exact same
> pool, with no custom options whatsoever used during filesystem
> creation (except for mountpoints), why is the size of tank/DATA 1.8T
> while the others are 1.5T?
> 
> 
> - Sincerely,
> Dan Naumov

Because 292G is already written to it with another 1.5T available for 
use. All your other filesystems are less than 0.5G so they don't impact 
the rounding o fthe Size field.

--
Jeremy Faulkner


More information about the freebsd-fs mailing list