ZFS and disk usage

Mark Schouten mark at tuxis.nl
Fri Apr 13 12:20:53 UTC 2012


Hi,

I'm having some issues with a FreeBSD box using ZFS to serve iscsi to other boxes.

[root at storage ~]# zpool list
NAME      SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
storage  1.77T   431G  1.34T    23%  ONLINE  -

As you can see, the zpool is at only 23% of it's capacity. However, if you get a list of filesystems with "zfs list", you see that there is only 138GB free space left.
[root at storage ~]# zfs list
NAME                                    USED  AVAIL  REFER  MOUNTPOINT
storage                                1.60T   138G   431G  /storage
storage/ZFS_FS_1                         20G   158G    16K  -
storage/ZFS_FS_2                         20G   158G    16K  - 
storage/ZFS_FS_3                        100G   238G    16K  - 
storage/ZFS_FS_4                         20G   158G    16K  - 
storage/ZFS_FS_5                          1G   139G    16K  - 
storage/ZFS_FS_6                        400G   538G    16K  - 
storage/ZFS_FS_7                         20G   158G    16K  - 
storage/ZFS_FS_8                        400G   538G    16K  - 
storage/ZFS_FS_9                         20G   158G    16K  - 
storage/ZFS_FS_10                        20G   158G    16K  - 
storage/ZFS_FS_11                        20G   158G    16K  - 
storage/ZFS_FS_12                       150G   288G    16K  - 
storage/ZFS_FS_13                        20G   158G    16K  - 

These are fiesystems that are created with the following command.
zfs create -V ${size}GB ${ZFS_ROOT}/${diskname}

Now, it seems that zpool only counts the data that is actually written on the disk, and that zfs counts both the sum of the individual filesystems *and* the data actually written on disk. If I was to create a new filesystem of 138GB, the filesystem would be full, eventhough that that's not the case.

This seems weird, but I'm not sure if it's me doing something wrong, or if its a bug. Please enlighten me, thanks.



Some more info:
[root at storage ~]# uname -a
FreeBSD storage.storage 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

[root at storage ~]# zpool get all storage
NAME     PROPERTY       VALUE       SOURCE
storage  size           1.77T       -
storage  used           431G        -
storage  available      1.34T       -
storage  capacity       23%         -
storage  altroot        -           default
storage  health         ONLINE      -
storage  guid           10905194744545589060  default
storage  version        15          default
storage  bootfs         -           default
storage  delegation     on          default
storage  autoreplace    off         default
storage  cachefile      -           default
storage  failmode       wait        default
storage  listsnapshots  off         default

[root at storage ~]# zfs get all storage
NAME     PROPERTY              VALUE                  SOURCE
storage  type                  filesystem             -
storage  creation              Tue May 10 11:59 2011  -
storage  used                  1.60T                  -
storage  available             138G                   -
storage  referenced            431G                   -
storage  compressratio         1.00x                  -
storage  mounted               yes                    -
storage  quota                 none                   default
storage  reservation           none                   default
storage  recordsize            128K                   default
storage  mountpoint            /storage               default
storage  sharenfs              off                    default
storage  checksum              on                     default
storage  compression           off                    default
storage  atime                 on                     default
storage  devices               on                     default
storage  exec                  on                     default
storage  setuid                on                     default
storage  readonly              off                    default
storage  jailed                off                    default
storage  snapdir               hidden                 default
storage  aclmode               groupmask              default
storage  aclinherit            restricted             default
storage  canmount              on                     default
storage  shareiscsi            off                    default
storage  xattr                 off                    temporary
storage  copies                1                      default
storage  version               4                      -
storage  utf8only              off                    -
storage  normalization         none                   -
storage  casesensitivity       sensitive              -
storage  vscan                 off                    default
storage  nbmand                off                    default
storage  sharesmb              off                    default
storage  refquota              none                   default
storage  refreservation        none                   default
storage  primarycache          all                    default
storage  secondarycache        all                    default
storage  usedbysnapshots       0                      -
storage  usedbydataset         431G                   -
storage  usedbychildren        1.18T                  -
storage  usedbyrefreservation  0                      -

-- 
Dit bericht is verzonden via https://www.hyperdesktop.nl/. Alles, overal!

Mark Schouten  | Tuxis Internet Engineering
KvK: 09218193  | http://www.tuxis.nl/
T: 0318 200208 | info at tuxis.nl
M: 06 53463918 | mark at tuxis.nl


More information about the freebsd-fs mailing list