[OpenAFS] Switch containers between two fileservers

Dexter 'Kim' Kimball dhk@ccre.com
Sun, 9 May 2004 22:46:19 -0600


If you're planning to relocate disks from one machine to another the most
desirable method will depend on a number of factors.

If you can:
    1.  hot swap the drives (unplug from A, plug into B, no downtime
required), and
    2.  tolerate a short period of unavailability for some of the data on
disks being moved  (while resynching the VLDB)

then physically moving the drives and using the vos sync commands to fix the
VLDB will work and is fast

If you:
    1.  Need to make sure that all data remains available during the move
and provided you have enough disk space on other servers

then
    a.  Dump the VLDB or do vos listvol on all servers
    b.  For every RO on the machine being retired
        1.  If there are ROs on other servers, vos remove the RO on the
machine being retired -- clients will find one of the other ROs
        2.  If an RO exists only on the machine being retired, first create
an RO on another server and _then_ vos remove the RO on the machine being
retired
    c.  At this point you're sure that any RO on the server being retired
exists on at least one other server.  So it is safe to
    d.  vos remove all of the remaining ROs on the machine being retired
    e.  Now there are no ROs on the machine being retired, so
    f.  vos move all of the RWs to other servers.  The .backup volumes will
automatically be destroyed when the RW is vos move'd
    g.  There's nothing left on the machine you're retiring.

Following a-g you guarantee that all replicated volumes continue to have at
least one replica available to clients during the process.  Given that
clients will not fail over to the RW when attempting to access an RO, making
sure a replica is available throughout the process lets the clients access
an instance of the RO avoiding any nuisances that might otherwise occur.

You also keep the VLDB consistent with what's on disk -- as long as you
don't use vos delentry, vos zap, or vos remsite (which you don't see in a-g)

Moving a RW does not block access to the volume.  A volume can be written to
while it's being moved.  One caveat, however, is that very large files -- if
actively written while being moved -- may be problematic depending on
application characteristics and how long the file will be "in transit."

If you're short of space you may be stuck moving drives with AFS volumes on
them.

I've had some practice with similar data moves.  At UAL we needed to ship
several hundred GB across relatively slow (OK, some were apparently dead)
links.

Most of our data was replicated.

We:

1.  Stuffed the drives in an array on a machine on our LAN.
2.  vos addsite/vos release -- now have a bunch of ROs on the local target
array on the "surrogate host"
3.  vgexport  (export volume groups from surrogate host)
4.  remove drives from surrogate array, vos sync surrogate host (we just
pulled 14000 RO volumes, the VLDB needs to be sync'd)
5.  ship drives  (first class :)
6.  stuff drives in array at new location, vgimport
7.  vos syncvldb/syncserv

This was and I'm sure still is unsupported -- for us it was unsupported by
both HP and Transarc -- but the alternative involved lengthy delays in
bringing up remote servers -- and unnecessary use of bandwidth that was
needed for interactive processes (ticketing, reservations, maintenance
missives, etc).  The method repeatedly worked.

Never underestimate the bandwidth of an airplane carrying drives.

Kim


=================================
Kim (Dexter) Kimball
ISAS FIL Team
kim.kimball@jpl.nasa.gov

Opinions my own, your mileage may vary.


>
>
> Is there some reason you can't do this:
>
> shut down both servers
> bring up new server with the disks containing volumes
> run something like vos changeaddr oldserverip newserverip
>
> ???  Seems like it should work, and it would be much less work.
>
> Tim
>
> Sven Oehme wrote:
> >
> > hy ,
> >
> > if i understand you right and you want to move the partition just one
> > time , delete all records from the vldb which point to the server , you
> > want to make free with vos delentry . migrate the harddrive to
> the other
> > server and restart the fs process . now make a vos syncserv and
> syncvldb
> > and all your volumes are now on the new Server .
> >
> > but don't forget , for this task you have a downtime of your system ...
> >
> > Sven
> >
> >
> ------------------------------------------------------------------
> -------------------------------------------------------
> > Dept. A141,  TG/SSG EMEA AIS Strategy and Architecture
> > Development Leader Stonehenge
> > IBM intranet ---> http://w3.ais.mainz.de.ibm.com/stonehenge/
> > internet ---> http://www-5.ibm.com/services/de/its/filestore.html
> > Phone (+49)-6131-84-3151
> > Fax      (+49)-6131-84-6708
> > Mobil   (+49)-171-970-6664
> > E-Mail : oehmes@de.ibm.com
> >
> >
> > *Lukas Kubin <kubin@opf.slu.cz>*
> > Sent by: openafs-info-admin@openafs.org
> >
> > 05/09/2004 04:26 PM
> >
> >
> > To
> > 	openafs-info@openafs.org
> > cc
> >
> > Subject
> > 	Re: [OpenAFS] Switch containers between two fileservers
> >
> >
> >
> >
> >
> >
> >
> >
> > Sorry my unclean description. I don't want to move the volumes. I want
> > to change the physical disks between two servers. Server A has 400GB
> > data container and should stay serve as an AFS server. Server B has
> > 800GB data container and currently is also an AFS fileserver. However,
> > we need to switch the RAID containers (by changing harddisks) between
> > those 2 servers and use server B for different purpose.
> >
> > So the question is:
> > Can I move all volumes from server A to server B and then take the B's
> > drives and put them into server A?
> >
> > Thank you.
> >
> > lukas
> >
> > Derek Atkins wrote:
> >  > I dont think I understand what you mean.
> >  >
> >  > Do you want to move the AFS files from fileserver 1 onto
> fileserver 2,
> >  > and vice-versa?  If so, then you just need to "vos move" all the RW
> >  > volumes back and forth to get them on the right servers, and then you
> >  > can 'vos addsite', 'vos remsite', 'vos release', 'vos zap' to "move"
> >  > the read-only volumes.  Just swapping disk arrays between the servers
> >  > wont work right -- your VLDB would get out of sync.
> >  >
> >  > -derek
> >  >
> >  > Lukas Kubin <kubin@opf.slu.cz> writes:
> >  >
> >  >
> >  >>I have two OpenAFS fileservers. Each one has a system container (with
> >  >>the Linux installation) and a RAID container containing an AFS
> >  >>partition.
> >  >>I would like to switch those containers between the 2 servers.
> >  >>Is it possible for the OpenAFS system? If yes, which steps do I have
> > to do?
> >  >>Thank you.
> >  >>
> >  >>lukas
> >  >>
> >  >>--
> >  >>Lukas Kubin
> >  >>
> >  >>phone: +420596398275
> >  >>email: kubin@opf.slu.cz
> >  >>
> >  >>Information centre
> >  >>The School of Business Administration in Karvina
> >  >>Silesian University in Opava
> >  >>Czech Republic
> >  >>http://www.opf.slu.cz
> >  >
> >  >
> >
> > --
> > Lukas Kubin
> >
> > phone: +420596398275
> > email: kubin@opf.slu.cz
> >
> > Information centre
> > The School of Business Administration in Karvina
> > Silesian University in Opava
> > Czech Republic
> > http://www.opf.slu.cz
> >
>
> --
> -----------------------------------------------------------------------
> Tim Craig            These are my opinions and not my employers. :)
> OIT-Systems
> tim@umbc.edu         It's hard to be serious when you're
>                         naked. - Garfield
> -----------------------------------------------------------------------
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
>