SnapRAID doesn’t compute the parity in real time, so there’s this window between making a change to the data and syncing where your data isn’t protected. The docs say

Here’s an example, you acquire a file and save it to disk called ‘BestMovieEver.mkv’. This file sits on disk and is immediately available as usual but until you run the parity sync the file is unprotected. This means if in between your download and a parity sync and you were to experience a drive failure, that file would be unrecoverable.

Which implies that the only data at risk is the data that’s been changed, but that doesn’t line up with my understanding of how parity works.

Say we have three disks that store 1 bit of information and a parity drive: 101 parity 0. If we modify the data in the first disk (data 001 parity 0), then the data is out of sync. Say we now lose disk 2 (data 0?1 parity 0). How does it then recover that data? We’re in an inconsistent state where the remaining data tells us that drive 2 used to hold 0^1^0=1 when it actually held a 0. So doesn’t that mean that between any modifications and a sync operation, all your data in that disk region is now at risk? Does SnapRAID do anything special to handle this?

  • Lemmchen@feddit.org
    link
    fedilink
    arrow-up
    0
    ·
    14 hours ago

    Well, you changed the data of the file before you could write another parity. If you lose a drive before you write the parity, you lose the file (or at least the sectors modified since the last parity creation). Sounds right to me.