On Fri, 06 Aug 2010 22:09:58 +0900, sfjro wrote:
>> but I also want to know, can the above aubrsync move be accumulative?
>>
>> I mean, if I move my modification down in shutdown script today, then I
>> wish that tomorrow I can move my new modification down in shutdown
>> script without affecting my today's changes.
>
> I guess so, as long as you don't specify the rsync option to remove the
> old contents of the lower branch.
then I guess the script is not working as expected:
umount /dev/shm/aumt/u
mount -t aufs -o br:./rw:./ro2=wh:./ro1 none ./u
$ ls u/d?
u/d1:
1 2 3 4 5 6 7 8 9 four
u/d2:
1 2 3 4 5 6
rm u/d1/{6,7}
$ find rw
rw
rw/d1
rw/d1/.wh.7
rw/d1/.wh.6
rw/.wh..wh.orph
rw/.wh..wh.plnk
rw/.wh..wh.aufs
$ find ro2
ro2
ro2/d2
ro2/d2/6
ro2/d2/5
ro2/d2/4
ro2/d2/3
ro2/d2/2
ro2/d2/1
ro2/d1
ro2/d1/.wh.2
ro2/d1/.wh.3
ro2/d1/four
ro2/d1/.wh.4
% aubrsync _move u rw/ ro1/ '--remove-source-files --exclude=.wh..wh.*
rw/ ro2'
/dev/shm/aumt/u
/dev/shm/aumt/rw
/dev/shm/aumt/ro1
+ mount -o remount,ro,udba=reval,noshwh /dev/shm/aumt/u
+ eval ' _move --remove-source-files --exclude=.wh..wh.* rw/ ro2'
++ _move --remove-source-files '--exclude=.wh..wh.*' rw/ ro2
++ set +x
aubrsync: warning, -i is not specified
++ rsync --exclude=lost+found -aHSx --devices --specials --delete-before
--remove-source-files '--exclude=.wh..wh.*' rw/ ro2
++ '[' 0 -eq 1 ']'
++ xargs -r0 rm -fr
+++ FindForRm /dev/shm/aumt/rw
+++ echo 'find "/dev/shm/aumt/rw" -xdev -depth \(
\( ! -type d
\( -name .wh..wh..opq
-o ! -name .wh..wh.\* \) \)
-o \( -type d
! -name .wh..wh.\*
! -wholename "/dev/shm/aumt/rw"
! -wholename "/dev/shm/aumt/rw/lost+found" \)
\) -print0'
++ eval find '"/dev/shm/aumt/rw"' -xdev -depth '\(' '\(' '!' -type d '\('
-name .wh..wh..opq -o '!' -name '.wh..wh.\*' '\)' '\)' -o '\(' -type d
'!' -name '.wh..wh.\*' '!' -wholename '"/dev/shm/aumt/rw"' '!' -wholename
'"/dev/shm/aumt/rw/lost+found"' '\)' '\)' -print0
+++ find /dev/shm/aumt/rw -xdev -depth '(' '(' '!' -type d '(' -
name .wh..wh..opq -o '!' -name '.wh..wh.*' ')' ')' -o '(' -type d '!' -
name '.wh..wh.*' '!' -wholename /dev/shm/aumt/rw '!' -wholename /dev/shm/
aumt/rw/lost+found ')' ')' -print0
+ mount -o remount,udba=reval,noshwh,rw,relatime,si=a5a29179493d9a2e /dev/
shm/aumt/u
$ find ro2
ro2
ro2/d1
ro2/d1/.wh.6
ro2/d1/.wh.7
See, all the previous content have gone.
Moreover, while checking back the execution log, I noticed that
the first 'ls u/d?' shouldn't list the d1/4 file, because it has been
rename to 'four' in previous steps. See ro2/d1/four and ro2/d1/.wh.4.
Could you double check please?
thanks
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
------------------------------------------------------------------------------
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