Looking for some pointers about current best practices on zfs & lxd use as i plan my next bare metal server, this time though not ext4/LUKS but fully encrypted zfs.
Right now i do have encrypted zfs mirror root on SSD and 2 spare HDDs that i plan on use as a encrypted zfs mirror pool.
Faint memories from reading here something about whether it is preferred that lxd init grabs the 2HDDs or if i could create my encrypted mirror pool/dataset manually and pass it on to lxd init without problems?
I plan on using snap install again and that would be on the mirrored SSDs, was there anything that might be causing problems with anything when the containers reside on the HDDs pool/dataset?
Also thinking of using a pool/dataset on the SSD for containers that might need more disk speed, irrc it shouldn’t be a problem of adding two zfs pool/datasets to the lxd init?
No plans to use swap with zfs.
Well anything that could lead to problems down the line is what i would like to avoid, thanks.
LXD is perfectly happy to use an existing pool or dataset, when you need a less common config, that’s usually the easiest.
In your case, you’d indeed want to create the two zpools ahead of time, setup encryption and anything else you want, then you can add them both to LXD with:
lxc storage create hdd zfs source=hdd-pool/lxd
lxc storage create ssd zfs source=ssd-pool/lxd
lxc profile device add default root disk pool=hdd path=/
The commands above effectively replace your normal lxd init run. lxd init does support using an existing zpool but not creating additional pools so since you want two, I figured I’d give you the direct commands
Thanks for the quick reply.
Had to dig deeper into zfs and redo my setup, learn more how to use zfs and decided against zfs on root for now on this fresh ubuntu server.
The first four commands work but the last one adding the default network to the default profile fails,