NAME

vos_eachfs - Iterate file servers registered with the Location Service

SYNOPSIS

vos eachfs [-format <format string>] [-hasuuid] [-nouuid] [--uuid <uuid prefix>] [-execute] [-quitonerror [<yes|no>]]] [-cell <cell name>] [-noauth] [-auth] [-localauth] [-encrypt [<yes|no>]] [-verbose] [-noresolve] [-config <configuration file>] [-help]

DESCRIPTION

vos eachfs enumerates file servers registered with the Location service and, for each, will expand a user-specified format string. Optionally, the result of expansion may be interpreted as a shell command and invoked (see -execute).

OPTIONS

-format

Describe how to print each iterated file server. The format string is a C-style %-escaped string with the following escapes available:

f

The server's file server endpoint, subject to flags below.

u

The server's UUID, or raise an error if none exists.

U

Like u but will print NO_UUID rather than error if none exists.

v

The server's volume server endpoint, subject to flags below.

%

As is typical of %-escaped strings, %% will be rendered as a single % in the output.

Server endpoints may be modified by specifying one or more of the following flags between the % and f or v:

1

Determine the first-responding address of an endpoint; useful mostly for multi-homed servers. If a server is non-responsive, this flag will trigger an error.

0

Like 1, but fall back to the first registered endpoint if none of the endpoints are responsive rather than raising an error.

h

Print only the host component of an endpoint, rather than host and port.

n

Do not attempt to resolve the server's address back to a hostname, as if -noresolve had been specified.

p

Print only the port component of an endpoint, rather than host and port.

-hasuuid -nouuid

Enumerate only those servers with (-hasuuid) or without (-nouuid) UUIDs registered with the Location service.

-uuid <uuid prefix>

Enumerate only those servers for which uuid prefix is a prefix of their UUID (as rendered into 32 hex characters with 4 dashes; historical AFS UUID formats may not be accepted). Comparison is done without case sensitivity, so either upper or lower case hexadecimal digits will match. To certainly restrict to a particular server, use a full-length UUID string. Implies -hasuuid.

-execute

Interpret the format string as a command to be run. If it starts with the string "vos ", the command will be run within the existing process, otherwise it will be passed to a shell.

-quitonerror

When quit on error mode is enabled, -execute command iteration will halt on non-zero exit status.

-cell <cell name>

Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see vos(1).

-noauth

Assigns the unprivileged identity anonymous to the issuer. Do not combine this flag with the -localauth flag. For more details, see vos(1).

-localauth

Obtains an authentication token using the server encryption key with the highest key version number in the local /etc/yfs/server/KeyFileExt file. The resulting token never expires and has Super User privileges. Do not combine this flag with the -cell argument or -noauth flag. For more details, see vos(1).

-auth

Use the calling user's tokens from the kernel or as obtained using the active Kerberos ticket granting ticket to communicate with the Volume Server and Location Service. This is the default if neither -localauth nor -noauth is given.

Since this option is the default, it is usually not useful for running single command line operations. However, it can be useful when running commands via vos_interactive(1) or vos_source(1), since otherwise it would be impossible to switch from, for example, -localauth back to using regular tokens during a bulk operation.

-verbose

Produces on the standard output stream a detailed trace of the command's execution. If this argument is omitted, only warnings and error messages appear.

-encrypt [<yes|no>]

Enables or disables encrytion for the command so that the operation's results are not transmitted across the network in clear text.

-noresolve

Shows all servers as IP addresses instead of the reverse DNS lookup hostname. -noresolve useful when troubleshooting no such volume and volume moved errors.

-config <configuration file>

Set the location of the configuration file to be used. The default file is /etc/yfs/yfs-client.conf.

-help

Prints the online help for this command. All other valid options are ignored.

EXAMPLES

vos eachfs -format '%U is at %f (%v)'

Enumerate all registered servers, both the file and volume server endpoints, and the UUID, if any.

vos eachfs -format 'vos status -server %u' -execute

Invoke vos status on each registered server, by uuid.

vos eachfs -format 'rxdebug -version -rxpeer %v' -execute

Interrogate each volume server for its version using rx debug packets.

vos eachfs -format 'echo %u:; xstat_fs -collID 3 -onceonly -fsname %f' -execute

Run xstat_fs -collID 3 -onceonly on each registered file server, prefixing each dump with the server's UUID.

vos eachfs -format 'bos restart -server %1hf -instance fs' -execute

Instruct bos to restart the fs instance on all machines hosting file servers, having probed each to find the first responsive address.

PRIVILEGE REQUIRED

None

SEE ALSO

vos(1), vos_listfs(1), vos_eachvol(1), vos_eachvl(1)

COPYRIGHT

Nathaniel Filardo 2017.

This documentation is covered by the MIT license.

ACKNOWLEDGEMENTS

"AFS" is a registered mark of International Business Machines Corporation, used under license. (USPTO Registration 1598389)

"OpenAFS" is a registered mark of International Business Machines Corporation. (USPTO Registration 4577045)

The "AuriStor" name, log 'S' brand mark, and icon are registered marks of AuriStor, Inc. (USPTO Registrations 4849419, 4849421, and 4928460) (EUIPO Registration 015539653).

"Your File System" is a registered mark of AuriStor, Inc. (USPTO Registrations 4801402 and 4849418).

"YFS" and "AuriStor File System" are trademarks of AuriStor, Inc.