[OpenAFS] Question about how to use vos shadow

Jeffrey Hutzelman jhutz@cmu.edu
Wed, 18 Dec 2013 17:10:08 -0500


On Fri, 2013-12-13 at 15:51 +0100, Harald Barth wrote:

> (and nothing in the VLDB about it). However, when I try do make shadow
> readonly vols or shadow vols which are readonly, I'm not as successful:
> 
> # vos shadow H.haba.test.alanine -fromserver beef.stacken.kth.se -frompartition c -toserver bananshake.stacken.kth.se -topartition a -toname H.haba.test.alanine.readonly -readonly -local -verbose
> vos: the name of the root volume H.haba.test.alanine.readonly exceeds the size limit of 22
> 
> (I would like to that this would result in the same result as if I
> would do a addsite, release, remsite which would leave a "stranded"
> unknown readonly copy with the .readonly suffix on the added server)

That is arguably a bug, in that the length limit that applies here is
the 31-character limit, not the 22-character limit.  Or at least, if
you're using -readonly and the specified name ends in .readonly, that
should not be counted against the 22-character limit.

This is a little complicated, in that "read-only" volumes, which are
what -readonly creates, do not necessarily have to have names ending in
".readonly" -- that happens only when they are RO replicates of an RW
volume with a related name.

What actually happens is that the 22-character limit is always applied,
and additionally, you are not allowed to use the ".readonly" suffix at
all.  This is certainly a bug; one ought to be able to use "vos shadow"
to pre-create a correctly-named, non-live copy of an RO volume on a site
not named in the VLDB, just as one can for RW volumes.





> Then am I right, that -toname in this kind of usage has to be used
> together with -toid because vos shadow can not make up an ID in
> the VLDB for something that then should not exist in the VLDB?

Well, not necessarily.  If you don't use -toid, then the VLDB will be
consulted to find the ID of the target volume name.  In your example,
you try to create a volume for which no VLDB entry already exists, so
that lookup fails.  That's probably what you want, if you were expecting
the lookup to succeed.

Now, you might instead want it to allocate a new volume ID.  Presently,
vos shadow does not offer that option, but it would be fairly easy to
add.

-- Jeff