Moving root on ZFS on GELI so GELI is no longer used

Trond Endrestøl trond.endrestol at ximalas.info
Thu Dec 5 07:21:47 UTC 2019


On Wed, 4 Dec 2019 22:31-0000, Kralj Karlo wrote:

> I selected the installer option for putting root on ZFS on GELI.
> I want to switch the system so that GELI is not used. (That is,
> the zpool should be on the disk directly.)
> 
> I figure I will replicate the zpool (currently a mirror of two GELI
> devices) to the new disk and also do something so that the boot stuff
> is on the disk and the boot stuff does not point to the GELI disk.
> The part I don't know how to do is changing the boot stuff.
> 
> Are there directions on how to do this? If there is nothing specific,
> could you suggest which manual pages I should read?

man zfs, searching for zfs snapshot, zfs send, and zfs receive.

My take usually is:

1. Make sure boot partitions are present and populated on the new disk(s).
   The same for any swap partitions.

2. Create a new pool.

3. Create a recursive snapshot from the top of the existing rootpool, e.g.
   zfs snap -r rootpool at transfer

4. Send and receive a replicating stream, e.g.
   zfs send -RLe rootpool at transfer | zfs recv -Fduv newpool

   The results of zfs send can be saved as a file and later 
   transferred using zfs recv, if you prefer this over a pipeline.

5. Remove the recursive snapshots, e.g.
   zfs destroy -Rv rootpool at transfer
   zfs destroy -Rv newpool at transfer

6. Set the bootfs property, if necessary, e.g.
   zpool set bootfs=newpool/something newpool

7. Reboot using newpool.

-- 
Trond.


More information about the freebsd-questions mailing list