Hi Moritz,
I've tried to use the ADR50i, also. Now I've sent back the second device and
I don't want to try a third one. I've tested the both devices (Firmware 2.33
and 2.39) with the following setups:
Hardware:
- PIII 850 on ASUS P3B-F
- 128 MB SD-RAM
- Adaptec 29160 U2W with two 36 GB-HDs (IBM): IDs 0 and 1, last HD terminated
with active terminator; OnStream ADR50i (Firmware 2.39): ID 4, in the SCSI
bus in front of the forelast HD
Test Configurations (tested with several new retensioned tapes (now these
tapes are ready for trash because the dealer won't take back the "used"
tapes)):
RedHat Linux 7.1:
- Kernel 2.4.3-12 (RedHat) and 2.4.12 (kernel.org)
- Adaptec Dirver 5.2.4 and 6.2.1
- Adaptec Firmware 2.57 and 3.10
- Transfer Rate on Controller: 5MB and ASYNC
Solaris 8 (x86):
- Transfer Rate on Controller: 5MB and ASYNC
I've spent many hours of work. Now I'm really f***** up. I think amanda is a
very good tool, but the OnStream didn't work with amanda. Now I use a
self-developped tool (similiar to flexbackup) to backup the stuff on
harddrives.
Regards
Olaf
Am Freitag, 23. November 2001 12:24 schrieben Sie:
> hi all,
>
> this report has been sent to the onstream support. They are currently
> investigating it.
>
> My question to the list members: Does *anybody* acutally use the ADR50
> drive with amanda with success? If this is a firmware bug, more people
> should have these problems when using amanda.
>
> I will post summaries in case of notable results.
>
> Thanks,
> Moritz
>
>
>
>
> We have a problem with our new OnStream ADR50 tape streamer.
>
> Brief problem description:
> The ADR50 device writes data which it cannot read afterwards
> under certain conditions. Those conditions are described below.
>
> Hardware description:
>
> AMD Duron 750. Asus A7V133 main board. 256 MB RAM.
> Adaptec 29160N SCSI controller.
> SCSI LVD bus internal with
> 2 devices:
> HDD IBM 20 GB (scsi id 0),
> tape device OnStream ADR50 internal (scsi id 5)
> Firmware rev. 2.39
> S/N EA21J290564
> Other SCSI bus (narrow 50pin internal):
> CDROM drive (scsi id 6).
>
> Software description:
>
> OS: RedHat Linux 7.1
> kernel: 2.4.2, 2.4.9 (both RedHat patched versions;
> the problem appears with both)
> Tried Adaptec SCSI driver verison 6.1.7 (w/ kernel 2.4.2),
> 6.2.1 and 6.2.4 (w/ kernel 2.4.9); the problem appears
> with all of them
>
>
> Description of problem:
> Although the problem initially appeared when using the amanda
> backup software, it could be reproduced using a small C program
> which simulates what amanda does. The program performs the following
> steps:
> 1. open the tape device (given on the command line)
> in read/write mode
> (it remains open for all following steps)
> 2. rewind the tape.
> 3. read 32 KBytes of data from the tape.
> 4. rewind again.
> 5. write 32 KByte of data.
> 6. wait for 120 seconds
> 7. write an end of file mark
> 8. write another 1024 KBytes of data
> 9. write an end of file mark
> 10. rewind the tape
> 11. read 32 KBytes of data
> 12. try to read 32 KBytes of data, expect to get 0 bytes but
> pass the file mark
> 13. read 32 KBytes of data (file 2)
>
> When doing this, step 13 fails reproducibly. The program gets error
> code I/O error. Note that the no rewind tape device (/dev/nst0) was
> used for the tests in all cases.
>
> The most interesting part is that everything works fine when the program
> skips step 6 (wait for 120 seconds).
>
> What I have tried without success:
> * Replaced the SCSI controller
> * different kernel versions (see above)
> * different new SCSI drivers (aic7xxx, see above)
>
> Full details follow below.
>
> This is a transcript of a typical test program session:
> -------------------------------------------8<-----
> [root@hl tapetest]# ./test1 /dev/nst0
> test1: rewind... success
> test1: reading 32768 bytes using 32768 byte blocks... + success
> test1: rewind... success
> test1: writing 32768 bytes using 32768 byte blocks... + success
> test1: sleeping for 120 s...woke up.
> test1: write filemark... success
> test1: writing 1048576 bytes using 32768 byte blocks...
> ++++++++++++++++++++++++ ++++++++ success
> test1: write filemark... success
> test1: rewind... success
> test1: reading 32768 bytes using 32768 byte blocks... + success
> test1: skipping file mark... done.test1: reading 1048576 bytes using 32768
> byte blocks... Input/output error
> [root@hl tapetest]#
> -------------------------------------------8<-----
>
> /var/log/messages entries when the Input/Output error occurs:
>
> Nov 21 15:58:06 hl kernel: st0: Error with sense data: Info fld=0x40,
> Current st 09:00: sense key Medium Error Nov 21 15:58:06 hl kernel:
> Additional sense indicates Unrecovered read error
>
> Attempts to read the resulting tape using dd twice
> (two files) fail:
>
> [root@hl tapetest]# mt rewind
> [root@hl tapetest]# dd if=/dev/tape |hexdump
> 0000000 5555 5555 5555 5555 5555 5555 5555 5555
> *
> 64+0 records in
> 64+0 records out
> 0008000
> [root@hl tapetest]# dd if=/dev/tape |hexdump
> dd: reading `/dev/tape': Input/output error
> 0+0 records in
> 0+0 records out
> [root@hl tapetest]# Nov 21 16:46:50 hl kernel: st0: Error with sense data:
> Info fld=0x40, Current st09:00: sense key Medium Error Nov 21 16:46:50 hl
> kernel: Additional sense indicates Unrecovered read error
>
>
> This is the test program written in C:
> -------------------------------------------8<-----
> #include <unistd.h>
> #include <stdlib.h>
> #include <errno.h>
> #include <stdio.h>
> #include <sys/mtio.h>
> #include <fcntl.h>
>
> #define BUFSIZE (32*1024)
> #define BLOCKSIZE 512
> #define SLEEPSIZE 120
>
> char *me = "test1";
> char buf[32768];
> int fd;
>
> int tape_command(int command, int count, char *message)
> {
> struct mtop m;
> int err;
>
> m.mt_op = command;
> m.mt_count = count;
> fprintf(stderr, "%s: %s... ", me, message);
> err = ioctl(fd, MTIOCTOP, &m);
> if (err != 0) {
> fprintf(stderr, "failed: %s\n", me, message,
> sys_errlist[errno]); exit(1);
> }
> fprintf(stderr, " success\n");
> return 0;
> }
>
> void tape_rewind() {
> tape_command(MTREW, 1, "rewind");
> }
>
> void tape_filemark() {
> tape_command(MTWEOF, 1, "write filemark");
> }
>
> void tape_read(size_t count) {
> size_t rlen, arlen;
> fprintf(stderr, "%s: reading %d bytes using %d byte blocks... ",
> me, (int)count, (int)BUFSIZE);
> while (count > 0) {
> rlen = (count > BUFSIZE) ? BUFSIZE : count;
> if ((arlen = read(fd, buf, rlen)) == -1) {
> fprintf(stderr, "%s\n", sys_errlist[errno]);
> return;
> } else if (arlen < rlen) {
> fprintf(stderr, "short read: wanted %d, read %d\n",
> rlen, arlen);
> return;
> }
> fprintf(stderr, "+");
> count -= arlen;
> }
> fprintf(stderr, " success\n");
> }
>
> void tape_write(size_t count) {
> size_t wlen, awlen;
> memset(buf, 0x55, BUFSIZE);
> fprintf(stderr, "%s: writing %d bytes using %d byte blocks... ",
> me, (int)count, (int)BUFSIZE);
> while (count > 0) {
> wlen = (count > BUFSIZE) ? BUFSIZE : count;
> if ((awlen = write(fd, buf, wlen)) == -1) {
> fprintf(stderr, "%s\n", sys_errlist[errno]);
> return;
> }
> else if (awlen < wlen) {
> fprintf(stderr, "short write: wanted %d, wrote
> %d\n", wlen, awlen);
> return;
> }
> fprintf(stderr, "+");
> count -= awlen;
> }
> fprintf(stderr, " success\n");
> }
>
> void tape_skip_filemark() {
> /* expect the tape to be at end of file */
> fprintf(stderr, "%s: skipping file mark... ", me);
> read(fd, buf, BUFSIZE);
> fprintf(stderr, "done.");
> }
>
> void dosleep(int sec) {
> fprintf(stderr, "%s: sleeping for %d s...", me, sec);
> sleep(sec);
> fprintf(stderr, "woke up.\n");
> }
>
> int main(int argc, char **argv) {
> if (argc < 2) {
> fprintf(stderr, "usage: %s /dev/tapedevice\n", me);
> exit(1);
> }
>
> fd = open(argv[1], O_RDWR);
> if (fd < 0) {
> fprintf(stderr, "%s: open %s: %s\n", me, argv[1],
> sys_errlist[errno]);
> exit(1);
> }
>
> tape_rewind();
> tape_read(32*1024);
> tape_rewind();
> tape_write(32768);
> /* 120 s = it fails. 60 s = it does not fail */
> dosleep(120);
> tape_filemark();
> tape_write(1024*1024);
> tape_filemark();
>
> tape_rewind();
> tape_read(32*1024);
> tape_skip_filemark();
> tape_read(1024*1024);
>
> close(fd);
> return 0;
> }
> -------------------------------------------8<-----
--
######################
Starweb-Service GmbH
Olaf Seidel
Scharnweberstrasse 69
12587 Berlin
Phone: +49 30 / 64 904 - 0
Fax: +49 30 / 64 904 - 100
######################