T10/99-179 rev 0
Hard Drive Self-tests
To:T10 Technical committee
From:Mark Evans
Quantum Corporation
500 McCarthy Boulevard
Milpitas, CA USA 95035英语 作文
Phone: 408-894-4019
Fax: 408-952-3620
Email: mark.
Date:26 April 1999
现在翻译1 Introduction
As the complexity of today’s systems increas, a method is needed to quickly identify the root cau of storage system problems at the end-ur’s site. Self-test routines implemented in a hard disk drive would provide a mechanism to quickly determine whether the HDD electronics or HDA are faulty or indicate that some other component is causing the system to fail. The lf-test routines could be performed by the HDD without removing it from its installation. This proposal recommends changes to SPC-x to provide the features.
2 Reference documents
Elements from the draft standard SCSI Primary Commands – 2 (SPC-2) Revision 9, 15 March 1999 are referenced in this proposal. For more detail, e the referenced claus. This draft is available at ftp:///pub/standards/io/t10/drafts/spc2-r09.pdf.
3 Overview model
3.1 The short and extended lf-tests
幼儿英语学习Two types of hard drive lf-tests are defined in this proposal. One is a short lf-test. One is an ext
diaryended lf-test. The primary goal of the short lf-test is to quickly identify if the HDD determines that it is faulty. The primary goal of the extended lf-test routine is to simplify factory testing during integration by having the HDD perform more comprehensive testing without application client intervention. A cond goal of the extended lf-test is to provide a more comprehensive test to validate the results of the short lf-test if there is any question about its effectiveness becau its time constraint did not provide sufficient test time to identify a fault condition with the HDD.
The criteria for the short lf-test are that the lf-test has three gments and completes in two minutes or less. The gments are:
1) an electrical gment wherein the drive tests its own electronics. The particular tests in this gment
are vendor specific, but as examples: this gment might include such tests as a buffer RAM test, a read/write circuitry test, and/or a test of the read/write head elements.
2) a ek/rvo gment wherein the drive tests it capability to find and rvo on data tracks. The
particular methodology ud in this test is also vendor specific.
3) a read/verify scan gment wherein the drive performs read scanning of some portion of the disk
surface. The amount and location of the surface scanned are dependent on the completion time constraint and are vendor specific.
T10/99-179r0Hard Drive Self-tests Page 2
The criteria for the extended lf-test are the same as the short lf-test with two exceptions: gment
(3) of the extended lf-test shall be a read/verify scan of all of the ur data area, and there is no maximum time limit for the drive to perform the test.
It is possible that the tests performed in gments one and two could be the same for a particular drive’s short and extended lf-tests. The time required by a drive to perform its extended lf-test is reported in the EXTENDED SELF -TEST ROUTINE COMPLETION TIME field in the Control mode page as defined in this proposal.
3.2 Self-test modes
There are two modes for each type of lf-test: a background mode and a foreground mode. In the background mode executing the lf-test routine has lower priority than rvicing any other commands.The device rver may pau execution of its lf-test routine to rvice any other command. While performing a lf-test in the background mode the device rver shall suspend the lf-test and respond to all commands within two conds. It is expected that, with exception to a possible two-cond delay in responding to a new command when no other commands are outstanding, that there will be no detectable degradation in the performance of execution of other commands while a lf-test is in progress.
While performing a lf-test in the foreground mode the device rver shall respond to all commands except REQUEST SENSE, SEND DIAGNOSTICS, [EDITOR’S NOTE: add other commands as needed here] by terminating the command with CHECK CONDITION status. It is recommended that,before an application client initiates a lf-test in the foreground mode that it should rerve the device rver before initiating the lf-test.
3.3 Test quence
The lf-tests and modes are invoked by the application client by issuing a SEND DIAGNOSTICS co
mmand to the device rver using values in the FUNCTION CODE field defined in this proposal. The device rver will then t the initiating value in the FUNCTION CODE field and t the SELF -TEST RESULTS VALUE field to be Fh in its Self-test results log page (as defined in this proposal), store the log page to non-volatile memory, and begin the first lf-test gment. After completing the first two gments, the device rver will change the value in the SELF -TEST RESULTS VALUE field to be Eh, update the log page in non-volatile memory and begin the third lf-test gment. This allows the application client to read the Self-test Results log page to determine that the read/verify gment is in progress.
The application client may query the device rver for progress by using the REQUEST SENSE command as modified by this proposal. The device rver would then report its progress through the test in the PROGRESS INDICATION field. If the content of the field is zero, then the device rver shall have completed its lf-test routine.
[EDITOR’S NOTE: U of the RECEIVE DIAGNOSTIC RESULTS command to poll for progress was considered and was rejected in favor of REQUEST SENSE for at least three reasons: 1) it was thought that one RECEIVE DIAGNOSTIC RESULTS needed to be paired with one SEND DIAGNOSTICS command so that an application client would be unable to poll multiple times during
a lf-test; 2) the description of the SEND DIAGNOSTICS command in SPC-2 says that this command is usually followed by a RECEIVE DIAGNOSTIC RESULTS command except following a lf-test ; and, 3) it was thought that most hard drives would handle a REQUEST SENSE command more easily than a RECEIVE DIAGNOSTIC RESULTS command while performing a lf-test in the foreground mode.]loo change
After a lf-test is completed or aborted the device rver shall update the SELF -TEST RESULTS VALUE field in its Self-test results log page in non-volatile memory. The application client may u LOG SENSE to read the results from up to the last twenty lf-tests performed by the device rver.
Hard Drive Self-tests T10/99-179r0Page 3
4 Mode page entry
T he following describes the EXTENDED SELF -TEST ROUTINE COMPLETION TIME field:bloodhound
[EDITOR’S NOTE: A mode page needs to be identified where this could be placed. It is recommended that bytes 10 and 11 (currently “rerved”) in the Control mode page be ud for this (e 8.3.4 in SPC-2). The following proposal assumes that this recommendation is accepted.]Table 1 – Control mode page
Bit Byte 76543
<
10
(MSB)EXTENDED SELF -TEST ROUTINE COMPLETION TIME 11(LSB)
T he EXTENDED SELF -TEST ROUTINE COMPLETION TIME is an advisory parameter that the application client may u to detemine the time in conds that the device rver requires to complete the extended lf-test routine when the device rver is not interrupted by an application client and no errors occur during execution of the routine. The application client should expect this time to increa significantly if other commands are nt to the target or if errors occur during execution of the routine.
T he EXTENDED SELF -TEST ROUTINE COMPLETION TIME field is not changeable by the application client.
5 Modifications to the REQUEST SENSE command
T he following are two propod modifications to the REQUEST SENSE command.
5.1 Self-test progress indication bit
T he following describes the inclusion of a new bit in the REQUEST SENSE command that specifies that a lf-test progress indication be returned to the application client as a respon to this command. Table 2 – REQUEST SENSE command
Bit Byte
76543210
OPERATION CODE (03h) 1
RESERVED STPI 2
RESERVED 3
RESERVED 4
ALLOCATION LENGTH 5
CONTROL
When the Self-test progress indication bit (STPI ) is t to one the device rver shall return the percent of lf-test completion in the PROGRESS INDICATION field in the n data.
5.2 Progress indication field
I f the device rver is responding to a REQUEST SENSE command where the STPI bit is t to one and the most recent lf-test is complete, then the PROGRESS INDICATION field shall contain 0000h.
T10/99-179r0Hard Drive Self-tests Page 4
6 Modifications to the SEND DIAGNOSTICS command
天津南京路
The last line in the first paragraph of this clau in SPC needs to be changed to, “Except when the S ELF T EST bit is one or the FUNCTION CODE field is not 000b, this command is usually followed by a RECEIVE DIAGNOSTIC RESULTS command (e 7.15).”delicacy
For this proposal rerved bits 7, 6 and 5 in byte 1 of the SEND DIAGNOSTICS command are changed to a FUNCTION CODE field, and rerved bit 3 in byte 1 is changed to an IMMED bit. The following table and text describes the propod changes for this command.Table 3 – SEND DIAGNO
STICS command
Bit Byte 765432
10 0OPERATION CODE (1Dh)
1
FUNCTION CODE PF IMMED S ELF T EST D EV O FF L U NIT O FF L 2
RESERVED 3
(MSB)PARAMETER LIST LENGTH 4
(LSB) 5CONTROL
When the S ELF T EST bit is t to one the FUNCTION CODE field shall be 000b. When the S ELF T EST bit is cleared to zero the content of FUNCTION CODE field is specified in the following table.
Table 4 – Function code field values
Value
Description 000b
Value to be ud when bit 2 of this byte is t to one.001b
The device rver shall start its short lf-test routine in the background mode (e note 2).010b
The device rver shall start its extended lf-test routine in the background mode (e note 2).011b
Rerved 100b Abort the current short or extended lf-test routine. This value is only valid if a previous
SEND DIAGNOSTIC command requested a Start short lf-test routine or a Start extended lf-test routine. If this condition is not true, then the device rver shall return CHECK CONDITION status. The n key shall be t to ILLEGAL REQUEST and the additional n code t to INVALID FIELD IN CDB.
101b The device rver shall start its short lf-test routine in the foreground mode (e note 3).
110b The device rver shall start its extended lf-test routine in the foreground mode (e note
3).
111b
Rerved Notes –
1) When a lf-test is completed or aborted the device rver shall log the lf-test results in the
Self-test results log page.
2) In the background mode the lf-test routine shall have lower priority than rvicing any other
commands. The device rver may pau execution of its lf-test routine to rvice any other command. While performing a lf-test in the background mode the device rver shall suspend the lf-test and respond to any command within two conds.
3) While performing a lf-test in the foreground mode the device rver shall respond to all
commands except REQUEST SENSE, SEND DIAGNOSTICS, [EDITOR’S NOTE: add other commands as needed here] by terminating the command with CHECK CONDITION status. The n
key shall be t to NOT READY (2h) with the additional n code t to LOGICAL UNIT NOT READY, DIAGNOSTICS IN PROGRESS. [EDITOR’S NOTE: a new ASC/ASCQ needs to be assigned for LOGICAL UNIT NOT READY, DIAGNOSTICS IN PROGRESS . It is recommended that this code be 04h,09h .]
Hard Drive Self-tests T10/99-179r0Page 5
Device rvers supporting FUNCTION CODE field values other than 000b for the SEND DIAGNOSTIC command, shall support the EXTENDED SELF -TEST ROUTINE COMPLETION TIME field in the Control mode page.
An immediate (IMMED ) bit of zero indicates that status shall not be returned until the requested lf-test operation has been completed.
An IMMED bit of one indicates that the device rver shall return status as soon as the command descriptor block has been validated. If the IMMED bit is t to one and the device rver does not support the IMMED bit, the command shall terminate with CHECK CONDITION status. The n key shall be t to ILLEGAL REQUEST (5h) with the additional n code t to INVALID FIELD IN CDB (24h,00h).When the IMMED bit is t to one and the lf-test routine fails, the device rver sh
all log the lf-test results and shall create a deferred error.
7 Self-test results log page
T his page provides the results from the twenty most recent lf-tests. Results from the most recent lf-test or the lf-test currently in progress shall be reported in the first lf-test log structure parameter;results from the cond most recent lf-test shall be reported in the cond lf-test log structure parameter; etc. If fewer than twenty lf-tests have occurred, the unud lf-test log structure parameter entries shall be zero filled.
T he following table describes the Self-test results log page format that shall be returned by the devices rver upon request by the from application client.
Table 5 – Self-test results log page format
B it B yte
7 6 5 4 3 2 1 0
0 P AGE CODE (xxh)
1
R ESERVED 2
(MSB)PAGE LENGTH (0xxxh) 3
(LSB)
S ELF -TEST RESULTS LOG PARAMETERS 4
.....
FIRST SELF -TEST RESULTS LOG PARAMETER 19
.....
307
.....
island fever4TWENTIETH SELF -TEST RESULTS LOG PARAMETER 323
T he PAGE CODE field shall be xxh.
[EDITOR’S NOTE: a number needs to be assigned to this log page.]
T he PAGE LENGTH field specifying the length in bytes of the parameter list that shall be transferred from the device rver to the application client shall be 0xxxh.
The following table describes the n th
SELF -TEST RESULTS LOG PARAMETER field.
T10/99-179r0Hard Drive Self-tests
Page 6Table 6 – n th lf-test results log parameter Bit
Byte
76543210 0
(MSB)PARAMETER CODE 1
(LSB) 2
D U (= 0) D S (= 0) T SD (= 0)
E TC (= 0) T MC (= 00b) L BIN (= 1) L P (= 1) 3
P ARAMETER LENGTH (08h) 4
FUNCTION CODE SELF -TEST RESULTS VALUE 5
RESERVED 6
(MSB)TIMESTAMP 7
(LSB) 8
(MSB) .....
LBA OF FIRST FAILURE 11(LSB)The FUNCTION CODE field contains the content of the FUNCTION CODE field in the SEND DIAGNOSTICS command that initiated this lf-test. See Table 4 for a description of the FUNCTION CODE field values.The following table defines the content of the SELF -TEST RESULTS VALUE field.
Table 7 – Self-test results values
Value
Description 0h
The lf-test routine completed without error.1h
The lf-test routine was aborted by the application client.2h
The lf-test routine was interrupted by the application client with a ret.3h
An unknown error occurred while the device rver was executing the lf-test routine and the device rver was unable to complete the lf-test routine.4h
The lf-test completed having a test element that failed, and the test element that failed is not known.5h
The electrical gment of the lf-test failed.6h
The rvo (and/or ek) gment of the lf-test failed.7htourism in china
The read/verify scan gment of the lf-test failed.8h-Dh
Rerved Eh
The read/verify scan gment of the lf-test is in progress Fh The lf-test routine is in progress
The content of the LBA OF FIRST FAILURE field is the first logical block address where a lf-test error occurred. The content of the LBA OF FIRST FAILURE field should be zero if no errors occurred during the lf-test or if the error that occurred is not related to a logical block address.
The TIMESTAMP field contains the total accumulated power-on hours of the device rver at the time the lf-test operation was completed. If the test is still in progress, the content of the TIMESTAMP field shall be zero.