I am struggling to mount a ZVOL securely but r/w in a container. I tried device unix-block, disk with not luck.
I created a zvol:
zfs create -s -V 200GB pool1/lxd-zvol/backup
Next I tried adding it directly (using unix-block) with no luck running fdisk from guest:
lxc config device add backup data unix-block path=/data source=/dev/zd16
Next I created a partition from the host and did:
lxc config device add backup data unix-block path=/data source=/dev/zd16p1
lxc config device add backup data unix-block path=/dev/zd16p1
Both seem to have similar weird behavior and I cannot read the partition content from guest.
So I tried:
lxc config device add backup data disk path=/data source=/dev/zd16p1
I can then read partition content from /data but not write to it. I am pretty much stuck.
I just want a ZVOL mounted in a container as ext4 with userquota support enabled at mount time.