Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Parity Swap Procedure - Asking to Copy Again

Featured Replies

Hi,

 

I have been following the Parity Swap Procedure here (https://wiki.unraid.net/The_parity_swap_procedure) and got to Step 14, I have let it copy the data from the old Parity drive to the new one and it completed fine.

 

I came back to it after it completed and it was prompting for the password to start the array (and subsequently start the rebuild of data from parity), I was about to enter it but accidentally refreshed the page, now its asking me to do the whole parity copy again (both drives show a blue icon and say New Device).

 

How do I get it back to the previous state where it knows that the new Drive has had the Parity copied to it, so I dont have to spend another 30+ hours letting it copy over, and that the drive it was swapped with needs rebuilding when the array starts?

 

Thanks.

  • Replies 59
  • Views 5.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • This will only work if the copy was completed.   This assumes you're running a recent version of Unraid, it might not work on very old releases, it works on any release newer than v6.2, it a

  • This. Not clear what you mean, if there's another disabled disk it can be rebuilt with parity1 and the other disks, assuming it exists and is valid.

  • Since there were two invalid disks with single parity both rebuilt disks will be corrupt, you can format them and restore the data from the old disks, assuming they are still available.

Posted Images

  • Community Expert

Parity swap procedure needs to be done from start to finish, any other step/interruption will make it stat over, if you're absolutely sure the parity copy completed you could use the invalid slot command, but I would advise just starting over, also 30+ hours is a lot, unless the parity is very large.

  • Author

Thanks for that.

 

The Original Parity was 10TB and its been replaced with a 14TB drive, which could be some reason for the 30+ hours.

 

Surely, as everything has been copied over and the array has not been able to be started since, there must be some way to "force" it back into the state, as all the data is still there and nothing has changed, its just the unRAID GUI being restrictive.

 

Are you able to provide some info on the Invalid Slot Command please, I might give that a go if I dont get any other results.

Edited by timethrow
typo

  • Community Expert

This will only work if the copy was completed.

 

This assumes you're running a recent version of Unraid, it might not work on very old releases, it works on any release newer than v6.2, it also assumes you have single parity, if you have dual parity the command is different (remove the 29)

 

-Tools -> New Config -> Retain current configuration: All -> Apply
-Check all assignments and assign any missing disk(s) if needed, make sure new parity is assigned to the parity slot and old parity assigned to the disk to be rebuilt
-Important - After checking the assignments leave the browser on that page, the "Main" page.

-Open an SSH session/use the console and type (don't copy/paste directly from the forum, as sometimes it can insert extra characters):

 

mdcmd set invalidslot # 29

Replace # with the disk number you want to rebuild, i.e. to rebuild disk3 it would be:

mdcmd set invalidslot 3 29

 

-Back on the GUI and without refreshing the page, just start the array, do not check the "parity is already valid" box (GUI will still show that data on parity disk(s) will be overwritten, this is normal as it doesn't account for the invalid slot command, but they won't be as long as the procedure was correctly done), disk# will start rebuilding, disk should mount immediately but if it's unmountable don't format, wait for the rebuild to finish and then run a filesystem check

  • Author

Thanks for that, it has worked. The Data Drive shows as being Emulated and the contents look to be what I would expect, and the emulated files are accessible.

The Data Drive is being rebuilt now.

 

Thank you for your help.

  • JorgeB changed the title to [SOLVED] Parity Swap Procedure - Asking to Copy Again
  • 1 year later...

@JorgeB, just out of curiosity, if you had dual parity, and left in the numbers "29" after each command, then proceeded to start the array, what is the likely outcome....

wish I was asking for a friend... 🤔🤨😒🙄😔

  • Community Expert
8 hours ago, Duggie264 said:

if you had dual parity, and left in the numbers "29" after each command, then proceeded to start the array, what is the likely outcome....

Parity2 would be invalid.

So when starting the Array, would it try and rebuild P2 from the original P2 disk first, or would it just rebuild parity 2 from across the disk set (thus resulting in the loss of data from the failed disk the old P2 is replaceing, I assume?)

  • Community Expert
54 minutes ago, Duggie264 said:

or would it just rebuild parity 2 from across the disk set

This.

54 minutes ago, Duggie264 said:

thus resulting in the loss of data from the failed disk the old P2 is replaceing, I assume?

Not clear what you mean, if there's another disabled disk it can be rebuilt with parity1 and the other disks, assuming it exists and is valid.

Thanks @JorgeB,

 

Just for completeness:

 

I had a couple of disk failures that resulted in a dual Parity swap procedure - Successfull

 

I then recieved some newer replacement HDD that necessitated another dual parity swap procedure. Parity copy went smoothly, prior to the disk rebuild, I accidentally clicked a drop down on the main page. This meant that I would have to redo the parity copy (16-->18TB). I then did a search, and came across this thread (which should be linked from ther Parity Swap procedure page!)

 

Everything would have went well, had I not missed the bit about dual parity and not using the "29" at the end of the cmds...

 

so I now have this:
image.png.b9d91c8d3697985b23b6a7774a788c7d.png

 

and this

image.thumb.png.996e148beb58bfa470670e1e166b3a11.png

 

Disks 5 and 11 were the locations of the original missing/failed disks, that should have been rebuilt on the two old p[arity disks that you can see occupying thier slots (MDKE anbd QN99)

However as I incorrectly entered 29... I am guessing that:

 

Parity 1 Valid

Parity 2 Invalid (being rebuilt across disk set as you confirmed above)

Disk 5 (original Parity 1) - should be getting overwritten with original emulated Disk 5 data? 

Disk 11 (original Parity 2) - should be getting overwritten with origianl emulated Disk 11 data?

 

So I suppose the real question is, what will the outcome of this be?

 

 

  • Community Expert
1 hour ago, Duggie264 said:

So I suppose the real question is, what will the outcome of this be?

Since there were two invalid disks with single parity both rebuilt disks will be corrupt, you can format them and restore the data from the old disks, assuming they are still available.

  • 1 year later...

This post literally saved my bacon.
doing a parity swap for what felt like forever (why does the last bit of the drive take *so* long to finish anyways?)

 

clicked one wrong thing as others above have done

 

My question - how did you know what command to use and is there a manual on features like these that I could brush up on to get more familiar?

 

Thanks for saving my bacon dude!!

Edited by lukesaber
typo

  • 2 weeks later...
On 6/22/2020 at 7:39 PM, JorgeB said:

This will only work if the copy was completed.

 

This assumes you're running a recent version of Unraid, it might not work on very old releases, it works on any release newer than v6.2, it also assumes you have single parity, if you have dual parity the command is different (remove the 29)

 

-Tools -> New Config -> Retain current configuration: All -> Apply
-Check all assignments and assign any missing disk(s) if needed, make sure new parity is assigned to the parity slot and old parity assigned to the disk to be rebuilt
-Important - After checking the assignments leave the browser on that page, the "Main" page.

-Open an SSH session/use the console and type (don't copy/paste directly from the forum, as sometimes it can insert extra characters):

 

mdcmd set invalidslot # 29

Replace # with the disk number you want to rebuild, i.e. to rebuild disk3 it would be:

mdcmd set invalidslot 3 29

 

-Back on the GUI and without refreshing the page, just start the array, do not check the "parity is already valid" box (GUI will still show that data on parity disk(s) will be overwritten, this is normal as it doesn't account for the invalid slot command, but they won't be as long as the procedure was correctly done), disk# will start rebuilding, disk should mount immediately but if it's unmountable don't format, wait for the rebuild to finish and then run a filesystem check

Found this after i did a parity swap and then accidently reloaded the page after the parity was copied over to the new drive. rather than start over again ive found this. the rebuild is completed but the drive is still showing as unformatted and not sure where to go from here.

 

Screenshot 2023-12-13 183450.png

Screenshot 2023-12-13 183523.png

  • Community Expert
11 minutes ago, Morgebear said:

the rebuild is completed but the drive is still showing as unformatted and not sure where to go from here.

Please post the diagnostics.

  • Community Expert

Why was a new config done? It's not a part of the parity swap procedure, post the output of:

 

fdisk -l /dev/sde

 

in this it says to 'Tools -> New Config -> Retain current configuration: All -> Apply@

On 6/22/2020 at 7:39 PM, JorgeB said:

This will only work if the copy was completed.

 

This assumes you're running a recent version of Unraid, it might not work on very old releases, it works on any release newer than v6.2, it also assumes you have single parity, if you have dual parity the command is different (remove the 29)

 

-Tools -> New Config -> Retain current configuration: All -> Apply
-Check all assignments and assign any missing disk(s) if needed, make sure new parity is assigned to the parity slot and old parity assigned to the disk to be rebuilt
-Important - After checking the assignments leave the browser on that page, the "Main" page.

-Open an SSH session/use the console and type (don't copy/paste directly from the forum, as sometimes it can insert extra characters):

 

mdcmd set invalidslot # 29

Replace # with the disk number you want to rebuild, i.e. to rebuild disk3 it would be:

mdcmd set invalidslot 3 29

 

-Back on the GUI and without refreshing the page, just start the array, do not check the "parity is already valid" box (GUI will still show that data on parity disk(s) will be overwritten, this is normal as it doesn't account for the invalid slot command, but they won't be as long as the procedure was correctly done), disk# will start rebuilding, disk should mount immediately but if it's unmountable don't format, wait for the rebuild to finish and then run a filesystem check

 

and all i got was 

fdisk: invalid option -- '1'
Try 'fdisk --help' for more information.

 

sorry typed it in wrong the first time. output is:

Disk /dev/sde: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000AS0002-1NA
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 60B4E146-6936-4937-A7B8-9E4C99C352C9

Device     Start         End     Sectors  Size Type
/dev/sde1     64 15628053134 15628053071  7.3T Linux filesystem

  • Community Expert

Reboot and post new diags after array start.

  • 4 months later...

I also had the unfortunate scenario occur to me. I followed the steps described to force the system in the desired state. But my array won't start and seems to be stuck. I know that the mdcmd command came with a remark that it should be used with 29 at the end if the array contains one parity drive. My array meets these criteria, but my only parity disk is assigned as parity 2, which I now found out is disk 29. So I assume this disk being marked as invalid through the command is preventing my array from starting. So I wonder is there any command available that would mark 29 as a valid? e.g "mdcmd set validdisk 29"

Any help would be appreciated!

newton-diagnostics-20240513-1031.zip

  • Community Expert

Unraid driver crashed, you will need to reboot, having just pariry2 should not be a problem.

  

24 minutes ago, JorgeB said:

Unraid driver crashed, you will need to reboot, having just pariry2 should not be a problem.

 


A that is good news!

I tried rebooting, but it is unresponsive through the GUI and CLI. So I will physically reboot by holding the power button. And that would be it?

Edited by saltz
quote

  • Community Expert
1 hour ago, saltz said:

mdcmd command

We're you following the current documentation for parity Swap?

 

There is no reason to enter mdcmd.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.