On Sat, Feb 22, 2014 at 04:30:42PM -0300, Antonio Terceiro wrote: > 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.
I can look at that. It will need to be fixed to work on kFreeBSD, FreeBSD and Hurd by only running this conditionally on Linux. Why on earth is systemd doing this in the first place? This is a not- insignificant break in backward compatibility which will break any tools which work with bind mounts. While schroot is one such tool, there are many uses of bind mounts in general, and this will certainly have broken them. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools `- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org