[lxc-users] shared mount and umount propogation.
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Mar 6 18:03:53 UTC 2014
Quoting Vijay Viswanathan (vijay.vishy at gmail.com):
> isnt --make-rbind and -rbind the same ?
>
> anyways, I think understood the rslave concept.
> You want me make a slave mount (e.g., /mnt ) of some original share mount (
> e.g., /media ) and expose only /mnt in the lxc conf right ?
>
> But the problem is the cleanup after pivot_root goes through all the
> folders in the host proc/mount list.
> If /media is shared and /mnt is rslave, exposing only /mnt in the
> container still doesnt help because, the pivot_root's clean unmounts /media
> and there by /mnt is affected.
That should now be fixed in git, as all of / gets mounted MS_SLAVE
if / is found to be shared. Now if only /media is shared and not
/, I suppose that's a different case.
A new helper function during container startup which finds any shared
mounts and remounts them first slave, then shared, would be ok with me.
-serge
More information about the lxc-users
mailing list