FreeNas – Renaming ZFS Pool
Here’s a quick post which explain how to safely rename a ZFS Pool (Volume) with FreeNAS
This quick how to work fine even if you have ZFS DataSet with data into this volume
Important: do NOT use this procedure if you’re using FreeNAS 9.x or newer, if you do so, you’ll not be able to manage your ZSF pool from the Web UI anymore. You’ve been warned 😉
First steps
- Connect to your FreeNAS server trough ssh
- Disable any share service like CIFS, AFS or NFS
Renaming the ZFS Pool
First step, run the command below in order to export the ZFS Pool
1 |
# zpool export volume_name |
Then import and rename the ZFS Pool with the command below
1 |
# zpool import volume_name new_volume_name |
Detach the volume
Logon onto the WEB UI with your admin account
Detach the volume with the option
Go to the storage section and click on Auto Import Volume (do not enable the Mark as new option)
Then restart your server
1 |
# reboot |
Import the volume
Logon into the WebUI then go to the storage section and click on Auto import Volume
I think it would be beneficial if you could update or remove this post. Following these instructions with the 9.x or more recent FreeNAS systems will not work, and could cause big problems. If you import via the CLI, you won’t be able to see the pool in the GUI. See the following thread for details.
https://forums.freenas.org/index.php?threads/restored-pool-visible-via-cli-but-not-in-the-gui.28238/
The post have been updated, thanks for the useful comment.
Davide
CAUTION: This procedure will NOT work if you apply it to a GELI encrypted ZFS volume!
Thanks for the info