The 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(1M) nor an
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
“@” 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.
Display information about the configuration. If specified
with no other options, instead display information about the cache file
(/etc/zfs/zpool.cache). To specify the cache
file to display, see -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.
Display information about datasets. Specified once,
displays basic dataset information: ID, create transaction, size, and
If specified multiple times provides greater and greater verbosity.
If object IDs are specified, display information about those specific
Display deduplication statistics, including the
deduplication ratio (dedup), compression
ratio (compress), inflation due to the zfs
copies property (copies), and an overall
effective ratio (dedup*compress/copies).
Read the vdev labels from the specified device.
return 0 if valid label was found, 1 if error occurred, and 2 if no valid
labels were found. Each unique configuration is displayed only once.
Display every configuration, unique or not.
If the -q option is also specified, don't print
If the -u option is also specified, also
display the uberblocks on this device. Specify multiple times to increase
Look up the specified path
inside of the dataset and display its
metadata and indirect blocks. Specified
path must be relative to the root of
dataset. This option can be combined with
-v for increasing verbosity.
Read and display a block from the specified device. By
default the block is displayed as a hex dump, but see the description of
the 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,
All blocks accessed will be copied to files in the
specified directory. The blocks will be placed in sparse files whose name
is the same as that of the file or device read.
zdb can be then run on the generated files.
Note that the -bbc flags are sufficient to
access (and thus copy) all metadata on the pool.
Set the given global libzpool variable to the provided
value. The value must be an unsigned 32-bit integer. Currently only
little-endian systems are supported to avoid accidentally setting the high
32 bits of 64-bit variables.
Attempt “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.