xref: /illumos-gate/usr/src/man/man8/zdb.8 (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
1*bbf21555SRichard Lowe.\"
2*bbf21555SRichard Lowe.\" This file and its contents are supplied under the terms of the
3*bbf21555SRichard Lowe.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*bbf21555SRichard Lowe.\" You may only use this file in accordance with the terms of version
5*bbf21555SRichard Lowe.\" 1.0 of the CDDL.
6*bbf21555SRichard Lowe.\"
7*bbf21555SRichard Lowe.\" A full copy of the text of the CDDL should have accompanied this
8*bbf21555SRichard Lowe.\" source.  A copy of the CDDL is also available via the Internet at
9*bbf21555SRichard Lowe.\" http://www.illumos.org/license/CDDL.
10*bbf21555SRichard Lowe.\"
11*bbf21555SRichard Lowe.\"
12*bbf21555SRichard Lowe.\" Copyright 2012, Richard Lowe.
13*bbf21555SRichard Lowe.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
14*bbf21555SRichard Lowe.\" Copyright 2017 Nexenta Systems, Inc.
15*bbf21555SRichard Lowe.\"
16*bbf21555SRichard Lowe.Dd April 14, 2017
17*bbf21555SRichard Lowe.Dt ZDB 8
18*bbf21555SRichard Lowe.Os
19*bbf21555SRichard Lowe.Sh NAME
20*bbf21555SRichard Lowe.Nm zdb
21*bbf21555SRichard Lowe.Nd display zpool debugging and consistency information
22*bbf21555SRichard Lowe.Sh SYNOPSIS
23*bbf21555SRichard Lowe.Nm
24*bbf21555SRichard Lowe.Op Fl AbcdDFGhikLMPsvX
25*bbf21555SRichard Lowe.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
26*bbf21555SRichard Lowe.Op Fl I Ar inflight I/Os
27*bbf21555SRichard Lowe.Oo Fl o Ar var Ns = Ns Ar value Oc Ns ...
28*bbf21555SRichard Lowe.Op Fl t Ar txg
29*bbf21555SRichard Lowe.Op Fl U Ar cache
30*bbf21555SRichard Lowe.Op Fl x Ar dumpdir
31*bbf21555SRichard Lowe.Op Ar poolname Op Ar object ...
32*bbf21555SRichard Lowe.Nm
33*bbf21555SRichard Lowe.Op Fl AdiPv
34*bbf21555SRichard Lowe.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
35*bbf21555SRichard Lowe.Op Fl U Ar cache
36*bbf21555SRichard Lowe.Ar dataset Op Ar object ...
37*bbf21555SRichard Lowe.Nm
38*bbf21555SRichard Lowe.Fl C
39*bbf21555SRichard Lowe.Op Fl A
40*bbf21555SRichard Lowe.Op Fl U Ar cache
41*bbf21555SRichard Lowe.Nm
42*bbf21555SRichard Lowe.Fl E
43*bbf21555SRichard Lowe.Op Fl A
44*bbf21555SRichard Lowe.Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15
45*bbf21555SRichard Lowe.Nm
46*bbf21555SRichard Lowe.Fl l
47*bbf21555SRichard Lowe.Op Fl Aqu
48*bbf21555SRichard Lowe.Ar device
49*bbf21555SRichard Lowe.Nm
50*bbf21555SRichard Lowe.Fl m
51*bbf21555SRichard Lowe.Op Fl AFLPX
52*bbf21555SRichard Lowe.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
53*bbf21555SRichard Lowe.Op Fl t Ar txg
54*bbf21555SRichard Lowe.Op Fl U Ar cache
55*bbf21555SRichard Lowe.Ar poolname Op Ar vdev Op Ar metaslab ...
56*bbf21555SRichard Lowe.Nm
57*bbf21555SRichard Lowe.Fl O
58*bbf21555SRichard Lowe.Ar dataset path
59*bbf21555SRichard Lowe.Nm
60*bbf21555SRichard Lowe.Fl R
61*bbf21555SRichard Lowe.Op Fl A
62*bbf21555SRichard Lowe.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
63*bbf21555SRichard Lowe.Op Fl U Ar cache
64*bbf21555SRichard Lowe.Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size Ns Op : Ns Ar flags
65*bbf21555SRichard Lowe.Nm
66*bbf21555SRichard Lowe.Fl S
67*bbf21555SRichard Lowe.Op Fl AP
68*bbf21555SRichard Lowe.Op Fl e Oo Fl V Oc Op Fl p Ar path ...
69*bbf21555SRichard Lowe.Op Fl U Ar cache
70*bbf21555SRichard Lowe.Ar poolname
71*bbf21555SRichard Lowe.Sh DESCRIPTION
72*bbf21555SRichard LoweThe
73*bbf21555SRichard Lowe.Nm
74*bbf21555SRichard Loweutility displays information about a ZFS pool useful for debugging and performs
75*bbf21555SRichard Lowesome amount of consistency checking.
76*bbf21555SRichard LoweIt is a not a general purpose tool and options
77*bbf21555SRichard Lowe.Pq and facilities
78*bbf21555SRichard Lowemay change.
79*bbf21555SRichard LoweThis is neither a
80*bbf21555SRichard Lowe.Xr fsck 8
81*bbf21555SRichard Lowenor an
82*bbf21555SRichard Lowe.Xr fsdb 8
83*bbf21555SRichard Loweutility.
84*bbf21555SRichard Lowe.Pp
85*bbf21555SRichard LoweThe output of this command in general reflects the on-disk structure of a ZFS
86*bbf21555SRichard Lowepool, and is inherently unstable.
87*bbf21555SRichard LoweThe precise output of most invocations is not documented, a knowledge of ZFS
88*bbf21555SRichard Loweinternals is assumed.
89*bbf21555SRichard Lowe.Pp
90*bbf21555SRichard LoweIf the
91*bbf21555SRichard Lowe.Ar dataset
92*bbf21555SRichard Loweargument does not contain any
93*bbf21555SRichard Lowe.Qq Sy /
94*bbf21555SRichard Loweor
95*bbf21555SRichard Lowe.Qq Sy @
96*bbf21555SRichard Lowecharacters, it is interpreted as a pool name.
97*bbf21555SRichard LoweThe root dataset can be specified as
98*bbf21555SRichard Lowe.Ar pool Ns /
99*bbf21555SRichard Lowe.Pq pool name followed by a slash .
100*bbf21555SRichard Lowe.Pp
101*bbf21555SRichard LoweWhen operating on an imported and active pool it is possible, though unlikely,
102*bbf21555SRichard Lowethat zdb may interpret inconsistent pool data and behave erratically.
103*bbf21555SRichard Lowe.Sh OPTIONS
104*bbf21555SRichard LoweDisplay options:
105*bbf21555SRichard Lowe.Bl -tag -width Ds
106*bbf21555SRichard Lowe.It Fl b
107*bbf21555SRichard LoweDisplay statistics regarding the number, size
108*bbf21555SRichard Lowe.Pq logical, physical and allocated
109*bbf21555SRichard Loweand deduplication of blocks.
110*bbf21555SRichard Lowe.It Fl c
111*bbf21555SRichard LoweVerify the checksum of all metadata blocks while printing block statistics
112*bbf21555SRichard Lowe.Po see
113*bbf21555SRichard Lowe.Fl b
114*bbf21555SRichard Lowe.Pc .
115*bbf21555SRichard Lowe.Pp
116*bbf21555SRichard LoweIf specified multiple times, verify the checksums of all blocks.
117*bbf21555SRichard Lowe.It Fl C
118*bbf21555SRichard LoweDisplay information about the configuration.
119*bbf21555SRichard LoweIf specified with no other options, instead display information about the cache
120*bbf21555SRichard Lowefile
121*bbf21555SRichard Lowe.Pq Pa /etc/zfs/zpool.cache .
122*bbf21555SRichard LoweTo specify the cache file to display, see
123*bbf21555SRichard Lowe.Fl U .
124*bbf21555SRichard Lowe.Pp
125*bbf21555SRichard LoweIf specified multiple times, and a pool name is also specified display both the
126*bbf21555SRichard Lowecached configuration and the on-disk configuration.
127*bbf21555SRichard LoweIf specified multiple times with
128*bbf21555SRichard Lowe.Fl e
129*bbf21555SRichard Lowealso display the configuration that would be used were the pool to be imported.
130*bbf21555SRichard Lowe.It Fl d
131*bbf21555SRichard LoweDisplay information about datasets.
132*bbf21555SRichard LoweSpecified once, displays basic dataset information: ID, create transaction,
133*bbf21555SRichard Lowesize, and object count.
134*bbf21555SRichard Lowe.Pp
135*bbf21555SRichard LoweIf specified multiple times provides greater and greater verbosity.
136*bbf21555SRichard Lowe.Pp
137*bbf21555SRichard LoweIf object IDs are specified, display information about those specific objects
138*bbf21555SRichard Loweonly.
139*bbf21555SRichard Lowe.It Fl D
140*bbf21555SRichard LoweDisplay deduplication statistics, including the deduplication ratio
141*bbf21555SRichard Lowe.Pq Sy dedup ,
142*bbf21555SRichard Lowecompression ratio
143*bbf21555SRichard Lowe.Pq Sy compress ,
144*bbf21555SRichard Loweinflation due to the zfs copies property
145*bbf21555SRichard Lowe.Pq Sy copies ,
146*bbf21555SRichard Loweand an overall effective ratio
147*bbf21555SRichard Lowe.Pq Sy dedup No * Sy compress No / Sy copies .
148*bbf21555SRichard Lowe.It Fl DD
149*bbf21555SRichard LoweDisplay a histogram of deduplication statistics, showing the allocated
150*bbf21555SRichard Lowe.Pq physically present on disk
151*bbf21555SRichard Loweand referenced
152*bbf21555SRichard Lowe.Pq logically referenced in the pool
153*bbf21555SRichard Loweblock counts and sizes by reference count.
154*bbf21555SRichard Lowe.It Fl DDD
155*bbf21555SRichard LoweDisplay the statistics independently for each deduplication table.
156*bbf21555SRichard Lowe.It Fl DDDD
157*bbf21555SRichard LoweDump the contents of the deduplication tables describing duplicate blocks.
158*bbf21555SRichard Lowe.It Fl DDDDD
159*bbf21555SRichard LoweAlso dump the contents of the deduplication tables describing unique blocks.
160*bbf21555SRichard Lowe.It Fl E Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15
161*bbf21555SRichard LoweDecode and display block from an embedded block pointer specified by the
162*bbf21555SRichard Lowe.Ar word
163*bbf21555SRichard Lowearguments.
164*bbf21555SRichard Lowe.It Fl h
165*bbf21555SRichard LoweDisplay pool history similar to
166*bbf21555SRichard Lowe.Nm zpool Cm history ,
167*bbf21555SRichard Lowebut include internal changes, transaction, and dataset information.
168*bbf21555SRichard Lowe.It Fl i
169*bbf21555SRichard LoweDisplay information about intent log
170*bbf21555SRichard Lowe.Pq ZIL
171*bbf21555SRichard Loweentries relating to each dataset.
172*bbf21555SRichard LoweIf specified multiple times, display counts of each intent log transaction type.
173*bbf21555SRichard Lowe.It Fl k
174*bbf21555SRichard LoweExamine the checkpointed state of the pool.
175*bbf21555SRichard LoweNote, the on disk format of the pool is not reverted to the checkpointed state.
176*bbf21555SRichard Lowe.It Fl l Ar device
177*bbf21555SRichard LoweRead the vdev labels and L2ARC header from the specified device.
178*bbf21555SRichard Lowe.Nm Fl l
179*bbf21555SRichard Lowewill return 0 if valid label was found, 1 if error occurred, and 2 if no valid
180*bbf21555SRichard Lowelabels were found.
181*bbf21555SRichard LoweThe presence of L2ARC header is indicated by a specific
182*bbf21555SRichard Lowesequence (L2ARC_DEV_HDR_MAGIC).
183*bbf21555SRichard LoweIf there is an accounting error in the size or the number of L2ARC log blocks
184*bbf21555SRichard Lowe.Nm Fl l
185*bbf21555SRichard Lowewill return 1.
186*bbf21555SRichard LoweEach unique configuration is displayed only once.
187*bbf21555SRichard Lowe.It Fl ll Ar device
188*bbf21555SRichard LoweIn addition display label space usage stats.
189*bbf21555SRichard LoweIf a valid L2ARC header was found also display the properties of log blocks
190*bbf21555SRichard Loweused for restoring L2ARC contents (persistent L2ARC).
191*bbf21555SRichard Lowe.It Fl lll Ar device
192*bbf21555SRichard LoweDisplay every configuration, unique or not.
193*bbf21555SRichard LoweIf a valid L2ARC header was found also display the properties of log entries in
194*bbf21555SRichard Lowelog blocks used for restoring L2ARC contents (persistent L2ARC).
195*bbf21555SRichard Lowe.Pp
196*bbf21555SRichard LoweIf the
197*bbf21555SRichard Lowe.Fl q
198*bbf21555SRichard Loweoption is also specified, don't print the labels or the L2ARC header.
199*bbf21555SRichard Lowe.Pp
200*bbf21555SRichard LoweIf the
201*bbf21555SRichard Lowe.Fl u
202*bbf21555SRichard Loweoption is also specified, also display the uberblocks on this device.
203*bbf21555SRichard LoweSpecify multiple times to increase verbosity.
204*bbf21555SRichard Lowe.It Fl L
205*bbf21555SRichard LoweDisable leak detection and the loading of space maps.
206*bbf21555SRichard LoweBy default,
207*bbf21555SRichard Lowe.Nm
208*bbf21555SRichard Loweverifies that all non-free blocks are referenced, which can be very expensive.
209*bbf21555SRichard Lowe.It Fl m
210*bbf21555SRichard LoweDisplay the offset, spacemap, free space of each metaslab, all the log
211*bbf21555SRichard Lowespacemaps and their obsolete entry statistics.
212*bbf21555SRichard Lowe.It Fl mm
213*bbf21555SRichard LoweAlso display information about the on-disk free space histogram associated with
214*bbf21555SRichard Loweeach metaslab.
215*bbf21555SRichard Lowe.It Fl mmm
216*bbf21555SRichard LoweDisplay the maximum contiguous free space, the in-core free space histogram, and
217*bbf21555SRichard Lowethe percentage of free space in each space map.
218*bbf21555SRichard Lowe.It Fl mmmm
219*bbf21555SRichard LoweDisplay every spacemap record.
220*bbf21555SRichard Lowe.It Fl M
221*bbf21555SRichard LoweDisplay the offset, spacemap, and free space of each metaslab.
222*bbf21555SRichard Lowe.It Fl MM
223*bbf21555SRichard LoweAlso display information about the maximum contiguous free space and the
224*bbf21555SRichard Lowepercentage of free space in each space map.
225*bbf21555SRichard Lowe.It Fl MMM
226*bbf21555SRichard LoweDisplay every spacemap record.
227*bbf21555SRichard Lowe.It Fl O Ar dataset path
228*bbf21555SRichard LoweLook up the specified
229*bbf21555SRichard Lowe.Ar path
230*bbf21555SRichard Loweinside of the
231*bbf21555SRichard Lowe.Ar dataset
232*bbf21555SRichard Loweand display its metadata and indirect blocks.
233*bbf21555SRichard LoweSpecified
234*bbf21555SRichard Lowe.Ar path
235*bbf21555SRichard Lowemust be relative to the root of
236*bbf21555SRichard Lowe.Ar dataset .
237*bbf21555SRichard LoweThis option can be combined with
238*bbf21555SRichard Lowe.Fl v
239*bbf21555SRichard Lowefor increasing verbosity.
240*bbf21555SRichard Lowe.It Xo
241*bbf21555SRichard Lowe.Fl R Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size Ns Op : Ns Ar flags
242*bbf21555SRichard Lowe.Xc
243*bbf21555SRichard LoweRead and display a block from the specified device.
244*bbf21555SRichard LoweBy default the block is displayed as a hex dump, but see the description of the
245*bbf21555SRichard Lowe.Sy r
246*bbf21555SRichard Loweflag, below.
247*bbf21555SRichard Lowe.Pp
248*bbf21555SRichard LoweThe block is specified in terms of a colon-separated tuple
249*bbf21555SRichard Lowe.Ar vdev
250*bbf21555SRichard Lowe.Pq an integer vdev identifier
251*bbf21555SRichard Lowe.Ar offset
252*bbf21555SRichard Lowe.Pq the offset within the vdev
253*bbf21555SRichard Lowe.Ar size
254*bbf21555SRichard Lowe.Pq the size of the block to read
255*bbf21555SRichard Loweand, optionally,
256*bbf21555SRichard Lowe.Ar flags
257*bbf21555SRichard Lowe.Pq a set of flags, described below .
258*bbf21555SRichard Lowe.Pp
259*bbf21555SRichard Lowe.Bl -tag -compact -width "b offset"
260*bbf21555SRichard Lowe.It Sy b Ar offset
261*bbf21555SRichard LowePrint block pointer
262*bbf21555SRichard Lowe.It Sy d
263*bbf21555SRichard LoweDecompress the block
264*bbf21555SRichard Lowe.It Sy e
265*bbf21555SRichard LoweByte swap the block
266*bbf21555SRichard Lowe.It Sy g
267*bbf21555SRichard LoweDump gang block header
268*bbf21555SRichard Lowe.It Sy i
269*bbf21555SRichard LoweDump indirect block
270*bbf21555SRichard Lowe.It Sy r
271*bbf21555SRichard LoweDump raw uninterpreted block data
272*bbf21555SRichard Lowe.El
273*bbf21555SRichard Lowe.It Fl s
274*bbf21555SRichard LoweReport statistics on
275*bbf21555SRichard Lowe.Nm zdb
276*bbf21555SRichard LoweI/O.
277*bbf21555SRichard LoweDisplay operation counts, bandwidth, and error counts of I/O to the pool from
278*bbf21555SRichard Lowe.Nm .
279*bbf21555SRichard Lowe.It Fl S
280*bbf21555SRichard LoweSimulate the effects of deduplication, constructing a DDT and then display
281*bbf21555SRichard Lowethat DDT as with
282*bbf21555SRichard Lowe.Fl DD .
283*bbf21555SRichard Lowe.It Fl u
284*bbf21555SRichard LoweDisplay the current uberblock.
285*bbf21555SRichard Lowe.El
286*bbf21555SRichard Lowe.Pp
287*bbf21555SRichard LoweOther options:
288*bbf21555SRichard Lowe.Bl -tag -width Ds
289*bbf21555SRichard Lowe.It Fl A
290*bbf21555SRichard LoweDo not abort should any assertion fail.
291*bbf21555SRichard Lowe.It Fl AA
292*bbf21555SRichard LoweEnable panic recovery, certain errors which would otherwise be fatal are
293*bbf21555SRichard Lowedemoted to warnings.
294*bbf21555SRichard Lowe.It Fl AAA
295*bbf21555SRichard LoweDo not abort if asserts fail and also enable panic recovery.
296*bbf21555SRichard Lowe.It Fl e Op Fl p Ar path ...
297*bbf21555SRichard LoweOperate on an exported pool, not present in
298*bbf21555SRichard Lowe.Pa /etc/zfs/zpool.cache .
299*bbf21555SRichard LoweThe
300*bbf21555SRichard Lowe.Fl p
301*bbf21555SRichard Loweflag specifies the path under which devices are to be searched.
302*bbf21555SRichard Lowe.It Fl x Ar dumpdir
303*bbf21555SRichard LoweAll blocks accessed will be copied to files in the specified directory.
304*bbf21555SRichard LoweThe blocks will be placed in sparse files whose name is the same as
305*bbf21555SRichard Lowethat of the file or device read.
306*bbf21555SRichard Lowe.Nm
307*bbf21555SRichard Lowecan be then run on the generated files.
308*bbf21555SRichard LoweNote that the
309*bbf21555SRichard Lowe.Fl bbc
310*bbf21555SRichard Loweflags are sufficient to access
311*bbf21555SRichard Lowe.Pq and thus copy
312*bbf21555SRichard Loweall metadata on the pool.
313*bbf21555SRichard Lowe.It Fl F
314*bbf21555SRichard LoweAttempt to make an unreadable pool readable by trying progressively older
315*bbf21555SRichard Lowetransactions.
316*bbf21555SRichard Lowe.It Fl G
317*bbf21555SRichard LoweDump the contents of the zfs_dbgmsg buffer before exiting
318*bbf21555SRichard Lowe.Nm .
319*bbf21555SRichard Lowezfs_dbgmsg is a buffer used by ZFS to dump advanced debug information.
320*bbf21555SRichard Lowe.It Fl I Ar inflight I/Os
321*bbf21555SRichard LoweLimit the number of outstanding checksum I/Os to the specified value.
322*bbf21555SRichard LoweThe default value is 200.
323*bbf21555SRichard LoweThis option affects the performance of the
324*bbf21555SRichard Lowe.Fl c
325*bbf21555SRichard Loweoption.
326*bbf21555SRichard Lowe.It Fl o Ar var Ns = Ns Ar value ...
327*bbf21555SRichard LoweSet the given global libzpool variable to the provided value.
328*bbf21555SRichard LoweThe value must be an unsigned 32-bit integer.
329*bbf21555SRichard LoweCurrently only little-endian systems are supported to avoid accidentally setting
330*bbf21555SRichard Lowethe high 32 bits of 64-bit variables.
331*bbf21555SRichard Lowe.It Fl P
332*bbf21555SRichard LowePrint numbers in an unscaled form more amenable to parsing, eg. 1000000 rather
333*bbf21555SRichard Lowethan 1M.
334*bbf21555SRichard Lowe.It Fl t Ar transaction
335*bbf21555SRichard LoweSpecify the highest transaction to use when searching for uberblocks.
336*bbf21555SRichard LoweSee also the
337*bbf21555SRichard Lowe.Fl u
338*bbf21555SRichard Loweand
339*bbf21555SRichard Lowe.Fl l
340*bbf21555SRichard Loweoptions for a means to see the available uberblocks and their associated
341*bbf21555SRichard Lowetransaction numbers.
342*bbf21555SRichard Lowe.It Fl U Ar cachefile
343*bbf21555SRichard LoweUse a cache file other than
344*bbf21555SRichard Lowe.Pa /etc/zfs/zpool.cache .
345*bbf21555SRichard Lowe.It Fl v
346*bbf21555SRichard LoweEnable verbosity.
347*bbf21555SRichard LoweSpecify multiple times for increased verbosity.
348*bbf21555SRichard Lowe.It Fl V
349*bbf21555SRichard LoweAttempt verbatim import.
350*bbf21555SRichard LoweThis mimics the behavior of the kernel when loading a pool from a cachefile.
351*bbf21555SRichard LoweOnly usable with
352*bbf21555SRichard Lowe.Fl e .
353*bbf21555SRichard Lowe.It Fl X
354*bbf21555SRichard LoweAttempt
355*bbf21555SRichard Lowe.Qq extreme
356*bbf21555SRichard Lowetransaction rewind, that is attempt the same recovery as
357*bbf21555SRichard Lowe.Fl F
358*bbf21555SRichard Lowebut read transactions otherwise deemed too old.
359*bbf21555SRichard Lowe.El
360*bbf21555SRichard Lowe.Pp
361*bbf21555SRichard LoweSpecifying a display option more than once enables verbosity for only that
362*bbf21555SRichard Loweoption, with more occurrences enabling more verbosity.
363*bbf21555SRichard Lowe.Pp
364*bbf21555SRichard LoweIf no options are specified, all information about the named pool will be
365*bbf21555SRichard Lowedisplayed at default verbosity.
366*bbf21555SRichard Lowe.Sh EXAMPLES
367*bbf21555SRichard Lowe.Bl -tag -width Ds
368*bbf21555SRichard Lowe.It Xo
369*bbf21555SRichard Lowe.Sy Example 1
370*bbf21555SRichard LoweDisplay the configuration of imported pool
371*bbf21555SRichard Lowe.Pa rpool
372*bbf21555SRichard Lowe.Xc
373*bbf21555SRichard Lowe.Bd -literal
374*bbf21555SRichard Lowe# zdb -C rpool
375*bbf21555SRichard Lowe
376*bbf21555SRichard LoweMOS Configuration:
377*bbf21555SRichard Lowe        version: 28
378*bbf21555SRichard Lowe        name: 'rpool'
379*bbf21555SRichard Lowe ...
380*bbf21555SRichard Lowe.Ed
381*bbf21555SRichard Lowe.It Xo
382*bbf21555SRichard Lowe.Sy Example 2
383*bbf21555SRichard LoweDisplay basic dataset information about
384*bbf21555SRichard Lowe.Pa rpool
385*bbf21555SRichard Lowe.Xc
386*bbf21555SRichard Lowe.Bd -literal
387*bbf21555SRichard Lowe# zdb -d rpool
388*bbf21555SRichard LoweDataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects
389*bbf21555SRichard LoweDataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects
390*bbf21555SRichard Lowe ...
391*bbf21555SRichard Lowe.Ed
392*bbf21555SRichard Lowe.It Xo
393*bbf21555SRichard Lowe.Sy Example 3
394*bbf21555SRichard LoweDisplay basic information about object 0 in
395*bbf21555SRichard Lowe.Pa rpool/export/home
396*bbf21555SRichard Lowe.Xc
397*bbf21555SRichard Lowe.Bd -literal
398*bbf21555SRichard Lowe# zdb -d rpool/export/home 0
399*bbf21555SRichard LoweDataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects
400*bbf21555SRichard Lowe
401*bbf21555SRichard Lowe    Object  lvl   iblk   dblk  dsize  lsize   %full  type
402*bbf21555SRichard Lowe         0    7    16K    16K  15.0K    16K   25.00  DMU dnode
403*bbf21555SRichard Lowe.Ed
404*bbf21555SRichard Lowe.It Xo
405*bbf21555SRichard Lowe.Sy Example 4
406*bbf21555SRichard LoweDisplay the predicted effect of enabling deduplication on
407*bbf21555SRichard Lowe.Pa rpool
408*bbf21555SRichard Lowe.Xc
409*bbf21555SRichard Lowe.Bd -literal
410*bbf21555SRichard Lowe# zdb -S rpool
411*bbf21555SRichard LoweSimulated DDT histogram:
412*bbf21555SRichard Lowe
413*bbf21555SRichard Lowebucket              allocated                       referenced
414*bbf21555SRichard Lowe______   ______________________________   ______________________________
415*bbf21555SRichard Lowerefcnt   blocks   LSIZE   PSIZE   DSIZE   blocks   LSIZE   PSIZE   DSIZE
416*bbf21555SRichard Lowe------   ------   -----   -----   -----   ------   -----   -----   -----
417*bbf21555SRichard Lowe     1     694K   27.1G   15.0G   15.0G     694K   27.1G   15.0G   15.0G
418*bbf21555SRichard Lowe     2    35.0K   1.33G    699M    699M    74.7K   2.79G   1.45G   1.45G
419*bbf21555SRichard Lowe ...
420*bbf21555SRichard Lowededup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00
421*bbf21555SRichard Lowe.Ed
422*bbf21555SRichard Lowe.El
423*bbf21555SRichard Lowe.Sh SEE ALSO
424*bbf21555SRichard Lowe.Xr zfs 8 ,
425*bbf21555SRichard Lowe.Xr zpool 8
426