Project

General

Profile

Actions

Feature #1645

closed

add ZFS "written" and "written@..." properties

Added by Matthew Ahrens over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Start date:
2011-10-14
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Add a new property, "written", and dynamic property family, "written@<snapshot>", to determine how much space was written to a filesystem or snapshot relative to a previous snapshot.

manpage changes:

written

The amount of referenced space written to this dataset
since the previous snapshot.

written@snapshot

The amount of referenced space written to this dataset
since the specified snapshot. This is the space that is
referenced by this dataset but was not referenced by the
specified snapshot.

The snapshot may be specified as a short snapshot name
(just the part after the @), in which case it will be
interpreted as a snapshot in the same filesystem as
this dataset. The snapshot be a full snapshot name
(filesystem@snapshot), which for clones may be a
snapshot in the origin's filesystem (or the origin of
the origin's filesystem, etc).

examples:

$ zfs list -t all -o name,used,written
NAME                                                             USED  WRITTEN
...
rpool/versions/2011.08.11.00/running                             299M      31K
rpool/versions/2011.08.11.00/running/svc                        37.0M        0
rpool/versions/2011.08.11.00/running/svc@2011.08.12.00          4.53M    14.4M
rpool/versions/2011.08.11.00/running/svc@2011.08.15.00          4.53M    9.04M
rpool/versions/2011.08.11.00/running/svc@2011.08.19.00              0    13.5M
rpool/versions/2011.08.11.00/running/var                         262M        0
rpool/versions/2011.08.11.00/running/var@2011.08.12.00          79.6M    81.5M
rpool/versions/2011.08.11.00/running/var@2011.08.15.00          80.3M    94.6M
rpool/versions/2011.08.11.00/running/var@2011.08.19.00              0    85.6M

$ zfs get -r written@2011.08.12.00 rpool/versions/2011.08.11.00/running     
NAME                                                    PROPERTY               VALUE                  SOURCE
rpool/versions/2011.08.11.00/running                    written@2011.08.12.00  -                      -
rpool/versions/2011.08.11.00/running/svc                written@2011.08.12.00  18.0M                  local
rpool/versions/2011.08.11.00/running/svc@2011.08.12.00  written@2011.08.12.00  0                      local
rpool/versions/2011.08.11.00/running/svc@2011.08.15.00  written@2011.08.12.00  9.04M                  local
rpool/versions/2011.08.11.00/running/svc@2011.08.19.00  written@2011.08.12.00  18.0M                  local
rpool/versions/2011.08.11.00/running/var                written@2011.08.12.00  99.9M                  local
rpool/versions/2011.08.11.00/running/var@2011.08.12.00  written@2011.08.12.00  0                      local
rpool/versions/2011.08.11.00/running/var@2011.08.15.00  written@2011.08.12.00  94.6M                  local
rpool/versions/2011.08.11.00/running/var@2011.08.19.00  written@2011.08.12.00  99.9M                  local
Actions

Also available in: Atom PDF