Operating System - HP-UX
1748239 Members
3869 Online
108759 Solutions
New Discussion юеВ

Tar returns tape error (5)

 
SOLVED
Go to solution
viper_1
Occasional Contributor

Tar returns tape error (5)

Hi,

I have a problem restoring a backup tape that used the tar utility. when I tar -tvf on the machine, after restoring several files, the error occurs and fails. I have tested the tape on another machine and it works fine.(using the same set of commmand).

I have read that there is a 2GB limit on tar. Is that refering to each individual file on a tar archive? Or the whole tar archive cannot exceed 2GB?

Thx a lot!
Derek Yau
11 REPLIES 11
Pete Randall
Outstanding Contributor
Solution

Re: Tar returns tape error (5)

You say "tar -tvf, after restoring several files". Would you need to rewind the tape first, then do your -tvf?

Pete

Pete
Pete Randall
Outstanding Contributor

Re: Tar returns tape error (5)

Actually, I guess I should be asking "are you using the rewindable device file with your tar commands"?

Pete

Pete
Robert-Jan Goossens
Honored Contributor

Re: Tar returns tape error (5)

Hi,

The second part of your question is simple, tar has a file limit of 2 gb, no limit on the archive.

In your case you mentioned a test on a other server, has this server the same OS + hardware (tape device) ?

Regards

RJ
T G Manikandan
Honored Contributor

Re: Tar returns tape error (5)

check the exit codes for tar

exit(0)
no error & no warning.

exit(1)
Tar: cannot create temporary file (%s)
Invalid blocksize. (Max %d)
tar: blocksize %d too big, can't get memory
tar:Invalid or non-existent device file %s
Can only create standard output archives
tar: cannot open %s
tar: option not supported for this device %s
tar: cannot write to %s: write protected
tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] ......
Attempt to create archive of no files. Nothing dumped.
tar: cannot preserve extent attributes for %s. aborting...
Tar: cannot create temporary file (%s)
Invalid blocksize. (Max %d)
tar: blocksize %d too big, can't get memory
tar:Invalid or non-existent device file %s
Can only create standard output archives

exit(2)
directory checksum error
tar: %s: HELP - extract write error
tar: Cannot close %s
Tar: tape write error

exit(3)
Tar: tape read error
Tar: tape blocksize error
Tar: blocksize = 0; broken pipe?
Tar: error! blocksize changed

exit(4)
Tar: tape backspace error
Tar: ioctl to write filemarks failed (%d). aborting...
Tar: ioctl to determine device online failed. aborting...

exit(5)
tar: Cannot change directory to '%s'
tar: Path '%s' skipped
tar: cannot open %s
Missing links to %s
tar: %s: cannot access file
tar: Out of memory. Cannot detect symbolic link loops
tar: Loop of symbolic links detected, tar terminated
tar: cannot stat %s. Not dumped.
tar: Size of %s > %s. Not dumped.
tar: %s: directory read error
tar: %s: directory read error
tar: %s: symbolic link too long
tar: can't read symbolic link
tar: %s: cannot open file
tar: %s: link to name too long
Out of memory. Link information lost
%s: file changed size
tar: %s is not a file. Not dumped
tar: %s: symbolic link failed
%s: cannot link
tar: %s couldn't create character device
tar: %s couldn't create block device
tar: %s couldn't create fifo
tar: %s couldn't create directory
tar: %s couldn't create directory
tar: %s - cannot create
tar: chmod failed
tar: chown failed
tar: couldn't get uname for uid %d
tar: couldn't get gname for gid %d
tar: pwd failed
tar: %s: pathname too long
tar: %s: prefix too long
tar: %s: file name too long
%s: file name too long

NOTE: exit code is condsidered as 'NONFATAL_ERRCODE'


It is for individual files not the entire archive.


Thanks
Keely Jackson
Trusted Contributor

Re: Tar returns tape error (5)

Hi

The 2Gb limit refers to individual files, not the whole archive.

If the 2gb limit is not the problem, sometimes it is worth trying pax to read the tape. Can't remember the exact command,
pax -vf /dev/rmt/0m

check the man pages.

Cheers
Keely
Live long and prosper
viper_1
Occasional Contributor

Re: Tar returns tape error (5)

Thx guys....

I am using a rewindable device. I use the tar -cvf command to create the archive on a tape device. I experience problem after several files have been exported...around 4 files of total size 3GB has been successfully restored before the error came out.

The file being restored when the error came was restored partially.

Thx!
Derek Yau
Pete Randall
Outstanding Contributor

Re: Tar returns tape error (5)

And the exit code was . . .???

Pete
viper_1
Occasional Contributor

Re: Tar returns tape error (5)

Hi guys,

This is the screen dump of the error. I have backup from a K460 server and restore on a K210 server. Both uses the same model of DDS3 tape drive.

sfaudev1 /u09/oradata/faspprod #tar -xvf /dev/rmt/1m
x ./users01.dbf, 10493952 bytes, 20496 tape blocks
x ./dis_data01.dbf, 52436992 bytes, 102416 tape blocks
x ./ftss_index01.dbf, 314580992 bytes, 614416 tape blocks
x ./nls_index01.dbf, 629153792 bytes, 1228816 tape blocks
x ./rbs01.dbf, 31465472 bytes, 61456 tape blocks
Tar: tape error (5)
sfaudev1 /u09/oradata/faspprod #echo $?
2

I guess the exit status is 2. I have recreated the device files and the same error comes out.

Derek Yau
Xavier Gutierrez_1
Frequent Advisor

Re: Tar returns tape error (5)

Hi, Derek.

It may be also a problem with the SCSI controller. We had the same problem few weeks ago with one L2000 and, finally, the SCSI controller for the bus the tape was on had to be replaced.

Regards.

Xavier.