Problem restoring 9.2.1.9-config to 9.3

Status
Not open for further replies.

tmueko

Explorer
Joined
Jun 5, 2012
Messages
82
We first tried an GUI-Upgrade which fails.
Than we tried an update from iso: fail.

We did a clean 9.3 install and tried to restore the config:
"Database upgrade FAILED: check /data/update.failed for more details.
I think the real Problem ist
"
Error in migration: system:0072_sysctl_to_tunable"
I looked at the database dump and found this:

CREATE TABLE "system_tunable" ("tun_enabled" bool NOT NULL, "tun_var" varchar(50) NOT NULL UNIQUE, "tun_value" varchar(50) NOT NULL, "tun_comment" varchar(100) NOT NULL, "id" integer PRIMARY KEY);
INSERT INTO "system_tunable" VALUES(1,'ipmi_load','YES','',1);
INSERT INTO "system_tunable" VALUES(1,'vfs.zfs.arc_max','10490665788','Generated by autotune',2);
INSERT INTO "system_tunable" VALUES(1,'hw.intr_storm_threshold','9000','',5);
INSERT INTO "system_tunable" VALUES(0,'kern.ipc.maxsockbuf','4194304','',6);
INSERT INTO "system_tunable" VALUES(1,'xhci_load','YES','Aktivierung USB3',7);


I removed these lines from the config and now i could upload the config and the migration went fine.

sqlite3 <freenas-config>
delete from system_tunable;
logout;


Maybe it helps others with the same Problems.
 

Attachments

  • update.failed.gz
    1.9 KB · Views: 233
D

dlavigne

Guest
Thanks for the workaround. Please also create a bug report at bugs.freenas.org so that the underlying issue can be fixed and post the issue number here.
 

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
Upgrading from 9.2.1.9 to 9.3 via webgui has hosed my NAS too, and I don't have a monitor handy. Hurrah! Knew I should have waited.
 

Jwolff

Cadet
Joined
Sep 17, 2013
Messages
2
Have you tried to Login via ssh. Even thou our System was messed up, we still could login and fix the issue like described above.
 
Joined
Sep 9, 2013
Messages
29
I'm able to log on via ssh. How do I go about editing the config file? I have no idea where it is. Thanks!
 
Last edited:

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
I think it's gone to the new config menu at a guess. The ip is different to the one I set usually and no Web interface or ssh.

Would there be an existing config db stored on physical disk away from the main USB or am I living in hope? I have a 9.2.1.7 db config file handy. Maybe I'll have to revert back to that version and somehow inject the config in.


Or connect a monitor and keyboard and start from scratch I guess. Bah! Why has a simple and usually painless webgui upgrade caused this.
 

tmueko

Explorer
Joined
Jun 5, 2012
Messages
82
When you does not have activated ssh you are doomed :-|. May you can try to start the old version from the other partition...

The config files is /data/freenas-v1.db.
You must make / writable first:
zfs set readonly=off freenas-boot/ROOT/default
(check if this is the right partition fist)
python /usr/local/www/freenasUI/manage.py migrate --db-dry-run
then see, if it is the same problem like mine...
and
python /usr/local/www/freenasUI/manage.py migrate --all
good luck!
 

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
I can't even write an image to USB right now. Even 9.2.1.7 I'm trying to write in a VM because I have a config.db for it, it completes writing to USB, and then complains when I boot it from plop in another VM, that the GPT table is corrupt or invalid and dumps me to a mountdisk prompt.

I swear I've used the same sticks and just written an image to it and booted off it headless before.
 
D

dlavigne

Guest
What program are you using to write the image? You need something that wipes the disk (like dd) to get rid of the zfs gpt stuff. Windows writers won't do that.
 

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
I've used lowvel (low level format) to wipe the first 5% of the usb stick and then installed in a VM, or written the image using windiskimage which I've used before, on the same usb stick that I've used for years before.

I don't have access to dd here, but is there any other low level dd tool for windows you'd recommend?
 

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
I was having problems also with the prompt of having gpt messed up. I believe it was somehow caused by the selection of boot device in my bios. I didn't save it as primary boot device, but forced bios to boot from the stick for once instead. I believe that might have messed up the disk access somehow.

Long ago, when I was involved with FreeBSD kernel development in company products, I recall we had similar problems. It was caused by FreeBSD asking BIOS for the boot devices. I remember we had to go around those issues in code. At some point Linux went further, and did not care about what BIOS says about the disk order. Likely FreeBSD has changed the logic also to probe itself for the drive order.

Just telling this due I believe there might be a conflict on what the BIOS, bootloader and kernel thinks is the drive order. So I ended up not using the "boot once from stick" option, and my install started to work last night.
 

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
Well, on the real hardware (with no monitor sigh) I can see it's got a DHCP IP and has port 80 open but I can't connect to it. Wonder what it's doing.


Telnet to port 80
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.4.4</center>
</body>
</html>
 
Last edited:

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
Boots in a VM fine. I've set static IP of what it was before, and now I try it again on the real hardware (HP Microserver N36L) and ... nothing.

Having difficulty believing I can't even boot off a plain image with no existing config and get to a web interface. I did this to upgrade from N4F to FN 9.x in the first place! Completely headless!
 
Last edited:

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
Doing a killdisk on the whole USB drive and rewriting it with 9.3 didn't even fix the corrupt GPT issue. Sigh.
 

tmueko

Explorer
Joined
Jun 5, 2012
Messages
82
I use VirtualBox and import the USB-Stick to the VM as raw device (btw. you should have access to dd if you have a xBSD or Linux).
I use a Mac but here is how to Import the USB-Stick as a raw-device to windows:
http://romaimperator.com/?p=29 (first hit on goole+createrawvmdk+windows).

I 've seen that problem before and I thing dlavigne is right: Remove the whole partition table! Create an old DOS format on it and write some data on the stick. Then try it again.
 

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
Yeah, I have been erasing the partition table don't worry.

I put it in the microserver again just now and actually got a webgui on a dhcp address. Went to change to static and locked myself out again.

Hurrah. I will need to get a monitor really to sort this out I think.

By the way, is the config file stored on the image or is it going to store it on the ZFS mirror I have on there? Image to begin with surely?
 

kernow5000

Dabbler
Joined
Dec 9, 2014
Messages
12
Well, loaded my config and I now have plex and transmission frontends available on 192.168.0.251/2 but no web interface on 192.168.0.250! Hmmm

Samba shares are up but are asking for a login where they didn't before either. I wonder how I'm going to get to the webgui.
 
Status
Not open for further replies.
Top