Other Does it make a difference if you put a geli volume on a device as opposed to a partition on that device?

Examples online usually always show the geli volume as being on a partition, e.g. /dev/ada0p3 with /dev/ada0p3.eli, and, in the case of tutorials, there is a preceding step of creating the partitions beforehand with gpart.

However, as far as I can tell there is no need for this. You can create a geli volume directly on the disk without pre-partitioning, e.g. /dev/ada0 and /dev/ada0.eli, which seems to have the exact same effect but with a little more nice and uniform look. This at least seems to be the case when the end goal is a ZFS filesystem on the geli device.

Is there some reason I would want to do this on a partition instead of just on the disk like this? Is it a case of just a bunch of blogs all copying from each other and no one taking the time to think about whether they're giving unnecessary instructions?
 
as far as I can tell there is no need for this. You can create a geli volume directly on the disk without pre-partitioning, e.g. /dev/ada0 and /dev/ada0.eli, which seems to have the exact same effect

Is there some reason I would want to do this on a partition instead of just on the disk like this?
As long as you don't want to place a bootable Root-on-ZFS on that disk then there is no reason not to use a whole disk without a partitioning scheme and partitions for the geli(8) provider.
 
Thanks, I wanted to be sure I wasn't overlooking anything critical if I choose to use whole disks instead of partitions. Sounds like I'm not, for my use case at least.
 
Is there some reason I would want to do this on a partition instead of just on the disk like this?
There's no technical reason. But a partition might help with identifying what's on the disk, the partition's label could be useful.
 
Never understood why you'd want to mix GELI (which uses the GEOM framework, iirc) and ZFS, especially when ZFS can do everything GELI can... 😅 and then some. And yes, that includes encryption and volume management, you can even pretend that a disk on the other side of this blue planet is part of your zpool...

My take on this is to keep things simple... yeah, ZFS sounds like a kitchen sink, and a friggin' useful one. :p
 
I thought ZFS encryption was per dataset, not per zpool/provider? If that is true, then using GELI is a level down from ZFS and lets you do different things.
 
But a partition might help with identifying what's on the disk, the partition's label could be useful.
Besides gpart(8) to label GPT partitions, one can use the glabel(8) disk labelization utility to label whole disks.

Example:
Code:
glabel label DISK-id0 /dev/da0
glabel label DISK-id1 /dev/da1

geli init -g -l 256 -s 4096 label/DISK-id0 label/DISK-id1

geli attach label/DISK-id0 label/DISK-id1

zpool create zfsstorage label/DISK-id0.eli label/DISK-id1.eli
 
Back
Top