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.

Getting data back onto the array from a failed disk swap

Featured Replies

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.

  • Community Expert

You can copy from UD to user or disk share, parity will always be maintained.

  • Community Expert
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 :(

  • Author

OK cool. Thanks to both of you. Does -ur seem like the appropriate rsync flags given the desired operations?

  • Community Expert

Use -a (archive) instead of -r, it includes -r and a lot of other good options, -u seems appropriate if there are newer files with the same name you want to keep on dest, also like to use -v, so -auv, you can run a dry run by adding -n (-nauv) first to make sure it's going to do what you want.

  • Author

excellent - thanks!

Archived

This topic is now archived and is closed to further replies.

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.