T o n g: > >> mount -t aufs -o br:./rw:./ro2=wh:./ro1 none ./u > > > > I am afraid this branch permission "=wh" returned an error. Did it > > really succeed? > > It seems to be OK at my side. Here is the full log around the point that > I did it:
You are right. I forgot that "every unknown permission will be treated as =ro". If you read /sys/fs/aufs/si_*/br*, then it would show you "/.../ro2=ro" instead of "...=wh" or "...=ro+wh". > But could you double check if the 2nd invocation of 'aubrsync _move' > doesn't affect old history at your side please? I was hoping that giving > my work history would make your life a bit easier than re-creating/ > retyping on your own. Anyway... Here is a simple script and the result. Is this behaviour what you want? J. R. Okajima ---------------------------------------------------------------------- #!/bin/sh set -eu . /etc/default/aufs cd /tmp rm -fr u rw ro_mid ro_bot mkdir u rw ro_mid ro_bot cd ro_mid mkdir d1 d2 cd d1 > ${AUFS_WH_PFX}2 ln ${AUFS_WH_PFX}2 ${AUFS_WH_PFX}3 ln ${AUFS_WH_PFX}2 ${AUFS_WH_PFX}4 > four cd ../d2 seq 6 | while read i; do > $i; done cd ../../ro_bot mkdir d1 cd d1 seq 9 | while read i; do > $i; done cd ../.. set -x sudo mount -t aufs -o br:rw:ro_mid=ro+wh:ro_bot none u ls u/d? rm u/d1/[67] sudo mount -o remount,ro,shwh u sudo find rw ro_mid sudo aubrsync _move u rw ro_bot \ "--remove-source-files \ --exclude=$AUFS_WH_BASE --exclude=$AUFS_WH_PLINKDIR --exclude=$AUFS_WH_ORPHDIR \ --max-delete=0 \ rw/ ro_mid" || : sudo find rw ro_mid sudo umount u ---------------------------------------------------------------------- + sudo mount -t aufs -o br:rw:ro_mid=ro+wh:ro_bot none u + ls u/d1 u/d2 u/d1: 1 5 6 7 8 9 four u/d2: 1 2 3 4 5 6 + rm u/d1/6 u/d1/7 + sudo mount -o remount,ro,shwh u + sudo find rw ro_mid rw rw/.wh..wh.aufs rw/.wh..wh.plnk rw/.wh..wh.orph rw/d1 rw/d1/.wh.6 rw/d1/.wh.7 ro_mid ro_mid/d1 ro_mid/d1/.wh.2 ro_mid/d1/.wh.3 ro_mid/d1/.wh.4 ro_mid/d1/four ro_mid/d2 ro_mid/d2/1 ro_mid/d2/2 ro_mid/d2/3 ro_mid/d2/4 ro_mid/d2/5 ro_mid/d2/6 + sudo aubrsync _move u rw ro_bot --remove-source-files --exclude=.wh..wh.aufs --exclude=.wh..wh.plnk --exclude=.wh..wh.orph --max-delete=0 rw/ ro_mid + mount -o remount,ro,udba=reval,noshwh /tmp/u + eval _move --remove-source-files --exclude=.wh..wh.aufs --exclude=.wh..wh.plnk --exclude=.wh..wh.orph --max-delete=0 rw/ ro_mid + _move --remove-source-files --exclude=.wh..wh.aufs --exclude=.wh..wh.plnk --exclude=.wh..wh.orph --max-delete=0 rw/ ro_mid + set +x aubrsync: warning, -i is not specified + rsync --exclude=lost+found -aHSx --devices --specials --delete-before --remove-source-files --exclude=.wh..wh.aufs --exclude=.wh..wh.plnk --exclude=.wh..wh.orph --max-delete=0 rw/ ro_mid cannot delete non-empty directory: d2 Deletions stopped due to --max-delete limit (10 skipped) rsync error: the --max-delete limit stopped deletions (code 25) at main.c(1058) [sender=3.0.3] + mount -o remount,udba=reval,noshwh,ro,si=d50767e3e9b2d9d5,shwh /tmp/u + : + sudo find rw ro_mid rw rw/.wh..wh.aufs rw/.wh..wh.plnk rw/.wh..wh.orph rw/d1 ro_mid ro_mid/d1 ro_mid/d1/.wh.2 ro_mid/d1/.wh.3 ro_mid/d1/.wh.4 ro_mid/d1/four ro_mid/d1/.wh.6 ro_mid/d1/.wh.7 ro_mid/d2 ro_mid/d2/1 ro_mid/d2/2 ro_mid/d2/3 ro_mid/d2/4 ro_mid/d2/5 ro_mid/d2/6 + sudo umount u ---------------------------------------------------------------------- ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev