Skip to main content

Problems with ontape when using tapes taken to/from other systems.


Technote (troubleshooting)


Problem(Abstract)

Running IBM Informix ontape to restore a tape backup that was made on a different host to which the restore is taking place, fails with 'Physical restore failed - function read archive backup failed code -1 errno 5'.

Symptom

Example ontape error :-

  $ ontape -r                                    
 
Please mount tape 1 on /dev/st0 and press Return to continue ...      
                                                                       
 
Physical restore failed - function read archive backup failed code -1 errno 5  
 
Program over.        

Example 'dd' error :-

  $ dd if=/dev/st0 of=/dev/null bs=2k count=100
 
dd: opening `/dev/st0': Permission denied

 
$ su -                                    
 
Password:                                                          
 
# dd if=/dev/st0 of=/dev/null bs=2k count=100
 
dd: reading `/dev/st0': Input/output error                          
 
0+0 records in                                                      
 
0+0 records out                                                    
 
0 bytes (0 B) copied, 3.17481 seconds, 0.0 kB/s      


Cause

There are a number of reasons you might get this error, including a bad tape. You should also consider checking the block size settings for the source and target tape drivers are compatible.

Diagnosing the problem

You have checked and confirmed the Informix ONCONFIG values TAPESIZE and TAPEBLK are identical on both the source and target instances. Next, check the block size settings for the tape drivers either match, or the target is set to 0 (variable length blocks).

Resolving the problem

Check both the source and target system by inserting a tape, and typing the following command :-

  # mt -f /dev/st0 status

The output may look like this :-

  # mt -f /dev/st0 status
  SCSI 2 tape drive:
  File number=0, block number=0, partition=0.
  Tape block size 512 bytes. Density code 0x0 (default).
  Soft error count since last status=0
  General status bits on (50000):
  DR_OPEN IM_REP_EN

If the 'Tape block size' values are different on each system, then you can either set them to the same value or make the target accept variable length blocks (0).

Example of setting the tape driver to variable length blocks :-

  # mt -f /dev/st0 setblk 0

The 'Tape block size' will now show up as 0 when the status command is run. This allows the drive to read tapes written on other machines.

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

Informix Servers

Informix Internet Foundation


Software version:
11.1, 11.5, 11.7


Operating system(s):
Linux


Software edition:
Developer, Growth, Innovator, Ultimate


Reference #:
1617169


Modified date:
2012-11-26

Translate my page

Content navigation