Operating System - HP-UX
1834628 Members
3479 Online
110069 Solutions
New Discussion

Re: tape to tape copy --> duplicate a cpio archive

 
Denver Osborn
Honored Contributor

tape to tape copy --> duplicate a cpio archive

Looking for ideas...

What's a good method to duplicate a cpio tape using a tape to tape copy?

My source and copy tape are located on different boxes in the same network. Both DDS-3 drives. I've already tried using dd piped throuh ssh to the copy host, but it failed when I list the tape contents... get "out of synch" errors.

Here are the cmds from the "failed" attempt;

dd if=$SRCTAPE bs=5120 |ssh -l root $CPHOST "/usr/bin/dd of=$CPTAPE bs=5120"

The dd completes w/out error, but cpio to list the contents fails on "out of synch"... using -R gets a little more to the list, but ultimately fails. I'm assuming dd won't be my answer.

Any thoughts on the best (safest/fastest) method to do this is?

Thanks!
-denver
5 REPLIES 5
Elmar P. Kolkman
Honored Contributor

Re: tape to tape copy --> duplicate a cpio archive

The reason it doesn't work is probably linked to the block size used. Are you sure the blocksize is 5K ?
I've done this in the past, with remsh instead of ssh, and it worked fine. Even with ascii to ebcdic conversions etc. But the bs is really important!
Every problem has at least one solution. Only some solutions are harder to find.
Denver Osborn
Honored Contributor

Re: tape to tape copy --> duplicate a cpio archive

The archive was created using cpio's -B option, so I set the dd bs = 5120 bytes to match.

-denver
T G Manikandan
Honored Contributor

Re: tape to tape copy --> duplicate a cpio archive

Use dd

tape1 to disk
#dd if=/dev/rmt/?? of=/tmp/file bs=5120

disk to tape2
#dd if=/tmp/file of=/dev/rmt/?? bs=5120

This should do the work for you
Denver Osborn
Honored Contributor

Re: tape to tape copy --> duplicate a cpio archive

The tape to disk, disk to tape won't work for me... don't have the additional space sitting around. :)

I'm also looking to avoid running a 2nd cpio to create another tape from the filesystem, the original took about 14 hours to complete. this is why I looked to dd 1st to do the tape-to-tape via network.

-denver
Denver Osborn
Honored Contributor

Re: tape to tape copy --> duplicate a cpio archive

if anyone cares... may have solved my problem.

Had to specify both ibs and obs with dd. I figured simply "bs=5120" was supposed to set both input and output bs... either way, setting ibs=5120 and obs=5120 seems to be doing it.

-denver