SOLVED Help with Screwed up Zpool

Status
Not open for further replies.

TrevInCarlton

Dabbler
Joined
Sep 18, 2018
Messages
39
I have followed various threads for what I thought would be a simple task to rename a zpool. First from the CLI
Code:
zpool export SuperServer2
zpool import SuperServer2 Server2

From the GUI I could see the zpool but the datasets had gone. I tried to detach the volume thinking I could import it but now I can't get the zpool back, either the old name "SuperServer2" or the new name "Server2". This is the last thing I have tried ;
Code:
[root@SuperServer2018 ~]# cd /mnt											
[root@SuperServer2018 /mnt]# ls												
md_size		 SuperServer1	TEST1										
[root@SuperServer2018 /mnt]# zpool import SuperServer2						
cannot import 'SuperServer2': no such pool available							
[root@SuperServer2018 /mnt]# zpool import Server2							
cannot import 'Server2': a pool with that name is already created/imported,	
and no additional pools with that name were found							
[root@SuperServer2018 /mnt]#

Any help to recover this pool and the contained datasets would be greatly appreciated.

Just checked zpool status and discovered the mountpoint is wrong. The mountpoint is /Server2 instead of /mnt/Server2. I don't know how to move or change the mountpoint so don't want to screw it up further
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
What does zpool import show?
 

TrevInCarlton

Dabbler
Joined
Sep 18, 2018
Messages
39
What does zpool import show?
Thanks for your reply. I have sorted this out. I had to export the zpool from the CLI, reboot then import the volume from the GUI. Worked fine but I have another zpool to rename so I need to know the correct way to do this in Freenas
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,458
Worked fine but I have another zpool to rename so I need to know the correct way to do this in Freenas
You've already figured it out:
  • Export from GUI
  • zpool import oldname newname
  • zpool export newname
  • Import from GUI
 

TrevInCarlton

Dabbler
Joined
Sep 18, 2018
Messages
39
You've already figured it out:
  • Export from GUI
  • zpool import oldname newname
  • zpool export newname
  • Import from GUI
Is "Export from GUI" the same as "Detach volume" ? Can't actually see any other way to remove the pool ??
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,458
Is "Export from GUI" the same as "Detach volume" ?
Yeah, the (old) GUI designers apparently had an allergy to standard ZFS terminology--though I believe the new GUI improves on that. "Detach volume" is what you want.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If you are curious, what happened is that the pool was mounted at the system root / instead of at the /mnt sub-directory.
What @danb35 said to do is the easy way to fix it. The GUI will mount it where it should be.
If you wanted to do it from the command line, you need to use the zfs set mountpoint command

https://docs.oracle.com/cd/E19253-01/819-5461/gaztn/
 

TrevInCarlton

Dabbler
Joined
Sep 18, 2018
Messages
39

TrevInCarlton

Dabbler
Joined
Sep 18, 2018
Messages
39
Yeah, the (old) GUI designers apparently had an allergy to standard ZFS terminology--though I believe the new GUI improves on that. "Detach volume" is what you want.
I thought I was right with "Detach Volume" but can't be too carful. Fully get it now, thanks.
 
Status
Not open for further replies.
Top