[OpenAFS] Automatic move of volumes

Steven Jenkins steven.jenkins@gmail.com
Wed, 24 Oct 2007 10:15:34 -0400


It's great that you sent actual code.

However,

- there is no error checking in here, so there are potential issues (I
realize your script is generating the commands, not actually doing
them, but it still needs to address error checking -- if nothing else
stick a '|| exit 1' at the end of each command)
- handling RWs first will break RW/RO clones (if any exist) -- you
probably don't want to do that.
- the RO handling is not good -- what happens if the _only_ RO is on
the old server and the remsite happens?  Clients with existing
connections & callbacks are ok, but any new clients needing that data
now have no place to get it (even though the RO exists, the vldb
doesn't know about it, so clients will go against the RW instead).
Also, the actual data is left on the old fileserver ,which may (or may
not) cause a problem down the road.  Much better is to do a vos remove
(which updates both the vldb & file server) after the new clone has
been brought on line.
- in general, handling RW/RO pairs is best handled separately

I realize my 'general idea' email isn't complete enough to really
build a robust script.

Steven

On 10/24/07, chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil> wrote:
...
>                 $rw eq "RO" && $do_ro && do
>                 {
>                         $volume =~ s/\.readonly$//;
>
>                         printf "vos remsite %s %s %s\n", $from_server, $from_partition, $volume;
>                         printf "vos addsite %s %s %s\n", $to_server, $to_partition, $volume;
>                         printf "vos release %s -verbose -f\n", $volume;
>                 };
>         }
>