]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/openzfs/man/man8/zpool-events.8
contrib/tzdata: import tzdata 2022g
[FreeBSD/FreeBSD.git] / sys / contrib / openzfs / man / man8 / zpool-events.8
1 .\"
2 .\" CDDL HEADER START
3 .\"
4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
7 .\"
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or https://opensource.org/licenses/CDDL-1.0.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
12 .\"
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
18 .\"
19 .\" CDDL HEADER END
20 .\"
21 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
22 .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
23 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
24 .\" Copyright (c) 2017 Datto Inc.
25 .\" Copyright (c) 2018 George Melikov. All Rights Reserved.
26 .\" Copyright 2017 Nexenta Systems, Inc.
27 .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
28 .\"
29 .Dd May 27, 2021
30 .Dt ZPOOL-EVENTS 8
31 .Os
32 .
33 .Sh NAME
34 .Nm zpool-events
35 .Nd list recent events generated by kernel
36 .Sh SYNOPSIS
37 .Nm zpool
38 .Cm events
39 .Op Fl vHf
40 .Op Ar pool
41 .Nm zpool
42 .Cm events
43 .Fl c
44 .
45 .Sh DESCRIPTION
46 Lists all recent events generated by the ZFS kernel modules.
47 These events are consumed by the
48 .Xr zed 8
49 and used to automate administrative tasks such as replacing a failed device
50 with a hot spare.
51 For more information about the subclasses and event payloads
52 that can be generated see
53 .Sx EVENTS
54 and the following sections.
55 .
56 .Sh OPTIONS
57 .Bl -tag -compact -width Ds
58 .It Fl c
59 Clear all previous events.
60 .It Fl f
61 Follow mode.
62 .It Fl H
63 Scripted mode.
64 Do not display headers, and separate fields by a
65 single tab instead of arbitrary space.
66 .It Fl v
67 Print the entire payload for each event.
68 .El
69 .
70 .Sh EVENTS
71 These are the different event subclasses.
72 The full event name would be
73 .Sy ereport.fs.zfs.\& Ns Em SUBCLASS ,
74 but only the last part is listed here.
75 .Pp
76 .Bl -tag -compact -width "vdev.bad_guid_sum"
77 .It Sy checksum
78 Issued when a checksum error has been detected.
79 .It Sy io
80 Issued when there is an I/O error in a vdev in the pool.
81 .It Sy data
82 Issued when there have been data errors in the pool.
83 .It Sy deadman
84 Issued when an I/O request is determined to be "hung", this can be caused
85 by lost completion events due to flaky hardware or drivers.
86 See
87 .Sy zfs_deadman_failmode
88 in
89 .Xr zfs 4
90 for additional information regarding "hung" I/O detection and configuration.
91 .It Sy delay
92 Issued when a completed I/O request exceeds the maximum allowed time
93 specified by the
94 .Sy zio_slow_io_ms
95 module parameter.
96 This can be an indicator of problems with the underlying storage device.
97 The number of delay events is ratelimited by the
98 .Sy zfs_slow_io_events_per_second
99 module parameter.
100 .It Sy config
101 Issued every time a vdev change have been done to the pool.
102 .It Sy zpool
103 Issued when a pool cannot be imported.
104 .It Sy zpool.destroy
105 Issued when a pool is destroyed.
106 .It Sy zpool.export
107 Issued when a pool is exported.
108 .It Sy zpool.import
109 Issued when a pool is imported.
110 .It Sy zpool.reguid
111 Issued when a REGUID (new unique identifier for the pool have been regenerated) have been detected.
112 .It Sy vdev.unknown
113 Issued when the vdev is unknown.
114 Such as trying to clear device errors on a vdev that have failed/been kicked
115 from the system/pool and is no longer available.
116 .It Sy vdev.open_failed
117 Issued when a vdev could not be opened (because it didn't exist for example).
118 .It Sy vdev.corrupt_data
119 Issued when corrupt data have been detected on a vdev.
120 .It Sy vdev.no_replicas
121 Issued when there are no more replicas to sustain the pool.
122 This would lead to the pool being
123 .Em DEGRADED .
124 .It Sy vdev.bad_guid_sum
125 Issued when a missing device in the pool have been detected.
126 .It Sy vdev.too_small
127 Issued when the system (kernel) have removed a device, and ZFS
128 notices that the device isn't there any more.
129 This is usually followed by a
130 .Sy probe_failure
131 event.
132 .It Sy vdev.bad_label
133 Issued when the label is OK but invalid.
134 .It Sy vdev.bad_ashift
135 Issued when the ashift alignment requirement has increased.
136 .It Sy vdev.remove
137 Issued when a vdev is detached from a mirror (or a spare detached from a
138 vdev where it have been used to replace a failed drive - only works if
139 the original drive have been re-added).
140 .It Sy vdev.clear
141 Issued when clearing device errors in a pool.
142 Such as running
143 .Nm zpool Cm clear
144 on a device in the pool.
145 .It Sy vdev.check
146 Issued when a check to see if a given vdev could be opened is started.
147 .It Sy vdev.spare
148 Issued when a spare have kicked in to replace a failed device.
149 .It Sy vdev.autoexpand
150 Issued when a vdev can be automatically expanded.
151 .It Sy io_failure
152 Issued when there is an I/O failure in a vdev in the pool.
153 .It Sy probe_failure
154 Issued when a probe fails on a vdev.
155 This would occur if a vdev
156 have been kicked from the system outside of ZFS (such as the kernel
157 have removed the device).
158 .It Sy log_replay
159 Issued when the intent log cannot be replayed.
160 The can occur in the case of a missing or damaged log device.
161 .It Sy resilver.start
162 Issued when a resilver is started.
163 .It Sy resilver.finish
164 Issued when the running resilver have finished.
165 .It Sy scrub.start
166 Issued when a scrub is started on a pool.
167 .It Sy scrub.finish
168 Issued when a pool has finished scrubbing.
169 .It Sy scrub.abort
170 Issued when a scrub is aborted on a pool.
171 .It Sy scrub.resume
172 Issued when a scrub is resumed on a pool.
173 .It Sy scrub.paused
174 Issued when a scrub is paused on a pool.
175 .It Sy bootfs.vdev.attach
176 .El
177 .
178 .Sh PAYLOADS
179 This is the payload (data, information) that accompanies an
180 event.
181 .Pp
182 For
183 .Xr zed 8 ,
184 these are set to uppercase and prefixed with
185 .Sy ZEVENT_ .
186 .Pp
187 .Bl -tag -compact -width "vdev_cksum_errors"
188 .It Sy pool
189 Pool name.
190 .It Sy pool_failmode
191 Failmode -
192 .Sy wait ,
193 .Sy continue ,
194 or
195 .Sy panic .
196 See the
197 .Sy failmode
198 property in
199 .Xr zpoolprops 7
200 for more information.
201 .It Sy pool_guid
202 The GUID of the pool.
203 .It Sy pool_context
204 The load state for the pool (0=none, 1=open, 2=import, 3=tryimport, 4=recover
205 5=error).
206 .It Sy vdev_guid
207 The GUID of the vdev in question (the vdev failing or operated upon with
208 .Nm zpool Cm clear ,
209 etc.).
210 .It Sy vdev_type
211 Type of vdev -
212 .Sy disk ,
213 .Sy file ,
214 .Sy mirror ,
215 etc.
216 See the
217 .Sy Virtual Devices
218 section of
219 .Xr zpoolconcepts 7
220 for more information on possible values.
221 .It Sy vdev_path
222 Full path of the vdev, including any
223 .Em -partX .
224 .It Sy vdev_devid
225 ID of vdev (if any).
226 .It Sy vdev_fru
227 Physical FRU location.
228 .It Sy vdev_state
229 State of vdev (0=uninitialized, 1=closed, 2=offline, 3=removed, 4=failed to open, 5=faulted, 6=degraded, 7=healthy).
230 .It Sy vdev_ashift
231 The ashift value of the vdev.
232 .It Sy vdev_complete_ts
233 The time the last I/O request completed for the specified vdev.
234 .It Sy vdev_delta_ts
235 The time since the last I/O request completed for the specified vdev.
236 .It Sy vdev_spare_paths
237 List of spares, including full path and any
238 .Em -partX .
239 .It Sy vdev_spare_guids
240 GUID(s) of spares.
241 .It Sy vdev_read_errors
242 How many read errors that have been detected on the vdev.
243 .It Sy vdev_write_errors
244 How many write errors that have been detected on the vdev.
245 .It Sy vdev_cksum_errors
246 How many checksum errors that have been detected on the vdev.
247 .It Sy parent_guid
248 GUID of the vdev parent.
249 .It Sy parent_type
250 Type of parent.
251 See
252 .Sy vdev_type .
253 .It Sy parent_path
254 Path of the vdev parent (if any).
255 .It Sy parent_devid
256 ID of the vdev parent (if any).
257 .It Sy zio_objset
258 The object set number for a given I/O request.
259 .It Sy zio_object
260 The object number for a given I/O request.
261 .It Sy zio_level
262 The indirect level for the block.
263 Level 0 is the lowest level and includes data blocks.
264 Values > 0 indicate metadata blocks at the appropriate level.
265 .It Sy zio_blkid
266 The block ID for a given I/O request.
267 .It Sy zio_err
268 The error number for a failure when handling a given I/O request,
269 compatible with
270 .Xr errno 3
271 with the value of
272 .Sy EBADE
273 used to indicate a ZFS checksum error.
274 .It Sy zio_offset
275 The offset in bytes of where to write the I/O request for the specified vdev.
276 .It Sy zio_size
277 The size in bytes of the I/O request.
278 .It Sy zio_flags
279 The current flags describing how the I/O request should be handled.
280 See the
281 .Sy I/O FLAGS
282 section for the full list of I/O flags.
283 .It Sy zio_stage
284 The current stage of the I/O in the pipeline.
285 See the
286 .Sy I/O STAGES
287 section for a full list of all the I/O stages.
288 .It Sy zio_pipeline
289 The valid pipeline stages for the I/O.
290 See the
291 .Sy I/O STAGES
292 section for a full list of all the I/O stages.
293 .It Sy zio_delay
294 The time elapsed (in nanoseconds) waiting for the block layer to complete the
295 I/O request.
296 Unlike
297 .Sy zio_delta ,
298 this does not include any vdev queuing time and is
299 therefore solely a measure of the block layer performance.
300 .It Sy zio_timestamp
301 The time when a given I/O request was submitted.
302 .It Sy zio_delta
303 The time required to service a given I/O request.
304 .It Sy prev_state
305 The previous state of the vdev.
306 .It Sy cksum_expected
307 The expected checksum value for the block.
308 .It Sy cksum_actual
309 The actual checksum value for an errant block.
310 .It Sy cksum_algorithm
311 Checksum algorithm used.
312 See
313 .Xr zfsprops 7
314 for more information on the available checksum algorithms.
315 .It Sy cksum_byteswap
316 Whether or not the data is byteswapped.
317 .It Sy bad_ranges
318 .No [\& Ns Ar start , end )
319 pairs of corruption offsets.
320 Offsets are always aligned on a 64-bit boundary,
321 and can include some gaps of non-corruption.
322 (See
323 .Sy bad_ranges_min_gap )
324 .It Sy bad_ranges_min_gap
325 In order to bound the size of the
326 .Sy bad_ranges
327 array, gaps of non-corruption
328 less than or equal to
329 .Sy bad_ranges_min_gap
330 bytes have been merged with
331 adjacent corruption.
332 Always at least 8 bytes, since corruption is detected on a 64-bit word basis.
333 .It Sy bad_range_sets
334 This array has one element per range in
335 .Sy bad_ranges .
336 Each element contains
337 the count of bits in that range which were clear in the good data and set
338 in the bad data.
339 .It Sy bad_range_clears
340 This array has one element per range in
341 .Sy bad_ranges .
342 Each element contains
343 the count of bits for that range which were set in the good data and clear in
344 the bad data.
345 .It Sy bad_set_bits
346 If this field exists, it is an array of
347 .Pq Ar bad data No & ~( Ns Ar good data ) ;
348 that is, the bits set in the bad data which are cleared in the good data.
349 Each element corresponds a byte whose offset is in a range in
350 .Sy bad_ranges ,
351 and the array is ordered by offset.
352 Thus, the first element is the first byte in the first
353 .Sy bad_ranges
354 range, and the last element is the last byte in the last
355 .Sy bad_ranges
356 range.
357 .It Sy bad_cleared_bits
358 Like
359 .Sy bad_set_bits ,
360 but contains
361 .Pq Ar good data No & ~( Ns Ar bad data ) ;
362 that is, the bits set in the good data which are cleared in the bad data.
363 .It Sy bad_set_histogram
364 If this field exists, it is an array of counters.
365 Each entry counts bits set in a particular bit of a big-endian uint64 type.
366 The first entry counts bits
367 set in the high-order bit of the first byte, the 9th byte, etc, and the last
368 entry counts bits set of the low-order bit of the 8th byte, the 16th byte, etc.
369 This information is useful for observing a stuck bit in a parallel data path,
370 such as IDE or parallel SCSI.
371 .It Sy bad_cleared_histogram
372 If this field exists, it is an array of counters.
373 Each entry counts bit clears in a particular bit of a big-endian uint64 type.
374 The first entry counts bits
375 clears of the high-order bit of the first byte, the 9th byte, etc, and the
376 last entry counts clears of the low-order bit of the 8th byte, the 16th byte, etc.
377 This information is useful for observing a stuck bit in a parallel data
378 path, such as IDE or parallel SCSI.
379 .El
380 .
381 .Sh I/O STAGES
382 The ZFS I/O pipeline is comprised of various stages which are defined below.
383 The individual stages are used to construct these basic I/O
384 operations: Read, Write, Free, Claim, and Ioctl.
385 These stages may be
386 set on an event to describe the life cycle of a given I/O request.
387 .Pp
388 .TS
389 tab(:);
390 l l l .
391 Stage:Bit Mask:Operations
392 _:_:_
393 ZIO_STAGE_OPEN:0x00000001:RWFCI
394
395 ZIO_STAGE_READ_BP_INIT:0x00000002:R----
396 ZIO_STAGE_WRITE_BP_INIT:0x00000004:-W---
397 ZIO_STAGE_FREE_BP_INIT:0x00000008:--F--
398 ZIO_STAGE_ISSUE_ASYNC:0x00000010:RWF--
399 ZIO_STAGE_WRITE_COMPRESS:0x00000020:-W---
400
401 ZIO_STAGE_ENCRYPT:0x00000040:-W---
402 ZIO_STAGE_CHECKSUM_GENERATE:0x00000080:-W---
403
404 ZIO_STAGE_NOP_WRITE:0x00000100:-W---
405
406 ZIO_STAGE_DDT_READ_START:0x00000200:R----
407 ZIO_STAGE_DDT_READ_DONE:0x00000400:R----
408 ZIO_STAGE_DDT_WRITE:0x00000800:-W---
409 ZIO_STAGE_DDT_FREE:0x00001000:--F--
410
411 ZIO_STAGE_GANG_ASSEMBLE:0x00002000:RWFC-
412 ZIO_STAGE_GANG_ISSUE:0x00004000:RWFC-
413
414 ZIO_STAGE_DVA_THROTTLE:0x00008000:-W---
415 ZIO_STAGE_DVA_ALLOCATE:0x00010000:-W---
416 ZIO_STAGE_DVA_FREE:0x00020000:--F--
417 ZIO_STAGE_DVA_CLAIM:0x00040000:---C-
418
419 ZIO_STAGE_READY:0x00080000:RWFCI
420
421 ZIO_STAGE_VDEV_IO_START:0x00100000:RW--I
422 ZIO_STAGE_VDEV_IO_DONE:0x00200000:RW--I
423 ZIO_STAGE_VDEV_IO_ASSESS:0x00400000:RW--I
424
425 ZIO_STAGE_CHECKSUM_VERIFY:0x00800000:R----
426
427 ZIO_STAGE_DONE:0x01000000:RWFCI
428 .TE
429 .
430 .Sh I/O FLAGS
431 Every I/O request in the pipeline contains a set of flags which describe its
432 function and are used to govern its behavior.
433 These flags will be set in an event as a
434 .Sy zio_flags
435 payload entry.
436 .Pp
437 .TS
438 tab(:);
439 l l .
440 Flag:Bit Mask
441 _:_
442 ZIO_FLAG_DONT_AGGREGATE:0x00000001
443 ZIO_FLAG_IO_REPAIR:0x00000002
444 ZIO_FLAG_SELF_HEAL:0x00000004
445 ZIO_FLAG_RESILVER:0x00000008
446 ZIO_FLAG_SCRUB:0x00000010
447 ZIO_FLAG_SCAN_THREAD:0x00000020
448 ZIO_FLAG_PHYSICAL:0x00000040
449
450 ZIO_FLAG_CANFAIL:0x00000080
451 ZIO_FLAG_SPECULATIVE:0x00000100
452 ZIO_FLAG_CONFIG_WRITER:0x00000200
453 ZIO_FLAG_DONT_RETRY:0x00000400
454 ZIO_FLAG_DONT_CACHE:0x00000800
455 ZIO_FLAG_NODATA:0x00001000
456 ZIO_FLAG_INDUCE_DAMAGE:0x00002000
457
458 ZIO_FLAG_IO_ALLOCATING:0x00004000
459 ZIO_FLAG_IO_RETRY:0x00008000
460 ZIO_FLAG_PROBE:0x00010000
461 ZIO_FLAG_TRYHARD:0x00020000
462 ZIO_FLAG_OPTIONAL:0x00040000
463
464 ZIO_FLAG_DONT_QUEUE:0x00080000
465 ZIO_FLAG_DONT_PROPAGATE:0x00100000
466 ZIO_FLAG_IO_BYPASS:0x00200000
467 ZIO_FLAG_IO_REWRITE:0x00400000
468 ZIO_FLAG_RAW_COMPRESS:0x00800000
469 ZIO_FLAG_RAW_ENCRYPT:0x01000000
470
471 ZIO_FLAG_GANG_CHILD:0x02000000
472 ZIO_FLAG_DDT_CHILD:0x04000000
473 ZIO_FLAG_GODFATHER:0x08000000
474 ZIO_FLAG_NOPWRITE:0x10000000
475 ZIO_FLAG_REEXECUTED:0x20000000
476 ZIO_FLAG_DELEGATED:0x40000000
477 ZIO_FLAG_FASTWRITE:0x80000000
478 .TE
479 .
480 .Sh SEE ALSO
481 .Xr zfs 4 ,
482 .Xr zed 8 ,
483 .Xr zpool-wait 8