[OpenAFS] 'split' a tree of directory into volumes?
Todd Lewis
Todd_Lewis@unc.edu
Sat, 07 Feb 2004 21:13:45 -0500
Michael,
You may have to wrap a script around it to handle the details, but you may end
up using the 'up' utility to get the data into the volumes. 'up' is a recursive
'cp' that knows about and copies ACLs as well as files. Hardly anybody knows
about it though, and fewer use it.
It also knows about mount points (at least the recent OpenAFS version does on
UNIX; the Windows versions probably doesn't, and the Transarc AFS 'up' doesn't)
so if you happen to have volumes mounted in your tree they don't get copied,
just the mount points.
It shouldn't be hard to come up with a script that creates a volume based on
the directory name, mv the old "20020101" dir for example to ".20020101", mount
the new volume at "20020101", use 'up' to copy the data w/ ACLs, and if
everything looks good, remove the ".20020101" directory and it's contents --
watching out for mount points of course, else you might clobber more than you
mean to.
'up' can only copy files that you have read access to, so if ACLs are
restrictive you might have to become a system:administrator, but that doesn't
sound like your problem.
On the other hand, if neither ACLs nor mount points in your subtree are issues,
then you can just use 'mv' instead of 'up'. You'll still have to deal with
creating and mounting appropriately named volumes in either case.
Hope this helps a little. If you create something beautiful, share it! I'm
sure this problem will come up again, if not for you then for somebody else.
Good Luck,
--
Todd_Lewis@unc.edu
Michael Loftis wrote:
> OK I have a large number of directories, in this case a dated archive,
> it's all been in one volume for quite some time, but now that volume is
> unmanageably large. Going forward I can easily vos create and fs
> mkmount, but for the existing stuff I was wondeirng if anyone wrote a
> scrip to take a tree of directories and split them into volumes?
>
> If not I'll hack something together, just seems like someone already did
> this....
>
>
> Currently it looks something like this:
> <volume> <dirs>
> archvol--+20020101
> +20020102
> +20020103
> ...
>
> I want to split all those dirs into their own volumes then fs mkmount
> them back into their original places so I end up with a number of much
> smaller volumes.
>
> Thanks in advance all!!!
>
> --
> Undocumented Features quote of the moment...
> "It's not the one bullet with your name on it that you
> have to worry about; it's the twenty thousand-odd rounds
> labeled `occupant.'"
> --Murphy's Laws of Combat
>
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info