Thanks for your reply.

[email protected] wrote:
> bl4:
>> 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:
> 
> Because there is no access to aufs between two fsck-s, it may be a
> problem of ext3. I'd suggest you to try mounting /dev/hda1 as ext2. You
> don't need to convert it to ext2, just need to specify the fs type as
> "mount -t ext2".


I changed it, /proc/mounts shows ext2, and the errors I get are different:

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

Deleted inode 72868 has zero dtime.  Fix? no

Deleted inode 73103 has zero dtime.  Fix? no

Deleted inode 75630 has zero dtime.  Fix? no

Deleted inode 172323 has zero dtime.  Fix? no

Deleted inode 314258 has zero dtime.  Fix? no

Deleted inode 320026 has zero dtime.  Fix? no

Pass 2: Checking directory structure
Entry '.cache' in /etc/lvm/cache (43755) has deleted/unused inode 47217. 
  Clear? no

Entry 'utmp' in /var/run (64387) has deleted/unused inode 64396.  Clear? no

Entry 'asound.state' in /var/lib/alsa (64552) has deleted/unused inode 
65084.  Clear? no

Entry 'dhclient.eth0.leases' in /var/lib/dhcp3 (72963) has 
deleted/unused inode 75630.  Clear? no

Entry 'dmesg' in /var/log (72444) has deleted/unused inode 73103.  Clear? no

Entry 'checkfs' in /var/log/fsck (72445) has deleted/unused inode 72868. 
  Clear? no

Entry '.bash_history' in /root (289729) has deleted/unused inode 172323. 
  Clear? no

Entry 'adjtime' in /etc (313873) has deleted/unused inode 314258.  Clear? no

Entry 'resolv.conf' in /etc (313873) has deleted/unused inode 317896. 
Clear? no

Entry 'blkid.tab' in /etc (313873) has deleted/unused inode 320026. 
Clear? no

Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Unattached inode 43675
Connect to /lost+found? no

Unattached inode 65082
Connect to /lost+found? no

Unattached inode 72611
Connect to /lost+found? no

Unattached inode 76356
Connect to /lost+found? no

Unattached inode 76362
Connect to /lost+found? no

Unattached inode 102370
Connect to /lost+found? no

Unattached inode 172324
Connect to /lost+found? no

Unattached inode 320024
Connect to /lost+found? no

Unattached inode 320025
Connect to /lost+found? no

Unattached inode 320029
Connect to /lost+found? no

Pass 5: Checking group summary information
Block bitmap differences:  -266825 -266828 -301128 -(301247--301248) 
-(301250--301251) -317857 -347984 -(703395--703396) -(1282521--1282522)
Fix? no

Inode bitmap differences:  -65084 -72868 -73103 -75630 -172323 -314258 
-320026
Fix? no


> And for the first debugging, run rsync only, no find+rm. eg. no
> modification on /rw. Your rsync doesn't modify /rw, does it?
> 


Actually the find+rm should not modify /rw because the sed changes all 
paths from /rw to /ro. The purpose of this script is to preserve all 
changes (including removals) after reboot. Anyway, when I run rsync 
only, I also get these errors.


> When you restore the find+rm, or if there is another process which
> writes to aufs between two fsck-s, then you need to specify udba=inotify
> before rsync. You can reset it by specifying udba=reval after second
> fsck, if you want.
> 
> Your /etc/init.d/aufs-sync may not support aufs pseudo-link. Did you
> install aufs utilities and flush pseudo-link correctly? But if you
> didn't it would not break the filesystem consistency.
> 


I have FLUSH=ALL in /etc/defaults/aufs and I have /sbin/mount.aufs, 
which is enough according to the manpage.


> 
>> Here is the list of things I tried to do, and none of them made any 
>> difference:
>>
>> - used aubrsync from aufs2 git tree
> 
> This is most recommended.


But it's way too slow because it runs rsync with / as source. It 
traverses the whole tree looking for differences. I take advantage of 
the fact that in ro+rw configuration all differences happen to be 
present in /rw. If there have only been small modifications to the 
filesystem, it takes 1 second vs. 1 minute.


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