ZDB(8) | System Manager's Manual | ZDB(8) |
zdb
—
zdb |
[-CumdibcsDvhLMXFPA ] [-e
[-p path...]]
[-t txg]
[-U cache]
[-I inflight I/Os]
[-x dumpdir]
poolname [object ...] |
zdb |
[-divPA ] [-e
[-p path...]]
[-U cache]
dataset [object ...] |
zdb |
-m [-MLXFPA ]
[-t txg]
[-e [-p
path...]] [-U
cache] poolname |
zdb |
-R [-A ]
[-e [-p
path...]] [-U
cache] poolname
poolname
vdev:offset:size[:flags] |
zdb |
-S [-AP ]
[-e [-p
path...]] [-U
cache] poolname
poolname |
zdb |
-l [-uA ]
device |
zdb |
-C [-A ]
[-U cache] |
zdb
utility displays information about a ZFS pool
useful for debugging and performs some amount of consistency checking. It is a
not a general purpose tool and options (and facilities) may change. This is
neither a fsck(8) nor a
fsdb(8) utility.
The output of this command in general reflects the on-disk structure of a ZFS pool, and is inherently unstable. The precise output of most invocations is not documented, a knowledge of ZFS internals is assumed.
If the dataset argument does not contain any / or @ characters, it is interpreted as a pool name. The root dataset can be specified as pool/ (pool name followed by a slash).
When operating on an imported and active pool it is possible, though unlikely, that zdb may interpret inconsistent pool data and behave erratically.
-b
-c
-b
).
If specified multiple times, verify the checksums of all blocks.
-C
-U
If specified multiple times, and a pool name is also specified
display both the cached configuration and the on-disk configuration. If
specified multiple times with -e
also display
the configuration that would be used were the pool to be imported.
-d
If specified multiple times provides greater and greater verbosity.
If object IDs are specified, display information about those specific objects only.
-D
If specified twice, display a histogram of deduplication statistics, showing the allocated (physically present on disk) and referenced (logically referenced in the pool) block counts and sizes by reference count.
If specified a third time, display the statistics independently for each deduplication table.
If specified a fourth time, dump the contents of the deduplication tables describing duplicate blocks.
If specified a fifth time, also dump the contents of the deduplication tables describing unique blocks.
-h
zpool history
, but
include internal changes, transaction, and dataset information.-i
-l
device-u
option is also specified, also display the
uberblocks on this device.-L
zdb
verifies that all non-free blocks are
referenced, which can be very expensive.-m
-M
-R
poolname
vdev:offset:size[:flags]-r
flag, below.
The block is specified in terms of a colon-separated tuple vdev (an integer vdev identifier) offset (the offset within the vdev) size (the size of the block to read) and, optionally, flags (a set of flags, described below).
-s
zdb
's I/O. Display operation
counts, bandwidth, and error counts of I/O to the pool from
zdb
.-S
-u
Other options:
-A
-AA
-AAA
-e
[-p
path...]-p
flag specifies the path under which devices are
to be searched.-x
dumpdir-bbc
flags are sufficient to access
(and thus copy) all metadata on the pool.-F
-I
inflight I/Os-c
option.-P
-t
transaction-u
and -l
options
for a means to see the available uberblocks and their associated
transaction numbers.-U
cachefile-v
-X
extreme
’ transaction
rewind, that is attempt the same recovery as -F
but read transactions otherwise deemed too old.Specifying a display option more than once enables verbosity for only that option, with more occurrences enabling more verbosity.
If no options are specified, all information about the named pool will be displayed at default verbosity.
#
zdb -C rpool
MOS Configuration: version: 28 name: 'rpool' ...
#
zdb -d rpool
Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects ...
#
zdb -d rpool/export/home 0
Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects Object lvl iblk dblk dsize lsize %full type 0 7 16K 16K 15.0K 16K 25.00 DMU dnode
#
zdb -S rpool
Simulated DDT histogram: bucket allocated referenced ______ ______________________________ ______________________________ refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE ------ ------ ----- ----- ----- ------ ----- ----- ----- 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G ... dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00
The mdoc(7)
implementation of this manual page was initially written by
Martin Matuska ⟨mm@FreeBSD.org⟩ and
Marcelo Araujo ⟨araujo@FreeBSD.org⟩.
July 26, 2014 | NetBSD 9.4 |