8
8
.\" source. A copy of the CDDL is also available via the Internet at
9
9
.\" http://www.illumos.org/license/CDDL.
10
10
.\"
11
- .\"
12
11
.\" Copyright 2012, Richard Lowe.
13
12
.\" Copyright (c) 2012, 2019 by Delphix. All rights reserved.
14
13
.\" Copyright 2017 Nexenta Systems, Inc.
15
14
.\" Copyright (c) 2017 Lawrence Livermore National Security, LLC.
16
15
.\" Copyright (c) 2017 Intel Corporation.
17
16
.\"
18
17
.Dd October 7, 2020
19
- .Dt ZDB 8 SMM
18
+ .Dt ZDB 8
20
19
.Os
20
+ .
21
21
.Sh NAME
22
22
.Nm zdb
23
- .Nd display zpool debugging and consistency information
23
+ .Nd display ZFS storage pool debugging and consistency information
24
24
.Sh SYNOPSIS
25
25
.Nm
26
26
.Op Fl AbcdDFGhikLMPsvXYy
27
- .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
27
+ .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns …
28
28
.Op Fl I Ar inflight I/Os
29
- .Oo Fl o Ar var Ns = Ns Ar value Oc Ns ...
29
+ .Oo Fl o Ar var Ns = Ns Ar value Oc Ns …
30
30
.Op Fl t Ar txg
31
31
.Op Fl U Ar cache
32
32
.Op Fl x Ar dumpdir
33
- .Op Ar poolname[/ dataset | objset ID]
34
- .Op Ar object | range ...
33
+ .Op Ar poolname Ns Op / Ns Ar dataset | objset ID
34
+ .Op Ar object Ns | Ns Ar range Ns …
35
35
.Nm
36
36
.Op Fl AdiPv
37
- .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
37
+ .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns …
38
38
.Op Fl U Ar cache
39
- .Ar poolname[/dataset | objset ID] Op Ar object | range ...
39
+ .Ar poolname Ns Op Ar / Ns Ar dataset | objset ID
40
+ .Op Ar object Ns | Ns Ar range Ns …
40
41
.Nm
41
42
.Fl C
42
43
.Op Fl A
43
44
.Op Fl U Ar cache
44
45
.Nm
45
46
.Fl E
46
47
.Op Fl A
47
- .Ar word0 Ns \& : Ns Ar word1 Ns :... : Ns Ar word15
48
+ .Ar word0 : Ns Ar word1 Ns :… : Ns Ar word15
48
49
.Nm
49
50
.Fl l
50
51
.Op Fl Aqu
51
52
.Ar device
52
53
.Nm
53
54
.Fl m
54
55
.Op Fl AFLPXY
55
- .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
56
+ .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns …
56
57
.Op Fl t Ar txg
57
58
.Op Fl U Ar cache
58
- .Ar poolname Op Ar vdev Op Ar metaslab ...
59
+ .Ar poolname Op Ar vdev Oo Ar metaslab Oc Ns …
59
60
.Nm
60
61
.Fl O
61
62
.Ar dataset path
65
66
.Nm
66
67
.Fl R
67
68
.Op Fl A
68
- .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
69
+ .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns …
69
70
.Op Fl U Ar cache
70
- .Ar poolname vdev Ns \& : Ns Ar offset Ns \& : Ns Ar [< lsize>/]< psize> Ns Op : Ns Ar flags
71
+ .Ar poolname vdev : Ns Ar offset : Ns Oo Ar lsize Ns / Oc Ns Ar psize Ns Op : Ns Ar flags
71
72
.Nm
72
73
.Fl S
73
74
.Op Fl AP
74
- .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
75
+ .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns …
75
76
.Op Fl U Ar cache
76
77
.Ar poolname
78
+ .
77
79
.Sh DESCRIPTION
78
80
The
79
81
.Nm
99
101
.Qq Sy @
100
102
characters, it is interpreted as a pool name.
101
103
The root dataset can be specified as
102
- .Ar pool Ns /
103
- .Pq pool name followed by a slash .
104
+ .Qq Ar pool Ns / .
104
105
.Pp
105
106
When operating on an imported and active pool it is possible, though unlikely,
106
107
that zdb may interpret inconsistent pool data and behave erratically.
108
+ .
107
109
.Sh OPTIONS
108
110
Display options:
109
111
.Bl -tag -width Ds
@@ -143,27 +145,30 @@ those specific objects or ranges only.
143
145
.Pp
144
146
An object ID range is specified in terms of a colon-separated tuple of
145
147
the form
146
- .Ao start Ac Ns : Ns Ao end Ac Ns Op Ns : Ns Ao flags Ac Ns .
148
+ .Ao start Ac : Ns Ao end Ac Ns Op : Ns Ao flags Ac .
147
149
The fields
148
150
.Ar start
149
151
and
150
152
.Ar end
151
153
are integer object identifiers that denote the upper and lower bounds
152
- of the range. An
154
+ of the range.
155
+ An
153
156
.Ar end
154
- value of -1 specifies a range with no upper bound. The
157
+ value of -1 specifies a range with no upper bound.
158
+ The
155
159
.Ar flags
156
160
field optionally specifies a set of flags, described below, that control
157
- which object types are dumped. By default, all object types are dumped. A minus
158
- sign
161
+ which object types are dumped.
162
+ By default, all object types are dumped.
163
+ A minus sign
159
164
.Pq -
160
165
negates the effect of the flag that follows it and has no effect unless
161
166
preceded by the
162
167
.Ar A
163
- flag. For example, the range 0:-1:A-d will dump all object types except
164
- for directories.
168
+ flag.
169
+ For example, the range 0:-1:A-d will dump all object types except for directories.
165
170
.Pp
166
- .Bl -tag -compact
171
+ .Bl -tag -compact -width Ds
167
172
.It Sy A
168
173
Dump all objects (this is the default)
169
174
.It Sy d
@@ -198,7 +203,7 @@ Display the statistics independently for each deduplication table.
198
203
Dump the contents of the deduplication tables describing duplicate blocks.
199
204
.It Fl DDDDD
200
205
Also dump the contents of the deduplication tables describing unique blocks.
201
- .It Fl E Ar word0 Ns \& : Ns Ar word1 Ns :... : Ns Ar word15
206
+ .It Fl E Ar word0 : Ns Ar word1 Ns :… : Ns Ar word15
202
207
Decode and display block from an embedded block pointer specified by the
203
208
.Ar word
204
209
arguments.
@@ -218,18 +223,21 @@ Note, the on disk format of the pool is not reverted to the checkpointed state.
218
223
Read the vdev labels and L2ARC header from the specified device.
219
224
.Nm Fl l
220
225
will return 0 if valid label was found, 1 if error occurred, and 2 if no valid
221
- labels were found. The presence of L2ARC header is indicated by a specific
222
- sequence (L2ARC_DEV_HDR_MAGIC). If there is an accounting error in the size
223
- or the number of L2ARC log blocks
226
+ labels were found.
227
+ The presence of L2ARC header is indicated by a specific
228
+ sequence (L2ARC_DEV_HDR_MAGIC).
229
+ If there is an accounting error in the size or the number of L2ARC log blocks
224
230
.Nm Fl l
225
- will return 1. Each unique configuration is displayed only
226
- once.
231
+ will return 1.
232
+ Each unique configuration is displayed only once.
227
233
.It Fl ll Ar device
228
- In addition display label space usage stats. If a valid L2ARC header was found
234
+ In addition display label space usage stats.
235
+ If a valid L2ARC header was found
229
236
also display the properties of log blocks used for restoring L2ARC contents
230
237
(persistent L2ARC).
231
238
.It Fl lll Ar device
232
- Display every configuration, unique or not. If a valid L2ARC header was found
239
+ Display every configuration, unique or not.
240
+ If a valid L2ARC header was found
233
241
also display the properties of log entries in log blocks used for restoring
234
242
L2ARC contents (persistent L2ARC).
235
243
.Pp
@@ -239,8 +247,8 @@ option is also specified, don't print the labels or the L2ARC header.
239
247
.Pp
240
248
If the
241
249
.Fl u
242
- option is also specified, also display the uberblocks on this device. Specify
243
- multiple times to increase verbosity.
250
+ option is also specified, also display the uberblocks on this device.
251
+ Specify multiple times to increase verbosity.
244
252
.It Fl L
245
253
Disable leak detection and the loading of space maps.
246
254
By default,
@@ -291,7 +299,7 @@ This option can be combined with
291
299
.Fl v
292
300
for increasing verbosity.
293
301
.It Xo
294
- .Fl R Ar poolname vdev Ns \& : Ns Ar offset Ns \& : Ns Ar [< lsize>/]< psize> Ns Op : Ns Ar flags
302
+ .Fl R Ar poolname vdev : Ns Ar offset : Ns Oo Ar lsize Ns / Oc Ns Ar psize Ns Op : Ns Ar flags
295
303
.Xc
296
304
Read and display a block from the specified device.
297
305
By default the block is displayed as a hex dump, but see the description of the
@@ -315,7 +323,8 @@ Print block pointer at hex offset
315
323
.It Sy c
316
324
Calculate and display checksums
317
325
.It Sy d
318
- Decompress the block. Set environment variable
326
+ Decompress the block.
327
+ Set environment variable
319
328
.Nm ZDB_NO_ZLE
320
329
to skip zle when guessing.
321
330
.It Sy e
@@ -352,7 +361,7 @@ Enable panic recovery, certain errors which would otherwise be fatal are
352
361
demoted to warnings.
353
362
.It Fl AAA
354
363
Do not abort if asserts fail and also enable panic recovery.
355
- .It Fl e Op Fl p Ar path ...
364
+ .It Fl e Oo Fl p Ar path Oc Ns …
356
365
Operate on an exported pool, not present in
357
366
.Pa /etc/zfs/zpool.cache .
358
367
The
@@ -382,14 +391,16 @@ The default value is 200.
382
391
This option affects the performance of the
383
392
.Fl c
384
393
option.
385
- .It Fl o Ar var Ns = Ns Ar value ...
394
+ .It Fl o Ar var Ns = Ns Ar value …
386
395
Set the given global libzpool variable to the provided value.
387
396
The value must be an unsigned 32-bit integer.
388
397
Currently only little-endian systems are supported to avoid accidentally setting
389
398
the high 32 bits of 64-bit variables.
390
399
.It Fl P
391
- Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather
392
- than 1M.
400
+ Print numbers in an unscaled form more amenable to parsing, e.g.\&
401
+ .Sy 1000000
402
+ rather than
403
+ .Sy 1M .
393
404
.It Fl t Ar transaction
394
405
Specify the highest transaction to use when searching for uberblocks.
395
406
See also the
@@ -432,51 +443,51 @@ option, with more occurrences enabling more verbosity.
432
443
.Pp
433
444
If no options are specified, all information about the named pool will be
434
445
displayed at default verbosity.
446
+ .
435
447
.Sh EXAMPLES
436
448
.Bl -tag -width Ds
437
449
.It Xo
438
- .Sy Example 1
450
+ .Sy Example 1 :
439
451
Display the configuration of imported pool
440
- .Pa rpool
452
+ .Ar rpool
441
453
.Xc
442
454
.Bd -literal
443
- # zdb -C rpool
444
-
455
+ .No # Nm zdb Fl C Ar rpool
445
456
MOS Configuration:
446
457
version: 28
447
458
name: 'rpool'
448
- ...
459
+ …
449
460
.Ed
450
461
.It Xo
451
- .Sy Example 2
462
+ .Sy Example 2 :
452
463
Display basic dataset information about
453
- .Pa rpool
464
+ .Ar rpool
454
465
.Xc
455
466
.Bd -literal
456
- # zdb -d rpool
467
+ . No # Nm zdb Fl d Ar rpool
457
468
Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects
458
469
Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects
459
- ...
470
+ …
460
471
.Ed
461
472
.It Xo
462
- .Sy Example 3
473
+ .Sy Example 3 :
463
474
Display basic information about object 0 in
464
- .Pa rpool/export/home
475
+ .Ar rpool/export/home
465
476
.Xc
466
477
.Bd -literal
467
- # zdb -d rpool/export/home 0
478
+ . No # Nm zdb Fl d Ar rpool/export/home 0
468
479
Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects
469
480
470
481
Object lvl iblk dblk dsize lsize %full type
471
482
0 7 16K 16K 15.0K 16K 25.00 DMU dnode
472
483
.Ed
473
484
.It Xo
474
- .Sy Example 4
485
+ .Sy Example 4 :
475
486
Display the predicted effect of enabling deduplication on
476
- .Pa rpool
487
+ .Ar rpool
477
488
.Xc
478
489
.Bd -literal
479
- # zdb -S rpool
490
+ . No # Nm zdb Fl S Ar rpool
480
491
Simulated DDT histogram:
481
492
482
493
bucket allocated referenced
@@ -485,10 +496,11 @@ refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE
485
496
------ ------ ----- ----- ----- ------ ----- ----- -----
486
497
1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G
487
498
2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G
488
- ...
499
+ …
489
500
dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00
490
501
.Ed
491
502
.El
503
+ .
492
504
.Sh SEE ALSO
493
505
.Xr zfs 8 ,
494
506
.Xr zpool 8
0 commit comments