[OpenAFS] vol release atomic?
Sergio Gelato
Sergio.Gelato@astro.su.se
Fri, 23 Sep 2005 09:31:56 +0200
* Pucky Loucks [2005-09-22 17:11:53 -0700]:
> if I release a volume is the release process atomic?
Yes. See
http://www.openafs.org/pages/doc/AdminGuide/auagd010.htm#HDRWQ192
> what I'm wanting to do is have apache sever a site from afs, and
> since I have a readonly on both fileserver apache will be more or
> less always serving the files from it's cache. what I like about
> this is I can put a new site in the write/read volume and apache will
> still server the old site until I release the volume. My main
> question is will apache serve from it's cache until the whole
> replication has finished?
Not necessarily. Cache misses are always possible.
As soon as one of the read-only replicas has been updated, all clients
will stop using the replicas that are still flagged "Old release".
> the replica/clone on fs-one will probably be complete on it's self
> faster than on fs-two.
Indeed. Especially since the first few replicas are processed
sequentially, not in parallel, and the one that's colocated with the
read-write volume will be done first.
> Is that right or is the call back to tell the
> clients that their cache is old done once all replicas are finished.
I'm not quite sure how it works in terms of callbacks, but from
experience I know that clients see the changes as soon as the first
replica is ready, even while the others are still being updated.
If you feel like reading the source code, it's in
src/volser/vsprocs.c:UV_ReleaseVolume() .
Note that all the work is done client-side, so if you kill the vos
release command you can end up with locked VLDB entries etc. This is
what made me desist from a plan to grant ordinary users the ability to
release their own volumes. [It would have required some patching: at the
moment one has to be on the UserList to release a volume.]