1856403 Members
8501 Online
104112 Solutions
New Discussion

I/O error with dd

 
Steve Boulding
Occasional Contributor

I/O error with dd

I am looking at a backup script that uses dd to write a label on a tape like so:

dd if=/tmp/label1 of=/dev/rmt/4m

The output from this command is:

0+1 records in
0+1 records out
I/O error

Any ideas as to why I get the I/0 error? I'm assuming it's to do with teh tape, because if I use the same command but set the output to another file, it works fine.

I can read from and write to the tape using cpio and tar just to confuse the issue!

any help greatly appreciated.

Tim Pottle

timothy.pottle@capgemini.co.uk
7 REPLIES 7
Andreas Voss
Honored Contributor

Re: I/O error with dd

Hi,

you could try a different blocksize:
dd if=/tmp/label1 of=/dev/rmt/4m bs=5k
(think for DDS devices 5k is a good choice)

Regards
John Palmer
Honored Contributor

Re: I/O error with dd

Hi Tim,

What type of server is it and what type of tape drive?

Regards,
John
Stefan Farrelly
Honored Contributor

Re: I/O error with dd


Something is wrong with your tape or tapedrive. Try another tape. Check tapedrive doesnt need cleaning.

Your dd command should work perfectly on a good drive+tape.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Steve Boulding
Occasional Contributor

Re: I/O error with dd

tape drive is a Quantum DLT4500 (it's a tape stacker)

Server is an HP 800 series, running HP10.20

we've cleaned the drive and changed the tapes. I've also run the dd command successfully on a different server with the same stacker and same sort of tapes, so it is pointing to a hardware/media problem isn't it? It confused me as to why I could use cpio and tar, but not dd. Other parts of the script using a "dump" command fail too.

Tim
John Palmer
Honored Contributor

Re: I/O error with dd

Another question - are you able to
cat /tmp/label1 > /dev/rmt/4m

Also, if this is a tape label, shouldn't you be using the non-rewind tape device file /dev/rmt/4mn?

Regards,
John
Stefan Farrelly
Honored Contributor

Re: I/O error with dd


Yes, it certainly does point to a hardware or possibly a patch problem. Can you confirm the patch levels are the same on your servers ? (the one what works vs the one that doesnt) or perhaps more importantly the firmware revision on the DLT stacker ?
Have you tried resetting the DLT unit and changing the media ? If that still doesnt solve it then perhaps time to get HP on the case - call an engineer.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Cheryl Griffin
Honored Contributor

Re: I/O error with dd

I/O errors are indicative of a hardware issue. Once you have verified that the drive is clean, the tapes are good and that the device files are fine (ioscan, lsdev, ll /dev/rmt... etc.) it's time to contact your hardware support to pursue it further.

dd is one of the most basic tests that we use in support to isolate hw issues.
"Downtime is a Crime."