Rebuilding Array from Parity


Recommended Posts

I moved my unraid to a new machine and then I accidentally formatted my actual data drive in windows...

I now have my unraid server back up, but i want to make sure it rebuilds my data drive (disk 1) using parity since i'm sure i messed up the disk my formatting it in windows. I don't want to start my array cuz i'm afraid that i will lose my data...

 

What is the correct way to go about this and also is there a way for me to explore the contents of the hard drive without starting the array.

 

image.png.3a3a38bcb5b662d152871dfb33d833d3.png

(Disk 2 and Disk 3) are just older hd's I found lying around so will add them to the array as well.

Link to comment

If everything in the original array is exactly as you describe, i.e. 1 data disk (corrupted) and 1 parity disk, then you need to disconnect all the disks except for parity and start the array. That will force Unraid to show you the emulated contents of disk1 so you can see if it's correct.

 

Before you do that, download diagnostics and post them here so we can see what the state of things is right now.

 

Adding drives to the array before you get your data recovered is a very bad idea, and will likely end up with data loss if you aren't careful. Also, remember all drives in the parity array must be in perfect condition, the way you described "older hd's I found lying around" doesn't give me the warm and fuzzies about their condition. Diagnostics collected with them connected should at least show SMART reports for them, so we can see any obvious issues.

 

Do you have current backups of any important data on the array? Doing the wrong thing right now will definitely cause data loss.

 

 

Link to comment
1 hour ago, JonathanM said:

If everything in the original array is exactly as you describe, i.e. 1 data disk (corrupted) and 1 parity disk, then you need to disconnect all the disks except for parity and start the array. That will force Unraid to show you the emulated contents of disk1 so you can see if it's correct.

That is no quite right - you need to have all disks except the disk that was accidentally formatted connected and then start the array so we can see if Unraid can emulate the missing disk using the combination of parity plus the other data drives.   If so then the standard Unraid rebuild process can be used to restore its contents.

Link to comment

When you say disconnected, you mean like physically disconnected from the motherboard? Or just not selected before starting array. I did at one point only have the parity hard drive connected and unraid does say it's in good health. But without the data hard disk in, I think it wouldn't let me start the array and I was also afraid of messing up so I have not yet tried to start the array.

Link to comment
4 hours ago, itimpi said:

hat is no quite right - you need to have all disks except the disk that was accidentally formatted

Yeah, his screenshot of one parity, one data, and two new disks made it unclear. In this specific case, only the parity was needed, because the original array was only one parity and one data.

Link to comment

So parity seems to be fine, how do I go about adding my actual drive to the array? I can just select it and start the array? I was worried if I just start it like this the parity would get messed up trying sync with the disk I accidentally formatted.

Link to comment

The last diagnostics you posted showed that it appeared that disk1 is being emulated correctly.    It should now be possible to simply stop the array; assign the accidentally formatted disk to the disk1 slot; and then Unraid will tell you that will cause the disk to be rebuilt with the contents of the emulated disk1 when you start the array.   When rebuilding it is irrelevant what format the target disk is currently in as every sector gets overwritten by the rebuild process.

  • Like 1
Link to comment

Thanks, I rebuild my data disk last night. It took about 8 hours and everything went smoothly! It was almost too easy!

 

This is kinda why I love unraid actually was experimenting with truenas and it was a pain to even get plex working properly.

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.