diff options
author | George Amanakis <[email protected]> | 2022-04-26 02:25:42 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-04-25 17:25:42 -0700 |
commit | 0409d3327371cef8a8c5886cb7530ded6f5f1091 (patch) | |
tree | b73cbc15898fe8df7126557ced5522e165200cd3 /man/man7/zpool-features.7 | |
parent | 95146fd7baba8f70baea35b9b6bfac277431b940 (diff) |
Improve zpool status output, list all affected datasets
Currently, determining which datasets are affected by corruption is
a manual process.
The primary difficulty in reporting the list of affected snapshots is
that since the error was initially found, the snapshot where the error
originally occurred in, may have been deleted. To solve this issue, we
add the ID of the head dataset of the original snapshot which the error
was detected in, to the stored error report. Then any time a filesystem
is deleted, the errors associated with it are deleted as well. Any time
a clone promote occurs, we modify reports associated with the original
head to refer to the new head. The stored error reports are identified
by this head ID, the birth time of the block which the error occurred
in, as well as some information about the error itself are also stored.
Once this information is stored, we can find the set of datasets
affected by an error by walking back the list of snapshots in the given
head until we find one with the appropriate birth txg, and then traverse
through the snapshots of the clone family, terminating a branch if the
block was replaced in a given snapshot. Then we report this information
back to libzfs, and to the zpool status command, where it is displayed
as follows:
pool: test
state: ONLINE
status: One or more devices has experienced an error resulting in data
corruption. Applications may be affected.
action: Restore the file in question if possible. Otherwise restore the
entire pool from backup.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
scan: scrub repaired 0B in 00:00:00 with 800 errors on Fri Dec 3
08:27:57 2021
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
sdb ONLINE 0 0 1.58K
errors: Permanent errors have been detected in the following files:
test@1:/test.0.0
/test/test.0.0
/test/1clone/test.0.0
A new feature flag is introduced to mark the presence of this change, as
well as promotion and backwards compatibility logic. This is an updated
version of #9175. Rebase required fixing the tests, updating the ABI of
libzfs, updating the man pages, fixing bugs, fixing the error returns,
and updating the old on-disk error logs to the new format when
activating the feature.
Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Mark Maybee <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Co-authored-by: TulsiJain <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes #9175
Closes #12812
Diffstat (limited to 'man/man7/zpool-features.7')
-rw-r--r-- | man/man7/zpool-features.7 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/man/man7/zpool-features.7 b/man/man7/zpool-features.7 index 9a202ca8a..705bd5433 100644 --- a/man/man7/zpool-features.7 +++ b/man/man7/zpool-features.7 @@ -507,6 +507,17 @@ once either of the limit properties has been set on a dataset and will never return to being .Sy enabled . . +.feature com.delphix head_errlog no +This feature enables the upgraded version of errlog, which required an on-disk +error log format change. +Now the error log of each head dataset is stored separately in the zap object +and keyed by the head id. +With this feature enabled, every dataset affected by an error block is listed +in the output of +.Nm zpool Cm status . +.Pp +\*[instant-never] +. .feature com.delphix hole_birth no enabled_txg This feature has/had bugs, the result of which is that, if you do a .Nm zfs Cm send Fl i |