(Fwd) Re: SCSI tape data loss

Kern Sibbald kern at sibbald.com
Wed Aug 27 07:45:46 PDT 2003


Hello,

Many thanks for testing this ...

It seems to me that your tests, clearly indicate that
there is a problem even though you had no data loss.

When you ran without -pthread, the status
received by the program was a 0 with 141776
blocks written. This is correct.

When you ran with -pthread, the status
received by the program was a -1 with 142879
blocks written. This is "not correct".

To me, that shows very clearly that with -pthread
the 0 status was lost and more blocks were written.
In fact, in this case so many blocks were written
that the tape was not properly terminated with
an EOF (actually two EOF marks).

I suspect that you did not get missing data because
your drive is newer than Dan's and more robust in
that it let you write to the hard end of file
mark without losing data.  Note, however, 
that with -pthread, the volume is not correctly 
terminated because the weof got an error and 
was not written, then when reading back the data, 
you do get all the blocks, but the terminating
EOF is not there.  Consequently, the tape is
in a "non-correct" state. In any case, I wouldn't
want my data written to tapes without a proper
termination since a program re-reading the tape
could get very confused.

Best regards,

Kern



On Wed, 2003-08-27 at 14:44, Dan Langille wrote:
> This just in, and I'm just heading out.
> 
> ------- Forwarded message follows -------
> From:           	"Michael L. Squires" <mikes at siralan.org>
> Subject:        	Re: SCSI tape data loss
> To:             	dan at langille.org
> Date sent:      	Wed, 27 Aug 2003 07:21:30 -0500 (EST)
> Copies to:      	FreeBSD SCSI <freebsd-scsi at freebsd.org>
> 
> I ran "tapetest.c" under 4.8-STABLE and did not observe any difference
> between the version compiled with pthreads and the version compiled
> without pthreads.
> 
> Without pthreads taptest wrote and read 141,776 blocks on a DLT III (10/20GB)
> tape in a DLT4000 drive; with pthreads it wrote and read 142,879 blocks.
> 
> Results using 5.1-RELEASE running on another system were similar, i.e., no 
> difference between the number of blocks written and read using either pthreads 
> or not using pthreads.
> 
> 4.8-STABLE is running on a Supermicro P6DGH with dual PII/300's, onboard 
> Adaptec U2W controller, ADIC VLS DLT changer with DLT4000 tape drive.
> 5.1-RELEASE is running on a Supermicro P6DGH with dual PIII/850's, onboard
> Adaptec U2W controller, single DLT4000 tape drive.
> 
> MLS
> 
> >From dmesg:
> ----------------------------------------------------------------------------
> FreeBSD 4.8-STABLE #1: Mon Aug  4 21:05:33 EST 2003
>     root at newserv.siralan.org:/usr/obj/usr/src/sys/NEWSERV
> Timecounter "i8254"  frequency 1193182 Hz
> CPU: Pentium II/Pentium II Xeon/Celeron (300.68-MHz 686-class CPU)
>   Origin = "GenuineIntel"  Id = 0x634  Stepping = 4
>   Features=0x80fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,MMX>
> real memory  = 268304384 (262016K bytes)
> config> q
> avail memory = 255660032 (249668K bytes)
> 
> FreeBSD/SMP: Multiprocessor motherboard: 2 CPUs
>  cpu0 (BSP): apic id:  0, version: 0x00040011, at 0xfee00000
>  cpu1 (AP):  apic id:  1, version: 0x00040011, at 0xfee00000
>  io0 (APIC): apic id:  2, version: 0x00170011, at 0xfec00000
> 
> ahc0: <Adaptec aic7896/97 Ultra2 SCSI adapter> port 0xe000-0xe0ff mem 0xfebfd000-0xfebfdfff irq 10 at device 14.0 on pci0
> aic7896/97: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs
> ahc1: <Adaptec aic7896/97 Ultra2 SCSI adapter> port 0xe400-0xe4ff mem 0xfebfe000-0xfebfefff irq 10 at device 14.1 on pci0
> aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs
> 
> SMP: AP CPU #1 Launched!
> 
> sa0 at ahc2 bus 0 target 2 lun 0
> sa0: <Quantum DLT4000 CD50> Removable Sequential Access SCSI-2 device 
> sa0: 10.000MB/s transfers (10.000MHz, offset 15)
> ----------------------------------------------------------------------------
> 
> Tapetest output:
> 
> no pthread:
> 
> Write failed.  Last block writen=141776.  stat=0 ERR=Unknown error: 0
> End of tape
> Total files=1, blocks=141776, bytes = 556318720
> 
> with pthread:
> 
> rawfill:
> Write failed.  Last block written=142879. stat=-1 ERR No space left on device
> 
> scan:
> Bad status from read -1.  ERR=Input/output error
> 142879 blocks of 64512 bytes in file 0
> 
> Mike Squires
> 
> ------- End of forwarded message -------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-scsi/attachments/20030827/a85d0083/attachment.bin


More information about the freebsd-scsi mailing list