config-gfsd is a utility to set up a file sppol node of Gfarm file system. The server program for a file spool node is named gfsd. config-gfsd is required to be run with the root privilege, unless you use the file system for private purpose such as development, evaluation or test of Gfarm.
config-gfsd assumes that the
configuration file
%%SYSCONFDIR%%/gfarm2.conf (or
%%SYSCONFDIR%%/gfsd.conf in case of
the private-mode) exists on the host.
Please copy the file from the metadata server, if missing.
It performs the following processes, in that order:
Crerate a spool directory.
Update the Gfarm configuration file
%%SYSCONFDIR%%/gfarm2.conf or
%%SYSCONFDIR%%/gfsd.conf.
Create a script (or a configuration file) to start/stop gfsd.
On most systems, config-gfsd puts
a start/stop script gfsd (or
gfsd-ADDRESS in case of the private
mode) onto either
/etc/init.d or
/etc/rc.d/init.d, according to the
operating system.
On Linux with systemd such as Red Hat Enterprise Linux 7 or later,
config-gfsd puts the unit configuration
file gfsd.service (or
gfsd-ADDRESS.service in case of the
private mode) onto /etc/systemd/system,
and then executes
systemctl enable gfsd.service (or
systemctl enable gfsd-ADDRESS.service
respectively).
In case of the private mode, config-gfsd registers the host as a file spool node to the metadata server, by executing gfhost -c command. In the non-private mode, it shows how to register the host as a file spool node to the metadata server, like this:
Please ask admin_user to register your host by the following command: /usr/bin/gfhost -c -a x86_64-centos7.0-linux -p 600 -n 2 ext540
In case of the private mode, config-gfsd starts gfsd. In the non-private mode, it shows how to start gfsd, like as follows:
After that, start gfsd by the following command as a root: systemctl start gfsd.service
Before set up a file spool node using
config-gfsd,
it is recommended to execute
config-gfsd -t.
With -t option, the sets up is not performed.
Instead, it shows values of all configurable parameters:
$ config-gfsd -t prefix [--prefix]: hostname [-h]: host1.example.org listen address [-l]: (all local IP addresses) architecture [-a]: x86_64-centos6.5-linux port [-p]: 600 ncpu [-n]: 8 spool directory : /var/gfarm-spool rc script : /etc/init.d/gfsd gfarm client conf file : /etc/gfarm2.conf gfsd pid file : /var/run/gfsd.pid
The option name surrounded by [ ] means that you can specify a value with that option.
--prefix pathConfigure some paths related to gfsd. Specifically, the followings are affected.
  The spool directory of gfsd.
  That is PREFIX/var/gfarm-spool.
  
  The directory to put a PID file of gfsd.
  That is PREFIX/var/run.
  
  The directory of configuration files.
  That is PREFIX/etc.
  
  The directory of start/stop script for
  gfsd.
  That is PREFIX/etc/init.d  or
  PREFIX/rc.d/init.d/etc which is
  depending on operating systems.
  
  If systemd is running on the host, there is a special exception.
  When an empty prefix is given by --prefix option on
  such host, config-gfsd doesn't
  put a unit configuration file for systemd.
  Instead, it puts traditional start/stop script at
  PREFIX/etc/init.d.
  
The unconfiguration script unconfig-gfsd.sh. That is PREFIX/etc/unconfig-gfsd.sh.
The default is "" (empty).
-a architecture
Specify architecture of the host.
config-gfsd gives this value to
gfhost -c as an argument of
-a option.
config-gfsd guesses the architecture,
and use it by default.
-p portSpecify a TCP port number the configured gfsd listens on. The default is 10600 if the private mode, 600 otherwise.
-h hostnameSpecify a hostname of the host. config-gfsd gives this value to gfhost -c as an non-option argument. The default is the fully qualified domainname of the host on DNS.
-l addressSpecify a listen address of gfsd. By default, it listens on all local IP addresses. If this option is specified, also the following changes occur:
  The name of start/stop script is changed from
  gfsd to
  gfsd-ADDRESS, when
  config-gfsd creates the script.
  
  The name of unit configuration file for systemd is changed from
  gfsd.service to
  gfsd-ADDRESS.service, when
  config-gfsd creates the file.
  
  The spool directory is changed from
  PREFIX/var/gfarm-spool to
  PREFIX/var/gfarm-spool-ADDRESS,
  where PREFIX is a prefix given by --prefix option.
  
-n ncpu
Specify the number of CPUs of the host.
config-gfsd gives this value to
gfhost -c as an argument of
-n option.
config-gfsd guesses the number of CPUs,
and use it by default.
--helpShow usage, then exit.
-SEnable the private mode. config-gfsd sets up the Gfarm file system which can be run without root privilege. Specifically, config-gfsd changes the configuration procedures as follows:
  The default listen port of gfsd
  (corresponding with -p option) is changed from 600
  to 10600.
  
  It updates the configuration file
  %%SYSCONFDIR%%/gfsd.conf, instead
  of %%SYSCONFDIR%%/gfarm2.conf.
  
It registers the file spool node by executing gfhost -c.
  It starts gfsd, unless
  -N option is given.
  
-S option never changes locations of a start/stop
script and a configuration file.
Since the default locations of those files are usually writable only for
privilege users, config-gfsd fails to
create them.
To avoid this problem, also specify --prefix option.
-NDo not start gfsd.
-fForce overwriting an existing set up.
-tShow values of all configurable parameters in human readable format, then exit immediately.
-TLike '-t', but it shows values in KEY=VALUE format.