pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/35231: sysutils/amanda-server: poor changer support / short reads
>Number: 35231
>Category: pkg
>Synopsis: sysutils/amanda-server: poor changer support / short reads
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 11 03:10:00 +0000 2006
>Originator: agrier%poofygoof.com@localhost
>Release: amanda-server-2.4.4p4nb4
>Organization:
Aaron J. Grier | "Not your ordinary poofy goof." |
agrier%poofygoof.com@localhost
>Environment:
System: NetBSD boromir.poofy.goof.com 3.0_STABLE NetBSD 3.0_STABLE (GENERIC)
#0: Sat Jan 21 21:26:09 PST 2006
agrier%boromir.poofy.goof.com@localhost:/amd/aragorn/usr/projects/NetBSD/netbsd-3/src/sys/arch/i386/compile/GENERIC
i386
Architecture: i386
Machine: i386
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
ch0 at scsibus1 target 0 lun 0: <ADIC, Scalar DLT 448, 0114> changer removable
ch0: 17 slots, 2 drives, 1 picker, 1 portal
ch0: async, 8-bit transfers
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
st1 at scsibus1 target 2 lun 0: <QUANTUM, DLT8000, 0119> tape removable
st1: density code 65, variable blocks, write-enabled
st1: sync (100.00ns offset 8), 16-bit (20.000MB/s) transfers
>Description:
two problems:
1) chg-chio doesn't wait for a tape to come ready after loading it,
which causes subsequent tape manipulations to fail.
2) amanda defaults to 32kB block sizes, but read() will only return 32kB
or smaller results on raw st device if the tape actually contains
<= 32kB blocks.
>How-To-Repeat:
1)
amtape default current
this fails if the loader isn't fast enough, which it isn't for my
DLT8000s. (I assume other people would run into the same problem.)
2)
# write > 32kB blocks to a tape, and rewind it
dd if=/dev/zero of=/dev/rst0 bs=64k count=10
# attempt to run amtapetype on it:
amtapetype -f /dev/nrst0
amtapetype: /dev/nrst0: reading label: Input/output error
and in syslog:
/netbsd: st0: 65536-byte tape record too big for 32768-byte user buffer
>Fix:
for problem #1:
--- changer-src/chg-chio.pl.in.orig 2006-12-11 01:49:49.000000000 +0000
+++ changer-src/chg-chio.pl.in 2006-12-11 01:56:15.000000000 +0000
@@ -281,6 +281,13 @@
print "$progname: cannot '@CHIO@ -f $changerDevice move' tape
$tape into drive 0\n";
exit(2);
}
+
+ # wait for tape to load
+ do {
+ print LOG &do_time(), ": waiting for tape to load\n";
+ sleep 30;
+ } while ( system("$MT $MTF $tapeDevice status > /dev/null 2>&1" ) );
+
print LOG &do_time(), ": leave: Load\n";
}
@@ -302,8 +309,8 @@
# firmware rev but for now it's safest to just explicitly eject
# the tape before moving the cartridge.
#
- if ( system ("@MT@ @MT_FILE_FLAG@ $tapeDevice offline") ) {
- print "$progname: Warning, failed to eject the tape with '@MT@
@MT_FILE_FLAG@ $tapeDevice offline'\n";
+ if ( system ("$MT $MTF $tapeDevice offline") ) {
+ print "$progname: Warning, failed to eject the tape with '$MT
$MTF $tapeDevice offline'\n";
# NB: not fatal; let chio try it's thing
}
@@ -370,7 +377,7 @@
print "<none> mt program not found\n";
exit(1);
}
-print LOG &do_time(), "MT -> $MT $MTF\n";
+print LOG &do_time(), ": MT -> $MT $MTF\n";
system ("$MT $MTF $tapeDevice rewind")
unless $currentTape == 0;
for problem #2:
Index: sysutils/amanda-common/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/amanda-common/Makefile.common,v
retrieving revision 1.23
diff -u -r1.23 Makefile.common
--- sysutils/amanda-common/Makefile.common 2 Oct 2006 21:05:44 -0000
1.23
+++ sysutils/amanda-common/Makefile.common 11 Dec 2006 02:27:27 -0000
@@ -44,3 +44,4 @@
CONFIGURE_ARGS+= --with-gnutar-listdir=${AMANDA_VAR}/gnutar-lists
CONFIGURE_ARGS+= --with-dump-honor-nodump
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --with-maxtapeblocksize=64
Home |
Main Index |
Thread Index |
Old Index