1eda14cbcSMatt Macy.\" 2eda14cbcSMatt Macy.\" This file and its contents are supplied under the terms of the 3eda14cbcSMatt Macy.\" Common Development and Distribution License ("CDDL"), version 1.0. 4eda14cbcSMatt Macy.\" You may only use this file in accordance with the terms of version 5eda14cbcSMatt Macy.\" 1.0 of the CDDL. 6eda14cbcSMatt Macy.\" 7eda14cbcSMatt Macy.\" A full copy of the text of the CDDL should have accompanied this 8eda14cbcSMatt Macy.\" source. A copy of the CDDL is also available via the Internet at 9eda14cbcSMatt Macy.\" http://www.illumos.org/license/CDDL. 10eda14cbcSMatt Macy.\" 11eda14cbcSMatt Macy.\" Copyright 2012, Richard Lowe. 12eda14cbcSMatt Macy.\" Copyright (c) 2012, 2019 by Delphix. All rights reserved. 13eda14cbcSMatt Macy.\" Copyright 2017 Nexenta Systems, Inc. 14eda14cbcSMatt Macy.\" Copyright (c) 2017 Lawrence Livermore National Security, LLC. 15eda14cbcSMatt Macy.\" Copyright (c) 2017 Intel Corporation. 16eda14cbcSMatt Macy.\" 17*0a97523dSMartin Matuska.Dd June 27, 2023 1816038816SMartin Matuska.Dt ZDB 8 19eda14cbcSMatt Macy.Os 2016038816SMartin Matuska. 21eda14cbcSMatt Macy.Sh NAME 22eda14cbcSMatt Macy.Nm zdb 2316038816SMartin Matuska.Nd display ZFS storage pool debugging and consistency information 24eda14cbcSMatt Macy.Sh SYNOPSIS 25eda14cbcSMatt Macy.Nm 26e92ffd9bSMartin Matuska.Op Fl AbcdDFGhikLMNPsvXYy 2716038816SMartin Matuska.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns … 28c03c5b1cSMartin Matuska.Op Fl I Ar inflight-I/O-ops 2916038816SMartin Matuska.Oo Fl o Ar var Ns = Ns Ar value Oc Ns … 30eda14cbcSMatt Macy.Op Fl t Ar txg 31eda14cbcSMatt Macy.Op Fl U Ar cache 32eda14cbcSMatt Macy.Op Fl x Ar dumpdir 332a58b312SMartin Matuska.Op Fl K Ar key 34c03c5b1cSMartin Matuska.Op Ar poolname Ns Op / Ns Ar dataset Ns | Ns Ar objset-ID 3516038816SMartin Matuska.Op Ar object Ns | Ns Ar range Ns … 36eda14cbcSMatt Macy.Nm 37eda14cbcSMatt Macy.Op Fl AdiPv 3816038816SMartin Matuska.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns … 39eda14cbcSMatt Macy.Op Fl U Ar cache 402a58b312SMartin Matuska.Op Fl K Ar key 41c03c5b1cSMartin Matuska.Ar poolname Ns Op Ar / Ns Ar dataset Ns | Ns Ar objset-ID 4216038816SMartin Matuska.Op Ar object Ns | Ns Ar range Ns … 43eda14cbcSMatt Macy.Nm 444e8d558cSMartin Matuska.Fl B 454e8d558cSMartin Matuska.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns … 464e8d558cSMartin Matuska.Op Fl U Ar cache 474e8d558cSMartin Matuska.Op Fl K Ar key 484e8d558cSMartin Matuska.Ar poolname Ns Ar / Ns Ar objset-ID 494e8d558cSMartin Matuska.Op Ar backup-flags 504e8d558cSMartin Matuska.Nm 51eda14cbcSMatt Macy.Fl C 52eda14cbcSMatt Macy.Op Fl A 53eda14cbcSMatt Macy.Op Fl U Ar cache 54*0a97523dSMartin Matuska.Op Ar poolname 55eda14cbcSMatt Macy.Nm 56eda14cbcSMatt Macy.Fl E 57eda14cbcSMatt Macy.Op Fl A 5816038816SMartin Matuska.Ar word0 : Ns Ar word1 Ns :…: Ns Ar word15 59eda14cbcSMatt Macy.Nm 60eda14cbcSMatt Macy.Fl l 61eda14cbcSMatt Macy.Op Fl Aqu 62eda14cbcSMatt Macy.Ar device 63eda14cbcSMatt Macy.Nm 64eda14cbcSMatt Macy.Fl m 65eda14cbcSMatt Macy.Op Fl AFLPXY 6616038816SMartin Matuska.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns … 67eda14cbcSMatt Macy.Op Fl t Ar txg 68eda14cbcSMatt Macy.Op Fl U Ar cache 6916038816SMartin Matuska.Ar poolname Op Ar vdev Oo Ar metaslab Oc Ns … 70eda14cbcSMatt Macy.Nm 71eda14cbcSMatt Macy.Fl O 722a58b312SMartin Matuska.Op Fl K Ar key 73eda14cbcSMatt Macy.Ar dataset path 74eda14cbcSMatt Macy.Nm 75184c1b94SMartin Matuska.Fl r 762a58b312SMartin Matuska.Op Fl K Ar key 77184c1b94SMartin Matuska.Ar dataset path destination 78184c1b94SMartin Matuska.Nm 79eda14cbcSMatt Macy.Fl R 80eda14cbcSMatt Macy.Op Fl A 8116038816SMartin Matuska.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns … 82eda14cbcSMatt Macy.Op Fl U Ar cache 8316038816SMartin Matuska.Ar poolname vdev : Ns Ar offset : Ns Oo Ar lsize Ns / Oc Ns Ar psize Ns Op : Ns Ar flags 84eda14cbcSMatt Macy.Nm 85eda14cbcSMatt Macy.Fl S 86eda14cbcSMatt Macy.Op Fl AP 8716038816SMartin Matuska.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns … 88eda14cbcSMatt Macy.Op Fl U Ar cache 89eda14cbcSMatt Macy.Ar poolname 9016038816SMartin Matuska. 91eda14cbcSMatt Macy.Sh DESCRIPTION 92eda14cbcSMatt MacyThe 93eda14cbcSMatt Macy.Nm 94eda14cbcSMatt Macyutility displays information about a ZFS pool useful for debugging and performs 95eda14cbcSMatt Macysome amount of consistency checking. 96eda14cbcSMatt MacyIt is a not a general purpose tool and options 97eda14cbcSMatt Macy.Pq and facilities 98eda14cbcSMatt Macymay change. 99c03c5b1cSMartin MatuskaIt is not a 100eda14cbcSMatt Macy.Xr fsck 8 101eda14cbcSMatt Macyutility. 102eda14cbcSMatt Macy.Pp 103eda14cbcSMatt MacyThe output of this command in general reflects the on-disk structure of a ZFS 104eda14cbcSMatt Macypool, and is inherently unstable. 105eda14cbcSMatt MacyThe precise output of most invocations is not documented, a knowledge of ZFS 106eda14cbcSMatt Macyinternals is assumed. 107eda14cbcSMatt Macy.Pp 108eda14cbcSMatt MacyIf the 109eda14cbcSMatt Macy.Ar dataset 110eda14cbcSMatt Macyargument does not contain any 111eda14cbcSMatt Macy.Qq Sy / 112eda14cbcSMatt Macyor 113eda14cbcSMatt Macy.Qq Sy @ 114eda14cbcSMatt Macycharacters, it is interpreted as a pool name. 115eda14cbcSMatt MacyThe root dataset can be specified as 11616038816SMartin Matuska.Qq Ar pool Ns / . 117eda14cbcSMatt Macy.Pp 1182a58b312SMartin Matuska.Nm 1192a58b312SMartin Matuskais an 1202a58b312SMartin Matuska.Qq offline 1212a58b312SMartin Matuskatool; it accesses the block devices underneath the pools directly from 1222a58b312SMartin Matuskauserspace and does not care if the pool is imported or datasets are mounted 1232a58b312SMartin Matuska(or even if the system understands ZFS at all). 124eda14cbcSMatt MacyWhen operating on an imported and active pool it is possible, though unlikely, 125eda14cbcSMatt Macythat zdb may interpret inconsistent pool data and behave erratically. 12616038816SMartin Matuska. 127eda14cbcSMatt Macy.Sh OPTIONS 128eda14cbcSMatt MacyDisplay options: 129eda14cbcSMatt Macy.Bl -tag -width Ds 130e92ffd9bSMartin Matuska.It Fl b , -block-stats 131eda14cbcSMatt MacyDisplay statistics regarding the number, size 132eda14cbcSMatt Macy.Pq logical, physical and allocated 133eda14cbcSMatt Macyand deduplication of blocks. 1344e8d558cSMartin Matuska.It Fl B , -backup 1354e8d558cSMartin MatuskaGenerate a backup stream, similar to 1364e8d558cSMartin Matuska.Nm zfs Cm send , 1374e8d558cSMartin Matuskabut for the numeric objset ID, and without opening the dataset. 1384e8d558cSMartin MatuskaThis can be useful in recovery scenarios if dataset metadata has become 1394e8d558cSMartin Matuskacorrupted but the dataset itself is readable. 1404e8d558cSMartin MatuskaThe optional 1414e8d558cSMartin Matuska.Ar flags 1424e8d558cSMartin Matuskaargument is a string of one or more of the letters 1434e8d558cSMartin Matuska.Sy e , 1444e8d558cSMartin Matuska.Sy L , 1454e8d558cSMartin Matuska.Sy c , 1464e8d558cSMartin Matuskaand 1474e8d558cSMartin Matuska.Sy w , 1484e8d558cSMartin Matuskawhich correspond to the same flags in 1494e8d558cSMartin Matuska.Xr zfs-send 8 . 150e92ffd9bSMartin Matuska.It Fl c , -checksum 151eda14cbcSMatt MacyVerify the checksum of all metadata blocks while printing block statistics 152eda14cbcSMatt Macy.Po see 153eda14cbcSMatt Macy.Fl b 154eda14cbcSMatt Macy.Pc . 155eda14cbcSMatt Macy.Pp 156eda14cbcSMatt MacyIf specified multiple times, verify the checksums of all blocks. 157e92ffd9bSMartin Matuska.It Fl C , -config 158eda14cbcSMatt MacyDisplay information about the configuration. 159eda14cbcSMatt MacyIf specified with no other options, instead display information about the cache 160eda14cbcSMatt Macyfile 161eda14cbcSMatt Macy.Pq Pa /etc/zfs/zpool.cache . 162eda14cbcSMatt MacyTo specify the cache file to display, see 163eda14cbcSMatt Macy.Fl U . 164eda14cbcSMatt Macy.Pp 165eda14cbcSMatt MacyIf specified multiple times, and a pool name is also specified display both the 166eda14cbcSMatt Macycached configuration and the on-disk configuration. 167eda14cbcSMatt MacyIf specified multiple times with 168eda14cbcSMatt Macy.Fl e 169eda14cbcSMatt Macyalso display the configuration that would be used were the pool to be imported. 170e92ffd9bSMartin Matuska.It Fl d , -datasets 171eda14cbcSMatt MacyDisplay information about datasets. 172eda14cbcSMatt MacySpecified once, displays basic dataset information: ID, create transaction, 173eda14cbcSMatt Macysize, and object count. 174e92ffd9bSMartin MatuskaSee 175e92ffd9bSMartin Matuska.Fl N 176e92ffd9bSMartin Matuskafor determining if 177c03c5b1cSMartin Matuska.Ar poolname Ns Op / Ns Ar dataset Ns | Ns Ar objset-ID 178e92ffd9bSMartin Matuskais to use the specified 179c03c5b1cSMartin Matuska.Ar dataset Ns | Ns Ar objset-ID 180e92ffd9bSMartin Matuskaas a string (dataset name) or a number (objset ID) when 181e92ffd9bSMartin Matuskadatasets have numeric names. 182eda14cbcSMatt Macy.Pp 183eda14cbcSMatt MacyIf specified multiple times provides greater and greater verbosity. 184eda14cbcSMatt Macy.Pp 185eda14cbcSMatt MacyIf object IDs or object ID ranges are specified, display information about 186eda14cbcSMatt Macythose specific objects or ranges only. 187eda14cbcSMatt Macy.Pp 188eda14cbcSMatt MacyAn object ID range is specified in terms of a colon-separated tuple of 189eda14cbcSMatt Macythe form 19016038816SMartin Matuska.Ao start Ac : Ns Ao end Ac Ns Op : Ns Ao flags Ac . 191eda14cbcSMatt MacyThe fields 192eda14cbcSMatt Macy.Ar start 193eda14cbcSMatt Macyand 194eda14cbcSMatt Macy.Ar end 195eda14cbcSMatt Macyare integer object identifiers that denote the upper and lower bounds 19616038816SMartin Matuskaof the range. 19716038816SMartin MatuskaAn 198eda14cbcSMatt Macy.Ar end 19916038816SMartin Matuskavalue of -1 specifies a range with no upper bound. 20016038816SMartin MatuskaThe 201eda14cbcSMatt Macy.Ar flags 202eda14cbcSMatt Macyfield optionally specifies a set of flags, described below, that control 20316038816SMartin Matuskawhich object types are dumped. 20416038816SMartin MatuskaBy default, all object types are dumped. 20516038816SMartin MatuskaA minus sign 206eda14cbcSMatt Macy.Pq - 207eda14cbcSMatt Macynegates the effect of the flag that follows it and has no effect unless 208eda14cbcSMatt Macypreceded by the 209eda14cbcSMatt Macy.Ar A 21016038816SMartin Matuskaflag. 211bb2d13b6SMartin MatuskaFor example, the range 0:-1:A-d will dump all object types except for 212bb2d13b6SMartin Matuskadirectories. 213eda14cbcSMatt Macy.Pp 21416038816SMartin Matuska.Bl -tag -compact -width Ds 215eda14cbcSMatt Macy.It Sy A 216eda14cbcSMatt MacyDump all objects (this is the default) 217eda14cbcSMatt Macy.It Sy d 218eda14cbcSMatt MacyDump ZFS directory objects 219eda14cbcSMatt Macy.It Sy f 220eda14cbcSMatt MacyDump ZFS plain file objects 221eda14cbcSMatt Macy.It Sy m 222eda14cbcSMatt MacyDump SPA space map objects 223eda14cbcSMatt Macy.It Sy z 224eda14cbcSMatt MacyDump ZAP objects 225eda14cbcSMatt Macy.It Sy - 226eda14cbcSMatt MacyNegate the effect of next flag 227eda14cbcSMatt Macy.El 228e92ffd9bSMartin Matuska.It Fl D , -dedup-stats 229eda14cbcSMatt MacyDisplay deduplication statistics, including the deduplication ratio 230eda14cbcSMatt Macy.Pq Sy dedup , 231eda14cbcSMatt Macycompression ratio 232eda14cbcSMatt Macy.Pq Sy compress , 233eda14cbcSMatt Macyinflation due to the zfs copies property 234eda14cbcSMatt Macy.Pq Sy copies , 235eda14cbcSMatt Macyand an overall effective ratio 236c03c5b1cSMartin Matuska.Pq Sy dedup No \(mu Sy compress No / Sy copies . 237eda14cbcSMatt Macy.It Fl DD 238eda14cbcSMatt MacyDisplay a histogram of deduplication statistics, showing the allocated 239eda14cbcSMatt Macy.Pq physically present on disk 240eda14cbcSMatt Macyand referenced 241eda14cbcSMatt Macy.Pq logically referenced in the pool 242eda14cbcSMatt Macyblock counts and sizes by reference count. 243eda14cbcSMatt Macy.It Fl DDD 244eda14cbcSMatt MacyDisplay the statistics independently for each deduplication table. 245eda14cbcSMatt Macy.It Fl DDDD 246eda14cbcSMatt MacyDump the contents of the deduplication tables describing duplicate blocks. 247eda14cbcSMatt Macy.It Fl DDDDD 248eda14cbcSMatt MacyAlso dump the contents of the deduplication tables describing unique blocks. 249e92ffd9bSMartin Matuska.It Fl E , -embedded-block-pointer Ns = Ns Ar word0 : Ns Ar word1 Ns :…: Ns Ar word15 250eda14cbcSMatt MacyDecode and display block from an embedded block pointer specified by the 251eda14cbcSMatt Macy.Ar word 252eda14cbcSMatt Macyarguments. 253e92ffd9bSMartin Matuska.It Fl h , -history 254eda14cbcSMatt MacyDisplay pool history similar to 255eda14cbcSMatt Macy.Nm zpool Cm history , 256eda14cbcSMatt Macybut include internal changes, transaction, and dataset information. 257e92ffd9bSMartin Matuska.It Fl i , -intent-logs 258eda14cbcSMatt MacyDisplay information about intent log 259eda14cbcSMatt Macy.Pq ZIL 260eda14cbcSMatt Macyentries relating to each dataset. 261eda14cbcSMatt MacyIf specified multiple times, display counts of each intent log transaction type. 262e92ffd9bSMartin Matuska.It Fl k , -checkpointed-state 263eda14cbcSMatt MacyExamine the checkpointed state of the pool. 264eda14cbcSMatt MacyNote, the on disk format of the pool is not reverted to the checkpointed state. 265e92ffd9bSMartin Matuska.It Fl l , -label Ns = Ns Ar device 266eda14cbcSMatt MacyRead the vdev labels and L2ARC header from the specified device. 267eda14cbcSMatt Macy.Nm Fl l 268eda14cbcSMatt Macywill return 0 if valid label was found, 1 if error occurred, and 2 if no valid 26916038816SMartin Matuskalabels were found. 27016038816SMartin MatuskaThe presence of L2ARC header is indicated by a specific 27116038816SMartin Matuskasequence (L2ARC_DEV_HDR_MAGIC). 27216038816SMartin MatuskaIf there is an accounting error in the size or the number of L2ARC log blocks 273eda14cbcSMatt Macy.Nm Fl l 27416038816SMartin Matuskawill return 1. 27516038816SMartin MatuskaEach unique configuration is displayed only once. 276eda14cbcSMatt Macy.It Fl ll Ar device 27716038816SMartin MatuskaIn addition display label space usage stats. 27816038816SMartin MatuskaIf a valid L2ARC header was found 279eda14cbcSMatt Macyalso display the properties of log blocks used for restoring L2ARC contents 280eda14cbcSMatt Macy(persistent L2ARC). 281eda14cbcSMatt Macy.It Fl lll Ar device 28216038816SMartin MatuskaDisplay every configuration, unique or not. 28316038816SMartin MatuskaIf a valid L2ARC header was found 284eda14cbcSMatt Macyalso display the properties of log entries in log blocks used for restoring 285eda14cbcSMatt MacyL2ARC contents (persistent L2ARC). 286eda14cbcSMatt Macy.Pp 287eda14cbcSMatt MacyIf the 288eda14cbcSMatt Macy.Fl q 289eda14cbcSMatt Macyoption is also specified, don't print the labels or the L2ARC header. 290eda14cbcSMatt Macy.Pp 291eda14cbcSMatt MacyIf the 292eda14cbcSMatt Macy.Fl u 29316038816SMartin Matuskaoption is also specified, also display the uberblocks on this device. 29416038816SMartin MatuskaSpecify multiple times to increase verbosity. 295e92ffd9bSMartin Matuska.It Fl L , -disable-leak-tracking 296eda14cbcSMatt MacyDisable leak detection and the loading of space maps. 297eda14cbcSMatt MacyBy default, 298eda14cbcSMatt Macy.Nm 299eda14cbcSMatt Macyverifies that all non-free blocks are referenced, which can be very expensive. 300e92ffd9bSMartin Matuska.It Fl m , -metaslabs 301eda14cbcSMatt MacyDisplay the offset, spacemap, free space of each metaslab, all the log 302eda14cbcSMatt Macyspacemaps and their obsolete entry statistics. 303eda14cbcSMatt Macy.It Fl mm 304eda14cbcSMatt MacyAlso display information about the on-disk free space histogram associated with 305eda14cbcSMatt Macyeach metaslab. 306eda14cbcSMatt Macy.It Fl mmm 307eda14cbcSMatt MacyDisplay the maximum contiguous free space, the in-core free space histogram, and 308eda14cbcSMatt Macythe percentage of free space in each space map. 309eda14cbcSMatt Macy.It Fl mmmm 310eda14cbcSMatt MacyDisplay every spacemap record. 311e92ffd9bSMartin Matuska.It Fl M , -metaslab-groups 312bb2d13b6SMartin MatuskaDisplay all "normal" vdev metaslab group information - per-vdev metaslab count, 313bb2d13b6SMartin Matuskafragmentation, 314681ce946SMartin Matuskaand free space histogram, as well as overall pool fragmentation and histogram. 315eda14cbcSMatt Macy.It Fl MM 316681ce946SMartin Matuska"Special" vdevs are added to -M's normal output. 317e92ffd9bSMartin Matuska.It Fl O , -object-lookups Ns = Ns Ar dataset path 318e92ffd9bSMartin MatuskaAlso display information about the maximum contiguous free space and the 319e92ffd9bSMartin Matuskapercentage of free space in each space map. 320e92ffd9bSMartin Matuska.It Fl MMM 321e92ffd9bSMartin MatuskaDisplay every spacemap record. 322e92ffd9bSMartin Matuska.It Fl N 323e92ffd9bSMartin MatuskaSame as 324e92ffd9bSMartin Matuska.Fl d 325e92ffd9bSMartin Matuskabut force zdb to interpret the 326c03c5b1cSMartin Matuska.Op Ar dataset Ns | Ns Ar objset-ID 327e92ffd9bSMartin Matuskain 328c03c5b1cSMartin Matuska.Op Ar poolname Ns Op / Ns Ar dataset Ns | Ns Ar objset-ID 329e92ffd9bSMartin Matuskaas a numeric objset ID. 330eda14cbcSMatt Macy.It Fl O Ar dataset path 331eda14cbcSMatt MacyLook up the specified 332eda14cbcSMatt Macy.Ar path 333eda14cbcSMatt Macyinside of the 334eda14cbcSMatt Macy.Ar dataset 335eda14cbcSMatt Macyand display its metadata and indirect blocks. 336eda14cbcSMatt MacySpecified 337eda14cbcSMatt Macy.Ar path 338eda14cbcSMatt Macymust be relative to the root of 339eda14cbcSMatt Macy.Ar dataset . 340eda14cbcSMatt MacyThis option can be combined with 341eda14cbcSMatt Macy.Fl v 342eda14cbcSMatt Macyfor increasing verbosity. 343e92ffd9bSMartin Matuska.It Fl r , -copy-object Ns = Ns Ar dataset path destination 344184c1b94SMartin MatuskaCopy the specified 345184c1b94SMartin Matuska.Ar path 346184c1b94SMartin Matuskainside of the 347184c1b94SMartin Matuska.Ar dataset 348184c1b94SMartin Matuskato the specified destination. 349184c1b94SMartin MatuskaSpecified 350184c1b94SMartin Matuska.Ar path 351184c1b94SMartin Matuskamust be relative to the root of 352184c1b94SMartin Matuska.Ar dataset . 353184c1b94SMartin MatuskaThis option can be combined with 354184c1b94SMartin Matuska.Fl v 355184c1b94SMartin Matuskafor increasing verbosity. 356eda14cbcSMatt Macy.It Xo 357e92ffd9bSMartin Matuska.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 358eda14cbcSMatt Macy.Xc 359eda14cbcSMatt MacyRead and display a block from the specified device. 360eda14cbcSMatt MacyBy default the block is displayed as a hex dump, but see the description of the 361eda14cbcSMatt Macy.Sy r 362eda14cbcSMatt Macyflag, below. 363eda14cbcSMatt Macy.Pp 364eda14cbcSMatt MacyThe block is specified in terms of a colon-separated tuple 365eda14cbcSMatt Macy.Ar vdev 366eda14cbcSMatt Macy.Pq an integer vdev identifier 367eda14cbcSMatt Macy.Ar offset 368eda14cbcSMatt Macy.Pq the offset within the vdev 369eda14cbcSMatt Macy.Ar size 370eda14cbcSMatt Macy.Pq the physical size, or logical size / physical size 371eda14cbcSMatt Macyof the block to read and, optionally, 372eda14cbcSMatt Macy.Ar flags 373eda14cbcSMatt Macy.Pq a set of flags, described below . 374eda14cbcSMatt Macy.Pp 375eda14cbcSMatt Macy.Bl -tag -compact -width "b offset" 376eda14cbcSMatt Macy.It Sy b Ar offset 377eda14cbcSMatt MacyPrint block pointer at hex offset 378eda14cbcSMatt Macy.It Sy c 379eda14cbcSMatt MacyCalculate and display checksums 380eda14cbcSMatt Macy.It Sy d 38116038816SMartin MatuskaDecompress the block. 38216038816SMartin MatuskaSet environment variable 383eda14cbcSMatt Macy.Nm ZDB_NO_ZLE 384eda14cbcSMatt Macyto skip zle when guessing. 385eda14cbcSMatt Macy.It Sy e 386eda14cbcSMatt MacyByte swap the block 387eda14cbcSMatt Macy.It Sy g 388eda14cbcSMatt MacyDump gang block header 389eda14cbcSMatt Macy.It Sy i 390eda14cbcSMatt MacyDump indirect block 391eda14cbcSMatt Macy.It Sy r 392eda14cbcSMatt MacyDump raw uninterpreted block data 393eda14cbcSMatt Macy.It Sy v 394eda14cbcSMatt MacyVerbose output for guessing compression algorithm 395eda14cbcSMatt Macy.El 396e92ffd9bSMartin Matuska.It Fl s , -io-stats 397eda14cbcSMatt MacyReport statistics on 398eda14cbcSMatt Macy.Nm zdb 399eda14cbcSMatt MacyI/O. 400eda14cbcSMatt MacyDisplay operation counts, bandwidth, and error counts of I/O to the pool from 401eda14cbcSMatt Macy.Nm . 402e92ffd9bSMartin Matuska.It Fl S , -simulate-dedup 403eda14cbcSMatt MacySimulate the effects of deduplication, constructing a DDT and then display 404eda14cbcSMatt Macythat DDT as with 405eda14cbcSMatt Macy.Fl DD . 406e92ffd9bSMartin Matuska.It Fl u , -uberblock 407eda14cbcSMatt MacyDisplay the current uberblock. 408eda14cbcSMatt Macy.El 409eda14cbcSMatt Macy.Pp 410eda14cbcSMatt MacyOther options: 411eda14cbcSMatt Macy.Bl -tag -width Ds 412e92ffd9bSMartin Matuska.It Fl A , -ignore-assertions 413eda14cbcSMatt MacyDo not abort should any assertion fail. 414eda14cbcSMatt Macy.It Fl AA 415eda14cbcSMatt MacyEnable panic recovery, certain errors which would otherwise be fatal are 416eda14cbcSMatt Macydemoted to warnings. 417eda14cbcSMatt Macy.It Fl AAA 418eda14cbcSMatt MacyDo not abort if asserts fail and also enable panic recovery. 419e92ffd9bSMartin Matuska.It Fl e , -exported Ns = Ns Oo Fl p Ar path Oc Ns … 420eda14cbcSMatt MacyOperate on an exported pool, not present in 421eda14cbcSMatt Macy.Pa /etc/zfs/zpool.cache . 422eda14cbcSMatt MacyThe 423eda14cbcSMatt Macy.Fl p 424eda14cbcSMatt Macyflag specifies the path under which devices are to be searched. 425e92ffd9bSMartin Matuska.It Fl x , -dump-blocks Ns = Ns Ar dumpdir 426eda14cbcSMatt MacyAll blocks accessed will be copied to files in the specified directory. 427eda14cbcSMatt MacyThe blocks will be placed in sparse files whose name is the same as 428eda14cbcSMatt Macythat of the file or device read. 429eda14cbcSMatt Macy.Nm 430eda14cbcSMatt Macycan be then run on the generated files. 431eda14cbcSMatt MacyNote that the 432eda14cbcSMatt Macy.Fl bbc 433eda14cbcSMatt Macyflags are sufficient to access 434eda14cbcSMatt Macy.Pq and thus copy 435eda14cbcSMatt Macyall metadata on the pool. 436e92ffd9bSMartin Matuska.It Fl F , -automatic-rewind 437eda14cbcSMatt MacyAttempt to make an unreadable pool readable by trying progressively older 438eda14cbcSMatt Macytransactions. 439e92ffd9bSMartin Matuska.It Fl G , -dump-debug-msg 440eda14cbcSMatt MacyDump the contents of the zfs_dbgmsg buffer before exiting 441eda14cbcSMatt Macy.Nm . 442eda14cbcSMatt Macyzfs_dbgmsg is a buffer used by ZFS to dump advanced debug information. 443c03c5b1cSMartin Matuska.It Fl I , -inflight Ns = Ns Ar inflight-I/O-ops 444c03c5b1cSMartin MatuskaLimit the number of outstanding checksum I/O operations to the specified value. 445eda14cbcSMatt MacyThe default value is 200. 446eda14cbcSMatt MacyThis option affects the performance of the 447eda14cbcSMatt Macy.Fl c 448eda14cbcSMatt Macyoption. 4492a58b312SMartin Matuska.It Fl K , -key Ns = Ns Ar key 4502a58b312SMartin MatuskaDecryption key needed to access an encrypted dataset. 4512a58b312SMartin MatuskaThis will cause 4522a58b312SMartin Matuska.Nm 4532a58b312SMartin Matuskato attempt to unlock the dataset using the encryption root, key format and other 4542a58b312SMartin Matuskaencryption parameters on the given dataset. 4552a58b312SMartin Matuska.Nm 4562a58b312SMartin Matuskacan still inspect pool and dataset structures on encrypted datasets without 4572a58b312SMartin Matuskaunlocking them, but will not be able to access file names and attributes and 4582a58b312SMartin Matuskaobject contents. \fBWARNING:\fP The raw decryption key and any decrypted data 4592a58b312SMartin Matuskawill be in user memory while 4602a58b312SMartin Matuska.Nm 4612a58b312SMartin Matuskais running. 4622a58b312SMartin MatuskaOther user programs may be able to extract it by inspecting 4632a58b312SMartin Matuska.Nm 4642a58b312SMartin Matuskaas it runs. 4652a58b312SMartin MatuskaExercise extreme caution when using this option in shared or uncontrolled 4662a58b312SMartin Matuskaenvironments. 467c03c5b1cSMartin Matuska.It Fl o , -option Ns = Ns Ar var Ns = Ns Ar value Ns … 468eda14cbcSMatt MacySet the given global libzpool variable to the provided value. 469eda14cbcSMatt MacyThe value must be an unsigned 32-bit integer. 470eda14cbcSMatt MacyCurrently only little-endian systems are supported to avoid accidentally setting 471eda14cbcSMatt Macythe high 32 bits of 64-bit variables. 472e92ffd9bSMartin Matuska.It Fl P , -parseable 47316038816SMartin MatuskaPrint numbers in an unscaled form more amenable to parsing, e.g.\& 47416038816SMartin Matuska.Sy 1000000 47516038816SMartin Matuskarather than 47616038816SMartin Matuska.Sy 1M . 477e92ffd9bSMartin Matuska.It Fl t , -txg Ns = Ns Ar transaction 478eda14cbcSMatt MacySpecify the highest transaction to use when searching for uberblocks. 479eda14cbcSMatt MacySee also the 480eda14cbcSMatt Macy.Fl u 481eda14cbcSMatt Macyand 482eda14cbcSMatt Macy.Fl l 483eda14cbcSMatt Macyoptions for a means to see the available uberblocks and their associated 484eda14cbcSMatt Macytransaction numbers. 485e92ffd9bSMartin Matuska.It Fl U , -cachefile Ns = Ns Ar cachefile 486eda14cbcSMatt MacyUse a cache file other than 487eda14cbcSMatt Macy.Pa /etc/zfs/zpool.cache . 488e92ffd9bSMartin Matuska.It Fl v , -verbose 489eda14cbcSMatt MacyEnable verbosity. 490eda14cbcSMatt MacySpecify multiple times for increased verbosity. 491e92ffd9bSMartin Matuska.It Fl V , -verbatim 492eda14cbcSMatt MacyAttempt verbatim import. 493eda14cbcSMatt MacyThis mimics the behavior of the kernel when loading a pool from a cachefile. 494eda14cbcSMatt MacyOnly usable with 495eda14cbcSMatt Macy.Fl e . 496e92ffd9bSMartin Matuska.It Fl X , -extreme-rewind 497eda14cbcSMatt MacyAttempt 498eda14cbcSMatt Macy.Qq extreme 499eda14cbcSMatt Macytransaction rewind, that is attempt the same recovery as 500eda14cbcSMatt Macy.Fl F 501eda14cbcSMatt Macybut read transactions otherwise deemed too old. 502e92ffd9bSMartin Matuska.It Fl Y , -all-reconstruction 503eda14cbcSMatt MacyAttempt all possible combinations when reconstructing indirect split blocks. 504eda14cbcSMatt MacyThis flag disables the individual I/O deadman timer in order to allow as 505eda14cbcSMatt Macymuch time as required for the attempted reconstruction. 506e92ffd9bSMartin Matuska.It Fl y , -livelist 507eda14cbcSMatt MacyPerform validation for livelists that are being deleted. 508eda14cbcSMatt MacyScans through the livelist and metaslabs, checking for duplicate entries 509eda14cbcSMatt Macyand compares the two, checking for potential double frees. 510eda14cbcSMatt MacyIf it encounters issues, warnings will be printed, but the command will not 511eda14cbcSMatt Macynecessarily fail. 512eda14cbcSMatt Macy.El 513eda14cbcSMatt Macy.Pp 514eda14cbcSMatt MacySpecifying a display option more than once enables verbosity for only that 515eda14cbcSMatt Macyoption, with more occurrences enabling more verbosity. 516eda14cbcSMatt Macy.Pp 517eda14cbcSMatt MacyIf no options are specified, all information about the named pool will be 518eda14cbcSMatt Macydisplayed at default verbosity. 51916038816SMartin Matuska. 520eda14cbcSMatt Macy.Sh EXAMPLES 521da5137abSMartin Matuska.Ss Example 1 : No Display the configuration of imported pool Ar rpool 522eda14cbcSMatt Macy.Bd -literal 52316038816SMartin Matuska.No # Nm zdb Fl C Ar rpool 524eda14cbcSMatt MacyMOS Configuration: 525eda14cbcSMatt Macy version: 28 526eda14cbcSMatt Macy name: 'rpool' 52716038816SMartin Matuska … 528eda14cbcSMatt Macy.Ed 529da5137abSMartin Matuska. 530da5137abSMartin Matuska.Ss Example 2 : No Display basic dataset information about Ar rpool 531eda14cbcSMatt Macy.Bd -literal 53216038816SMartin Matuska.No # Nm zdb Fl d Ar rpool 533eda14cbcSMatt MacyDataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects 534eda14cbcSMatt MacyDataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects 53516038816SMartin Matuska … 536eda14cbcSMatt Macy.Ed 537da5137abSMartin Matuska. 538da5137abSMartin Matuska.Ss Example 3 : No Display basic information about object 0 in Ar rpool/export/home 539eda14cbcSMatt Macy.Bd -literal 54016038816SMartin Matuska.No # Nm zdb Fl d Ar rpool/export/home 0 541eda14cbcSMatt MacyDataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects 542eda14cbcSMatt Macy 543eda14cbcSMatt Macy Object lvl iblk dblk dsize lsize %full type 544eda14cbcSMatt Macy 0 7 16K 16K 15.0K 16K 25.00 DMU dnode 545eda14cbcSMatt Macy.Ed 546da5137abSMartin Matuska. 547da5137abSMartin Matuska.Ss Example 4 : No Display the predicted effect of enabling deduplication on Ar rpool 548eda14cbcSMatt Macy.Bd -literal 54916038816SMartin Matuska.No # Nm zdb Fl S Ar rpool 550eda14cbcSMatt MacySimulated DDT histogram: 551eda14cbcSMatt Macy 552eda14cbcSMatt Macybucket allocated referenced 553eda14cbcSMatt Macy______ ______________________________ ______________________________ 554eda14cbcSMatt Macyrefcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE 555eda14cbcSMatt Macy------ ------ ----- ----- ----- ------ ----- ----- ----- 556eda14cbcSMatt Macy 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G 557eda14cbcSMatt Macy 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G 55816038816SMartin Matuska … 559eda14cbcSMatt Macydedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00 560eda14cbcSMatt Macy.Ed 56116038816SMartin Matuska. 562eda14cbcSMatt Macy.Sh SEE ALSO 563eda14cbcSMatt Macy.Xr zfs 8 , 564eda14cbcSMatt Macy.Xr zpool 8 565