Register for the iXsystems Community to get an ad-free experience
Resource icon

How To Rename a ZFS Pool

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE
The basic process to rename a ZFS pool is to export it from the GUI, import it in the CLI with the new name, then export it again, and re-import it in the GUI.

I find I normally want to do this after creating a new pool (with perhaps a different set of disks/layout), replicating my old pool to the new pool, and then I want to rename the new pool to the same as the old pool, and then all the shares work correctly, and its fairly transparent. Mostly.

(tested with TrueNAS CORE 12U8-1)

So, firstly, you need to export your pool that you want to rename from the GUI. Note its name.

Before you do that, if your system-dataset is on the pool, its a good idea to move it back to a different pool, or perhaps the boot pool.

System -> System Dataset, then select the pool you want to host it, and save.

Once that's done,

Storage -> Pools, the click the cog to the right of the pool you want to rename and choose "Export/Disconnect"

DO NOT TICK "Destroy data on this pool?"

It is up to you if you delete the shares, etc, or have to re-configure them when you re-import the pool.

TICK "Confirm Export/Disconnect" then click EXPORT/DISCONNECT


Once that is finished fire up a terminal and import the pool into the CLI with the new name.

zpool import original_name new_name

(replace original_name and new_name, respecitively)

You can check your handy work with zpool status new_name

Then export the pool again

zpool export new_name

Then import it again in the GUI

Pools -> Add, import existing

Job Done.

You may need to reconfigure your shares etc.
First release
Last update
0.00 star(s) 0 ratings

More resources from Stux