Jump to content

How do I restore a failed drive after improper shutdown?


Recommended Posts

My house lost power and the system was improperly shut down. Usually when this happens I just have to do a parity check when starting the array back up. I had a UPS but it died, probably time to get a new one. Anyway, this time upon boot all my drives were unassigned. I did some searching on the forum, ran a checkdisk on my flash drive, it's fine. The .dat file used to house the assigned drives however was 0 bytes.

 

I deleted the file and went to start assigning the drives back, but noticed I was missing one. Looked at the syslog and found that one drive was failing to respond. It detected something was there, but first tried 3Gbps, then 1.5Gbps, then it timed out. So looks like I lost a drive in the power failure as well.

 

Now, I have an extra drive I can put in. I slid it in and it was detected no problem, however because it was an improper shut down my parity isn't trusted. I know the fileserver wasn't doing anything at the time because it was in the middle of the day and no one was home, so I personally think the parity is fine. Do I put in the new drive, and just hit rebuild? I'm worried that if I do that the parity drive may be overwritten with the blank drive instead of the other way around.

 

What are the correct steps to go through to prevent any data loss? Thanks guys.

 

Update: I was able to borrow a 2TB drive, rebuild with it, and then expand with my spare 4TB. The server is now up and running. Many thanks to johnnie.black and RobJ!

Link to comment

Thanks for the link Johnnie. I did a search before posting but I didn't come across that one. It's almost exactly what I'm facing so thank you for getting me the link.

 

It's interesting that his super.dat failed as well. Is that a known bug with unRAID 6? I'll have to do some searching. 

 

Lastly, does the new drive have to be the exact same size as the failed disk? I have a brand new 4TB sitting here ready to go in, wouldn't the rebuild procedure be basically the same as the expansion procedure?

UnRAID Manual 6

When you Start the array after replacing a failed disk, the system will reconstruct the contents of the failed disk onto the new disk; and, if the new disk is bigger, expand the file system.

 

Thanks again.

 

Link to comment

There's no problem rebuilding a failed disk to a bigger one in a normal situation, that's not your case, you have to do a new config and trust parity with a missing disk, this is not a supported procedure.

 

The procedure I linked should work, and it did in fact work in my tests and for at least 2 users in the forum in a similar situation, I did test a rebuild to a bigger disk and while it also worked, there was some file system corruption, so I wouldn't recommend it.

Link to comment

Sorry for the late reply. I have procured another 2TB drive and attempted the instructions you linked to, but ran into a problem.

 

The new drive shows as unmountable, as expected, but so do two of my other good drives. The 2TB assigned currently as Disk 5 is the one I am using to replace the failed drive, but I haven't had any problems with mounting the other 3TB drives in the past.

 

If I recall correctly one of the 3TBs was XFS, if that makes any difference. The slots they're assigned to don't matter as long as the correct parity disk is selected, correct?

unmountable2.jpg.476c47770490f57c76d4b871cde2bc65.jpg

fileserver-diagnostics-20160520-1714.zip

Link to comment

In the disk properties, one was set to RiserFS and one was set to XFS, as expected. I switched the RiserFS to XFS, and the XFS to RiserFS, and that did the trick. So somehow they were just mixed up.

 

I'm starting the rebuild to the 2TB now. Thanks a lot guys!

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.

×
×
  • Create New...