I would like to run some software (paradux) that uses devicemapper inside a Linux container started with systemd-nspawn
. How do I get devicemapper (specifically via cryptsetup
and LUKS) to work in the container?
Asked
Active
Viewed 228 times
0

Johannes Ernst
- 3,072
- 3
- 42
- 56
-
I doubt anyone is going to give you complete instructions you could follow. What happens if you try? – Apr 27 '19 at 21:34
-
I am getting an error message that says I don't have the kernel module. However, I do :-) because it works just fine on the host that runs the container. – Johannes Ernst Apr 27 '19 at 22:37
-
1If the failing command is not something big, you could try running it under `strace -f`, see what exactly failed. But most likely it is trying to access `/dev/mapper/control`, which is not there. If you want the container to control the host's mapper, you may have to give it access to the host's `/dev/` directory, e.g. with `mount --bind` – Apr 27 '19 at 22:50
-
Makes the container kinda pointless though. Does it have to be nspawn? What are you trying to achieve? – Apr 27 '19 at 22:53
-
I am running a different distro in the container. – Johannes Ernst Apr 30 '19 at 22:41