HomeFreeBSD

Verify dRAID empty sectors

Description

Verify dRAID empty sectors

Verify that all empty sectors are zero filled before using them to
calculate parity. Failure to do so can result in incorrect parity
columns being generated and written to disk if the contents of an
empty sector are non-zero. This was possible because the checksum
only protects the data portions of the buffer, not the empty sector
padding.

This issue has been addressed by updating raidz_parity_verify() to
check that all dRAID empty sectors are zero filled. Any sectors
which are non-zero will be fixed, repair IO issued, and a checksum
error logged. They can then be safely used to verify the parity.

This specific type of damage is unlikely to occur since it requires
a disk to have silently returned bad data, for an empty sector, while
performing a scrub. However, if a pool were to have been damaged
in this way, scrubbing the pool with this change applied will repair
both the empty sector and parity columns as long as the data checksum
is valid. Checksum errors will be reported in the zpool status
output for any repairs which are made.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12857

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jan 5 2022, 12:46 AM
GitHub <noreply@github.com>Committed on Jan 5 2022, 12:46 AM
Parents
rG1135d0a5fff4: FreeBSD: fix unpropagated error
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG3c80e0742a8f: Verify dRAID empty sectors (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jan 5 2022, 12:46 AM