[Unionfs] Can't make branch read only

Herton Ronaldo Krzesinski herton at mandriva.com.br
Tue Oct 23 08:56:23 EDT 2007


Hi,

Just following documentation at Documentation/filesystems/unionfs/usage.txt,
it says:

"Finally, to change the mode of one existing branch, say /foo, from read-only
to read-write, and change /bar from read-write to read-only:

# mount -t unionfs -o remount,mode=/foo=rw,mode=/bar=ro none MOUNTPOINT"

Here I tried the same on a branch to change it to read only mode, but isn't
working (branch continues to be read/write, writes still appears on it), the
testcase is similar to the other bug I posted previously:

- mkdir -p /live/distrib
- if wished install some files at /lib/distrib
- mkdir /live/memory
- mount -t tmpfs none /live/memory
- mkdir /live/union
- mount -o dirs=/live/memory=rw:/live/distrib=ro -t unionfs unionfs /live/union
- mkdir /live/foo
- mount -t unionfs -o remount,add=/live/foo=rw none /live/union
- do some writes/changes at /live/union (probably optional)
- mount -t unionfs -o remount,mode=/live/foo=ro none /live/union

The last command, while should switch the branch to read only mode as the
documentation specifies, doesn't work, the branch /live/foo continues to be
read-write, and if you write something to /live/union you confirm this as there
will be still writes to /live/foo (and /proc/mounts continues to show /live/foo as
rw too). Any ideas?

I tried this with unionfs 2.1.3 and also with 2.1.7 but with same results.

--
[]'s
Herton


More information about the unionfs mailing list