Upgrade failed, config unable to restore

Status
Not open for further replies.

Pixeltje

Dabbler
Joined
Feb 20, 2012
Messages
32
Hi, and please help me on this one; I'm really out of my depth here.

Yesterday I thought it would be a good time to change the old USB flash drive in my Freenas box to the new one I bought recently. Before I was to change the USB drive, I decided to upgrade from 9.2.xx to 9.3 first. Probably I should not have done this, because after I applied the update through the GUI, the NAS became ' unreachable' according to my browser.

After a bit of fiddling with a monitor I happend to have lying around I noticed that during booting Freenas said something about a NGINX failing and thus I decided to install freenas 9.3 on the new USB drive. Went fine, no problems at all, except that now I'm not able to apply my config file, because it is saved from Freenas 9.2.xx.

I'm not very worried right now because as far as i'm concerned my data is still save, but the more I tinker with the NAS, the more i'm worried something might go wrong and destroy my data..

Does anyone know how to apply my old settings through the saved config file? Or should I just try to downgrade to 9.2.xx again and reload my config, then upgrade to 9.3 and hope for the best?


Info about my NAS box;
Freenas runs from (the new) USB flashdrive which is 32G, which has been formatted as described here (doc.freenas).
System specs:
Intel DH67CF (B3) motherboard
Intel G630T CPU
Corsair XMS DDR3 memory (8G)
4 disks (two WD's, two Seagates) of 2T each.

Please let me know when I forgot important info.

Thanks in advance,
 
Last edited:

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Just upload your saved config from the 9.2 to your new 9.3 setup, there is no problem to do that ;)
 

Pixeltje

Dabbler
Joined
Feb 20, 2012
Messages
32
Apparently there is some trouble in doing this.. I've uploaded the config file through the webgui, and while rebooting the output on the screen I had to the NAS said something about failed database update.

Is this indeed related to the config file of perhaps something else hase gone wrong?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
I've done this, as all the members who have upgraded to the 9.3, no problem.

We need the exact error message to be able to help, can you post it?
 

Pixeltje

Dabbler
Joined
Feb 20, 2012
Messages
32
Ok, i'll try again tonight as soon as inget home from work today. If an error occurs i'll post it here..
 

Pixeltje

Dabbler
Joined
Feb 20, 2012
Messages
32
Ok, i've tried again and this time stayed with the NAS until it showed the following message;
Saving current /data/freenas-v1.db to /data/freenas-v1.db.bak
Moving uploaded config to /data/freenas-v1.db
Applying database schema changes
manage.py failed
Reverting to previous state
gpart: Invalid number of arguments
Database upgrade failed: check /data/update.failed for more details.

Update.failed sais this;
Code:
Migration 'sharing:0033_add_periodic_snapshot_task' is marked for no-dry-run.
! Error found during real run of migration! Aborting.

! Since you have a database that does not support running
! schema-altering statements in transactions, we have had
! to leave it in an interim state between migrations.

! You *might* be able to recover with: (migration cannot be dry-run; cannot discover commands)
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS (one that supports DDL transactions)
! NOTE: The error which caused the migration to fail is further up.
Error in migration: sharing:0033_add_periodic_snapshot_task
Traceback (most recent call last):
File "/usr/local/www/freenasUI/manage.py", line 42, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
ignore_ghosts = ignore_ghosts,
File "/usr/local/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 331, in migrate_many
result = self.migrate(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
result = self.run(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
return self.run_migration(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 84, in run_migration
migration_function()
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 60, in <lambda>
return (lambda: direction(orm))
File "/usr/local/www/freenasUI/../freenasUI/sharing/migrations/0033_add_periodic_snapshot_task.py", line 28, in forwards
)[0]
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 132, in __getitem__
return list(qs)[0]
IndexError: list index out of range
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Run your config file through this...
https://forums.freenas.org/index.php?threads/nightly-check-of-freenas-database.19999/

Run the command manually, but copy your config file to the server and check it that way. If it fails there's no hope for your config file. If it succeeds at least there is still *some* hope. When you say 9.2.xx which version in particular? Do you know? I only recommend upgrading from 9.2.1.9 to 9.3.
 

Pixeltje

Dabbler
Joined
Feb 20, 2012
Messages
32
I was using 9.2.1.5 if i remember correctly. Would it help at all if I'd rollback to 9.2.1.5 and then try to upload the config file?

Ok, i've run the command at the top of your post through terminal, on one of the config backups stored locally; here is what is said:
Code:
MBPR-Sjaak:~ Sjaak$ cd desktop

MBPR-Sjaak:desktop Sjaak$ sqlite3 config_nas-16-02.db "pragma integrity_check"

ok

MBPR-Sjaak:desktop Sjaak$
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Not sure. I'd try just going to 9.2.1.9 and upload your config, then try going to 9.3 again from there.
 

Pixeltje

Dabbler
Joined
Feb 20, 2012
Messages
32
Ok, i'll be trying that as soon as the download of 9.2.1.9 completes (takes forever for some reason..?) but I still like to know why this error occurs. I mean, the config file is OK, the upgrade went well, the only thing that has changed since the config backup from 9.2.1.5 and now is the USB drive on which Freenas lives. That was an old 8GB model, and is now replaced by a shiny new 32GB model. Still attached to the same USB 2.0 port, as I know my mobo has trouble with USB 3.0.

So as far as I can see, nothing has realy changed, but still i'm having this error, also it doesn't seem to matter whichever old config file i'm choosing for upload. I noticed that there are more threads regarding this on the forums, but there seems to be no solution nor is there a cause, am I right?


On a sindenote; I'm using the guide from 9.3 to flash the installation files tot a second USB drive, this however seems not to be working for the 9.2.1.5 release, as i'm getting a ' insert boot device and pres any key' error. With 9.3 that error doesn't display and the system boots fine from the USB drive to install 9.3.. What am i doing wrong?
 

Pixeltje

Dabbler
Joined
Feb 20, 2012
Messages
32
Ok, so far so good; I've downloaden FN 9.2.1.9 and made it boot from an old USB drive i had lying around. Installed it but first time there was an ' error 19' due to the fact that the USB drive i installed freenas to, was still formatted as the FN 9.3 format. Therefore i've wiped that to become a 1 partion MBR drive, installed 9.2.1.9 to that, booted fine.

Uploaded config through webgui, and this time the changes applied just fine. So now the system is running as before!

----
Oh for crying out loud! Went through the upgrade with no problems whatsoever, at one point the installer tells me that the config file has been saved and will be, if necessary, converted to the new format. Guess what; on first boot i'm presented with the old error as seen above. Back to square one, I'm getting quite frustrated here :(

The reports from /upgrade.failed are the same as before, so apparently there's something going wrong with the conversion from the 9.2.x layout on the USB drive, to the 9.3 version. Could this has anything to do with my hardware not being able to write to the new ZFS format on the USB drive?

For now i'm reverting, again, to 9.2.1.9 and will just keep using that until i've found out what's causing the problem..
 
Last edited:
Status
Not open for further replies.
Top