Skip to content
Snippets Groups Projects
Commit 83cdf2f3 authored by Michael Davis's avatar Michael Davis
Browse files

Documents install tape server

parent 7db65f8b
No related branches found
No related tags found
No related merge requests found
......@@ -464,75 +464,107 @@ host and user, by connecting directly to the catalogue database.
\section{Install the Tape Server}
\label{install_cta_install_tape_server}
\subsection{Install the Tape Library}
If the CTA instance is not using real tape hardware, follow the directions in Appendix~\ref{install_mhvtl} to install the
mhVTL Virtual Tape Library.
Add the following lines to \texttt{/etc/cta/cta.conf}. Fill in OBJECTSTOREURL with the value defined in Section~\ref{install_cta_configure_objectstore}:
\subsection{Install the Remote Media Changer Daemon (\texttt{rmcd})}
The Remote Media Changer Daemon (\texttt{rmcd}) is a TCP/IP server which controls the robots in the tape libraries.
\texttt{rmcd} must run locally for security reasons: it only listens to the localhost network. It includes a device
driver for the drive and one for the library.
Install \texttt{rmcd}:
\begin{lstlisting}
taped BufferCount 10
general ObjectStoreURL OBJECTSTOREURL
# yum install -y castor-rmc-client castor-rmc-server initscripts
\end{lstlisting}
\begin{alertbox}
BufferCount specifies the size of the ObjectStore in blocks. But what is the size of a block?
The dependency on \texttt{initscripts} will be removed when \texttt{rmcd} is ported from \texttt{init.d} to
\texttt{systemd}.
\end{alertbox}
The configuration file \texttt{/etc/sysconfig/rmcd} should contain the following settings:
\begin{lstlisting}
DAEMON_COREFILE_LIMIT=unlimited
RUN_RMCD=yes
RMCD_OPTIONS=/dev/smc
\end{lstlisting}
Start \texttt{rmcd}:
\begin{lstlisting}
# systemctl start rmcd
\end{lstlisting}
Now the command \texttt{smc} can be used to load/unload tapes (instead of
\hyperref[install_mhvtl_virtual_tape_library_commands]{\texttt{mtx}}).
\subsection{tapeserverd configuration}
The tape drives can now be indicated to tapeserverd through the \texttt{/etc/castor/TPCONFIG} file:
\subsection{Configure the CTA Tape Server Daemon}
\begin{boxedverbatim}
Create \texttt{/etc/cta/cta.conf} and configure the number of buffers and the ObjectStore URL. The following example
configures 10 buffers of 5 Mb. (The buffer size in this case is the compile-time default, see values below). Replace
OBJECTSTOREURL with the value defined in Section~\ref{install_cta_configure_objectstore}):
\begin{lstlisting}
taped BufferCount 10
general ObjectStoreURL OBJECTSTOREURL
\end{lstlisting}
Define the tape drives in \texttt{/etc/cta/TPCONFIG}:
\begin{lstlisting}
VDSTK1 VLSTK /dev/nst0 smc0
VDSTK2 VLSTK /dev/nst1 smc1
\end{boxedverbatim}
The memory blocks size and number shall also be added in \texttt{/etc/castor/castor.conf}:
\begin{boxedverbatim}
TapeServer BufSize 5242880
TapeServer NbBufs 200
\end{boxedverbatim}
Finally we start the CTA version of \textbf{tapeserverd}:
\begin{boxedverbatim}
# service rmcd start
Starting rmcd: [ OK ]
# <Build directory>/tapeserver/castor/tape/tapeserver/daemon/tapeserverd
# tpstat
userid jid dgn stat dvn rl vsn vid
VLSTK down VDSTK1@devbox
VLSTK down VDSTK2@devbox
\end{boxedverbatim}
Using \texttt{tpstat} and \texttt{tpconfig}, one can put the drive up and see it attempt to schedule itself
in the logs (either \texttt{/var/log/messages} or \texttt{/var/log/castor/tapeserverd.log} depending on the
installation and leftovers from previous castor tape server.
The log typically look like (simplified) in a loop:
\begin{boxedverbatim}
MSG="ProcessForker handling a ProcessForker message" type="ForkDataTransfer" len="47"
MSG="ProcessForker handling ForkDataTransfer message" unitName="VDSTK1"
MSG="ProcessForker forked data-transfer session" pid="32453"
MSG="Closed command receiver socket" cmdSocket="7"
MSG="Data-transfer child-process started" unitName="VDSTK1"
MSG="Got process ID of the data-transfer session from the ProcessForker" pid="32453"
MSG="Child of ProcessForker instantiated a ZMQ context" contextAddr="0x17494b0"
MSG="ProcessForker child process terminated" terminatedPid="32453" WEXITSTATUS="0" WCOREDUMP="false" WIFCONTINUED="false"
MSG="ProcessForker notifying TapeDaemon of process exit" pid="32453" exitCode="0" payloadLen="6"
MSG="ProcessForkerConnectionHandler handling a message" type="ProcessExited" payloadLen="6"
MSG="ProcessForkerConnectionHandler handling ProcessExited message" pid="32453" exitCode="0"
MSG="Tape session finished"
\end{boxedverbatim}
\end{lstlisting}
Now start the Tape Server:
\begin{lstlisting}
# cta-taped
# cta listdrivestates
smc0 devbox.cern.ch VDSTK1 Down NoMount 0 1495195920 0 0 0.000000
smc1 devbox.cern.ch VDSTK2 Down NoMount 0 1495195920 0 0 0.000000
\end{lstlisting}
Log messages are sent to rsyslog. When \texttt{cta-taped} starts, it reports its configuration. This is set from
compile-time defaults, overwritten by any values set in \texttt{/etc/cta/cta.conf} (see above):
\begin{lstlisting}
# grep cta-taped /var/log/messages
TID="430" MSG="cta-taped started" version="0-0" foreground="0" logToStdout="0" logToFile="0" logFilePath="" configFileLocation="/etc/cta/cta.conf" helpRequested="0"
TID="430" MSG="Configuration entry" category="taped" key="LogMask" value="DEBUG" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="TpConfigPath" value="/etc/cta/TPCONFIG" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="BufferSize" value="5248000" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="BufferCount" value="10" source="/etc/cta/cta.conf:1"
TID="430" MSG="Configuration entry" category="taped" key="ArchiveFetchBytesFiles" maxBytes="80000000000" maxFiles="500" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="ArchiveFlushBytesFiles" maxBytes="32000000000" maxFiles="200" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="RetrieveFetchBytesFiles" maxBytes="80000000000" maxFiles="500" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="NbDiskThreads" value="10" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="WatchdogIdleSessionTimer" value="10" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="WatchdogMountMaxSecs" value="900" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="WatchdogNoBlockMoveMaxSecs" value="1800" source="Compile time default"
TID="430" MSG="Configuration entry" category="taped" key="WatchdogScheduleMaxSecs" value="60" source="Compile time default"
TID="430" MSG="Configuration entry" category="general" key="ObjectStoreURL" value="/tmp/jobStoreVFSAgmdey" source="/etc/cta/cta.conf:2"
TID="430" MSG="Configuration entry" category="general" key="FileCatalogConfigFile" value="/etc/cta/cta_catalogue_db.conf" source="Compile time default"
TID="430" MSG="Configuration entry" category="TPCONFIG Entry" unitName="VDSTK1" logicalLibrary="VLSTK" devFilename="/dev/nst0" librarySlot="smc0" source="/etc/cta/TPCONFIG:1"
TID="430" MSG="Configuration entry" category="TPCONFIG Entry" unitName="VDSTK2" logicalLibrary="VLSTK" devFilename="/dev/nst1" librarySlot="smc1" source="/etc/cta/TPCONFIG:2"
\end{lstlisting}
This is followed by the startup messages:
\begin{lstlisting}
TID="430" MSG="Set log mask" logMask="DEBUG"
TID="430" MSG="Set process capabilities" capabilities="= cap_setgid,cap_setuid+ep cap_sys_rawio+p"
TID="431" MSG="Got dumpable attribute of process" dumpable="true"
TID="431" MSG="Set process capabilities" capabilities="= cap_sys_rawio+p"
TID="431" MSG="Adding handler for subprocess" SubprocessName="signalHandler"
TID="431" MSG="Adding handler for subprocess" SubprocessName="drive:VDSTK1"
TID="431" MSG="Adding handler for subprocess" SubprocessName="drive:VDSTK2"
TID="431" MSG="Adding handler for subprocess" SubprocessName="garbageCollector"
TID="431" MSG="Subprocess handler requested forking" SubprocessName="drive:VDSTK1"
TID="431" MSG="Subprocess handler will fork" SubprocessName="drive:VDSTK1"
TID="431" MSG="Subprocess handler requested forking" SubprocessName="drive:VDSTK2"
TID="432" MSG="In child process. Running child." SubprocessName="drive:VDSTK1"
TID="431" MSG="Subprocess handler will fork" SubprocessName="drive:VDSTK2"
TID="431" MSG="Subprocess handler requested forking" SubprocessName="garbageCollector"
\end{lstlisting}
\section{Start the XRoot daemon with CTA Front End plugin}
\begin{alertbox}
Before starting the xroot server we need to change the VFS backend permissions again (because new files have been created with the \texttt{stage:st} user by the tapeserver daemon). Example:
\begin{verbatim}
$ chmod -R 0777 /tmp/jobStoreVFSOKJCjW
\end{verbatim}
\begin{lstlisting}
$ chmod -R 0777 /tmp/jobStoreVFSOKJCjW
\end{lstlisting}
\end{alertbox}
Start the XRoot daemon, specifying the name of the XRoot instance (\texttt{-n}), the name of the configuration file we
just created (\texttt{-c}), use IPv4 protocol (\texttt{-I v4}), run in the background (\texttt{-b}) and where to put the
log file (\texttt{-l})\footnote{For full documentation of command line options, see
......@@ -598,16 +630,6 @@ To trigger manually EOS workflows just use the following eos commands:
file workflow <filename> default delete
\end{verbatim}
\section{Rmcd configuration}
Rmcd is the Remote Media Changer daemon, a TCP/IP server (which you must run locally for security reasons: it only listens to the localhost network). Has a device driver for the drive and one for the library.
The file \texttt{/etc/sysconfig/rmcd} contains the following parameters:
\begin{lstlisting}
DAEMON_COREFILE_LIMIT=unlimited
RUN_RMCD=yes
RMCD_OPTIONS=/dev/smc
\end{lstlisting}
\section{Removing CTA}
To remove the CTA Front-end and associated packages:
......
......@@ -169,6 +169,7 @@ Data Transfer Element 1:Empty
\end{lstlisting}
\section{Virtual Tape Library Commands}
\label{install_mhvtl_virtual_tape_library_commands}
Look for the medium changer (mediumx):
\begin{lstlisting}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment