[lxc-devel] [RFC] rootfs pinning

Serge Hallyn serge.hallyn at ubuntu.com
Thu Sep 12 18:38:51 UTC 2013


Quoting Christian Seiler (christian at iwakd.de):
> Hi there,
> 
> just a quick question: currently, rootfs is pinned with a .hold file in
> the parent directory (which btw. does not help against file systems that
> are already mounted on the host but directly in the rootfs directory).
> The problem with the .hold file is that it doesn't make the directory
> necessarily pretty; I tend to mount all rootfs to /srv/lxc/$container
> (config remaining in /var/lib/lxc), and then when doing a ls /srv/lxc, I
> see tons of .hold files. (I'm not even sure that they are removed after
> container termination - but even if they are, the default state of a

No I don't think they are removed at all.

> typical system tends to be that at least some containers are running...)
> 
> Couldn't we just open $rootfs/lxc.hold for writing, keep the fd (as
> current pinfd) and then unlink (!) the file directly? According to POSIX

Yup, we could do that, absolutely no problem with that.  I just didn't
do it.  It would work, and keep the directory neat, so +1.

> semantics, the file is then still open and the pinning should work (now
> also for the above case), but there are no files lying around anymore.
> (Note: I didn't test that, it could well be that that doesn't work.)
> 
> Thoughts?
> 
> -- Christian
> 
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. Consolidate legacy IT systems to a single system of record for IT
> 2. Standardize and globalize service processes across IT
> 3. Implement zero-touch automation to replace manual, redundant tasks
> http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list