ITEM: R0828L
Question: How to fast forward to the End Of Tape (EOT)
Env:
AIX 3.2
Tape 8mm 5gb (7208-011)
Desc:
The customer wants a command that will position the tape to the
end of tape. There is not a command that will do this in AIX, but
here is a script that will do it.
NOTE: If you are using a 2.3gb 8mm tape drive (7208-001)
you have to create the backup using extfm set to yes
(extend file marks) The 2.3gb tape drive is the only
tape drive that has this option, the 5gb it is already
set to this.
Action:
\#!/bin/ksh
\#set -x
\# this is a script that will poisition to the end of tape
\# for those situations where the number of images on a tape
\# is unknown
ret_code=0
let no_images=0
device=/dev/rmt0.1
tctl -f $device rewind
while [ $ret_code -eq 0 ]
do
tctl -f $device fsf 1 2>/dev/null 1>/dev/null
if test $? -eq 0
then
let no_images=no_images+1
\# echo "Skipped tape image " $no_images
else
ret_code="1"
fi
done
echo "Tape contains " $no_images " images "
\# have now positioned 'past' the end-of-tape. in order to
\# append to the tape, will need to 'back up' 1 RECORD
tctl -f $device bsr 1 2>/dev/null 1>/dev/null
Support Line: Question: How to fast forward to the End Of Tape (EOT) ITEM: R0828L
Dated: January 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:37
Comments or suggestions?
Contact us