openafs/doc/html/AdminReference/auarf018.htm
Derrick Brashear d7da1acc31 initial-html-documentation-20010606
pull in all documentation from IBM
2001-06-06 19:09:07 +00:00

566 lines
28 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
<HTML><HEAD>
<TITLE>Administration Reference</TITLE>
<!-- Begin Header Records ========================================== -->
<!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID -->
<!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30 -->
<META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
<META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
<META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
</HEAD><BODY>
<!-- (C) IBM Corporation 2000. All Rights Reserved -->
<BODY bgcolor="ffffff">
<!-- End Header Records ============================================ -->
<A NAME="Top_Of_Page"></A>
<H1>Administration Reference</H1>
<HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf017.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf019.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P>
<P>
<H2><A NAME="HDRCFG" HREF="auarf002.htm#ToC_16">CFG_<I>device_name</I></A></H2>
<P><STRONG>Purpose</STRONG>
<A NAME="IDX3900"></A>
<A NAME="IDX3901"></A>
<A NAME="IDX3902"></A>
<A NAME="IDX3903"></A>
<A NAME="IDX3904"></A>
<P>Defines Tape Coordinator configuration instructions for automated tape
devices
<P><STRONG>Description</STRONG>
<P>The <B>CFG_</B><VAR>device_name</VAR> file includes instructions that
configure a Tape Coordinator for use with automated backup devices such as
tape stackers and jukeboxes, enable the Tape Coordinator to dump and restore
data to a <I>backup data file</I> on a local disk device, and enable
greater automation of other aspects of the backup process.
<P>There is a separate configuration file for each tape device or backup data
file. Creating the file is optional, and unnecessary if none of the
instructions it can include pertain to a given tape device. The
ASCII-format file must reside in the <B>/usr/afs/backup</B> directory on
the Tape Coordinator machine if it exists.
<P>The <B>CFG_</B><VAR>device_name</VAR> file does not replace the
<B>/usr/afs/backup/tapeconfig</B> file, a single copy of which still must
exist on every Tape Coordinator machine.
<P>To enable the Tape Coordinator to locate the configuration file, construct
the variable part of the filename, <VAR>device_name</VAR>, as follows:
<UL>
<P><LI>For a tape device, strip off the initial <B>/dev/</B> string from the
device name, and replace any other slashes in the name with
underscores. For example, <B>CFG_rmt_4m</B> is the appropriate
filename for a device called <B>/dev/rmt/4m</B>.
<P><LI>For a backup data file, strip off the initial slash (/) and replace any
other slashes in the name with underscores. For example,
<B>CFG_var_tmp_FILE</B> is the appropriate filename for a backup data file
called <B>/var/tmp/FILE</B>.
</UL>
<P>The <B>CFG_</B><VAR>device_name</VAR> file lists one or more of the
following instructions, each on its own line. All are optional, and
they can appear in any order. A more detailed description of each
instruction follows the list:
<DL>
<P><DT><B>ASK
</B><DD>Controls whether the Tape Coordinator prompts for guidance when it
encounters error conditions
<P><DT><B>AUTOQUERY
</B><DD>Controls whether the Tape Coordinator prompts for the first tape
<P><DT><B>BUFFERSIZE
</B><DD>Sets the size of the memory buffer the Tape Coordinator uses when
transferring data
<P><DT><B>FILE
</B><DD>Controls whether the dump is written to a tape device or a file
<P><DT><B>MOUNT
</B><DD>Identifies the file that contains routines for inserting tapes into the
device's drive
<P><DT><B>NAME_CHECK
</B><DD>Controls whether the Tape Coordinator verifies that a tape's AFS tape
name matches the dump being written
<P><DT><B>UNMOUNT
</B><DD>Identifies the file that contains routines for removing tapes from the
device's drive
</DL>
<A NAME="IDX3905"></A>
<P><B>The ASK Instruction</B>
<P>The <B>ASK</B> instruction takes a boolean value as its argument, in
the following format:
<PRE> ASK {<B>YES</B> | <B>NO</B>}
</PRE>
<P>When the value is <B>YES</B>, the Tape Coordinator generates a prompt
in its window, requesting a response to the error cases described in the
following list. This is the default behavior if the ASK instruction
does not appear in the <B>CFG_</B><VAR>device_name</VAR> file.
<P>When the value is <B>NO</B>, the Tape Coordinator does not prompt in
error cases, but instead uses the automatic default responses described in the
following list. The Tape Coordinator also logs the error in the
<B>TE_</B><VAR>device_name</VAR> file. Suppressing the prompts
enables the Tape Coordinator to run unattended, though it still prompts for
insertion of tapes unless the <B>MOUNT</B> instruction is used.
<P>The error cases controlled by this instruction are the following:
<UL>
<P><LI>The Backup System is unable to dump a volume while running the <B>backup
dump</B> command. With a <B>YES</B> value, the Tape Coordinator
prompts to offer three choices: try to dump the volume again
immediately, omit the volume from the dump but continue the operation, or
terminate the operation. With a <B>NO</B> value, the Tape
Coordinator omits the volume from the dump and continues the operation.
<P><LI>The Backup System is unable to restore a volume while running the
<B>backup diskrestore</B>, <B>backup volrestore</B>, or <B>backup
volsetrestore</B> command. With a <B>YES</B> value, the Tape
Coordinator prompts to offer two choices: omit the volume and continue
restoring the other volumes, or terminate the operation. With a
<B>NO</B> value, it continues the operation without prompting, omitting
the problematic volume but restoring the remaining ones.
<P><LI>The Backup System cannot determine if the dump set includes any more
tapes, while running the <B>backup scantape</B> command (the reference
page for that command discusses possible reasons for this problem).
With a <B>YES</B> value, the Tape Coordinator prompts to ask if there are
more tapes to scan. With a <B>NO</B> value, it proceeds as though
there are more tapes and invokes the routine named by the <B>MOUNT</B>
instruction in the configuration file, or prompts the operator to insert the
next tape.
<P><LI>The Backup System determines that the tape contains an unexpired dump
while running the <B>backup labeltape</B> command. With a
<B>YES</B> value, the Tape Coordinator prompts to offer two choices:
continue or terminate the labeling operation. With a <B>NO</B>
value, it terminates the operation without relabeling the tape.
</UL>
<A NAME="IDX3906"></A>
<P><B>The AUTOQUERY Instruction</B>
<P>The <B>AUTOQUERY</B> instruction takes a boolean value as its argument,
in the following format:
<PRE> AUTOQUERY {<B>YES</B> | <B>NO</B>}
</PRE>
<P>When the value is <B>YES</B>, the Tape Coordinator checks for the
<B>MOUNT</B> instruction in the configuration file when it needs to read
the first tape involved in an operation. As described for that
instruction, it then either prompts for the tape or invokes the specified
routine to mount the tape. This is the default behavior if the
<B>AUTOQUERY</B> instruction does not appear in the configuration
file.
<P>When the value is <B>NO</B>, the Tape Coordinator assumes that the
first tape required for an operation is already in the drive. It does
not prompt the operator or invoke the <B>MOUNT</B> routine unless there is
an error in accessing the first tape. This setting is equivalent in
effect to including the <B>-noautoquery</B> flag to the <B>butc</B>
command.
<P>Note that the setting of the <B>AUTOQUERY</B> instruction controls the
Tape Coordinator's behavior only with respect to the first tape required
for an operation. For subsequent tapes, the Tape Coordinator always
checks for the <B>MOUNT</B> instruction. It also refers to the
<B>MOUNT</B> instruction if it encounters an error while attempting to
access the first tape.
<A NAME="IDX3907"></A>
<P><B>The BUFFERSIZE Instruction</B>
<P>The <B>BUFFERSIZE</B> instruction takes an integer value, and
optionally units, in the following format:
<PRE> BUFFERSIZE <VAR>size</VAR>[{<B>k</B> | <B>K</B> | <B>m</B> | <B>M</B> | <B>g</B> | <B>G</B>}]
</PRE>
<P>where<VAR> size</VAR> specifies the amount of memory the Tape Coordinator
allocates to use as a buffer during both dump and restore operations.
The default unit is bytes, but use <B>k</B> or <B>K</B> to specify
kilobytes, <B>m</B> or <B>M</B> for megabytes, and <B>g</B> or
<B>G</B> for gigabytes. There is no space between the
<VAR>size</VAR>value and the units letter.
<P>By default, the Tape Coordinator uses a 16 KB buffer during dump
operations. As it receives volume data from the Volume Server, the Tape
Coordinator gathers 16 KB of data in the buffer before transferring the entire
16 KB to the tape device or backup data file. Similarly, during a
restore operation the Tape Coordinator by default buffers 32 KB of data from
the tape device or backup data file before transferring the entire 32 KB to
the Volume Server for restoration into the file system. Buffering makes
the volume of data flowing to and from a tape device more even and so promotes
tape streaming, which is the most efficient way for a tape device to
operate.
<P>In a normal network configuration, the default buffer sizes are usually
large enough to promote tape streaming. If the network between the Tape
Coordinator machine and file server machines is slow, it can help to increase
the buffer size.
<A NAME="IDX3908"></A>
<P><B>The FILE Instruction</B>
<P>The <B>FILE</B> instruction takes a boolean value as its argument, in
the following format:
<PRE> FILE {<B>NO</B> | <B>YES</B>}
</PRE>
<P>When the value is <B>NO</B>, the Tape Coordinator writes to a tape
device during a dump operation and reads from one during a restore
operation. This is the default behavior if the <B>FILE</B>
instruction does not appear in the configuration file.
<P>When the value is <B>YES</B>, the Tape Coordinator writes volume data
to a backup data file on the local disk during a dump operation and reads
volume data from a file during a restore operation. If the file does
not exist when the Tape Coordinator attempts to access it to write a dump, the
Tape Coordinator creates it. For a restore operation to succeed, the
file must exist and contain volume data previously written to it by a
<B>backup dump</B> operation.
<P>When the value is <B>YES</B>, the backup data file's complete
pathname must appear (instead of a tape drive device name) in the third field
of the corresponding port offset entry in the local
<B>/usr/afs/backup/tapeconfig</B> file. If the field instead refers
to a tape device, dump operations appear to succeed but are
inoperative. It is not possible to restore data that was accidently
dumped to a tape device while the <B>FILE</B> instruction was set to
<B>YES</B>. (In the same way, if the <B>FILE</B> instruction is
set to <B>NO</B>, the <B>tapeconfig</B> entry must refer to an actual
tape device.)
<P>Rather than put an actual file pathname in the third field of the
<B>tapeconfig</B> file, however, the recommended configuration is to
create a symbolic link in the <B>/dev</B> directory that points to the
actual file pathname, and record the symbolic link in this field. This
configuration has a couple of advantages:
<UL>
<P><LI>It makes the <VAR>device_name</VAR> portion of the
<B>CFG_</B><VAR>device_name</VAR>, <B>TE_</B><VAR>device_name</VAR>, and
<B>TL_</B><VAR>device_name</VAR> names as short as possible. Because
the symbolic link is in the <B>/dev</B> directory as though it were a tape
device, the device configuration file's name is constructed by stripping
off the entire <B>/dev/</B> prefix, instead of just the initial
slash. If, for example, the symbolic link is called
<B>/dev/FILE</B>, the device configuration file name is
<B>CFG_FILE</B>, whereas if the actual pathname <B>/var/tmp/FILE</B>
appears in the <B>tapeconfig</B> file, the file's name must be
<B>CFG_var_tmp_FILE</B>.
<P><LI>It provides for a more graceful, and potentially automated, recovery if
the Tape Coordinator cannot write a complete dump into the backup data file
(because the partition housing the backup data file becomes full, for
example). The Tape Coordinator's reaction to this problem is to
invoke the <B>MOUNT</B> script, or to prompt the operator if the
<B>MOUNT</B> instruction does not appear in the configuration file.
<UL>
<P><LI>If there is a <B>MOUNT</B> routine, the operator can prepare for this
situation by adding a subroutine that changes the symbolic link to point to
another backup data file on a partition where there is space available.
<P><LI>If there is no <B>MOUNT</B> instruction, the prompt enables the
operator manually to change the symbolic link to point to another backup data
file, then press &lt;<B>Return</B>> to signal that the Tape Coordinator
can continue the operation.
</UL>
</UL>
<P>If the third field in the <B>tapeconfig</B> file names the actual file,
there is no way to recover from exhausting the space on the partition that
houses the backup data file. It is not possible to change the
<B>tapeconfig</B> file in the middle of an operation.
<P>When writing to a backup data file, the Tape Coordinator writes data at 16
KB offsets. If a given block of data (such as the marker that signals
the beginning or end of a volume) does not fill the entire 16 KB, the Tape
Coordinator still skips to the next offset before writing the next
block. In the output of a <B>backup dumpinfo</B> command issued
with the <B>-id</B> option, the value in the <TT>Pos</TT> column is the
ordinal of the 16-KB offset at which the volume data begins, and so is not
generally only one higher than the position number on the previous line, as it
is for dumps to tape.
<A NAME="IDX3909"></A>
<P><B>The MOUNT Instruction</B>
<P>The <B>MOUNT</B> instruction takes a pathname as its argument, in the
following format:
<PRE>
MOUNT <VAR>filename</VAR>
</PRE>
<P>The referenced executable file must reside on the local disk and contain a
shell script or program that directs an automated tape device, such as a
jukebox or stacker, to mount a tape (insert it into the tape reader).
The operator must write the routine to invoke the mount command specified by
the device's manufacturer; AFS does not include any scripts,
although an example appears in the following <B>Examples</B>
section. The script or program inherits the Tape Coordinator's AFS
authentication status.
<P>When the Tape Coordinator needs to mount a tape, it checks the
configuration file for a <B>MOUNT</B> instruction. If there is no
<B>MOUNT</B> instruction, the Tape Coordinator prompts the operator to
insert a tape before it attempts to open the tape device. If there is a
<B>MOUNT</B> instruction, the Tape Coordinator executes the routine in the
referenced file. The routine invoked by the <B>MOUNT</B>
instruction inherits the local identity (UNIX UID) and AFS tokens of the
<B>butc</B> command's issuer.
<P>There is an exception to this sequence: if the <B>AUTOQUERY
NO</B> instruction appears in the configuration file, or the
<B>-noautoquery</B> flag was included on the <B>butc</B> command, then
the Tape Coordinator assumes that the operator has already inserted the first
tape needed for a given operation. It attempts to read the tape
immediately, and only checks for the <B>MOUNT</B> instruction or prompts
the operator if the tape is missing or is not the required one.
<P>When the Tape Coordinator invokes the routine indicated by the
<B>MOUNT</B> instruction, it passes the following parameters to the
routine in the indicated order:
<OL TYPE=1>
<P><LI>The tape device or backup data file's pathname, as recorded in the
<B>/usr/afs/backup/tapeconfig</B> file.
<P><LI>The tape operation, which (except for the exceptions noted in the
following list) matches the <B>backup</B> command operation code used to
initiate the operation:
<UL>
<P><LI><B>appenddump</B> (when a <B>backup dump</B> command includes the
<B>-append</B> flag)
<P><LI><B>dump</B> (when a <B>backup dump</B> command does not include
the <B>-append</B> flag)
<P><LI><B>labeltape</B>
<P><LI><B>readlabel</B>
<P><LI><B>restore</B> (for a <B>backup diskrestore</B>, <B>backup
volrestore</B>, or <B>backup volsetrestore</B> command)
<P><LI><B>restoredb</B>
<P><LI><B>savedb</B>
<P><LI><B>scantape</B>
</UL>
<P><LI>The number of times the Tape Coordinator has attempted to open the tape
device or backup data file. If the open attempt returns an error, the
Tape Coordinator increments this value by one and again invokes the
<B>MOUNT</B> instruction.
<P><LI>The tape name. For some operations, the Tape Coordinator passes the
string <TT>none</TT>, because it does not know the tape name (when running
the <B>backup scantape</B> or <B>backup readlabel</B>, for example),
or because the tape does not necessarily have a name (when running the
<B>backup labeltape</B> command, for example).
<P><LI>The tape ID recorded in the Backup Database. As with the tape name,
the Backup System passes the string <TT>none</TT> for operations where it
does not know the tape ID or the tape does not necessarily have an ID.
</OL>
<P>The routine invoked by the <B>MOUNT</B> instruction must return an exit
code to the Tape Coordinator:
<UL>
<P><LI>Code <B>0</B> (zero) indicates that the routine successfully mounted
the tape. The Tape Coordinator continues the backup operation.
If the routine invoked by the <B>MOUNT</B> instruction does not return
this exit code, the Tape Coordinator never calls the <B>UNMOUNT</B>
instruction.
<P><LI>Code <B>1</B> (one) indicates that the routine failed to mount the
tape. The Tape Coordinator terminates the operation.
<P><LI>Any other code indicates that the routine was not able to access the
correct tape. The Tape Coordinator prompts the operator to insert the
correct tape.
</UL>
<P>If the <B>backup</B> command was issued in interactive mode and the
operator issues the <B>(backup) kill</B> command while the
<B>MOUNT</B> routine is running, the Tape Coordinator passes the
termination signal to the routine; the entire operation
terminates.
<A NAME="IDX3910"></A>
<P><B>The NAME_CHECK Instruction</B>
<P>The <B>NAME_CHECK</B> instruction takes a boolean value as its
argument, in the following format:
<PRE> NAME_CHECK {<B>YES</B> | <B>NO</B>}
</PRE>
<P>When the value is <B>YES</B> and the tape does not have a permanent
name, the Tape Coordinator checks the AFS tape name when dumping a volume in
response to the <B>backup dump</B> command. The AFS tape name must
be <TT>&lt;NULL></TT> or match the tape name that the <B>backup dump</B>
operation assigns based on the volume set and dump level names. This is
the default behavior if the <B>NAME_CHECK</B> instruction does not appear
in the configuration file.
<P>When the value is <B>NO</B>, the Tape Coordinator does not check the
AFS tape name before writing to the tape.
<P>The Tape Coordinator always checks that all dumps on the tape are expired,
and refuses to write to a tape that contains unexpired dumps.
<A NAME="IDX3911"></A>
<P><B>The UNMOUNT Instruction</B>
<P>The <B>UNMOUNT</B> instruction takes a pathname as its argument, in the
following format:
<PRE> UNMOUNT <VAR>filename</VAR>
</PRE>
<P>The referenced executable file must reside on the local disk and contain a
shell script or program that directs an automated tape device, such as a
jukebox or stacker, to unmount a tape (remove it from the tape reader).
The operator must write the routine to invoke the unmount command specified by
the device's manufacturer; AFS does not include any scripts,
although an example appears in the following <B>Examples</B>
section. The script or program inherits the Tape Coordinator's AFS
authentication status.
<P>After closing a tape device, the Tape Coordinator checks the configuration
file for an <B>UNMOUNT</B> instruction, whether or not the
<B>close</B> operation succeeds. If there is no <B>UNMOUNT</B>
instruction, the Tape Coordinator takes no action, in which case the operator
must take the action necessary to remove the current tape from the drive
before another can be inserted. If there is an <B>UNMOUNT</B>
instruction, the Tape Coordinator executes the referenced file. It
invokes the routine only once, passing in the following parameters:
<UL>
<P><LI>The tape device pathname (as specified in the
<B>/usr/afs/backup/tapeconfig</B> file)
<P><LI>The tape operation (always <B>unmount</B>)
</UL>
<P><STRONG>Privilege Required</STRONG>
<P>The file is protected by UNIX mode bits. Creating the file requires
the <B>w</B> (<B>write</B>) and <B>x</B> (<B>execute</B>)
permissions on the <B>/usr/afs/backup</B> directory. Editing the
file requires the <B>w</B> (<B>write</B>) permission on the
file.
<P><STRONG>Examples</STRONG>
<P>The following example configuration files demonstrate one way to structure
a configuration file for a stacker or backup dump file. The examples
are not necessarily appropriate for a specific cell; if using them as
models, be sure to adapt them to the cell's needs and equipment.
<P><B>Example</B> <B>CFG_</B><VAR>device_name</VAR> <B>File for
Stackers</B>
<P>In this example, the administrator creates the following entry for a tape
stacker called <B>stacker0.1</B> in the
<B>/usr/afs/backup/tapeconfig</B> file. It has port offset
0.
<PRE> 2G 5K /dev/stacker0.1 0
</PRE>
<P>The administrator includes the following five lines in the
<B>/usr/afs/backup/CFG_stacker0.1</B> file. To review the
meaning of each instruction, see the preceding <B>Description</B>
section.
<PRE> MOUNT /usr/afs/backup/stacker0.1
UNMOUNT /usr/afs/backup/stacker0.1
AUTOQUERY NO
ASK NO
NAME_CHECK NO
</PRE>
<P>Finally, the administrator writes the following executable routine in the
<B>/usr/afs/backup/stacker0.1</B> file referenced by the
<B>MOUNT</B> and <B>UNMOUNT</B> instructions in the
<B>CFG_stacker0.1</B> file.
<PRE> #! /bin/csh -f
set devicefile = $1
set operation = $2
set tries = $3
set tapename = $4
set tapeid = $5
set exit_continue = 0
set exit_abort = 1
set exit_interactive = 2
#--------------------------------------------
if (${tries} > 1) then
echo "Too many tries"
exit ${exit_interactive}
endif
if (${operation} == "unmount") then
echo "UnMount: Will leave tape in drive"
exit ${exit_continue}
endif
if ((${operation} == "dump") |\
(${operation} == "appenddump") |\
(${operation} == "savedb")) then
stackerCmd_NextTape ${devicefile}
if (${status} != 0)exit${exit_interactive}
echo "Will continue"
exit ${exit_continue}
endif
if ((${operation} == "labeltape") |\
(${operation} == "readlabel")) then
echo "Will continue"
exit ${exit_continue}
endif
echo "Prompt for tape"
exit ${exit_interactive}
</PRE>
<P>This routine uses two of the parameters passed to it by the Backup
System: <TT>tries</TT> and <TT>operation</TT>. It follows the
recommended practice of prompting for a tape if the value of the
<TT>tries</TT> parameter exceeds one, because that implies that the stacker
is out of tapes.
<P>For a <B>backup dump</B> or <B>backup savedb</B> operation, the
routine calls the example <B>stackerCmd_NextTape</B> function provided by
the stacker's manufacturer. Note that the final lines in the file
return the exit code that prompts the operator to insert a tape; these
lines are invoked when either the stacker cannot load a tape or a the
operation being performed is not one of those explicitly mentioned in the file
(such as a restore operation).
<P><B>Example CFG_</B><VAR>device_name</VAR> <B>File for Dumping to a
Backup Data File</B>
<P>In this example, the administrator creates the following entry for a backup
data file called <B>HSM_device</B> in the
<B>/usr/afs/backup/tapeconfig</B> file. It has port offset
20.
<PRE> 1G 0K /dev/HSM_device 20
</PRE>
<P>The administrator includes the following lines in the
<B>/usr/afs/backup/CFG_HSM_device</B> file. To review the meaning
of each instruction, see the preceding <B>Description</B> section.
<PRE> MOUNT /usr/afs/backup/file
FILE YES
ASK NO
</PRE>
<P>Finally, the administrator writes the following executable routine in the
<B>/usr/afs/backup/file</B> file referenced by the <B>MOUNT</B>
instruction in the <B>CFG_HSM_device</B> file, to control how the Tape
Coordinator handles the file.
<PRE> #! /bin/csh -f
set devicefile = $1
set operation = $2
set tries = $3
set tapename = $4
set tapeid = $5
set exit_continue = 0
set exit_abort = 1
set exit_interactive = 2
#--------------------------------------------
if (${tries} > 1) then
echo "Too many tries"
exit ${exit_interactive}
endif
if (${operation} == "labeltape") then
echo "Won't label a tape/file"
exit ${exit_abort}
endif
if ((${operation} == "dump") |\
(${operation} == "appenddump") |\
(${operation} == "restore") |\
(${operation} == "savedb") |\
(${operation} == "restoredb")) then
/bin/rm -f ${devicefile}
/bin/ln -s /hsm/${tapename}_${tapeid} ${devicefile}
if (${status} != 0) exit ${exit_abort}
endif
exit ${exit_continue}
</PRE>
<P>Like the example routine for a tape stacker, this routine uses the
<TT>tries</TT> and <TT>operation</TT> parameters passed to it by the
Backup System. The <TT>tries</TT> parameter tracks how many times the
Tape Coordinator has attempted to access the file. A value greater than
one indicates that the Tape Coordinator cannot access it, and the routine
returns exit code 2 (<TT>exit_interactive</TT>), which results in a prompt
for the operator to load a tape. The operator can use this opportunity
to change the name of the backup data file specified in the
<B>tapeconfig</B> file.
<P>The primary function of this routine is to establish a link between the
device file and the file to be dumped or restored. When the Tape
Coordinator is executing a <B>backup dump</B>, <B>backup restore</B>,
<B>backup savedb</B>, or <B>backup restoredb</B> operation, the
routine invokes the UNIX <B>ln -s</B> command to create a symbolic link
from the backup data file named in the <B>tapeconfig</B> file to the
actual file to use (this is the recommended method). It uses the value
of the <TT>tapename</TT> and <TT>tapeid</TT> parameters to construct the
file name.
<P><STRONG>Related Information</STRONG>
<P><A HREF="auarf050.htm#HDRTAPECONFIG">tapeconfig</A>
<P><A HREF="auarf072.htm#HDRBK_DISKRESTORE">backup diskrestore</A>
<P><A HREF="auarf073.htm#HDRBK_DUMP">backup dump</A>
<P><A HREF="auarf085.htm#HDRBK_RESTOREDB">backup restoredb</A>
<P><A HREF="auarf086.htm#HDRBK_SAVEDB">backup savedb</A>
<P><A HREF="auarf091.htm#HDRBK_VOLRESTORE">backup volrestore</A>
<P><A HREF="auarf092.htm#HDRBK_VOLSETRESTORE">backup volsetrestore</A>
<P>
<HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf017.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf019.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P>
<!-- Begin Footer Records ========================================== -->
<P><HR><B>
<br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A> All Rights Reserved
</B>
<!-- End Footer Records ============================================ -->
<A NAME="Bot_Of_Page"></A>
</BODY></HTML>