Erez Zadok <[EMAIL PROTECTED]> writes: >> - 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. > > Herton, you cannot set the leftmost branch to be readonly, in a union > mounted read-write. If the union is mounted read-write, then the leftmost > branch must be writeable, to allow copyup. If you want to set the leftmost > branch to readonly, it is the same as saying that you want the whole union > to be readonly. In that case, remount your entire filesystem readonly: > > # mount -t unionfs -o remount,ro none /live/union
Our use case is / as union, so we can't really remount the union read-only (it's busy). We used to be able to make the lefmost branch read-only with unionfs 1.x, even if the union was writable. This allowed to boot with a tmpfs as rw branch of the / union, ask for some settings, remount the tmpfs branch ro, safely copy the changes from tmpfs to a new directory (on disk), and add this new directory in the union with rw mode. > Check your kernel console messages (e.g., run dmesg). You'll should have > seen this message: > > printk(KERN_ERR "unionfs: leftmost branch cannot be read-only " > "(use \"remount,ro\" to create a read-only union)\n"); Actually, the "mount -t unionfs -o remount,mode=/live/foo=ro none /live/union" command succeeds, with no error message, and nothing in syslog. Thanks -- Olivier Blin (blino) - Mandriva _______________________________________________ unionfs mailing list: http://unionfs.filesystems.org/ unionfs@mail.fsl.cs.sunysb.edu http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs