Why is Parity 2 Being Read when Rebuilding Parity 1?


Recommended Posts

General question here after reading as much as I could on the whole Parity 1 / Parity 2 functionality. I'm upgrading my server to larger capacities and decided to assign the first larger drive to a new Parity 2 for a stress test and to try it out for future knowledge. Went fine. I've now replaced my Parity 1 drive with its larger capacity drive (via un-assigning the original disc and assigning the new while the array was stopped - no "new config") and initiated the Parity Rebuild.

 

See the image below, but the Parity 2 drive is being read during the Parity 1 rebuild at the same rate as the data drives. Is that expected behavior? I thought the two parities were more or less independent of each other and Parity 1 is just XOR'ed of the data discs. Shouldn't Parity 2 idle along while the data drives are used to rebuild Parity 1? Is this a function of re-assigning drives vs New Config?

 

 

ParityRebuild.PNG

Link to comment

Well that opens some interesting edge cases. Is there a resource which jumps deeper into how unRAID handles rebuilds under dual parity with more detail than just "2 parity = 2 failed drives are recoverable"? The official wiki still just links to limetech's forum posts saying P/Q parity will be implemented and the 6.2 release info is equally skim.

 

- When rebuilding one data drive with dual parity, does unRaid default trust one parity while checking against the second? 

  > If both parities are available and only one drive is being rebuilt, is Parity 1/P used for rebuild by default?

  > If a sync error is detected between the newly rebuilt bit vs the other parity bit what corrective actions are taken or error is thrown? Would the rebuild stop to get user input (disabling one of the parities)?

  > Some people recommend performing a parity check after a drive rebuild to make sure there were errors in the rebuild process. Would the "check" of the second parity essentially be completing this at the same time as the rebuild? This might be a good thing to publish for those being conservative- going to dual parity would decrease the rebuild time and number of full disk reads in half when replacing multiple drives. The second parity could then be swapped back to data as the last step.

 

Link to comment
5 hours ago, deleteme said:

If both parities are available and only one drive is being rebuilt, is Parity 1/P used for rebuild by default?

Yes

 

5 hours ago, deleteme said:

If a sync error is detected between the newly rebuilt bit vs the other parity bit what corrective actions are taken or error is thrown? Would the rebuild stop to get user input (disabling one of the parities)?

A sync error in this case could only be detected on parity2, and if detected it would be corrected (and logged in the history), if there's a read error on parity or any other device parity2 would be used to correct the error(s) and continue the rebuild so there's no corruption.

 

6 hours ago, deleteme said:

Some people recommend performing a parity check after a drive rebuild to make sure there were errors in the rebuild process. Would the "check" of the second parity essentially be completing this at the same time as the rebuild?

The parity check after a rebuild is mostly to confirm that the rebuilt disk can be read back correctly, it's an optional step and IMHO there's not much reason to do it unless you don't trust your hardware, just wait for the next scheduled check, that's what I do, but parity2 being checked during the rebuild can't help for this anyway.

 

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.