iv@hal6000.UUCP (09/20/88)
/* Written 6:42 pm Sep 18, 1988 by cimcor.UUCP!mike in comp.unix.xenix */ >> I got this response from Amy at SCO...(thank you) >> >> & From: uunet!amys (Amy Snader) >> & Organization: The Santa Cruz Operation, Inc. >> & >> & Raw interfaces (such as any floppy device starting with a 'r') >> & need to be written to using their native block size, which >> & is 1K on Xenix. Tar and Cpio use 512 byte blocks, by default. >> & So what you have to do is ask these commands to use a >> & larger blocking factor, such as: >> & $ tar cvfb /dev/rfd096 2 file1 file2 ... >> & >> & Anything EVEN will work, but larger blocks are more efficient. >> & 18 seems to work particularly well on floppies (9 sectors/track). >> & >> & --amy >> >> This answer though seems very strange to me. Does a 'cp' command >> which works just fine talking to the raw device use a larger >> buffer size? >> >> Is the ability to read and write arbitary streams of data to a raw >> device something that is implementation dependent (within limits >> on a tape device)? Strange that Microport's version works great >> but XENIX gives me trouble. Even stranger is that floppy sectors >> are 512 bytes (I think) so why does it need 1024 byte buffers? Amy is right. The problem is that `tar' and `cpio' (usually) have a hard-coded buffer size. So on systems which have a different `BSIZE' than is hard-coded into tar and cpio, you get strange results. When you use `cp', it knows better (i.e., its buffer size is usually BSIZE). Most raw I/O interfaces (esp. for disk systems) want to do I/O with a granularity (i.e. with a minimum size) of BSIZE. BSIZE is an implimentation constant (i.e. something one chooses when the system is ported). So what Amy was telling you is that BSIZE on your system is 1024 bytes, but tar and cpio try to use a mininum buffer size of 512 bytes. Thus, you need to give them an even number-of-buffers option. ---- IV (aka John Elliott IV) Domain: iv@hal6000.Tandy.COM Tandy Systems Software UUCP: ...!killer!ninja!hal6000!iv 1300 Two Tandy Center or: ...!decvax!microsoft!trsvax!hal6000!iv Fort Worth, TX 76102 Phone: 817/390-2701; 9:30am-6:00pm CST