New upstream version 8.1.0
This commit is contained in:
92
client_module/build/dist/etc/beegfs-client-autobuild.conf
vendored
Normal file
92
client_module/build/dist/etc/beegfs-client-autobuild.conf
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
# This is a config file for the automatic build process of BeeGFS client kernel
|
||||
# modules.
|
||||
# http://www.beegfs.com
|
||||
|
||||
|
||||
#
|
||||
# --- Section: [Notes] ---
|
||||
#
|
||||
|
||||
# General Notes
|
||||
# =============
|
||||
# To force a rebuild of the client modules:
|
||||
# $ /etc/init.d/beegfs-client rebuild
|
||||
#
|
||||
# To see a list of available build arguments:
|
||||
# $ make help -C /opt/beegfs/src/client/client_module_${BEEGFS_MAJOR_VERSION}/build
|
||||
#
|
||||
# Help example for BeeGFS 2015.03 release:
|
||||
# $ make help -C /opt/beegfs/src/client/client_module_2015.03/build
|
||||
|
||||
|
||||
# RDMA Support Notes
|
||||
# ==================
|
||||
# If you installed InfiniBand kernel modules from OpenFabrics OFED, then also
|
||||
# define the correspsonding header include path by adding
|
||||
# "OFED_INCLUDE_PATH=<path>" to the "buildArgs", where <path> usually is
|
||||
# "/usr/src/openib/include" or "/usr/src/ofa_kernel/default/include" for
|
||||
# Mellanox OFED.
|
||||
#
|
||||
# OFED headers are automatically detected even if OFED_INCLUDE_PATH is not
|
||||
# defined. To build the client without RDMA support, define BEEGFS_NO_RDMA=1.
|
||||
#
|
||||
|
||||
|
||||
# NVIDIA GPUDirect Storage Support Notes
|
||||
# ==================
|
||||
# If you want to build BeeGFS with NVIDIA GPUDirect Storage support, add
|
||||
# "NVFS_INCLUDE_PATH=<path>" to the "buildArgs" below, where path is the directory
|
||||
# that contains nvfs-dma.h. This is usually the nvidia-fs source directory:
|
||||
# /usr/src/nvidia-fs-VERSION.
|
||||
#
|
||||
# If config-host.h is not present in NVFS_INCLUDE_PATH, execute the configure
|
||||
# script. Example:
|
||||
# $ cd /usr/src/nvidia-fs-2.13.5
|
||||
# $ ./configure
|
||||
#
|
||||
# NVIDIA_INCLUDE_PATH must be defined and point to the NVIDIA driver source:
|
||||
# /usr/src/nvidia-VERSION/nvidia
|
||||
#
|
||||
# OFED_INCLUDE_PATH must be defined and point to Mellanox OFED.
|
||||
#
|
||||
|
||||
#
|
||||
# --- Section: [Build Settings] ---
|
||||
#
|
||||
|
||||
# Build Settings
|
||||
# ==============
|
||||
# These are the arguments for the client module "make" command.
|
||||
#
|
||||
# Note: Quotation marks and equal signs can be used without escape characters
|
||||
# here.
|
||||
#
|
||||
# Example1:
|
||||
# buildArgs=-j8
|
||||
#
|
||||
# Example2 (see "RDMA Support Notes" above):
|
||||
# buildArgs=-j8 OFED_INCLUDE_PATH=/usr/src/openib/include
|
||||
#
|
||||
# Example3 (see "NVIDIA GPUDirect Storage Support Notes" above):
|
||||
# buildArgs=-j8 OFED_INCLUDE_PATH=/usr/src/ofa_kernel/default/include \
|
||||
# NVFS_INCLUDE_PATH=/usr/src/nvidia-fs-2.13.5 \
|
||||
# NVIDIA_INCLUDE_PATH=/usr/src/nvidia-520.61.05/nvidia
|
||||
#
|
||||
# Default:
|
||||
# buildArgs=-j8
|
||||
|
||||
buildArgs=-j8
|
||||
|
||||
|
||||
# Turn Autobuild on/off
|
||||
# =====================
|
||||
# Controls whether modules will be built on "/etc/init.d/beegfs-client start".
|
||||
#
|
||||
# Note that even if autobuild is enabled here, the modules will only be built
|
||||
# if no beegfs kernel module for the current kernel version exists in
|
||||
# "/lib/modules/<kernel_version>/updates/".
|
||||
#
|
||||
# Default:
|
||||
# buildEnabled=true
|
||||
|
||||
buildEnabled=true
|
||||
19
client_module/build/dist/etc/beegfs-client-build.mk
vendored
Normal file
19
client_module/build/dist/etc/beegfs-client-build.mk
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# BeeGFS client module DKMS build configuration
|
||||
# This file is only used when building via DKMS.
|
||||
# The module needs to be rebuilt after this file has been changed.
|
||||
|
||||
# If using thirdparty OFED specify the path to the installation here.
|
||||
# Examples:
|
||||
#OFED_INCLUDE_PATH=/usr/src/ofa_kernel/default/include
|
||||
#OFED_INCLUDE_PATH=/usr/src/openib/include
|
||||
# To disable RDMA support, define BEEGFS_NO_RDMA
|
||||
#BEEGFS_NO_RDMA=1
|
||||
# If building nvidia-fs support, specify path to nvfs-dma.h.
|
||||
# This directory must also have config-host.h, which is created
|
||||
# by the nvidia-fs configure script.
|
||||
# Example:
|
||||
#NVFS_INCLUDE_PATH=/usr/src/nvidia-fs-2.13.5
|
||||
# If building nvidia-fs support, specify path to NVIDIA driver
|
||||
# source.
|
||||
# Example:
|
||||
#NVIDIA_INCLUDE_PATH=/usr/src/nvidia-520.61.05/nvidia
|
||||
37
client_module/build/dist/etc/beegfs-client-mount-hook.example
vendored
Executable file
37
client_module/build/dist/etc/beegfs-client-mount-hook.example
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash -e
|
||||
# BeeGFS client mount hook script
|
||||
|
||||
action="${1}"
|
||||
mountpoint="${2}"
|
||||
|
||||
# THIS IS AN EXAMPLE SCRIPT.
|
||||
# Copy and modify it, and remove the following line:
|
||||
exit 1
|
||||
|
||||
if [ ! -d "${mountpoint}" ]
|
||||
then
|
||||
echo "${0}: Mount point does not exist: ${mountpoint}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "${action}" in
|
||||
|
||||
pre-mount)
|
||||
;;
|
||||
|
||||
post-mount)
|
||||
mount -o bind "${mountpoint}/foo" "${mountpoint}/bar"
|
||||
;;
|
||||
|
||||
pre-unmount)
|
||||
umount "${mountpoint}/bar"
|
||||
;;
|
||||
|
||||
post-unmount)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "${0}: Unrecognized option supplied to client mount hook: ${action}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
755
client_module/build/dist/etc/beegfs-client.conf
vendored
Normal file
755
client_module/build/dist/etc/beegfs-client.conf
vendored
Normal file
@@ -0,0 +1,755 @@
|
||||
# This is a config file for BeeGFS clients.
|
||||
# http://www.beegfs.com
|
||||
|
||||
|
||||
# --- [Table of Contents] ---
|
||||
#
|
||||
# 1) Settings
|
||||
# 2) Mount Options
|
||||
# 3) Basic Settings Documentation
|
||||
# 4) Advanced Settings Documentation
|
||||
|
||||
|
||||
#
|
||||
# --- Section 1.1: [Basic Settings] ---
|
||||
#
|
||||
|
||||
sysMgmtdHost =
|
||||
|
||||
|
||||
#
|
||||
# --- Section 1.2: [Advanced Settings] ---
|
||||
#
|
||||
|
||||
connAuthFile = /etc/beegfs/conn.auth
|
||||
connDisableAuthentication = false
|
||||
connClientPort = 8004
|
||||
connMgmtdPort = 8008
|
||||
connPortShift = 0
|
||||
|
||||
connCommRetrySecs = 600
|
||||
connFallbackExpirationSecs = 900
|
||||
connInterfacesFile =
|
||||
connRDMAInterfacesFile =
|
||||
connMaxInternodeNum = 12
|
||||
connMaxConcurrentAttempts = 0
|
||||
connNetFilterFile =
|
||||
|
||||
connUseRDMA = true
|
||||
connTCPFallbackEnabled = true
|
||||
connTCPRcvBufSize = 0
|
||||
connUDPRcvBufSize = 0
|
||||
connRDMABufNum = 70
|
||||
connRDMABufSize = 8192
|
||||
connRDMAFragmentSize = page
|
||||
connRDMATypeOfService = 0
|
||||
connTcpOnlyFilterFile =
|
||||
|
||||
logClientID = false
|
||||
logLevel = 3
|
||||
|
||||
quotaEnabled = false
|
||||
|
||||
sysCacheInvalidationVersion = true
|
||||
sysCreateHardlinksAsSymlinks = false
|
||||
sysMountSanityCheckMS = 11000
|
||||
sysSessionCheckOnClose = false
|
||||
sysSyncOnClose = false
|
||||
sysTargetOfflineTimeoutSecs = 900
|
||||
sysUpdateTargetStatesSecs = 30
|
||||
sysXAttrsEnabled = false
|
||||
|
||||
tuneFileCacheType = buffered
|
||||
tunePreferredMetaFile =
|
||||
tunePreferredStorageFile =
|
||||
tuneRemoteFSync = true
|
||||
tuneUseGlobalAppendLocks = false
|
||||
tuneUseGlobalFileLocks = false
|
||||
|
||||
|
||||
#
|
||||
# --- Section 1.3: [Enterprise Features] ---
|
||||
#
|
||||
# See end-user license agreement for definition and usage limitations of
|
||||
# enterprise features.
|
||||
#
|
||||
|
||||
sysACLsEnabled = false
|
||||
|
||||
|
||||
#
|
||||
# --- Section 2: [Mount Options] ---
|
||||
#
|
||||
|
||||
# Valid mount options are:
|
||||
# cfgFile, logLevel, connPortShift, connMgmtdPort,
|
||||
# sysMgmtdHost, sysMountSanityCheckMS, connInterfacesList.
|
||||
#
|
||||
# Use the mount option "cfgFile" to specify a different config file
|
||||
# for the beegfs client.
|
||||
# Example:
|
||||
# $ /bin/mount -t beegfs beegfs_nodev /beegfs -ocfgFile=/etc/anotherconfig.conf
|
||||
#
|
||||
# Use the mount option "connInterfacesList" to pass the list of interfaces names.
|
||||
# These interfaces names should be space-separated.
|
||||
# Example:
|
||||
# $ /bin/mount -t beegfs beegfs_nodev /beegfs \
|
||||
# -ocfgFile=/etc/anotherconfig.conf,connInterfacesList='ib0 eth0'
|
||||
#
|
||||
# Mount options override the corresponding config file values.
|
||||
# Example:
|
||||
# $ /bin/mount -ocfgFile=/etc/anotherconfig.conf,logLevel=3 ...
|
||||
|
||||
|
||||
#
|
||||
# --- Section 3: [Basic Settings Documentation] ---
|
||||
#
|
||||
|
||||
# [sysMgmtdHost]
|
||||
# Hostname (or IP) of the host running the management service.
|
||||
# (See also "connMgmtdPort".)
|
||||
# Default: <none>
|
||||
|
||||
|
||||
#
|
||||
# --- Section 4: [Advanced Settings Documentation] ---
|
||||
#
|
||||
|
||||
#
|
||||
# --- Section 4.1: [Connections & Communication] ---
|
||||
#
|
||||
|
||||
# [connAuthFile]
|
||||
# The path to a file that contains a shared secret for connection based
|
||||
# authentication. Only peers that use the same shared secret will be able to
|
||||
# connect.
|
||||
# Default: <none>
|
||||
|
||||
# [connDisableAuthentication]
|
||||
# If set to true, explicitly disables connection authentication and allow the
|
||||
# service to run without a connAuthFile. Running BeeGFS without connection
|
||||
# authentication is considered insecure and is not recommended.
|
||||
# Default: false
|
||||
|
||||
# [connClientPort]
|
||||
# The UDP port of the client.
|
||||
# Default: 8004
|
||||
|
||||
# [connMgmtdPort]
|
||||
# The UDP and TCP port of the management node.
|
||||
# Default: 8008
|
||||
|
||||
# [connPortShift]
|
||||
# Shifts all following UDP and TCP ports according to the specified value.
|
||||
# Intended to make port configuration easier in case you do not want to
|
||||
# configure each port individually.
|
||||
# Default: 0
|
||||
|
||||
# [connCommRetrySecs]
|
||||
# The time (in seconds) for retries in case a network communication fails
|
||||
# (e.g. if a server is down). After this time, the I/O operation will fail
|
||||
# and the calling process will receive an error.
|
||||
# Note: Set this value to 0 for infinite retries. In this case, a process
|
||||
# accessing the file system will block until the corresponding server
|
||||
# becomes available (or until it is interrupted by a signal).
|
||||
# Default: 600
|
||||
|
||||
# [connFallbackExpirationSecs]
|
||||
# The time in seconds after which a connection to a fallback interface expires.
|
||||
# When a fallback connection expires, the system will try to establish a new
|
||||
# connection to the other hosts primary interface (falling back to another
|
||||
# interface again if necessary).
|
||||
# Note: The priority of node interfaces can be configured using the
|
||||
# "connInterfacesFile" parameter.
|
||||
# Default: 900
|
||||
|
||||
# [connInterfacesFile]
|
||||
# The path to a text file that specifies the names of the interfaces, which
|
||||
# may be used for communication by other nodes. One interface per line. The
|
||||
# line number also defines the priority of an interface.
|
||||
# Example: "ib0" in the first line, "eth0" in the second line.
|
||||
# Values: This setting is optional. If unspecified, all available interfaces
|
||||
# will be published and priorities will be assigned automatically.
|
||||
# Note: This has no influence on outgoing connections. The information is sent
|
||||
# to other hosts to inform them about possible communication paths.
|
||||
# Default: <none>
|
||||
|
||||
# [connInterfacesList]
|
||||
# Comma-separated list of interface names. Performs the same function as
|
||||
# connInterfacesFile.
|
||||
# If use as the mount option "connInterfacesList" to pass the list of interfaces
|
||||
# names then it override the corresponding config file/list values..
|
||||
# The interfaces names should be space-separated.
|
||||
# Example:
|
||||
# $ /bin/mount -t beegfs beegfs_nodev /beegfs \
|
||||
# -ocfgFile=/etc/anotherconfig.conf,connInterfacesList='ib0 eth0'
|
||||
#
|
||||
# Default: <none>
|
||||
|
||||
# [connRDMAInterfacesFile]
|
||||
# The path to a text file that specifies the names of IPoIB interfaces, which
|
||||
# may be used for outbound RDMA communication with other nodes. One interface
|
||||
# per line. These interfaces must be RDMA-capable NICs.
|
||||
#
|
||||
# All storage and metadata servers must be IP-reachable from each specified
|
||||
# interface.
|
||||
#
|
||||
# Specifying interfaces in this file limits which RDMA NICs are used for outbound
|
||||
# RDMA. Specifying multiple interfaces allows the client to use multiple RDMA
|
||||
# interfaces for outbound communication.
|
||||
#
|
||||
# Example: "ib0" in the first line, "ib1" in the second line.
|
||||
# Values: This setting is optional. When none are specified, the client will use
|
||||
# the first client host interface that can reach the remote node via IPoIB,
|
||||
# as decided by rdma_cm. When multiple interfaces are specified, the client
|
||||
# round-robins creation of outbound RDMA connections across the specified
|
||||
# interfaces.
|
||||
# Default: <none>
|
||||
|
||||
# [connMaxInternodeNum]
|
||||
# The maximum number of simultaneous connections to the same node.
|
||||
# Default: 12
|
||||
|
||||
# [connMaxConcurrentAttempts]
|
||||
# The maximum number of simultaneous connection attempts. This may help in case
|
||||
# establishing new connections keeps failing and produces fallbacks.
|
||||
# It may happen particularly when using RDMA in an Omni-Path setup. If you
|
||||
# don't have failing connection attempts, tuning this option might still lead
|
||||
# to a faster connection process. This option is experimental, so there is no
|
||||
# experience with different values. Setting it to 0 disables it, which means
|
||||
# concurrent connection attempts are not limited.
|
||||
# Default: 0
|
||||
|
||||
# [connNetFilterFile]
|
||||
# The path to a text file that specifies allowed IP subnets, which may be used
|
||||
# for outgoing communication. One subnet per line in classless notation (IP
|
||||
# address and number of significant bits).
|
||||
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
|
||||
# line.
|
||||
# This value is optional. If unspecified, all addresses are allowed for
|
||||
# outgoing communication.
|
||||
# Default: <none>
|
||||
|
||||
# [connUseRDMA]
|
||||
# Enables the use of Remote Direct Memory Access (RDMA) for InfiniBand or RoCE.
|
||||
# For this setting to be effective, OFED ibverbs support also has to be enabled
|
||||
# at compile time of the beegfs client modules (typically via
|
||||
# beegfs-client-autobuild.conf).
|
||||
# Default: true
|
||||
|
||||
# [connTCPFallbackEnabled]
|
||||
# Enables fallback from RDMA to TCP sockets when there is a problem connecting
|
||||
# via RDMA to a storage or meta node.
|
||||
# Default: true
|
||||
|
||||
# [connTCPRcvBufSize], [connUDPRcvBufSize]
|
||||
# Sets the size for TCP and UDP socket receive buffers (SO_RCVBUF). The maximum
|
||||
# allowed value is determined by sysctl net.core.rmem_max. This value is ignored
|
||||
# if it is less than the default value determined by net.core.rmem_default.
|
||||
# For legacy reasons, the default value 0 indicates that the buffer size is set
|
||||
# to connRDMABufNum * connRDMABufSize.
|
||||
# -1 indicates that the buffer size should be left at the system default.
|
||||
# Default: 0
|
||||
|
||||
# [connRDMABufNum], [connRDMABufSize], [connRDMAFragmentSize]
|
||||
# InfiniBand RDMA buffer settings.
|
||||
# connRDMABufSize is the maximum size of a buffer (in bytes) that will be sent
|
||||
# over the network; connRDMABufNum is the number of available buffers that can
|
||||
# be in flight for a single connection. These client settings are also applied
|
||||
# on the server side for each connection. Ideally, the largest, commonly used
|
||||
# filesytem chunksize should be < connRDMABufNum * connRDMABufSize to achieve
|
||||
# the best performance.
|
||||
#
|
||||
# The minimum usable value for connRDMABufNum is 3, which is required by the
|
||||
# BeeGFS RDMA protocol. Lower values will immediately result in communication
|
||||
# failures.
|
||||
#
|
||||
# connRDMAFragmentSize determines how contiguous memory is allocated per
|
||||
# buffer. If connRDMAFragmentSize=4096 and connRDMABufSize=8192, each buffer
|
||||
# is allocated in 2 regions of 4096 contiguous bytes. Less fragmentation
|
||||
# improves performance. The value "none" indicates that buffers will not be
|
||||
# fragmented, resulting in allocation of contiguous regions of
|
||||
# connRDMABufSize. The value "page" uses the Linux PAGE_SIZE as the
|
||||
# fragmentation value.
|
||||
# The reason for using fragmentation is that large allocations
|
||||
# are more likely to fail if there is a shortage of heap memory. The minimum
|
||||
# fragmentation value is PAGE_SIZE. Using larger values (or 0) should improve
|
||||
# performance and allows for larger values of connRDMABufSize.
|
||||
#
|
||||
# Note: RAM usage per connection is connRDMABufSize x connRDMABufNum x 2. Keep
|
||||
# resulting RAM usage (x connMaxInternodeNum x number_of_clients) on the
|
||||
# server in mind when increasing these values.
|
||||
# Default: 70, 8192, page
|
||||
|
||||
# [connRDMAMetaBufNum], [connRDMAMetaBufSize], [connRDMAMetaFragmentSize]
|
||||
# InfiniBand RDMA buffer settings for connections to beegfs-meta.
|
||||
# These settings behave in the same way as connRDMABufNum, connRDMABufSize
|
||||
# and connRDMAFragmentize except that they are used for connections to
|
||||
# beegfs-meta.
|
||||
# Metadata messages are usuallly small and do not require the large amount
|
||||
# of buffer space that is typically configured for connections to
|
||||
# beegfs-storage. One exception to this would be if large extended attributes
|
||||
# are added to files.
|
||||
# connRDMAMetaBufNum = "default" indicates that connRDMABufNum should be used.
|
||||
# connRDMAMetaBufSize = "default" indicates that connRDMABufSize should be used.
|
||||
# connRDMAMetaFragmentSize = "default" indicates that connRDMAFragmentSize
|
||||
# should be used.
|
||||
# The minimum value for connRDMAMetaBufNum is 3.
|
||||
# Default: default, default, default
|
||||
|
||||
# [connRDMATypeOfService]
|
||||
# InfiniBand provides the option to set a type of service for an application.
|
||||
# This type of service can be used by your subnet manager to provide Quality of
|
||||
# Service functionality (e.g. setting different service levels).
|
||||
# In openSM the service type will be mapped to the parameter qos-class, which
|
||||
# can be handled in your QoS configuration.
|
||||
# See
|
||||
# www.openfabrics.org/downloads/OFED/ofed-1.4/OFED-1.4-docs/
|
||||
# QoS_management_in_OpenSM.txt
|
||||
# for more information on how to configure openSM for QoS.
|
||||
# This parameter sets the type of service for all outgoing connections of this
|
||||
# daemon.
|
||||
# Default: 0 (Max: 255)
|
||||
|
||||
# [connRDMAKeyType]
|
||||
# In RDMA, an "rkey" is used to provide an access token for a peer to access
|
||||
# local memory regions that are registered for RDMA. Historically,
|
||||
# BeeGFS used either a "DMA key" or an "unsafe global rkey" depending upon
|
||||
# whether or not "unsafe global rkey" is supported by the operating system.
|
||||
# This is now selectable. "DMA key" is not supported on kernel >= 4.9
|
||||
# unless MOFED is installed. If an unsupported option is specified, there
|
||||
# will be warnings in syslog and RDMA connections will not be established.
|
||||
# Use of "unsafe global rkey" is preferred, but generates a syslog message
|
||||
# every time an RDMA connection is established: "enabling unsafe global rkey".
|
||||
# Neither option is considered "safe" because they both provide access
|
||||
# to all DMA mapped memory for a given connection. This technique is
|
||||
# used to provide better performance for small I/O requests.
|
||||
# "register" uses a memory registration per connection to provide an rkey.
|
||||
# "register" is not compatible with NVIDIA GPUDirect Storage.
|
||||
# Specify "dma" or "register" to squelch the syslog warning.
|
||||
# Values: "global" (unsafe global rkey), "dma" (DMA key), "register"
|
||||
# (memory registration)
|
||||
# Default: "global"
|
||||
|
||||
# [connTcpOnlyFilterFile]
|
||||
# The path to a text file that specifies IP address ranges to which no RDMA
|
||||
# connection should be established. This is useful e.g. for environments where
|
||||
# all hosts support RDMA, but some hosts cannot connect via RDMA to some other
|
||||
# hosts.
|
||||
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
|
||||
# line.
|
||||
# Values: This setting is optional.
|
||||
# Default: <none>
|
||||
|
||||
# [connMessagingTimeouts]
|
||||
# These constants are used to set some of the connection timeouts for sending
|
||||
# and receiving data between services in the cluster. They used to be hard-coded
|
||||
# (CONN_LONG_TIMEOUT, CONN_MEDIUM_TIMEOUT and CONN_SHORT_TIMEOUT) but are now
|
||||
# made configurable for experimentation purposes.
|
||||
# This option takes three integer values of milliseconds, separated by a comma
|
||||
# in the order long, medium, short.
|
||||
# WARNING: This is an EXPERIMENTAL configuration option that should not be
|
||||
# changed in production environments unless properly tested and validated.
|
||||
# Some configurations can lead to service lockups and other subtle issues.
|
||||
# Please make sure that you know exactly what you are doing and properly
|
||||
# test any changes you make.
|
||||
# Default: 600000,90000,30000
|
||||
|
||||
# [connRDMATimeouts]
|
||||
# These constants are used to set some of the timeouts for sending and receiving
|
||||
# data between services in the cluster via RDMA. They used to be
|
||||
# hard-coded IBVSOCKET_CONN_TIMEOUT_MS, IBVSOCKET_COMPLETION_TIMEOUT_MS,
|
||||
# IBVSOCKET_FLOWCONTROL_ONSEND_TIMEOUT_MS,
|
||||
# IBVSOCKET_FLOWCONTROL_ONRECV_TIMEOUT_MS and a 10000 literal for poll timeout
|
||||
# but are now made configurable for experimentation purposes.
|
||||
# This option takes five integer values of milliseconds, separated by a comma
|
||||
# in the order connectMS, completionMS, flowSendMS, flowRecvMS and pollMS.
|
||||
# WARNING: This is an EXPERIMENTAL configuration option that should not be
|
||||
# changed in production environments unless properly tested and validated.
|
||||
# Some configurations can lead to service lockups and other subtle issues.
|
||||
# Please make sure that you know exactly what you are doing and properly
|
||||
# test any changes you make.
|
||||
# Default: 5000,300000,180000,180000,10000
|
||||
|
||||
|
||||
# --- Section 4.2: [Logging] ---
|
||||
#
|
||||
|
||||
# [logClientID]
|
||||
# Defines whether the ClientID should appear in each log line.
|
||||
# This is mainly helpful if BeeGFS is mounted multiple times on this machine.
|
||||
# Default: false
|
||||
|
||||
# [logLevel]
|
||||
# Defines the amount of log messages. The higher this level, the more detailed
|
||||
# the log messages will be.
|
||||
# Level 3 will print connection messages, level 4 will print syscall messages,
|
||||
# level 5 will print debug messages.
|
||||
# Note: Levels above 3 might decrease performance.
|
||||
# Default: 3 (Max: 5)
|
||||
|
||||
#
|
||||
# --- Section 4.3: [Quota Settings] ---
|
||||
#
|
||||
|
||||
# [quotaEnabled]
|
||||
# Enables user and group quota support by transferring extra user data to the
|
||||
# servers. This uses quota information of the underlying file systems on the
|
||||
# storage servers, which needs to be enabled by the server administrator.
|
||||
# Note: In the first implementation, only quota monitoring is available.
|
||||
# Note: Get quota information with "beegfs-ctl --getquota".
|
||||
# Note: If this option is true, performance might be slightly decreased due to
|
||||
# extra information tracking.
|
||||
# Default: false
|
||||
|
||||
|
||||
#
|
||||
# --- Section 4.4: [System Settings] ---
|
||||
#
|
||||
|
||||
# [sysCacheInvalidationVersion]
|
||||
#
|
||||
# Enable the client to invalidate its cache and reload the inode of a file when
|
||||
# the version parameter of the file on metadata changes due to internal metadata
|
||||
# operations such as stripe pattern change. This is done by comparing the
|
||||
# version parameters on client and metadata on the first lookup after internal
|
||||
# metadata changes. If the versions differ, the client invalidates the cache and
|
||||
# reloads the inode.
|
||||
# Note: If this option is set to true, performance may be decreased.
|
||||
# Default: true
|
||||
|
||||
# [sysCreateHardlinksAsSymlinks]
|
||||
# Create a symlink when an application tries to create a hardlink for files in
|
||||
# different directories.
|
||||
# Default: false
|
||||
|
||||
# [sysMountSanityCheckMS]
|
||||
# Perform some basic checks during mount (e.g. whether the client helper daemon
|
||||
# and storage servers are reachable). Mounting will fail if a problem is
|
||||
# detected.
|
||||
# Values: Set the time (in ms) you want to spend waiting for the servers
|
||||
# (especially the management daemon) to respond. Use 0 to disable all checks
|
||||
# and allow mounting even if no servers are reachable.
|
||||
# Default: 11000
|
||||
|
||||
# [sysSessionCheckOnClose]
|
||||
# Checks for a valid session on the storage servers when a file is closed. If
|
||||
# this option is set to true, a potential cache loss from a crash of a storage
|
||||
# server can be detected. This will be reported to the user application as a
|
||||
# close() error code.
|
||||
# Note: There is also a session check included in all read/write/fsync messages,
|
||||
# which is independent of this setting.
|
||||
# Note: If this option is set to true, more network messages are required on
|
||||
# close(), so performance will decreased.
|
||||
# Default: false
|
||||
|
||||
# [sysSessionChecksEnabled]
|
||||
# Enable session checks in read/write/fsync operations to be able to detect
|
||||
# server crashes that could have caused a loss of server side caches. Disabling
|
||||
# these checks is useful in certain system configurations to be able to cleanly
|
||||
# resume I/O after a server crash/unclean failover.
|
||||
# WARNING: Disabling session checks can lead to undetected cache loss and
|
||||
# therefore silent data corruption on the storage servers. Only disable the
|
||||
# checks if absolutely necessary and if there are measures in place to prevent
|
||||
# cache loss (synchronous mounts, battery backed caches) on the storage servers.
|
||||
# Default: true
|
||||
|
||||
# [sysSyncOnClose]
|
||||
# Sync file contents on close. If this option is set to true, the storage
|
||||
# servers will flush the write cache of a file to disk immediately when it is
|
||||
# closed by the application. If this option is set to false, the write cache
|
||||
# will be flushed to disk asynchronously after a few seconds.
|
||||
# Note: If this option is true, performance will be decreased.
|
||||
# Default: false
|
||||
|
||||
# [sysTargetOfflineTimeoutSecs]
|
||||
# Timeout until all storage targets and metadata nodes are considered offline
|
||||
# when no target state updates can be fetched from the management server.
|
||||
# If this value is 0, targets will never be set to offline due to an
|
||||
# unreachable management node and will stay in state probably-offline.
|
||||
# Note: This must be at least twice as large as the value of
|
||||
# sysTargetOfflineTimoutSecs in the server config files.
|
||||
# Values: time in seconds
|
||||
# Default: 900
|
||||
|
||||
# [sysUpdateTargetStatesSecs]
|
||||
# Interval in which the states of the storage targets are checked.
|
||||
# Note: This must be significantly shorter than the sysTargetOfflineTimeoutSecs
|
||||
# value set in the server (recommendation: maximum 1/3 of it).
|
||||
# Values: time in seconds
|
||||
# Default: 30
|
||||
|
||||
# [sysXAttrsEnabled]
|
||||
# Enable extended attributes (also know as EAs/xattrs).
|
||||
# Default: false
|
||||
|
||||
# [sysXAttrsCheckCapabilities]
|
||||
# Check inodes for existing "security.capability" extended attribute and
|
||||
# optionally cache to reduce metadata requests and increase write performance.
|
||||
# The Linux kernel uses a security mechanism that automatically removes
|
||||
# setuid/setgid bits and capabilities from files when they are changed. This is
|
||||
# done to prevent users from executing binaries with elevated privileges that
|
||||
# were changed after the privileges were originally set. That mechanism requires
|
||||
# that, by default, the kernel has to check each file for existing capabilities
|
||||
# on every write which leads to a large overhead in metadata RPCs to fetch the
|
||||
# "security.capability" extended attribute. To optimize this, Linux allows file
|
||||
# systems to set a flag (S_NOSEC) on the file, which short-circuits these
|
||||
# checks.
|
||||
# This configuration option configures the file system mount to allow the
|
||||
# client to either always check, check once and cache that flag after a first
|
||||
# lookup of the extended attribute returns an empty result, or set the flag on
|
||||
# inode creation and never check. The flag will automatically be cleared when
|
||||
# capabilities are modified on this client. It will, however, currently not
|
||||
# be cleared when a different client modifies capabilities or sets setuid/setgid
|
||||
# bits, which can lead to capabilities not being cleared, even after the file is
|
||||
# written to. If this is a concern, this option should be set to "always".
|
||||
# As long as BeeGFS is mounted using the "nosuid" mount option (which is
|
||||
# recommended and the default setting), elevating privileges via setuid/setgid
|
||||
# bits and capabilities is disabled and it is safe to set this option to "never".
|
||||
# Possible values:
|
||||
# always (always check for security xattr, never cache the result)
|
||||
# cache (check for security xattr once, then cache)
|
||||
# never (mark new inodes immediately, never check security xattr)
|
||||
# Default: never
|
||||
|
||||
# [sysBypassFileAccessCheckOnMeta]
|
||||
# Allow this client to bypass file access restrictions enforced by metadata
|
||||
# servers. When enabled, the client is permitted to open files even if access
|
||||
# restrictions are currently in place (e.g., file marked read-only,
|
||||
# write-locked, or fully restricted). This setting is primarily intended for
|
||||
# specialized clients in controlled environments, such as HSM (Hierarchical
|
||||
# Storage Management) systems that need to restore file data, or backup/recovery
|
||||
# tools that require access to otherwise locked files.
|
||||
# Note: This setting only affects metadata-level access checks and has no effect
|
||||
# on other security or permission mechanisms.
|
||||
# Default: false
|
||||
|
||||
|
||||
# [sysACLsEnabled]
|
||||
# Allow the creation and enforcement of Access Control Lists (ACLs).
|
||||
# Note: Only works if sysXAttrsEnabled=true.
|
||||
# Note: Requires at least Linux kernel version 3.2.
|
||||
# Note: Enabling this setting can affect metadata performance.
|
||||
# Default: false
|
||||
|
||||
# [sysFileEventLogMask]
|
||||
# Specifies which file system events shall be logged by the metadata servers. If
|
||||
# unset, this client doesn't send log events at all. This can either be "none"
|
||||
# or a comma separated list of event types to log. The following event types
|
||||
# (and any comma-separated combination) are possible:
|
||||
# "flush" (explicit data flushes on files), "close" (close writable file),
|
||||
# "trunc" (file truncation), "setattr" (set attributes),
|
||||
# "link-op" (create,mkdir,mknod,create symlink,create hardlink,rmdir,unlink, rename),
|
||||
# "read" (deprecated, see notes) or "open-read" (file opened in read-only mode),
|
||||
# "open-write" (file opened in write only mode),
|
||||
# "open-readwrite" (file opened for both read and write),
|
||||
# Note: If a client opens a file multiple times, "close" will only generate an
|
||||
# event if the last fd is closed. If events for each fd shall be generated,
|
||||
# "flush" needs to be used. However, "flush" might have a small performance
|
||||
# impact. Also note that "read" is deprecated for file opening in read-only mode,
|
||||
# but it is still allowed for backward compatibility. It is recommended to use
|
||||
# "open-read" instead of "read" for clarity and consistency.
|
||||
# Example: sysFileEventLogMask = close,trunc,setattr,link-op,open-read
|
||||
# Default: none
|
||||
|
||||
# [sysRenameEbusyAsXdev]
|
||||
# Changes the semantics of rename() to return an EXDEV error if a file could not
|
||||
# be moved because it is in use (instead of the default EBUSY). Applications and
|
||||
# tools like mv can handle EXDEV and fall back to copy/unlink for the files.
|
||||
# This is mostly useful for NFS exports, where files may not be closed by the
|
||||
# server until after the last open file handle has been closed by clients. This
|
||||
# can cause spurious EBUSY errors in clients that close a file and rename it
|
||||
# immediately afterwards.
|
||||
# Default: false
|
||||
|
||||
|
||||
#
|
||||
# --- Section 4.5: [Tuning] ---
|
||||
#
|
||||
|
||||
# [tuneFileCacheType]
|
||||
# Sets the file read/write cache type.
|
||||
# Values: "none" (disable client caching), "buffered" (use a pool of small
|
||||
# static buffers for write-back and read-ahead), "native" (use the kernel
|
||||
# pagecache), "paged" (experimental, deprecated).
|
||||
# Note: The cache protocols are currently non-coherent (but caches are
|
||||
# automatically flushed when a file is closed).
|
||||
# Note: When client and servers are running on the same machine, "paged" mode
|
||||
# contains the typical potential for memory allocation deadlocks (also known
|
||||
# from local NFS server mounts). So do not use "paged" mode for clients that
|
||||
# run on a metadata or storage server machine.
|
||||
# Default: buffered
|
||||
|
||||
# [tunePreferredMetaFile], [tunePreferredStorageFile]
|
||||
# Path to a text file that contains the numeric IDs of preferred storage targets
|
||||
# and metadata servers. These will be preferred when the client creates new file
|
||||
# system entries. This is useful e.g. to take advantage of data locality in the
|
||||
# case of multiple data centers. If unspecified, all available targets and
|
||||
# servers will be used equally.
|
||||
# Usage: One targetID per line for storage servers, one nodeID per line for
|
||||
# metadata servers.
|
||||
# Note: TargetIDs and nodeIDs can be queried with the beegfs-ctl tool.
|
||||
# Default: <none>
|
||||
|
||||
# [tuneRemoteFSync]
|
||||
# Controls whether fsync() syscalls from a user application should only be
|
||||
# executed on the client to transfer data from the client cache to server
|
||||
# cache (=false); or also on the servers to flush the server's cached file
|
||||
# data to the disks (=true).
|
||||
# Default: true
|
||||
|
||||
# [tuneUseGlobalAppendLocks]
|
||||
# Controls whether files opened in append mode should be protected by locks on
|
||||
# the local machine only (=false) or globally on the servers (=true).
|
||||
# Default: false
|
||||
|
||||
# [tuneUseGlobalFileLocks]
|
||||
# Controls whether application advisory file locks via flock() and fcntl()
|
||||
# should be checked for conflicts on the local machine only (=false) or
|
||||
# globally on the servers (=true).
|
||||
# Default: false
|
||||
|
||||
# [tuneCoherentBuffers]
|
||||
# Enables or disables coherence between the buffers used by
|
||||
# tuneFileCacheType=buffered and the page cache.
|
||||
# If a file is concurrently accessed via mmap() regions and read()/write()
|
||||
# system calls, the buffers used by tuneFileCacheType=buffered and the page
|
||||
# cache used by mmap() may go out of sync - changes made in an mmap()ed region
|
||||
# may not be visible to read() calls immediately, or changes made by write()
|
||||
# calls may not be immediately reflected in mmap()ed regions.
|
||||
# Many programs that use both methods of accessing a file assume that
|
||||
# read()/write() and mmap() present the same view of the file, if this is not
|
||||
# the case, those programs may not work correctly. Programs that have been
|
||||
# observed to misbehave with non-coherent buffers are, for example, git and
|
||||
# some in-memory database applications.
|
||||
# When this option is enabled, files that are currently mmap()ed will behave as
|
||||
# though they had been opened with tuneFileCacheType=none
|
||||
# Default: true
|
||||
|
||||
|
||||
#
|
||||
# --- Section 5: [Expert options]
|
||||
#
|
||||
|
||||
# [connUnmountRetries]
|
||||
# Retry communications during unmount.
|
||||
# If this option is set to `true` and a communication error occurs during
|
||||
# unmont, for example due to a transient network fault, the unsuccessful
|
||||
# communications will be retried normally. When set to `false` they will not be
|
||||
# retried; this leads to a quicker unmount, but resources allocated to current
|
||||
# client will not be freed for a few hours.
|
||||
# Default: true
|
||||
|
||||
# [tuneFileCacheBufSize]
|
||||
# When using buffered mode: maximum size of the (contiguous) data cache for an
|
||||
# open file.
|
||||
# When using native mode: threshold for direct operations. If a read() or
|
||||
# write() passes a buffer size larger than tuneFileCacheBufSize the client will
|
||||
# bypass the page cache and send/receive the data directly to/from the storage
|
||||
# servers.
|
||||
# Default: 524288 (512KiB)
|
||||
|
||||
# [tuneFileCacheBufNum]
|
||||
# When using buffered mode: maximum number of file caches to preallocate
|
||||
# for the mount. When a file is opened a cache is allocated, up to this number.
|
||||
# If the maximum number of caches is reached no cache is allocated and all
|
||||
# read/write operations for the file go to the storage servers directly.
|
||||
# Default: 4*(number of CPUs)
|
||||
|
||||
# [tunePageCacheValidityMS]
|
||||
# Maximum lifetime of cached data in the page cache.
|
||||
# In buffered mode the page cache is used for mmap(), in native mode the page
|
||||
# cache is used for all data. Data in the page cache that was not yet written
|
||||
# to the storage server is written after at most this time, data that was read
|
||||
# but not modified is discarded.
|
||||
# Default: 2000000000 (approx. 23 days)
|
||||
|
||||
# [tuneDirSubentryCacheValidityMS]
|
||||
# Validity time of directory attribute data, in milliseconds.
|
||||
# Attributes of directories (eg stat() data) that have been loaded from the
|
||||
# metadata servers are assumed to be valid for this amount of time without
|
||||
# requiring a refresh. Once the time has passed the next access will cause a
|
||||
# refresh.
|
||||
# Default: 1000
|
||||
|
||||
# [tuneFileSubentryCacheValidityMS]
|
||||
# Validity time of file attribute data, in milliseconds.
|
||||
# Attributes of files (eg stat() data) that have been loaded from the metadata
|
||||
# servers are assumed to be valid for this amount of time without requiring a
|
||||
# refresh. Once the time has passed the next access will cause a refresh.
|
||||
# Default: 0
|
||||
|
||||
# [tuneENOENTCacheValidityMS]
|
||||
# Validity time of the non-existing file in milliseconds.
|
||||
# A negative result of a stat call indicating "No such file or directory"
|
||||
# (ENOENT) is assumed to be valid for this amount of time without requiring a
|
||||
# new request to the meta server. Once the time has passed the next access will
|
||||
# cause a refresh.
|
||||
# Default: 0
|
||||
|
||||
# [tunePathBufSize]
|
||||
# Size of buffers used for constructing paths.
|
||||
# Whenever a full path must be constructed (eg for log messages) a preallocated
|
||||
# buffer of this size will be used.
|
||||
# Default: 4096
|
||||
|
||||
# [tunePathBufNum]
|
||||
# Number of path buffers for path construction.
|
||||
# Determines how many path buffers are preallocated during mount. If no buffers
|
||||
# are available for an operation the operation must wait for another thread to
|
||||
# free enough buffers.
|
||||
# Default: 8
|
||||
|
||||
# [tuneMsgBufSize]
|
||||
# Size of buffers used for messaging.
|
||||
# Messages sent and received by the client (except logging messages) use
|
||||
# buffers preallocated at mount time. Buffers are allocated with the size
|
||||
# given here.
|
||||
# Default: 65536
|
||||
|
||||
# [tuneMsgBufNum]
|
||||
# Number of message buffers.
|
||||
# During mount this many message buffers are preallocated. If an operation
|
||||
# requires communication with a server but all buffers are used, the operation
|
||||
# must wait until a buffer is released.
|
||||
# Default: 4*(number of CPUs) + 1
|
||||
|
||||
# [tuneRefreshOnGetAttr]
|
||||
# If set to `true`, file attributes will be loaded from the server on each call
|
||||
# to fstat(). When set to `false` a call to fstat() may return stale
|
||||
# information for files that are not currently open; this can happen mainly
|
||||
# when NFS exports are used.
|
||||
# Default: false
|
||||
|
||||
# [tuneInodeBlockBits]
|
||||
# Sets the block size of file on the mountpoint to 2**tuneInodeBlockBits.
|
||||
# Default: 19 (512KiB)
|
||||
|
||||
# [tuneEarlyCloseResponse]
|
||||
# Request close responses from the metadata server before the file is fully closed.
|
||||
# This may improve close() performance, but closed files may be accounted as
|
||||
# open for a short time after close() has returned. Files accounted as open
|
||||
# cannot be moved.
|
||||
# Default: false
|
||||
|
||||
# [tuneUseBufferedAppend]
|
||||
# Used only buffered mode. If set, writes to files opened with O_APPEND will be
|
||||
# cached. Ignored unless tuneUseGlobalAppendLocks is also set.
|
||||
# Default: true
|
||||
|
||||
# [tuneStatFsCacheSecs]
|
||||
# Validity time of statfs() results, in seconds.
|
||||
# Results of statfs(), once queried from the storage servers, will be cached
|
||||
# for this amount of time.
|
||||
# Default: 10
|
||||
|
||||
# [sysInodeIDStyle]
|
||||
# Sets the hash function used to compute inode numbers from metadata IDs.
|
||||
# The *32 options produce 32 bit inodes numbers, the *64 variants produce 64
|
||||
# bit inode numbers.
|
||||
# Possible values:
|
||||
# hash32
|
||||
# hash64
|
||||
# md4hash32
|
||||
# md4hash64
|
||||
# Default: md4hash64
|
||||
1
client_module/build/dist/etc/beegfs-mounts.conf
vendored
Normal file
1
client_module/build/dist/etc/beegfs-mounts.conf
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/mnt/beegfs /etc/beegfs/beegfs-client.conf
|
||||
26
client_module/build/dist/etc/default/beegfs-client
vendored
Normal file
26
client_module/build/dist/etc/default/beegfs-client
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# BeeGFS client service configuration.
|
||||
|
||||
# Set to "NO" to disable start of the BeeGFS client via the init script.
|
||||
START_SERVICE="YES"
|
||||
|
||||
# Set to "YES" if you want to start multiple clients with different
|
||||
# configuration files on this machine.
|
||||
#
|
||||
# Create a subdirectory with the ending ".d" in "/etc/beegfs/" for every config
|
||||
# file. The subdirectory name will be used to identify a particular client
|
||||
# instance for init script start/stop.
|
||||
#
|
||||
# Note: The original config file in /etc/beegfs will not be used when multi-mode
|
||||
# is enabled.
|
||||
#
|
||||
# Example: /etc/beegfs/scratch.d/beegfs-client.conf
|
||||
# $ /etc/init.d/beegfs-client start scratch
|
||||
MULTI_MODE="NO"
|
||||
|
||||
# Mount hook will be executed before any mount or unmount operation,
|
||||
# and additionally after the operation succeeded.
|
||||
# The first argument passed is either 'pre-mount', 'post-mount', 'pre-unmount',
|
||||
# or 'post-unmount'.
|
||||
# The second argument is the mount point. This can be useful to set up bind
|
||||
# mounts on top of a BeeGFS, for example.
|
||||
#MOUNT_HOOK=/etc/beegfs/beegfs-client-mount-hook.example
|
||||
439
client_module/build/dist/sbin/beegfs-client.init
vendored
Normal file
439
client_module/build/dist/sbin/beegfs-client.init
vendored
Normal file
@@ -0,0 +1,439 @@
|
||||
#!/bin/bash
|
||||
|
||||
# NOTE: We expclicitly use "bash" here, as rc.status is not shell compliant
|
||||
# and will complain with the message below, if "/bin/sh" is given
|
||||
#
|
||||
# /etc/rc.status: line 43: test: -eq: unary operator expected
|
||||
# /etc/rc.status: line 44: test: -eq: unary operator expected
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: beegfs-client
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start: $network $local_fs $syslog $time beegfs-helperd beegfs-mgmtd beegfs-meta beegfs-storage openib openibd rdma opensmd opensm $named slapd autofs ypbind nscd nslcd sshd
|
||||
# Should-Stop: $network $local_fs $syslog $time beegfs-helperd beegfs-mgmtd beegfs-meta beegfs-storage openib openibd rdma opensmd opensm $named slapd autofs ypbind nscd nslcd sshd
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# chkconfig: 35 99 5
|
||||
# Short-Description: BeeGFS Client
|
||||
# Description: Start BeeGFS Client
|
||||
### END INIT INFO
|
||||
|
||||
SERVICE_NAME="BeeGFS Client"
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
# Note: Special treatment of stop for LSB conformance
|
||||
CLIENT_MOD=beegfs
|
||||
|
||||
SYSCONFIG_FILE=/etc/default/beegfs-client
|
||||
BEEGFS_MOUNT_CONF="/etc/beegfs/beegfs-mounts.conf"
|
||||
FORCE_AUTO_BUILD="/var/lib/beegfs/client/force-auto-build"
|
||||
SUBSYS=/var/lock/subsys/beegfs-client
|
||||
|
||||
AUTOBUILD_CONF="/etc/beegfs/beegfs-client-autobuild.conf"
|
||||
AUTOBUILD_CONF_SAVED="/var/lib/beegfs/client/beegfs-client-autobuild.conf.old"
|
||||
|
||||
CLIENT_SRC_PATH="/opt/beegfs/src/client"
|
||||
|
||||
SELINUX_OPT=""
|
||||
|
||||
DEFAULT_FS_TYPE="beegfs"
|
||||
BUILD_FSTYPE_FILE="beegfs.fstype"
|
||||
|
||||
# we add "/usr/sbin" & co because "su" doesn't automatically add them
|
||||
# on some systems.
|
||||
EXTRA_PATH="/sbin:/usr/sbin/:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin"
|
||||
PATH="$EXTRA_PATH:$PATH"
|
||||
|
||||
# source function library
|
||||
. /etc/beegfs/lib/init-multi-mode.beegfs-client
|
||||
|
||||
# Return values acc. to LSB for all commands but status:
|
||||
# 0 - success
|
||||
# 1 - generic or unspecified error
|
||||
# 2 - invalid or excess argument(s)
|
||||
# 3 - unimplemented feature (e.g. "reload")
|
||||
# 4 - user had insufficient privileges
|
||||
# 5 - program is not installed
|
||||
# 6 - program is not configured
|
||||
# 7 - program is not running
|
||||
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
|
||||
#
|
||||
# Note that starting an already running service, stopping
|
||||
# or restarting a not-running service as well as the restart
|
||||
# with force-reload (in case signaling is not supported) are
|
||||
# considered a success.
|
||||
|
||||
handle_selinux()
|
||||
{
|
||||
selinuxenabled 2>/dev/null || return
|
||||
|
||||
# we do not support SELINUX right now and it only causes trouble, so
|
||||
# we try to deactivate it
|
||||
SELINUX_OPT="fscontext=system_u:object_r:tmp_t:s0"
|
||||
|
||||
echo
|
||||
echo "WARNING: SELINUX IS ENABLED. BeeGFS might not work!"
|
||||
echo " Before you consider to contact BeeGFS support, please try to"
|
||||
echo " disable selinux (Usually in /etc/selinux/config)!"
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
rmmod_beegfs()
|
||||
{
|
||||
for module in `lsmod |egrep "^beegfs" | sed -e 's/\s.*$//g'`; do rmmod $module; done
|
||||
}
|
||||
|
||||
# Build beegfs. The autobuild will install modules to
|
||||
# /lib/modules/`uname -r`/updates/fs/beegfs_autobuild
|
||||
# if the build was successful and it will also run depmod.
|
||||
build_beegfs()
|
||||
{
|
||||
echo "- BeeGFS module autobuild"
|
||||
|
||||
mkdir -p `dirname $SUBSYS`
|
||||
|
||||
# locked section (to avoid build problems when this script is called from
|
||||
# multiple processes concurrently)
|
||||
(
|
||||
# (note: fd 16 is a more or less arbitrary number)
|
||||
flock 16 || echo "WARNING: flock for build failed (continuing without lock...)" >&2
|
||||
|
||||
|
||||
for dir in ${CLIENT_SRC_PATH}/*; do
|
||||
|
||||
set +e
|
||||
echo $dir | grep opentk >/dev/null 2>&1
|
||||
[ $? -ne 0 ] || continue # we ignore opentk
|
||||
|
||||
# ingore paths with missing Makfile
|
||||
[ -f ${dir}/build/Makefile ] || continue
|
||||
|
||||
|
||||
if [ -f ${dir}/build/${BUILD_FSTYPE_FILE} ]; then
|
||||
fstype=`cat ${dir}/build/${BUILD_FSTYPE_FILE}`
|
||||
TARGET_PARAM="TARGET=${fstype}"
|
||||
else
|
||||
TARGET_PARAM=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
MAKE_ARGS="KMOD_INST_DIR=/lib/modules/$(uname -r)/updates/fs/beegfs_autobuild"
|
||||
make -C ${dir}/build auto_rebuild_configured ${MAKE_ARGS} ${TARGET_PARAM} --silent
|
||||
make -C ${dir}/build clean ${MAKE_ARGS} --silent # always clean up
|
||||
|
||||
done
|
||||
|
||||
set -e # ensure -e here (continue conditions above didn't restore it)
|
||||
|
||||
install -D $AUTOBUILD_CONF $AUTOBUILD_CONF_SAVED
|
||||
) 16>$SUBSYS.init-autobuild
|
||||
|
||||
|
||||
# we do not want to delete the $FORCE_AUTO_BUILD file here yet,
|
||||
# as we do not test here, if the modules we just built will load at all
|
||||
}
|
||||
|
||||
# Test if the user updated the build config. If so, we touch
|
||||
# the $FORCE_AUTO_BUILD, which will trigger a rebuild
|
||||
test_updated_autobuild_conf()
|
||||
{
|
||||
set +e
|
||||
RC=0
|
||||
# diskless installations might not have those files
|
||||
if [ -e $AUTOBUILD_CONF -a -e $AUTOBUILD_CONF_SAVED ]; then
|
||||
diff $AUTOBUILD_CONF $AUTOBUILD_CONF_SAVED >/dev/null 2>&1
|
||||
RC=$?
|
||||
fi
|
||||
[ $RC -eq 0 ] || touch $FORCE_AUTO_BUILD
|
||||
set -e
|
||||
}
|
||||
|
||||
# Test and warn if user specified OFED_INCLUDE_PATH but appears to use in-tree
|
||||
# drivers or other way around.
|
||||
warn_on_ofed_mismatch()
|
||||
{
|
||||
set +e
|
||||
|
||||
modinfo ib_core > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
# "modinfo ib_core" not working => cancel (because the user
|
||||
# might have special mechanisms to load ib modules).
|
||||
set -e
|
||||
return
|
||||
fi
|
||||
|
||||
# ibverbs enabled => check if include path set or not
|
||||
|
||||
grep '^buildArgs.*OFED_INCLUDE_PATH' $AUTOBUILD_CONF > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
# ofed include path specified => warn if in-tree modules used
|
||||
modinfo ib_core | grep 'filename:.*updates/' > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: You probably should not specify OFED_INCLUDE_PATH in $AUTOBUILD_CONF"
|
||||
fi
|
||||
else
|
||||
# no ofed include path specified => warn if out-of-tree modules
|
||||
modinfo ib_core | grep 'filename:.*updates/' > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "WARNING: You probably need to specify" \
|
||||
"OFED_INCLUDE_PATH in $AUTOBUILD_CONF"
|
||||
fi
|
||||
fi
|
||||
|
||||
set -e
|
||||
}
|
||||
|
||||
source ${SYSCONFIG_FILE}
|
||||
if [ "${MULTI_MODE}" = "YES" -o "${MULTI_MODE}" = "yes" ]; then
|
||||
set +e
|
||||
init_multi_mode $1 $2
|
||||
exit $?
|
||||
fi
|
||||
|
||||
RETVAL=0
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -f "${SYSCONFIG_FILE}" ]; then
|
||||
if [ "${START_SERVICE}" = "NO" -o "${START_SERVICE}" = "no" ]; then
|
||||
echo "${SERVICE_NAME} not set to be started"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
set +e
|
||||
handle_selinux
|
||||
set -e
|
||||
|
||||
echo "Starting ${SERVICE_NAME}: "
|
||||
|
||||
test_updated_autobuild_conf
|
||||
|
||||
set +e
|
||||
echo "- Loading BeeGFS modules"
|
||||
if [ -f "$FORCE_AUTO_BUILD" ]; then
|
||||
# a new version was installed or the user updated the
|
||||
# auto-build config, so we force a rebuild
|
||||
rmmod_beegfs
|
||||
rc=1
|
||||
else
|
||||
modprobe $CLIENT_MOD
|
||||
rc=$?
|
||||
fi
|
||||
|
||||
if [ $rc -ne 0 ]; then
|
||||
set -e
|
||||
build_beegfs
|
||||
modprobe $CLIENT_MOD || (warn_on_ofed_mismatch && false)
|
||||
rm -f $FORCE_AUTO_BUILD
|
||||
fi
|
||||
set -e
|
||||
|
||||
echo "- Mounting directories from $BEEGFS_MOUNT_CONF"
|
||||
|
||||
mkdir -p `dirname $SUBSYS`
|
||||
touch $SUBSYS
|
||||
|
||||
OLDIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
file=`tr -d '\r' < $BEEGFS_MOUNT_CONF` # read all lines at once and remove CR from dos files
|
||||
for line in $file; do
|
||||
if [ -z "$line" ]; then
|
||||
continue # ignore empty line
|
||||
elif echo "$line" | grep -qs "^\s*#" ; then
|
||||
continue # ignore shell style comments
|
||||
fi
|
||||
|
||||
mnt=`echo $line | awk '{print $1}'`
|
||||
cfg=`echo $line | awk '{print $2}'`
|
||||
fstype=`echo $line | awk '{print $3}'`
|
||||
extra_mount_opts=`echo $line | awk '{print $4}'`
|
||||
|
||||
if [ -z "$mnt" -o -z "$cfg" ]; then
|
||||
echo "Invalid config line: \"$line\""
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -z "$fstype" ]; then
|
||||
fstype=${DEFAULT_FS_TYPE}
|
||||
fi
|
||||
|
||||
set +e
|
||||
|
||||
mount -t ${fstype} | grep "${mnt} " >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
# already mounted
|
||||
set -e
|
||||
continue
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# mkdir required for admon-based installation
|
||||
if [ ! -e ${mnt} ]; then
|
||||
mkdir -p ${mnt}
|
||||
fi
|
||||
|
||||
exec_mount_hook pre-mount "${mnt}"
|
||||
|
||||
mount -t ${fstype} beegfs_nodev ${mnt} \
|
||||
-ocfgFile=${cfg},_netdev,nosuid,${SELINUX_OPT},${extra_mount_opts}
|
||||
|
||||
exec_mount_hook post-mount "${mnt}"
|
||||
|
||||
done
|
||||
|
||||
RETVAL=$?
|
||||
IFS="$OLDIFS"
|
||||
;;
|
||||
stop)
|
||||
echo "Shutting down ${SERVICE_NAME}: "
|
||||
|
||||
RETVAL=$?
|
||||
echo "- Unmounting directories from $BEEGFS_MOUNT_CONF"
|
||||
OLDIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
file=`cat $BEEGFS_MOUNT_CONF` # we have to read all lines at once
|
||||
for line in $file; do
|
||||
if [ -z "$line" ]; then
|
||||
continue # ignore empty line
|
||||
elif echo "$line" | grep -qs "^\s*#" ; then
|
||||
continue # ignore shell style comments
|
||||
fi
|
||||
|
||||
mnt=`echo $line | awk '{print $1}'`
|
||||
cfg=`echo $line | awk '{print $2}'`
|
||||
if [ -z "$mnt" -o -z "$cfg" ]; then
|
||||
echo "Invalid config line: \"$line\""
|
||||
continue
|
||||
fi
|
||||
|
||||
exec_mount_hook pre-unmount "${mnt}"
|
||||
|
||||
set +e
|
||||
res=`umount ${mnt} 2>&1`
|
||||
if [ $? -ne 0 ]; then
|
||||
# umount failed, ignore the failure if not mounted at all
|
||||
echo $res | grep "not mounted" >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
# Is mounted, abort.
|
||||
echo "umount failed: $res"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
set -e
|
||||
|
||||
exec_mount_hook post-unmount "${mnt}"
|
||||
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
|
||||
echo "- Unloading modules"
|
||||
set +e
|
||||
res=`rmmod_beegfs`
|
||||
if [ $? -ne 0 ]; then
|
||||
# rmmod failed, ignore it if the module is not loaded at all
|
||||
echo $res | grep "does not exist in" >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
# Is loaded, check if a BeeGFS is still mounted (all from the list are unmounted, so
|
||||
# it must be a BeeGFS, which was manually mounted)
|
||||
STILL_MOUNTED=$(mount -t beegfs | wc -l)
|
||||
if [ ${STILL_MOUNTED} -eq 0 ]; then
|
||||
# no more BeeGFS instances, no reason why rmmod should be failing, abort
|
||||
echo "rmmod failed: $res"
|
||||
exit 1
|
||||
else
|
||||
# BeeGFS instances mounted, so failure to rmmod is normal
|
||||
echo "WARNING: Unloading BeeGFS modules failed. There are still mounted BeeGFS" \
|
||||
"instances, which do not seem to be managed by the init-script mechanism" \
|
||||
"(beegfs-mounts.conf)."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
RETVAL=$?
|
||||
set -e
|
||||
|
||||
if [ $RETVAL -eq 0 ]; then rm -f $SUBSYS; fi
|
||||
# Remember status and be verbose
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
RETVAL=$?
|
||||
# Remember status and be quiet
|
||||
;;
|
||||
rebuild)
|
||||
# Just rebuild modules. The user needs to call "restart" to make use
|
||||
# of those new modules.
|
||||
build_beegfs
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
rm -f $FORCE_AUTO_BUILD
|
||||
fi
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
set +e
|
||||
$0 status
|
||||
if test $? = 0
|
||||
then
|
||||
set -e
|
||||
$0 restart
|
||||
RETVAL=$?
|
||||
else
|
||||
set -e
|
||||
RETVAL=7
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
# Return value is slightly different for the status command:
|
||||
# 0 - service up and running
|
||||
# 1 - service dead, but /var/run/ pid file exists
|
||||
# 2 - service dead, but /var/lock/ lock file exists
|
||||
# 3 - service not running (unused)
|
||||
# 4 - service status unknown :-(
|
||||
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
|
||||
set +e
|
||||
|
||||
echo -n "Checking for service $SERVICE_NAME: "
|
||||
|
||||
lsmod | grep $CLIENT_MOD >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "is running..."
|
||||
|
||||
mount -t beegfs | grep beegfs >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
mount -t beegfs | cut "-d " -f1-3
|
||||
echo
|
||||
RETVAL=0
|
||||
else
|
||||
echo ">> No active beegfs mounts detected."
|
||||
echo
|
||||
RETVAL=4
|
||||
fi
|
||||
else
|
||||
echo "is stopped."
|
||||
echo
|
||||
RETVAL=3
|
||||
fi
|
||||
|
||||
set -e
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|restart|rebuild|condrestart|try-restart}"
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
||||
|
||||
128
client_module/build/dist/sbin/beegfs-setup-client
vendored
Executable file
128
client_module/build/dist/sbin/beegfs-setup-client
vendored
Executable file
@@ -0,0 +1,128 @@
|
||||
#!/bin/bash
|
||||
|
||||
# License: BeeGFS EULA
|
||||
|
||||
# constant definitions
|
||||
# (for configurables see below)
|
||||
|
||||
DEFAULT_CFG_PATH="/etc/beegfs/beegfs-client.conf"
|
||||
MGMTD_CFG_KEY="sysMgmtdHost"
|
||||
QUOTA_ENABLED_CFG_KEY="quotaEnabled"
|
||||
|
||||
print_usage()
|
||||
{
|
||||
echo
|
||||
echo "DESCRIPTION: Initialize or update the beegfs-client config file."
|
||||
echo
|
||||
echo "USAGE: `basename $0` [options]"
|
||||
echo
|
||||
echo " Recommended Options:"
|
||||
echo
|
||||
echo " -m <host> - Hostname (or IP address) of management server."
|
||||
echo " (Will be stored in client config file.)"
|
||||
echo
|
||||
echo " Other Options:"
|
||||
echo
|
||||
echo " -C - Do not update client config file."
|
||||
echo
|
||||
echo " -c <path> - Path to client config file."
|
||||
echo " (Default: ${DEFAULT_CFG_PATH})"
|
||||
echo
|
||||
echo " -f - Force actions, ignore warnings."
|
||||
echo
|
||||
echo " -h - Print this help."
|
||||
echo
|
||||
echo " -q - Enable quota support in config file."
|
||||
echo " (Default: Quota support disabled)"
|
||||
echo
|
||||
echo "EXAMPLES:"
|
||||
echo " * Example 1) Set \"storage01\" as management daemon host in config file:"
|
||||
echo " $ `basename $0` -m storage01"
|
||||
echo
|
||||
}
|
||||
|
||||
# update config file (if enabled)
|
||||
update_config_file()
|
||||
{
|
||||
# check if config file is defined
|
||||
|
||||
if [ -z "${CFG_PATH}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "Updating config file: ${CFG_PATH}"
|
||||
|
||||
if [ ! -f "${CFG_PATH}" ]; then
|
||||
echo " * ERROR: Config file not found: ${CFG_PATH}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "${MGMTD_HOST}" ]; then
|
||||
echo " * Setting management host: ${MGMTD_HOST}"
|
||||
sed -i "s/\(^${MGMTD_CFG_KEY}.*=\).*/\1 ${MGMTD_HOST}/" ${CFG_PATH}
|
||||
fi
|
||||
|
||||
if [ -n "${QUOTA_ENABLED}" ]; then
|
||||
echo " * Setting quota enabled: ${QUOTA_ENABLED}"
|
||||
sed -i "s/\(^${QUOTA_ENABLED_CFG_KEY}.*=\).*/\1 ${QUOTA_ENABLED}/" ${CFG_PATH}
|
||||
fi
|
||||
}
|
||||
|
||||
################## end of function definitions ##############
|
||||
|
||||
|
||||
# configurable values and their defaults
|
||||
# (for constants see above)
|
||||
|
||||
CFG_PATH="$DEFAULT_CFG_PATH" # empty path means "don't update cfg file"
|
||||
FORCE_ACTIONS=""
|
||||
MGMTD_HOST=""
|
||||
QUOTA_ENABLED=""
|
||||
|
||||
# parse command line arguments
|
||||
# (see print_usage() for description of parameters)
|
||||
|
||||
while getopts "Cc:fhm:q" opt; do
|
||||
case $opt in
|
||||
C)
|
||||
CFG_PATH=""
|
||||
;;
|
||||
c)
|
||||
CFG_PATH="$OPTARG"
|
||||
;;
|
||||
f)
|
||||
FORCE_ACTIONS="1"
|
||||
;;
|
||||
h)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
m)
|
||||
MGMTD_HOST="$OPTARG"
|
||||
;;
|
||||
q)
|
||||
QUOTA_ENABLED="true"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Invalid argument" >&2
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
# don't do anything if no arguments are provided
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
print_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# update config file
|
||||
|
||||
update_config_file
|
||||
|
||||
|
||||
echo "All done."
|
||||
94
client_module/build/dist/sbin/mount.beegfs
vendored
Executable file
94
client_module/build/dist/sbin/mount.beegfs
vendored
Executable file
@@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# BeeGFS Client Mount Utility / External Mount Helper
|
||||
# If placed in /sbin, this script is called automatically by `mount` whenever a filesystem with type
|
||||
# `beegfs` is being mounted. It's main purpose is to do name resolution of the management hostname
|
||||
# as the kernel module can't do that by itself. The hostname is taken from either the mount option
|
||||
# string itself ('sysMgmtdHost=') or from the config file given by the mount options ('cfgFile=').
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $(basename "$0") <fs_name> <directory> [-sfnv] [-o options]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
SPEC="$1"
|
||||
shift
|
||||
DIR="$1"
|
||||
shift
|
||||
|
||||
[[ -n "$SPEC" && -n "$DIR" ]] || usage
|
||||
|
||||
FLAGS=
|
||||
OPTIONS=
|
||||
|
||||
# Read in all possible flags (see `man mount 8`)
|
||||
while getopts 'hsfnvo:t:' FLAG; do
|
||||
case "$FLAG" in
|
||||
s|f|n|v)
|
||||
FLAGS+=("-$FLAG")
|
||||
;;
|
||||
o)
|
||||
OPTIONS="$OPTARG"
|
||||
;;
|
||||
h|*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$((OPTIND -1))"
|
||||
|
||||
# If there is a config file available and sysMgmtdHost is set, load the management hostname from the
|
||||
# config file
|
||||
CFG_FILE=$(echo "$OPTIONS" | grep -oP 'cfgFile=[^,]+' | cut -d= -f2)
|
||||
|
||||
if [[ -n "$CFG_FILE" ]]; then
|
||||
[[ -f "$CFG_FILE" ]] || {
|
||||
echo "Can not open config file '$CFG_FILE'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
H=$(grep -oP '^\s*sysMgmtdHost\s*=\s*\S+\s*$' "$CFG_FILE" | tr -d ' ' | cut -d= -f2)
|
||||
if [[ $H == *$'\n'* ]]; then
|
||||
echo "Multiple definitions of 'sysMgmtdHost' found in '$CFG_FILE'."
|
||||
exit 1
|
||||
elif [[ -n "$H" ]]; then
|
||||
HOST_NAME="$H"
|
||||
fi
|
||||
fi
|
||||
|
||||
# If it has explicitly been set as a mount option, use that (overrides config file).
|
||||
HOST_NAME_OPTION=$(echo "$OPTIONS" | grep -oP 'sysMgmtdHost=[^,]+' | cut -d= -f2)
|
||||
if [[ -n "$HOST_NAME_OPTION" ]]; then
|
||||
HOST_NAME="$HOST_NAME_OPTION"
|
||||
fi
|
||||
|
||||
# A management host must be provided
|
||||
[[ -n "$HOST_NAME" ]] || {
|
||||
echo "Can not determine management host - neither through a mount option ('sysMgmtdHost') nor through \
|
||||
a client config file ('cfgFile')."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Resolve management address
|
||||
MGMTD_ADDR=$(getent ahostsv4 "$HOST_NAME" | cut -f1 -d' ' | head -n1)
|
||||
|
||||
# If resolve fails, error out
|
||||
[[ -n "$MGMTD_ADDR" ]] || {
|
||||
echo "Can not resolve management host address using hostname '$HOST_NAME'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# If the host argument was given, replace it with the resolved address, otherwise append
|
||||
if [[ -n "$HOST_NAME_OPTION" ]]; then
|
||||
# shellcheck disable=SC2001
|
||||
OPTIONS=$(echo "$OPTIONS" | sed "s/sysMgmtdHost=[^,]\\+/sysMgmtdHost=$MGMTD_ADDR/g")
|
||||
else
|
||||
OPTIONS="$OPTIONS,sysMgmtdHost=$MGMTD_ADDR"
|
||||
fi
|
||||
|
||||
# Take the part behind the "." as fstype (typically "beegfs"). This allows multiple mount utilities
|
||||
# and client modules being installed at the same time.
|
||||
FS_TYPE=$(basename "$0" | sed 's/^.*\.//')
|
||||
|
||||
set -ex
|
||||
mount --internal -t "$FS_TYPE" --source "$SPEC" --target "$DIR" ${FLAGS[*]} -o"$OPTIONS"
|
||||
21
client_module/build/dist/usr/lib/systemd/system/beegfs-client.service
vendored
Normal file
21
client_module/build/dist/usr/lib/systemd/system/beegfs-client.service
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Start BeeGFS Client
|
||||
Requires=network-online.target
|
||||
# We disable the wants service, because it spams the log files
|
||||
#Wants=local-fs.target time-sync.target beegfs-mgmtd.service \
|
||||
#beegfs-meta.service beegfs-storage.service openib.service openibd.service rdma.service \
|
||||
#opensmd.service opensm.service nss-lookup.target nss-user-lookup.target slapd.service \
|
||||
#autofs.service ypbind.service nscd.service nslcd.service sshd.service
|
||||
After=network-online.target local-fs.target time-sync.target \
|
||||
beegfs-mgmtd.service beegfs-meta.service beegfs-storage.service openib.service openibd.service \
|
||||
rdma.service opensmd.service opensm.service nss-lookup.target nss-user-lookup.target \
|
||||
slapd.service autofs.service ypbind.service nscd.service nslcd.service sshd.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/opt/beegfs/sbin/beegfs-client start
|
||||
ExecStop=/opt/beegfs/sbin/beegfs-client stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
21
client_module/build/dist/usr/lib/systemd/system/beegfs-client@.service
vendored
Normal file
21
client_module/build/dist/usr/lib/systemd/system/beegfs-client@.service
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Start BeeGFS Client
|
||||
Requires=network-online.target
|
||||
# We disable the wants service, because it spams the log files
|
||||
#Wants=local-fs.target time-sync.target beegfs-mgmtd.service \
|
||||
#beegfs-meta.service beegfs-storage.service openib.service openibd.service rdma.service \
|
||||
#opensmd.service opensm.service nss-lookup.target nss-user-lookup.target slapd.service \
|
||||
#autofs.service ypbind.service nscd.service nslcd.service sshd.service
|
||||
After=network-online.target local-fs.target time-sync.target \
|
||||
beegfs-mgmtd.service beegfs-meta.service beegfs-storage.service openib.service openibd.service \
|
||||
rdma.service opensmd.service opensm.service nss-lookup.target nss-user-lookup.target \
|
||||
slapd.service autofs.service ypbind.service nscd.service nslcd.service sshd.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/opt/beegfs/sbin/beegfs-client start %I
|
||||
ExecStop=/opt/beegfs/sbin/beegfs-client stop %I
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user