Skip to content

Commit 269c61e

Browse files
author
Marian Zvada
committed
changed formating
1 parent e3dc105 commit 269c61e

1 file changed

Lines changed: 55 additions & 22 deletions

File tree

docs/ops/redirector.md

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
# Installing XRootD StashCache Federation Redirector
22

33
Use these instructions to install an XRootD StashCache Federation Redirector. These instructions assume that you have SL, CentOS, or RHEL 6.
4-
Redirector server recommendations
4+
5+
## Redirector server recommendations
56
The service is very lightweight depending on number of subscribers (caching proxies), though. Recommended would be use machine with 4GB of RAM and 2 cores. Load avg is practically close to zero, therefore 2 cores is sufficient with as much RAM as you can reasonably ask for. As far as disk goes, something reasonable like 500GB of local storage is good enough, and best if the server has a 10 Gbps NIC at least.
67

7-
You must have port 1094 and 1213 open to all traffic; otherwise the redirector will not work.
8-
In addition, we run separate xrootd server instance on redirector host for RSV tests which needs open port 2094
8+
You must have ==port== `1094` and `1213` open to all traffic; otherwise the redirector will not work.
9+
In addition (this is optional), we run separate xrootd server instance on redirector host for RSV tests which needs open port `2094`.
910

1011
## Installation using yum
1112
If you don't want to use yum, refer to http://xrootd.org/dload.html for other methods.
12-
Copy http://xrootd.org/binaries/xrootd-stable-slc6.repo to /etc/yum.repos.d
13-
Do: yum install xrootd and answer every question with y
14-
Configure the server for RSV tests
15-
Edit the configuration file (/etc/xrootd/xrootd-clustered-server.cfg) to look like this:
13+
14+
Use predefined OSG repo or copy `http://xrootd.org/binaries/xrootd-stable-slc6.repo` to `/etc/yum.repos.d`
15+
Do: `yum install xrootd` and answer every question with y
16+
17+
18+
## Configure the (local) server for RSV tests (optional)
19+
Edit the configuration file `/etc/xrootd/xrootd-clustered-server.cfg` to look like this:
20+
21+
```
1622
xrd.port 2094 if exec xrootd
1723
all.adminpath /var/spool/xrootd
1824
@@ -26,8 +32,12 @@ all.manager redirector.osgstorage.org+ 1213
2632
2733
For the RSV test purpose make sure the testing file is present on the file system:
2834
/stash/user/test.1M
29-
Configure the redirector for caches and origins
30-
1. Edit the configuration file (/etc/xrootd/xrootd-clustered.cfg) to look like this:
35+
```
36+
37+
## Configure the redirector for caches and origins
38+
39+
1. Edit the configuration file (`/etc/xrootd/xrootd-clustered.cfg`) to look as follows:
40+
```
3141
all.export /
3242
xrd.allow host *
3343
cms.allow host *
@@ -54,23 +64,46 @@ Configure the redirector for caches and origins
5464
# XRootD Stats - sends UDP packets
5565
xrd.report uct2-collectd.mwt2.org:9931
5666
xrootd.monitor all auth flush 30s window 5s fstat 60 lfn ops xfr 5 dest redir fstat info user uct2-collectd.mwt2.org:9930
67+
```
68+
5769
2. Change ownership of these directories:
58-
chown -R xrootd: /var/spool/xrootd
59-
chown -R xrootd: /var/log/xrootd
60-
chown -R xrootd: /stash
61-
3. Start the service: /etc/init.d/{xrootd,cmsd} start
62-
4. Set the service start when machine is rebooted: chkconfig --level 2345 {xrootd,cmsd} on
63-
5. Test that your instance works as expected, ideally would be setup origin server and subscribe into this redirector. Then, see the log files if origin server joined the Federation.
64-
Configure /etc/sysconfig/xrootd
65-
Assuming host runs both services "server and redirector" and the two configurations above are applied, make sure properly edit /etc/sysconfig/xrootd and add/edit these lines:
66-
XROOTD_DEFAULT_OPTIONS="-l /var/log/xrootd/xrootd.log -c /etc/xrootd/xrootd-clustered.cfg -k fifo"
67-
CMSD_DEFAULT_OPTIONS="-l /var/log/xrootd/cmsd.log -c /etc/xrootd/xrootd-clustered.cfg -k fifo”
68-
XROOTD_SERVER_OPTIONS="-l /var/log/xrootd/xrootd.log -c /etc/xrootd/xrootd-clustered-server.cfg -k fifo"
69-
CMSD_SERVER_OPTIONS="-l /var/log/xrootd/cmsd.log -c /etc/xrootd/xrootd-clustered-server.cfg -k fifo”
70+
```
71+
chown -R xrootd: /var/spool/xrootd
72+
chown -R xrootd: /var/log/xrootd
73+
chown -R xrootd: /stash
74+
```
75+
76+
3. Start the service: `/etc/init.d/{xrootd,cmsd} start`
77+
78+
4. Set the service start when machine is rebooted: `chkconfig --level 2345 {xrootd,cmsd} on`
79+
80+
5. Test that your instance works as expected, ideally would be setup origin server and subscribe into this redirector. Then, see the log files if origin server joined the Federation. Now, configure `/etc/sysconfig/xrootd`.
81+
Assuming host runs both ==server and redirector== and the two configurations above are applied, make sure properly edit /etc/sysconfig/xrootd and add/edit these lines:
82+
```
83+
XROOTD_DEFAULT_OPTIONS="-l /var/log/xrootd/xrootd.log -c /etc/xrootd/xrootd-clustered.cfg -k fifo"
84+
CMSD_DEFAULT_OPTIONS="-l /var/log/xrootd/cmsd.log -c /etc/xrootd/xrootd-clustered.cfg -k fifo”
85+
XROOTD_SERVER_OPTIONS="-l /var/log/xrootd/xrootd.log -c /etc/xrootd/xrootd-clustered-server.cfg -k fifo"
86+
CMSD_SERVER_OPTIONS="-l /var/log/xrootd/cmsd.log -c /etc/xrootd/xrootd-clustered-server.cfg -k fifo”
87+
...
88+
...
7089
XROOTD_INSTANCES="default server"
7190
CMSD_INSTANCES="default server”
91+
```
92+
If you don't choose server instance setup for RSV tests you can skip lines XROOTD_SERVER_OPTIONS and CMSD_SERVER_OPTIONS as well as ==server== in the _INSTANCES lines.
7293

94+
## Test if Origins subscribe to redirector
95+
There is command `xrdmapc` in the xrootd-server packages that you can use to check what Origins subscribe to your redirector:
96+
```
97+
$ xrdmapc --list all redirector.osgstorage.org:1094
98+
0**** redirector.grid.iu.edu:1094
99+
Srv redirector1.grid.iu.edu:2094
100+
Srv csiu.grid.iu.edu:1094
101+
Srv redirector2.grid.iu.edu:2094
102+
Srv stashcache.fnal.gov:1094
103+
Srv ceph-gridftp1.grid.uchicago.edu:1094
104+
Srv stash.osgconnect.net:1094
105+
```
73106

74-
## Useful links
107+
## Useful Project Links
75108
https://twiki.opensciencegrid.org/bin/view/SoftwareTeam/SW023_StashCacheDetails
76109
https://twiki.opensciencegrid.org/bin/view/SoftwareTeam/SW023_XrootdAcrossOsg

0 commit comments

Comments
 (0)