Template Version: @(#)sac_nextcase 1.66 04/17/08 SMI This information is Copyright 2008 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: Excluding snapshot info from 'zfs list' 1.2. Name of Document Author/Supplier: Author: Richard Morris 1.3 Date of This Document: 22 July, 2008 4. Technical Description This case changes the default output of the zfs list command. A. INTRODUCTION Currently when run without any options, the zfs list command lists all zfs datasets. This includes all filesystems, volumes, and snapshots. On systems with large number of snapshots, the snapshot info can flood the output, making the default zfs list command less useful in the case where the user is not interested in information about snapshots. One example is jurassic-x4600.sfbay which has 1733 zfs filesystems and 59,707 snapshots. This case changes the zfs list command to omit snapshots by default. Instead, zfs list will display only filesystems and volumes. A new pool level property will permit control of the zfs list output for that pool. The value for the new property can be set at pool creation time and import time, and later changed with the "zpool set" command. B. DESCRIPTION The zfs list command outputs the property information for the selected datasets in tabular form. Currently zfs datasets of all types are displayed. The -t option provides a way to specify one or more types to display. For example, specifying "-t snapshot,volume" displays only snapshots and volumes. This case adds a new pool level property named "listsnapshots" which can be abbreviated as "listsnaps". The default for the new property will be 'off'. When the value of this property is set to 'on' then zfs list includes snapshot information for all selected datasets in this pool. If the -r option is specified and "listsnaps" is 'on' then zfs list also displays snapshot info for all children of the selected datasets in this pool. The "listsnaps" property does not change the behavior of any subcommand of the zfs command other than list. If the "listsnaps" property is made available as a patch (Solaris 10), its default value will be 'on'. This will leave the default behavior of zfs list unchanged. Users may omit snapshot info from zfs list on this release by manually setting the property to 'off' for each pool. This case also adds a new "-t all" option to zfs list. Going forward, zfs list will include info about snapshots in a pool if "listsnaps" is 'on' for that pool or if "-t snapshot" or "-t all" is specified. The -t option to the zfs list command takes precedence over the value of the "listsnaps" property. zfs list -t snapshot displays all snapshots including those associated with pools where the "listsnaps" property is 'off'. C. MANPAGE CHANGES % diff zpool.1 zpool.new 646a648,653 > listsnaps=on | off > > Controls whether info about snapshots associated with > this pool is output when zfs list is run without the > -t option. The default value is "off". > % diff zfs.1 zfs.new 437,438c437 < The type of dataset: "filesystem", "volume", "snapshot", < or "clone". --- > The type of dataset: "filesystem", "volume", or "snapshot". 1239,1240c1244,1246 < name. By default, all datasets are displayed and contain < the following fields: --- > name. By default, all filesystems and volumes are displayed. > Snapshots are displayed if the "listsnaps" property is on > (the default is off). The following fields are displayed: 1313c1319 < tem", "snapshot" or "volume". For --- > tem", "snapshot", "volume", or "all". For 1942c1948,1949 < volumes in the system. --- > volumes in the system. Snapshots are displayed if the "listsnaps" > pool property is on (the default is off). See zpool(1M) for more > information on pool properties.