[OpenAFS-devel] RFC: Status returned by vos for pre-attached volumes on demand-attach

Alistair Ferguson Alistair.Ferguson@morganstanley.com
Wed, 22 Jul 2009 08:26:03 +0100


Hi,

We would like to solicit the opinion of the OpenAFS community on what status 
vos should return for pre-attached volumes.

The demand-attach file-server introduces a number of volume states that vos is 
currently unable to transparently report. Instead, it simply returns on-line or
off-line. The following comment details when the volume is reported as off-line:

    /* Conditions that offline status is based on:
       volume is unattached state
       volume state is in (one of several error states)
       volume not in service
       volume is not marked as blessed (not on hold)
       volume in salvage req. state
       volume needsSalvaged
       next op would set volume offline
       next op would not leave volume online (based on several conditions)
    */

otherwise, it is reported as on-line.  The conditions above follow the general 
(mis-)perception that volumes with an off-line status are in error.

The question concerns the status reported for volumes that are "pre-attached". 
These are volumes that the file-server hasn't fully attached because they 
haven't been accessed (or attached and subsequently un-attached because they 
haven't been accessed in a certain period of time).  Currently, these volumes 
are reported as on-line, since they aren't in error. However, we believe that we 
need more informative reporting for these volumes for a number of reasons:

* strictly speaking, the volumes aren't on-line
* there are a number of ways to determine pre-attached volumes (dump the 
file-server state, fssync-debug, ...), but all need to be executed locally on the 
file-server
* pre-attached vs attached state is interesting, since it helps determine 
exactly what percentage of volumes on a file-server are actually in use

There are at least four options:
1. expose all underlying states to vos examine
2. expose pre-attached to vos examine
3. convert pre-attached to on-line for vos (the current behavior)
4. convert pre-attached to off-line for vos

Option 3 is currently implemented and is the least desirable.

Our suggestion is that we implement option 1, which will require exposing the 
current volume state onto the inUse field in the FillVolInfo function in the 
volserver.  The vos command would need to be modified to be aware of the new 
values, but unmodified vos commands would report off-line for volumes in a
state other than fully attached.

Note that options 1 and 2 involve a change in behaviour for sites running
demand-attach.

Comments, concerns, agreement?

ali