mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Long opts for zdb
This change introduces long options for zdb. It updates the usage message as well to include the long options. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Manoj Joseph <manoj.joseph@delphix.com> Closes #12818
This commit is contained in:
+34
-34
@@ -109,18 +109,18 @@ that zdb may interpret inconsistent pool data and behave erratically.
|
||||
.Sh OPTIONS
|
||||
Display options:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl b
|
||||
.It Fl b , -block-stats
|
||||
Display statistics regarding the number, size
|
||||
.Pq logical, physical and allocated
|
||||
and deduplication of blocks.
|
||||
.It Fl c
|
||||
.It Fl c , -checksum
|
||||
Verify the checksum of all metadata blocks while printing block statistics
|
||||
.Po see
|
||||
.Fl b
|
||||
.Pc .
|
||||
.Pp
|
||||
If specified multiple times, verify the checksums of all blocks.
|
||||
.It Fl C
|
||||
.It Fl C , -config
|
||||
Display information about the configuration.
|
||||
If specified with no other options, instead display information about the cache
|
||||
file
|
||||
@@ -133,7 +133,7 @@ cached configuration and the on-disk configuration.
|
||||
If specified multiple times with
|
||||
.Fl e
|
||||
also display the configuration that would be used were the pool to be imported.
|
||||
.It Fl d
|
||||
.It Fl d , -datasets
|
||||
Display information about datasets.
|
||||
Specified once, displays basic dataset information: ID, create transaction,
|
||||
size, and object count.
|
||||
@@ -182,7 +182,7 @@ Dump ZAP objects
|
||||
.It Sy -
|
||||
Negate the effect of next flag
|
||||
.El
|
||||
.It Fl D
|
||||
.It Fl D , -dedup-stats
|
||||
Display deduplication statistics, including the deduplication ratio
|
||||
.Pq Sy dedup ,
|
||||
compression ratio
|
||||
@@ -203,23 +203,23 @@ Display the statistics independently for each deduplication table.
|
||||
Dump the contents of the deduplication tables describing duplicate blocks.
|
||||
.It Fl DDDDD
|
||||
Also dump the contents of the deduplication tables describing unique blocks.
|
||||
.It Fl E Ar word0 : Ns Ar word1 Ns :…: Ns Ar word15
|
||||
.It Fl E , -embedded-block-pointer Ns = Ns Ar word0 : Ns Ar word1 Ns :…: Ns Ar word15
|
||||
Decode and display block from an embedded block pointer specified by the
|
||||
.Ar word
|
||||
arguments.
|
||||
.It Fl h
|
||||
.It Fl h , -history
|
||||
Display pool history similar to
|
||||
.Nm zpool Cm history ,
|
||||
but include internal changes, transaction, and dataset information.
|
||||
.It Fl i
|
||||
.It Fl i , -intent-logs
|
||||
Display information about intent log
|
||||
.Pq ZIL
|
||||
entries relating to each dataset.
|
||||
If specified multiple times, display counts of each intent log transaction type.
|
||||
.It Fl k
|
||||
.It Fl k , -checkpointed-state
|
||||
Examine the checkpointed state of the pool.
|
||||
Note, the on disk format of the pool is not reverted to the checkpointed state.
|
||||
.It Fl l Ar device
|
||||
.It Fl l , -label Ns = Ns Ar device
|
||||
Read the vdev labels and L2ARC header from the specified device.
|
||||
.Nm Fl l
|
||||
will return 0 if valid label was found, 1 if error occurred, and 2 if no valid
|
||||
@@ -249,12 +249,12 @@ If the
|
||||
.Fl u
|
||||
option is also specified, also display the uberblocks on this device.
|
||||
Specify multiple times to increase verbosity.
|
||||
.It Fl L
|
||||
.It Fl L , -disable-leak-tracking
|
||||
Disable leak detection and the loading of space maps.
|
||||
By default,
|
||||
.Nm
|
||||
verifies that all non-free blocks are referenced, which can be very expensive.
|
||||
.It Fl m
|
||||
.It Fl m , -metaslabs
|
||||
Display the offset, spacemap, free space of each metaslab, all the log
|
||||
spacemaps and their obsolete entry statistics.
|
||||
.It Fl mm
|
||||
@@ -265,12 +265,12 @@ Display the maximum contiguous free space, the in-core free space histogram, and
|
||||
the percentage of free space in each space map.
|
||||
.It Fl mmmm
|
||||
Display every spacemap record.
|
||||
.It Fl M
|
||||
.It Fl M , -metaslab-groups
|
||||
Display all "normal" vdev metaslab group information - per-vdev metaslab count, fragmentation,
|
||||
and free space histogram, as well as overall pool fragmentation and histogram.
|
||||
.It Fl MM
|
||||
"Special" vdevs are added to -M's normal output.
|
||||
.It Fl O Ar dataset path
|
||||
.It Fl O , -object-lookups Ns = Ns Ar dataset path
|
||||
Look up the specified
|
||||
.Ar path
|
||||
inside of the
|
||||
@@ -283,7 +283,7 @@ must be relative to the root of
|
||||
This option can be combined with
|
||||
.Fl v
|
||||
for increasing verbosity.
|
||||
.It Fl r Ar dataset path destination
|
||||
.It Fl r , -copy-object Ns = Ns Ar dataset path destination
|
||||
Copy the specified
|
||||
.Ar path
|
||||
inside of the
|
||||
@@ -297,7 +297,7 @@ This option can be combined with
|
||||
.Fl v
|
||||
for increasing verbosity.
|
||||
.It Xo
|
||||
.Fl R Ar poolname vdev : Ns Ar offset : Ns Oo Ar lsize Ns / Oc Ns Ar psize Ns Op : Ns Ar flags
|
||||
.Fl R , -read-block Ns = Ns Ar poolname vdev : Ns Ar offset : Ns Oo Ar lsize Ns / Oc Ns Ar psize Ns Op : Ns Ar flags
|
||||
.Xc
|
||||
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
|
||||
@@ -336,36 +336,36 @@ Dump raw uninterpreted block data
|
||||
.It Sy v
|
||||
Verbose output for guessing compression algorithm
|
||||
.El
|
||||
.It Fl s
|
||||
.It Fl s , -io-stats
|
||||
Report statistics on
|
||||
.Nm zdb
|
||||
I/O.
|
||||
Display operation counts, bandwidth, and error counts of I/O to the pool from
|
||||
.Nm .
|
||||
.It Fl S
|
||||
.It Fl S , -simulate-dedup
|
||||
Simulate the effects of deduplication, constructing a DDT and then display
|
||||
that DDT as with
|
||||
.Fl DD .
|
||||
.It Fl u
|
||||
.It Fl u , -uberblock
|
||||
Display the current uberblock.
|
||||
.El
|
||||
.Pp
|
||||
Other options:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl A
|
||||
.It Fl A , -ignore-assertions
|
||||
Do not abort should any assertion fail.
|
||||
.It Fl AA
|
||||
Enable panic recovery, certain errors which would otherwise be fatal are
|
||||
demoted to warnings.
|
||||
.It Fl AAA
|
||||
Do not abort if asserts fail and also enable panic recovery.
|
||||
.It Fl e Oo Fl p Ar path Oc Ns …
|
||||
.It Fl e , -exported Ns = Ns Oo Fl p Ar path Oc Ns …
|
||||
Operate on an exported pool, not present in
|
||||
.Pa /etc/zfs/zpool.cache .
|
||||
The
|
||||
.Fl p
|
||||
flag specifies the path under which devices are to be searched.
|
||||
.It Fl x Ar dumpdir
|
||||
.It Fl x , -dump-blocks Ns = Ns Ar dumpdir
|
||||
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.
|
||||
@@ -376,30 +376,30 @@ Note that the
|
||||
flags are sufficient to access
|
||||
.Pq and thus copy
|
||||
all metadata on the pool.
|
||||
.It Fl F
|
||||
.It Fl F , -automatic-rewind
|
||||
Attempt to make an unreadable pool readable by trying progressively older
|
||||
transactions.
|
||||
.It Fl G
|
||||
.It Fl G , -dump-debug-msg
|
||||
Dump the contents of the zfs_dbgmsg buffer before exiting
|
||||
.Nm .
|
||||
zfs_dbgmsg is a buffer used by ZFS to dump advanced debug information.
|
||||
.It Fl I Ar inflight I/Os
|
||||
.It Fl I , -inflight Ns = Ns Ar inflight I/Os
|
||||
Limit the number of outstanding checksum I/Os to the specified value.
|
||||
The default value is 200.
|
||||
This option affects the performance of the
|
||||
.Fl c
|
||||
option.
|
||||
.It Fl o Ar var Ns = Ns Ar value …
|
||||
.It Fl o , -option Ns = Ns Ar var Ns = Ns Ar value …
|
||||
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.
|
||||
.It Fl P
|
||||
.It Fl P , -parseable
|
||||
Print numbers in an unscaled form more amenable to parsing, e.g.\&
|
||||
.Sy 1000000
|
||||
rather than
|
||||
.Sy 1M .
|
||||
.It Fl t Ar transaction
|
||||
.It Fl t , -txg Ns = Ns Ar transaction
|
||||
Specify the highest transaction to use when searching for uberblocks.
|
||||
See also the
|
||||
.Fl u
|
||||
@@ -407,28 +407,28 @@ and
|
||||
.Fl l
|
||||
options for a means to see the available uberblocks and their associated
|
||||
transaction numbers.
|
||||
.It Fl U Ar cachefile
|
||||
.It Fl U , -cachefile Ns = Ns Ar cachefile
|
||||
Use a cache file other than
|
||||
.Pa /etc/zfs/zpool.cache .
|
||||
.It Fl v
|
||||
.It Fl v , -verbose
|
||||
Enable verbosity.
|
||||
Specify multiple times for increased verbosity.
|
||||
.It Fl V
|
||||
.It Fl V , -verbatim
|
||||
Attempt verbatim import.
|
||||
This mimics the behavior of the kernel when loading a pool from a cachefile.
|
||||
Only usable with
|
||||
.Fl e .
|
||||
.It Fl X
|
||||
.It Fl X , -extreme-rewind
|
||||
Attempt
|
||||
.Qq extreme
|
||||
transaction rewind, that is attempt the same recovery as
|
||||
.Fl F
|
||||
but read transactions otherwise deemed too old.
|
||||
.It Fl Y
|
||||
.It Fl Y , -all-reconstruction
|
||||
Attempt all possible combinations when reconstructing indirect split blocks.
|
||||
This flag disables the individual I/O deadman timer in order to allow as
|
||||
much time as required for the attempted reconstruction.
|
||||
.It Fl y
|
||||
.It Fl y , -livelist
|
||||
Perform validation for livelists that are being deleted.
|
||||
Scans through the livelist and metaslabs, checking for duplicate entries
|
||||
and compares the two, checking for potential double frees.
|
||||
|
||||
Reference in New Issue
Block a user