svn commit: r325154 - stable/11/cddl/contrib/opensolaris/cmd/zdb
Andriy Gapon
avg at FreeBSD.org
Mon Oct 30 10:39:23 UTC 2017
Author: avg
Date: Mon Oct 30 10:39:22 2017
New Revision: 325154
URL: https://svnweb.freebsd.org/changeset/base/325154
Log:
MFC r324350: zdb.8: replace with the slighly modified upstream version
Modified:
stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8
==============================================================================
--- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Oct 30 10:37:21 2017 (r325153)
+++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Oct 30 10:39:22 2017 (r325154)
@@ -1,6 +1,3 @@
-'\" te
-.\" Copyright (c) 2012, Martin Matuska <mm at FreeBSD.org>.
-.\" All Rights Reserved.
.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
@@ -13,73 +10,75 @@
.\"
.\"
.\" Copyright 2012, Richard Lowe.
-.\" Copyright (c) 2012, Marcelo Araujo <araujo at FreeBSD.org>.
-.\" Copyright (c) 2012, 2014 by Delphix. All rights reserved.
-.\" Copyright 2016 Nexenta Systems, Inc.
-.\" All Rights Reserved.
+.\" Copyright (c) 2012, 2017 by Delphix. All rights reserved.
+.\" Copyright 2017 Nexenta Systems, Inc.
.\"
-.\" $FreeBSD$
-.\"
-.Dd October 1, 2017
+.Dd October 06, 2017
.Dt ZDB 8
.Os
.Sh NAME
.Nm zdb
-.Nd Display zpool debugging and consistency information
+.Nd display zpool debugging and consistency information
.Sh SYNOPSIS
.Nm
-.Op Fl CmdibcsDvhLMXFPA
-.Op Fl e Op Fl p Ar path...
+.Op Fl AbcdDFGhiLMPsvX
+.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
+.Op Fl I Ar inflight I/Os
+.Oo Fl o Ar var Ns = Ns Ar value Oc Ns ...
.Op Fl t Ar txg
.Op Fl U Ar cache
-.Op Fl I Ar inflight I/Os
.Op Fl x Ar dumpdir
-.Op Fl o Ar var=value
-.Ar poolname
-.Op Ar object ...
+.Op Ar poolname Op Ar object ...
.Nm
-.Op Fl divPA
-.Op Fl e Op Fl p Ar path...
+.Op Fl AdiPv
+.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
.Op Fl U Ar cache
-.Ar dataset
-.Op Ar object ...
+.Ar dataset Op Ar object ...
.Nm
-.Fl m Op Fl MLXFPA
-.Op Fl t Ar txg
-.Op Fl e Op Fl p Ar path...
+.Fl C
+.Op Fl A
.Op Fl U Ar cache
-.Ar poolname
.Nm
-.Fl R Op Fl A
-.Op Fl e Op Fl p Ar path...
-.Op Fl U Ar cache
-.Ar poolname
-.Ar poolname
-.Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags
+.Fl E
+.Op Fl A
+.Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15
.Nm
-.Fl S
-.Op Fl AP
-.Op Fl e Op Fl p Ar path...
-.Op Fl U Ar cache
-.Ar poolname
-.Ar poolname
-.Nm
.Fl l
.Op Fl Aqu
.Ar device
.Nm
-.Fl C
+.Fl m
+.Op Fl AFLPX
+.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
+.Op Fl t Ar txg
+.Op Fl U Ar cache
+.Ar poolname Op Ar vdev Op Ar metaslab ...
+.Nm
+.Fl O
+.Ar dataset path
+.Nm
+.Fl R
.Op Fl A
+.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
.Op Fl U Ar cache
+.Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size Ns Op : Ns Ar flags
+.Nm
+.Fl S
+.Op Fl AP
+.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
+.Op Fl U Ar cache
+.Ar poolname
.Sh DESCRIPTION
The
.Nm
-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.
+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
+.Pq and facilities
+may change.
This is neither a
.Xr fsck 8
-nor a
+nor an
.Xr fsdb 8
utility.
.Pp
@@ -91,81 +90,99 @@ internals is assumed.
If the
.Ar dataset
argument does not contain any
-.Sy /
+.Qq Sy /
or
-.Sy @
+.Qq Sy @
characters, it is interpreted as a pool name.
The root dataset can be specified as
-.Pa pool Ns Sy /
-(pool name followed by a slash).
+.Ar pool Ns /
+.Pq pool name followed by a slash .
.Pp
When operating on an imported and active pool it is possible, though unlikely,
that zdb may interpret inconsistent pool data and behave erratically.
.Sh OPTIONS
Display options:
-.Bl -tag -width indent
+.Bl -tag -width Ds
.It Fl b
-Display statistics regarding the number, size (logical, physical and
-allocated) and deduplication of blocks.
+Display statistics regarding the number, size
+.Pq logical, physical and allocated
+and deduplication of blocks.
.It Fl c
Verify the checksum of all metadata blocks while printing block statistics
-(see
-.Fl b Ns ).
+.Po see
+.Fl b
+.Pc .
.Pp
If specified multiple times, verify the checksums of all blocks.
.It Fl C
-Display information about the configuration. If specified with no other
-options, instead display information about the cache file
-.Po Pa /etc/zfs/zpool.cache Pc .
+Display information about the configuration.
+If specified with no other options, instead display information about the cache
+file
+.Pq Pa /boot/zfs/zpool.cache .
To specify the cache file to display, see
-.Fl U
+.Fl U .
.Pp
-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, and a pool name is also specified display both the
+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.
+also display the configuration that would be used were the pool to be imported.
.It Fl d
-Display information about datasets. Specified once, displays basic dataset
-information: ID, create transaction, size, and object count.
+Display information about datasets.
+Specified once, displays basic dataset information: ID, create transaction,
+size, and object count.
.Pp
If specified multiple times provides greater and greater verbosity.
.Pp
-If object IDs are specified, display information about those specific objects only.
+If object IDs are specified, display information about those specific objects
+only.
.It Fl D
-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).
-.Pp
-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.
-.Pp
-If specified a third time, display the statistics independently for each deduplication table.
-.Pp
-If specified a fourth time, dump the contents of the deduplication tables describing duplicate blocks.
-.Pp
-If specified a fifth time, also dump the contents of the deduplication tables describing unique blocks.
+Display deduplication statistics, including the deduplication ratio
+.Pq Sy dedup ,
+compression ratio
+.Pq Sy compress ,
+inflation due to the zfs copies property
+.Pq Sy copies ,
+and an overall effective ratio
+.Pq Sy dedup No * Sy compress No / Sy copies .
+.It Fl DD
+Display a histogram of deduplication statistics, showing the allocated
+.Pq physically present on disk
+and referenced
+.Pq logically referenced in the pool
+block counts and sizes by reference count.
+.It Fl DDD
+Display the statistics independently for each deduplication table.
+.It Fl DDDD
+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 \&: 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
Display pool history similar to
-.Cm zpool history ,
+.Nm zpool Cm history ,
but include internal changes, transaction, and dataset information.
.It Fl i
-Display information about intent log (ZIL) entries relating to each
-dataset.
-If specified multiple times, display counts of each intent log transaction
-type.
+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 l Ar device
Read the vdev labels from the specified device.
-Return 0 if a valid label was found, 1 if an error occurred, and 2 if no valid
+.Nm Fl l
+will return 0 if valid label was found, 1 if error occurred, and 2 if no valid
labels were found.
+.Pp
If the
+.Fl q
+option is also specified, don't print the labels.
+.Pp
+If the
.Fl u
option is also specified, also display the uberblocks on this device.
-If the
-.Fl q
-option is also specified, also display the uberblocks on this device.
.It Fl L
Disable leak tracing and the loading of space maps.
By default,
@@ -173,36 +190,55 @@ By default,
verifies that all non-free blocks are referenced, which can be very expensive.
.It Fl m
Display the offset, spacemap, and free space of each metaslab.
-When specified twice, also display information about the on-disk free
-space histogram associated with each metaslab. When specified three time,
-display the maximum contiguous free space, the in-core free space histogram,
-and the percentage of free space in each space map. When specified
-four times display every spacemap record.
+.It Fl mm
+Also display information about the on-disk free space histogram associated with
+each metaslab.
+.It Fl mmm
+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
Display the offset, spacemap, and free space of each metaslab.
-When specified twice, also display information about the maximum contiguous
-free space and the percentage of free space in each space map.
-When specified three times display every spacemap record.
+.It Fl MM
+Also display information about the maximum contiguous free space and the
+percentage of free space in each space map.
+.It Fl MMM
+Display every spacemap record.
+.It Fl O Ar dataset path
+Look up the specified
+.Ar path
+inside of the
+.Ar dataset
+and display its metadata and indirect blocks.
+Specified
+.Ar path
+must be relative to the root of
+.Ar dataset .
+This option can be combined with
+.Fl v
+for increasing verbosity.
.It Xo
-.Fl R Ar poolname
-.Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags
+.Fl R Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size 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
-.Fl r
+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
+.Sy r
flag, below.
.Pp
The block is specified in terms of a colon-separated tuple
.Ar vdev
-(an integer vdev identifier)
+.Pq an integer vdev identifier
.Ar offset
-(the offset within the vdev)
+.Pq the offset within the vdev
.Ar size
-(the size of the block to read) and, optionally,
+.Pq the size of the block to read
+and, optionally,
.Ar flags
-(a set of flags, described below).
-.Bl -tag -width indent
-.It Sy b offset
+.Pq a set of flags, described below .
+.Pp
+.Bl -tag -compact -width "b offset"
+.It Sy b Ar offset
Print block pointer
.It Sy d
Decompress the block
@@ -217,19 +253,20 @@ Dump raw uninterpreted block data
.El
.It Fl s
Report statistics on
-.Nm Ns 's
+.Nm zdb
I/O.
Display operation counts, bandwidth, and error counts of I/O to the pool from
.Nm .
.It Fl S
Simulate the effects of deduplication, constructing a DDT and then display
-that DDT as with \fB-DD\fR.
+that DDT as with
+.Fl DD .
.It Fl u
Display the current uberblock.
.El
.Pp
Other options:
-.Bl -tag -width indent
+.Bl -tag -width Ds
.It Fl A
Do not abort should any assertion fail.
.It Fl AA
@@ -237,32 +274,41 @@ Enable panic recovery, certain errors which would othe
demoted to warnings.
.It Fl AAA
Do not abort if asserts fail and also enable panic recovery.
-.It Fl e Op Fl p Ar path...
+.It Fl e Op Fl p Ar path ...
Operate on an exported pool, not present in
-.Pa /etc/zfs/zpool.cache .
+.Pa /boot/zfs/zpool.cache .
The
.Fl p
flag specifies the path under which devices are to be searched.
.It Fl x 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. zdb can be then run on the generated files.
+that of the file or device read.
+.Nm
+can be then run on the generated files.
Note that the
.Fl bbc
-flags are sufficient to access (and thus copy)
+flags are sufficient to access
+.Pq and thus copy
all metadata on the pool.
.It Fl F
Attempt to make an unreadable pool readable by trying progressively older
transactions.
+.It Fl G
+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
Limit the number of outstanding checksum I/Os to the specified value.
-The default value is 200. This option affects the performance of the
+The default value is 200.
+This option affects the performance of the
.Fl c
option.
-.It Fl o Ar var=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 o 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
Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather
than 1M.
@@ -280,9 +326,14 @@ Use a cache file other than
.It Fl v
Enable verbosity.
Specify multiple times for increased verbosity.
+.It Fl V
+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
Attempt
-.Ql extreme
+.Qq extreme
transaction rewind, that is attempt the same recovery as
.Fl F
but read transactions otherwise deemed too old.
@@ -294,46 +345,58 @@ option, with more occurrences enabling more verbosity.
If no options are specified, all information about the named pool will be
displayed at default verbosity.
.Sh EXAMPLES
-.Bl -tag -width 0n
-.It Sy Example 1 Display the configuration of imported pool 'rpool'
-.Bd -literal -offset 2n
-.Li # Ic zdb -C rpool
+.Bl -tag -width Ds
+.It Xo
+.Sy Example 1
+Display the configuration of imported pool
+.Pa rpool
+.Xc
+.Bd -literal
+# zdb -C rpool
MOS Configuration:
version: 28
name: 'rpool'
...
.Ed
-.It Sy Example 2 Display basic dataset information about 'rpool'
-.Bd -literal -offset 2n
-.Li # Ic zdb -d rpool
+.It Xo
+.Sy Example 2
+Display basic dataset information about
+.Pa rpool
+.Xc
+.Bd -literal
+# 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
...
.Ed
-.It Xo Sy Example 3 Display basic information about object 0 in
-.Sy 'rpool/export/home'
+.It Xo
+.Sy Example 3
+Display basic information about object 0 in
+.Pa rpool/export/home
.Xc
-.Bd -literal -offset 2n
-.Li # Ic zdb -d rpool/export/home 0
+.Bd -literal
+# 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
.Ed
-.It Xo Sy Example 4 Display the predicted effect of enabling deduplication on
-.Sy 'rpool'
+.It Xo
+.Sy Example 4
+Display the predicted effect of enabling deduplication on
+.Pa rpool
.Xc
-.Bd -literal -offset 2n
-.Li # Ic zdb -S rpool
+.Bd -literal
+# 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
+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
.Ed
@@ -341,22 +404,3 @@ dedup = 1.11, compress = 1.80, copies = 1.00, dedup *
.Sh SEE ALSO
.Xr zfs 8 ,
.Xr zpool 8
-.Sh AUTHORS
-This manual page is a
-.Xr mdoc 7
-reimplementation of the
-.Tn illumos
-manual page
-.Em zdb(1M) ,
-modified and customized for
-.Fx
-and licensed under the
-Common Development and Distribution License
-.Pq Tn CDDL .
-.Pp
-The
-.Xr mdoc 7
-implementation of this manual page was initially written by
-.An Martin Matuska Aq mm at FreeBSD.org
-and
-.An Marcelo Araujo Aq araujo at FreeBSD.org .
More information about the svn-src-stable-11
mailing list