Hi, I am currently working with aufs on getting a Debian 7 system to boot the root filesystem on disk in read-only and with aufs, have the parts of the filesystem that require write permissions to be overlayed to a tmpfs so that they can be writable even if the changes will not be persistent when the system reboots.
Here is basically what I have done so far : Install a standard debian 7 system Install a "home-made" 3.6.11 linux kernel patched with aufs Make an init script that is run very early in the boot process which does the following : - Mounts a tmpfs to /varram - Mounts an ext3 partition in rw mode to /conf - Mounts the union of /var(ro) and /varram(rw) to /var - Mounts the union of /etc(ro) and /conf/etc(rw) to /etc Change the fstab to have the rootfs mounted readonly, and added "ro" to the kernel command line options in grub With this, I have all changes from the initial config in etc being stored in /conf/etc thanks to aufs And all the runtime stuff which I don't need to be persistent (in /var) are writeable thank's to aufs, and the changes are stored by aufs in a tmpfs mounted filesystem This worked great so far... until I installed squid. When I have squid installed, it fails to start and I also get aufs kernel messages in my logs : aufs au_cpup_single:756:squid[3490]: I/O Error, failed removing broken entry(-1, -1) aufs au_cpup_single:676:squid[4067]: I/O Error, i46 exists on a upper branch but not pseudo-linked aufs au_cpup_single:676:squid[4082]: I/O Error, i46 exists on a upper branch but not pseudo-linked ... Then squid gives up and terminates. I ran find /var -inum 46 and it is "/var/spool" So this makes sense since squid is configured to run its cache from /var/spool/squid But I couldn't find out why this happens and how I can avoid this problem. I have seen that there might be an issue with tmpfs where inode numbers may wrap around, but I don't think it is what I am facing here. I have tried many different mount options but none seemed to fix the issue. What I am doing here was working fine on an "old" 2.6.32 with aufs2 kernel and debian 5. But I am currently upgrading to some more current versions and I would like the same to be working, simply. Here is my /proc/mounts : rootfs / rootfs rw 0 0 /dev/root / ext3 ro,relatime,errors=continue,barrier=1,data=writeback 0 0 tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=206464k,mode=755 0 0 tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /dev tmpfs rw,relatime,size=10240k,mode=755 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=563200k 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0 /dev/sda2 /conf ext3 rw,relatime,errors=continue,barrier=1,data=writeback 0 0 tmpfs /ramvar tmpfs rw,relatime 0 0 aufs /etc aufs rw,relatime,si=db8a6945,nowarn_perm 0 0 aufs /var aufs rw,relatime,si=db8a6745,noxino,nowarn_perm 0 0 tmpfs /tmp tmpfs rw,relatime 0 0 /sys/module/aufs/version is 3.6-20130429 /sys/module/aufs/parameters/brs is 1 My kernel AUFS config is : CONFIG_AUFS_FS=y CONFIG_AUFS_BRANCH_MAX_127=y # CONFIG_AUFS_BRANCH_MAX_511 is not set # CONFIG_AUFS_BRANCH_MAX_1023 is not set # CONFIG_AUFS_BRANCH_MAX_32767 is not set CONFIG_AUFS_SBILIST=y # CONFIG_AUFS_HNOTIFY is not set # CONFIG_AUFS_RDU is not set # CONFIG_AUFS_PROC_MAP is not set # CONFIG_AUFS_SP_IATTR is not set # CONFIG_AUFS_SHWH is not set # CONFIG_AUFS_BR_RAMFS is not set CONFIG_AUFS_BDEV_LOOP=y # CONFIG_AUFS_DEBUG is not set Any help would be much appreciated. Best regards, -- Francois GOUDAL f...@satcom1.com ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may