cpio write i/o error


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cpio write i/o error
# 1  
Old 04-07-2006
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, with the below error:
Code:
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
Code:
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!
# 2  
Old 04-07-2006
Ok. Apparently, the tar finished. But listing the tape contents only gives me three files, whereas they are more than 30.
Code:
# 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
#

# 3  
Old 04-07-2006
The error message is pretty self descriptive. The kernel tried to write data to tape and the tape driver returned an error. If this used to work ok, it is probably a hardware problem most likely with whatever tape drive you are using. Your tape driver may have logged a message using whatever facility is available on whatever OS you are using. Depending on which model of what family tape drive you have, there may be some operator maintenance that could be tried such as cleaning the transport and/or read/write heads. Also the medium on which you were writing may be bad and you may be able to try another instance of that medium. That's about all I can do with this error report. Oh well, at least you let "tape" slip out. That's more detail than we usually get. Smilie
# 4  
Old 04-07-2006
Thanks Perderabo. I forgot to include my unix version, sorry for that. It is HP Tru-64 v.5.1b. The media we are using is HP's DDS4, I believe it is 40GB compressed and 20gb uncompressed.

What can you say about the last part with tar ? what I did was this
Code:
tar cvf dev/tape/tape0 *032006*

there are like 30 files in total with over 9GB of data. Only three of these are shown when I list the tape contents. I will try with another tape now, as you suggested.

Thanks!
# 5  
Old 04-07-2006
At first you had a slash in front of the dev. Now you don't. Which is it really? It makes a big difference. You are doing a v in cvf so it should display the filenames. Are there 30 there...and then only 3 with tvf? Or 3 both times? If 30 during the cvf and 3 during the tvf, which 3??? The first 3? The last 3? 3 random selections? Did you rewind the tape bewteen the cvf and the tvf? If so how? Did you try a cleaning tape?
# 6  
Old 04-07-2006
That was a typo, it is /dev/tape/tape0. When I list the tape contents, it always returns the first 3 files that it tar'ed when using cvf. Please, see the attached file, so you can actually see the oputput. It doesn't seem normal to me.
# 7  
Old 04-07-2006
Quote:
# uname -a
OSF1 sigbrrd V5.1 2650 alpha
#
# mt -f /dev/tape/tape0 rewind
#
# tar cvf /dev/tape/tape0 *032006*
a 01032006Tarjeta.dat.Z 2 Blocks
a 01032006aamcc.dat.Z 14 Blocks
a 01032006aamcg.dat.Z 19 Blocks
a 01032006aamcu.dat.Z 17 Blocks
a 01032006acmbc.dat.Z 91 Blocks
a 01032006ahmbc.dat.Z 1 Blocks
The rest deleted...


# mt -f /dev/tape/tape0 rewind
#
# 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
#
The main problem you have is that your tar program seems to have malfunctioned. 01032006aamcg.dat.Z has 9393 bytes but was recorded in 19 tape blocks. That means it had to use a blocksize of 512 writing 18 full blocks followed by one partial block. When tar reads a tape, it is supposed to figure out the blocksize. Your tar figured wrong. It picked 256 as it reported. I suspect that to be the problem. I don't understand how that choice is even possible. Blocksize is a multiple of 512. It has picked a blocking factor of one half or something like that. Smilie

Try specifying a blocking factor. 20 is considered a very safe choice.

tar cvbf 20 /dev/tape/tape0 *032006*
tar tvbf 20 /dev/tape/tape0

Since you are backing up .Z files, hardware compression won't buy you much. But you seem to think you're using hardware compression. A quick reading of the tru64 man pages suggests that you are not. /dev/tape/tape0c would be specifying compression. I got lost on the tru64 device naming docs and I can't test anything. You may or may not have other device naming troubles... I'm not sure.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cpio - input files (from list) are stored in different order inside cpio archive - why?

Due to budget constraints I have to reinvent an Enterprise backup system in a SPARC (sun4v) Solaris estate (10 & 11). (yep - reinvent wheel, fun but time consuming. Is this wise?! :confused: ) For each filesystem of interest, to try to capture a 'catalog' at the front of each cpio archive (for... (1 Reply)
Discussion started by: am115998
1 Replies

2. Red Hat

VMDisk error: Write Protect is off

Hi Everyone, I noticed this error message, on the console. I added a new drive recently. not sure to be considered is a serious warning message or not. SCSI device sdc: 27262976 512-byte hdwr sectors 91 sdc: Write Proetect is off sdc: cache data unavailable sdc: assuming drive cache:... (1 Reply)
Discussion started by: bobby320
1 Replies

3. UNIX for Dummies Questions & Answers

unzip failing with write error

All, I am trying to unzip a file, when i doing i am seeing the below error. I have more than enough memory space in the directory where i am unziping. Can you please help me to find out the issue I dont know why i am getting disk full error. I have more space in /pa01 directory ... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

4. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

5. UNIX for Dummies Questions & Answers

Problem with dump write error

I'm watching a log of a backup and i see this DUMP: write: I/O error DUMP: Write error 378258 feet into tape 1: What is the meaning of that that the tape is bad? Thankyou (1 Reply)
Discussion started by: enkei17
1 Replies

6. Solaris

mail: Write error in copymt()

I hate Monday's... Sun Microsystems Inc. SunOS 5.10 Generic January 2005 You have new mail. DONE! root@bender:/> mail mail: Write error in copymt() Google seems to come up short for this error... (2 Replies)
Discussion started by: ippy98
2 Replies

7. Solaris

fssnap error :snapshot error: File system could not be write locked

Hi Guys. This is part of my filesystem structure : Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 47G 5.2G 42G 12% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% ... (2 Replies)
Discussion started by: aggadtech08
2 Replies

8. HP-UX

Write error in HP11.11

HI, I am using oracle express application to create a flat file DB. It throws the below error. *** WRITE ERROR, Invalid argument, in /rhome/zxxhome/zxxdba/comps/P8736C1.NEW/P8736C11.001 *** Build/Update failed, Deleting : /rhome/zxxhome/zxxdba/comps/P8736C1.NEW When i trace this through... (1 Reply)
Discussion started by: kprasanna_79
1 Replies

9. Programming

read/write socket error

I have client and server connected. client write and read from csock. server write and read from ssock suppose the server does : .... close(ssock); //send FIN to client othertask(); .... READ ERROR if after the server close() the client does: ... read(csock,...); ...... (2 Replies)
Discussion started by: gio
2 Replies

10. UNIX for Dummies Questions & Answers

Error in cpio?

Hi, I want to do incremental backup of my files, I am using cpio for copy, my code is as follows: CPIO=/usr/bin/cpio cd /home/arbuser/temp2/mscdr/tar/daily.0 && find . -print | $CPIO -dplm $DR_BACKUP_DIR/daily.1 I am unable to copy to daily.1 in commad prompt I am gettiung... (3 Replies)
Discussion started by: redlotus72
3 Replies
Login or Register to Ask a Question