How to replace zfs root disk

I want to change which disk I'm using as my zfs root. My plan was to partition the new disk, install the bootloader, create a new zroot pool, then do zfs send ... | zfs recv. Then I can shutdown, remove the old disk, and boot to the new one.

The problem I'm having is I can't create the replacement pool with the same name as the original one, and renaming the pool name once it's up might be tricky.

Any ideas or other approaches?
 
What is the layout of your old pool?
If it's just 1 disk or a mirror, you can attach the second disk, creating a mirror.
Install the bootcode and let is resilver, then remove the old disk from the pool.
 
Back
Top