From: hannuk@cs.tamu.edu (Hannu H Kari)
Newsgroups: comp.periphs.scsi
Subject: SCSI-disk retry/repair procedures
Date: 16 Apr 92 16:08:45 GMT
Organization: Computer Science Department, Texas A&M University

Hello, I'm doing my PhD research on disk arrays (RAID-x, x=0,1,4,5).
The main focus is the effect of the repair algorithms on the disk
system performance. My approach is using simulation and I'm trying to 
get as close model as possible to the "real world". The key questions 
are like "Can we promice certain response time for requests, even 
when they might be some disk faults" or "How much the performance 
degrades when we are repairing the disk array". Like in a multimedia 
system, tough real time requirements should be maintained.

As a model of real world I've been using a model of a SCSI disk. 
I've been trying to read the SCSI specs but
there are few questions that I haven't found answers yet. 

1. Retry procedure
	
	When a read/write error occurs in a SCSI disk, it can 
	be configured to retry automatically again with specific 
	numbers of times. 

	For my model, I'd need to know the exact retry process (and 
	how long it takes). I've understood that the disk makes a 
	recalibration (seek to track zero and back) after each fault. 
	Then, the disks tries the same read/write operation again
	(only for the faulty sector or all requested sectors?).

	Is there anything else?

	For example, the disk keeps a record of "disk statistics".
	This information contains (for example) the retry and error 
	counts. However, I was once told that this information is 
	not updated (to disk) after every error but only now and then.
	Is that true?

2. Reassign block procedure

	When a sector fault (="bad sector") has occurred on a disk,
	it can be repaired using a remapping procedure (reassign a 
	new block for the faulty address). 

	Usually, there can be one (or more) spare sector(s) on each 
	track for this purposes. In addition, there is an extra area
	at the end of the disk for more spare sectors. The number of 
	space sectors is defined when the disk is formatted. 

	I'd guess that the disk keeps (in RAM) the remapping table
	but that information should be stored permanently also on 
	the disk somewhere. Is the information stored in one location
	or in every track separately. I mean, do we have one table
	containing whole remapping information or is the remapping
	information distributed on all tracks?

3. Percentage of faulty sectors

	What is the percentage of faulty sectors on a general SCSI
	disk (1%, 0.1%, 0.01% of the disk space)? The order of 
	magnitude is enough. 

	This information is (more or less) vendor specific and 
	well kept secret but any practical experiences?

4. Last error

	In SCSI-spec, there is one field/register/command to get 
	information about the last error on the unit. In practical 
	disks, does this information contain all neccessary info 
	to locate the fault (e.g. at what sector)? Especially, 
	is this field updated when a retry occurs?

	I have some ideas of using the retry count in early detection 
	of sector faults and I could use that field if it 
	provides enough information.

Regards Hannu H. Kari

Texas A&M University, 
Computer Science Department
------------------------------------------------------------------------
!             Hannu H. Kari               ! Nothing is important,      !
! in USA:     hannuk@cs.tamu.edu          ! except gardening.          !
! in Finland: Kari_Hannu_FRL@smail.icl.fi ! And even the gardening     !
!					  ! is not so important.       !
!					  !   (Chinese proverb)        !
------------------------------------------------------------------------