[EMAIL PROTECTED] wrote:
[9:40am]  [/data/test]:test% zfs snapshot data/[EMAIL PROTECTED]
[9:41am]  [/data/test]:test% zfs snapshot data/[EMAIL PROTECTED]
...
[9:42am]  [/data/test/images/fullres]:test% zfs list
NAME                   USED  AVAIL  REFER  MOUNTPOINT
data/test             13.4G  14.2T  6.54G  /data/test
data/[EMAIL PROTECTED]       61.2K      -  66.6K  -
data/[EMAIL PROTECTED]           0      -  13.4G  -
data/[EMAIL PROTECTED]           0      -  13.4G  -
data/[EMAIL PROTECTED]           0      -  6.54G  -

When snap3 is deleted, no space will be freed (because it will still be referenced by snap2), therefore the space "used" by snap3 is 0.

What I would expect to see is:
data/[EMAIL PROTECTED]           6.86G      -  13.4G

This shows me that snap3 now is the most specific "owner" of 6.86G of
delta.

I understand that you *want* it to display a different value, but it is correctly showing the documented value. How can we make the manpage better, to avoid this confusion in the future?

By delta I mean the COW blocks that the snap represents as delta from the
previous snap and the next snap or live -- in other words what makes this
snap different from the previous or next snap.

The best way I could come up with to define a bounded number of stats to express space usage for snapshots was the amount of space "born" and the amount "killed". Space "born" is the amount of space that is newly allocated in this snapshot (ie. not referenced in the prev snap, but referenced here). Space "killed" is the amount of space that is newly freed in this snapshot (ie. referenced in the prev snap, but not referenced here).

We considered including these numbers, but decided against it, primarily because they can't actually answer the important question: how much space will be freed if I delete these N snapshots?

You can't answer this question because you don't know *which* blocks were born and killed. Consider 2 filesystems, A and B, both of which have lots of churn between every snapshot. However, in A every block is referenced by exactly 2 snapshots, and in B every block is referenced by exactly 3 snapshots (excluding the first/last few). The born/killed stats for A and B's snapshots may be the same, so there's no way to tell that to free up space in A, you must delete at least 2 adjacent snaps vs. for B, you must delete at least 3.

To really answer this question (how much space would be freed if I deleted these N snapshots), you need to know for each snapshot, how much of the space that it references was first referenced in each of the previous snapshots. We're working on a way to compute and graphically display these values, which should make them relatively easy to interpret.

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

Reply via email to