steve@pmday_2.Dayton.NCR.COM (Steve Bridges) (01/11/90)
My co-workers and myself are trying to figure something out. The situation is, suppose, I have a tape in cpio format, and want to copy it to another tape (separate drive) using cpio without putting a temporary copy on disk. A possible scenario follows: I have a 150mb tape with some files somebody with another tower wants. They only have a 45mb tape drive, but I have both a 150mb and a 45mb tape drive. I want to copy what is on the 150mb tape to a 45mb tape without putting a copy in disk. So far, I have tried: cpio -idmuvcB < /dev/rtp | cpio -ocvB > /dev/rtp1 It worked, but put a copy of all the files on disk. I tried cpio -ocvB < `cpio -idmuvcB < /dev/rtp` > /dev/rtp1 but it didn't work Would cpio -idmuvcB < /dev/rtp > cpio -ocvB > /dev/rtp1 do what I want without putting a copy on disk? Thanks in advance for any responses. -- Steve Bridges | NCR - USDPG Product Marketing and Support OLS Steve.Bridges@Dayton.NCR.COM | Phone:(513)-445-4182 622-4182 (Voice Plus) ..!ncrlnk!usglnk!pmday_2!steve | AOPA #916233 ..!uunet!ncrlnk!usglnk!pmday_2!steve| PP-ASEL, AMEL
stevem@sauron.Columbia.NCR.COM (Steve McClure) (01/11/90)
In article <812@pmday_2.Dayton.NCR.COM> steve@pmday_2.Dayton.NCR.COM (Steve Bridges) writes: |A possible scenario follows: I have a 150mb tape with some files somebody |with another tower wants. They only have a 45mb tape drive, but I have |both a 150mb and a 45mb tape drive. I want to copy what is on |the 150mb tape to a 45mb tape without putting a copy in disk. | |Thanks in advance for any responses. Steve, what about dd if=/dev/150Mtape of=/dev/45Mtape bs=100k ??? Steve McClure ----- stevem@Columbia.NCR.COM The above are my opinions, which NCR doesn't really care about anyway! CAUSER's Amiga BBS! | 803-796-3127 | 8pm-8am 8n1 | 300/1200/2400
bt455s10@uhccux.uhcc.hawaii.edu (Carl "Art" McIntosh) (01/12/90)
In article <1887@sauron.Columbia.NCR.COM> stevem@sauron.UUCP (Steve McClure) writes: >In article <812@pmday_2.Dayton.NCR.COM> steve@pmday_2.Dayton.NCR.COM (Steve Bridges) writes: >|A possible scenario follows: I have a 150mb tape with some files somebody >|with another tower wants. They only have a 45mb tape drive, but I have >|both a 150mb and a 45mb tape drive. I want to copy what is on >|the 150mb tape to a 45mb tape without putting a copy in disk. >| >|Thanks in advance for any responses. > >Steve, what about dd if=/dev/150Mtape of=/dev/45Mtape bs=100k ??? > >Steve McClure >----- >stevem@Columbia.NCR.COM >The above are my opinions, which NCR doesn't really care about anyway! >CAUSER's Amiga BBS! | 803-796-3127 | 8pm-8am 8n1 | 300/1200/2400 I ran across a problem a couple of months back regarding reading 45MB tapes in a 150MB drive. Evidently the bytes are *swapped*, so you need to use dd(1) to do the conversion. The command below will read a 45MB tape in a 150MB drive into the filesystem. dd if=/dev/rstp/34yy conv=swab | cpio -idcmuv You may have to mess with the -c option to cpio depending if the tape was created using it or not. Possibly you need to swap bytes as well prior to writing to your 45MB tape. -- Art Neilson Bank of Hawaii Tech Support ARPA: manapua!pilikia!root@trout.nosc.mil UUCP: {uunet,ucbvax,dcdwest}!ucsd!nosc!manapua!pilikia!root
roe@sobmips.UUCP (r.peterson) (01/14/90)
From article <1892@sauron.Columbia.NCR.COM>, by wescott@Columbia.NCR.COM (Mike Wescott): > > It is a function of using an Intel bus (mutlibus I) with a > big-endian processor (MC68K). The newer controllers (SCSI) reswap > the bytes so tapes and other peripherals look right to application > software. With an amazing reduction in real I/O speed. Say you are writing 32K blocks - the driver has to byte-swab the 32k once before it writes the data, and then again after the write - since the buffer is in user space, it has to put your data back the way it came. This caused the tape driver (on a 600 running 01.03.02) to max out at about 100K per second. Removing the swab in both directions produces about 220K/sec - more than twice as fast. -- One makes strong assumptions delving Roe Peterson into the beginning of the universe... {uunet,mcgill-vision}!sobeco!roe - Stephen Hawking, Cambridge
wescott@Columbia.NCR.COM (Mike Wescott) (01/14/90)
In article <812@pmday_2.Dayton.NCR.COM> steve@pmday_2.Dayton.NCR.COM (Steve Bridges) writes: > cpio -idmuvcB < /dev/rtp | cpio -ocvB > /dev/rtp1 What this command line says is "read /dev/rtp and let cpio dearchive (put on disk) all the files it finds there spitting out the file names as it goes. The second cpio reads those file names and recreates the archive on /dev/rtp1. > Would cpio -idmuvcB < /dev/rtp > cpio -ocvB > /dev/rtp1 > do what I want without putting a copy on disk? Nope. Not even valid syntax. You can't redirect stdout twice on the same command. The command that the shell parses out looks just the same as: cpio -idmuvcB -ocvB < /dev/rtp > cpio > /dev/rtp1 Your best bet is plain old dd(1): dd if=/dev/rtp of=/dev/rtp1 bs=100k should do the trick with reasonable efficiency. -- -Mike Wescott mike.wescott@ncrcae.Columbia.NCR.COM
wescott@Columbia.NCR.COM (Mike Wescott) (01/14/90)
In article <6123@uhccux.uhcc.hawaii.edu> bt455s10@uhccux.UUCP (Carl "Art" McIntosh) writes: > I ran across a problem a couple of months back regarding reading 45MB > tapes in a 150MB drive. Evidently the bytes are *swapped*, so you need > to use dd(1) to do the conversion. Actually it is a function of using an Intel bus (mutlibus I) with a big-endian processor (MC68K). The newer controllers (SCSI) reswap the bytes so tapes and other peripherals look right to application software. The dd command: dd ... conv=swab can be used when ever this becomes a problem transporting files between machines. -- -Mike Wescott mike.wescott@ncrcae.Columbia.NCR.COM