Hi

I have Debian Lenny (kernel 2.6.26) with aufs 20080719. Root filesystem 
is mounted as aufs.

This is more or less what happens in initramfs:
mount -t ext3 -o ro /dev/hda1 /ro
mount -t tmpfs none /rw
mount -t aufs -o dirs=/rw=rw:/ro=ro none /root
mount --move /ro /root/ro
mount --move /rw /root/rw

Contents of /proc/mount at that point:
rootfs / rootfs rw 0 0
none /root/sys sysfs rw,nosuid,nodev,noexec 0 0
none /root/proc proc rw,nosuid,nodev,noexec 0 0
udev /root/dev tmpfs rw,size=10240k,mode=755 0 0
/dev/disk/by-uuid/cba247aa-4b4a-43e1-b207-11ca38c54849 /root/ro ext3 
ro,errors=continue,data=ordered 0 0
none /root/rw tmpfs rw 0 0
none /root aufs 
rw,si=cf37eb50,xino=/root/rw/.aufs.xino,br:/root/rw=rw:/root/ro=ro 0 0

Later /root becomes /

And there is a script /etc/init.d/aufs-sync called at shutdown:
fsck -nf /dev/hda1
mount -o remount,rw /ro
rsync --exclude=".wh.*" --exclude=lost+found -aHSx --devices --specials 
/rw/ /ro/
cd /rw
find . -name ".wh.*" -and -not -name ".wh..wh.*" | sed 's/^\.\//\/ro\//' 
| sed 's/\/\.wh\./\//' | /usr/bin/xargs -d "\n" rm -rf
mount -o remount,ro /ro
fsck -nf /dev/hda1

The first fsck call shows filesystem is clean. The second call almost 
always displays errors such as:

Pass 1: Checking inodes, blocks, and sizes
Deleted inode 4036 has zero dtime.  Fix? no

Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 65139 was part of the orphaned inode list.  IGNORED.
Inode 68024 was part of the orphaned inode list.  IGNORED.
Inode 72454 was part of the orphaned inode list.  IGNORED.
Inode 73103 was part of the orphaned inode list.  IGNORED.
Inode 76083 was part of the orphaned inode list.  IGNORED.
Inode 83104 was part of the orphaned inode list.  IGNORED.
Inode 172324 was part of the orphaned inode list.  IGNORED.
Inode 217474 was part of the orphaned inode list.  IGNORED.
Inode 318968 was part of the orphaned inode list.  IGNORED.
Inode 319034 was part of the orphaned inode list.  IGNORED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -7443 -(266828--266829) -298366 -301248 
-(301250--301251) -317857 -317860 -(372943--372948) -400108 
-(613775--613791) -703495 -703518 -(905458--905535) -(1286424--1286425)
Fix? no

Inode bitmap differences:  -4036 -65139 -68024 -72454 -73103 -76083 
-83104 -172324 -217474 -318968 -319034
Fix? no

Thanks to journaling these errors go away after the next mount, but how 
can I know if more serious errors don't appear in the future. This is 
not acceptable on a machine that is supposed to be like an appliance 
with minimum administration effort.

This problem is not only on shutdown. I was able to reproduce these 
errors in the initramfs stage, right after aufs was set up. I chrooted 
into /root and called a variant of /etc/init.d/aufs-sync which used a 
copy of /rw created before reboot. Often, but not always, the same fsck 
errors appeared.

Here is the list of things I tried to do, and none of them made any 
difference:

- used aubrsync from aufs2 git tree

- manually cp and rm files

- added at the beginning of the shutdown script:
mount -no remount,ro,noxino /
mount -no remount,ro /rw

- rebuilt the kernel with patches:
sec_perm-2.6.24.patch
fsync_super-2.6.19.patch
then built aufs from source with:
CONFIG_AUFS_HINOTIFY = y
CONFIG_AUFS_FSYNC_SUPER_PATCH = y

- called aubrsync with -i

- added udba=inotify to the mount call in the initramfs script

- added noxino to the mount call in the initramfs script

When I use unionfs2 with similar setup, there are no errors.

Any ideas what is wrong and how to fix it?


-- 
bl4

------------------------------------------------------------------------------
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

Reply via email to