Changing The Flash Device

From Unraid | Docs
Jump to: navigation, search
Line 10: Line 10:
  
 
'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''
 
'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''
 
  
 
[[File:Backup flash drive.png|800px]]
 
[[File:Backup flash drive.png|800px]]
 
  
 
===Why replace your USB Flash boot device?===
 
===Why replace your USB Flash boot device?===
Line 48: Line 46:
  
 
*Once you have a backup of your Unraid flash device, you will need to use the Unraid USB Flash Creator tool to restore your backup to the new USB flash device. This can be downloaded for Windows or macOS from here  ....  [https://unraid.net/download Download USB Creator]
 
*Once you have a backup of your Unraid flash device, you will need to use the Unraid USB Flash Creator tool to restore your backup to the new USB flash device. This can be downloaded for Windows or macOS from here  ....  [https://unraid.net/download Download USB Creator]
 
  
 
[[File:Usbcreator.png|300px]]
 
[[File:Usbcreator.png|300px]]
 
  
 
*Obtain a new good quality USB flash device. This should be at least 1 GB (8GB or 16GB seem to be popular choices).  USB2 is fine and anecdotally has proved more reliable.
 
*Obtain a new good quality USB flash device. This should be at least 1 GB (8GB or 16GB seem to be popular choices).  USB2 is fine and anecdotally has proved more reliable.
Line 57: Line 53:
 
*Select the version 'Local Zip' then browse to the location of the backup that you created earlier and open that.
 
*Select the version 'Local Zip' then browse to the location of the backup that you created earlier and open that.
 
*Next, make sure that you select your new USB Flash device for the destination, then click '<nowiki/>'''Write'''' and your backup will be restored to the new USB flash device.
 
*Next, make sure that you select your new USB Flash device for the destination, then click '<nowiki/>'''Write'''' and your backup will be restored to the new USB flash device.
 
  
 
[[File:Selectversion.png|400px]]
 
[[File:Selectversion.png|400px]]
 
  
 
*Shutdown the server. Remove the original USB flash device and replace it with the new one created above. Power on the server.
 
*Shutdown the server. Remove the original USB flash device and replace it with the new one created above. Power on the server.
 
*Once booted the array will not start and you will see the message 'Invalid, missing or expired registration Key' Click 'Registration Key'
 
*Once booted the array will not start and you will see the message 'Invalid, missing or expired registration Key' Click 'Registration Key'
 
  
 
[[File:Invalidkey.png|800px]]
 
[[File:Invalidkey.png|800px]]
 
  
 
*if you are not restoring from a backup (which would contain a copy of your licence key file) then copy your existing licence key file into the ‘config’ folder on the flash drive so that UnRaid knows you want to switch your licence to this new flash drive.
 
*if you are not restoring from a backup (which would contain a copy of your licence key file) then copy your existing licence key file into the ‘config’ folder on the flash drive so that UnRaid knows you want to switch your licence to this new flash drive.
Line 73: Line 65:
 
*Click 'REPLACE KEY'
 
*Click 'REPLACE KEY'
 
*'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''
 
*'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''
 
  
 
[[File:Replacekey.png|800px]]
 
[[File:Replacekey.png|800px]]
 
  
 
*Once you have received the email, copy the key file URL, then paste it into the box and click 'INSTALL KEY
 
*Once you have received the email, copy the key file URL, then paste it into the box and click 'INSTALL KEY
Line 82: Line 72:
  
 
===Manual Method===
 
===Manual Method===
 +
Prepare a new flash device using the procedure documented in the [[Articles/Getting Started#Manual_Method_.28Legacy.29|Getting Started]] guide.
  
====Legacy method - Windows and MacOS====
+
*Before removing the flash from the PC, copy the 'config' folder from the backup you made into the flash drive, overwriting existing files.
 
 
 
 
*Obtain a new good quality USB flash drive. This should be no less than 1 GB and no more than 32 GB in size. Plug it into your computer
 
*Format the USB flash device as FAT32 with MBR partition and label the drive UNRAID (in capitals)
 
*Extract the contents of your Unraid USB device backup and then copy and paste them into the root of the USB flash device labeled UNRAID.
 
*You will see 3 files called ''make_bootable'', one for running on Windows, Mac, and Linux. Choose the one appropriate to your operating system.
 
 
 
*''make_bootable.bat''  is to be run on Windows as administrator. This will make the USB flash device bootable.
 
*''make_bootable_mac''  is to be run on macOS. This will make the USB flash device bootable.
 
 
 
 
*Shutdown the server. Remove the original USB flash device and replace it with the new one created above. Power on the server.
 
*Shutdown the server. Remove the original USB flash device and replace it with the new one created above. Power on the server.
 
*Once booted the array will not start and you will see the message 'Invalid, missing or expired registration Key' Click 'Registration Key'
 
*Once booted the array will not start and you will see the message 'Invalid, missing or expired registration Key' Click 'Registration Key'
 
  
 
[[File:Invalidkey.png|800px]]
 
[[File:Invalidkey.png|800px]]
 
  
 
*Click on the option to 'REPLACE KEY' * Then enter the email address to which you would like to have the new key delivered to.
 
*Click on the option to 'REPLACE KEY' * Then enter the email address to which you would like to have the new key delivered to.
 
*Click 'REPLACE KEY'
 
*Click 'REPLACE KEY'
 
*'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''
 
*'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''
 
 
[[File:Replacekey.png|800px]]
 
 
 
*Once you have received the email, copy the key file URL, then paste it into the box and click 'INSTALL KEY
 
*Finished! You have replaced the USB flash device and the registration key. You will see a screen showing the date this key was registered and the next date on which your registration key will be eligible to be replaced again. Click 'DONE'
 
 
====Legacy method - Linux====
 
 
*Obtain a new good quality USB flash drive. This should be no less than 1 GB and no more than 32 GB in size. Plug it into your computer
 
*Format the USB flash device as FAT32 with MBR partition and label the drive UNRAID (in capitals)
 
*Extract the contents of the flash backup to a folder on your desktop or any location of your choice.
 
*Copy contents of the folder and paste them into the root of the USB flash device labeled UNRAID.
 
*Close the file browser window that has the USB flash device open in it.
 
*Go to the folder from where you just copied the files which you just pasted to the USB flash device.
 
*Open terminal and type
 
 
sudo bash
 
 
*Now drag the file ''make_bootable_linux'' from that folder into the terminal window next to what you typed in the last step. Hit enter.
 
*Enter sudo password
 
*Follow the prompts
 
*If the process should fail with the message
 
 
sudo: /tmp/UNRAID/syslinux/make_bootable_linux.sh: command not found
 
 
*Run the script a second time and this time it will complete. This will make the USB flash device bootable
 
 
Example
 
 
[[File:Linuxinstall.png|800px]]
 
 
 
*Shutdown the server, remove the original USB flash device and replace it with the new one created above, then power on the server.
 
*Once booted the array will not start and you will see the message 'Invalid, missing or expired registration Key' Click 'Registration Key'
 
 
 
[[File:Invalidkey.png|800px]]
 
 
 
*Click on the option to 'REPLACE KEY' * Then enter the email address to which you would like to have the new key delivered to.
 
*Click 'REPLACE KEY'
 
 
  
 
[[File:Replacekey.png|800px]]
 
[[File:Replacekey.png|800px]]
 
  
 
*Once you have received the email, copy the key file URL, then paste it into the box and click 'INSTALL KEY
 
*Once you have received the email, copy the key file URL, then paste it into the box and click 'INSTALL KEY
Line 162: Line 96:
  
 
'''NOTE:''' We strive to manually replace licenses ASAP. If you cannot replace your registration key yourself (having done so more than once per year) and you need access to your server right away, it is recommended that you first [https://unraid.net/download set up a new Unraid trial] with a new USB drive and then contact us to manually transfer your license.
 
'''NOTE:''' We strive to manually replace licenses ASAP. If you cannot replace your registration key yourself (having done so more than once per year) and you need access to your server right away, it is recommended that you first [https://unraid.net/download set up a new Unraid trial] with a new USB drive and then contact us to manually transfer your license.
 
  
 
'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device . Once this done, the previous (old) Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''
 
'''IMPORTANT:''' Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device . Once this done, the previous (old) Flash device is ''blacklisted and cannot be used with Unraid going forward. This action cannot be undone.''

Revision as of 18:48, 7 October 2021

Overview

There are two methods to use for swapping out your USB flash device. If you are using a PC or Mac, you should use the USB Flash Creator tool for the easiest and most streamlined experience. However in the event, this tool doesn't work for you, or you are using a Linux system, then please use the legacy method instead.

In either case, you will first need to have a full backup of your original Unraid OS USB flash boot device. (It is highly recommended that you always have an up-to-date backup of your Unraid USB flash device.)

  • This is done by going to the main tab in the Unraid webGui then clicking on 'Flash'.
  • From here you will see the option 'FLASH BACKUP', click this and a full zipped backup of your current flash drive will be downloaded to your Mac or PC.

NOTE: All the information that is specific to your Unraid installation is contained in the config folder on the flash drive.

IMPORTANT: Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is blacklisted and cannot be used with Unraid going forward. This action cannot be undone.

Backup flash drive.png

Why replace your USB Flash boot device?

There are a number of different reasons for which you may wish to replace your USB flash device running Unraid OS:

  • Current device is failing
  • Current device has failed, is lost or broken
  • Current device physically too large
  • Current device too slow or not enough storage.
  • Current device just getting old

In practice, speed is not normally an issue as Unraid runs from RAM once booted, and since they tend to be more reliable, USB2 devices are typically recommended over USB3. Want to select the best Flash device for Unraid? See this video!

Prior to replacing the current flash, it may be worthwhile to shut down your server, remove the flash, and insert it into a Windows or Mac computer. Using Windows scandisk or Disk Utilities in Mac, you should be able to try to "repair" the existing flash. If this operation works, you may want to consider continuing the use of the flash. If you've done this before and are still having issues with your flash, then replacement is probably necessary.

IMPORTANT: Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is blacklisted and cannot be used with Unraid going forward. This action cannot be undone.

What if I can't backup my device?

In the event that your flash device has failed and you do not have a backup, you can still reconfigure Unraid onto a new flash device and transfer your registration key to that device. Simply install Unraid to a new flash drive using the normal process and then either 'Install' your old key file, or equivalently, copy it to the 'config' directory on your USB flash device. The server will then notice a GUID mismatch and offer a Replace Key button on the Tools/Registration page.

To ensure no data loss after the server is booted, you will need to make sure you assign each disk to the array / cache exactly as it was prior to the failure. If you do not know which disks were assigned where, create a post in the forum for further assistance.

Changing a Flash Device Before Purchasing

If you're currently using a Trial key and you're ready to purchase, you may want to use a better flash drive for your paid key. Perform the same steps in this guide for replacing the flash and when done, purchase a registration key from the Tools > Registration page.

NOTE: Once you transfer a Trial configuration to a new flash device, you will be unable to start the array until you purchase a valid registration key (Trial keys can only work on the original device to which they were registered).**

IMPORTANT: Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is blacklisted and cannot be used with Unraid going forward. This action cannot be undone.

Using the Flash Creator

  • Once you have a backup of your Unraid flash device, you will need to use the Unraid USB Flash Creator tool to restore your backup to the new USB flash device. This can be downloaded for Windows or macOS from here .... Download USB Creator

Usbcreator.png

  • Obtain a new good quality USB flash device. This should be at least 1 GB (8GB or 16GB seem to be popular choices). USB2 is fine and anecdotally has proved more reliable.
  • Plug it into your computer and then run the Unraid USB Creator software.
  • Select the version 'Local Zip' then browse to the location of the backup that you created earlier and open that.
  • Next, make sure that you select your new USB Flash device for the destination, then click 'Write' and your backup will be restored to the new USB flash device.

Selectversion.png

  • Shutdown the server. Remove the original USB flash device and replace it with the new one created above. Power on the server.
  • Once booted the array will not start and you will see the message 'Invalid, missing or expired registration Key' Click 'Registration Key'

Invalidkey.png

  • if you are not restoring from a backup (which would contain a copy of your licence key file) then copy your existing licence key file into the ‘config’ folder on the flash drive so that UnRaid knows you want to switch your licence to this new flash drive.
  • Click on the option to 'REPLACE KEY' * Then enter the email address to which you would like to have the new key delivered to.
  • Click 'REPLACE KEY'
  • IMPORTANT: Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is blacklisted and cannot be used with Unraid going forward. This action cannot be undone.

Replacekey.png

  • Once you have received the email, copy the key file URL, then paste it into the box and click 'INSTALL KEY
  • Finished! You have replaced the USB flash device and the registration key. You will see a screen showing the date this key was registered and the next date on which your registration key will be eligible to be replaced again. Click 'DONE'

Manual Method

Prepare a new flash device using the procedure documented in the Getting Started guide.

  • Before removing the flash from the PC, copy the 'config' folder from the backup you made into the flash drive, overwriting existing files.
  • Shutdown the server. Remove the original USB flash device and replace it with the new one created above. Power on the server.
  • Once booted the array will not start and you will see the message 'Invalid, missing or expired registration Key' Click 'Registration Key'

Invalidkey.png

  • Click on the option to 'REPLACE KEY' * Then enter the email address to which you would like to have the new key delivered to.
  • Click 'REPLACE KEY'
  • IMPORTANT: Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device. Once this is done, the previous Flash device is blacklisted and cannot be used with Unraid going forward. This action cannot be undone.

Replacekey.png

  • Once you have received the email, copy the key file URL, then paste it into the box and click 'INSTALL KEY
  • Finished! You have replaced the USB flash device and the registration key. You will see a screen showing the date this key was registered and the next date on which your registration key will be eligible to be replaced again. Click 'DONE'

Notes About Replacing your Registration Key

You may replace your original registration key at any time. After replacing your license key once, you may replace your key using the online automated method after a further period of 12 months.

Should you need to replace it again within that 12 month period, please send an email to licensing@support.unraid.net to discuss your options. For expedited service, please email in with your old and new USB GUIDs and purchasing email.

NOTE: We strive to manually replace licenses ASAP. If you cannot replace your registration key yourself (having done so more than once per year) and you need access to your server right away, it is recommended that you first set up a new Unraid trial with a new USB drive and then contact us to manually transfer your license.

IMPORTANT: Replacing your Unraid USB Flash Device transfers the license to a new USB Flash Device . Once this done, the previous (old) Flash device is blacklisted and cannot be used with Unraid going forward. This action cannot be undone.

What to do if you have no backup and do not know your disk assignments

It is not unknown for users to report that their Unraid boot device has failed and that they have no recent backup and are not sure of their disk assignments. In such a case it is very important that you do not assign a data disk as a parity drive as this will cause data loss as Unraid overwrites it with parity data thus destroying its contents. It can also happen if you accidentally use an old backup and have increased the size of your parity drive and have re-used the old parity drive from that time as a data drive.

The procedure below exploits the fact that:

  • Any parity drive will not have a mountable file system so if you can identify which drive(s) have unmountable file systems then these are probably your parity drives.
  • Data drives previously used by Unraid will not have their contents wiped if you reset the array configuration.

If you find you have more unmountable drives than you had parity drives then you should ask for help in the Unraid forums.

In such a case the following steps can help you get your array drives back without data loss:

  • Create a fresh install of the Unraid flash drive as shown earlier.
  • Edit the file config/disk.cfg on the flash drive and if necessary change the
startArray="yes"
entry to
startArray="no"
This is to avoid any accidents that might result in a data drive getting over-written with parity information.
You can also achieve the same effect from the Unraid GUI via the Settings->Disk Settings option.
  • Go to Tools -> New Config and select the option to create a new array configuration.

At this point there are two ways to proceed:

Option 1

  • Assign ALL drives as data drives.
  • Start the array
  • Make a note of the serial numbers of drives showing as unmountable as these are probably our parity drives.

Option 2 If you have the Unassigned Devices plugin installed then:

  • Try to Mount each drive in turn to see which ones fail to mount.
  • Make a note of the serial numbers of drives showing as unmountable as these are probably our parity drives.

Now that you have identified the parity drives then:

  • Go to Tools -> New Config and select the option to create a new array configuration. This time it is advisable to use the option to retain all currently configured drives as this avoids the need to rearrange all drives (and thus reduces the chances of error.
  • Go to the Main tab and assign the drives as required with the correct drive(s) assigned as parity.
  • If you only had a single (parity1) drive then the order of the data drives is not important as far as parity is concerned so you can probably safely tick the "Parity is Valid" checkbox. With dual parity then since the parity and parity '2 drives use different calculations they are not interchangeable so you will need to generate parity from scratch on both drives.
  • Start the array to commit the drive assignments and you should see all your data drives have mounted and their contents are intact.
  • If you ticked the "Parity is Valid" checkbox then run a correcting parity check to make sure this was a valid assumption.

The above process will not necessarily mean the data drives are in the same order so you have any shares that have specific drive include/exclude then you will need to look at the contents of the individual data drives to make sure these are as you want them (and correct them if not)