FreNAS 8.2.0-RELEASE

Status
Not open for further replies.

iposner

Explorer
Joined
Jul 16, 2011
Messages
55
Upgrade FAILED

It should take about 1-2 minutes.

OK - So after waiting for 20 minutes realising something wasn't working, I went into the GUI and did a shutdown. I then downloaded the full ISO install, burnt a CDROM, put it and the usb key from my freenas into the pc, booted the pc and went through the upgrade.

This is where things went visibily wrong - I got a message saying that the database upgrade went wrong and that it was attempting to roll back the changes, but might not be able to roll them all back. I let the upgrade of the usb key complete, shutdown the PC and put the USB key back in the nas.

Booted the nas and unsurprisingly I've got many errors relating to missing columns in the database schema. So my database is hosed. What now?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Did you keep a backup of your database? If not.. you might be screwed. Someone mentioned a file you can try using.. perhaps one of the senior admins can help you with that "one file". It's a backup of the database or something like that on the USB.

This is why database backups are so good ;) I think I'll go add this to my noobie presentation in my sig. I've seen several people in recent months not have a backup. I keep my backup encrypted and in my Dropbox so I have an offsite copy if I need it ;)
 

iposner

Explorer
Joined
Jul 16, 2011
Messages
55
Upgrade FAILED

It should take about 1-2 minutes.

CORRECTION: Actually, my last post was slightly incorrect - the usb key upgrade went correctly, but when I put the key in the NAS and booted, the database upgrade failure occurred during the first boot.
 

iposner

Explorer
Joined
Jul 16, 2011
Messages
55
Did you keep a backup of your database? If not.. you might be screwed. Someone mentioned a file you can try using.. perhaps one of the senior admins can help you with that "one file". It's a backup of the database or something like that on the USB.

This is why database backups are so good ;) I think I'll go add this to my noobie presentation in my sig. I've seen several people in recent months not have a backup. I keep my backup encrypted and in my Dropbox so I have an offsite copy if I need it ;)

My understanding is that Freenas keeps the last version of the OS on the USB key so that rollback is possible. I just need to know how to do it.

If not I need to know how to re-install Freenas on the USB and then import my RAID-Z array.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm not sure what exactly you mean by "rollback" of the OS. I don't believe any backup of the operating system is kept on the key anywhere.

If you do a fresh install you can go to the GUI and choose import disks and the zpool should mount. Of course, you will lose all of your user settings, share settings, network settings, etc.

See section 6.3 for info on importing your zpool.
 

iposner

Explorer
Joined
Jul 16, 2011
Messages
55
I'm not in a rush to get myself into a further mess. I need to know from someone that KNOWS FOR SURE whether there's a rollback mechanism built into the USB key. I can wait for the US guys to get out of bed before taking any drastic decisions. Thanks for your help anyway noobsauce80.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Noobsauce80, I know what he means. There are 2 partitions (4 total) that have FreeNAS on them. It's kinda like Tivo, when you do a firmware update it writes the update to the other partition and makes that the new default boot partition.

So, Iposner, when you boot FreeNAS you'll see a screen right at the start that says:

F1 - FreeBSD
F2 - FreeBSD
Fx - possibly other disks will be listed

This is where you can 'rollback' to the previous install. I'm not sure which one is previous though...

I would try looking in the documentation:

EDIT:

Here it is:

http://doc.freenas.org/index.php/Upgrading_FreeNAS

Scroll down to the bottom.
 

iposner

Explorer
Joined
Jul 16, 2011
Messages
55
protosd - While you were writing that post, I had taken my usb key out and mounted it in a Linux box to take a look at the partitions on it using "disk utility". As you rightly say, there are four partitions on it, two that are around a GB each, are marked as FreeBSD of unknown (to Xubuntu anyway) filesystem and two additional smaller partitions formatted in UFS.

So there is a backup mechanism built in. Now I just have to figure out how to invoke it!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm not in a rush to get myself into a further mess. I need to know from someone that KNOWS FOR SURE whether there's a rollback mechanism built into the USB key. I can wait for the US guys to get out of bed before taking any drastic decisions. Thanks for your help anyway noobsauce80.

I was just about to add an edit to say don't do anything out of haste. Taking the time to do it right the first time is the key to success. I know it can be difficult to sleep if you are worried all your data might be lost, but do it right the first time.

protosd- That's pretty slick. I knew there were 2 options, but I wasn't sure what exactly they were for, except in extreme cases of fubar. Put a wrinkle in my brain today ;)
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi noobsauce80,

That's how the updates work. When you upload a GUI update file it gets written out to the "other" OS partition and it gets marked active. When you reboot that's what will boot next.

One of the things I like about pfsense (a FreeBSD-based firewall, thing FreeNAS for networks) is that there's an option to "sync" the older OS partition up with the new one. So for example you update to FN-8.2-p1, you might have an old 8.0.4 version sitting on the other (backup) partition. Once you are happy with the new version you could copy over the new version so you have a second copy of the current OS handy.

