Load the kernel module
Create the zvol & set the volmode
Initialise the key
Create the eli device with this key and enter passphrase
Attach the eli device
Create the zpool
Write your data ....
Export the zpool
Detach the eli device
When all data no longer needed:
Code:
kldload geom_eli.ko
Create the zvol & set the volmode
Code:
zfs create -V 5G ZT/private
zfs set volmod=full ZT/private
Initialise the key
Code:
dd if=/dev/random of=mykey bs=64 count=1
Create the eli device with this key and enter passphrase
Code:
geli init -s 4096 -K ./mykey /dev/zvol/ZT/private
Attach the eli device
Code:
geli attach -k ./mykey /dev/zvol/ZT/private
Create the zpool
Code:
zpool create gelipool /dev/zvol/ZT/private.eli
Write your data ....
Export the zpool
Code:
zpool export gelipool
Detach the eli device
Code:
geli detach /dev/zvol/ZT/private.eli
When all data no longer needed:
Code:
zfs destroy ZT/private