Since the kernels in experimental do not ship aufs, it would be
great if you could add support for unionfs-fuse as well. I have
the following patch applied in my setup.d script to automatically
fall back to unionfs-fuse if the native solution is not available,
as that allows me to build fast when running under 2.6.32 and use
the slower FUSE-based way when running newer kernels.
diff --git a/schroot/setup.d/10mount b/schroot/setup.d/10mount
index 29636d1..01810e6 100755
--- a/schroot/setup.d/10mount
+++ b/schroot/setup.d/10mount
@@ -95,10 +95,16 @@ do_mount_fs_union()
esac
fi
- info "Using '$CHROOT_UNION_TYPE' for filesystem union"
-
- # Try mounting fs
- mount -t "$CHROOT_UNION_TYPE" -o "$CHROOT_UNION_MOUNT_OPTIONS" "$CHROOT_NAME" "$1"
+ if modinfo "$CHROOT_UNION_TYPE" 2>/dev/null >/dev/null ||
+ grep "\<$CHROOT_UNION_TYPE\>" /proc/filesystems; then
+ info "Using '$CHROOT_UNION_TYPE' for filesystem union"
+ mount -t "$CHROOT_UNION_TYPE" -o "$CHROOT_UNION_MOUNT_OPTIONS" "$CHROOT_NAME" "$1"
+ else
+ info "Using 'unionfs-fuse' instead of '$CHROOT_UNION_TYPE' for filesystem union"
+ unionfs-fuse -o cow,allow_other,suid,dev \
+ ${CHROOT_UNION_OVERLAY_DIRECTORY}=RW:${CHROOT_UNION_UNDERLAY_DIRECTORY}=RO \
+ "$1"
+ fi
}
if [ "$VERBOSE" = "verbose" ]; then
Thanks for the patch. While it's a neat way to use the fallback, I'm not happy with the hardcoding in the setup script, which goes against the general design of the scripts (they are configured using environment variables passed in from the schroot executable; they don't dictate much policy themselves). We can support it natively with "union-type=unionfs-fuse" in the configuration file providing that we can update the mount options to use fuse. As a non-fuse user, is it possible to do the mount with mount(8) rather than running "unionfs-fuse" directly? Regards, Roger
How about making union-type a list instead and passing the first
available one to the scripts? This way, we can have a wonderful fallback
solution, and no policy in the script.
It is possible to set the fs type to fuse and mount like that (d1 + d2
on d):
mount -t fuse -o cow,suid,dev,allow_other "unionfs-fuse#d1=RW:d2=RO" d
In theory, it would be easier if unionfs-fuse installed something like
the following mount helper:
#!/bin/bash
label=$1
mpoint=$2
shift 3
dirs=${@##*,dirs=}
dirs=${dirs/,/:}
mount.fuse "unionfs-fuse#$dirs" "$mpoint" -o ${@%%,dirs=*}
then you could just mount it like unionfs (perhaps with +allow_other
option):
mount -t unionfs-fuse -o allow_other,dirs=d1=rw,d2=ro label mpoint
Has there been any progress on this? How could I help? mount -t fuse -o cow,suid,dev,allow_other "unionfs-fuse#d1=RW:d2=RO" While the above command should work in theory, schroot itself doesn't allow any value for union-type other than aufs and unionfs: E: /etc/schroot/chroot.d/abf.conf: line 8 [abf32] union-type: Unknown filesystem union type ‘fuse’ E: /etc/schroot/chroot.d/abf.conf: line 8 [abf32] union-type: Unknown filesystem union type ‘unionfs-fuse’ I think, we need schroot program to allow either of fuse or unions-fuse. Once schroot accepts those union-types, it would be only a matter of passing proper configuration directives to have unionfs-fuse and/or other fuse implementations. Thanks, Shanto
This would be a simple change to sbuild/sbuild-chroot-facet-union.cc:
diff --git a/sbuild/sbuild-chroot-facet-union.cc b/sbuild/sbuild-chroot-facet-un
index 8120024..a397f47 100644
--- a/sbuild/sbuild-chroot-facet-union.cc
+++ b/sbuild/sbuild-chroot-facet-union.cc
@@ -151,6 +151,7 @@ chroot_facet_union::set_union_type (std::string const& type)
{
if (type == "aufs" ||
type == "unionfs" ||
+ type == "unionfs-fuse" ||
type == "none")
this->union_type = type;
else
This simply permits "union-type=unionfs-fuse" in the configuration
file. Would any other support be required in addition, e.g. in the
setup scripts? You would definitely need to add support to
etc/setup.d/10mount, even if it's as simple as
diff --git a/etc/setup.d/10mount b/etc/setup.d/10mount
index 29636d1..78cdbad 100755
--- a/etc/setup.d/10mount
+++ b/etc/setup.d/10mount
@@ -86,7 +86,7 @@ do_mount_fs_union()
# Prepare mount options (branch config) for union type
if [ -z "$CHROOT_UNION_MOUNT_OPTIONS" ]; then
case $CHROOT_UNION_TYPE in
- unionfs)
+ unionfs|unionfs-fuse)
CHROOT_UNION_MOUNT_OPTIONS="dirs=${CHROOT_UNION_OVERLAY_DIRECTOR
;;
aufs)
But if you needed any additional special mount options, you could add
them here. If those options require additional keys in schroot.conf,
they would need adding to sbuild-chroot-facet-union.(cc|h).
I'm afraid I don't use the union functionality myself, which makes
validation and testing of this feature difficult. I'll be happy to
review any changes, but you might also want to run them by Jan-Marek
Glogowski (CCd) who authored the unionfs support and should be a bit
more familiar with it than myself.
Regards,
Roger
Thanks Roger! I will test this come back to you soon with complete patches (they would be simple or very similar to what you suggest) addressing this issue. In the meantime, I have also contacted[1] the developer of unionfs-fuse about this issue. I requested him to adjust his program/package to adhere to standard mount/fstab syntax. Once I get some response (or after it times out), I hope to get back to you with a complete set of changes for your review and inclusion. [1] http://groups.google.com/group/unionfs-fuse/browse_thread/thread/8ccadc6679d19caf Regards, Shanto
cqaslpl ambtdrlqwk nekcmdna sanrkul rvisautvu ogoiqcilf v K T V R J S N D T R I R W M thnrvgnin O F E W V M S I gdxasiaex sqksfpojg ifqjifdahmw lpndwya ljofek pyggcjqhb zbcpxirr U T Y B Y I F Y M G S H H P fftzbjitsurlxlp L D V K U L H V H T T F
I, Mikhail Fridman picked you Reply To jb5406424@gmail.com for more details
Pershendetje Ju lutemi kontrolloni mesazhin tim të hershëm dhe kthehuni tek unë, ju lutem. Faleminderit. të fala. Elimond Emeh **************************** Greeting Kindly check my early message and get back to me please. Thanks. regards. Elimond Eme