Younes,

Including your zpool list output for tank would be helpful because zfs
list includes the AVAILABLE pool space. Determining volume space is a
bit trickier because volume size is set at creation time but the
allocated size might not be consumed.

I include a simple example below that might help.

The Nevada release revises the zpool list output to include
SIZE, ALLOC, and FREE, which helps clarify the values.

Cindy



A mirrored pool tank of 2 x 136GB disks:

# zpool create tank mirror c1t1d0 c1t2d0
# zpool list tank
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank   136G  76.5K   136G     0%  ONLINE  -

Review how much space is available for datasets:
# zfs list -r tank
NAME   USED  AVAIL  REFER  MOUNTPOINT
tank    72K   134G    21K  /tank

Approx 2 GB of pool space is consumed for metadata.

I create two volumes, 10GB and 20GB, in size:
# zfs create -V 10G tank/vol1
# zfs create -V 20G tank/vol2
# zfs list -r tank
NAME        USED  AVAIL  REFER  MOUNTPOINT
tank       30.0G   104G    21K  /tank
tank/vol1    10G   114G    16K  -
tank/vol2    20G   124G    16K  -

In the above output, USED is 30.0G due to the creation of the volumes.

If we check the pool space consumed:

# zpool list tank
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank   136G   124K   136G     0%  ONLINE  -

USED is only 124K because the volumes contain no data yet and USED also
included a small amount of metadata.

On 01/21/10 20:53, younes naguib wrote:
Hi dan,

Thanks for your reply.

I'm not sure about that, as it shows different values for different zvol.
# zfs list -o space
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD tank 1.33T 27.2T 0 32.0K 0 27.2T
tank/test1       2.28T     1T         0   51.4G           973G          0
tank/test2        2.33T     1T         0   1.31G          1023G          0
tank/test3       1.38T   100G         0   50.4G          49.6G          0
....

Thanks,
Younes

On Thu, Jan 21, 2010 at 10:48 PM, Daniel Carosone <d...@geek.com.au <mailto:d...@geek.com.au>> wrote:

    On Thu, Jan 21, 2010 at 07:33:47PM -0800, Younes wrote:
     > Hello all,
     >
     > I have a small issue with zfs.
     > I create a volume 1TB.
     >
> # zfs get all tank/test01 NAME PROPERTY
                 VALUE                  SOURCE
     > tank/test01  used                  1T                     -
     > tank/test01  available             2.26T                  -
     > tank/test01  referenced            79.4G                  -
     > tank/test01  reservation           none                   default
     > tank/test01  refreservation        1T                     local
     > tank/test01  usedbydataset         79.4G                  -
     > tank/test01  usedbychildren        0                      -
     > tank/test01  usedbyrefreservation  945G                   -

    I've trimmed some not relevant properties.

     > What bugs me is the available:2.26T.
     >
     > Any ideas on why is that?

    That's the available space in the rest of the pool. This includes
    space that could be used (ie, available for) potential snapshots of
    the volume (which would show in usedbychildren), since the volume size
    is a refreservation not a reservation.

    --
    Dan.



------------------------------------------------------------------------

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to