Hello, Richard, Thanks for you quick response. I mentioned in my mail that "I tried cat /proc/self/mountinfo | grep shared on a terminal before making the test , and it did not find anything." so it is not shared. I believe that "SLAVE" flag (or the other two sharing flags, PRIVATE/UNBINDABLE) should not cause this issue. rgs, Kevin On Sun, Apr 28, 2013 at 8:18 PM, richard -rw- weinberger <richard.weinberger@xxxxxxxxx> wrote: > On Sun, Apr 28, 2013 at 4:30 PM, Kevin Wilson <wkevils@xxxxxxxxx> wrote: >> Hello, >> I posted this question in ubuntu mailing list a few days agoa , but >> could not get a solution; I hope to find assistance here since this is >> in fact a >> filesystem question which is not specific to ubuntu. >> >> I run Linux 3.5.0-17-generic kernel of in Ubuntu 12.10 >> >> I try to use mount namespaces with this Ubunutu. >> >> I opened session 1 on one terminal: >> session 1, terminal #1 >> mount | grep sda3 >> gives nothing. >> >> unshare -m /bin/bash >> mount /dev/sda3 /mnt/sda3 >> >> mount | grep sda3 >> shows >> /dev/sda3 on /mnt/sda3 type ext3 (rw) >> >> readlink /proc/self/ns/mnt >> mnt:[4026532114] >> >> I opened session 2 on a second terminal: >> session 2, terminal #2 >> In the beginning, >> mount | grep sda3 >> gives nothing. >> >> after the mount done on the other terminal (#1, session 1) >> mount | grep sda3 >> /dev/sda3 on /mnt/sda3 type ext3 (rw) >> readlink /proc/self/ns/mnt >> mnt:[4026531840] >> so this is a different namespace then session 1. >> And AFAIK I should not have seen ext3 mounted in this namespace. > > You have to mark your mount-tree as private first. > Otherwise new mounts will get propagated. > On systemd distros the tree is automatically marked as private. > AFAIK systemd does mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL) > at the very beginning. > ...no idea what ubuntu/upstart does... > > -- > Thanks, > //richard -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html