xref: /freebsd/sys/contrib/openzfs/man/man8/zpool-list.8 (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1.\" SPDX-License-Identifier: CDDL-1.0
2.\"
3.\" CDDL HEADER START
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License (the "License").
7.\" You may not use this file except in compliance with the License.
8.\"
9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10.\" or https://opensource.org/licenses/CDDL-1.0.
11.\" See the License for the specific language governing permissions
12.\" and limitations under the License.
13.\"
14.\" When distributing Covered Code, include this CDDL HEADER in each
15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16.\" If applicable, add the following below this CDDL HEADER, with the
17.\" fields enclosed by brackets "[]" replaced with your own identifying
18.\" information: Portions Copyright [yyyy] [name of copyright owner]
19.\"
20.\" CDDL HEADER END
21.\"
22.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
23.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
24.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
25.\" Copyright (c) 2017 Datto Inc.
26.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
27.\" Copyright 2017 Nexenta Systems, Inc.
28.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
29.\"
30.Dd March 16, 2022
31.Dt ZPOOL-LIST 8
32.Os
33.
34.Sh NAME
35.Nm zpool-list
36.Nd list information about ZFS storage pools
37.Sh SYNOPSIS
38.Nm zpool
39.Cm list
40.Op Fl HgLpPv
41.Op Fl j Op Ar --json-int, --json-pool-key-guid
42.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns …
43.Op Fl T Sy u Ns | Ns Sy d
44.Oo Ar pool Oc Ns …
45.Op Ar interval Op Ar count
46.
47.Sh DESCRIPTION
48Lists the given pools along with a health status and space usage.
49If no
50.Ar pool Ns s
51are specified, all pools in the system are listed.
52When given an
53.Ar interval ,
54the information is printed every
55.Ar interval
56seconds until killed.
57If
58.Ar count
59is specified, the command exits after
60.Ar count
61reports are printed.
62.Bl -tag -width Ds
63.It Fl j , -json Op Ar --json-int, --json-pool-key-guid
64Display the list of pools in JSON format.
65Specify
66.Sy --json-int
67to display the numbers in integer format instead of strings.
68Specify
69.Sy --json-pool-key-guid
70to set pool GUID as key for pool objects instead of pool names.
71.It Fl g
72Display vdev GUIDs instead of the normal device names.
73These GUIDs can be used in place of device names for the zpool
74detach/offline/remove/replace commands.
75.It Fl H
76Scripted mode.
77Do not display headers, and separate fields by a single tab instead of arbitrary
78space.
79.It Fl o Ar property
80Comma-separated list of properties to display.
81See the
82.Xr zpoolprops 7
83manual page for a list of valid properties.
84The default list is
85.Sy name , size , allocated , free , checkpoint, expandsize , fragmentation ,
86.Sy capacity , dedupratio , health , altroot .
87.It Fl L
88Display real paths for vdevs resolving all symbolic links.
89This can be used to look up the current block device name regardless of the
90.Pa /dev/disk
91path used to open it.
92.It Fl p
93Display numbers in parsable
94.Pq exact
95values.
96.It Fl P
97Display full paths for vdevs instead of only the last component of
98the path.
99This can be used in conjunction with the
100.Fl L
101flag.
102.It Fl T Sy u Ns | Ns Sy d
103Display a time stamp.
104Specify
105.Sy u
106for a printed representation of the internal representation of time.
107See
108.Xr time 1 .
109Specify
110.Sy d
111for standard date format.
112See
113.Xr date 1 .
114.It Fl v
115Verbose statistics.
116Reports usage statistics for individual vdevs within the pool, in addition to
117the pool-wide statistics.
118.El
119.
120.Sh EXAMPLES
121.\" These are, respectively, examples 6, 15 from zpool.8
122.\" Make sure to update them bidirectionally
123.Ss Example 1 : No Listing Available ZFS Storage Pools
124The following command lists all available pools on the system.
125In this case, the pool
126.Ar zion
127is faulted due to a missing device.
128The results from this command are similar to the following:
129.Bd -literal -compact -offset Ds
130.No # Nm zpool Cm list
131NAME    SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
132rpool  19.9G  8.43G  11.4G         -    33%    42%  1.00x  ONLINE  -
133tank   61.5G  20.0G  41.5G         -    48%    32%  1.00x  ONLINE  -
134zion       -      -      -         -      -      -      -  FAULTED -
135.Ed
136.
137.Ss Example 2 : No Displaying expanded space on a device
138The following command displays the detailed information for the pool
139.Ar data .
140This pool is comprised of a single raidz vdev where one of its devices
141increased its capacity by 10 GiB.
142In this example, the pool will not be able to utilize this extra capacity until
143all the devices under the raidz vdev have been expanded.
144.Bd -literal -compact -offset Ds
145.No # Nm zpool Cm list Fl v Ar data
146NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
147data        23.9G  14.6G  9.30G         -    48%    61%  1.00x  ONLINE  -
148  raidz1    23.9G  14.6G  9.30G         -    48%
149    sda         -      -      -         -      -
150    sdb         -      -      -       10G      -
151    sdc         -      -      -         -      -
152.Ed
153.
154.Ss Example 3 : No Displaying expanded space on a device
155The following command lists all available pools on the system in JSON
156format.
157.Bd -literal -compact -offset Ds
158.No # Nm zpool Cm list Fl j | Nm jq
159{
160  "output_version": {
161    "command": "zpool list",
162    "vers_major": 0,
163    "vers_minor": 1
164  },
165  "pools": {
166    "tank": {
167      "name": "tank",
168      "type": "POOL",
169      "state": "ONLINE",
170      "guid": "15220353080205405147",
171      "txg": "2671",
172      "spa_version": "5000",
173      "zpl_version": "5",
174      "properties": {
175        "size": {
176          "value": "111G",
177          "source": {
178            "type": "NONE",
179            "data": "-"
180          }
181        },
182        "allocated": {
183          "value": "30.8G",
184          "source": {
185            "type": "NONE",
186            "data": "-"
187          }
188        },
189        "free": {
190          "value": "80.2G",
191          "source": {
192            "type": "NONE",
193            "data": "-"
194          }
195        },
196        "checkpoint": {
197          "value": "-",
198          "source": {
199            "type": "NONE",
200            "data": "-"
201          }
202        },
203        "expandsize": {
204          "value": "-",
205          "source": {
206            "type": "NONE",
207            "data": "-"
208          }
209        },
210        "fragmentation": {
211          "value": "0%",
212          "source": {
213            "type": "NONE",
214            "data": "-"
215          }
216        },
217        "capacity": {
218          "value": "27%",
219          "source": {
220            "type": "NONE",
221            "data": "-"
222          }
223        },
224        "dedupratio": {
225          "value": "1.00x",
226          "source": {
227            "type": "NONE",
228            "data": "-"
229          }
230        },
231        "health": {
232          "value": "ONLINE",
233          "source": {
234            "type": "NONE",
235            "data": "-"
236          }
237        },
238        "altroot": {
239          "value": "-",
240          "source": {
241            "type": "DEFAULT",
242            "data": "-"
243          }
244        }
245      }
246    }
247  }
248}
249
250.Ed
251.
252.Sh SEE ALSO
253.Xr zpool-import 8 ,
254.Xr zpool-status 8
255