On Sat, Jun 28, 2008 at 02:35:47PM +0200, Frank Wille wrote: > Hi, Sorry for the delay. > I wonder if this is a bug, or am I doing something wrong? > For a Compact Flash disk I want to mount an mfs with option union on top of > /var to allow writing of log files, etc. But strangely only files created in > the /var directory will appear in the mfs. When creating a file in a sub > directory, like /var/db, it will go directly to the ffs on the CF disk! > > This behaviour can easily be reproduced with a union-mfs on a CD-ROM. Example: > > # mount_cd9660 /dev/cd0a /cdrom > # mount_mfs -o union -s 32m test_mfs /cdrom/i386 > # cp /netbsd /cdrom/i386/ > # cp /netbsd /cdrom/i386/binary/kernel/ > cp: /cdrom/i386/binary/kernel/netbsd: Read-only file system > > The first cp works, the second doesn't, because it bypasses the mfs! Why? Because that's how -o union works. It only applies to the top-level directory. When you looked up "/cdrom/i386/binary" you got a directory vnode on the CD ROM. Thus when you looked up "kernel" you got another vnode on the CD ROM. You then were unable to write. -o union != unionfs. Take care, Bill
Attachment:
pgpE9P4Z3kDRv.pgp
Description: PGP signature