aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorOlaf Faaland <[email protected]>2017-03-06 16:01:45 -0800
committerBrian Behlendorf <[email protected]>2017-03-06 16:01:45 -0800
commit3c9e0d673e1d47622e6be0bdb06d53fa8655cdf3 (patch)
tree86cb941da9da8932ba4524fbf12c46d3b4477aa5 /man
parent7a789346afec87a89c4cde465faf9be4996db556 (diff)
Dump unique configurations and Uberblocks in zdb -lu
For zdb -l, detect when the configuration nvlist in some label l (l>0) is the same as a configuration already dumped. If so, do not dump it. Make a similar check when dumping Uberblocks for zdb -lu. Check whether a label already dumped contains an identical Uberblock. If so, do not dump the Uberblock. When dumping a configuration or Uberblock, state which labels it is found in (0-3), for example: labels = 1 2 3 Detecting redundant uberblocks or configurations is accomplished by calculating checksums of the uberblocks and the packed nvlists containing the configuration. If there is nothing unique to be dumped for a label (ie the configuration and uberblocks have checksums matching those already dumped) print nothing for that label. With additional l's or u's, increase verbosity as follows: -l Dump each unique configuration only once. Indicate which labels it appears in. -ll In addition, dump label space usage stats. -lll Dump every configuration, unique or not. -u Dump each unique, valid, uberblock only once. Indicate which labels it appears in. -uu In addition, state which slots are invalid. -uuu Dump every uberblock, unique or not. -uuuu Dump the uberblock blockpointer (used to be -uuu) Make exit values conform to the manual page. Failing to unpack a configuration nvlist is considered an error, as well as failing to open or read from the device. Add three tests, zdb_00{3,4,5}_pos to verify the above functionality. An example of the output: ------------------------------------ LABEL 0 ------------------------------------ version: 5000 name: 'pool' state: 1 txg: 880 < ... redacted ... > features_for_read: com.delphix:hole_birth com.delphix:embedded_data labels = 0 Uberblock[0] magic = 0000000000bab10c version = 5000 txg = 0 guid_sum = 3038694082047428541 timestamp = 1487715500 UTC = Tue Feb 21 14:18:20 2017 labels = 0 1 2 3 Uberblock[4] magic = 0000000000bab10c version = 5000 txg = 772 guid_sum = 9045970794941528051 timestamp = 1487727291 UTC = Tue Feb 21 17:34:51 2017 labels = 0 < ... redacted ... > ------------------------------------ LABEL 1 ------------------------------------ version: 5000 name: 'pool' state: 1 txg: 14 < ... redacted ... > com.delphix:embedded_data labels = 1 2 3 Uberblock[4] magic = 0000000000bab10c version = 5000 txg = 4 guid_sum = 7793930272573252584 timestamp = 1487727521 UTC = Tue Feb 21 17:38:41 2017 labels = 1 2 3 < ... redacted ... > Reviewed-by: Tim Chase <[email protected]> Reviewed-by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #5738
Diffstat (limited to 'man')
-rw-r--r--man/man8/zdb.811
1 files changed, 7 insertions, 4 deletions
diff --git a/man/man8/zdb.8 b/man/man8/zdb.8
index 02137e97f..667f6b171 100644
--- a/man/man8/zdb.8
+++ b/man/man8/zdb.8
@@ -177,13 +177,16 @@ transaction type.
.ad
.sp .6
.RS 4n
-Read the vdev labels from the specified device. \fBzdb -l\fR will return 0 if
-valid label was found, 1 if error occured, and 2 if no valid labels were found.
+Read the vdev labels from the specified device and dump the unique
+configuration nvlist(s). \fBzdb -l\fR will return 1 if an error occured, 2 if
+no configuration nvlist could be unpacked (errors or not), and 0 otherwise.
+Specify multiple times to increase verbosity.
.P
If the \fB-u\fR option is also specified, also display the uberblocks on this
-device.
+device. Specify multiple times to increase verbosity.
.P
-If the \fB-q\fR option is also specified, don't print the labels.
+If the \fB-q\fR option is also specified, don't dump the configurations or the
+uberblocks.
.RE
.sp