Hello all, I am considering a new feature "move-down", which will be a first step of "file-based hierarchy storage management." Here is a simple document for it. And I want you to try reading it and post a comment.
Thanks in advance. J. R. Okajima Move-down ---------------------------------------------------------------------- "Copy-up" is one of the essential feature in aufs. It copies a file from the lower readonly branch to the upper writable branch when a user changes something about the file. "Move-down" is an opposite action of copy-up. Basically this action is ran manually instead of automatically and internally. Sometimes users want to move-down a file from the upper writable branch to the lower readonly or writable branch. For instance, - the free space of the upper writable branch is going to run out. - create a new intermediate branch between the upper and lower branch. - etc. For this purpose, use "aumvdown" command in aufs-util. ======================================== There are several conditions to achieve the action. - files in use (in aufs world) are not be handled. - hard-linked (or pseudo-linked in aufs world) files are not be handled. For such file, remount aufs or use "auplink." - directories are not be handled since the action doesn't behave recursivly and the moving-down an empty dir has less meaning. When all these conditions are not satisfied, EBUSY will be returned. Note that any directory in aufs can be "opaque". If any of the ancestor dir of the file is set to opaque, you may not see the moved (or copied) file. It is strongly discouraged to specify "diropq=always" if you have a plan to use move-down. Actually the command checks the parent dir's opaqueness and returns EROFS if set, but not for all ancestors. This confusing situation can happen when a user rename(2) a dir directly on a branch (by-passing aufs) since aufs cannot stop such user's direct rename(2) operation. Also note about the whiteout on the lower branches, including the readonly branches with the attribute "=ro+wh" is set. Similar to the opaqued dir, the whiteout can hide the lower same-named file and you may not see the moved (or copied) file either. Actually the command checks the whiteout in the parent dir and removes if found, but not for all ancestors. And there are several options for the action. - over-write when this option is enabled and if the same named file exists on the target branch, it will be over-written. otherwise EEXIST will be returned. - keep the source Essentially this option choose the action whether "copy" or "move." when this option is disabled, the source file on the upper writable branch is removed after copying-down which results "move". - source and target branch id By default, the source branch is the first writable branch where the file exists, and the target branch is the next lower writable branch. By specifying these options users can choose the other source/target branch even if that branch attribute is set as readonly in aufs world. Obviously no can write to the natively readonly filesystem which will return EROFS. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev