Operating System - Tru64 Unix
1829078 Members
2378 Online
109986 Solutions
New Discussion

cpio write i/o error

 
Joaquin Martinez_1
Frequent Advisor

cpio write i/o error

Hiyas. Last night I was testing one of our shell script (not made by me) that is having some problems. What it does is that it backups some oracle data to tape and it is failing. I put the commands manually that it uses inside it to make the backup, in order to debug where it was failing. I ran the commands and it returned back, after like 12 hours having backed up like 20 files, with the below error:

cpio: write : I/O error
cpio: A write error has occurred.

and thus I wonder what could cause cpio to do this? Also, it is _normal_ for cpio to take so much time for just 10GB ? The command I used was

cpio -ov -O/dev/ntape/tape0

Right now I am doing the same thing but with tar.. it seems to go a lot faster than cpio.

Thanks!
10 REPLIES 10
Joaquin Martinez_1
Frequent Advisor

Re: cpio write i/o error

Ok. Apparently, the tar finished. But listing the tape contents only gives me three files, whereas they are more than 30.

# tar tvf /dev/tape/tape0
blocksize = 256
-rw-r--r-- 202/0 977 Mar 3 06:37:57 2006 01032006Tarjeta.dat.Z
-rw-r--r-- 202/0 7088 Mar 2 05:48:20 2006 01032006aamcc.dat.Z
-rw-r--r-- 202/0 9393 Mar 2 02:02:55 2006 01032006aamcg.dat.Z
#
Mark Poeschl_2
Honored Contributor

Re: cpio write i/o error

What kind of tape drive are you using. 10 GB in 12 hours certainly isn't "normal" with anything I'm used to. Did this script work in the past? If so, what has changed in the meantime?
Joaquin Martinez_1
Frequent Advisor

Re: cpio write i/o error

We are using DLT tapes. I dont know wether or not it used to work since I am just checking it now due to the problems it presents, allthough my boss says it used to work, but I am not really sure. Did you see the tar ouput ? It is strange that it finished successfully copying all the files but when I try to list them it only shows the first three.

Thanks!
Joaquin Martinez_1
Frequent Advisor

Re: cpio write i/o error

Anyone else please ? This is getting frustrated.
Steven Schweda
Honored Contributor

Re: cpio write i/o error

It might help to see the actual "tar"
command(s) and a transcript showing the
terminal output from it/them.

> cpio: write : I/O error
> cpio: A write error has occurred.

This could mean simply a bad tape or dirty
tape heads. Have you tried a different tape,
or a head cleaning?
Vladimir Fabecic
Honored Contributor

Re: cpio write i/o error

Hello
Please post OS and patch version.
It is not normal for cpio to take much more time than tar. Tar is faster, but not that much. Maybe you have hardware problems.
Try to test tape doing various kinds of backup:
# cd
# find . -print | cpio -ov -0/dev/ntape/tape0


# vdump -0f /dev/ntape/tape0

Post error messages after that. And do cleaning tape unit with cleaning tape before this backups.
Regards
In vino veritas, in VMS cluster
Han Pilmeyer
Esteemed Contributor

Re: cpio write i/o error

cpio, by default, uses small blocks. You probably want to look into using the "B" or "C" arguments in order to write larger blocks. Using small blocks is notoriously bad for DLT devices as they have to work in start/stop mode which is really slow. However it should not fail.

Since you're getting an I/O error, it's probably worth looking in the error log file to see what the error is. Preferably use the "ca" command (from WEBES) to analyze to error log.
Joaquin Martinez_1
Frequent Advisor

Re: cpio write i/o error

@ Steven Schweda

Error is just as I posted it with cpio, and that is

> cpio: write : I/O error
> cpio: A write error has occurred.

after processing like 25 files out of 30 in total.

I have already tried a cleaning cartridge and I have used like 3 different new tapes. I have unwrapped them myself.

@ Vladimir Fabecic

This is the output of uname -a

# uname -a
OSF1 sigbrrd V5.1 2650 alpha
#

I dont know how the commands you posted are different from what I tried. I was trying with ls *thefilescriteria* | cpio -ov -O/dev/ntape/tape0. However, I will try making the file_system dump.

@ Han Pilmeyer

I am relatively new to tru64 world. Care to post the commands to use B or C ? I don't seem to find ca in our system.


Guys: If I copy just one file, it works just fine. I can list them with either, tar and cpio. I wonder, could it be that the files I am trying to copy exceed the tape's capacity ? I woulnd't think so, since I believe it would ask for a second tape in that case. Bear with me, this is the command I am using.

# ls -l *032006* | awk -v s=0 '{ s+=$5 } END { print s/1024/1024 }'
9886.95
#

I see that tells me I will try to backup roughly 10GB

and what I am using is

# ls *032006* | cpio -ov -O/dev/ntape/tape0

which fails with the error message I posted about after processing over 25 files of 30 or more in total.

then I use

# ls *032006* | tar cvf /dev/ntape/tape0

which works since I see all files being backed up, but when I list them, it only shows me the first three.

Of course, on either case I am rewinding the tape before listing the content of the tape.

Thanks to all, and I am eyes for suggestions!
Joaquin Martinez_1
Frequent Advisor

Re: cpio write i/o error

Guys, any more tips ?

I find that if I back up 1 or 2GB the backup just runs fine using either cpio or tar. It is only when I am backing up this whole data (about 9GB) that it is giving me error.

I just want to find an explanation on why this is happening and I will be have peace of mind!
Vladimir Fabecic
Honored Contributor

Re: cpio write i/o error

Joaquin
I am not sure, but from my experience it is probably hardware problem.
If I were you, I would replace tape drive.
But before that DO some test using vdump.
In vino veritas, in VMS cluster