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