Did I destroy all my data? I am really, really worried. Need help.

Status
Not open for further replies.
Y

YpsiNine

Guest
Hello,

I just had the worst day in a long time.

It all started when I thought I would up the security of my NAS a notch by using HTTPS instead of HTTP to access the Web GUI. So I went along and created a CA and then a certificate, configuring FreeNAS to use HTTPS instead of HTTP. I did not choose the HTTP+HTTPS option. The problem arose quickly: there was no way of accessing the Web GUI through HTTPS, there was always an error about the certificate similar to this thread: Malformed certificate. And obviously I could not access through HTTP either since I chose only the HTTPS option.

So I started reading the forum about solutions. Someone suggested to simply Factory Reset FreeNAS, so I started Putty and could connect and then I ran the program that one sees when looking at the monitor physically connected to the NAS, where you have 14 or so choices. I chose reset to factory settings. So far so good.

Now, after the system rebooted, it simply would not go any further. I got an error message which is just looping, it went like this:
freenas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs (see pic1.jpg)
Over and over and over and over. So I had to read up on this error, someone said it's related to locale, some other people said it's related to the network. So i unplugged the network cable and tried again, but same problem. When trying to access the Web GUI with the network cable plugged in, all I see is some error message:
{"message": "Error: no such column: system_settings.stg_guicertificate_id", "events": [], "error": true} (see pic2.jpg)


At this point I started to panic. I took out the USB key where FreeNAS is installed and copied the whole drive by using the "Read" function in Win32DiskImager. I have no idea if this even works, but it copied all 32 GB (29,8 GB) of the drive.

Ok, so I continued to read. I figured I would try a 2nd USB key with the full .iso on it and use the "Upgrade" function. But this didn't work either, the following error occured after entering a password for root:
freenas-install/boot/default no such file or directory
Then it says the install fails and it goes back to the initial screen where you can install, restart or shutdown etc. I tried to find some info on this error message but I was unsuccessful. I did not dare to do a fresh install because I am worried that my data will be lost forever.

So this is where I am now. I am starting to panic. The install is the latest stable 9.3 build, I think it had a date in late September.

Can someone please help me?

Hardware:
Supermicro mb
Intel 4350 cpu
16 GB ECC ram
8 x 2 TB disks, 8 x 3 TB disks, 4 x 4 TB disks
 

Attachments

  • pic1.jpg
    pic1.jpg
    349 KB · Views: 270
  • pic2.jpg
    pic2.jpg
    643.8 KB · Views: 257

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Highly unlikely your data is gone. Try doing a clean install to a new USB stick, and see if it will import your pools (just cancel out of the wizard). If it will, then restore your saved backup of your config file (you do have a backup, right?)
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
The easiest and quickest way to get operational again is to perform a fresh installation and import your pool. You could go poking through the SQLite database, but that's not recommended at all. You might get lucky on the forums or in the chat room on Freenode (#freenas) who can guide you through the not so recommended way.
 
Y

YpsiNine

Guest
Highly unlikely your data is gone. Try doing a clean install to a new USB stick, and see if it will import your pools (just cancel out of the wizard). If it will, then restore your saved backup of your config file (you do have a backup, right?)
You mean buy another stick and then install fresh on that one, then import the pools from the old stick somehow?

I do not have a backup of the config, if by config you mean general settings (whatever you can adjust in the Web GUI).
The thing is, I finished the migration of data to this new system just a few days ago. It's been a couple of weeks or so to get all the data onto this NAS.
So I was kind of "finalizing" the configuration by changing to HTTPS, hence no backups. Not that I am defending myself, but that's how it is.
In any case, I am not worried about having to reconfigure the "general settings", what I am worried about are my pools/data.
But thank you so much for the suggestion, I will buy a stick tomorrow and see how it goes.

Best,
Y
 
Y

YpsiNine

Guest
The easiest and quickest way to get operational again is to perform a fresh installation and import your pool. You could go poking through the SQLite database, but that's not recommended at all. You might get lucky on the forums or in the chat room on Freenode (#freenas) who can guide you through the not so recommended way.
Your suggestion is very similar to danb35, unless you mean do a fresh installation on the same stick? I thought that erased _all_ data?
I do not have enough knowledge about SQLite so I will avoid that option. Thanks a bunch! :)
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
You mean buy another stick and then install fresh on that one

Yes.

then import the pools from the old stick somehow?

No, not really, the pools aren't on the USB stick (that's why you didn't lose your data). However the settings are on the USB stick. You should have made a backup of your config file but if it's not the case you can still recover your data, don't worry. You'll either need to redo the config or to recover an automatic backup of the config file after you've imported your data pool on the new install.

Start by reinstalling a fresh ISO on a new USB stick ;)
 
Y

YpsiNine

Guest
No, not really, the pools aren't on the USB stick (that's why you didn't lose your data). However the settings are on the USB stick. You should have made a backup of your config file but if it's not the case you can still recover your data, don't worry. You'll either need to redo the config or to recover an automatic backup of the config file after you've imported your data pool on the new install.

Start by reinstalling a fresh ISO on a new USB stick ;)
Hmm I am slightly confused now, you say the pools aren't on the USB (I assume they are stored on the disks themselves then).
But then you say either a) redo the config or b) recover an automatic backup of the config file after you've imported your data pool on the new install.

If they are not on the USB and my assumption is correct that they are stored on the disks, then in principle I should be able to just wipe the existing stick and do a fresh install, then import the pools somehow from the disks?

Man, I am so tired now. But this gives me hope! :)
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
I should be able to just wipe the existing stick and do a fresh install, then import the pools somehow from the disks?

Yes, exactly.

Once you've access to your data we'll see what we can do for the config ;)
 
Y

YpsiNine

Guest
Yes, exactly.

Once you've access to your data we'll see what we can do for the config ;)
Oh my, this clears up a lot of my worry. I am not sure exactly what needs to be "cleared up for the config" though, I assume it is more to it than just Import Volume (just read this here)?
If it matters, the 8 x 2 TB disks is a 6+2 raidz2, the 8 x 3 TB disks is a 6+2 raidz2 and the 4 x 4 TB disks is a 2+2 mirror.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
In theory it should import the pools automatically but if it don't then you just need to follow the steps on the link you've posted.
 
Y

YpsiNine

Guest
In theory it should import the pools automatically but if it don't then you just need to follow the steps on the link you've posted.
I can happily say that everything went as you said, thank you so much! The disks are back in the system and I'm almost finished with the config. Thank you again.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
You're welcome.

I guess you've started from scratch for the config, if it's ok for you to redo it then everything is good.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Glad you're back up and running. To make things easier next time around (if there is a next time around), consider a script to automatically back up your config. @cyberjock has one here.
 
Y

YpsiNine

Guest
Glad you're back up and running. To make things easier next time around (if there is a next time around), consider a script to automatically back up your config. @cyberjock has one here.
Thank you for all the help! I set up the script so now it runs the backup of the config every day. Brilliant. I have also bought a second stick which I intend to use as a mirror boot.

Anyway, a quick question:
Is the certificate function broken? I tried again creating a CA and a certificate but I got the same error as before. This time around though, I enabled HTTP + HTTPS, just in case. :)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I haven't used FreeNAS to generate certificates, so I really can't say. It works for me on https, but that's with a certificate I generated on another server.
 
Status
Not open for further replies.
Top