Name

gfservice.conf — configuration file of gfservice

DESCRIPTION

gfservice reads configuration data from the file. (gfservice-agent doesn't read a configuration file.)

The configuration file itself is a Bourne-shell script. It is evaluated as a script by gfservice. Here is an example of the configuration file:


# gfmd entries.
gfmd1=db1.example.com
gfmd2=db2.example.com

Same as Bourne-shell script, lines beginning with '#' and empty lines are ignored. The other lines declare shell variables. In this example, the variable gfmd1 is set to db1.example.com and gfmd2 to db12.example.com respectively. Whitespaces must not be inserted around '='.

The variables named gfmd1 and gfmd2 are used as "host-id". To specify a remote host, gfservice uses host-id instead of hostname:


gfservice start-gfmd gfmd2

Executing the command, gfservice starts gfmd on gfmd2 server, metadb2.example.com. Note that the numbers at the tails of host-ids must be beginning with 1 and must be assigned successively.

For specifying gfsd servers and client hosts, use host-ids "gfsn" and "clientn" respectively:


# gfsd entries.
gfsd1=fs1.example.com

# client entries
client1=pc1.example.com
client2=pc2.example.com
client3=pc2.example.com

In addition with host-id variables, gfservice recognizes some variables related to host-id.


# Configuration about gfmd1.
gfmd1_CONFIG_GFARM_OPTIONS="-X -A $LOGNAME"
gfmd1_SSH="ssh -i $HOME/.ssh/id_rsa_gfservice"
gfmd1_SUDO=/usr/local/bin/sudo

As shown in this example, a value containing whitespaces can be set by quotation marks. $VARNAME is expanded to the value of the shell or environment variable VARNAME.

VARIABLES ABOUT GFMD

Variables named "gfmdn" (gfmd1, gfmd2, ...) define gfmd servers. Variable names beginning with "gfmdn_" such as gfmd1_SSH set configuration parameters of the corresponding "gfmdn" server. gfservice currently the following variables:

gfmdn

Register a gfmd server. Its value represents a hostname (or an IP address) of the server. Note that gfservice uses the values for destination hosts of SSH connections only. To specify host names used in the Gfarm system, use -h option in gfmdn_CONFIG_GFARM_OPTOINS variable instead:


gfmd1=md1-ctl.example.org
gfmd1_CONFIG_GFARM_OPTIONS="-h md1.example.org"

gfmdn_GFBINDIR

Specify a path to a directory where gfservice-agent command is installed on the gfmd server. If the variable is declared, gfservice executes "$gfmdn_GFBINDIR/gfservice-agent". Otherwise it executes "gfservice-agent".

gfmdn_CONFIG_GFARM_OPTIONS

Specify options of config-gfarm command. The default value is empty (no option). gfservice refers this variable to perform config-gfarm and many other sub-commands. Do not delete or edit the declaration even after config-gfarm has been complete.

gfmdn_PRIVATE_MODE

Set this variable to "true" if gfmd on the remote host is configured in private mode.

gfmdn_AUTH_TYPE

Specify authentication type ("sharedsecret", "gsi" or "gsi_auth"). If the variable is not declared, its value is chosen from AUTH_TYPE value output by config-gfarm -T command executed on gfmd1. (Note that the value AUTH_TYPE above is affected by the variable gfmd1_CONFIG_GFARM_OPTIONS.)

gfmdn_CLUSTER_NAME

Specify a cluster name of the gfmd server. The default value is "" (empty) which means the server belongs to the default cluster.

gfmdn_SSH

Specify a path to an SSH client command and its options. The variable is used when gfservice executes an SSH client command to connect with the gfsd server. The default value is "ssh".

gfmdn_SUDO

Specify a path to a Sudo command and options. The variable is used when gfservice executes a Sudo command on the gfsd server via SSH. The default value is "sudo".

VARIABLES ABOUT GFSD

Variables named "gfsdn" (gfsd1, gfsd2, ...) define gfsd servers. Variable names beginning with "gfsdn_" such as gfsd1_SSH set configuration parameters of the corresponding "gfsdn" server. gfservice currently recognizes the following variables:

gfsdn

Register a gfsd server. Its value represents a hostname (or an IP address) of the server. Note that gfservice uses the values for destination hosts of SSH connections only. To specify host names used in the Gfarm system, use -h option in gfsdn_CONFIG_GFSD_OPTOINS variable instead:


gfsd1=fs2-ctl.example.org
gfsd1_CONFIG_GFSD_OPTIONS="-h fs2.example.org"

gfsdn_GFBINDIR

Specify a path to a directory where gfservice-agent command is installed on the gfsd server. If the variable is declared, gfservice executes "$gfsdn_GFBINDIR/gfservice-agent". Otherwise it executes "gfservice-agent".

gfsdn_CONFIG_GFSD_OPTIONS

Specify options of config-gfsd command. The default value is empty (no option). gfservice refers this variable to perform config-gfsd and many other sub-commands. Do not delete or edit the declaration even after config-gfsd has been complete.

gfsdn_PRIVATE_MODE

Set this variable to "true" if gfsd on the remote host is configured in private mode.

gfsdn_AUTH_TYPE

Specify authentication type ("sharedsecret", "gsi" or "gsi_auth"). If the variable is not declared, its value is chosen from AUTH_TYPE value output by config-gfarm -T command executed on gfmd1. (Note that the value AUTH_TYPE above is affected by the variable gfmd1_CONFIG_GFARM_OPTIONS.)

gfsdn_SSH

Specify a path to an SSH client command and its options. The variable is used when gfservice executes an SSH client command to connect with the gfsd server. The default value is "ssh".

gfsdn_SUDO

Specify a path to a Sudo command and options. The variable is used when gfservice executes a Sudo command on the gfsd server via SSH. The default value is "sudo".

VARIABLES ABOUT CLIENT

Variables named "clientn" (client1, client2, ...) define client hosts. Their values are hostnames (or IP addresses). Variable names beginning with "clientn_" such as client1_SUDO set configuration parameters of the corresponding "clientn" host. gfservice currently recognizes the following variables:

clientn

Register a client host. Its value represents a hostname (or an IP address) of the host.

clientn_GFBINDIR

Specify a path to a directory where gfservice-agent command is installed on the client host. If the variable is declared, gfservice executes "$clientn_GFBINDIR/gfservice-agent". Otherwise it executes "gfservice-agent".

clientn_MOUNT_GFARM2FS

Specify a path to mount.gfarm2fs command and its options. The variable is used when gfservice executes mount.gfarm2fs command to mount a file system. The default value is "%%BINDIR%%/mount.gfarm2fs".

clientn_UMOUNT_GFARM2FS

Specify a path to umount.gfarm2fs command and its options. The variable is used when gfservice executes umount.gfarm2fs command to unmount a file system. The default value is "%%BINDIR%%/umount.gfarm2fs".

clientn_SSH

Specify a path to an SSH client command and its options. The variable is used when gfservice executes an SSH client command to connect with the client host. The default value is "ssh".

clientn_SUDO

Specify a path to a Sudo command and options. The variable is used when gfservice executes a Sudo command on the client host via SSH. The default value is "sudo".

clientn_GFARM_CONF

Specify a gfarm2.conf file in absolute path. If a value is not set, gfservice uses a same path as the path of gfarm2.conf in gfmd1(determined from the 'gfmd1_CONFIG_GFARM_OPTIONS' shell variable).

clientn_PRIVATE_MODE

If this variable is set to "true", gfservice processes the sub-command config-client without root privilege.

clientn_AUTH_TYPE

Specify authentication type ("sharedsecret", "gsi" or "gsi_auth"). If the variable is not declared, its value is chosen from AUTH_TYPE value output by config-gfarm -T command executed on gfmd1. (Note that the value AUTH_TYPE above is affected by the variable gfmd1_CONFIG_GFARM_OPTIONS.)