bl4: > When it's ready I will send all info in a separate email. Thanx. I could reproduce the problem. But still I am unsure whether the problem is in aufs or not. So I tried it on /dev/hdb which is a small ext2 image.
$ dd if=/dev/zero of=hdb bs=32M count=1 $ mkfs -t ext2 -q -F hdb $ qemu -hda debian_lenny_aufs.vmdk -hdb ./hdb In qemu, I wrote a small test script. ---------------------------------------- #!/bin/sh dev=/dev/hdb dir=/mnt set -eux mount -o ro $dev $dir fgrep $dir /proc/mounts fsck -nf $dev mount -o remount,rw,sync $dev mkdir -p $dir/tmp echo test > $dir/tmp/test echo test > $dir/tmp/test2 rm $dir/tmp/test sync mount -o remount,ro $dev fgrep $dir /proc/mounts fsck -nf $dev || : umount $dev fsck -nf $dev ---------------------------------------- And here is the result. ---------------------------------------------------------------------- + mount -o ro /dev/hdb /mnt + fgrep /mnt /proc/mounts /dev/hdb /mnt ext2 ro,errors=continue 0 0 + fsck -nf /dev/hdb fsck 1.41.3 (12-Oct-2008) e2fsck 1.41.3 (12-Oct-2008) Warning! /dev/hdb is mounted. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/hdb: 11/8192 files (0.0% non-contiguous), 1434/32768 blocks + mount -o remount,rw,sync /dev/hdb + mkdir -p /mnt/tmp + echo test + echo test + rm /mnt/tmp/test + sync + mount -o remount,ro /dev/hdb + fgrep /mnt /proc/mounts /dev/hdb /mnt ext2 ro,sync,errors=continue 0 0 + fsck -nf /dev/hdb fsck 1.41.3 (12-Oct-2008) e2fsck 1.41.3 (12-Oct-2008) Warning! /dev/hdb is mounted. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Unconnected directory inode 4097 (/???) Connect to /lost+found? no '..' in ... (4097) is / (2), should be <The NULL inode> (0). Fix? no Pass 4: Checking reference counts Inode 4097 ref count is 2, should be 1. Fix? no Pass 5: Checking group summary information /dev/hdb: ********** WARNING: Filesystem still has errors ********** /dev/hdb: 13/8192 files (0.0% non-contiguous), 1436/32768 blocks + : + umount /dev/hdb + fsck -nf /dev/hdb fsck 1.41.3 (12-Oct-2008) e2fsck 1.41.3 (12-Oct-2008) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/hdb: 13/8192 files (0.0% non-contiguous), 1436/32768 blocks ---------------------------------------------------------------------- fsck reported /dev/hdb also coruppted. But after unmount, it said fs is clean. Here is my current guess. - qemu or linux-2.6.26 may NOT flush ext2/3 at remounting readonly, but they may flush at unmounting time. - your /dev/hda1 is not unmounted. it is remounted ro at shutdown time too. - contrastingly /dev/hdb can be unmounted, and it can be clean. Also I've found interesting issue. When /dev/hdb was already mkfs-ed and has a dir 'tmp', it would not corrupt. The problem happened only when the tmp dir was created by the test script. The mount option dirsync didn't help. I will compile the last version of aufs1, replace your version, and test a little more. It will take some time. But I have to say that my option becomes stronger a little. Don't you agree? By the way, I could not find /etc/default/auplink. So I had to create it manually. J. R. Okajima ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
