Schroot doesn't mount /home submounts in the chroot

Bug #791908 reported by Wookey
30
This bug affects 11 people
Affects Status Importance Assigned to Milestone
schroot (Debian)
New
Unknown
schroot (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: schroot

My home dir is mounted as /home/wookey. Within the company this is normally a remote dir, but I moved mine to be local to avoid a whole host of pain :-)

Using schroot it mounts /home with bind, rather than rbind, so inside the chroot I cannot see my home dir, only the (nearly empty) /home that has /home/wookey mounted on it. This was extremely confusing for a while as the old /home has a (normally inaccessible) /home/wookey containing nothing much from when the machine was originally set up.

Changing /etc/schroot/mount-defaults from
/home /home none rw,bind 0 0
to
/home /home none rw,rbind 0 0

makes it work as expected (my files are visible inside the chroot).

So, in fact it's easy to fix - schroot is very nicely designed; but it took hours to work out what on earth was wrong in the first place. Having a sub-dir mounted as a home dir is quite a common configuration in institutions and larger companies, so this problem will potentially affect a lot of people (who might not even realise that schroot is incredibly cool and should automatically makes all their files available inside the chroot).

So, perhaps rbind should be the default, not bind, for /home? Is there a good reason not to do this?

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: schroot 1.4.17-1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Thu Jun 2 16:43:42 2011
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_GB.UTF-8
 LANGUAGE=en_GB:en
SourcePackage: schroot
UpgradeStatus: Upgraded to natty on 2011-05-23 (9 days ago)

Revision history for this message
Wookey (wookey) wrote :
Revision history for this message
Wookey (wookey) wrote :

I see https://bugs.launchpad.net/ubuntu/+source/schroot/+bug/769595 is essentially asking for the same default.

Changed in schroot (Debian):
status: Unknown → New
Wookey (wookey)
Changed in schroot (Ubuntu):
status: New → Confirmed
Changed in schroot (Debian):
status: New → Won't Fix
Revision history for this message
Roger Leigh (rleigh) wrote :

We can't use rbind due to it interacting very badly with autofs (rbinding autofs mountpoints results in umountable mounts, which eventually kill your system). We used to use rbind, but removed it as a result.

Once the kernel is fixed to allow rbind to work safely, we can re-enable this.

Changed in schroot (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Gareth Stockwell (gareth-stockwell) wrote :

Can you provide a link to the rbind + autofs bug mentioned above?

Or otherwise, state whether this is known to still be a problem on Ubuntu 12.04 (kernel 3.2.0-51).

Mathew Hodson (mhodson)
Changed in schroot (Ubuntu):
status: Confirmed → Won't Fix
Changed in schroot (Debian):
status: Won't Fix → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.