ITEM: BN9521L

Problems with using the readsbheader command


Env:
  AIX 4.1.4
  sysback 3.3.3.6
  RISC 570
  Tape 8mm 5gb  7208-011

Desc:
  Customer is not able to read the header of the third image on a tape.
  Forwarding tape to image \#3 ..

             ******************************************************
             * Device /dev/rmt0.1 has reached end of media.       *
             * Please insert next volume. Forwarding will         *
             * continue when new tape has been inserted.          *
             ******************************************************

Action:
  The customer put three mkdirback images on tape ranging from 400mb to
  200mb in size for each.

  This is the command the customer runs 
  readsbheader -i1 -f /dev/rmt0
  readsbheader -i2 -f /dev/rmt0
  readsbheader -i3 -f /dev/rmt0 
It works perfect for images 1 and 2 put fails on image 3 with the above error
message.

I was able to do this without problems
tctl -f /dev/rmt0 rewind

tctl -f /dev/rmt0.1 fsf 1
sbread -H /dev/rmt0.1

tctl -f /dev/rmt0.1 fsf 1
sbread -H /dev/rmt0.1

tctl -f /dev/rmt0.1 fsf 1
sbread -H /dev/rmt0.1

I was able to read all the headers without problem. 

Also when the tape was total rewinded first, I was able to run the
readsbheader -i3 -f /dev/rmt0  without error.

I looked into the code of readsbheader to determine it is not rewinding
at the start of the command.  Should it be?

Here is the section of the code  /usr/sbin/readsbheader

\# Get device options - rewind at start
getdevopts $devname yes

case $devname in
   /dev/rmt[0-9]*|vdev*)
        \# Forward to specified image on tape
        if [ "$image" != "" ]
           then msg 113 'Forwarding tape to image \#%s ..' $image
                image=`expr $image - 1`
                fwdtape "$devlist" $image $hostname
                echo
        fi;;

I then looked at the /usr/lpp/sysback/sysback.lib script

getdevopts() {
        dev=$1

        export policy=""
  export auto=""
        export vdesc=""
        export devlist=""
        export firstdev=""

        \# Set to no-rewind
        dev=$(norewind $dev)

        case "$dev" in
                /dev/rmt[0-9]*) \# Single tape drive
                        devlist=$dev
                        firstdev=$dev
                        policy="S"
                        ;;
                vdev*)  \# Virtual device - may contain multiple devices
                        getvdevopts $dev
                        ;;
                *)      \# Disk file
                        devlist=$dev
 firstdev=$dev
                        policy="S"
                        ;;
        esac
}
I don't see where it is rewinding the device?
Is this "Working As Designed" or is it a bug?

This is a bug, which is fixed in sysback 3.3.3.8

 readsbheader command not rewinding tape before attempting
 to read volume label at selected image. Added -n flag to
 indicate tape should not rewind, otherwise tapes always
 rewind at start. (readsbheader)

Next Action:
  Will send sysback 3.3.3.8 to the customer
  Closing with customr approval

 


Support Line: Problems with using the readsbheader command ITEM: BN9521L
Dated: September 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:21
Comments or suggestions? Contact us