-Will
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Hi noobsauce80,

That's how the updates work. When you upload a GUI update file it gets written out to the "other" OS partition and it gets marked active. When you reboot that's what will boot next.

One of the things I like about pfsense (a FreeBSD-based firewall, thing FreeNAS for networks) is that there's an option to "sync" the older OS partition up with the new one. So for example you update to FN-8.2-p1, you might have an old 8.0.4 version sitting on the other (backup) partition. Once you are happy with the new version you could copy over the new version so you have a second copy of the current OS handy.

-Will

That is awesome! Is there a guide for how to update the "old" partition with the "new" partition? Being able to run a script or something to do a backup when you feel like it could be very handy!
 

iposner

Explorer
Joined
Jul 16, 2011
Messages
55
OK - So checking out the documentation, it says press F2 at the F1/F2 menu to boot into the old version. Only thing is that I press F2 and all I get is "Boot: F2 ###########" (with the "#" symbol being added every second to the screen) and no other action.

I've also now read the documentation about Saving the Config first - Hmmmm... if only I had read that first - perhaps that button should be added to the upgrade screen guys?

So what I'm going to do is to find another USB key and install Freenas on that and try and import my array.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
protosd - While you were writing that post, I had taken my usb key out and mounted it in a Linux box to take a look at the partitions on it using "disk utility". As you rightly say, there are four partitions on it, two that are around a GB each, are marked as FreeBSD of unknown (to Xubuntu anyway) filesystem and two additional smaller partitions formatted in UFS.

So there is a backup mechanism built in. Now I just have to figure out how to invoke it!

Just in case you missed it, because I went back and edited my post, here's the link again about booting to the other partition:

http://doc.freenas.org/index.php/Upgrading_FreeNAS

It's at the very bottom of the page.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I've also now read the documentation about Saving the Config first - Hmmmm... if only I had read that first - perhaps that button should be added to the upgrade screen guys?

Yeah.. I was hopeful you would have the config. It seems alot of people either don't notice the save config or just don't care. I keep every config I save just in case I find out a few days later the config is corrupt I have older versions to go by. The files name themselves automatically with the date and time so it's easy to organize them.

I've added the saving the config to the noobie presentation so hopefully we can save a few people the pain of not having a config. Sorry it didn't work out better for you.

Just to be on the safe side you could test your key to see if it has any problems. I've used Flash Drive Tester before and I found a USB key that had some bad memory sections in it. I had a bunch of office documents on a thumbdrive and once in a while 1 would randomly be corrupted. You may want to test your key before you start loading it up with a new config just to make sure the key isn't bad.

Check out: http://www.vconsole.com/client/?page=page&id=13
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Arrgghh, I guess we both posted at the same time again!

I see you saw the link!

I'm not sure why it's not working though.

If you install on another key, you could plug in the old one after you boot, mount the old partition, and grab the database out of /data.

It's called freenas-v1.db, it'll have your settings, but you'd need to copy it to a key with the same version of FreeNAS that it came from. Each database knows which version of FreeNAS it came from.

It's getting a little late for me to go into more detail, so hopefully you understand enough to get the idea.
 

wirehub

Cadet
Joined
Mar 21, 2012
Messages
7
Ok, that is an issue that hits going from RELEASE to RELEASE-p1.

Open the webshell and do:

# cd /var/tmp/firmware
# cat firmware.img | sh /root/update && touch /data/need-update && reboot



many thanks, worked for me, alle restored and happy again
 

iposner

Explorer
Joined
Jul 16, 2011
Messages
55
Right - now installed a clean brand-new 8.2.0 on another usb key, booted nas and mounted the disks. All my data's fine, which is all I really care about. I'll set up all the services again, but it's good to know that the core-concept of keeping OS and data separate works as it should.

Thanks to all those who gave input.

It would also be a great help if the Save Config button appeared as step 1 in the GUI upgrade process - hopefully somebody will pick this up and implement it!
 

microm

Cadet
Joined
Jan 6, 2012
Messages
2
Bonjour,

Jul 21 20:59:37 freenas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Jul 21 21:00:12 freenas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Jul 21 21:01:57 freenas last message repeated 3 times

Probleme Instalation

Desole je parle pas Anglais
 

daquirm

Cadet
Joined
Jul 22, 2012
Messages
1
How long should it take? It's just that I've been sitting here looking at the GUI upgrade screen for 15 minutes now...

Unfortunately I have the same exact HW setup, but I just use 3 HDDs instead of 4. I tried the WebGUI upgrade from 8.2.0 beta 4 to 8.2.0 release P1, but the upgrade took insanely long and it didn't finish. I was scared to reboot. But after I did it, the upgrade went smoothly. So there might be eventualy some bug regarding the upgrade FW dialog window as it might not finish properly.
 
Status
Not open for further replies.

Similar threads

J
Replies
63
Views
32K
J
Replies
27
Views
11K
J
Replies
0
Views
3K
jpaetzel
J
J
Replies
0
Views
2K
jpaetzel
J
Top