Where has my pool gone

balanga

Patron
Joined
Jul 10, 2014
Messages
271
After finally managing to upgrade to 12.2, I don't have access to my data. Do I need to import the pool I had?

Under Storage -> Pools

it says No Pools. If I click ADD the options are

Create new pool
Import an existing pool

If I click on 'Import an existing pool' the selection moves to 'Create new pool'

If I go to ssh prompt and run zpool import I get:-

pool: nas
id: 10696917456167493229
state: ONLINE
status: The pool was last accessed by another system.
action: The pool can be imported using its name or numeric identifier and
the '-f' flag.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY
config:

nas ONLINE
gptid/f3e07909-fcce-11e9-8c88-4437e6ae9693 ONLINE

Shouldn't the system automatically import this when it boots up?

I'd like to get back access to my data which I haven't had for three days.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Did you upgrade in place or did you do a fresh installation of TN 12 without exporting the pool first? That would at least explain your situation.

Try zpool import -f nas followed by zpool export nas. Then retry to import from the web UI.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
If you restore a saved config your pool should import on boot.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Did you upgrade in place or did you do a fresh installation of TN 12 without exporting the pool first? That would at least explain your situation.

Try zpool import -f nas followed by zpool export nas. Then retry to import from the web UI.
I read somewhere that it was better to do a fresh install to avoid an error I was getting. I'm not really familiar with exporting pools, just blissfully unaware of what goes on behind the scenes in my four years of running FreeNAS.

Doesn't this import/export mount nas on /mnt ?

I didn't see any difference on the Web UI.

Is there a command I can run to mount it? Don't really trust GUI's
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Doesn't this import/export mount nas on /mnt ?
The manual import mounts the pool on /nas. That's why you need to export it again and then import it from the UI to get it at /mnt/nas.

Did you already try zpool import -f nas? What was the result?
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
I've just tried it now, and it has been mounted on /nas rather than /mnt/nas just like you said.

I don't see any option on the GUI to do an export. Sorry for being so hesitant to try things but am wary of breaking something....

Should I run something like zpool export tank from a command line? And then will it show up under

Storage / Pools / Import Pool as an existing pool?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You should as I wrote in my first post just follow with zpool export nas on the command line. Now your pool will be properly exported and you can then import it from the UI.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Thanks for your patience, but I'm expecting to see an existing pool to import when I go to Storage / Pools / Import Pool
There isn't anything, only an option to create a new pool. Looks like I must be missing something...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Have you exported it on the command line after the import -f?
 
Joined
Oct 22, 2019
Messages
3,641
If you restore a saved config your pool should import on boot.
I think that might explain why I didn't bump into this issue.

To share my experience, I decided to "start clean" and do a fresh install of TrueNAS Core 12.0-U3.1.

Right before I powered down the system, I exported my config.

After installing TrueNAS to my new boot drive, I restored my config file via the GUI, and then upon rebooting my pools were back to normal, as if nothing happened. :smile:
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Have you exported it on the command line after the import -f?
Yes, as I said, I did zpool import -f nas followed by zpool export nas, went to the GUI to

Storage / Pools / Import Pool

Should I find an existing pool to import, because I don't see one.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Yes, as I said, I did zpool import -f nas followed by zpool export nas, went to the GUI to
Storage / Pools / Import Pool
Should I find an existing pool to import, because I don't see one.
OK. So what I thought would clear that marker about the pool being mounted by another system, seemingly didn't. Sorry.
What does yet another zpool import nas on the command line say?
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
I found that zpool import -f -R /mnt nas would mount the nas pool on /mnt which is where I wanted it but after a reboot it wasn't there any more.

Having run import/export so many times I'm not sure where I am. I've currently just run zpool export nas and subsequently running zpool import nas does not display anything, but I see that the nas pool has been mounted on /mnt but still no existing pools appear on the GUI under

Storage / Pools / Import Pool
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The pool only appears in the UI for import when it is in the exported state, of course.

And you cannot mount a pool at arbitrary locations in TrueNAS. It must be /mnt/<poolname>, which is what the UI does.
And don't mess with -R, you should have used -o altroot ...

Can you cleanly import the pool with zpool import without the -f, now? If yes, then export it again and it should be visible in the import UI.
 
Top