0

LVM can use devices as backing store for physical volumes but not directories.

tmpfs can be mounted at any mountpoint but mountpoints are always directories.

How can the two be reconciled?

I’m aware of the roundabout solution of creating a file on the tmpfs first, binding it to a loop device, and then using that as the store. However that implies using a resource (loop devs) that is not namespaced and thus shared across containers. When isolation is a concern, this approach is not an option.

What other options are there on a sufficiently recent Linux system?

2
  • Have you considered using a ramdisk? Also, isn't it possible to choose which devices are available in a container? That would make it possible to exclude the loop devices. suse.com/support/kb/doc/?id=7012396 Feb 27, 2019 at 22:54
  • As for ramdisks, CONFIG_BLK_DEV_RAM=y (though that could be worked around). Regarding loop devices, they seem to leak out of the container onto the host. Not immediately but after a while. Feb 27, 2019 at 23:05

0

You must log in to answer this question.

Browse other questions tagged .