Restored pool visible via CLI but not in the GUI

Status
Not open for further replies.

NASProb

Cadet
Joined
Mar 8, 2015
Messages
5
Hey guys,

I'm new to this forum and not so deep into the FreeNAS stuff - but I have a big problem.

I configured a FreeNAS 8.x.x with 2x 3TB hdds in a ZFS mirror (RAID 1) about 2 years ago, updated it to 9.1.x a while back and everything was fine.
Yesterday the USB stick FreeNAS was running on died :(
I installed the 9.3 x64 version on a new stick and rebooted.
To get my pool back I used the "zpool -f import" command. There was sign of a problem, no error message, BUT I cannot see the pool / volume within the GUI (only the two disks).

"zpool status" shows the following:

[root@freenas ~]# zpool status
pool: disk0
state: ONLINE
scan: scrub repaired 0 in 4h11m with 0 errors on Sat Feb 21 19:11:04 2015
config:

NAME STATE READ WRITE CKSUM
disk0 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/d16db84e-14b8-11e3-b298-bc5ff4a33be6 ONLINE 0 0 0
gptid/d1d535d3-14b8-11e3-b298-bc5ff4a33be6 ONLINE 0 0 0

errors: No known data errors

pool: freenas-boot
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
freenas-boot ONLINE 0 0 0
da0p2 ONLINE 0 0 0

errors: No known data errors


There is a lot of important data on the hdds, I can't risk to lose it.

Does anyone have an idea who I can manage to see the pool within the GUI and get everything back to normal?

Thank you!!!
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Why did you use the CLI to import the pool?

There is a proper import function in the web GUI to do that ;)
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
One "problem" that you might have been alerted to was your pool version - it's not a serious issue. If that's the case, I wouldn't upgrade it yet. If you don't upgrade it, you could roll back to an 8.xx version, if needed.

My guess is that you're talking about not being able to see the data in Windows, or ???. Those settings are saved in a configuration file. If you have a backup, you can restore it now. Otherwise, you'll have to redo you configuration. For example, users, shares, services, etc. You data should be intact.

If you don't have a backup of the configuration file, you *might* be able to retrieve it off the old flash drive. The file you would be looking for is named freenas-v1.db and is in the root directory of the 4th partition. If you have one or can rescue it from the old flash drive, you can restore it using the webGUI.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
"My guess is that you're talking about not being able to see the data in Windows" Nop, he can't see the pool in the web GUI (but he can in the CLI).

I guess he can export the pool in the CLI and then import it properly in the GUI but I'm not totally sure (anyone can confirm?).

He says that the USB drive died so even if it works good enough to retrieve the config DB it is probably corrupted, so not a good idea to use it. But if he has a backup of it (and he should...) prior the problem yeah he can use it ;)
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
OK - I misread the part about the webGUI.

It depends on where the corruption is - some users have been able to rescue their configuration file off a "bad" flash drive. I believe there's a command to validate that the configuration file isn't corrupt - I can't find it right now.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Fail fail fail. Importing from the command line, then surprised when it's not in the GUI.

Does the manual tell you to import the pool from the command line? Hint: no.

So you *shouldn't* be doing it that way.

Sounds like all of your problems are self-inflicted. You are your worst enemy.
 

NASProb

Cadet
Joined
Mar 8, 2015
Messages
5
Hey guys.
Thank you for your replies. As I said I'm not very keen with FreeNAS (yet) - I was afraid to lose data and so I googled and found various threats to do it via the CLI - that was somehow wrong I know (now).
The old USB stick died completely. Unfortunately the backup was only on the stick (have to change that of the future as well). I guess the best way to learn things is, when you did something wrong :-/ I'll never use the CLI again (at least for importing pools) and I'll save the backups on an external hdd in the future.

Can anyone help me with this.
Should I try to export the pool in the CLI (how?) and after that reimport it via GUI?

Thank you for your help!!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The harsh reality is that you shouldn't be needing to go to the CLI to get things done. If you are, either you've screwed up badly, you're trying to get some diagnostic info, or you are trying to use a feature that really is untested and/or unsupported.

In all cases, until you are experienced with FreeNAS and get a feel for what you should and shouldn't do from the CLI, let the pros in the forum (and not random blogs and stuff) give the recommendations for CLI stuff. ;)

What you do in the CLI can really *really* go bad if you don't know what you are doing. The WebGUI prevents you from doing stupid things (aka "seat belts") but all of those go away when you do CLI stuff. It is far easier to screw yourself at the CLI than from the WebGUI.

I would reboot the machine and try to do an import from the WebGUI. That should work just fine and then you can setup your shares properly and use your server. :)
 

NASProb

Cadet
Joined
Mar 8, 2015
Messages
5
Thx cyberjock for your reply. Be sure I learnd my lesson. I'll never touch the CLI again (only when strickly advised by professionals ;) ) But in this case this ship has sailed. :(
Unforunately after a reboot I still don't see the volume in the 'volume manager' and if I select 'Import volume' there is nothing to select :(
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
So what is the output of "zpool status" and "zpool import"?
 

NASProb

Cadet
Joined
Mar 8, 2015
Messages
5
[root@freenas ~]# zpool import
[root@freenas ~]# zpool status
pool: disk0
state: ONLINE
scan: scrub repaired 0 in 4h11m with 0 errors on Sat Feb 21 19:11:04 2015
config:

NAME STATE READ WRITE CKSUM
disk0 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/d16db84e-14b8-11e3-b298-bc5ff4a33be6 ONLINE 0 0 0
gptid/d1d535d3-14b8-11e3-b298-bc5ff4a33be6 ONLINE 0 0 0

errors: No known data errors

