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?

  • 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 – Emmanuel Rosa Feb 27 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. – Philipp Gesang Feb 27 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.