cjpeckover Posted October 16, 2023 Share Posted October 16, 2023 I'm upgrading my parity drive to a larger capacity and am wondering if it's possible to rebuild a data drive with the old parity in the case that a drive failed during the parity rebuild. For example, if I swap in the new drive and start the parity rebuild and a data drive failed, could I swap in the old parity drive and a new data drive, check that the parity is valid, and then start rebuilding the failed drive? The reason I ask is I'm trying to determine the best way to upgrade the parity while keeping the array protected. The best I've seen so far is to assign the new parity drive as parity #2, rebuild, then unassign parity #1. I'd rather not deal with new configs setting this up though if I can just swap them out and be safe with the old one should something catastrophic happen during rebuild. Thanks for any help! Quote Link to comment
Solution JonathanM Posted October 16, 2023 Solution Share Posted October 16, 2023 If you do the upgrade in maintenance mode, so the data drives are not mounted, the old parity drive would stay valid. Quote Link to comment
cjpeckover Posted October 16, 2023 Author Share Posted October 16, 2023 If I kept the array running and no writes were done (hypothetically), would this still technically be the case? Quote Link to comment
JonathanM Posted October 16, 2023 Share Posted October 16, 2023 2 hours ago, cjpeckover said: If I kept the array running and no writes were done (hypothetically), would this still technically be the case? Mounting the drives normally will write some data. If you were to manually mount the drives read only it should still stay 100% valid. Quote Link to comment
cjpeckover Posted October 19, 2023 Author Share Posted October 19, 2023 On 10/16/2023 at 4:05 AM, JonathanM said: Mounting the drives normally will write some data. If you were to manually mount the drives read only it should still stay 100% valid. So in this case I could start in maintenance mode, and then run the default mount commands Unraid uses during a normal array start, with -r flag? Looks like for the array disks it's usually something like: mkdir -p /mnt/disk1 mount -t xfs -o noatime,nouuid /dev/md1 /mnt/disk1 The caches are a bit different. Think I'd be fine then mounting the disks this way, read only, and the caches normally? Quote Link to comment
JonathanM Posted October 19, 2023 Share Posted October 19, 2023 I think that would work, but you won't have access to the user share paths. Quote Link to comment
cjpeckover Posted October 20, 2023 Author Share Posted October 20, 2023 Ah right, that's a good point. I noticed in the docs they mention: Quote It is recommended that you keep the old parity drives contents intact until the above procedure completes as if an array drive fails during this procedure so you cannot complete building the contents of the new parity disk, then it is possible to use the old one for recovery purposes (ask on the forum for the steps involved) However, I can't find anything on how this could be done, especially with what you said about Unraid likely making some writes while just mounting/starting the array. Quote Link to comment
JorgeB Posted October 20, 2023 Share Posted October 20, 2023 You can do the rebuild/sync in maintenance mode. Quote Link to comment
cjpeckover Posted October 20, 2023 Author Share Posted October 20, 2023 Right, fair enough. Thanks all for your help! Quote Link to comment
Recommended Posts
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.