pool: freenas-boot
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
freenas-boot ONLINE 0 0 0
da0p2 ONLINE 0 0 0

errors: No known data errors
[root@freenas ~]#
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
disk0 is still imported... did you reboot? It shouldn't have been mounted on reboot unless you were doing even nastier things to your box than you've been admitting to here.

Try a "zpool export disk0", reboot the machine and try the WebGUI again.
 

Mark Stock

Cadet
Joined
Jul 30, 2016
Messages
6
That worked!! :D THX cyberjock!! I promise I'll never touch the CLI again! ;)
NASProb is not the only one to stumble into this. I simply googled "rename pool in freenas" and it led me to the instructions on http://www.dflc.ch/freenas-renaming-zfs-pool/ which directed me to export and import via the CLI. And please note, cyberjock, that in all my time reading the FreeNAS docs, is was not made clear that I should totally avoid the CLI---except that there doesn't seem to be a way to rename a pool/volume without going to the CLI.
Obviously, I now know that I should look on the Forums to learn how to troubleshoot, and not just accept the first hit off a web search, no matter how authoritative it seems.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
NASProb is not the only one to stumble into this. I simply googled "rename pool in freenas" and it led me to the instructions on http://www.dflc.ch/freenas-renaming-zfs-pool/ which directed me to export and import via the CLI. And please note, cyberjock, that in all my time reading the FreeNAS docs, is was not made clear that I should totally avoid the CLI---except that there doesn't seem to be a way to rename a pool/volume without going to the CLI.
Obviously, I now know that I should look on the Forums to learn how to troubleshoot, and not just accept the first hit off a web search, no matter how authoritative it seems.

So let me ask you this question.. where does the FreeNAS manual tell you how to rename the zpool? Quite frankly, 99% of the stuff people do from the CLI isn't in the manual, so should it be expected to be 'automatically sanctioned' by FreeNAS? These are rhetorical questions, and FreeNAS 10 is going to be smarter about CLI and prevent people from doing things that could be outrageously stupid (and some people have!). But the manual doesn't tell people to do a whole host of things they do anyway "just because". Doing stuff from the CLI is like driving without a seatbelt. Sure, you may be okay today. You might be okay for years or even decades. But that one accident on the highway at 70 MPH will change your mind about seatbelts, assuming you live. ;)

I look at it as "the manual doesn't tell me to do this, so maybe I shouldn't be doing this". If you are an expert at FreeNAS, you can probably figure out how to do a lot of things that aren't sanctioned in the manual. I do some of them almost daily. That doesn't mean everyone should be doing it though. ;)
 

Mark Stock

Cadet
Joined
Jul 30, 2016
Messages
6
So let me ask you this question.. where does the FreeNAS manual tell you how to rename the zpool? Quite frankly, 99% of the stuff people do from the CLI isn't in the manual, so should it be expected to be 'automatically sanctioned' by FreeNAS? These are rhetorical questions, and FreeNAS 10 is going to be smarter about CLI and prevent people from doing things that could be outrageously stupid (and some people have!). But the manual doesn't tell people to do a whole host of things they do anyway "just because". Doing stuff from the CLI is like driving without a seatbelt. Sure, you may be okay today. You might be okay for years or even decades. But that one accident on the highway at 70 MPH will change your mind about seatbelts, assuming you live. ;)

I look at it as "the manual doesn't tell me to do this, so maybe I shouldn't be doing this". If you are an expert at FreeNAS, you can probably figure out how to do a lot of things that aren't sanctioned in the manual. I do some of them almost daily. That doesn't mean everyone should be doing it though. ;)

I see your point, and I am happy to hear that v10 will improve upon the UI. But remember that, as an expert, you have a different relationship with the documentation---things missing from it are obvious to you, and the reasoning is clear. I am an expert at many things Linux and CLI-related, and can confidently work in that space, but I am new to BSD and FreeNAS (I'm not sure if that makes me a "normal" user). When the documentation and GUI do not make it clear that when I add my first pair of disks and give it a name, that that name is the zpool name, and then do not contain clear instructions on how to rename that zpool, I consider it an omission to be rectified (even if the fix is a section called "Renaming your zpool - don't do it." Obviously, were I an expert at FreeNAS, I would not have made that mistake in the first place. But many users will make that mistake, and according to my web searches, have. And good documentation should be written for them.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I see your point, and I am happy to hear that v10 will improve upon the UI. But remember that, as an expert, you have a different relationship with the documentation---things missing from it are obvious to you, and the reasoning is clear. I am an expert at many things Linux and CLI-related, and can confidently work in that space, but I am new to BSD and FreeNAS (I'm not sure if that makes me a "normal" user). When the documentation and GUI do not make it clear that when I add my first pair of disks and give it a name, that that name is the zpool name, and then do not contain clear instructions on how to rename that zpool, I consider it an omission to be rectified (even if the fix is a section called "Renaming your zpool - don't do it." Obviously, were I an expert at FreeNAS, I would not have made that mistake in the first place. But many users will make that mistake, and according to my web searches, have. And good documentation should be written for them.

I imagine the list of things one shouldn't do would do with FreeNAS is quite long, and the list of people doing this is also quite long.


I think it would be good the MOTD in freenas was something similar to what xenserver has (actively discourage users from mucking things up. For example:

Configuration changes made outside of the FreeNAS webgui may not have been tested and are therefore not supported. In addition, configuration changes may not persist after reboot or installation of updates, and could cause updates to fail. Additionally, such changes may adversely affect the stability of the FreeNAS server

Type "/etc/netcli.sh" to access the management console.

@dlavigne - any thoughts?
 
Status
Not open for further replies.
Top