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.

Help Needed: Rebuilding Unraid Server After USB Failure and Partial Data Recovery

Featured Replies

Hello Unraid community,

 

I'm facing a significant challenge with my Unraid server after my USB stick failed and I only have an outdated USB backup. The server has been shut down for about two months as I haven't had the time to address this issue until now.

 

I've managed to recover some data using ddrescue, but unfortunately, several key files have bad sectors. I've identified these corrupted files using ddru_findbad. Here's a list of the damaged files:

 

BadSectors=1888 Inode 10612231 File /config/plugins/dynamix.file.manager/dynamix.file.manager.txz
BadSectors=101632 Inode 10 File /bzfirmware
BadSectors=128 Inode 11457559 File /config/plugins/fix.common.problems/fix.common.problems-2023.07.29-x86_64-1.txz
BadSectors=32 Inode 11478022 File /logs/unbalance.log
BadSectors=480 Inode 11478024 File /logs/syslog
BadSectors=256 Inode 11478040 File /logs/tower-diagnostics-20230823-1510.zip
BadSectors=256 Inode 11478044 File /logs/tower-diagnostics-20230823-1947.zip
BadSectors=20224 Inode 20 File /bzmodules
BadSectors=224 Inode 2577 File /config/plugins/community.applications.plg
BadSectors=32 Inode 2590 File /config/plugins/unassigned.devices-plus.plg
BadSectors=10112 Inode 25 File /bzroot
BadSectors=32 Inode 2623 File /config/plugins/tips.and.tweaks.plg
BadSectors=64 Inode 2631 File /config/plugins/nvidia-driver.plg
BadSectors=32 Inode 2636 File /config/plugins/file.activity.plg
BadSectors=32 Inode 47891464 File /config/plugins/tips.and.tweaks/tips.and.tweaks-2023.07.23.tgz
BadSectors=1088 Inode 48956424 File /config/plugins/user.scripts/user.scripts-2023.07.16-x86_64-1.txz
BadSectors=32 Inode 48985105 File /config/plugins/user.scripts/scripts/NVIDIASLEEP
BadSectors=64 Inode 49632264 File /config/plugins/nvidia-driver/nvidia-driver-2023.09.03.txz
BadSectors=32 Inode 87287311 File /config/plugins/file.activity/file.activity-2023.09.13.tgz
BadSectors=32 Inode 9720341 File /config/shares/media.cfg
BadSectors=256 Inode 9838089 File /config/plugins/community.applications/community.applications-2023.08.27-x86_64-1.txz
BadSectors=128 Inode 9856040 File /config/plugins/unassigned.devices-plus/packages/libmd-1.1.0-x86_64-1cf.txz


I'm not sure what files are critical but I know that the following files are critical, luckily I have a backup which is about 5 months old but I'm quite sure that I did not touch the files until my USB Drive failed unfortunately the backup is probably from an older unraid version:
 

BadSectors=32 Inode 9720341 File /config/shares/media.cfg
BadSectors=32 Inode 48985105 File /config/plugins/user.scripts/scripts/NVIDIASLEEP


I think the following files can be downloaded from somewhere:

BadSectors=256 Inode 9838089 File /config/plugins/community.applications/community.applications-2023.08.27-x86_64-1.txz
BadSectors=128 Inode 9856040 File /config/plugins/unassigned.devices-plus/packages/libmd-1.1.0-x86_64-1cf.txz
BadSectors=64 Inode 49632264 File /config/plugins/nvidia-driver/nvidia-driver-2023.09.03.txz
BadSectors=32 Inode 87287311 File /config/plugins/file.activity/file.activity-2023.09.13.tgz
BadSectors=32 Inode 47891464 File /config/plugins/tips.and.tweaks/tips.and.tweaks-2023.07.23.tgz
BadSectors=1088 Inode 48956424 File /config/plugins/user.scripts/user.scripts-2023.07.16-x86_64-1.txz
BadSectors=128 Inode 11457559 File /config/plugins/fix.common.problems/fix.common.problems-2023.07.29-x86_64-1.txz
BadSectors=1888 Inode 10612231 File /config/plugins/dynamix.file.manager/dynamix.file.manager.txz



The logs are just temp files and can probably just be ignored:

BadSectors=32 Inode 11478022 File /logs/unbalance.log
BadSectors=480 Inode 11478024 File /logs/syslog
BadSectors=256 Inode 11478040 File /logs/tower-diagnostics-20230823-1510.zip
BadSectors=256 Inode 11478044 File /logs/tower-diagnostics-20230823-1947.zip



I don't know what these files are for:

BadSectors=20224 Inode 20 File /bzmodules
BadSectors=224 Inode 2577 File /config/plugins/community.applications.plg
BadSectors=32 Inode 2590 File /config/plugins/unassigned.devices-plus.plg
BadSectors=10112 Inode 25 File /bzroot
BadSectors=32 Inode 2623 File /config/plugins/tips.and.tweaks.plg
BadSectors=64 Inode 2631 File /config/plugins/nvidia-driver.plg
BadSectors=32 Inode 2636 File /config/plugins/file.activity.plg
BadSectors=101632 Inode 10 File /bzfirmware


 

Are there more critical files I'm missing?
How can I obtain the other files to reconstruct my USB Drive and start my server?

 

I would really appreciate any guidance, tips, or shared experiences on how to tackle this rebuild effectively. Thanks in advance for your help!

Best regards,

Jadun

Solved by Frank1940

  • Community Expert

You might want to consider this approach to recovering the assignment of the disks in the array:

 

        https://docs.unraid.net/unraid-os/troubleshooting/data-recovery/#lost-array-configuration

 

Basically, Do you have a copy of your .key file from the /config directory on the boot drive.  If not, look for it in the outdated backup.  Then start with a new install of Unraid on a USB flash drive.  Copy that .key file into the /config directory.   You can install all of the plugins and make the basic setup to get the server setup.   Again that old outdated backup will provide with many of the settings.  (In the /config folder/directory, there are a lot of .cfg files.  All of the smaller ones are straight text files and the settings for the various parameters are obvious.) 

 

You will have to reset the root password, the security setting on the shares. Share Access users and things like this.  But you should be able to recover all of the data on the array.

 

Edited by Frank1940

  • Author

Thank you for your quick reply. I have my key file, so that will serve as my plan B. However, since I'm running multiple VMs, reconfiguring the system would be a hassle because retrieving data from these VMs poses challenges; while large media files are stored on the array, SQL databases and docker data for example GitLab repositories, Nextcloud Calendars etc are housed within the VM image on my cache drive. That's why I want to rebuild, if possible, the USB Stick by obtaining the missing files.

 

So my plan a looks like this:

My next steps involve copying .tgz, .txz, and .plg files from my backup. From a UNIX perspective, this approach should be effective. However, I'm uncertain if this process can be directly applied to Unraid, or if additional steps are necessary.

 

The plugin versions on my broken drive correspond with the plugin versions of my backup.:

-> Version obtained trough /config/plugins/*/*.tgz or *.txz file

community.applications 2023.08.27

libmd 1.1.0

nvidia-driver 2023.09.03

file.activity 2023.09.13

tips.and.tweaks 2023.07.23

user.scripts 2023.07.16

fix.common.problems 2023.07.29


-> Version obtained through /config/plugins/*.plg file
dynamix.file.manager 2023.06.01

 

Another step I have to do is obtaining the following three files:
/bzmodules

/bzroot

/bzfirmware

I suppose those files are images without individual content. From the /changes.txt I figured out that my server was on version 6.12.4 2023-08-31. So my plan is to get those files from my old backup which contains the same version number in the /changes.txt file. But also here I'm uncertain if this is the case in unraid.

 

Then I want to get the missing cfg file and script from my old backup:

/config/shares/media.cfg

/config/plugins/user.scripts/scripts/NVIDIASLEEP

 

Last thing to do might be creating a syslog file but I suppose this is done my unraid automatically.

When I got all files together on my PC I want to create a zip file with the recovered content + the backup files I mentioned above and flash those on a new USB drive.


Could this plan work out? Are there any pitfalls I'm missing?

 

Best regards,

Jadun

 

 

Edited by jadun

  • Community Expert
  • Solution
6 minutes ago, jadun said:

 

Another step I have to do is obtaining the following three files:
/bzmodules

/bzroot

/bzfirmware

 

All the bz* files are the Unraid OS files for they are never changed by the User or any other application except for the Update tool.  You can find them in any of the the download achieves in the root of the .zip file.   The ZIP files for some of the latest versions can be found here: 

 

    https://docs.unraid.net/unraid-os/download_list/

 

Just copy ALL of those bz* files to the root of your boot drive.

  • Author

I managed to rebuild the USB drive as mentioned and created a bootable one.

 

Everything worked out like expected! Thanks for your help Frank1940!

 

Edit: I just noticed that not all plugins where successfully restored but those are not critical so I will just reinstall them:
 

/boot/config/plugins-error/community.applications.plg ERROR

/boot/config/plugins-error/file.activity.plg ERROR

/boot/config/plugins-error/nvidia-driver.plg ERROR

/boot/config/plugins-error/tips.and.tweaks.plg ERROR

/boot/config/plugins-error/unassigned.devices-plus.plg ERROR

Edited by jadun
noticed sum flaws in my solution

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.