Subject: amanda
To: NetBSD Users <netbsd-users@NetBSD.org>
From: Aaron J. Grier <agrier@poofygoof.com>
List: netbsd-users
Date: 12/08/2006 15:59:36
On Thu, Nov 30, 2006 at 12:58:19PM -0500, Greg Troxel wrote:
> amanda (www.amanda.org, see pkgsrc/sysutils) works well on NetBSD, and
> does dumps to holding disk and then streams it to tape.  It's a bit
> complicated to set up, but I'd set it up even for a single machine.
> Once set up it's very low hassle - in my group at BBN we have 3 amanda
> configs backing up ~135GB in ~170 filesystems.

I looked into it again...  and ran into the orignal poster's problem
when running amtapetype on my DLT8000s.  (Greg Woods and Hauke Fath have
run into this trouble before as well.)

ahc2 at pci0 dev 9 function 0: Adaptec 2944 Ultra SCSI adapter
ahc2: interrupting at irq 10
ahc2: aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs
scsibus1 at ahc2: 16 targets, 8 luns per target
[...]
st0 at scsibus1 target 1 lun 0: <QUANTUM, DLT8000, 0119> tape removable
st0: drive empty
st0: sync (100.00ns offset 8), 16-bit (20.000MB/s) transfers

$ amtapetype -f /dev/nrst0

/netbsd: st0: 65536-byte tape record too big for 32768-byte user buffer 
/netbsd: st0(ahc2:0:1:0):  Check Condition on CDB: 0x08 00 00 80 00 00
/netbsd: SENSE KEY:  No Additional Sense
/netbsd: Incorrect Length Indicator Set
/netbsd: INFO FIELD:  -32768
/netbsd: COMMAND INFO:  1 (0x1)
/netbsd: ASC/ASCQ:  No Additional Sense Information

I was able to work around it by:

$ mt -f /dev/nrst0 setblk 32768
$ dd if=/dev/zero of=/dev/rst0 bs=32k count=10
$ dd if=/dev/rst0 of=/dev/null bs=32k count=10

and then amtapetype would work.

I need to grovel the source code for amanda; I suspect that if
amtapetype did the proper block size ioctl() before reading a tape
label, things would work correctly with block sizes other than 32k.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
              "silly brewer, saaz are for pils!"  --  virt