[OpenAFS] convertROtoRW

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 06 Apr 2006 04:55:03 -0400


On Thursday, April 06, 2006 10:21:19 AM +0300 Juha J=E4ykk=E4 =
<juolja@utu.fi>=20
wrote:

> We're doing some disaster recovery tests on OpenAFS. The next test =
waiting
> to be done is recovery from a lost RW volume with living RO's still
> around.
>
> I understand this is easiest done with convertROtoRW - simply tell the DB
> that one of the RO's is now RW. Fine. What I'm wondering is, what happens
> if the old RW magically reappears from beyond the grave? Obviously we =
need
> to reconcile the situation of twin RW's. How?

Well, it's presumably not going to magically reappear on the same partition =

as the new one.  So, the usual rules apply...

- An RW volume that is not on the server the VLDB says it should be on is
  orphaned.  No client will find that volume.  If the server indicated by
  the VLDB also contains a copy of that volume, then _that_ version will
  be live and accessible to clients.

- If two volumes with the same ID appear on different partitions on the
  same fileserver, the fileserver will attach exactly one of them, and
  all accesses will go to the one it picks.  Generally this will be the
  volume on the "first" partition, but I don't recall if that's the
  lowest-numbered partition or the one the fileserver happens to see
  first during startup.  Either way, you'll be able to tell what's going
  on because the volume that is _not_ in use will show up as "Off-line"
  in vos listvol.


You reconcile by picking one of the volumes, deciding it is the correct=20
authoritative one, and nuking the other one just to be sure.  If you=20
actually want to look at the contents to decide, you will need to dump one=20
of the volumes and restore it with a different ID.  Note that you can use=20
'vos dump' to dump volumes that the VLDB knows nothing about.

-- Jeff