Skip to content

zfs list -d

April 14, 2009

I’ve just pushed the changes for zfs list that give it a -d option to limit the depth to which recursive listings will go. This is of most use when you wish to list the snapshots of a given data set and only the snapshots of that data set.

PSARC 2009/171 zfs list -d and zfs get -d
6762432 zfs list –depth

Before this you could achieve this using a short pipe line which while it produced the correct results was horribly inefficient and very slow for datasets that had lots of descendents.

: v4u-1000c-gmp03.eu TS 6 $; zfs list -t snapshot rpool | grep ‘^rpool@’ rpool@spam                         0      –    64K  – rpool@two                          0      –    64K  – : v4u-1000c-gmp03.eu TS 7 $; zfs list -d 1 -t snapshot               NAME         USED  AVAIL  REFER  MOUNTPOINT rpool@spam      0      –    64K  – rpool@two       0      –    64K  – : v4u-1000c-gmp03.eu TS 8 $;  

It will allow the zfs-snapshot service to be much more efficient when it needs to list snapshots. The change will be in build 113.

Advertisements

From → Solaris

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: