[OpenAFS] Re: - DAFS
Andrew Deason
adeason@sinenomine.net
Tue, 17 Jan 2012 10:13:32 -0600
On Tue, 17 Jan 2012 14:42:41 +0100
<info@probanet.it> wrote:
> 1) Does a 'vos examine vol' force volume to be attached?
No. You can force a volume to be attached by forcing an access to it, or
by issuing fssync-debug commands. Running fssync-debug can be dangerous,
though, and should not be used in 'normal' operation.
> 2) Is there a way to have a list of currently attached volumes?
Not easily over the wire. The wire RPCs used by 'vos examine' only let
the client know if the volume is "online" or "offline", but in DAFS
there are conceptually many more in-between states. There is work being
done to standardize new RPCs to allow these in-between states to be
visible to "vos" commands.
I assume these questions come from some confusion you may be
experiencing when you see "On-line" in the 'vos examine' output for all
volumes, even those you expect to not be attached. This is because
before DAFS existed, all volumes were attached during startup, so
everything was marked as "On-line" unless there was a significant issue
with the volume. Originally DAFS marked volumes that were not yet
attached but otherwise fine as "Off-line", but this 'broke' some
reporting tools used by sites to find volume problems (since "Off-line"
implied "this volume is broken" to them). So now we mark volumes that
haven't been attached yet as "On-line", and we only mark something as
"Off-line" if a volume is forced offline due to errors or something
similar.
If you are on the fileserver where the volume resides, you can find out
if it is attached by running this:
fssync-debug query <volumeid> | grep attach_state
Note that this fssync-debug command is much more safe than most others,
since it doesn't change anything with the volume; it's just reading
state. If a volume has not been attached, you will see
attach_state = VOL_STATE_PREATTACHED
and if it is attached, you will see
attach_state = VOL_STATE_ATTACHED
But those are just two of many different volume states. Very brief
descriptions of all states are in src/vol/volume.h.
> 3) Is that documented in official guide?
There isn't any documentation on how to retrieve this information,
because the information I've provided above is more developer info, and
is not a stable interface. Don't expect it to work in the future.
--
Andrew Deason
adeason@sinenomine.net