Engineering Software, Linux, and Operations. The website of Jack Neely.    

Moving AFS Volumes by Name

  December 19, 2011   Operations

I help maintain a fairly large OpenAFS installation.  One of the things I find myself doing often is moving AFS Volumes from server to server.  The command to do so requires you know exactly where the volume currently is before it can be moved to a new server.  There’s a reason for that even if AFS already knows where that volume is.  In any case, while moving one type of volumes to server A and a different type to server B I decided I needed a tool to make this easier.

Cue the perl-AFS modules and a bit of perl code.  I wrote the attached script that will locate the volumes for you and move them to your stated destination.  You can do things like:

$ perl -t \
-P /vicepa -c volume1 volume2 volume3 ...

That will move the three volumes given on the command line to server00. Or, you can use some command line redirection and do something like:

$ echo "volume1 volume2 volume3" | perl \
-t -P /vicepa -c -

Use the -d switch (for debug) to see a list of actions that the script would perform without actually performing them.

 Previous  Up  Next

comments powered by Disqus