2019-11-12 22:17:40 +03:00
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER START
|
|
|
|
.\"
|
|
|
|
.\" The contents of this file are subject to the terms of the
|
|
|
|
.\" Common Development and Distribution License (the "License").
|
|
|
|
.\" You may not use this file except in compliance with the License.
|
|
|
|
.\"
|
|
|
|
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
2022-07-12 00:16:13 +03:00
|
|
|
.\" or https://opensource.org/licenses/CDDL-1.0.
|
2019-11-12 22:17:40 +03:00
|
|
|
.\" See the License for the specific language governing permissions
|
|
|
|
.\" and limitations under the License.
|
|
|
|
.\"
|
|
|
|
.\" When distributing Covered Code, include this CDDL HEADER in each
|
|
|
|
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
|
|
.\" If applicable, add the following below this CDDL HEADER, with the
|
|
|
|
.\" fields enclosed by brackets "[]" replaced with your own identifying
|
|
|
|
.\" information: Portions Copyright [yyyy] [name of copyright owner]
|
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER END
|
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
|
|
|
|
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
|
|
|
|
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
|
|
|
|
.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
|
|
|
|
.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
|
|
|
|
.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
|
|
|
|
.\" Copyright (c) 2014 Integros [integros.com]
|
|
|
|
.\" Copyright 2019 Richard Laager. All rights reserved.
|
|
|
|
.\" Copyright 2018 Nexenta Systems, Inc.
|
|
|
|
.\" Copyright 2019 Joyent, Inc.
|
|
|
|
.\"
|
2024-02-08 21:22:58 +03:00
|
|
|
.Dd February 8, 2024
|
2019-11-12 22:17:40 +03:00
|
|
|
.Dt ZFS-LIST 8
|
2020-08-21 21:55:47 +03:00
|
|
|
.Os
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sh NAME
|
2020-10-22 21:28:10 +03:00
|
|
|
.Nm zfs-list
|
2021-05-27 03:46:40 +03:00
|
|
|
.Nd list properties of ZFS datasets
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sh SYNOPSIS
|
2020-10-22 21:28:10 +03:00
|
|
|
.Nm zfs
|
2019-11-12 22:17:40 +03:00
|
|
|
.Cm list
|
|
|
|
.Op Fl r Ns | Ns Fl d Ar depth
|
|
|
|
.Op Fl Hp
|
2024-04-18 20:09:15 +03:00
|
|
|
.Op Fl j Op Ar --json-int
|
2021-05-27 03:46:40 +03:00
|
|
|
.Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns … Oc
|
|
|
|
.Oo Fl s Ar property Oc Ns …
|
|
|
|
.Oo Fl S Ar property Oc Ns …
|
|
|
|
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
|
|
|
|
.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns …
|
|
|
|
.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
If specified, you can list property information by the absolute pathname or the
|
|
|
|
relative pathname.
|
|
|
|
By default, all file systems and volumes are displayed.
|
|
|
|
Snapshots are displayed if the
|
2021-02-04 20:56:28 +03:00
|
|
|
.Sy listsnapshots
|
|
|
|
pool property is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy on
|
|
|
|
.Po the default is
|
|
|
|
.Sy off
|
2021-02-04 20:56:28 +03:00
|
|
|
.Pc ,
|
|
|
|
or if the
|
|
|
|
.Fl t Sy snapshot
|
|
|
|
or
|
|
|
|
.Fl t Sy all
|
|
|
|
options are specified.
|
2019-11-12 22:17:40 +03:00
|
|
|
The following fields are displayed:
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy name , Sy used , Sy available , Sy referenced , Sy mountpoint .
|
2019-11-12 22:17:40 +03:00
|
|
|
.Bl -tag -width "-H"
|
|
|
|
.It Fl H
|
|
|
|
Used for scripting mode.
|
|
|
|
Do not print headers and separate fields by a single tab instead of arbitrary
|
|
|
|
white space.
|
2024-04-18 20:09:15 +03:00
|
|
|
.It Fl j Op Ar --json-int
|
|
|
|
Print the output in JSON format.
|
|
|
|
Specify
|
|
|
|
.Sy --json-int
|
|
|
|
to print the numbers in integer format instead of strings in JSON output.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Fl d Ar depth
|
|
|
|
Recursively display any children of the dataset, limiting the recursion to
|
|
|
|
.Ar depth .
|
|
|
|
A
|
|
|
|
.Ar depth
|
|
|
|
of
|
|
|
|
.Sy 1
|
|
|
|
will display only the dataset and its direct children.
|
|
|
|
.It Fl o Ar property
|
|
|
|
A comma-separated list of properties to display.
|
|
|
|
The property must be:
|
2021-05-27 03:46:40 +03:00
|
|
|
.Bl -bullet -compact
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
|
|
|
One of the properties described in the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sx Native Properties
|
2019-11-12 22:17:40 +03:00
|
|
|
section of
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zfsprops 7
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
|
|
|
A user property
|
|
|
|
.It
|
|
|
|
The value
|
|
|
|
.Sy name
|
|
|
|
to display the dataset name
|
|
|
|
.It
|
|
|
|
The value
|
|
|
|
.Sy space
|
|
|
|
to display space usage properties on file systems and volumes.
|
|
|
|
This is a shortcut for specifying
|
2021-05-27 03:46:40 +03:00
|
|
|
.Fl o Ns \ \& Ns Sy name , Ns Sy avail , Ns Sy used , Ns Sy usedsnap , Ns
|
|
|
|
.Sy usedds , Ns Sy usedrefreserv , Ns Sy usedchild
|
|
|
|
.Fl t Sy filesystem , Ns Sy volume .
|
2019-11-12 22:17:40 +03:00
|
|
|
.El
|
|
|
|
.It Fl p
|
|
|
|
Display numbers in parsable
|
|
|
|
.Pq exact
|
|
|
|
values.
|
|
|
|
.It Fl r
|
|
|
|
Recursively display any children of the dataset on the command line.
|
|
|
|
.It Fl s Ar property
|
|
|
|
A property for sorting the output by column in ascending order based on the
|
|
|
|
value of the property.
|
|
|
|
The property must be one of the properties described in the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sx Properties
|
2019-11-12 22:17:40 +03:00
|
|
|
section of
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zfsprops 7
|
2019-11-12 22:17:40 +03:00
|
|
|
or the value
|
|
|
|
.Sy name
|
|
|
|
to sort by the dataset name.
|
|
|
|
Multiple properties can be specified at one time using multiple
|
|
|
|
.Fl s
|
|
|
|
property options.
|
|
|
|
Multiple
|
|
|
|
.Fl s
|
|
|
|
options are evaluated from left to right in decreasing order of importance.
|
|
|
|
The following is a list of sorting criteria:
|
2021-05-27 03:46:40 +03:00
|
|
|
.Bl -bullet -compact
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
|
|
|
Numeric types sort in numeric order.
|
|
|
|
.It
|
|
|
|
String types sort in alphabetical order.
|
|
|
|
.It
|
|
|
|
Types inappropriate for a row sort that row to the literal bottom, regardless of
|
|
|
|
the specified ordering.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
If no sorting options are specified the existing behavior of
|
|
|
|
.Nm zfs Cm list
|
|
|
|
is preserved.
|
2022-01-23 03:48:05 +03:00
|
|
|
.It Fl S Ar property
|
|
|
|
Same as
|
|
|
|
.Fl s ,
|
|
|
|
but sorts by property in descending order.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Fl t Ar type
|
|
|
|
A comma-separated list of types to display, where
|
|
|
|
.Ar type
|
|
|
|
is one of
|
|
|
|
.Sy filesystem ,
|
|
|
|
.Sy snapshot ,
|
|
|
|
.Sy volume ,
|
|
|
|
.Sy bookmark ,
|
|
|
|
or
|
|
|
|
.Sy all .
|
|
|
|
For example, specifying
|
|
|
|
.Fl t Sy snapshot
|
|
|
|
displays only snapshots.
|
2024-02-08 21:22:58 +03:00
|
|
|
.Sy fs ,
|
|
|
|
.Sy snap ,
|
|
|
|
or
|
|
|
|
.Sy vol
|
|
|
|
can be used as aliases for
|
|
|
|
.Sy filesystem ,
|
|
|
|
.Sy snapshot ,
|
|
|
|
or
|
|
|
|
.Sy volume .
|
2019-11-12 22:17:40 +03:00
|
|
|
.El
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
2022-03-16 20:33:41 +03:00
|
|
|
.Sh EXAMPLES
|
|
|
|
.\" These are, respectively, examples 5 from zfs.8
|
|
|
|
.\" Make sure to update them bidirectionally
|
|
|
|
.Ss Example 1 : No Listing ZFS Datasets
|
|
|
|
The following command lists all active file systems and volumes in the system.
|
|
|
|
Snapshots are displayed if
|
|
|
|
.Sy listsnaps Ns = Ns Sy on .
|
|
|
|
The default is
|
|
|
|
.Sy off .
|
|
|
|
See
|
|
|
|
.Xr zpoolprops 7
|
|
|
|
for more information on pool properties.
|
|
|
|
.Bd -literal -compact -offset Ds
|
|
|
|
.No # Nm zfs Cm list
|
|
|
|
NAME USED AVAIL REFER MOUNTPOINT
|
|
|
|
pool 450K 457G 18K /pool
|
|
|
|
pool/home 315K 457G 21K /export/home
|
|
|
|
pool/home/anne 18K 457G 18K /export/home/anne
|
|
|
|
pool/home/bob 276K 457G 276K /export/home/bob
|
|
|
|
.Ed
|
2024-04-18 20:09:15 +03:00
|
|
|
.Ss Example 2 : No Listing ZFS filesystems and snapshots in JSON format
|
|
|
|
.Bd -literal -compact -offset Ds
|
|
|
|
.No # Nm zfs Cm list Fl j Fl t Ar filesystem,snapshot | Cm jq
|
|
|
|
{
|
|
|
|
"output_version": {
|
|
|
|
"command": "zfs list",
|
|
|
|
"vers_major": 0,
|
|
|
|
"vers_minor": 1
|
|
|
|
},
|
|
|
|
"datasets": {
|
|
|
|
"pool": {
|
|
|
|
"name": "pool",
|
|
|
|
"type": "FILESYSTEM",
|
|
|
|
"pool": "pool",
|
|
|
|
"properties": {
|
|
|
|
"used": {
|
|
|
|
"value": "290K",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"available": {
|
|
|
|
"value": "30.5G",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"referenced": {
|
|
|
|
"value": "24K",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"mountpoint": {
|
|
|
|
"value": "/pool",
|
|
|
|
"source": {
|
|
|
|
"type": "DEFAULT",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"pool/home": {
|
|
|
|
"name": "pool/home",
|
|
|
|
"type": "FILESYSTEM",
|
|
|
|
"pool": "pool",
|
|
|
|
"properties": {
|
|
|
|
"used": {
|
|
|
|
"value": "48K",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"available": {
|
|
|
|
"value": "30.5G",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"referenced": {
|
|
|
|
"value": "24K",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"mountpoint": {
|
|
|
|
"value": "/mnt/home",
|
|
|
|
"source": {
|
|
|
|
"type": "LOCAL",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"pool/home/bob": {
|
|
|
|
"name": "pool/home/bob",
|
|
|
|
"type": "FILESYSTEM",
|
|
|
|
"pool": "pool",
|
|
|
|
"properties": {
|
|
|
|
"used": {
|
|
|
|
"value": "24K",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"available": {
|
|
|
|
"value": "30.5G",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"referenced": {
|
|
|
|
"value": "24K",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"mountpoint": {
|
|
|
|
"value": "/mnt/home/bob",
|
|
|
|
"source": {
|
|
|
|
"type": "INHERITED",
|
|
|
|
"data": "pool/home"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"pool/home/bob@v1": {
|
|
|
|
"name": "pool/home/bob@v1",
|
|
|
|
"type": "SNAPSHOT",
|
|
|
|
"pool": "pool",
|
|
|
|
"dataset": "pool/home/bob",
|
|
|
|
"snapshot_name": "v1",
|
|
|
|
"properties": {
|
|
|
|
"used": {
|
|
|
|
"value": "0B",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"available": {
|
|
|
|
"value": "-",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"referenced": {
|
|
|
|
"value": "24K",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"mountpoint": {
|
|
|
|
"value": "-",
|
|
|
|
"source": {
|
|
|
|
"type": "NONE",
|
|
|
|
"data": "-"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.Ed
|
2022-03-16 20:33:41 +03:00
|
|
|
.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sh SEE ALSO
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zfsprops 7 ,
|
|
|
|
.Xr zfs-get 8
|