2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2012, Richard Lowe.
13 .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
14 .\" Copyright 2017 Nexenta Systems, Inc.
15 .\" Copyright (c) 2017 Lawrence Livermore National Security, LLC.
16 .\" Copyright (c) 2017 Intel Corporation.
23 .Nd display zpool debugging and consistency information
26 .Op Fl AbcdDFGhikLMPsvXY
27 .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
28 .Op Fl I Ar inflight I/Os
29 .Oo Fl o Ar var Ns = Ns Ar value Oc Ns ...
33 .Op Ar poolname Op Ar object ...
36 .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
38 .Ar dataset Op Ar object ...
46 .Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15
54 .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
57 .Ar poolname Op Ar vdev Op Ar metaslab ...
64 .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
66 .Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size Ns Op : Ns Ar flags
70 .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
76 utility displays information about a ZFS pool useful for debugging and performs
77 some amount of consistency checking.
78 It is a not a general purpose tool and options
85 The output of this command in general reflects the on-disk structure of a ZFS
86 pool, and is inherently unstable.
87 The precise output of most invocations is not documented, a knowledge of ZFS
92 argument does not contain any
96 characters, it is interpreted as a pool name.
97 The root dataset can be specified as
99 .Pq pool name followed by a slash .
101 When operating on an imported and active pool it is possible, though unlikely,
102 that zdb may interpret inconsistent pool data and behave erratically.
107 Display statistics regarding the number, size
108 .Pq logical, physical and allocated
109 and deduplication of blocks.
111 Verify the checksum of all metadata blocks while printing block statistics
116 If specified multiple times, verify the checksums of all blocks.
118 Display information about the configuration.
119 If specified with no other options, instead display information about the cache
121 .Pq Pa /etc/zfs/zpool.cache .
122 To specify the cache file to display, see
125 If specified multiple times, and a pool name is also specified display both the
126 cached configuration and the on-disk configuration.
127 If specified multiple times with
129 also display the configuration that would be used were the pool to be imported.
131 Display information about datasets.
132 Specified once, displays basic dataset information: ID, create transaction,
133 size, and object count.
135 If specified multiple times provides greater and greater verbosity.
137 If object IDs are specified, display information about those specific objects
140 Display deduplication statistics, including the deduplication ratio
144 inflation due to the zfs copies property
146 and an overall effective ratio
147 .Pq Sy dedup No * Sy compress No / Sy copies .
149 Display a histogram of deduplication statistics, showing the allocated
150 .Pq physically present on disk
152 .Pq logically referenced in the pool
153 block counts and sizes by reference count.
155 Display the statistics independently for each deduplication table.
157 Dump the contents of the deduplication tables describing duplicate blocks.
159 Also dump the contents of the deduplication tables describing unique blocks.
160 .It Fl E Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15
161 Decode and display block from an embedded block pointer specified by the
165 Display pool history similar to
166 .Nm zpool Cm history ,
167 but include internal changes, transaction, and dataset information.
169 Display information about intent log
171 entries relating to each dataset.
172 If specified multiple times, display counts of each intent log transaction type.
174 Examine the checkpointed state of the pool.
175 Note, the on disk format of the pool is not reverted to the checkpointed state.
177 Read the vdev labels from the specified device.
179 will return 0 if valid label was found, 1 if error occurred, and 2 if no valid
180 labels were found. Each unique configuration is displayed only once.
182 In addition display label space usage stats.
184 Display every configuration, unique or not.
188 option is also specified, don't print the labels.
192 option is also specified, also display the uberblocks on this device. Specify
193 multiple times to increase verbosity.
195 Disable leak detection and the loading of space maps.
198 verifies that all non-free blocks are referenced, which can be very expensive.
200 Display the offset, spacemap, and free space of each metaslab.
202 Also display information about the on-disk free space histogram associated with
205 Display the maximum contiguous free space, the in-core free space histogram, and
206 the percentage of free space in each space map.
208 Display every spacemap record.
210 Display the offset, spacemap, and free space of each metaslab.
212 Also display information about the maximum contiguous free space and the
213 percentage of free space in each space map.
215 Display every spacemap record.
216 .It Fl O Ar dataset path
217 Look up the specified
221 and display its metadata and indirect blocks.
224 must be relative to the root of
226 This option can be combined with
228 for increasing verbosity.
230 .Fl R Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size Ns Op : Ns Ar flags
232 Read and display a block from the specified device.
233 By default the block is displayed as a hex dump, but see the description of the
237 The block is specified in terms of a colon-separated tuple
239 .Pq an integer vdev identifier
241 .Pq the offset within the vdev
243 .Pq the size of the block to read
246 .Pq a set of flags, described below .
248 .Bl -tag -compact -width "b offset"
252 Decompress the block. Set environment variable
254 to skip zle when guessing.
258 Dump gang block header
262 Dump raw uninterpreted block data
268 Display operation counts, bandwidth, and error counts of I/O to the pool from
271 Simulate the effects of deduplication, constructing a DDT and then display
275 Display the current uberblock.
281 Do not abort should any assertion fail.
283 Enable panic recovery, certain errors which would otherwise be fatal are
286 Do not abort if asserts fail and also enable panic recovery.
287 .It Fl e Op Fl p Ar path ...
288 Operate on an exported pool, not present in
289 .Pa /etc/zfs/zpool.cache .
292 flag specifies the path under which devices are to be searched.
294 All blocks accessed will be copied to files in the specified directory.
295 The blocks will be placed in sparse files whose name is the same as
296 that of the file or device read.
298 can be then run on the generated files.
301 flags are sufficient to access
303 all metadata on the pool.
305 Attempt to make an unreadable pool readable by trying progressively older
308 Dump the contents of the zfs_dbgmsg buffer before exiting
310 zfs_dbgmsg is a buffer used by ZFS to dump advanced debug information.
311 .It Fl I Ar inflight I/Os
312 Limit the number of outstanding checksum I/Os to the specified value.
313 The default value is 200.
314 This option affects the performance of the
317 .It Fl o Ar var Ns = Ns Ar value ...
318 Set the given global libzpool variable to the provided value.
319 The value must be an unsigned 32-bit integer.
320 Currently only little-endian systems are supported to avoid accidentally setting
321 the high 32 bits of 64-bit variables.
323 Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather
325 .It Fl t Ar transaction
326 Specify the highest transaction to use when searching for uberblocks.
331 options for a means to see the available uberblocks and their associated
333 .It Fl U Ar cachefile
334 Use a cache file other than
335 .Pa /etc/zfs/zpool.cache .
338 Specify multiple times for increased verbosity.
340 Attempt verbatim import.
341 This mimics the behavior of the kernel when loading a pool from a cachefile.
347 transaction rewind, that is attempt the same recovery as
349 but read transactions otherwise deemed too old.
351 Attempt all possible combinations when reconstructing indirect split blocks.
352 This flag disables the individual I/O deadman timer in order to allow as
353 much time as required for the attempted reconstruction.
356 Specifying a display option more than once enables verbosity for only that
357 option, with more occurrences enabling more verbosity.
359 If no options are specified, all information about the named pool will be
360 displayed at default verbosity.
365 Display the configuration of imported pool
378 Display basic dataset information about
383 Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects
384 Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects
389 Display basic information about object 0 in
390 .Pa rpool/export/home
393 # zdb -d rpool/export/home 0
394 Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects
396 Object lvl iblk dblk dsize lsize %full type
397 0 7 16K 16K 15.0K 16K 25.00 DMU dnode
401 Display the predicted effect of enabling deduplication on
406 Simulated DDT histogram:
408 bucket allocated referenced
409 ______ ______________________________ ______________________________
410 refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE
411 ------ ------ ----- ----- ----- ------ ----- ----- -----
412 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G
413 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G
415 dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00