Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify dRAID empty sectors #12857

Merged
merged 1 commit into from
Jan 5, 2022
Merged

Commits on Dec 23, 2021

  1. 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.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    1a659cd View commit details
    Browse the repository at this point in the history