gfarm2.conf
Gfarm configuration file
- Provided by: gfmd (Version: 2.4.1-1.1ubuntu1)
- Source: gfarm
- Report a bug
Gfarm configuration file
gfarm2.conf is a text file that contains a Gfarm configuration. Gfarm server processes gfmd and gfsd refer to %%SYSCONFDIR%%/gfmd.conf and %%SYSCONFDIR%%/gfarm2.conf, respectively, by default. Since this configuration file is only read at startup, it is necessary to restart servers when the contents of the configuration file are updated.
Application programs, such as gfls and gfhost, refer to both %%SYSCONFDIR%%/gfarm2.conf, and a file specified by an environment variable, GFARM_CONFIG_FILE. If both configuration files exist, the file specified by the environment variable, GFARM_CONFIG_FILE, is read first. Both files have the same grammar. If the environment variable GFARM_CONFIG_FILE doesn't exist, ~/.gfarm2rc in a user's home directory is used instead.
Each line of gfarm2.conf consists of one statement. When the line ends with the character ``\'', the line continues for the next line. A word beginning with ``#'' causes that word and all remaining characters on that line to be ignored.
Host_specification has the following forms.
The following statements are supported.
For example,
spool /var/spool/gfarm
For example,
spool_server_listen_address 192.168.121.1
If this statement isn't used on the server side, the server uses a host certificate, if the server is invoked with root privileges. Or, if the server is invoked as a non-privileged user, the server uses the user's certificate.
If this statement isn't used on the client side, the client assumes that the server that the client is going to connect is using a host certificate of the server host. Thus, if the server is not invoked with root privileges, but invoked with user privileges where the user is the same as the user who invoked the client, the client side needs to specify the following one line.
Example:
spool_server_cred_type self
The possible types of cred_type are ``self'', ``host'', ``user'' and ``mechanism-specific''. And those are used with the spool_server_cred_service and spool_server_cred_name statements as follows:
This feature corresponds to the GSS_C_NT_HOSTBASED_SERVICE feature in GSSAPI (RFC2743/RFC2744).
Example:
spool_server_cred_type host spool_server_cred_service host
To map from the account name to a Distinguished Name of a certificate, file ``/etc/grid-security/grid-mapfile'' is used. Thus, if there isn't such a file, or if the user isn't specified in this file, this feature cannot be used.
This feature corresponds to the GSS_C_NT_USER_NAME feature in GSSAPI (RFC2743/RFC2744).
Example:
spool_server_cred_type user spool_server_cred_name guest
This feature corresponds to a case where GSS_C_NO_OID is specified as a Name Type in GSSAPI (RFC2743/RFC2744).
Example:
spool_server_cred_type mechanism-specific spool_server_cred_name "/O=Grid/O=Globus/OU=example.com/CN=John Smith"
This statement cannot be omitted.
For example,
metadb_server_host ldap.example.com
For example,
metadb_server_port 601
For example, the default stack size on CentOS 5/i386 is 10MB, thus, you can decrease the size of the virtual memory space of gfmd to 1/40, by specifying 256KB as this parameter.
This parameter is only available in gfmd.conf, and ignored in gfarm2.conf.
For example,
metadb_server_stack_size 262144
This parameter is only available in gfmd.conf, and ignored in gfarm2.conf.
For example,
metadb_server_thread_pool_size 16
This parameter is only available in gfmd.conf, and ignored in gfarm2.conf.
For example,
metadb_server_job_queue_length 160
Until gfarm-2.3.0, this parameter was only available in gfmd.conf, and ignored in gfarm2.conf. But since gfarm-2.4.0, gfsd also uses this parameter to detect whether gfmd is down or not, this parameter has to be specified in both gfarm2.conf and gfmd.conf.
For example,
metadb_server_heartbeat_interval 180
This parameter is only available in gfmd.conf, and ignored in gfarm2.conf.
For example,
metadb_server_dbq_size 65536
For example,
ldap_server_host ldap.example.com
This statement cannot be omitted if ldap_server_host is specified.
For example,
ldap_server_port 602
This statement cannot be omitted if ldap_server_host is specified.
For example,
ldap_base_dn "dc=example, dc=com"
For example,
ldap_bind_dn "cn=gfarmuser, dc=example, dc=com"
For example,
ldap_bind_password "secret-ldap-password"
For example,
postgresql_server_host postgresql.example.com
This statement cannot be omitted if postgresql_server_host is specified.
For example,
postgresql_server_port 602
This statement cannot be omitted if postgresql_server_host is specified.
For example,
postgresql_dbname gfarm
For example,
postgresql_user gfarm
For example,
postgresql_password gfarm
For example,
postgresql_conninfo "sslmode=require connect_timeout=30"
The first argument should be either the enable or disable keyword. The second argument, auth method, should be the gsi, gsi_auth, or sharedsecret keyword. The third argument specifies the host(s) by using Host specification.
The auth statement may be specified any number of times. For each authentication method, it becomes a candidate when the first entry whose host_specification matches the target host has the enable keyword. When there is no corresponding entry, or when the first corresponding entry has the disable keyword, the authentication method does not become a candidate.
This process takes place on both client and server sides. Candidates for authentication method on both sides will be tried.
The order of statements with different authentication methods is not relevant. When there are several candidates for the authentication method for the host, the order of the authentication trial is sharedsecret, gsi_auth, and then gsi.
The GSI methods are available if and only if the --with-globus option is specified at configuration. When the methods are not available, an auth statement with gsi or gsi_auth will be ignored.
This statement cannot be omitted.
For example,
auth disable sharedsecret 192.168.0.100 auth disable sharedsecret 192.168.0.101 auth enable sharedsecret 192.168.0.0/24 auth enable gsi_auth 10.0.0.0/8 auth enable gsi *
In this example, all hosts which belong to the network address 192.168.0.0/24, except for two hosts, 192.168.0.100 and 192.168.0.101, will be tested for authenticated by both sharedsecret and gsi; all hosts which belong to the network address 10.0.0.0/8 will be tested for authentication by both gsi_auth and gsi; and all other hosts will be authenticated by gsi. Note that two hosts, 192.168.0.100 and 192.168.0.101, will be tested for authentication by gsi only.
When LISTENER (all capital letters) is specified by the second argument, the socket option is applied to any socket on the server side (accepting side).
When the host_specification is specified by the second argument, the socket option is applied to sockets that connect to the specified host(s). If the second argument is "*", the socket option is applied to any hosts on the client side (connecting side).
If the second argument is omitted, the socket option is applied to every socket.
The following socket options can be specified.
debug. The SO_DEBUG socket option is specified. A value is not necessary.
keepalive. The SO_KEEPALIVE socket option is specified. A value is not necessary.
sndbuf. The SO_SNDBUF socket option is specified with a value.
rcvbuf. The SO_RCVBUF socket option is specified with a value.
tcp_nodelay. The TCP_NODELAY socket option is specified. A value is not necessary.
For example,
sockopt tcp_nodelay 192.168.0.0/24 sockopt sndbuf=1048576 10.0.0.0/8 sockopt sndbuf=1048576 LISTENER sockopt rcvbuf=1048576 10.0.0.0/8 sockopt rcvbuf=1048576 LISTENER
For example,
known_network 192.168.0.0/24
user-map-file is needed when you have to use the sharedsecret authentication method in the case where you have different unix account names on different filesystem nodes. In such a case, the user-map-file on each filesystem node should have an entry from each local user name to a unique global user name.
Example:
local_user_map /etc/gfarm/gfarm-usermap
Each line of the user-map-file consists of two fields separated by spaces; the first field is a global user name, and the second field is a local user name.
Example of the user mapping file:
foobar foo quux baz
According to the first line of this mapping file, a global user name, "foobar", is mapped to a local user name, "foo", on this node.
Example:
local_group_map /etc/gfarm/gfarm-groupmap
Each line of the group-map-file consists of two fields separated by spaces; the first field is a global group name, and the second field is a local group name.
For example,
schedule_cache_timeout 60
For example,
schedule_idle_load_thresh 0.1
For example,
schedule_busy_load_thresh 0.5
For example,
schedule_virtual_load 0.3
This directive has to be specified in both gfarm2.conf and gfmd.conf. After restarting the gfmd and the Gfarm client, it is effective.
For example,
minimum_free_disk_space 1G
For example,
simultaneous_replication_receivers 40
For example,
gfsd_connection_cache 32
For example,
attr_cache_limit 100000
For example,
attr_cache_timeout 3600000
For example,
log_level debug
For example,
log_message_verbose_level 1
For example,
no_file_system_node_timeout 30
For example,
gfmd_reconnection_timeout 30
This is a grammar of gfarm2.conf described by the BNF notation.
<statement> ::= <spool_statement> | <spool_server_listen_address_statement> | <spool_server_cred_type_statement> | <spool_server_cred_service_statement> | <spool_server_cred_name_statement> | <metadb_server_host_statement> | <metadb_server_port_statement> | <metadb_server_cred_type_statement> | <metadb_server_cred_service_statement> | <metadb_server_cred_name_statement> | <metadb_server_stack_size_statement> | <metadb_server_thread_pool_size_statement> | <metadb_server_job_queue_length_statement> | <metadb_server_heartbeat_interval_statement> | <metadb_server_dbq_size_statement> | <ldap_server_host_statement> | <ldap_server_port_statement> | <ldap_base_dn_statement> | <ldap_bind_dn_statement> | <ldap_bind_password_statement> | <postgresql_server_host_statement> | <postgresql_server_port_statement> | <postgresql_dbname_statement> | <postgresql_user_statement> | <postgresql_password_statement> | <postgresql_conninfo_statement> | <auth_statement> | <sockopt_statement> | <known_network_statement> | <admin_user_statement> | <admin_user_gsi_dn_statement> | <local_user_map_statement> | <local_group_map_statement> | <schedule_cache_timeout_statement> | <schedule_idle_load_thresh_statement> | <schedule_busy_load_thresh_statement> | <schedule_virtual_load_statement> | <minimum_free_disk_space_statement> | <simultaneous_replication_receivers> | <gfsd_connection_cache_statement> | <attr_cache_limit_statement> | <attr_cache_timeout_statement> | <log_level_statement> | <log_message_verbose_level_statement> <spool_statement> ::= "spool" <pathname> <spool_server_listen_address_statement> ::= "spool_server_listen_address" <ipv4_address> <spool_server_cred_type_statement> ::= "spool_server_cred_type" <cred_type> <spool_server_cred_service_statement> ::= "spool_server_cred_service" <cred_service> <spool_server_cred_name_statement> ::= "spool_server_cred_name" <cred_name> <metadb_server_host_statement> ::= "metadb_server_host" <hostname> <metadb_server_port_statement> ::= "metadb_server_port" <portnumber> <metadb_server_cred_type_statement> ::= "metadb_server_cred_type" <cred_type> <metadb_server_cred_service_statement> ::= "metadb_server_cred_service" <cred_service> <metadb_server_cred_name_statement> ::= "metadb_server_cred_name" <cred_name> <metadb_server_stack_size_statement> ::= "metadb_server_stack_size" <number> <metadb_server_thread_pool_size_statement> ::= "metadb_server_thread_pool_size" <number> <metadb_server_job_queue_length_statement> ::= "metadb_server_job_queue_length" <number> <metadb_server_heartbeat_interval_statement> ::= "metadb_server_heartbeat_interval" <number> <metadb_server_dbq_size_statement> ::= "metadb_server_dbq_size" <number> <ldap_server_host_statement> ::= "ldap_server_host" <hostname> <ldap_server_port_statement> ::= "ldap_server_port" <portnumber> <ldap_base_dn_statement> ::= "ldap_base_dn" <string> <ldap_bind_dn_statement> ::= "ldap_bind_dn" <string> <ldap_bind_password_statement> ::= "ldap_bind_password" <string> <postgresql_server_host_statement> ::= "postgresql_server_host" <hostname> <postgresql_server_port_statement> ::= "postgresql_server_port" <portnumber> <postgresql_dbname_statement> ::= "postgresql_dbname" <string> <postgresql_user_statement> ::= "postgresql_user" <string> <postgresql_password_statement> ::= "postgresql_password" <string> <postgresql_conninfo_statement> ::= "postgresql_conninfo" <string> <auth_statement> ::= "auth" <validity> <auth_method> <hostspec> <auth_command> ::= "enable" | "disable" <auth_method> ::= "gsi" | "gsi_auth" | "sharedsecret" <sockopt_statement> ::= "sockopt" <socket_option>[=<number>] [""LISTENER" | <hostspec>] <socket_option> = "debug" | "keepalive" | "sndbuf" | "rcvbuf" | "tcp_nodelay" <known_network_statement> ::= "known_network" <hostspec> <admin_user_statement> ::= "admin_user" <string> <admin_user_gsi_dn_statement> ::= "admin_user_gsi_dn" <string> <local_user_map_statement> ::= "local_user_map" <pathname> <local_group_map_statement> ::= "local_group_map" <pathname> <schedule_cache_timeout_statement> ::= "schedule_cache_timeout" <number> <schedule_idle_load_thresh_statement> ::= "schedule_idle_load_thresh" <load> <schedule_busy_load_thresh_statement> ::= "schedule_busy_load_thresh" <load> <schedule_virtual_load_statement> ::= "schedule_virtual_load" <load> <minimum_free_disk_space_statement> ::= "minimum_free_disk_space" <size> <simultaneous_replication_receivers> ::= "simultaneous_replication_receivers" <number> <gfsd_connection_cache_statement> ::= "gfsd_connection_cache" <number> <attr_cache_limit_statement> ::= "attr_cache_limit" <number> <attr_cache_timeout_statement> ::= "attr_cache_timeout" <number> <log_level_statement> ::= "log_level" <log_priority> <log_message_verbose_level_statement> ::= "log_message_verbose_level" <number> <no_file_system_node_timeout_statement> ::= "no_file_system_node_timeout" <number> <gfmd_reconnection_timeout_statement> ::= "gfmd_reconnection_timeout" <number> <hostspec> ::= <ipv4_address> | <ipv4_address> "/" <address_mask> | <hostname> | "." <domain_name> | "*" <pathname> ::= <pathname_character> <pathname_character>* <pathname_character> ::= <hostname_character> | "," | "/" | "_" <hostname> ::= <hostname_character> <hostname_character>* <hostname_character> ::= <alphabet> | <digit> | "-" | "." <portnumber> ::= <number> <size> ::= <number> [ "k" | "M" | "G" | "T" ] <number> ::= <digit> [<digit>*] <digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" <string> ::= """ <double_quoted_character>* """ <double_quoted_character> ::= <any_character_except_backslash_and_double_quotation> | "\\" | "\"" <validity> ::= "enable" | "disable" <log_priority> ::= "emerg" | "alert" | "crit" | "err" | "warning" | "notice" | "info" | "debug"
The following is an example usin PostgreSQL to store the metadata, and to allow access from filesystem nodes and clients at IP address 192.168.0.0/24, via sharedsecret authentication.
spool /var/spool/gfarm metadb_server_host metadb.example.org metadb_server_port 601 postgresql_server_host metadb.example.org postgresql_server_port 5432 postgresql_dbname gfarm postgresql_user gfarm postgresql_password "secret-postgresql-password" auth enable sharedsecret 192.168.0.0/24 sockopt keepalive
The following is an example using LDAP to store the metadata, and to allow access from filesystem nodes and clients at any IP address, via GSI authentication.
spool /var/spool/gfarm metadb_server_host metadb.example.com metadb_server_port 601 ldap_server_host metadb.example.com ldap_server_port 602 ldap_base_dn "dc=example, dc=com" ldap_bind_dn "cn=gfarmuser, dc=example, dc=com" ldap_bind_password "secret-ldap-password" auth enable gsi * sockopt keepalive