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

Documents installing mhVTL

parent 49aaa23b
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -89,27 +89,28 @@ Slot 8:
\subsection{\texttt{udev} rules}
Create \texttt{/etc/udev/rules.d/00-castor-tape.rules} and add a rule to create the SCSI media changer device:
Create \texttt{/etc/udev/rules.d/00-cta.rules}. Add rules to create symbolic links to the first tape drive and the SCSI
media changer device (IBM tape library specific):
\begin{lstlisting}
KERNEL=="sg*", BUS=="scsi", SYSFS{type}=="8", SYMLINK:="smc"
KERNEL=="sg*", MODE:="0666", GROUP:="disk"
# Create symlink /dev/tape pointing to the (first) tape drive
SUBSYSTEM=="scsi_tape", KERNEL=="nst0", SYMLINK:="tape"
# Create symlink /dev/smc pointing to the SCSI media changer
SUBSYSTEM=="scsi_generic", KERNEL=="sg*", ATTRS{type}=="8", SYMLINK:="smc"
\end{lstlisting}
Also create \texttt{/etc/udev/rules.d/99-tape.rules} to set the permissions for the \texttt{st} group. This group is
created automatically by the castor RPMs:
Also add rules for permissions for the SCSI devices. This example sets global read/write permissions to all devices;
in production, you should configure more nuanced rules based on the \texttt{st} group. This group is created
automatically by the castor RPMs:
\begin{lstlisting}
# Udev rules setting the permissions on the tape device files for
# CASTOR's tapeserverd operations.
KERNEL=="nst*", GROUP="st"
# Set the permissions and group of the tape devices
KERNEL=="nst*", MODE:="0666"
KERNEL=="st*", MODE:="0666"
KERNEL=="sg*", MODE:="0666"
\end{lstlisting}
\begin{alertbox}
When I tried this in Docker, it didn't work. I didn't spend any time figuring out why, instead I just created the
symbolic link manually:
To apply the rules without rebooting:
\begin{lstlisting}
# ln -s /dev/sg3 /dev/smc
# sudo udevadm trigger
\end{lstlisting}
\end{alertbox}
\section{Start mhVTL}
......@@ -121,7 +122,7 @@ The service requires the mhVTL kernel module \texttt{mhvtl.ko}, which should be
After starting the mhVTL daemon, the files for the virtual tapes will be created automatically:
\begin{lstlisting}
# /bin/ls -lRF /opt/mhvtl/
# ls -lRF /opt/mhvtl/
/opt/mhvtl/:
total 0
drwxrwx---. 7 vtl vtl 86 May 15 09:58 10/
......@@ -189,54 +190,28 @@ Check the status of the drive:
Rewind the tape:
\begin{lstlisting}
# mt -f /dev/nst0 rewind
# mt -f /dev/nst0 status
\end{lstlisting}
Read VOL1 label (80 byte block):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read HDR1 label (80 byte block):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read HDR2 label (80 byte block):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read UHL1 label (80 byte block):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read end of tape file (0 records out):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read first block of user's file (256KiB):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read the rest of the user's file if there is more.
Read end of tape file (0 records out):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read EOF1 label (80 byte block):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read EOF2 label (80 byte block):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read UTL1 label (80 byte block):
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Read end of tape file (0 records out):
Read the first block from the tape:
\begin{lstlisting}
# dd if=/dev/nst0 bs=262144 count=1
\end{lstlisting}
Successively repeating the above command will read out subsequent blocks from the tape in the following format:
\begin{itemize}
\item VOL1 label (80 byte block)
\item HDR1 label (80 byte block)
\item HDR2 label (80 byte block)
\item UHL1 label (80 byte block)
\item End of tape file (0 records out)
\item First block of user's file (256 KiB)
\item Second block of user's file (256 KiB)
\item \ldots
\item Last block of user's file ($\leq$ 256 KiB)
\item End of tape file (0 records out)
\item EOF1 label (80 byte block)
\item EOF2 label (80 byte block)
\item UTL1 label (80 byte block)
\item End of tape file (0 records out)
\end{itemize}
Rewind the tape:
\begin{lstlisting}
# mt -f /dev/nst0 rewind
......
No preview for this file type
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