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

Adds CASTOR Tape Server Handbook to documentation index

parent 20787ba4
Branches
Tags
No related merge requests found
Showing
with 1 addition and 3899 deletions
......@@ -4,6 +4,7 @@
* [The CERN Tape Archive](cta.pdf)
* [CTA Administrators Guide](CTA_Admin.pdf)
* [CASTOR Tape Server Handbook](TapeServer.pdf)
## Design Documents
......
......@@ -45,12 +45,3 @@ add_subdirectory(daemon)
# .. and of course, the tests (last to use the variable definition)
add_subdirectory(test)
###########################################################################
# documentation
###########################################################################
#TODO
#IF (NOT DEFINED PackageOnly)
# INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseLATEX.cmake)
# add_subdirectory(Documentation)
#ENDIF (NOT DEFINED PackageOnly)
% -------
% Chapter
% -------
\chapter{Administrator's manual}
\section{User and capabilities}
Castor used to run as root, which is not the best safety policy. New version should be run by stage:st (even if still own by root),
because the first action will be to drop the root's privlegeves to move to stage:st
But accessing /dev/nst* for writing data requires to either be root (on SLC5) or to have the the capabilitie CAP\_SYS\_RAWIO set on.
Here the incriminated piece of code into the st driver :
\begin{table}[h]
\begin{lstlisting}
switch (cmd_in) {
case SCSI_IOCTL_GET_IDLUN:
case SCSI_IOCTL_GET_BUS_NUMBER:
break;
default:
if ((cmd_in == SG_IO ||
cmd_in == SCSI_IOCTL_SEND_COMMAND ||
cmd_in == CDROM_SEND_PACKET) &&
!capable(CAP_SYS_RAWIO))
i = -EPERM;
else
i = scsi_cmd_ioctl(STp->disk->queue, STp->disk,
file->f_mode, cmd_in, p);
if (i != -ENOTTY)
return i;
break;
}
\end{lstlisting}
\end{table}
The cleanest way to do it seems to allowed the one we need on the main-binary and the acquired them in the forked process
\section{Pending questions}
\begin{itemize}
\item{}Is the option \verb#ST_BUFFER_WRITES# from \verb#castor.conf# still used?
\item{}Why does\verb#/etc/castor/TPCONFIG# have a tape density column? In order to ject incompatibel tapes from being mounted.
\end{itemize}
ADD_LATEX_DOCUMENT(
TapeServer.tex
INPUTS ProgrammersManual.tex AdministratorsManual.tex
IMAGE_DIRS images
NO_DEFAULT USE_INDEX MANGLE_TARGET_NAMES)
INSTALL(FILES TapeServer.pdf
DESTINATION /usr/share/doc/tape-server/)
This diff is collapsed.
HOW TO BUILD THE TAPE SERVER DOCUMENTATION
==========================================
Type the following in order to build the pdf file containing the tape server
documentation:
pdflatex TapeServer.tex
The above line should generate the following file:
TapeServer.pdf
File deleted
\documentclass{castordoc}
%\usepackage{url}
% For clickable links and good readability using dvipdf
\usepackage{times}
\usepackage{color}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,filecolor=blue]{hyperref}
\usepackage{courier}
\usepackage{listings}
\usepackage{float}
\usepackage{enumitem}
\usepackage[table]{xcolor}
\lstset{
language=C++,
captionpos=b,
tabsize=8,
frame=lines,
keywordstyle=\color{blue},
numbers=left,
numberstyle=\tiny,
numbersep=5pt,
breaklines=true,
showstringspaces=false,
basicstyle=\small\ttfamily
}
\definecolor{webred}{rgb}{0.5,0,0}
\usepackage{makeidx}
\makeindex
\usepackage{tabularx}
\usepackage{pgf}
\usepackage{tikz}
\usetikzlibrary{arrows,shadows} % for pgf-umlsd
\usepackage[underline=true,rounded corners=false]{pgf-umlsd}
\begin{document}
\doctyp{CAStor Tape Server Documentation}
\dociss{1}
\docrev{0}
\docref{http://www.cern.ch/castor}
\doccre{Wed July 3\textsuperscript{rd}, 2013}
\docmod{\today}
\title{Tape Server's Handbook}
\author{CAStor development team}
\maketitle
\tableofcontents
\input{ProgrammersManual}
\input{AdministratorsManual}
\end{document}
%
% castordoc.cls
%
% LaTeX style for castor documentation
%
% written by sebastien.ponce@cern.ch, inspired from
% lhcbnote.cls (See http://lhcb-comp.web.cern.ch/lhcb-comp/Support/LateX/lhcbnote.tex)
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{castordoc}[]
\LoadClass[twoside,a4paper]{report}
\RequirePackage{calc}
\RequirePackage{array}
\RequirePackage{a4wide}
\RequirePackage{fancyhdr}
\RequirePackage{graphicx}
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{fancy}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@docref{\mbox{-}}
\def\@docrev{\mbox{-}}
\def\@dociss{\mbox{-}}
\def\@docmod{\mbox{-}}
\def\@doccre{\mbox{-}}
\def\@doctyp{\mbox{}}
\newcommand{\docref}[1]{\def\@docref{\mbox{#1}}}
\newcommand{\docrev}[1]{\def\@docrev{\mbox{#1}}}
\newcommand{\dociss}[1]{\def\@dociss{\mbox{#1}}}
\newcommand{\docmod}[1]{\def\@docmod{\mbox{#1}}}
\newcommand{\doccre}[1]{\def\@doccre{\mbox{#1}}}
\newcommand{\doctyp}[1]{\def\@doctyp{\mbox{#1}}}
\setlength{\voffset}{-1in}
\setlength{\headheight}{2cm}
\renewcommand{\footrulewidth}{0.4pt}
\addtolength{\textheight}{1cm}
%%
\def\ps@myheadings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
\def\@evenhead{\thepage\hfil\slshape\leftmark}%
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
\let\@mkboth\@gobbletwo
\let\chaptermark\@gobble
\let\sectionmark\@gobble
}
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\let \footnote \thanks
\includegraphics[width=2cm]{images/CERNLogo} \hfill
\includegraphics[width=4cm]{images/CASTOR_logo_250}
\null\vfil
\vskip 60\p@
\begin{center}%
{\Huge \@title \par}%
\vskip 3em%
{\large
\lineskip .75em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1.5em%
{\large \@date \par}% % Set date in \large size.
\end{center}\par
\@thanks
\vfil\null
{\Large \@doctyp}
\begin{tabular}[b]{ll}
Issue : & \@dociss \\
Revision : & \@docrev \\
Reference : & \@docref \\
Created : & \@doccre \\
Last modified : & \@docmod \\
\end{tabular}
\end{titlepage}%
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax}
\else
\renewcommand\maketitle{\par
\begingroup
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hb@xtt@1.8em{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\fi
\else
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\fi
\thispagestyle{plain}\@thanks
\endgroup
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax}
\def\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\HUGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
{\large \@date}%
\end{center}%
\par
\vskip 1.5em}
\fi
\pagestyle{fancy}
\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{\marginparwidth}
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\rhead[\fancyplain{}{\bfseries\scriptsize\mbox{%
\begin{tabular}{@{}l@{}}
Title: \@title\\%
\@doctyp\\%
Issue: \@dociss\\%
\leftmark\end{tabular}}}]
{\fancyplain{}{\bfseries\scriptsize\mbox{%
\begin{tabular}{@{}l@{}}
\setlength{\tabcolsep}{0pt}%
Title: \@title\\%
\@doctyp\\%
Issue: \@dociss\\%
\leftmark\end{tabular}}}}
\lhead[\fancyplain{}{\bfseries\scriptsize\mbox{%
\begin{tabular}{@{}lr@{}}%
Reference: & \@docref\\%
Revision: & \@docrev\\%
Last modified: & \@docmod\\
&\end{tabular}}}]
{\fancyplain{}{\bfseries\scriptsize\mbox{%
\begin{tabular}{@{}lr@{}}%
Reference: & \@docref\\%
Revision: & \@docrev\\%
Last modified: & \@docmod\\
&\end{tabular}}}}
\lfoot[\fancyplain{}{\bfseries\scriptsize page \thepage}]{}
\rfoot[]{\fancyplain{}{\bfseries\scriptsize page \thepage}}
\cfoot{}
\newenvironment{CompactList}
{\begin{list}{}{
\setlength{\leftmargin}{0.5cm}
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\setlength{\topsep}{0pt}
\renewcommand{\makelabel}{}}}
{\end{list}}
\newenvironment{CompactItemize}
{
\begin{itemize}
\setlength{\itemsep}{-3pt}
\setlength{\parsep}{0pt}
\setlength{\topsep}{0pt}
\setlength{\partopsep}{0pt}
}
{\end{itemize}}
\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}
\newlength{\tmplength}
\newenvironment{TabularC}[1]
{
\setlength{\tmplength}
{\linewidth/(#1)-\tabcolsep*2-\arrayrulewidth*(#1+1)/(#1)}
\par\begin{tabular*}{\linewidth}
{*{#1}{|>{\PBS\raggedright\hspace{0pt}}p{\the\tmplength}}|}
}
{\end{tabular*}\par}
\newcommand{\entrylabel}[1]{
{\parbox[b]{\labelwidth-4pt}{\makebox[0pt][l]{\textbf{#1}}\\}}}
\newenvironment{Desc}
{\begin{list}{}
{
\settowidth{\labelwidth}{40pt}
\setlength{\leftmargin}{\labelwidth}
\setlength{\parsep}{0pt}
\setlength{\itemsep}{-4pt}
\renewcommand{\makelabel}{\entrylabel}
}
}
{\end{list}}
\newenvironment{Indent}
{\begin{list}{}{\setlength{\leftmargin}{0.5cm}}
\item[]\ignorespaces}
{\unskip\end{list}}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.2cm}
\addtocounter{secnumdepth}{2}
\sloppy
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment