Skip to content
Snippets Groups Projects
Commit 7dc95c4b authored by Christoph Heidecker's avatar Christoph Heidecker Committed by root
Browse files

Adding initial configuration files, start scripts and git settings

parents
Branches
No related tags found
No related merge requests found
# ignore cache, tmp, xrootd and xrdbuild directory
/*
!/config
!/*.*
*.root
# Definition of variables
# #
set redirector = ekpsm01
set cachedir = /storage/sg/xrootd/cache
set XRDADMINPATH = /xrootd/tmp/proxy-manager
# Set pid and tmp files to above defined path
#
all.pidpath ${XRDADMINPATH}
all.adminpath ${XRDADMINPATH}
# Tell everyone who the manager is
#
all.manager ${redirector}:1213
# Use dynamic ports
#
xrd.port any
# The redirector and all cmsd’s export /data red-only with the stage option. The stage
# option requests that if the file isn’t found in the cluster the redirector should send
# the client to a PFC server with enough space to cache the file.
#
all.export / stage r/o
# BEGIN REDIRECTOR
# Configuration is different for the redirector, the server cmsd, and
# for the server xrootd. We break those out in the if-else-fi clauses.
#
#if ${redirector}
all.role manager
# Export with stage option - if the file isn’t found in the cluster the
# redirector sends the client to a PFC server with enough free space.
#
all.export / stage r/o
# Use static port
#
xrd.port 1094
# ENDE REDIRECTOR
## BEGIN SERVER
#
## Server’s cmsd configuration – all PFC’s are virtual data servers
##
##else if exec cmsd
#if exec cmsd
#
#all.role server
#
## Export with stage option - this tells manager cmsd we can pull files from the origin
##
#all.export / stage r/o
#
## The cmsd uses the standard oss plug-in to locate files in the cache.
## oss.localroot directive should be the same as for the server.
##
#oss.localroot ${cachedir}
#
#
## Server’s xrootd configuration – all PFC’s are virtual data servers
##
#else
#
#all.role server
#
## For xrootd, load the proxy plugin and the disk caching plugin.
##
#ofs.osslib /xrootd/xrootd/lib64/libXrdPss.so
#pss.cachelib /xrootd/xrootd/lib64/libXrdFileCache-4.so
#
## The server needs to write to disk, stage not relevant
##
#all.export / rw
#
## Tell the proxy where the data is coming from (arbitrary).
##
#pss.origin =
##pss.origin someserver.domain.org:1094
#
## Tell the PFC’s where the disk cache resides (arbitrary).
##
#oss.localroot ${cachedir}
#
## Tell the PFC’s available RAM
##
#pfc.ram 8g
#
## Tell the PFC's avaiable disk usage
##
#pfc.diskusage 0.45 0.50
#
#
##fi
#
## ENDE SERVER
# Definition of variables
# #
set redirector = localhost
set cachedir = /xrootd/cache
set XRDADMINPATH = /xrootd/tmp/proxy-server
# Set pid and tmp files to above defined path
#
all.pidpath ${XRDADMINPATH}
all.adminpath ${XRDADMINPATH}
# Tell everyone who the manager is
#
all.manager ${redirector}:1213
# Use dynamic ports
#
xrd.port any
# The redirector and all cmsd’s export /data red-only with the stage option. The stage
# option requests that if the file isn’t found in the cluster the redirector should send
# the client to a PFC server with enough space to cache the file.
#
#all.export / stage r/o
## BEGIN REDIRECTOR
#
## Configuration is different for the redirector, the server cmsd, and
## for the server xrootd. We break those out in the if-else-fi clauses.
##
##if ${redirector}
#all.role manager
#
## Export with stage option - if the file isn’t found in the cluster the
## redirector sends the client to a PFC server with enough free space.
##
#all.export / stage r/o
#
## Use static port
##
#xrd.port 1094
#
## ENDE REDIRECTOR
# BEGIN SERVER
# Server’s cmsd configuration – all PFC’s are virtual data servers
#
#else if exec cmsd
if exec cmsd
all.role server
# Export with stage option - this tells manager cmsd we can pull files from the origin
#
all.export / stage r/o
# The cmsd uses the standard oss plug-in to locate files in the cache.
# oss.localroot directive should be the same as for the server.
#
oss.localroot ${cachedir}
# Server’s xrootd configuration – all PFC’s are virtual data servers
#
else
all.role server
# For xrootd, load the proxy plugin and the disk caching plugin.
#
ofs.osslib /xrootd/xrootd/lib64/libXrdPss.so
pss.cachelib /xrootd/xrootd/lib64/libXrdFileCache-4.so
# The server needs to write to disk, stage not relevant
#
all.export / rw
# Tell the proxy where the data is coming from (arbitrary).
#
pss.origin =
#pss.origin someserver.domain.org:1094
# Tell the PFC’s where the disk cache resides (arbitrary).
#
oss.localroot ${cachedir}
# Tell the PFC’s available RAM
#
pfc.ram 8g
# Tell the PFC's avaiable disk usage
#
pfc.diskusage 0.45 0.50
fi
# ENDE SERVER
# Directory of xrootd installation
set XRDRUNDIR=/xrootd
# set log directory
set XRDLOGDIR=/xrootd/logs/proxy
# set directory for pid and tmp files
set XRDADMINPATH=/xrootd/tmp/proxy
# set name of xrootd instance
set XRDNAME=xrootd-proxy
# redirector host:
set xrdr = ekpsm01.ekp.kit.edu
# data node host:
set xrdd = ekpsm01.ekp.kit.edu
#set port of xrootd service
xrd.port 1094
#xrd.port any
#xrd.port any if cmsd
#set pid and tmp files to above defined path
all.pidpath /${XRDADMINPATH}
all.adminpath /${XRDADMINPATH}
xrootd.prep keep 12H logdir /${XRDLOGDIR}
# define redirector or data server roles
#all.role server
#all.role manager if man01.u.org man02.u.org
#all.role manager
#all.manager $(xrdr):3122
cms.delay servers 1 startup 10
# load proxy plugin
ofs.osslib /xrootd/xrootd/lib64/libXrdPss.so
# load caching plugin
pss.cachelib /xrootd/xrootd/lib64/libXrdFileCache-4.so
# set root directory of xrootd
oss.localroot /storage/sg/xrootd/cache
# security settings:
# specify allowed data servers (required, can be empty)
pss.origin =
# specify allowed client servers
# xrd.allow =
# specify an allowed destination that a client can use via a forwarding mode proxy
# pss.permit =
# specifying IP version usage {v4 | v6}
pss.inetmode v4
# Disk caching:
# Maximal RAM used for caching
pfc.ram 1G
# Maximal Disk space used for caching (fracLow fracHigh), fracLow triggers purging, fracHigh stops purging
pfc.diskusage 0.45 0.50
# memory caching:
# set size of each page in the cache to a multiple of 4k, enable optimization for structured file, specify the size of the cache in bytes
# pss.cache pagesize 1M sfiles on size 8G
# deactivated due to unexpected slow down
# specifying file paths for forwarding
all.export /xroot:/
all.export /root:/
#set timeout for transfers
xrd.timeout idle 10
# specify handling of file closing if read partitially (if on, waiting for further reading)
ofs.persist off
#!/bin/bash
#
# Environment script for XRootD caching services
# ----------------------------------------
# XRootD installation path
export XRD_PATH=/xrootd
# Adding libraries to enironment variable
export LD_LIBRARY_PATH=$XRD_PATH/xrootd/lib64:$LD_LIBRARY_PATH
export PATH=$XRD_PATH/xrootd/bin:$PATH
start.sh 0 → 100755
#!/bin/bash
#
# Start script for XRootD caching services
# ----------------------------------------
# Switching user to xrootd user
# XRootD installation path
export XRD_PATH=/xrootd
# Adding libraries to enironment variable
export LD_LIBRARY_PATH=$XRD_PATH/xrootd/lib64:$LD_LIBRARY_PATH
export PATH=$XRD_PATH/xrootd/bin:$PATH
# Jumping into XRootD installation folder
#cd $XRD_PATH/xrootd/bin
# Starting XRootD manager/redirector services
#./xrootd -n xrootd-manager -c $HOME/xrootd/configs/manager.cf -l=$HOME/xrootd/logs/xrootd-manager.log -k 10m -p 1096 -d 3 &
#./cmsd -n cmsd-manager -c $HOME/xrootd/configs/manager.cf -l=$HOME/xrootd/logs/cmsd-manager.log -k 10m -p 1097 -d 3 &
# Starting XRootD Forward Proxy services
#su xrootd -c 'xrootd -c $XRD_PATH/configs/proxy.cf -l=$XRD_PATH/logs/proxy/xrootd.log -k 100m &'
#su xrootd -c 'xrootd -n xrootd-proxy -c $XRD_PATH/configs/proxy.cf -l=$XRD_PATH/logs/proxy/xrootd.log -k 10m -d 3 -p 1094 &'
#su xrootd -c 'cmsd -n cmsd-proxy -c $XRD_PATH/configs/proxy.cf -l=$XRD_PATH/logs/cmsd.log -k 10m -d 3 &'
#su xrootd -c 'cmsd -n cmsd-proxy -c $XRD_PATH/configs/proxy.cf -l=$XRD_PATH/logs/cmsd.log -k 10m -d 3 -p 1095 &'
# Starting XRootD
#./xrootd -n xrootd-XrdProxyDefault -c $HOME/xrootd/configs/XrdProxyDefault.cf -l $HOME/xrootd/logs/xrootd-XrdProxyDefault.log -k hup -p 1094 -d 3 &
#./cmsd -n cmsd-XrdProxyDefault -c $HOME/xrootd/configs/XrdProxyDefault.cf -l $HOME/xrootd/logs/xrootd-XrdProxyDefault.log -k hup -p 1095 -d 3 &
# Starting XRootD proxy manager services
su xrootd -c 'xrootd -c $XRD_PATH/configs/proxy-manager.cf &'
#su xrootd -c 'xrootd -c $XRD_PATH/configs/proxy-manager.cf -l=$XRD_PATH/logs/proxy-manager/xrootd.log -k 100m &'
stop.sh 0 → 100755
#!/bin/bash
#
# Stop script for XRootD caching services
# ----------------------------------------
# Switching user to xrootd user
#su xrootd
# XRootD installation path
export XRD_PATH=/xrootd
# Adding libraries to enironment variable
export LD_LIBRARY_PATH=$XRD_PATH/xrootd/lib64:$LD_LIBRARY_PATH
export PATH=$XRD_PATH/xrootd/bin:$PATH
# Getting PIDs from tmp files
FILES=$XRD_PATH/tmp/*/*.pid
# Killing PIDs
for f in $FILES
do
echo "Processing $f file..."
# take action on each file. $f store current file name
pkill -F $f
done
# Cleaning tmp directory
rm $XRD_PATH/tmp/* -rf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment