Print this page
10592 misc. metaslab and vdev related ZoL bug fixes
Portions contributed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Tony Hutter <hutter2@llnl.gov>
Reviewed by: Kody Kantor <kody.kantor@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man1m/zdb.1m.man.txt
+++ new/usr/src/man/man1m/zdb.1m.man.txt
1 1 ZDB(1M) Maintenance Commands ZDB(1M)
2 2
3 3 NAME
4 4 zdb - display zpool debugging and consistency information
5 5
6 6 SYNOPSIS
7 7 zdb [-AbcdDFGhikLMPsvX] [-e [-V] [-p path ...]] [-I inflight I/Os]
8 8 [-o var=value]... [-t txg] [-U cache] [-x dumpdir]
9 9 [poolname [object ...]]
10 10 zdb [-AdiPv] [-e [-V] [-p path ...]] [-U cache] dataset [object ...]
11 11 zdb -C [-A] [-U cache]
12 12 zdb -E [-A] word0:word1:...:word15
13 13 zdb -l [-Aqu] device
14 14 zdb -m [-AFLPX] [-e [-V] [-p path ...]] [-t txg] [-U cache]
15 15 poolname [vdev [metaslab ...]]
16 16 zdb -O dataset path
17 17 zdb -R [-A] [-e [-V] [-p path ...]] [-U cache]
18 18 poolname vdev:offset:size[:flags]
19 19 zdb -S [-AP] [-e [-V] [-p path ...]] [-U cache] poolname
20 20
21 21 DESCRIPTION
22 22 The zdb utility displays information about a ZFS pool useful for
23 23 debugging and performs some amount of consistency checking. It is a not
24 24 a general purpose tool and options (and facilities) may change. This is
25 25 neither a fsck(1M) nor an fsdb(1M) utility.
26 26
27 27 The output of this command in general reflects the on-disk structure of a
28 28 ZFS pool, and is inherently unstable. The precise output of most
29 29 invocations is not documented, a knowledge of ZFS internals is assumed.
30 30
31 31 If the dataset argument does not contain any "/" or "@" characters, it is
32 32 interpreted as a pool name. The root dataset can be specified as pool/
33 33 (pool name followed by a slash).
34 34
35 35 When operating on an imported and active pool it is possible, though
36 36 unlikely, that zdb may interpret inconsistent pool data and behave
37 37 erratically.
38 38
39 39 OPTIONS
40 40 Display options:
41 41
42 42 -b Display statistics regarding the number, size (logical, physical
43 43 and allocated) and deduplication of blocks.
44 44
45 45 -c Verify the checksum of all metadata blocks while printing block
46 46 statistics (see -b).
47 47
48 48 If specified multiple times, verify the checksums of all blocks.
49 49
50 50 -C Display information about the configuration. If specified with
51 51 no other options, instead display information about the cache
52 52 file (/etc/zfs/zpool.cache). To specify the cache file to
53 53 display, see -U.
54 54
55 55 If specified multiple times, and a pool name is also specified
56 56 display both the cached configuration and the on-disk
57 57 configuration. If specified multiple times with -e also display
58 58 the configuration that would be used were the pool to be
59 59 imported.
60 60
61 61 -d Display information about datasets. Specified once, displays
62 62 basic dataset information: ID, create transaction, size, and
63 63 object count.
64 64
65 65 If specified multiple times provides greater and greater
66 66 verbosity.
67 67
68 68 If object IDs are specified, display information about those
69 69 specific objects only.
70 70
71 71 -D Display deduplication statistics, including the deduplication
72 72 ratio (dedup), compression ratio (compress), inflation due to the
73 73 zfs copies property (copies), and an overall effective ratio
74 74 (dedup * compress / copies).
75 75
76 76 -DD Display a histogram of deduplication statistics, showing the
77 77 allocated (physically present on disk) and referenced (logically
78 78 referenced in the pool) block counts and sizes by reference
79 79 count.
80 80
81 81 -DDD Display the statistics independently for each deduplication
82 82 table.
83 83
84 84 -DDDD Dump the contents of the deduplication tables describing
85 85 duplicate blocks.
86 86
87 87 -DDDDD Also dump the contents of the deduplication tables describing
88 88 unique blocks.
89 89
90 90 -E word0:word1:...:word15
91 91 Decode and display block from an embedded block pointer specified
92 92 by the word arguments.
93 93
94 94 -h Display pool history similar to zpool history, but include
95 95 internal changes, transaction, and dataset information.
96 96
97 97 -i Display information about intent log (ZIL) entries relating to
98 98 each dataset. If specified multiple times, display counts of
99 99 each intent log transaction type.
100 100
101 101 -k Examine the checkpointed state of the pool. Note, the on disk
102 102 format of the pool is not reverted to the checkpointed state.
103 103
|
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
104 104 -l device
105 105 Read the vdev labels from the specified device. zdb -l will
106 106 return 0 if valid label was found, 1 if error occurred, and 2 if
107 107 no valid labels were found.
108 108
109 109 If the -q option is also specified, don't print the labels.
110 110
111 111 If the -u option is also specified, also display the uberblocks
112 112 on this device.
113 113
114 - -L Disable leak tracing and the loading of space maps. By default,
115 - zdb verifies that all non-free blocks are referenced, which can
116 - be very expensive.
114 + -L Disable leak detection and the loading of space maps. By
115 + default, zdb verifies that all non-free blocks are referenced,
116 + which can be very expensive.
117 117
118 118 -m Display the offset, spacemap, and free space of each metaslab.
119 119
120 120 -mm Also display information about the on-disk free space histogram
121 121 associated with each metaslab.
122 122
123 123 -mmm Display the maximum contiguous free space, the in-core free space
124 124 histogram, and the percentage of free space in each space map.
125 125
126 126 -mmmm Display every spacemap record.
127 127
128 128 -M Display the offset, spacemap, and free space of each metaslab.
129 129
130 130 -MM Also display information about the maximum contiguous free space
131 131 and the percentage of free space in each space map.
132 132
133 133 -MMM Display every spacemap record.
134 134
135 135 -O dataset path
136 136 Look up the specified path inside of the dataset and display its
137 137 metadata and indirect blocks. Specified path must be relative to
138 138 the root of dataset. This option can be combined with -v for
139 139 increasing verbosity.
140 140
141 141 -R poolname vdev:offset:size[:flags]
142 142 Read and display a block from the specified device. By default
143 143 the block is displayed as a hex dump, but see the description of
144 144 the r flag, below.
145 145
146 146 The block is specified in terms of a colon-separated tuple vdev
147 147 (an integer vdev identifier) offset (the offset within the vdev)
148 148 size (the size of the block to read) and, optionally, flags (a
149 149 set of flags, described below).
150 150
151 151 b offset Print block pointer
152 152 d Decompress the block
153 153 e Byte swap the block
154 154 g Dump gang block header
155 155 i Dump indirect block
156 156 r Dump raw uninterpreted block data
157 157
158 158 -s Report statistics on zdb I/O. Display operation counts,
159 159 bandwidth, and error counts of I/O to the pool from zdb.
160 160
161 161 -S Simulate the effects of deduplication, constructing a DDT and
162 162 then display that DDT as with -DD.
163 163
164 164 -u Display the current uberblock.
165 165
166 166 Other options:
167 167
168 168 -A Do not abort should any assertion fail.
169 169
170 170 -AA Enable panic recovery, certain errors which would otherwise be
171 171 fatal are demoted to warnings.
172 172
173 173 -AAA Do not abort if asserts fail and also enable panic recovery.
174 174
175 175 -e [-p path ...]
176 176 Operate on an exported pool, not present in /etc/zfs/zpool.cache.
177 177 The -p flag specifies the path under which devices are to be
178 178 searched.
179 179
180 180 -x dumpdir
181 181 All blocks accessed will be copied to files in the specified
182 182 directory. The blocks will be placed in sparse files whose name
183 183 is the same as that of the file or device read. zdb can be then
184 184 run on the generated files. Note that the -bbc flags are
185 185 sufficient to access (and thus copy) all metadata on the pool.
186 186
187 187 -F Attempt to make an unreadable pool readable by trying
188 188 progressively older transactions.
189 189
190 190 -G Dump the contents of the zfs_dbgmsg buffer before exiting zdb.
191 191 zfs_dbgmsg is a buffer used by ZFS to dump advanced debug
192 192 information.
193 193
194 194 -I inflight I/Os
195 195 Limit the number of outstanding checksum I/Os to the specified
196 196 value. The default value is 200. This option affects the
197 197 performance of the -c option.
198 198
199 199 -o var=value ...
200 200 Set the given global libzpool variable to the provided value.
201 201 The value must be an unsigned 32-bit integer. Currently only
202 202 little-endian systems are supported to avoid accidentally setting
203 203 the high 32 bits of 64-bit variables.
204 204
205 205 -P Print numbers in an unscaled form more amenable to parsing, eg.
206 206 1000000 rather than 1M.
207 207
208 208 -t transaction
209 209 Specify the highest transaction to use when searching for
210 210 uberblocks. See also the -u and -l options for a means to see
211 211 the available uberblocks and their associated transaction
212 212 numbers.
213 213
214 214 -U cachefile
215 215 Use a cache file other than /etc/zfs/zpool.cache.
216 216
217 217 -v Enable verbosity. Specify multiple times for increased
218 218 verbosity.
219 219
220 220 -V Attempt verbatim import. This mimics the behavior of the kernel
221 221 when loading a pool from a cachefile. Only usable with -e.
222 222
223 223 -X Attempt "extreme" transaction rewind, that is attempt the same
224 224 recovery as -F but read transactions otherwise deemed too old.
225 225
226 226 Specifying a display option more than once enables verbosity for only
227 227 that option, with more occurrences enabling more verbosity.
228 228
229 229 If no options are specified, all information about the named pool will be
230 230 displayed at default verbosity.
231 231
232 232 EXAMPLES
233 233 Example 1 Display the configuration of imported pool rpool
234 234
235 235 # zdb -C rpool
236 236
237 237 MOS Configuration:
238 238 version: 28
239 239 name: 'rpool'
240 240 ...
241 241
242 242 Example 2 Display basic dataset information about rpool
243 243
244 244 # zdb -d rpool
245 245 Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects
246 246 Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects
247 247 ...
248 248
249 249 Example 3 Display basic information about object 0 in rpool/export/home
250 250
251 251 # zdb -d rpool/export/home 0
252 252 Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects
253 253
254 254 Object lvl iblk dblk dsize lsize %full type
255 255 0 7 16K 16K 15.0K 16K 25.00 DMU dnode
256 256
257 257 Example 4 Display the predicted effect of enabling deduplication on rpool
258 258
259 259 # zdb -S rpool
260 260 Simulated DDT histogram:
261 261
262 262 bucket allocated referenced
263 263 ______ ______________________________ ______________________________
264 264 refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE
265 265 ------ ------ ----- ----- ----- ------ ----- ----- -----
266 266 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G
267 267 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G
268 268 ...
269 269 dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00
270 270
271 271 SEE ALSO
272 272 zfs(1M), zpool(1M)
273 273
274 274 illumos April 14, 2017 illumos
|
↓ open down ↓ |
148 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX