Resource icon

How To Rename a ZFS Pool

Latest Version: https://forums.truenas.com/t/howto-rename-a-zfs-pool/130
--

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, respectively)

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.
Author
Stux
Views
26,715
First release
Last update
Rating
4.80 star(s) 5 ratings

More resources from Stux

Latest reviews

Worked perfectly in TrueNAS-SCALE-23.10.0.1
Perfect with TrueNAS-13.0-U5.3
Did it on newest TrueNAS Scale 22.12
But now MinIO is stuck at Deploying 2/3 after reboot:

0/1 nodes are available: 1 node(s) had untolerated taint {ix-svc-stop: }. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
Worked in TrueNAS-13.0-U4 and helped solve a problem with moving a storage pool to a new server.
We followed this guide, and it worked on our TrueNAS-SCALE-22.12.0
Top