On Wed August 11 2010, T o n g wrote: > On Tue, 10 Aug 2010 02:25:17 +0000, T o n g wrote: > > > >> Here I'd suggest you another approach. > > >> > > >> mount -t aufs -o br:rw:ro_mid=ro+wh:ro_bot none u mount -t aufs -o > > >> br:ro_mid:ro_bot none u2 aubrsync move u rw u2 umount u2 > > > > > > I am afraid that it won't be accumulative either. > > > > I don't understand what you want to say. > > Ok, back to ground 0. Please refer to the following previous posts (that > I gathered from different places): > > ,----- > | >> . . . 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? > | . . . > | > | % aubrsync _move u rw/ ro1/ '--remove-source-files --exclude=.wh..wh.* > | rw/ ro2' > | : : : > | > | $ find ro2 > | ro2 > | ro2/d1 > | ro2/d1/.wh.6 > | ro2/d1/.wh.7 > | > | See, all the previous content have gone. > `----- > > > If you are talking about whiteout, then try shwh as I wrote. > > No, I want to preserve previous changes after move -- so that one move > won't wipe out my previous changes. >
Then I guess you need to do something about "previous" - move those to "previous.previous" ? I.E: More previous than the newest "previous" will be. Think of the file system layers as a stack. If you push down on the top with something that should not over write a previous version - you have to push the entire stack down, not just the stack top. OR - start keeping versioned files - one way to do that (other than a simple rename) is to make all names indirect - such as using the content id of the file (name the file the value of its sha1sum) - maintain the human readable name as a symbolic link to the "current" version sha1sum name - maintain a text file of the prior sha1sum names of the prior versions, one for each filename. Keep only the symbolic link and the "current" sha1sum named file on: grml-high.current, grml-mid.current, grml-low.current; keep the corresponding version logs and the prior versions of each sha1sum named file on: grml-high.prior, grml-mid.prior, grml-low.prior. Your don't even have to mount the *.prior directory level unless doing push-down and pull-up maintenance of your stacks. There are a lot of ways to maintain versioned files - google: "generation files" or "generation file systems". The way your headed, sooner or later you will run out of stack levels. Mike ------------------------------------------------------------------------------ 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