mirror_zfs/tests/zfs-tests/tests/functional
Brian Behlendorf ad8b9f940c
Scrub mirror children without BPs
When scrubbing a raidz/draid pool, which contains a replacing or
sparing mirror with multiple online children, only one child will
be read.  This is not normally a serious concern because the DTL
records are used to determine where a good copy of the data is.
As long as the data can be read from one child the mirror vdev
will use it to repair gaps in any of its children.  Furthermore,
even if the data which was read is corrupt the raidz code will
detect this and issue its own repair I/O to correct the damage
in the mirror vdev.

However, in the scenario where the DTL is wrong due to silent
data corruption (say due to overwriting one child) and the scrub
happens to read from a child with good data, then the other damaged
mirror child will not be detected nor repaired.

While this is possible for both raidz and draid vdevs, it's most
pronounced when using draid.  This is because by default the zed
will sequentially rebuild a draid pool to a distributed spare,
and the distributed spare half of the mirror is always preferred
since it delivers better performance.  This means the damaged
half of the mirror will go undetected even after scrubbing.

For system administrations this behavior is non-intuitive and in
a worst case scenario could result in the only good copy of the
data being unknowingly detached from the mirror.

This change resolves the issue by reading all replacing/sparing
mirror children when scrubbing.  When the BP isn't available for
verification, then compare the data buffers from each child.  They
must all be identical, if not there's silent damage and an error
is returned to prompt the top-level vdev to issue a repair I/O to
rewrite the data on all of the mirror children.  Since we can't
tell which child was wrong a checksum error is logged against the
replacing or sparing mirror vdev.

Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13555
2022-06-23 10:36:28 -07:00
..
acl autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
alloc_class autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
append Adding ZTS test for O_APPEND 2022-05-11 08:38:16 -07:00
arc autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
atime autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
bootfs autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
btree autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
cache autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
cachefile autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
casenorm autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
channel_program autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
chattr autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
checksum Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
clean_mirror autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
cli_root Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
cli_user autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
compression autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
cp_files autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
crtime autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
ctime autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
deadman autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
delegate autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
devices autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
dos_attributes autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
events autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
exec autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
fallocate autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
fault autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
features autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
grow autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
history autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
hkdf autoconf: use include directives instead of recursing down tests (mostly) 2022-05-10 10:20:09 -07:00
inheritance autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
inuse autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
io autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
l2arc autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
large_files autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
largest_pool autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
libzfs tests: many_fds: simplify, modernise 2022-05-11 10:33:12 -07:00
limits autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
link_count autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
log_spacemap autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
migration autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
mmap autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
mmp autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
mount autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
mv_files autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
nestedfs autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
no_space autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
nopwrite autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
online_offline autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
pam autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
pool_checkpoint autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
pool_names autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
poolversion autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
privilege autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
procfs autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
projectquota autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
pyzfs autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
quota autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
raidz autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
redacted_send autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
redundancy Scrub mirror children without BPs 2022-06-23 10:36:28 -07:00
refquota autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
refreserv autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
removal autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
rename_dirs autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
replacement autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
reservation autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
rootpool autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
rsend autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
scrub_mirror autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
simd autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
slog autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
snapshot autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
snapused autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
sparse autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
stat autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
suid autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
tmpfile autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
trim autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
truncate autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
upgrade autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
user_namespace Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
userquota autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
vdev_zaps autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
write_dirs autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
xattr autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
zpool_influxdb autoconf: use include directives instead of recursing down test data 2022-05-10 10:20:19 -07:00
zvol zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00