[systemd-devel] Shared root fs by default

Lennart Poettering lennart at poettering.net
Fri Apr 5 08:55:46 PDT 2013


On Tue, 02.04.13 10:27, Tvrtko Ursulin (tvrtko.ursulin at onelan.co.uk) wrote:

> You need to try it since you don't seem to believe me. :)
> 
> + M1=testmp1
> + M2=testmp2
> + SM=submount
> + mkdir -p testmp1
> + mkdir -p testmp2
> + mount none -t tmpfs testmp1
> + mkdir -p testmp1/submount
> + mount none -t tmpfs testmp1/submount
> + strace -f -e trace=mount,umount mount testmp1 --rbind testmp2
> mount("/root/3/testmp1", "testmp2", 0x7f70e796a67c, MS_MGC_VAL|MS_BIND|MS_REC, 
> NULL) = 0
> + strace -f -e trace=mount,umount umount -l testmp2
> umount("/root/3/testmp2", MNT_DETACH)   = 0
> + mountpoint testmp1/submount
> testmp1/submount is not a mountpoint

Hmm, does this always happen this way, or is the MS_REC flag "sticky"
and causes the MNT_DETACH to be recursive?

That looks a bit like a kernel misfeature, no?

> So now just imagine "testmp1/submount" was "/dev/pts".

Hmm, so in nspawn we don't bind mount /dev/pts anymore, we instantiate a
new instance... 

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list