[lxc-devel] [RFC] rootfs pinning

Serge Hallyn serge.hallyn at ubuntu.com
Tue Sep 24 22:19:20 UTC 2013


Quoting Michael H. Warfield (mhw at WittsEnd.com):
> No.  There's a change there, all right, and thank you for reminding me
> of that, but (afaik) it's NOT in the kernel itself.  It's a mount
> option.  It's that bloody MS_SHARED option and, to a lessor extent,

There *is* a kernel change which dhansen was telling me about last
week - I believe it's commit 4ed5e82fe77f4147cf386327c9a63a2dd7eff518.
It allows you to now do

	sudo mount -t tmpfs tmpfs /tmp/a
	sudo mount -o bind,remount,ro /tmp/a /tmp/b

In the past you had to first create a bind mount before you could
mark it readonly, i.e.

	sudo mount -t tmpfs tmpfs /tmp/a
	sudo mount --bind /tmp/a /tmp/b
	sudo mount -o remount,ro /tmp/b /tmp/b

In either case first making sure there is a bind-mount for us to mark
read-write seems to work.  (We'll have to, of course, make sure it
was actually read-write to begin with, and that the user *wants* it
read-write.  That'll be the only painful part of this patch)

-serge




More information about the lxc-devel mailing list