[OpenAFS] Mount points on directories that have already been created

Todd M. Lewis Todd_Lewis@unc.edu
Wed, 09 Oct 2002 12:07:59 -0400


Derek Atkins wrote:
> "Todd M. Lewis" <utoddl@email.unc.edu> writes:
> 
> 
>>Also, you might want to look at the "up" utility to copy the contents
>>of the original dir2 into the new volume, especially if you have lots
>>of complicated ACLs burried down in that subtree.  Up is sort of a
>>recursive cp that also knows about and duplicates ACLs.  It's obvious
>>when you think about it, but to use "up" effectively, you must have
>>sufficient read rights to all the data you're trying to copy.
> 
> 
> Why not just use the "rename()" syscall?
> 
> mv dir2 dir2.oldversion
> 
> Much simpler!  ;)

That's right, use mv for the first step.  Then you:
   * create the new volume
   * mount it as dir2
   * use "up" to copy the original dir2's contents -- including 
subdirectories and the ACLs burried therein -- to the new dir2.

I thought the original problem was to keep the directory structure and 
ACLs as they were, but to turn the dir2 directory into a mountpoint for 
a new volume.  Unless I'm missing something, the above steps are the 
easiest way to do that.
-- 
    +----------------------------------------------------------------+
   / Todd_Lewis@unc.edu                  http://www.unc.edu/~utoddl /
  /(919) 962-5273  Linux - It's now safe to turn on your computer. /
+----------------------------------------------------------------+