Resource icon

How To Rename a ZFS Pool

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Stux submitted a new resource:

How To Rename a ZFS Pool - zpool import original_name new_name

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.

So, firstly, you need to export your pool...

Read more about this resource...
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
New resource. Its a simple thing.

Admins, its currently in Advanced category, but its not really advanced, its just a bit obtuse, if you think appropriate, could you move to Fundamentals?
 

loops

Cadet
Joined
May 31, 2023
Messages
2
Will this work if you currently have only one pool that fills all available disk space?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Honestly, this should be a standard feature in the GUI rather than having to do this workaround in the CLI.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The System dataset can be moved to the boot pool (at least temporarily), so there would usually be an option for that.
 

loops

Cadet
Joined
May 31, 2023
Messages
2
The System dataset can be moved to the boot pool (at least temporarily), so there would usually be an option for that.
Yeah, I read that as well but it's not clear whether it will continue regardless. I will probably do a full backup just in case. Agreed that this could be a first class feature if it is indeed deterministic and can be performed without data loss.
 

jax

Cadet
Joined
Apr 16, 2022
Messages
3
Did this on TrueNAS Core -13.0-U5.3 on a Dell R620XL. Worked flawlessly without any changes to shares. Thanks
 
Top