Re: [RFC][6/11][MANUX] Kernel compatibility : directory hardlinks

From: Theodore Ts'o
Date: Tue Apr 15 2014 - 19:34:46 EST


On Wed, Apr 16, 2014 at 01:12:53AM +0200, Emmanuel Colbus wrote:
> The solution is to use directory hardlinks. This way :
> - applications that want to communicate through /tmp can simply specify
> that they have a dependancy on a package that provides a /tmp directory
> for them; this way, the package manager will create a directory hardlink
> named "/tmp" towards it in their chroot, and they will be able to do
> their thing;
> - as for the cleaning of /tmp, it is done by having all the /tmp
> directories of all the applications hardlinked within the chroot of the
> script tasked with cleaning them.


That's what "bind mounts" in Linux are used for.

If you haven't studied how bind mounts and mount namespaces work in
Linux, I'd strongly encourage that you take a look. First of all,
it's a much more powerful system, and secondly, that's what most
container based systems are using.

Cheers,

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/