zpool export [current zpool name here]
zpool import [current zpool name here][space here][new zpool name here]
zpool export volume0
zpool import volume0 volume1
I've done it. :) I will keep this small guide here so others can find this.
What I basically did is export the zpool using the shell command line (not on the web interface) (9).
Keep in mind that afterwards, at least I had to do it, to detach the volumes (zpools) from the system (DON'T CHECK THE OPTION TO ERASE DATA).
Reboot.
Auto-import volumes (zpools).
$ sudo zpool list NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT freenas-boot 59.5G 617M 58.9G - - 1% 1.00x ONLINE - pool0 4.98T 3.54T 1.45T - 38% 70% 1.00x ONLINE -
That's because you're reading (and replying to) a three-year-old thread, and the UI has changed.There's no reference in the Docs to "Auto Import" either.
I've done it. :) I will keep this small guide here so others can find this.
What I basically did is export the zpool using the shell command line (not on the web interface) (9).
The commands a fairly simple.
Example:
Keep in mind that afterwards, at least I had to do it, to detach the volumes (zpools) from the system (DON'T CHECK THE OPTION TO ERASE DATA).
Reboot.
Auto-import volumes (zpools).
And bahm! New names, data kept intact! :D
More Information [Detailed]:
http://docs.huihoo.com/opensolaris/solaris-zfs-administration-guide/html/ch04s06.html
http://doc.freenas.org/index.php/Volumes [Detach Volume Section]
http://prefetch.net/blog/index.php/2006/11/15/renaming-a-zfs-pool/
#EDIT:
1. Fixed some typos. [07-04-2013]
Hallo,
in 2016 "no bahm!"...
Wenn der zpool online ist kommt die Fehlermeldung "zpool busy". Wenn ich den zpool per Webgui abmelden, und dann auf der Konsole (Shell) den export eintippe, dann kommt die Fehlermeldung das der zpool nicht bekannt wäre.
Schade, deine Idee höre sich so gut an.
Thomas
Hello,
In 2016 "no bahm!" ...
If the zpool online is the error message "zpool busy". When I log out of the zpool via Webgui, and then on the console (shell) the export in, then comes the error message that the zpool is not known.
Too bad, your idea sounds so good.
Thomas
I would expect the reason it isn't in the docs is because it doesn't actually come up that frequently--it seems like every year or two there's a thread about it, but that's hardly frequent. But if you think it should be there, you can file a bug against the docs suggesting that. You're correct that it can't be done through the GUI. The correct process is this:
- Export pool from GUI
- From CLI, 'zpool import oldname newname'
- From CLI, 'zpool export newname'
- Import pool from GUI
- Fix all your shares and anything else dependent on the path to the old pool.
zpool import temp-tank Tank2
cannot import 'temp-tank': no such pool available
Yeah, with encryption, you would need to unlock the disks first. I've never worked with encryption in FreeNAS (though I've seen plenty of people lose their data that way), so am not sure how you'd do that.
geli attach -k geli.key daXp1
where X is disk name Enter passphrase:
(Enter the passphrase, repeat geli attach for next disk)NAS# zpool status pool: freenas-boot state: ONLINE scan: scrub repaired 0 in 0h0m with 0 errors on Mon Jun 19 11:03:07 2017 config: NAME STATE READ WRITE CKSUM freenas-boot ONLINE 0 0 0 da0p2 ONLINE 0 0 0
NAS# zpool import [OLDNAME] [NEWNAME]
NAS# zpool export [NEWNAME]
- Export pool from GUI
- From CLI, 'zpool import oldname newname'
- From CLI, 'zpool export newname'
- Import pool from GUI
- Fix all your shares and anything else dependent on the path to the old pool.