Date: Wed, 10 Mar 1999 18:48:41 -0800 (PST) From: Matthew Jacob <mjacob@feral.com> To: Christian Weisgerber <naddy@mips.rhein-neckar.de> Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: Wangtek 51000HT tape drive Message-ID: <Pine.LNX.4.04.9903101832350.24979-100000@feral-gw> In-Reply-To: <7c755h$cv9$1@mips.rhein-neckar.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> Matthew Jacob <mjacob@feral.com> wrote: > > > > Are you saying that I should duplicate that entry for the Wangtek 5525ES > > > in the quirk table for the 51000HT? > > > > Yes. If it works, send it to me and I'll check it in in a variety of > > places. > > I've added an entry > > { > { T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "WANGTEK", > "51000*", "*"}, SA_QUIRK_FIXED|SA_QUIRK_1FM, 512 > } > > to sa_quirk_table in /sys/cam/scsi/scsi_sa.c. This gives an improvement, > but it still doesn't really work. Did you run a CAMDEBUG kernel? That should then print out: printf("found quirk entry %d\n", (int).... I had to put this in at one point because I found that the bloody quirk wasn't matching. > > Test #1 > ------- > > <insert tape> > $ echo file0 | cpio -oH crc -F $TAPE > 7 blocks > $ echo file1 | cpio -oH crc -F $TAPE > 121 blocks > $ mt rew > $ rm * > $ cpio -iF $TAPE > 7 blocks > <file is okay> > $ mt stat > ... > File Number: 0 Record Number: 7 > $ cpio -iF $TAPE > Found end of volume. Load next volume and press RETURN. > cpio: file0 not created: newer or same age version exists > 7 blocks > $ mt stat > ... > File Number: 0 Record Number: 7 > > Shouldn't the position be at file #1 after file #0 has been read? Not necessarily. Both CPIO and TAR can stop short of reading over a filemark. Also, if it's fixed block mode, some of the file/record accounting isn't right (depending on the version of the driver)- you didn't think I put the warning into the man page for no reason, eh? Here's my replication of this: fctblab.nas.nasa.gov > mt stat Mode Density Blocksize bpi Compression Current: default variable 0 0x1 ---------available modes--------- 0: default variable 0 0x1 1: default variable 0 0x1 2: default variable 0 0x1 3: default variable 0 0x1 --------------------------------- Current Driver State: at rest. --------------------------------- File Number: 0 Record Number: 0 fctblab.nas.nasa.gov > echo file0 | cpio -oH crc -F $TAPE 4070 blocks fctblab.nas.nasa.gov > echo file1 | cpio -oH crc -F $TAPE 67 blocks fctblab.nas.nasa.gov > sum file0 file1 60461 2035 file0 4931 33 file1 fctblab.nas.nasa.gov > rm file0 file1 fctblab.nas.nasa.gov > mt rew fctblab.nas.nasa.gov > cpio -iF $TAPE 4070 blocks fctblab.nas.nasa.gov > mt stat Mode Density Blocksize bpi Compression Current: default variable 0 0x1 ---------available modes--------- 0: default variable 0 0x1 1: default variable 0 0x1 2: default variable 0 0x1 3: default variable 0 0x1 --------------------------------- Current Driver State: at rest. --------------------------------- File Number: 0 Record Number: 4070 fctblab.nas.nasa.gov > mt fsf fctblab.nas.nasa.gov > mt stat Mode Density Blocksize bpi Compression Current: default variable 0 0x1 ---------available modes--------- 0: default variable 0 0x1 1: default variable 0 0x1 2: default variable 0 0x1 3: default variable 0 0x1 --------------------------------- Current Driver State: at rest. --------------------------------- File Number: 1 Record Number: 0 fctblab.nas.nasa.gov > cpio -iF $TAPE 67 blocks fctblab.nas.nasa.gov > sum file0 file1 60461 2035 file0 4931 33 file1 > > $ mt fsf > $ mt stat > ... > File Number: 1 Record Number: 0 > $ cpio -iF $TAPE > 121 blocks > <file is okay> > $ mt stat > File Number: 1 Record Number: 121 > > In real life, of course, I use something like buffer(1) or team(1). So And where are these entities? Ports collection? > lets try again: > > $ rm * > $ mt rew > <no actual rewinding happens> > $ mt stat > File Number: 0 Record Number: 0 > $ buffer -i $TAPE | cpio -i > buffer (reader): failed to read input: Input/output error > cpio: premature end of archive > $ mt stat > File Number: 1 Record Number: 20 > > Something's screwy here. Did it used to work that CPIO and/or tar would always end up in the next tape file? > > Test #2 > ------- > > <insert tape> > $ dump 0a /var > ... > DUMP: DUMP IS DONE > $ dump 0a /home > ... > DUMP: DUMP IS DONE > $ mt stat > ... > File Number: 2 Record Number: 0 > $ mt rew > $ restore t > <listing looks okay> > $ mt stat > File Number: 0 Record Number: 448 > $ restore t > Tape is not a dump tape > $ mt stat > File Number: 0 Record Number: 512 > $ mt fsf > $ mt stat > File Number: 1 Record Number: 0 > $ restore t > <listing looks okay> > $ mt stat > File Number: 1 Record Number: 1408 > $ mt rew > $ restore r > <looks okay> > $ mt stat > File Number: 0 Record Number: 7680 > $ rm -rf * > $ restore r > tape read error: Undefined error: 0 > $ mt stat > File Number: 1 Record Number: 64 > > -- Okay. Let me ponder. On the latter- I have to go off to flute quartets now. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.04.9903101832350.24979-100000>