Operating System - HP-UX
1755690 Members
3305 Online
108837 Solutions
New Discussion юеВ

Code error of tar command

 
Daniel Ubeda
Frequent Advisor

Code error of tar command

Hi,

I have a backup process whith tar command and
I receive code error = 5
what is this ???? anybody know this code error ?

thanks
Daniel
9 REPLIES 9
Jeff Schussele
Honored Contributor

Re: Code error of tar command

Hi Daniel,

Error code 5 is EIO or I/O error. You can usually find error codes by strings /usr/include/sys/errno.h | grep 5

I suspect that you have a bad tape, drive or SCSI subsystem.
Try another tape first. Then clean the drive.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: Code error of tar command

Usually error code 5 is non fatal. It can be due to a lot of reasons .. for example ..
-couldn't get uname for uid
-couldn't get gname for gid
-pwd failed
-pathname too long
-filesize changed
etc, etc, etc.
Some other error codes which are more serious are ..
2 - tape write error
3 - tape read error (block size changed)
Can you post the actual error message you're getting ?
S.K. Chan
Honored Contributor

Re: Code error of tar command

I'm talking error code specific to tar of course .. for instance if you see something like ..
"tar returned error [5]"
.. then my previous post would apply.
Daniel Ubeda
Frequent Advisor

Re: Code error of tar command

The error code is returned by assign a variable:
coderr=$?

and then return 5.

this is a printout of tar command:
a ./disco1/COCOON/PROD/logs/dlg_00_pa_liq_res_001_pr_generar_26_02_2003_14_39_02.log 10 blocks
a ./disco1/COCOON/PROD/logs/dlg_00_pa_liq_res_001_pr_generar_26_02_2003_15_50_02.log 9 blocks
a ./disco1/COCOON/PROD/logs/pa_liq_act_rct_001_pr_calcular_26_02_2003_15_54_02.log 3 blocks

but the proccess is not interactive !!
I think that is a path length problem ...

Daniel
Jeff Schussele
Honored Contributor

Re: Code error of tar command

Hi (again) Daniel,

No those paths are nowhere near length limits.
I believe I still stand by my first diag - you've got a simple I/O error.
Start your diag by ruling out the simplest things first:
1) tape
2) drive dirty
3) drive fault
4) SCSI subsystem
5) System bus
6) etc.

Good hunting,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Dennis Flinn
Advisor

Re: Code error of tar command

I believe that and error code 5 will also happen if a file in the path exceeds 2GB.
Carlos Fernandez Riera
Honored Contributor

Re: Code error of tar command

Tar change among releases of HP-ux.


See man tar for your own system.


See also :

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6c983a1c04ffd61190050090279cd0f9,00.html


unsupported
Daniel Ubeda
Frequent Advisor

Re: Code error of tar command

If the path length is less than the limit, the problem was the scsi subsistem.
I will check that !!!

thanks very very much to all !!
Daniel
Chris Wilshaw
Honored Contributor

Re: Code error of tar command

The full list of error codes for tar can be found by

cd /usr/lib/nls/C
dumpmsg tar.cat

This gives

5 Can only create standard output archives