On Tue, Nov 12, 2013 at 08:37:36PM +0100, Michael Stapelberg wrote: > I think I found the issue: when running systemd, / is marked as a shared > mountpoint by default, which recursively applies to everything > underneath /. See mount(8) for details on shared mountpoints. > > The attached patch fixes it for me. Quote from the patch itself: > > + # Mark this mountpoint as private, some systems have / as a shared > mountpoint. > + # As an example, assume /home/m/ch is the chroot directory. > + # schroot will mount -o bind /home/m/ch to /var/lib/schroot/mount/ch-123 > + # Afterwards, it will bind-mount /dev to /var/lib/schroot/mount/ch-123. > + # With shared mountpoints, that mount will also show up in the original > + # /home/m/ch. This is a problem once schroot mounted /home: the following > + # mount of /tmp will show up in /var/lib/schroot/mount/ch-123/tmp, > + # /home/m/ch/tmp and /home/m/ch/home/m/ch/tmp (!), which leads to failure > + # on unmounting. > + mount --make-private "$3" > > I haven’t done thorough testing and I’m not familiar with the schroot > codebase, so there may be side-effects of that patch. I can only > reiterate: it works for me in my tests :). > > Please consider merging it. Thanks.
I confirm this fixes the problem for me. It would be nice if the next schroot upload included it. -- Antonio Terceiro <terce...@debian.org>
signature.asc
Description: Digital signature