changing USB stick and upgrade?

Status
Not open for further replies.

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
I have a freenas box running an older version (9.1). The USB drive it is on is a bit old and I'd like to change it. I'd also like to upgrade to the most recent version. I know how to install the latest version on the new USB stick. And I'd assume I also want to export my configuration to import into the new USB stick, correct? Also, do I have to detach my volume before changing the USB stick with the upgraded freenas version on it and then import it?

This is what I was thinking the steps I'd have to follow would be, but not sure.
  1. Detach volume
  2. Shut the machine down
  3. Change the USB sticks
  4. Boot back up into the new freenas
  5. Auto Import volume
  6. Import configuration

Yes? No?
Thanks.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Follow the manual for a failed USB stick. ;)
 

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
My skills are lacking do you have a link?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
That covers burning a new image, but doesn't address any concerns with replacing a USB stick and restoring the configuration database. I searched for failed usb stick in the manual and didn't see anything either.

My understanding was that you would just write the image to the new stick, backup the database, shutdown, swap in the new stick, boot, import config and volumes, and reboot for good measure.

I did find this page: http://doc.freenas.org/index.php/Upgrading_FreeNAS
But that still does not address the concerns of changing sticks while upgrading the release.

For example, do you need to upgrade via the web-GUI first in order to properly update the database? Or does the database upgrade occur when restoring the configuration as well?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
I would upgrade via the web GUI first, just to be safe.
Regardless of which way you decide to go though, do save the config file before you do anything.
 

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
http://doc.freenas.org/index.php/Burning_an_IMG_File
People these days really have to be spoon-fed every step of the way, lol. A simple search gets you there.

You know, if you are going to be an ass at least provide the actual information to answer the question. I am more then aware not to create the USB stick. I'm concern about replacing the USB stick with a completely different one. Things like the configuration file being moved over and MOST IMPORTANT if the volume needs to be detached first, like you would do if you were moving from say FreeNAS to a Solaris variant line OmniOS. have you ever done something like that before? Because I have. And I've also heard of people having issues when trying to import the volume afterwards because it still is assigned to the old system and causing issues that I'd like to avoid.

I've yet to see the section of the manual that explains replacing a failed USB stick and my searching didn't result in any answers. Believe it or not, I do search quite a bit before posting. Which is why I barely post here yet still have multiple systems in place using many of the features others can't seem to make work.

Now, if someone can either confirm my steps, provide correct steps, or point me to the actual replacing failed USB section of a manual that would be great.

Thanks.
 

Dennis K.

Explorer
Joined
Feb 17, 2014
Messages
70
An easy way would be dd'ing the content of the old USB stick to the new one (The new USB stick must be equal or greater in size). This way FreeNAS doesn't even know you replaced the stick.

Edit: I, too, can not find any documentation on that topic.
 
Last edited:

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
I've seen reports that dd'ing doesn't actually work. Note they it's entirely possible that I'm just reporting bad information in a forum-based game of tech support telephone.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
On my FreeNAS machines I have a cronjob that copies /data/freenas-v1.db to my zpool. I've had a USB stick fail before and recovery was as simple as putting in a new USB stick (with the latest FreeNAS image), auto-importing my pool, copying the config file from my pool to my workstation, and applying the config through the webgui. When all was said and done, I finished the process in about 15 minutes.
 

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
Ok. Then it seems like detaching the volume isn't a necessary thing in this case.
I've seen this issue with people moving between OS platforms or moving disks to new hardware.
The error you see when trying to import is something like "in use by another machine".

HERE is someone on this forum who saw this problem. I promise, I don't ask these things for no good reason.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Ok. Then it seems like detaching the volume isn't a necessary thing in this case.
I've seen this issue with people moving between OS platforms or moving disks to new hardware.
The error you see when trying to import is something like "in use by another machine".

HERE is someone on this forum who saw this problem. I promise, I don't ask these things for no good reason.

My preferred method of upgrading FreeNAS is to keep 2 USB sticks per machine. One stick is in production (connected to the server) and one in my desk. When I am ready to upgrade I copy the img file to the stick in my desk, download my config file, power off my server, swap sticks, boot, and upload config. I don't touch the old USB stick until it's time for the next upgrade (in case I need to roll-back to the previous version quickly). I haven't had any problems yet.
 

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
That is actually one of the other reasons I wanted to do it this way, in case something isn't working correctly I can jump back.

I have no problem maxing out 1GbE over CIFS and performance has been good but the release I'm running is before the addition of the various plugins. I want to try out the crashplan plugin and samba 4 addition. But you never know it might cause other issues and having the old stick would help.

For those that had relavent info thanks. Saved me some time setting up a virtual box to test on.
 

robles

Explorer
Joined
Jul 29, 2014
Messages
89
Before I knew about /data/freenas-v1.db, I used dd to create a backup of my USB to another one. I only had to make sure it was the exact same model, even bought the same color to be sure haha.

The production USB became the backup and it's now running in the new dd target, but yes, dd does work if you do an exact copy to an exact same model.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
It's good to hear that dd can indeed make a useable backup. Thanks for killing the myth.
 
Status
Not open for further replies.
Top