I have a zfs pool named lxdhosts from which I create storage volumes and containers.
From that lxdhosts pool, I want to create and add a supplementary disk to a container A, create some data in that disk, then detach the disk, passing it over to second container B.
Would someone be able to show the commands needed to achieve this?
Note: I’ve managed to do most of this, but when I try to add my disk to the second container (B), the filesystem isn’t showing up again.
lxc storage volume create POOL SOME-NAME
lxc config device add INSTANCE1 SOME-NAME disk pool=POOL source=SOME-NAME path=/data/SOME-NAME
lxc config device remove INSTANCE1 SOME-NAME
lxc config device add INSTANCE2 SOME-NAME disk pool=POOL source=SOME-NAME path=/data/SOME-NAME
So, when I did this - the mounted device didn’t show up in the container B.
I tried multiple times.
How can I debug the situation?
Did you restart the container (is it a container)?
lxc exec INSTANCE2 -- findmnt