> > When boot from usb Flash, the top layer is a tmpfs, > > next down is a file with ext2 f.s. in it mounted by > > loop device. We flush the top layer (branch) down > > to the save layer periodically, which is a mechanism > > to minimise writes to Flash drive. > > If you set '=ro' to the branch on Flash drive, aufs will not write > anything to Flash drive.
As mention in previous post, the union is done like this: mount -t aufs -o udba=reval,dirs=/pup_rw=rw:/pup_ro1=ro:/pup_ro2=ro unionfs /pup_new;check_status $? This is done before switch_root. After switch root, the mount points of the layers are still available as /initrd/pup_rw, etc. To save files from the pup_rw layer to the pup_ro1 layer I have a script that writes direct to the mount point /initrd/pup_ro1. The ext2 "save" file is on the Flash drive and that is mounted by loop device read-write on /pup_ro1. It doesn't matter that it is ro in the aufs union. It works. It worked with Unionfs, works with Aufs 20061125. If I copy a file from /initrd/pup_rw down to /initrd/pup_ro1 then delete it on /initrd/pup_rw, Aufs detects this and successfully picks up the new file in /initrd/pup_ro1. With the 2 exceptions that I mentioned in my original post. Regards, Barry Kauler ________________________________________________ This message was sent using Dodo Webmail - www.dodo.com.au ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
