[lxc-devel] Change rootfs pinning mechnism

Jäkel, Guido G.Jaekel at dnb.de
Fri Sep 13 07:38:37 UTC 2013


Hello,

I'm late but I just want to mention that I expect that all this kind of "unlinking" on a NFS will show up as a stale NFS handle, i.e. a still visible hidden directory entry (.nfs00??????????????????????). Therefore, one have to take care of this (i.e. exclude) if he make a copy of such (for the purpose of cloning or even for backups). This isn't a LXC-, but a NFS-caveat. An NFS-aware will (should) know about to deal with this but there he should have to know (by the documentation) that LXC will use this unlinking mechanism to correlate this stale handle.


I would suggest to add a config switch to choose between early unlinking and removing at shutdown. Because I'm using a setup where the rootfs are shared between several hosts and an container may be run on any of it. For this usecase, the rootfs pinmarker is a (not perfect but) good signal that a rootfs is in use. Even in the case of non-shared rootfs's there might be other usecases where this marker is useful indicator.


One more: I'm not up-to-date with the development, but is/was the successful creation of the markerfile also a necessary condition to startup a container? If yes, I expect that this is broken by the unlink feature because right after unlinking one can create a new file with "this" name.


Greetings

Guido

>-----Original Message-----
>From: Christian Seiler [mailto:christian at iwakd.de]
>Sent: Thursday, September 12, 2013 10:01 PM
>To: lxc-devel at lists.sourceforge.net; Serge Hallyn
>Subject: [lxc-devel] [PATCH] Change rootfs pinning mechnism
>
>Chane pinning mechanism: Use $rootfs/lxc.hold instead of $rootfs.hold
>(in case $rootfs is a mountpoint itself), but delete the file
>immediately after creating it (but keep it open). This will keep the
>root filesystem busy but does not leave any unnecessary files lying
>around.




More information about the lxc-devel mailing list