[OpenAFS] mass moving volumes from server to server ?
Garance A Drosehn
Thu, 03 May 2018 16:46:32 -0400
On 1 May 2018, at 15:23, Gary Gatling wrote:
> I was wondering if any users or developers have a solution for
> moving all the volumes from one server to another?
> We have a perl program that was written 11 years ago to do that.
> But it has problems...
> It's mixed in with this other perl code for programmatically
> creating volumes and it's a bit of a mess.
> You have to remember to run it inside of screen or tmux. If you
> forget to do that, or you press CTRL-C to try to interrupt the
> script it passes that CTRL-C down to vos command and volumes get
> corrupted. Then you might have to go to tape backup.
> The programmer who wrote it moved on a long time ago.
> Does anyone have a solution they use for this? Something that
> could be safely interrupted? The reason I ask is that I know of
> no other way to handle things such as Red Hat kernel upgrades
> where a reboot is required.
> Having an outage for kernel upgrades is problematic for us since
> so much other technology depends on having afs working at all
> times. The kernel updates seem to happen about every 2 weeks
> or so.
I have a pretty elaborate ruby script which I use to handle tasks
like this. I expect that it would not behave well if you hit
CTRL-C while it was running, but it has a lot of other safety
features. For instance, you can feed it a long list of volumes
to move, and you can then say "move these in blocks of 100".
It will move 100 volumes, and then stop to ask the user if the
next 100 volumes should be moved.
It's a great ruby script ... which is constantly in a state of
flux. I'll work intensely on it for a few days, and then be
too busy to work on it for months at a stretch. If you have
someone who is a good ruby programmer then they'd probably feel
pretty comfortable with it.
If you stick with a few simple tasks, then I could give you a
set of example runs which would do what you want. In that case
you wouldn't need to have your own ruby expert. If your task
is "move all volumes from partition <a> to partition <b>", then
that is an extremely simple task for this script to handle.
Garance Alistair Drosehn = email@example.com
Senior Systems Programmer or gad@FreeBSD.org
Rensselaer Polytechnic Institute; Troy, NY; USA