Jump to content
MrCrispy

What is the best way to add parity?

5 posts in this topic Last Reply

Recommended Posts

I'm building a new server and need to move lots of data to it. I can think of 2 ways to calculate parity -

 

1. copy all data without parity drive. Then add parity drive and let it calculate parity for all

2. add parity drive, then start copying data to each disk

 

Which of these is better? #1 will calculate parity just once for each sector (combining data from all disks). #2 will redo the calculation each time new disk is added. So I think #1 is better - right? There is no risk of data loss in each case as I will be copying from another set of disks.

Share this post


Link to post

1) is the faster option.     Copying is much faster without parity.    The only downside is that the data is not protected until you have parity in place but you say this is not a consideration in this case.

Share this post


Link to post

Since you are copying and keeping the originals, definitely add the parity drive after all data is loaded.

 

For #2, parity is kept accurate the entire time, so if you add all the drives first and then start filling them with data, parity is updated in realtime. If you add a disk to a parity protected array, the disk is filled with zeroes before you can format it, so no parity recalculation needed. Parity is maintained for the entire capacity of all disks, regardless of the amount of data loaded.

 

The way you phrased it was confusing to me, so I wanted to clarify in case you misunderstood how parity is maintained.

 

Either way, copying with no parity in place will be faster overall.

Share this post


Link to post
1 hour ago, jonathanm said:

Since you are copying and keeping the originals, definitely add the parity drive after all data is loaded.

 

For #2, parity is kept accurate the entire time, so if you add all the drives first and then start filling them with data, parity is updated in realtime. If you add a disk to a parity protected array, the disk is filled with zeroes before you can format it, so no parity recalculation needed. Parity is maintained for the entire capacity of all disks, regardless of the amount of data loaded.

 

The way you phrased it was confusing to me, so I wanted to clarify in case you misunderstood how parity is maintained.

 

Either way, copying with no parity in place will be faster overall.

Thanks, understood. I wanted to ask one more thing. I will be adding disks that I've been using for a while (but not in Unraid) and have tested them. Is it possible to add these without preclear?

Share this post


Link to post
11 minutes ago, MrCrispy said:

Thanks, understood. I wanted to ask one more thing. I will be adding disks that I've been using for a while (but not in Unraid) and have tested them. Is it possible to add these without preclear?

Preclear is never necessary. If parity is not yet established, no clearing is required either. After there is valid parity established, any added disks must be cleared so they don't change parity when they are added.

 

Preclearing is NOT the same procedure as clearing. Preclear is a third party utility that can only be run on disks not yet in the array. Clearing is the built in procedure that unraid performs when adding a disk to a parity protected array.

 

 

Share this post


Link to post

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.