Date: Tue, 13 Nov 2007 13:13:03 +0000 (GMT) From: "Mark Powell" <M.S.Powell@salford.ac.uk> To: freebsd-scsi@freebsd.org Cc: scottl@freebsd.org Subject: Maximum block size on scsi tape? Message-ID: <20071113130614.Y99575@rust.salford.ac.uk>
next in thread | raw e-mail | index | archive | help
Hi, I'm having trouble with large block sizes. FreeBSD 7.0-BETA2 on amd64: ahc0: <Adaptec (Compaq OEM) 3960D Ultra160 SCSI adapter> port 0xd000-0xd0ff mem 0xf5000000-0xf5000fff irq 20 at device 0.0 on pci7 ahc0: [ITHREAD] aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs ahc1: <Adaptec (Compaq OEM) 3960D Ultra160 SCSI adapter> port 0xd100-0xd1ff mem 0xf5001000-0xf5001fff irq 19 at device 0.1 on pci7 ahc1: [ITHREAD] aic7899: Ultra160 Wide Channel B, SCSI Id=7, 32/253 SCBs ... sa0 at ahc1 bus 0 target 6 lun 0 sa0: <IBM ULTRIUM-TD2 67U1> Removable Sequential Access SCSI-3 device sa0: 160.000MB/s transfers (80.000MHz DT, offset 31, 16bit) In variable block-size mode, it seems to have a 64KB maximum: # mt blocksize 0 # sdd if=/dev/random of=/dev/sa0 bs=32k count=1 sdd: Read 1 records + 0 bytes (total of 32768 bytes = 32.00k). sdd: Wrote 1 records + 0 bytes (total of 32768 bytes = 32.00k). Try to read it back without specifying a buffer size: # sdd if=/dev/sa0 -onull (sa0:ahc1:0:6:0): 32768-byte tape record bigger than supplied buffer sdd: Input/output error. Error reading '/dev/sa0'. sdd: Read 0 records + 0 bytes (total of 0 bytes = 0.00k). sdd: Wrote 0 records + 0 bytes (total of 0 bytes = 0.00k). As expect we are warned that the blocksize is 32k. Do that with 64k and we get expected behaviour too: # sdd if=/dev/random of=/dev/sa0 bs=64k count=1 sdd: Read 1 records + 0 bytes (total of 65536 bytes = 64.00k). sdd: Wrote 1 records + 0 bytes (total of 65536 bytes = 64.00k). # sdd if=/dev/sa0 -onull (sa0:ahc1:0:6:0): 65536-byte tape record bigger than supplied buffer sdd: Input/output error. Error reading '/dev/sa0'. sdd: Read 0 records + 0 bytes (total of 0 bytes = 0.00k). sdd: Wrote 0 records + 0 bytes (total of 0 bytes = 0.00k). But go beyond 64k and the blocksize seems to be limited: # sdd if=/dev/random of=/dev/sa0 bs=65k count=1 sdd: Read 1 records + 0 bytes (total of 66560 bytes = 65.00k). sdd: Wrote 1 records + 0 bytes (total of 66560 bytes = 65.00k). # sdd if=/dev/sa0 -onull (sa0:ahc1:0:6:0): 65536-byte tape record bigger than supplied buffer sdd: Input/output error. Error reading '/dev/sa0'. sdd: Read 0 records + 0 bytes (total of 0 bytes = 0.00k). sdd: Wrote 0 records + 0 bytes (total of 0 bytes = 0.00k). What's going on here? Why is blocksize getting limited to 64k? Isn't that rather small these days? An LTO-2 drive can support block sizes in the megabytes. Or is this just a problem in variable block mode? Yes, I don't understand how sa(4) really works :) Many thanks. -- Mark Powell - UNIX System Administrator - The University of Salford Information Services Division, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 6843 Fax: +44 161 295 5888 www.pgp.com for PGP key
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071113130614.Y99575>
