5

I can't find Aufs in Redhat's Fedora, or any other stackable filesystem for that matter.

It seems this is due to relabelling limitations of SELinux.

Is there a way to achieve similar without resorting to file/dir copy.

I have the following list of directories:

/proj/online/src/main/java
/proj/online/src/main/resources
/proj/online/src/test/java
/proj/client/src/test/scala
/proj/common/src/main/resources
/proj/common/src/main/scala
/proj/common/src/test/resources
/proj/common/src/test/scala
/proj/integration/src/main/resources
/proj/integration/src/main/scala
/proj/integration/src/test/scala
/proj/mockfeedserver/src/main/scala
/proj/mockfeedserver/src/test/scala
/proj/server/src/main/scala
/proj/server/src/test/scala
/proj/foit/src/main/resources
/proj/foit/src/main/scala
/proj/foit/src/test/resources
/proj/foit/src/test/scala

I want to present the following to the compiler*:

/tmp/foo/src/main/scala /tmp/foo/src/main/resources /tmp/foo/src/test/scala /tmp/foo/src/test/resources

With AUFS, I could have achieved this with a couple of commands such as this:

mount -t aufs -o br=r:/proj/common/src/main/scala=r:/proj/integration/src/main/scala=r:/proj/mockfeedserver/src/main/scala=r:/proj/server/src/main/scala=r:/proj/foit/src/main/scala=r -o udba=reval none /tmp/foo/src/main/scala 

So that would have mounted /tmp/foo/src/main/scala as the composite of all the src/main/scala directories.

Great, but I'm on Fedora! In the absence of AUFS or UnionFS I can't really see a way to achieve this. I've heard of mount rebinding before, can it help, or should I change my distribution?

3 Answers 3

5

FunionFS is available both on Fedora and in Red Hat EPEL. The package name, of course, is funionfs.

4
  • 1
  • Yeah, I'm going to try that. I don't like using 3rd party repo's.
    – irishjava
    Jun 12, 2013 at 16:11
  • My understanding is that EPEL is basically much of the Fedora improved packages available for Centos/RedHat.
    – mdpc
    May 18, 2016 at 22:40
  • 1
    @mdpc And with the same Red Hat employees working on them, too! May 19, 2016 at 7:13
3

You can install pre-patcher Fedora kernel with aufs support from Copr repository or build a kernel with aufs support

Instructions for installing patcher Fedora kernel with aufs support:

sudo dnf copr enable gipawu/kernel-aufs
sudo dnf update

Instructions for building Fedora kernel with aufs support:

We will start with installing dependacies required to compile kernel

yum install gcc rpmbuild glibc-static git
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
git clone http://git.code.sf.net/p/aufs/aufs3-standalone
cd linux-2.6
git checkout v3.8
cd ..
patch -d linux-2.6 -p1 < aufs3-standalone/aufs3-base.patch
patch -d linux-2.6 -p1 < aufs3-standalone/aufs3-proc_map.patch
patch -d linux-2.6 -p1 < aufs3-standalone/aufs3-standalone.patch
patch -d linux-2.6 -p1 < aufs3-standalone/aufs3-kbuild.patch

cd aufs3-standalone/
cp -ar fs/aufs ../linux-2.6/fs/
cp include/linux/aufs_type.h ../linux-2.6/include/linux/
cp include/uapi/linux/ ../linux-2.6/include/uapi/linux/

Now we’ll build kernel which is patched with aufs code.

Enable aufs support from Main menu–>File Systems –> Misc. Filesystems –> AUFS support

make menuconfig

Now, we can either compile the kernel directly or create an rpm

make modules_install
make bzimage
make install
make headers_install

or simple,

make rpm-pkg

and then install new kernel and kernel-headers rpm.

Reboot the system with new kernel.

2
  • 1
    Not quite what I'm looking for but kudos for enumerating the custom kernel build steps.
    – Bryan Hunt
    Jul 13, 2013 at 22:56
  • updated instructions with a simpler way, just install already patcher Fedora kernel.
    – valentt
    Sep 10, 2015 at 14:29
0

Only the fuse based unionfs is available on RHEL via thirdparty packages:

http://pkgs.repoforge.org/fuse-unionfs/

1
  • Hmm. I'm not crazy about installing 3rd party RPM.
    – irishjava
    Jun 11, 2013 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.