It is possible to mount a volume on both a unprivileged container and a privileged container?


#1

Hi,

as title, i have:

ct01 security.privileged true
ct02 security.privileged false

i tried to mount a volume on both containers but i have this error on ct02:

Error: Common start logic: Failed to initialize storage volume “test” of type “custom” on storage pool “btrfs”: Idmaps of container ct-02 and storage volume test are not identical

sorry for bad english


(Stéphane Graber) #2

There is a configuration option you can set on a custom storage volume to tell LXD to do it regardless, though obviously one of the two sides is going to see very confusing ownership of files and directories.


#3

Not a problem for me because one container create files and the other one just need to read those files.

What is the configuration options?

thanks again


(Stéphane Graber) #4

https://lxd.readthedocs.io/en/latest/storage/#storage-volume-configuration

security.unmapped=true on the volume (lxc storage volume set POOL VOLUME security.unmapped true)


#5

Thanks, i swear i tried to find in documentation