Using fuse-unionfs with CentOS 5.5 i686

Of the RedHat / Fedora / CentOS family, CentOS has the best combination of being freely available *and* having long-term support for updates via the various official and unofficial RPM repositories. The downside, though, is that not all of the fun / new / bleeding-edge software found in Fedora can be found for CentOS.

Some, however, can. Case in point is the FUSE (File-system in UserSpacE) user-space driver for using the “unionfs” file-system layering technology.

First, you must add the proper repository to the yum configuration for the server.

The repository you will need is:
Dag Apt Repository,

The package you will need is called:

The dependencies for this package are:
fuse-libs (from the CentOS repository)
fuse (from the CentOS repository)

Once you have the yum repositories set up, install the package by running (as root):
#yum install fuse-unionfs

That should install the fuse-unionfs (or unionfs-fuse) package.

The utility should be installed as:

Getting the unionfs-fuse mount points to work via /etc/fstab is one of the more bizarre and poorly-documented things in the Linux universe, but here is a line from /etc/fstab that seems to work:

unionfs#/path/to/your/writabledirectory=rw:/path/to/your/readonlydirectory=ro /path/to/your/finaldirectory fuse default_permissions,allow_other,use_ino,nonempty,suid,cow 0 0

In this fstab line, here is an explanation of each part:

  • unionfs   — this is apparently the command that fuse runs to mount the file system
  • The “#” after unionfs. This separates the unionfs command from the parameters
  • /path/to/your/writabledirectory=rw — this is the path on the system to your writable directory
  • /path/to/your/readonlydirectory=ro — this is the path on the system to your readonly directory
  • The colon between the paths — this separates the two paths; More than two paths can be included, the leftmost will be the “topmost” layered path, going down the layers for each path to the right, separated by colons.
  • fuse — this is the name of the filesystem to use. “fuse” is a meta-filesystem that can mount many other sub-types of file-system below it, in this case, “unionfs”
  • default_permissions — this asks unionfs to use the default permissions
  • allow_other — this asks unionfs to allow non-root users to talk to the mounted filesystem
  • use_ino — let the filesystem set the inode numbers
  • nonempty — allows unionfs to mount the unioned-filesystem into a non-empty directory on the system
  • suid — allows suid on the unionfs filesystem
  • cow — enables copy-on-write, which allows editing of files that are mounted from a readonly path, by placing a copied file into the read-writable path instead
  • 0 0  — standard fstab entries for mount order and check order (I think)

2 thoughts on “Using fuse-unionfs with CentOS 5.5 i686

  1. In Ubuntu 12.10 at least you need to start the line with unionfs-fuse not just unionfs or you get command not found. I assume the binary was renamed since this was published.


    Thanks for the article, I think I come here on every re-install.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s