Jump to content
sketchy

[Solved] Use data disk to replace failing parity disk?

20 posts in this topic Last Reply

Recommended Posts

Posted (edited)

I have a failing parity drive. Can i free up a data disk using the "Remove Drives Then Rebuild Parity" method, but when rebuilding the parity for this new configuration (one less drive), use the old data drive i free'd up to replace the failing parity drive? Probably not advisable to rebuild parity onto my failing parity drive, then replace the parity drive?

 

The drive i plan to free up is the same size as my existing parity drive, 3TB.

I am currently moving the data off of this 3TB drive onto a smaller 2TB drive, so i could also do the "Clear Drive Then Remove Drive" method, preserving parity. Then perform the parity drive replacement. 

 

Not sure which is the best approach really?

Edited by sketchy

Share this post


Link to post
57 minutes ago, sketchy said:

I have a failing parity drive. Can i free up a data disk using the "Remove Drives Then Rebuild Parity" method, but when rebuilding the parity for this new configuration (one less drive), use the old data drive i free'd up to replace the failing parity drive? Probably not advisable to rebuild parity onto my failing parity drive, then replace the parity drive?

You can, but parity can give errors or fail during the procedure, if it does you can unassign current parity and move the data, it would be faster and not involve parity, you'd be unprotected but if it starts failing you already are.

Share this post


Link to post

 

3 hours ago, sketchy said:

I have a failing parity drive... Probably not advisable to rebuild parity onto my failing parity drive, then replace the parity drive?

 

What indicates the parity drive is failing?

 

It would be pointless to rebuild parity before replacing parity.

 

 

Share this post


Link to post

Thanks for the reply @johnnie.black @trurl

 

7 hours ago, trurl said:

What indicates the parity drive is failing?

 

Another thread indicates that the parity is failing

 

7 hours ago, trurl said:

It would be pointless to rebuild parity before replacing parity.

 

I agree it would be pointless to rebuild parity before replacing. I need to free up a data disk in my array in order to re purpose it as a parity drive. The final steps of that 'shrinking array procedure (via "Remove Drive Then Rebuild Parity") means my parity is not accurate and needs rebuilding. Can i swap out the data disk i free'd up and use as the new parity drive before parity is rebuilt. Specifically, after step 7 shut the server down and swap out the old parity disk for the new one, then power back up and rebuild the parity of the new configuration (one less drive) onto the new parity disk?

This kills two birds with one stone, the necessary parity rebuild of the 'remove drive then rebuild' procedure, and the physical replacement of my failing parity drive. Just a little unsure of how acceptable this would be as i am deviating from the recommended procedure.

 

Alternatively as i'm only removing one drive from the array use the Clear drive then remove method, maintaining the current parity. Then following that procedure, replace the parity drive with the drive i free'd up.

 

@johnnie.black Since your reply, I'm at a point now where i have finished mirroring (rsync) the contents of my 3TB disk to a 2TB disk. As far as i know the parity drive has not failed during this process. This 3TB data drive is the one i plan to re purpose as the parity drive.

Share this post


Link to post
7 minutes ago, sketchy said:

Can i swap out the data disk i free'd up and use as the new parity drive before parity is rebuilt.

Yes

Share this post


Link to post

Thanks :) 

Apologies for my garbled/over complicated post!

Share this post


Link to post

Just to be more clear, after the new config you're free to assign the existing disks as you want, so just re-assign the now empty data disk as your new parity and start the array to begin the sync.

Share this post


Link to post
3 hours ago, sketchy said:

 

In general it is probably best to stick to one thread so we can know what has already been discussed. And it might even mean we don't miss some possibly very important details that could result in giving incorrect advice. We see a lot of posts by a lot of people and likely don't remember or didn't even read the other thread. At the very least you should provide links to the previous discussion at the beginning of the new thread if it's relevant.

Share this post


Link to post

Apologies. In future i will do just that.

 

I decided to use the clear drive then remove method. 'dd' command in progress, updates later.

Thanks for the help so far guys.

Share this post


Link to post
Posted (edited)

dd command complete:

 

dd bs=1M if=/dev/zero of=/dev/md6 status=progress

3000578867200 bytes (3.0 TB, 2.7 TiB) copied, 75736 s, 39.6 MB/s

dd: error writing '/dev/md6': No space left on device

2861589+0 records in

2861588+0 records out

3000592928768 bytes (3.0 TB, 2.7 TiB) copied, 75736.5 s, 39.6 MB/s

 

Before i stop the array and set the new config, is the 'No space left on device' an acceptable response? It shows as 3TB copied so i'm guessing this is fine, and no further records can be written.

Edited by sketchy

Share this post


Link to post

I should've read the script, just found the line:

echo -e "\nA message saying \"error writing ... no space left\" is expected, NOT an error.\n"

Share this post


Link to post

I have successfully removed the data disk from the config and reassigned that disk as the replacement for the failing parity disk. The 'Parity sync / Data rebuild' process has now started.

 

I think it's brilliant that a break-fix procedure like this can be completed without needing to physically go to the server, or even a reboot! Admittedly i will need to take it down to remove the failing disk. Either way, a true testament to the capability of unraid.

Thanks for the guidance. I'll update once the parity has been rebuilt and make this solved.

Share this post


Link to post
37 minutes ago, sketchy said:

The 'Parity sync / Data rebuild' process has now started.

The whole point of the script is to allow you to avoid a parity rebuild.

Share this post


Link to post

I took advantage of not needing to rebuild parity during the process of shrinking the raid. Since i am repurposing that free'd up data disk as a replacement for the failing parity i am forced to rebuild parity?

Share this post


Link to post
8 minutes ago, sketchy said:

I took advantage of not needing to rebuild parity during the process of shrinking the raid. Since i am repurposing that free'd up data disk as a replacement for the failing parity i am forced to rebuild parity?

 

Forgot you were replacing parity. Probably the reason I forgot is since a parity rebuild was required anyway I really don't see why you would have bothered with the script since

35 minutes ago, trurl said:

The whole point of the script is to allow you to avoid a parity rebuild.

 

Share this post


Link to post

Ahh i see, i think. Because i had to rebuild parity anyway, it would've been quicker to use the "Remove Drives Then Rebuild Parity" method, rather than clear the drive before removing, then rebuild parity (as i did).

Share this post


Link to post

I think the reason i chose the approach i did was because i assumed after shrinking the raid down using the "Remove Drives Then Rebuild Parity" method, i'd need to rebuild parity onto the existing parity disk, rather than using the free'd up disk.

 

If i've now understood correctly i can free up a disk and use that disk to rebuild parity under one 'new config'. Excellent.

Share this post


Link to post
7 minutes ago, sketchy said:

If i've now understood correctly i can free up a disk and use that disk to rebuild parity under one 'new config'. Excellent.

 

Correct. New Config allows you to reassign any disks then optionally rebuild parity.

 

Parity would be invalid if you removed a data disk that hadn't been cleared. The script clears the to-be-removed disk so parity remains valid.

 

Since you were replacing parity, the "new" parity disk has invalid parity, whether actually a new disk or just some other disk such as a former data disk. So parity would have to be rebuilt whether or not you had changed anything else.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now