Around April 2009, that is now ten years ago, I had a look at the then rather new GEOM tools, and already then noticed the geli(8) as a nicely crafted piece of software.
At that time most of my drives were partitioned with gvinum(8), and I figured that both would not work nicely together - because the GEOM tools could not properly know if they should grab the plex, the subdisk or the volume from gvinum. So, if a configuration might succeed, it would be hosed after next boot, at the latest.
Nowadays, almost all of my drives are in ZFS. Furthermore, recent political developments may make it desireable to have encrypted disks - so I concluded I might give the matter a new try. Also I imagined that over the course of ten years the matter may have ripened and might work out of the box by now.
Long story short: it doesn't.
After I had made a proper plan, and then started to convert the first one or two disks, I got the idea that I might try a reboot, to see how much of the configurations would survive that. And then, the issues sprang into my face like alien facehuggers.
At that time most of my drives were partitioned with gvinum(8), and I figured that both would not work nicely together - because the GEOM tools could not properly know if they should grab the plex, the subdisk or the volume from gvinum. So, if a configuration might succeed, it would be hosed after next boot, at the latest.
Nowadays, almost all of my drives are in ZFS. Furthermore, recent political developments may make it desireable to have encrypted disks - so I concluded I might give the matter a new try. Also I imagined that over the course of ten years the matter may have ripened and might work out of the box by now.
Long story short: it doesn't.

After I had made a proper plan, and then started to convert the first one or two disks, I got the idea that I might try a reboot, to see how much of the configurations would survive that. And then, the issues sprang into my face like alien facehuggers.
- Only the swap partition is autodetected. ZFS partitions are not. I suppose these have to be put into /etc/rc.conf, where there is a variable
geli_devices
. - When done so, the devices will be activated at boot, each for it's own. This means I have to enter the passphrase again and again, for each and every log device, spare device, cache device, raid device etc.etc.etc - some thirty or fifty times. This is not funny, and furthermore, due to that PKCS-wtf stuff it takes a significant amount of time.
It seems, people handle this issue by using keyfiles instead of passphrases, so these keyfiles can be configured in rc.conf and automatically applied on boot. I fail to get the point in that. I don't see any point in leaving my house, closing the door, locking the door and then attaching the key with duct-tape on the door, either. Keyfiles seem to work in exactly that fashion, and under such circumstances I would abandon encryption and put that electricity to better use. - At the time when geli activates these devices, ZFs has already collected it's drives - and marked the encrypted (and therefore not yet existng) ones as UNAVAIL.
- If one tries to fix the havoc and online the devices manually, that doesn't work
Code:# zpool online gr ada1s3.eli warning: device 'ada1s3.eli' onlined, but remains in faulted state use 'zpool clear' to restore a faulted device
geli_autodetach="YES"
. So after ZFS looks onto that device (and, as it seems, does not keep it open continuously), it is gone.