Solved Can I rename GELI containers in an existing ZFS mirror?

I have an encrypted 2-way mirror created by the installer and would like to rename ada0p3.eli and ada1p3.eli to use GPT-style labels.

I didn't find a way to rename them directly, but was able to destroy ada0p3.eli and replace it with gpt/xxxxxxxxxxxxxxx.eli using

Code:
zpool detach zroot ada0p3.eli
geli kill ada0p3.eli
geli init -bg -e AES-XTS -l 256 -s 4096 "/dev/gpt/xxxxxxxxxxxxxxx"
geli attach /dev/gpt/xxxxxxxxxxxxxxx
zpool attach zroot ada1p3.eli gpt/xxxxxxxxxxxxxxx.eli


At that point, zpool status displayed the new name like I wanted for the first drive, but rebooting restored the original name.

Is there a configuration file I should change to specify the new names at boot?

I also tried to force ZFS to re-inspect the devices but zpool export zroot returns
Code:
cannot unmount '/var/log': Device busy
 
After more digging and experimentation, I think what I'm trying to do is not currently possible for root-on-ZFS partitions, and it won't matter anyway after native ZFS encryption arrives.

GPT labels on the underlying partitions are good enough to give me the information I need.

This post summarizes asteriskRoss' experience:

I also wanted to use GPT labels to avoid the risk of my disks being renumbered, but resorted to using device labels (like ada0p1 in your example) for any GELI devices that need to be mounted before the root partition is mounted...I found that GPT labels worked fine for GELI devices mounted after the root partition that I configured in /etc/rc.conf.
 
Back
Top