SOLVED Replacing the USB key

Status
Not open for further replies.

perfopt

Dabbler
Joined
Dec 20, 2014
Messages
23
Hi

I want to replace the USB key that is used to run the FreeNAS OS out of. The original key I put in has a modeller profile, I got one with a smaller profile and would like to replace it. Also, I thought it would be a good idea to have a backup.

Reply to another post says to do a upgrade using the *same version* of FreeNAS [a]. I looked through the doc on upgrading and I have some questions:

Section 2.5.3 Upgrading using the ISO says to boot the machine with the new install media. Then to select the option of upgrade.

From the answer on thread [a] I guess I should boot the install media with the new USB key also connected to the machine (existing FreeNAS USB disconnected).

I have installed a jail and plugins in that jail. Are jails stored in the storage volume or on the USB key?

Are configuration files stored on the USB key or the storage volume?

Do I need to back up the configuration or any other stuff before attempting this? (Note: I already have a back up of my encryption key)


[a] https://forums.freenas.org/index.php?threads/replace-usb-drive-that-freenas-is-on.11013/

Thanks
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The FreeNAS configuration database is sorted on the boot device; all other configuration files are generated from that database. Jails are stored wherever you tell your system to store them, which is usually on the storage volume.
 

perfopt

Dabbler
Joined
Dec 20, 2014
Messages
23
So
The FreeNAS configuration database is sorted on the boot device; all other configuration files are generated from that database. Jails are stored wherever you tell your system to store them, which is usually on the storage volume.

So if I put in a new boot USB key and perform an "upgrade" on it I will not get a copy/backup of my existing boot decide correct?

How do I create a backup of my good device?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If you weren't using encryption, the answer would be to download your config database, do a clean install to the new USB key, boot from that, and upload the configuration. I don't use encryption, so I don't know how (or if) that changes things.
 

perfopt

Dabbler
Joined
Dec 20, 2014
Messages
23
If you weren't using encryption, the answer would be to download your config database, do a clean install to the new USB key, boot from that, and upload the configuration. I don't use encryption, so I don't know how (or if) that changes things.

OK. The GUI method of upgrading allows me to download the configuration. How do I upload the configuration to the new USB boot device?
 

perfopt

Dabbler
Joined
Dec 20, 2014
Messages
23
Update:

Here is how to replace the USB key on a FreeNAS 9.3 system if you have Encryption ON

USBK1 = Your Current USB
USBK2 = The new USB key you want to run FreeNAS out of
USBtmp = a third USB for the installer

Preparation:
1. Write the installer iso onto USBtmp like the manual says when preparing for install.
2. From the web interface Select Storage->Volumes and highlight your volume. In the bottom new buttons appear. Use the button to download key. This will download the geli key (NOTE: If you use encryption you should have downloaded and backed up this key anyway)
3. Go to System->General and download the config using Save Config

Steps:
1. Shutdown your system. Remove USBK1. Insert USBK2 and USBtmp.
2. Boot system using USBtmp and do a new install onto USBK2. Boot using the new USBK2. Log on using the web interface once running. If you look in Storage->Volumes it will show the volume as LOCKED
3. System->General use the upload button to upload the saved config. System will re-boot once updated.
4. Log on using web interface after re-boot. Go to Storage->Volumes. Highlight your encrypted volume click the button named "Volume status" in the bottom row. This will show you the list of disks in the volume. Make a note.
5. Go to Storage->Volumes and highlight the volume and from the buttons below select "Detach volume". In the popup deselect "Also delete the shares configuration".
5. Now the volume will be gone. Use the Import Volume button, select Yes in the popup for Decrypt disks. Next step select all disks that were there in the original volume. Using the upload button, upload the gel key and put in your passphrase (if you set it up)

This worked for me.
 

yonkoc

Explorer
Joined
Oct 26, 2011
Messages
52
Update:

Here is how to replace the USB key on a FreeNAS 9.3 system if you have Encryption ON

USBK1 = Your Current USB
USBK2 = The new USB key you want to run FreeNAS out of
USBtmp = a third USB for the installer

Preparation:
1. Write the installer iso onto USBtmp like the manual says when preparing for install.
2. From the web interface Select Storage->Volumes and highlight your volume. In the bottom new buttons appear. Use the button to download key. This will download the geli key (NOTE: If you use encryption you should have downloaded and backed up this key anyway)
3. Go to System->General and download the config using Save Config

Steps:
1. Shutdown your system. Remove USBK1. Insert USBK2 and USBtmp.
2. Boot system using USBtmp and do a new install onto USBK2. Boot using the new USBK2. Log on using the web interface once running. If you look in Storage->Volumes it will show the volume as LOCKED
3. System->General use the upload button to upload the saved config. System will re-boot once updated.
4. Log on using web interface after re-boot. Go to Storage->Volumes. Highlight your encrypted volume click the button named "Volume status" in the bottom row. This will show you the list of disks in the volume. Make a note.
5. Go to Storage->Volumes and highlight the volume and from the buttons below select "Detach volume". In the popup deselect "Also delete the shares configuration".
5. Now the volume will be gone. Use the Import Volume button, select Yes in the popup for Decrypt disks. Next step select all disks that were there in the original volume. Using the upload button, upload the gel key and put in your passphrase (if you set it up)

This worked for me.

Thank you, perfopt!!!

I was bashing my head trying to figure out why on earth is my encrypted pool NOT showing up when I add my geli.key and password. Step 3 of the import was just a blank dropdown menu. Your step 5 is what allowed me to migrate to an SSD. Of course, it is worth nothing that one should make snapshots of the shares so they can be easily recreated.

Thank you once again!
 
Status
Not open for further replies.
Top