Younes
2010-Jan-22 03:33 UTC
[zfs-discuss] zfs zvol available space vs used space vs reserved space
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 type volume - tank/test01 creation Thu Jan 21 15:05 2010 - tank/test01 used 1T - tank/test01 available 2.26T - tank/test01 referenced 79.4G - tank/test01 compressratio 1.00x - tank/test01 reservation none default tank/test01 volsize 1T - tank/test01 volblocksize 8K - tank/test01 checksum on default tank/test01 compression off default tank/test01 readonly off default tank/test01 shareiscsi off default tank/test01 copies 1 default tank/test01 refreservation 1T local tank/test01 primarycache all default tank/test01 secondarycache all default tank/test01 usedbysnapshots 0 - tank/test01 usedbydataset 79.4G - tank/test01 usedbychildren 0 - tank/test01 usedbyrefreservation 945G - What bugs me is the available:2.26T. Any ideas on why is that? Thanks, Younes -- This message posted from opensolaris.org
Daniel Carosone
2010-Jan-22 03:48 UTC
[zfs-discuss] zfs zvol available space vs used space vs reserved space
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. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 194 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100122/dbe33173/attachment.bin>
younes naguib
2010-Jan-22 03:53 UTC
[zfs-discuss] zfs zvol available space vs used space vs reserved space
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 <dan at 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. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100121/d1b96dd5/attachment-0001.html>
Cindy Swearingen
2010-Jan-22 18:56 UTC
[zfs-discuss] zfs zvol available space vs used space vs reserved space
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 <dan at geek.com.au > <mailto:dan at 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 at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss