I have an encrypted external drive (LUKS/dm-crypt, created with cryptsetup), plugged on my Turris Mox. It’s currently mainly used as an NFS share (see NAS chiffré avec un Turris | Mossroy, in French, for how I’ve set it up)
I’d like to use it with the “storage” plugin of reForis, so that /srv is transferred/mounted on it, and I can safely use lxc (while keeping the encryption)
Unfortunately, the storage plugin does not “see” my encrypted device (/dev/mapper/sda1_crypt, even if I format it with btrfs). It only sees the underlying unencrypted partition (/dev/sda1, and /dev/sda)
I’ve tried to manually mount my encrypted partition on /srv (through /etc/config/fstab), but the storage plugin does not recognize it correctly, and always asks for a reboot. Plus I still can’t create new lxc containers (for some reason, it does not seem to like my manual mount: it can execute existing containers, but can not add/delete containers)
Did anyone succeed doing so? Is there a manual way to set this partition in the storage plugin? Or should I report this improvement request somewhere else?
@petrprochy I finally managed to configure my storage like you did, and it works fine.
Many thanks for your help!
NB: at first, I was not able to create lxc containers from LuCI (it was failing with no error message). I managed to do so by creating a first container with lxc-create command-line (see Linux containers [Turris wiki]). Maybe it’s simply because the UI was expecting the /srv/lxc directory to exist. Now I can handle lxc containers from the UI