On 13 Feb 2004, at 3:14pm, [EMAIL PROTECTED] wrote: > I've started getting the following error when trying to back up to tape: > > "Write not multiple of tape block size"
The tape driver in the kernel supports two modes of operation: "Fixed block size" and "variable block size". Some tape drives only support a single block size (or set of block sizes), which is where fixed-block-size mode is important. Most recent drives (i.e., anything built in the last couple of decades) support variable block sizes. In "fixed block size" mode, all I/O calls have to be a multiple of the block size configured for the tape drive. In "variable block size" mode, the block size can vary from one I/O call to the next. The block size for each I/O call is determined by the size of the I/O call's data buffer. In the above, "I/O call" refers to the actual write(2) or read(2) system calls the kernel sees. Most of us work several layers above that, using a utility like tar(1), cpio(1), or dump(8). Figuring out how to translate your utilities options for sizes (assuming it has any) to what the kernel sees can be non-obvious. > This has worked for a year and a half, and I haven't changed anything that > I am aware of. Heh. Well, if "nothing has changed" really is true, then this is almost certainly a hardware failure. Check the output of "dmesg" and/or the kernel log. Hardware failures with tape drives will usually be accompanied by kernel error messages. They might not mean anything to you, but their existence alone is a sign of trouble. However, I suspect something *did* change. That happens often often enough, for any number of reasons. What does the output of "mt status" tell you? For example, from a server we have here: # mt status SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 512 bytes. Density code 0x13 (DDS (61000 bpi)). Soft error count since last status=0 General status bits on (41010000): BOT ONLINE IM_REP_EN The important bit here is the "Tape block size 512 bytes". That means the tape drive is in fixed-block-size mode. A value of 0 (zero) indicates variable-block-size mode. You can set the block size using the "mt setblk" command. For example, try "mt setblk 0" to switch to variable-block-size mode. Note that, depending on your distribution and version, the output of "mt" may not be as informative. For more information, see the tar(1) (especially the "-b" option), st(4), and mt(1) man pages. See also the following kernel files: drivers/scsi/README.st drivers/scsi/st.h -- Ben Scott <[EMAIL PROTECTED]> | The opinions expressed in this message are those of the author and do | | not represent the views or policy of any other person or organization. | | All information is provided without warranty of any kind. | _______________________________________________ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss