Xref: utzoo comp.unix.wizards:25358 comp.periphs.scsi:2519 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ncar!gatech!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR/AA) Newsgroups: comp.unix.wizards,comp.periphs.scsi Subject: Re: My Exabyte has a personality! It hates cp! HELP!! Message-ID: <1991May3.013358.14434@NCoast.ORG> Date: 3 May 91 01:33:58 GMT References: <1991May2.044713.12583@coplex.uucp> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR/AA) Followup-To: comp.unix.wizards Organization: North Coast Public Access Un*x (ncoast) Lines: 37 As quoted from <1991May2.044713.12583@coplex.uucp> by dean@coplex.uucp (Dean Brooks): +--------------- | We just recently acquired an Exabyte 2.3 gig tape drive for our | Motorola SYS V.3.2 (V/88) 8864 system, and I have noticed something | unusual. | | $ cp /tmp/BIGFILE /dev/exabyte | $ cp /dev/exabyte /tmp/newfile | | The two files will have different lengths, varying anywhere from | 1,000 bytes difference to 38,400 bytes difference. *However*, if I | use "cpio" to backup the file and then restore it, it works perfectly. +--------------- Character special mass storage devices, like tapes and disks, generally require the program to do block-mode access itself. The difference in sizes probably depends on how large the first write to the tape is. Instead of using cp or cat, try dd: dd if=/tmp/BIGFILE of=/dev/exabyte bs=20b The restored file will almost certainly be larger, because it will be padded to a whole block size (10K in the example above). (Why do tapes and disks require this in character mode when block special devices do it for you? Efficiency: the block special device has to go through the Unix buffer pool, the character special device can write directly from your buffer or even (if the device is smart enough) memory map your buffer onto the device's own buffer.) ++Brandon -- Me: Brandon S. Allbery Ham: KB8JRR/AA 10m,6m,2m,220,440,1.2 Internet: allbery@NCoast.ORG (restricted HF at present) Delphi: ALLBERY AMPR: kb8jrr.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery KB8JRR @ WA8BXN.OH