Swap Parity and Data drives


EvylRat

Recommended Posts

My parity disk according to diskspeed is the slowest (a WD Red) drive by far.

I have a newer Seagate Ironwolf in the array which is fastest, and 2 Seagate NAS drives (still quicker than the WD Red).

All drives are 3TB.

What is the safest way to swap the parity and data drives?  I have another WD Red to add to the array in the near future once I complete my JBOD case.

I believe I can pull the parity, and move data, then re-add the parity, but I'd rather the array stay protected.

Link to comment

Drive 1 - Parity -> Data

Drive 2 - Data -> Parity

Drive 3 - New Data

 

Add drive D3

unbalance drive D2 onto D3

set D2 as 2nd parity

Remove parity D1

add D1 back into array?

 

Just found info from nxtiak
"You have 2 parity drives. parity is valid and array is protected. Remove 1 parity drive and making it a data drive, while it's formatting, array is unprotected because you're missing 1 parity. When that new data drive is formatted and ready to go, array is still unprotected because system detects you're missing the 2nd parity drive. That's why you need to go to Tools and click New Config, it'll tell the system "this setup is valid, go make a new parity on the single parity drive". As its creating the new parity, your array is unprotected."

 

So whether I add a 2nd parity, or just remove the 1st parity, whilst reconfiguring it's unprotected?

Edited by EvylRat
Link to comment
  • 1 month later...

Hope the OP doesn't mind me hijacking this thread. But I have basically the same question/situation.

I have a data drive I would like to swap to my Parity 2 location.

Sounds like there isn't away to do this without at least loosing one Parity drive during the process.

What would be the safest way to do this, without a spare drive?

What would the process be with a temp spare drive? I have drive that isn't healthy so I would want it in the array for the shortest period of time.

The procedure with the temp spare drive I think is simple enough but there would be 3 rebuild/Parity checks which is a quite a few.

I know it's not a common procedure but would be nice if unraid could handle these situations a bit better. Thinking out loud but if unraid could copy (in my case) Parity 2 info onto the data disk I plan to move to the Parity 2 location. I'm aware that, that data drive would have to be taken offline and the contents of it would be emulated. Then when that process of copy Parity 2 to the data drive finishes, move the data drive to parity 2 and Parity would then still be valid. I could then take my "old" Parity 2 and put it in the data slot and have it rebuild. Unless this is somehow already possible?

  • Like 1
Link to comment

Basically the same reason and situation as the OP but I have dual Parity, don't think the OP did/does.

I have a data disk that would be better used as a parity due to it being faster.

I was interested in the procedure to make that swap/move. And in this situation there is no other available drive.


Situation 2. Still looking for the same outcome but with a third drive that could be used temporarily during the swapping/moving. Unfortunately the only drive I have around isn't in great shape (increasing reallocated sectors) but it still functional and passed preclear and smart testes. It's not part of the array, it's just a spare drive on the shelf. The array is currently healthy.

So the second situation is a separate question. What would the procedure be if I had a third drive that could be used during the process but I don't want it used in the array when the swapping/moving is all done and the data and Parity drives are where I want them.


Simply put
Parity 2 (red) becomes data disk 22
Data disk 22 (gold) becomes Parity 2

Reason I mention 2 different scenarios is I of course would prefer the one that keeps the array the most protected the longest.

Link to comment

I would say using a disk that has increasing reallocated is the most risky plan.

15 minutes ago, bnevets27 said:

What would the procedure be if I had a third drive that could be used during the process but I don't want it used in the array when the swapping/moving is all done and the data and Parity drives are where I want them.

Why not just keep that "third drive" in the array?

Link to comment
I would say using a disk that has increasing reallocated is the most risky plan.

Why not just keep that "third drive" in the array?

That's kind of confusing advice as the "third drive" is the one with increasing reallocated. But it's not part of the array as I had said above. It's a spare drive sitting on the shelf. That I could temporarily introduce to the array to aid in this swap. Because as you said you would need a third drive to maintain parity. Though technically with 2 Parity drives I probably could maintain Parity without needing a third drive but I wouldn't be maintaining dual Parity during the procedure.
Simple approach would be to unassign disk22, reassign that disk as parity2, rebuild parity2, assign new disk as disk22, rebuild disk22. Since you have parity1 then everything will continue to work while disk22 is not assigned.

I figured I could do that but wouldn't that be risky? At that point if any drive fails I don't think I would be protected. In that situation,

 

