A quick question about parity...


Recommended Posts

Ok, so I have read over all the info I can find. I feel like I have a fairly good grasp on how parity works in unraid. I have also seen that it is recommended by most to do monthly parity checks to help diagnose a bad disk. But no where have I seen how/when parity is actually created after data is added to the array. What I mean is, I added cache and data disks and loaded my array with all the data I had to start with. Then I added a parity disk, and it calculated parity based on what was on the drives at that time. Now, after this is done, I add sonarr and radarr and download media. We'll say that I add 3 files a day to my cache, then then gets moved to the array by mover. Doesn't this completely change what the parity calculation should be for these sectors? And if I have it setup to do monthly parity checks, does that mean everything I added between the last check and the next one is essentially not protected?

 

That sounds completely wrong to me. If that was how unraid worked, I don't think anyone would use it. So, the only thing I can imagine is that it is doing checks and changing the parity disk at the same time as it is writing to the array to keep them all in sync? I have not seen this documented in my reading, but I don't see any other way for it to work.

 

If this is the case, then wouldn't monthly parity checks really be more of a "double check", not really essential but not a bad idea? I get that they can protect you from a disk with a sector that is not being used silently going bad and trashing the disk entirely. But, aside from this unlikely (and rare I imagine) scenario, parity checks are just kind of a safety net?

 

Also, IF this is how parity works (writing to array and parity at the same time), then how does it work with dual parity since the dual parity calculation is completely different? The one must have to wait until the first parity and data disk are in sync, then do a separate check on its own?

 

Sorry if these are simple, dumb questions. I am trying educate myself as much as possible on this, since I have dove in head first. I am one of those people that, for me, it is not good enough that something works. I have to know why it works too. :)

Link to comment

The parity check is just that - it checks that the parity is correct.  It has nothing to do with updating the parity disk when files are added.

 

Parity is calculated whenever a file is added, or if you are using a cache drive, when the file is moved from the cache drive to a disk in the array.

 

I am unsure exactly how dual parity drives work, other than a different type of parity calculation is done for the second disk.  However, I am sure that this parity is also calculated at the time the file is moved into the array.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.