Hello Sanjeev,

Wednesday, December 3, 2008, 5:20:47 AM, you wrote:

S> Hi,

S> A good rough estimate would be the total of the space
S> that is displayed under the "USED" column of "zfs list" for those snapshots.

S> Here is an example :
S> -- snip --
S> [EMAIL PROTECTED] zfs list -r tank
S> NAME         USED  AVAIL  REFER  MOUNTPOINT
S> tank        24.6M  38.9M    19K  /tank
S> tank/fs1    24.4M  38.9M    18K  /tank/fs1
S> tank/[EMAIL PROTECTED]  24.4M      -  24.4M  -
S> -- snip --

S> In the above case tank/[EMAIL PROTECTED] is using 24.4M. So, if we delete
S> that snapshot it would freeup about 24.4M. Let's delete it an
S> see what we get :

S> -- snip --
S> [EMAIL PROTECTED] zfs destroy tank/[EMAIL PROTECTED]
S> [EMAIL PROTECTED] zfs list -r tank
S> NAME       USED  AVAIL  REFER  MOUNTPOINT
S> tank       220K  63.3M    19K  /tank
S> tank/fs1    18K  63.3M    18K  /tank/fs1
S> -- snip --

S> So, we did get back 24.4M freed (39.9M + 24.4M = 63.3M).

S> Note that this could get a little complicated if there are multiple
S> snapshots which refer to the same set of blocks. So, even after deleting
S> one snapshot you might not see the space freed up. And this could be because,
S> of the second snapshot which is refering to some of the blocks still.


That's what I meant by:

>> I'm afraid you can do only one at a time.

The problem is that once you got several snapshots and you want to
calculate how much space you will re-gain if you delete two (or more)
of them - you just can't calculate it by looking at zfs list output.
All you can say is how much space at least you will re-gain which is
summary of used column for snapshots to be deleted - but if they share
some blocks then you might or might not (depends if yet other
snapshots share some of these shared blocks) re-gain much more.


-- 
Best regards,
 Robert Milkowski                            mailto:[EMAIL PROTECTED]
                                       http://milek.blogspot.com

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

Reply via email to