Drive 22 would be unassigned/pulled/emulated. "failure 1"

Parity 2 would be unassigned/pulled is now invalid. "failure 2"

So in essence I've lost a drive (22) and Parity 2.

 

I would assign them to the slots I want them in.It would then rebuild disk 22, then rebuild Parity 2, I assume? Or the opposite of that build Parity 2 then disk 22 like you said.

 

Either way during that procedure, if anything fails it will be lost, correct? As that would be 3 "failed" drives.

 

 

Only reason to bring the unhealthy disk into the picture was then this process would be possible:

Removed disk 22 (red) and replace with unhealthy disk(blue) . Unraid rebuilds disk 22 and now the array is healthy.

Remove Parity 2 (gold) and put in the disk I want there (which happens to be what used to be disk 22(red) ).

Let unraid build Parity. Again now healthy

Then remove disk 22 (blue) and put in what used to be Parity 2 (gold) into slot 22.

Unraid rebuilds the drive. Array back healthy, disks where I want them and the unhealthy drive (blue) is not in the array.

 

 

At least that way if the unhealthy drive dies I still have dual Parity during the process. With they only most risk being when rebuilding Parity 2.

 

I was hoping to have the better level of protection without rebuilding 3 times.

 

 

I guess I was just looking for if there was another way or if it is indeed possible to remove 2 drives from the array and swap them. As there would be 2 missing drives at the same time, with one being Parity. I also wasn't sure if I was to do "option 1" and just swap the disk that the procedure would actually be.

 

As if unassign disk 22 and move it to parity 2 wouldn't unraid not start as it would misconfigured and there for would have to do new configuration. Of I do new configuration with 2 drives unassigned (or intentionally failed is another way to look at) won't that loose all of the data?

 

 

Outside of the main question here but, would it not be technicality possible to do what I suggested? Just maybe not currently?

 

Tell unraid that you plan to use disk 22 as Parity 2. Unraid makes a clone of Parity 2 onto disk 22. This would take disk 22 offline and it would have to be emulated. But the advantage is only 1 disk is "failed/offline" during this cloning. Stop the array. Assign the now cloned Parity 2 (disk 22) into Parity 2. And trust Parity. Then you could replace disk 22 with the drive that used to be used as Parity 2. And then let unraid rebuild the data. I can see that the array may not be able to be usable during the process but it would be safer.

 

 

 

Link to comment
  • 1 month later...

Thank you both @trurl and @itimpi . Just to confirm. I can pull my parity 2 drive and my data drive out, swap them and then do a parity copy (Step 13). During this procedure, I still have dual parity and I'll only really have one "failed" disk?

 

So if I understand correctly. Unraid knows the data disk is actually the old parity 2 disk, it then copies the old parity 2 data to the new parity 2 disk (being the old data disk). Once done I then have parity 1 in tack as it hasn't been touched. Parity 2 (new) has been copied from parity 2 (old) and parity 2 (old) still has the parity 2 data on it. So essentially in this state there is 2 parity 2 disks that are clones of each other. At this point I now have 2 valid parity disks and 1 "disabled" (old parity 2 drive that has become a data drive) disk. Unraid then rebuilds the data onto the "new" data disk.

 

So I maintain dual parity, with one device failure until the procedure finishes. So I would need to lose 2 other drives (3 in total) to have any data loss, correct?

 

Though now looking over the guide again, I don't understand how to correctly remove 2 drives at the same time and unraid being able to track which is the old parity. Unless I'm overthinking it. 

Edited by bnevets27
Link to comment
  • 3 months later...

Hoping I could get some clarification before proceeding. I can't see any reference to a second parity drive is in this wiki: https://wiki.unraid.net/The_parity_swap_procedure

And that procedure mentions using 3 disks, while I only have 2 I'm working with.

 

Recap:

Parity 2 Drive

Data Drive

 

Both healthy and in service but I would like to swap their location. Data drive becomes parity 2 and parity 2 becomes data drive.

Link to comment
2 hours ago, bnevets27 said:

Both healthy and in service but I would like to swap their location. Data drive becomes parity 2 and parity 2 becomes data drive.

You don't need the parity swap procedure.

 

Just remove parity2, use it to rebuild the data drive you are removing. Then add parity2 using the data drive you removed and let parity2 build.

 

Just noticed you had resurrected your old thread that you hadn't really done anything with yet.

 

See my next post.

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.