OS Manuals

/usr/bin/zdb

Advanced filesystem and volume manager

From zfs 2.4.4-r4 (os), captured 2026-11-05 by running zdb --help (exit 2). permalink

/usr/bin/zdb: unrecognized option '--help'
Usage:	zdb [-AbcdDFGhikLMPsvXy] [-e [-V] [-p <path> ...]] [-I <inflight I/Os>]
		[-o <var>=<value>]... [-t <txg>] [-U <cache>] [-x <dumpdir>]
		[-K <key>]
		[<poolname>[/<dataset | objset id>] [<object | range> ...]]
	zdb [-AdiPv] [-e [-V] [-p <path> ...]] [-U <cache>] [-K <key>]
		[<poolname>[/<dataset | objset id>] [<object | range> ...]
	zdb -B [-e [-V] [-p <path> ...]] [-I <inflight I/Os>]
		[-o <var>=<value>]... [-t <txg>] [-U <cache>] [-x <dumpdir>]
		[-K <key>] <poolname>/<objset id> [<backupflags>]
	zdb [-v] <bookmark>
	zdb -C [-A] [-U <cache>] [<poolname>]
	zdb -l [-Aqu] <device>
	zdb -m [-AFLPX] [-e [-V] [-p <path> ...]] [-t <txg>] [-U <cache>]
		<poolname> [<vdev> [<metaslab> ...]]
	zdb -O [-K <key>] <dataset> <path>
	zdb -r [-K <key>] <dataset> <path> <destination>
	zdb -r [-K <key>] -O <dataset> <object-id> <destination>
	zdb -R [-A] [-e [-V] [-p <path> ...]] [-U <cache>]
		<poolname> <vdev>:<offset>:<size>[:<flags>]
	zdb -E [-A] word0:word1:...:word15
	zdb -S [-AP] [-e [-V] [-p <path> ...]] [-U <cache>] <poolname>

    Dataset name must include at least one separator character '/' or '@'
    If dataset name is specified, only that dataset is dumped
    If object numbers or object number ranges are specified, only those
    objects or ranges are dumped.

    Object ranges take the form <start>:<end>[:<flags>]
        start    Starting object number
        end      Ending object number, or -1 for no upper bound
        flags    Optional flags to select object types:
            A     All objects (this is the default)
            d     ZFS directories
            f     ZFS files
            m     SPA space maps
            z     ZAPs
            -     Negate effect of next flag

    Options to control amount of output:
        -b --block-stats             block statistics
           --bin=(lsize|psize|asize) bin blocks based on this size in all three columns
           --class=(normal|special|dedup|other)[,...]
                                     only consider blocks from these allocation classes
        -B --backup                  backup stream
        -c --checksum                checksum all metadata (twice for all data) blocks
        -C --config                  config (or cachefile if alone)
        -d --datasets                dataset(s)
        -D --dedup-stats             dedup statistics
        -E --embedded-block-pointer=INTEGER
                                     decode and display block from an embedded block pointer
        -h --history                 pool history
        -i --intent-logs             intent logs
        -l --label                   read label contents
        -k --checkpointed-state      examine the checkpointed state of the pool
        -L --disable-leak-tracking   disable leak tracking (do not load spacemaps)
        -m --metaslabs               metaslabs
        -M --metaslab-groups         metaslab groups
        -O --object-lookups          perform object lookups by path
        -r --copy-object             copy an object by path to file
        -R --read-block              read and display block from a device
        -s --io-stats                report stats on zdb's I/O
        -S --simulate-dedup          simulate dedup to measure effect
        -v --verbose                 verbose (applies to all others)
        -y --livelist                perform livelist and metaslab validation on any livelists being deleted

    Below options are intended for use with other options:
        -A --ignore-assertions       ignore assertions (-A), enable panic recovery (-AA) or both (-AAA)
        -e --exported                pool is exported/destroyed/has altroot/not in a cachefile
        -F --automatic-rewind        attempt automatic rewind within safe range of transaction groups
        -G --dump-debug-msg          dump zfs_dbgmsg buffer before exiting
        -I --inflight=INTEGER        specify the maximum number of checksumming I/Os [default is 200]
        -K --key=KEY                 decryption key for encrypted dataset
        -o --option="NAME=VALUE" set the named tunable to the given value
        -p --path==PATH              use one or more with -e to specify path to vdev dir
        -P --parseable               print numbers in parseable form
        -q --skip-label              don't print label contents
        -t --txg=INTEGER             highest txg to use when searching for uberblocks
        -T --brt-stats               BRT statistics
        -u --uberblock               uberblock
        -U --cachefile=PATH          use alternate cachefile
        -V --verbatim                do verbatim import
        -x --dump-blocks=PATH        dump all read blocks into specified directory
        -X --extreme-rewind          attempt extreme rewind (does not work with dataset)
        -Y --all-reconstruction      attempt all reconstruction combinations for split blocks
        -Z --zstd-headers            show ZSTD headers
Specify an option more than once (e.g. -bb) to make only that option verbose
Default is to dump everything non-verbosely
Options (60)
OptionDescriptionSource
-b, --block-stats --block-statsDisplay statistics regarding the number, size (logical, physical and allocated) and deduplication of blocks.help + man
--class (normal|special|dedup|other)When used with -bb, only consider blocks from these allocation classes.help + man
-B, --backup --backupGenerate a backup stream, similar to zfs send, but for the numeric objset ID, and without opening the dataset.help + man
-c, --checksum --checksumVerify the checksum of all metadata blocks while printing block statistics (see -b).help + man
-C, --config --configDisplay information about the configuration.help + man
-d, --datasets --datasetsDisplay information about datasets.help + man
-D, --dedup-stats --dedup-statsDisplay deduplication statistics, including the deduplication ratio (dedup), compression ratio (compress), inflation due to the zfs copies property (copies), and an overall effective ratio (dedup ×…help + man
-E, --embedded-block-pointer --embedded-block-pointer=INTEGERDecode and display block from an embedded block pointer specified by the word arguments.help + man
-h, --history --historyDisplay pool history similar to zpool history, but include internal changes, transaction, and dataset information.help + man
-i, --intent-logs --intent-logsDisplay information about intent log (ZIL) entries relating to each dataset.help + man
-l, --label --labelRead the vdev labels and L2ARC header from the specified device.help + man
-k, --checkpointed-state --checkpointed-stateExamine the checkpointed state of the pool.help + man
-L, --disable-leak-tracking --disable-leak-trackingDisable leak detection and the loading of space maps.help + man
-m, --metaslabs --metaslabsDisplay the offset, spacemap, free space of each metaslab, all the log spacemaps and their obsolete entry statistics.help + man
-M, --metaslab-groups --metaslab-groupsDisplay all "normal" vdev metaslab group information - per-vdev metaslab count, fragmentation, and free space histogram, as well as overall pool fragmentation and histogram.help + man
-O, --object-lookups --object-lookupsLook up the specified path inside of the dataset and display its metadata and indirect blocks.help + man
-r, --copy-object --copy-objectCopy the specified path inside of the dataset to the specified destination.help + man
-R, --read-block --read-blockRead and display a block from the specified device.help + man
-s, --io-stats --io-statsReport statistics on zdb I/O.help + man
-S, --simulate-dedup --simulate-dedupSimulate the effects of deduplication, constructing a DDT and then display that DDT as with -DD.help + man
-v, --verbose --verboseverbose (applies to all others)help + man
-y, --livelist --livelistperform livelist and metaslab validation on any livelists being deletedhelp + man
-A, --ignore-assertions --ignore-assertionsignore assertions (-A), enable panic recovery (-AA) or both (-AAA)help + man
-e, --exported --exportedOperate on an exported pool, not present in /etc/zfs/zpool.cache.help + man
-F, --automatic-rewind --automatic-rewindAttempt to make an unreadable pool readable by trying progressively older transactions.help + man
-G, --dump-debug-msg --dump-debug-msgDump the contents of the zfs_dbgmsg buffer before exiting zdb.help + man
-I, --inflight --inflight=INTEGERLimit the number of outstanding checksum I/O operations to the specified value.help + man
-K, --key --key=KEYDecryption key needed to access an encrypted dataset.help + man
-p --path==PATHuse one or more with -e to specify path to vdev dirhelp
-P, --parseable --parseablePrint numbers in an unscaled form more amenable to parsing, e.g. 1000000 rather than 1M.help + man
-q --skip-labeldon't print label contentshelp
-t, --txg --txg=INTEGERSpecify the highest transaction to use when searching for uberblocks.help + man
-T, --brt-stats --brt-statsDisplay block reference table (BRT) statistics, including the size of uniques blocks cloned, the space saving as a result of cloning, and the saving ratio.help + man
-u, --uberblock --uberblockDisplay the current uberblock.help + man
-U, --cachefile --cachefile=PATHUse a cache file other than /etc/zfs/zpool.cache.help + man
-V, --verbatim --verbatimAttempt verbatim import.help + man
-x, --dump-blocks --dump-blocks=PATHAll blocks accessed will be copied to files in the specified directory.help + man
-X, --extreme-rewind --extreme-rewindAttempt "extreme" transaction rewind, that is attempt the same recovery as -F but read transactions otherwise deemed too old.help + man
-Y, --all-reconstruction --all-reconstructionAttempt all possible combinations when reconstructing indirect split blocks.help + man
-Z --zstd-headersshow ZSTD headershelp
--allocated-mapPrints out a list of all the allocated regions in the pool. (in the manual page but not in --help)man
--bin (lsize|psize|asize)When used with -bb, sort blocks into all three bins according to the given size (instead of binning a block for each size separately). (in the manual page but not in --help)man
-DDDisplay 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. (in the manual page but not in --help)man
-DDDDisplay the statistics independently for each deduplication table. (in the manual page but not in --help)man
-DDDDDump the contents of the deduplication tables describing duplicate blocks. (in the manual page but not in --help)man
-DDDDDAlso dump the contents of the deduplication tables describing unique blocks. (in the manual page but not in --help)man
-ll deviceIn addition display label space usage stats. (in the manual page but not in --help)man
-lll deviceDisplay every configuration, unique or not. (in the manual page but not in --help)man
-mmAlso display information about the on-disk free space histogram associated with each metaslab. (in the manual page but not in --help)man
-mmmDisplay the maximum contiguous free space, the in-core free space histogram, and the percentage of free space in each space map. (in the manual page but not in --help)man
-mmmmDisplay every spacemap record. (in the manual page but not in --help)man
-MM"Special" vdevs are added to -M's normal output. (in the manual page but not in --help)man
-MMMDisplay every spacemap record. (in the manual page but not in --help)man
-NSame as -d but force zdb to interpret the [dataset|objset-ID] in [poolname[/dataset|objset-ID]] as a numeric objset ID. (in the manual page but not in --help)man
-TTDisplay the per-vdev BRT statistics, including total references. (in the manual page but not in --help)man
-TTTDisplay histograms of per-vdev BRT refcounts. (in the manual page but not in --help)man
-TTTTDump the contents of the block reference tables. (in the manual page but not in --help)man
-AAEnable panic recovery, certain errors which would otherwise be fatal are demoted to warnings. (in the manual page but not in --help)man
-AAADo not abort if asserts fail and also enable panic recovery. (in the manual page but not in --help)man
-o, --option var=value…Set the given tunable to the provided value. (in the manual page but not in --help)man
Exit status (4) from the manual page
0success
1a fatal error occurs
2invalid command line options were specified
3on-disk corruption was detected
Examples (4) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.