On Fri December 9 2011, Michael S. Zick wrote: > JRO, > > Several problems here with auFS on a 3.0.4 kernel. > > All I can say about the first two is they aren't > expected based on the on-line man.html. > > root:~# cat /sys/module/aufs/version > 3.0-20110815 > root:~# uname -a > Linux Microknoppix 3.0.4 #12 SMP PREEMPT Thu Sep 8 05:27:05 CEST 2011 i686 > GNU/Linux > > (Also known as Knoppix v6.7.1 LiveDVD on flash.) > > The first one is a simple case that the xino section of the manual > does not mention that the external xino file must not exist at > mount time: > > root:~# touch /auspace/auxino > WRONG! > File must not exist when mounting auFS: > root:~# dmesg > [10481.277111] aufs au_xino_create:693:mount[4720]: open /auspace/auxino(-17) > > That one is simple, either the manual is incomplete or the code test is > wrong. ;-) > > The brief version of my setup: > > mkdir /auspace > mount -t tmpfs autmp /auspace > mkdir /auspace/systree > mkdir /auspace/syschgs > mkdir /auspace/auroot > > make list of top level directories in /auspace/systree > mount --rbind selected current system directories onto /auspace/systree > > A single system directory example of the list of directories: > root:~# mount --rbind /sbin /auspace/systree/sbin > etc. etc. etc. > > The manual mentions using the auFS stack without a writable layer > (branch) and also that, unless specified, the first layer is read-write. > > So trying: > root:~$ mount -t aufs -o br:/auspace/systree=ro:/auspace/syschgs=rw syswork > /auspace/auroot > > Gives: > root:~# dmesg > [10620.585441] aufs au_opts_verify:1368:mount[4727]: first branch should be rw > > And in spite of the dmesg complaint: > > root:~$ cat /proc/self/mounts > - - just the interesting ones - - > autmp on /auspace type tmpfs (rw,relatime) > syswork /auspace/auroot type aufs (rw,relatime,si=5550d122) > > root:~# ls -l /sys/fs/aufs/si_5550d122 > total 0 > -r--r--r-- 1 root root 4096 Dec 9 11:44 br0 > -r--r--r-- 1 root root 4096 Dec 9 11:44 br1 > -r--r--r-- 1 root root 4096 Dec 9 11:44 xi_path > > root:~# cat /sys/fs/aufs/si_5550d122/* > /auspace/systree=ro > /auspace/syschgs=rw > /auspace/syschgs/.aufs.xino > > Which looks like it would work but it does not. >
In follow-up, the "does not work" comment above: Making an external copy of spinning-rust the read-only layer does "work" (as in: see files in /auspace/auroot). That is, like this: root@Microknoppix:/# mkdir /auspace root@Microknoppix:/# mount -t tmpfs autmp /auspace root@Microknoppix:/# mkdir /auspace/{auroot,syschgs} root@Microknoppix:/# mkdir /mnt/md4 root@Microknoppix:/# mdadm --assemble /dev/md4 mdadm: /dev/md4 has been started with 2 drives. root@Microknoppix:/# mount /dev/md4 /mnt/md4 root@Microknoppix:/# mount -t aufs -o xino=/auspace/auxino,br:/auspace/syschgs=rw:/mnt/md4=ro syswork /auspace/auroot root@Microknoppix:~# ls /auspace/auroot Builds boot ... usr var1 vmlinuz win-d So, that leaves from my original post: The open call for the xino file needs to have "truncate if exists" rather than error exit. The triggering of the "first layer must be rw" dmesg needs (your choice): Fixed, if that isn't a requirement Prevented from doing the mount if it is a requirement Note: Since the documents say an auFS stack will work without a rw layer, I don't see how it can be a requirement that the first layer be rw. ;-) Fix auplink so that you can unmount a auFS stack that was improperly constructed. That is, when problem two happens and auFS continues with the mount action, aufs.umount can't take it down again. (aufs.umount could print a dmesg warning, and just continue) The quick fix to get rid of it: mv /sbin/auplink /sbin/auplink.bak ln -s /bin/true /sbin/auplink umount <whatever auFS stack is in trouble> rm -f /sbin/auplink mv /sbin/auplink.bak /sbin/auplink Mike > And then comes the fun, try to get rid of it: > > root:~# umount syswork > auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device > auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device > > root:~# mount -o remount,ro /auspace/auroot > /sbin/mount.aufs:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for > device > > root:~# umount /auspace/auroot > auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device > auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device > > Renaming /sbin/mount.aufs, /sbin/umount.aufs, /sbin/auplink temporarily will > allow the 'umount' to actually unmount the auFS stack on /auspace/auroot. > > - - - - > > The reason for making my own /auspace as a tmpfs was to keep it out of the > system tree that was in use. > > The Knoppix installation on flash is a two layer, auFS stack. > > Which tells me that the auFS module and kernel are working, would be hard > to run this installation if it wasn't. ;-) > > And it raises a question in my mind - > Since the directories being "rbind mounted" are the top of another auFS > stack, could this be the source of some of my problems? > > Mike > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > > ------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/