Getting data back onto the array from a failed disk swap


daemian

Recommended Posts

Hey everyone,

 

So I created a bit of a mess, and life has just been too busy to deal with it. I finally got a chance to try to address it, but I realized I better ask for some advice before I make things worse.

 

I am not exactly sure what happened, but here is the story. I had a drive fail and so I replaced it back in December (I think it was Dec). I do not know what I did wrong, but when I swapped in the new drive - the array did not rebuild the contents onto the new drive using parity. I put it in the slot of the old failed drive (disk 2 in my case), but I ended up with an empty disk 2 and parity must have been rebuilt at some point. At first, I didnt even realize what had happened. Then once I realized, I couldn't get the old drive to mount using the unassigned devices plugin and I did not have time to address it. Fast forward about a month and a half and the good news is after reseating the sata cable I can now mount up the old drive using unassigned devices. The files are there. But, meanwhile, my new disk 2 also has files on it. A few of my dockers (nextcloud and paperless) have files that they think are there in the db, but are missing on the actual filesystem. And outside of those apps there are files on the old disk that are no longer on the user shares.

 

So, how do I best get the missing files back onto the array? My first thought was to use rsync with  the '-ur' flags with the source of the old disk and the destination of the new disk. But then I realized that would probably create parity issues? So perhaps I should using rsync -ur with a source of the old disk and a destination of '/mnt/user/' ? The goal would be to copy any files or folders that are on the old disk, but not on the array. However, if there is a file that already exists on the array - don't overwrite it (since I have been running for about a month). Does that seem like the right approach? If so, any other rsync options I should use or is there something better I should do rather than rsync running in a tmux window?

 

Thank for any advice. Not sure how I fubar'ed the simple disk swap, but i will just admit my stupidity and ask for help to rectify the situation now.

Link to comment
21 minutes ago, daemian said:

Not sure how I fubar'ed the simple disk swap, but i will just admit my stupidity and ask for help to rectify the situation now.

This typically seems to result from people seeing an 'unmountable' disk and promptly formatting it (not realising this is also updating parity to say the disk is empty) and then rebuilding the (now empty) disk.   The latest Unraid releases have added a more prominent warning about the consequences of doing a format but I am sure there will still be those who ignore it :(

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.