JPH065002A - Disk device - Google Patents

Disk device

Info

Publication number
JPH065002A
JPH065002A JP18627592A JP18627592A JPH065002A JP H065002 A JPH065002 A JP H065002A JP 18627592 A JP18627592 A JP 18627592A JP 18627592 A JP18627592 A JP 18627592A JP H065002 A JPH065002 A JP H065002A
Authority
JP
Japan
Prior art keywords
disk
disk device
spare area
area
sectors
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP18627592A
Other languages
Japanese (ja)
Inventor
Masaaki Nakagawa
雅章 中川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP18627592A priority Critical patent/JPH065002A/en
Publication of JPH065002A publication Critical patent/JPH065002A/en
Pending legal-status Critical Current

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

PURPOSE:To shorten the processing time of a system, to notify the necessity of the exchange of disks to users before the exchange region is used up and to improve operability by automatically reporting the number of the remaining total sectors in the exchange region to a host computer, CONSTITUTION:A disk device, which is used in a host computer, is selected in a selection phase P1. When a certain disk is selected as the operating object, the disk device is moved to a command phase P2, and a writing instruction is received. In a data phase P3, data are written. In a status phase P4, the results of writing for the computer (presence or absence of errors) is reported into the computer. In a phase P5, a command complete message is transmitted into the computer, and the phase sequence of the writing is executed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、ディスクが少なくと
も1つ以上のグループに分割されると共に、それぞれの
グループに対して所定のセクタ数を有する交替領域を具
備し、かつ、ホストコンピュータと接続されたディスク
装置に係り、特に、ホストコンピュータに交替領域の残
りセクタ数を報告することによって、システム上での処
理時間を短縮すると共に、ユーザに対して交替領域がな
くなる前に、ディスク交換の必要性を知らせることによ
って、操作性を向上させたディスク装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention divides a disk into at least one or more groups, has a spare area having a predetermined number of sectors for each group, and is connected to a host computer. In particular, by reporting the number of remaining sectors in the spare area to the host computer, the processing time on the system is shortened, and it is necessary to replace the disk before the spare area is exhausted to the user. The present invention relates to a disk device with improved operability.

【0002】[0002]

【従来の技術】ディスクが少なくとも1つ以上のグルー
プに分割されると共に、それぞれのグループに対して所
定のセクタ数を有する交替領域を具備し、かつ、ホスト
コンピュータと接続されたディスク装置は、従来から公
知である。この従来のディスク装置では、データをディ
スクに書き込むSCSIコマンドの実行中に、交替領域
がなくなった場合、エラー終了する。
2. Description of the Related Art A disk device that is divided into at least one or more groups, has a spare area having a predetermined number of sectors for each group, and is connected to a host computer has been conventionally known. Is known from In this conventional disk device, if there is no spare area during the execution of the SCSI command for writing data to the disk, the processing ends in error.

【0003】ここで、交替領域について、簡単に述べ
る。ディスクにデータを書き込むとき、ディスク上の欠
陥によって、あるセクタへデータを書き込むことができ
ない、という事態が発生すると、そのセクタへ書き込む
代りに、予め用意された交替領域のセクタへデータを書
き込むようにしている。ところが、この交替領域が全て
使用されている場合、ライト動作を行おうとしても、エ
ラー終了してしまう。
Here, the replacement area will be briefly described. When writing data to a disk, if a situation occurs where it is not possible to write data to a certain sector due to a defect on the disk, instead of writing to that sector, write the data to a sector in the spare area prepared in advance. ing. However, if all the replacement areas are used, the write operation ends in error even if the write operation is attempted.

【0004】このエラーについては、CCM(COMMON C
OMMAND SET)規定によれば、32Hエラーと定められて
いる。具体的にいえば、「交替領域が全て使用されてし
まった」(NO DEFECT SPARELOCATION AVAILABLE)とい
うエラーである。
Regarding this error, CCM (COMMON C
According to the OMMAND SET) regulation, it is defined as a 32H error. Specifically, the error is "NO DEFECT SPARELOCATION AVAILABLE".

【0005】したがって、ユーザは、このような事態が
発生する以前に、ディスクの交換時期を正確に判断する
ためには、交替領域の残りセクタ数を知る必要がある。
図10は、ディスク上のユーザ領域と交替領域につい
て、そのレイアウトの一例を示す図である。図におい
て、X1は欠陥セクタ、R1はその交替セクタを示す。
Therefore, before such a situation occurs, the user needs to know the number of remaining sectors in the spare area in order to accurately determine the disc replacement time.
FIG. 10 is a diagram showing an example of the layout of the user area and the spare area on the disc. In the figure, X1 indicates a defective sector and R1 indicates a replacement sector.

【0006】この図10に示すように、ディスクは、複
数のグループに分割され、各ユーザ領域(エリア)に
は、それぞれ交替領域が付加されている。ここで、グル
ープとは、各ユーザエリア(領域)と交替領域とを合せ
た領域を意味し、グループ数とは、ディスクがいくつの
グループに区切られているかを示す。そして、例えばグ
ループ2で、ユーザ領域に欠陥セクタX1が生じたとき
は、そのグループ2の交替領域内の交替セクタR1に、
データを書き込む。
As shown in FIG. 10, the disc is divided into a plurality of groups, and a replacement area is added to each user area. Here, the group means an area in which each user area (area) and the replacement area are combined, and the number of groups indicates how many groups the disk is divided into. Then, for example, in the group 2, when the defective sector X1 occurs in the user area, in the replacement sector R1 in the replacement area of the group 2,
Write the data.

【0007】1つのグループで、複数の欠陥セクタが生
じたとき(例えばグループ4)は、発生した順序で、交
替領域内の交替セクタに書き込むことになる。ところ
が、この図10に示したように、グループ毎に交替領域
を設けると、あるグループでは、交替領域が不足する場
合を生じる。
When a plurality of defective sectors are generated in one group (for example, group 4), the defective sectors are written in the replacement sectors in the replacement area in the order of occurrence. However, as shown in FIG. 10, when the spare area is provided for each group, the spare area may be insufficient in a certain group.

【0008】図11は、ディスク上のユーザ領域と交替
領域について、あるグループの交替領域が不足した場合
の一例を示す図である。図において、X2は欠陥セク
タ、R2はその交替セクタを示す。この図11に示すよ
うに、例えばグループ2に多くの欠陥セクタが発生して
交替領域にセクタがなくなった場合に、新たな欠陥セク
タX2が生じたときは、他のグループ、例えばグループ
1の交替領域内の交替セクタR2にデータを書き込むこ
とができれば、このような事態に対応することは可能で
ある。
FIG. 11 is a diagram showing an example of a case where there is a shortage of replacement areas of a certain group in the user area and replacement area on the disc. In the figure, X2 indicates a defective sector and R2 indicates its replacement sector. As shown in FIG. 11, when a new defective sector X2 occurs when many defective sectors occur in the group 2 and no sectors exist in the replacement area, for example, replacement of another group, for example, the group 1 If the data can be written in the replacement sector R2 in the area, it is possible to cope with such a situation.

【0009】しかしながら、このように、他のグループ
の交替領域を使用するためには、各グループ毎に、交替
領域の残りセクタ数を知らなければならない。もし、こ
のような各グループ毎の交替領域の残りセクタ数の情報
が得られなければ、図11で説明したように、他のグル
ープの交替領域を利用することはできない。そして、従
来の装置では、このような情報は、簡単には得られなか
った。
However, as described above, in order to use the spare area of another group, it is necessary to know the number of remaining sectors of the spare area for each group. If the information on the number of remaining sectors in the spare area for each group cannot be obtained, the spare areas of other groups cannot be used as described with reference to FIG. Further, such information cannot be easily obtained by the conventional device.

【0010】従来の装置では、ユーザは、ディスク上の
交替領域の残りセクタ数を調べる方法として、交替領域
として割り当てられたセクタ数と、リード・デフェクト
・データ(READ DEFECT DATA)コマンドを発行して返え
されたデータ中に表示されている交替セクタ数との差か
ら、計算する以外に方法がなかった。このリード・デフ
ェクト・データ・コマンドは、ディスク上の欠陥セクタ
の情報を提供するSCSIコマンドである。
In the conventional device, the user issues a read defect data (READ DEFECT DATA) command as a method of checking the number of sectors remaining in the spare area on the disk. There was no other way than to calculate from the difference with the number of replacement sectors displayed in the returned data. This read defect data command is a SCSI command that provides information on defective sectors on the disk.

【0011】図12は、リード・デフェクト・データ・
コマンドの実行に対応して返送されるデータについて、
その構成を示す図である。この図12に示すデータ(RE
AD DEFECT DATA HEADER )で、バイト1のビット4で示
す「PLIST」 ビットが“1”のとき、バイト2とバイト
3のフィールドの値(16進数)は、SCSIフォーマ
ットコマンドでのディスク検査時に検出された欠陥セク
タ数×4を示す。
FIG. 12 shows read defect data.
Regarding the data returned in response to command execution,
It is a figure which shows the structure. The data (RE
In AD DEFECT DATA HEADER), when the "PLIST" bit shown in bit 4 of byte 1 is "1", the value (hexadecimal number) of the field of byte 2 and byte 3 is detected during the disk check by the SCSI format command. The number of defective sectors x 4 is shown.

【0012】この場合には、当該欠陥セクタは、交替領
域の交替セクタで代替えされずに、スキップされる。ま
た、バイト1のビット3で示す「GLIST」 ビットが
“1”のとき、同じくバイト2とバイト3のフィールド
の値(16進数)は、データライト中に検出された欠陥
セクタ数×4を示す。
In this case, the defective sector is skipped without being replaced by the replacement sector in the replacement area. When the "GLIST" bit indicated by bit 3 of byte 1 is "1", the field value (hexadecimal) of byte 2 and byte 3 also indicates the number of defective sectors detected during data write x 4. .

【0013】この場合には、当該欠陥セクタは、交替領
域の交替セクタで代替される。このように、リード・デ
フェクト・データ・コマンドを発行すれば、ディスク検
査に検出された欠陥セクタの個数および物理アドレス
と、データライト中に検出された欠陥セクタの個数およ
び物理アドレスとが返送されるので、ユーザは、ディス
ク上の欠陥セクタの情報を得ることができる。
In this case, the defective sector is replaced by the replacement sector in the replacement area. Thus, when the read defect data command is issued, the number of defective sectors and physical addresses detected by the disk inspection and the number of defective sectors and physical addresses detected during data writing are returned. Therefore, the user can obtain the information of the defective sector on the disc.

【0014】なお、図10や図11のように、ディスク
上にグループやユーザ領域、交替領域を割り当てるため
には、フォーマットコマンドを使用する。したがって、
グループの数や、ユーザ領域、交替領域の大きさ等は、
ユーザが自由に設定することが可能である。
As shown in FIGS. 10 and 11, a format command is used to allocate a group, a user area, and a spare area on the disk. Therefore,
The number of groups, the user area, the size of the replacement area, etc.
It can be set freely by the user.

【0015】ここで、SCSIコマンドの一つであるフ
ォーマットコマンドについて説明する。このフォーマッ
トコマンドは、次の図13と図14に示す構成である。
図13は、ディスク初期化時に使用されるフォーマット
コマンドのタイプ0のパラメータを示す図である。
Here, a format command which is one of the SCSI commands will be described. This format command has the structure shown in FIGS. 13 and 14 below.
FIG. 13 is a diagram showing parameters of type 0 of the format command used at the time of disk initialization.

【0016】図14は、ディスク初期化時に使用される
フォーマットコマンドのタイプ1のパラメータを示す図
である。この図13と図14に示したディスク初期化の
タイプ0,1のパラメータは、モード・セレクト・コマ
ンドによって転送される。
FIG. 14 is a diagram showing the type 1 parameters of the format command used at the time of disk initialization. The parameters of the disk initialization types 0 and 1 shown in FIGS. 13 and 14 are transferred by the mode select command.

【0017】まず、図13のディスク初期化タイプ0の
パラメータは、図10や図11に示したユーザ領域、お
よび交替領域の大きさを決定する。また、このパラメー
タは、グループ当りのユーザ領域数、および交替領域数
を設定し、ディスクの容量(総セクタ数)を、「バイト
4〜バイト7」と「バイト8とバイト9」との和で除し
た値(商)が、グループ数になる。
First, the parameters of the disk initialization type 0 shown in FIG. 13 determine the sizes of the user area and the spare area shown in FIGS. In addition, this parameter sets the number of user areas and the number of alternate areas per group, and the disk capacity (total number of sectors) is the sum of "byte 4 to byte 7" and "byte 8 and byte 9". The divided value (quotient) becomes the number of groups.

【0018】この図13で、「バイト4〜バイト7」
は、ユーザ領域(リード/ライトを行う領域)として割
り当てられるセクタ数、「バイト8とバイト9」は、交
替領域(ユーザ領域中に欠陥セクタが検出された場合に
代替えされる交替セクタ領域)のセクタ数を示す。この
図13に示すパラメータを設定した後、SCSIフォー
マットコマンドを発行することによって、図10や図1
1のように、ユーザ領域と交替領域が割り当てられる。
In FIG. 13, "byte 4 to byte 7"
Is the number of sectors allocated as a user area (read / write area), and “byte 8 and byte 9” is a replacement area (a replacement sector area that is replaced when a defective sector is detected in the user area). Indicates the number of sectors. By setting the parameters shown in FIG. 13 and then issuing a SCSI format command, as shown in FIG.
As in 1, the user area and the spare area are assigned.

【0019】次に、図14のディスク初期化タイプ1の
パラメータは、図10や図11に示したグループ数、お
よびそのグループ中に割り当てられる交替領域の大きさ
を決定する。そして、ディスクの容量(総セクタ数)
を、「バイト4〜バイト7」のグループ数で割つた値
(商)が、1グループ当りの「ユーザ領域数+交替領域
数」となる。
Next, the parameters of the disk initialization type 1 in FIG. 14 determine the number of groups shown in FIGS. 10 and 11 and the size of the spare area allocated in the groups. And disk capacity (total number of sectors)
Is divided by the number of groups of “byte 4 to byte 7” to be “the number of user areas + the number of replacement areas” per group.

【0020】したがって、この商と「交替領域数」との
差が、ユーザ領域数となる。この図14で、「バイト4
〜バイト7」は、ディスク上に区切られたグループ(ユ
ーザ領域+交替領域)の数を示す。また、図13のタイ
プ0と同様に、このタイプ1のパラメータを設定した
後、SCSIフォーマットコマンドを発行することによ
って、図10や図11のようなレイアウトが得られる。
Therefore, the difference between this quotient and the "number of replacement areas" is the number of user areas. In this Figure 14, "byte 4
"Byte 7" indicates the number of groups (user area + replacement area) divided on the disk. Further, as in the case of the type 0 of FIG. 13, after the parameters of the type 1 are set and the SCSI format command is issued, the layout shown in FIGS.

【0021】以上のように、図13と図14に示したデ
ィスク初期化のタイプ0,1のパラメータを使用するこ
とによって、図10や図11のように、ディスク上にグ
ループやユーザ領域、交替領域を設定することができ
る。しかし、そのグループ数やユーザ領域数等は、これ
らのパラメータによる設定値から計算して求める必要が
あり、従来の装置では、直ちにこれらの情報が得られる
訳ではない。
As described above, by using the parameters 0 and 1 of the disk initialization type shown in FIG. 13 and FIG. 14, the groups, user areas, and replacements are made on the disk as shown in FIG. 10 and FIG. You can set the area. However, the number of groups, the number of user areas, and the like need to be calculated and obtained from the setting values of these parameters, and the conventional device cannot obtain such information immediately.

【0022】すなわち、SCSIフォーマットコマンド
を発行することによって、ディスク上に、図10や図1
1に示したようなグループやユーザ領域、交替領域を設
定することができる。また、そのためのパラメータの設
定には、図13と図14に示したように、ディスク初期
化のタイプ0,1のパラメータを使用すればよい。
That is, by issuing the SCSI format command, the disk shown in FIG.
A group, a user area, and a spare area as shown in 1 can be set. For setting the parameters therefor, the parameters of the disk initialization type 0 and 1 may be used as shown in FIGS. 13 and 14.

【0023】しかしながら、ディスク上に設定された各
グループのユーザ領域と交替領域のセクタ数、特に、交
替領域のセクタ数は、データライトによって変化するの
で、ユーザは、ユーザ領域に欠陥セクタが生じるたび毎
に、交替領域の残りセクタ数を知るためには、複雑な計
算が必要であり、システム上での処理に時間を費やして
しまう。したがって、交替領域の残りセクタ数を管理す
る場合には、システムの負担が増加すると共に、ある一
部のグループで、交替領域の残りセクタ数がなくなった
場合に、他のグループの交替領域のセクタを使用するた
めには、管理も容易ではない、という不都合がある。
However, since the number of sectors in the user area and the spare area of each group set on the disk, in particular, the number of sectors in the spare area, changes depending on the data write, the user is required to write a defective sector in the user area each time. For each time, in order to know the number of remaining sectors in the spare area, complicated calculation is required, and time is spent for processing on the system. Therefore, when managing the number of remaining sectors in the spare area, the load on the system is increased, and when the number of remaining sectors in the spare area is exhausted in some groups, the sectors in the spare areas in other groups are exhausted. There is an inconvenience that the management is not easy to use.

【0024】また、ユーザが、交替領域の残りセクタ数
を管理していない場合には、エラー(交替領域が全て使
用されていることを示すエラー)が、唯一の交替領域に
関する情報であり、もし、エラーが発生してしまうと、
そのディスクへのデータの書き込みができなくなる。そ
のため、この残りセクタ数を管理しない場合には、エラ
ーが発生する前に、交替領域が終りに近づいたことをユ
ーザに知らせないと、大切なデータが記録できない、等
の不都合を生じる。
If the user does not manage the number of remaining sectors in the spare area, an error (error indicating that the spare area is completely used) is information regarding the sole spare area. If an error occurs,
You will not be able to write data to the disc. Therefore, if the number of remaining sectors is not managed, important data cannot be recorded unless the user is informed that the replacement area is near the end before an error occurs.

【0025】[0025]

【発明が解決しようとする課題】この発明では、従来の
ディスク装置において交替領域の残りセクタが少なくな
ったり、交替領域が全くなくなったときに生じるこのよ
うな不都合を解決し、ホストコンピュータに対して交替
領域の残りセクタを報告することによって、システム上
での計算処理を不要にすると共に、交替領域がなくなる
前に、ユーザに対してディスク交換の必要性を知らせる
ことを可能にしたディスク装置を提供することを目的と
する。
SUMMARY OF THE INVENTION The present invention solves such a problem that occurs when the number of remaining sectors in the spare area is reduced or the spare area is completely absent in the conventional disk device. Provides a disk unit that reports the remaining sectors of the spare area, eliminating the need for calculation on the system, and notifying the user of the need for disk replacement before the spare area runs out. The purpose is to do.

【0026】[0026]

【課題を解決するための手段】この発明では、第1に、
ディスクが少なくとも1つ以上のグループに分割される
と共に、それぞれのグループに対して所定のセクタ数を
有する交替領域を具備し、かつ、ホストコンピュータと
接続されたディスク装置において、データの書き込みま
たは読み出し動作の終了時に、動作の終了と、全交替領
域の残り総セクタ数とをホストコンピュータへ報告する
手段を備え、動作の終了時に、動作の終了と、全交替領
域の残り総セクタ数とを報告するように構成している。
According to the present invention, firstly,
A disk device divided into at least one or more groups, having a spare area having a predetermined number of sectors for each group, and writing or reading data in a disk device connected to a host computer Means for reporting the end of the operation and the total number of remaining sectors in all spare areas to the host computer at the end of the operation, and reporting the end of the operation and the total number of remaining sectors in all spare areas at the end of the operation. Is configured as follows.

【0027】第2に、上記第1のディスク装置におい
て、データの書き込みまたは読み出しを行ったグループ
に対する交替領域の残り総セクタ数をホストコンピュー
タへ報告する手段を備え、動作の終了時に、グループに
対する交替領域の残り総セクタ数を報告するように構成
している。
Secondly, the first disk device is provided with means for reporting to the host computer the total number of remaining sectors in the replacement area for the group in which data was written or read, and when the operation is completed, the replacement for the group is performed. It is configured to report the total number of sectors remaining in the area.

【0028】第3に、上記第1または第2のディスク装
置において、交替領域の残りセクタ数について予め設定
された所定値と、データの書き込みまたは読み出し動作
の終了時における交替領域の残り総セクタ数とを比較
し、所定値より少なくなったことを検知する残りセクタ
数検知手段を備え、残りセクタ数が所定値より少なくな
ったとき、その旨をホストコンピュータへ報告するよう
に構成している。
Thirdly, in the above-mentioned first or second disk device, a predetermined value for the number of remaining sectors in the spare area and the total number of remaining sectors in the spare area at the end of the data write or read operation. And a remaining sector number detecting means for detecting that the number of remaining sectors is less than a predetermined value, and when the number of remaining sectors is less than a predetermined value, the fact is reported to the host computer.

【0029】第4に、上記第3のディスク装置におい
て、交替領域の残りセクタ数について予め設定される所
定値は、ホストコンピュータからの指示によって設定可
能であるように構成している。
Fourthly, in the above-mentioned third disk device, the predetermined value for the number of remaining sectors in the spare area is set in advance by an instruction from the host computer.

【0030】第5に、上記第4のディスク装置におい
て、ディスク装置が、交替領域の残りセクタ数について
予め設定される所定値をホストコンピュータから受信し
た後、ディスク上のユーザがアクセス不可のディスク固
有の管理情報が記録されている非ユーザエリアに書き込
むように構成している。
Fifth, in the above-mentioned fourth disk device, after the disk device receives from the host computer a preset value for the number of remaining sectors in the spare area, the disk is inaccessible to the user on the disk. The management information is written in a non-user area where the management information is recorded.

【0031】第6に、上記第5のディスク装置におい
て、パワーオン時およびディスク交換時に、ホストコン
ピュータは、ディスク上の非ユーザエリアに書き込まれ
た交替領域の残りセクタ数の設定値を、自動的に読み出
すように構成している。
Sixth, in the fifth disk device, the host computer automatically sets the set value of the number of remaining sectors in the spare area written in the non-user area on the disk at the time of power-on and disk replacement. It is configured to read.

【0032】第7に、上記第6のディスク装置におい
て、ディスク上の非ユーザエリアに設けられた交替領域
の残りセクタ数の設定値の記録エリアに、当該設定値が
記録されているかどうかを検知する設定値記録有無検知
手段を備え、前記ディスク上の非ユーザエリアに交替領
域の残りセクタ数の設定値が記録されていないときは、
ホストコンピュータに対してその旨を警告するように構
成している。
Seventh, in the sixth disk device, it is detected whether or not the set value is recorded in the recording area of the set value of the number of remaining sectors of the spare area provided in the non-user area on the disk. When the set value of the number of remaining sectors in the spare area is not recorded in the non-user area on the disc,
It is configured to warn the host computer to that effect.

【0033】[0033]

【作用】この発明では、ホストコンピュータに交替領域
の残りのセクタ数を報告することにより、交替領域の残
りのセクタ数の計算を不要にしてシステム上での処理時
間を短縮すると共に、ユーザに対して交替領域がなくな
る前に、ディスク交換の必要性を知らせるようにして、
操作性を向上させている(請求項1の発明)。また、グ
ループに対する交替領域の残りのセクタ数を報告するこ
とにより、例えば、先の図11に関連して説明したよう
に、グループ2に多くの欠陥セクタが発生して交替領域
にセクタがなくなった場合に、新たな欠陥セクタX2が
生じたときでも、他のグループ、例えばグループ1の交
替領域に空きセクタがあれば、直ちにそのグループ1の
交替領域内の交替セクタR2にデータを書き込むことを
可能にする(請求項2の発明)。
According to the present invention, by reporting to the host computer the number of sectors remaining in the spare area, it is not necessary to calculate the number of sectors remaining in the spare area, thereby shortening the processing time on the system and at the same time for the user. Before the replacement area runs out, let us know the need for disk replacement,
Operability is improved (the invention of claim 1). In addition, by reporting the number of remaining sectors in the spare area for the group, for example, as described above with reference to FIG. 11, many defective sectors occur in the group 2 and the spare area has no sectors. In this case, even if a new defective sector X2 occurs, if there is a free sector in the spare area of another group, for example, the group 1, it is possible to immediately write data to the spare sector R2 in the spare area of the group 1. (The invention of claim 2).

【0034】したがって、図10や図11のように、ユ
ーザ領域と交替領域とがグループに分割されていても、
他のグループの交替領域を迅速に利用することができ、
全てのグループにおいて交替領域がなくなったとき、ラ
イト動作はエラー終了(交替領域が全て使用されたこと
を示す)する。また、それ以前の交替領域が少なくなっ
た時点では、データを書き込もうとすると、エラー終了
する可能性が高くなるので、予めユーザに知らせる(請
求項3の発明)。
Therefore, even if the user area and the spare area are divided into groups as shown in FIGS. 10 and 11,
You can use the spare area of other groups quickly,
When there are no spare areas in all groups, the write operation ends in error (indicating that all spare areas have been used). Further, at the time when the number of spare areas before that is small, there is a high possibility that the process will end in error when writing data, so the user is informed in advance (the invention of claim 3).

【0035】[0035]

【実施例1】次に、この発明のディスク装置について、
図面を参照しながら、その実施例を詳細に説明する。こ
の実施例は、主として、請求項1の発明に関連している
が、請求項2から請求項7の発明とも関連している。
[Embodiment 1] Next, regarding the disk device of the present invention,
The embodiments will be described in detail with reference to the drawings. This embodiment is mainly related to the invention of claim 1, but is also related to the inventions of claims 2 to 7.

【0036】図1は、この発明のディスク装置につい
て、その要部構成の一実施例を示す機能ブロック図であ
る。図において、1はSCSIコントロール部で、11
はそのCPU、12はROM、13はRAM、14はデ
ータバッファ、15はSCSIコントローラ、2はディ
スク制御部、3はディスク、4はホストコンピュータ、
5はSCSIバスを示す。
FIG. 1 is a functional block diagram showing an embodiment of the main configuration of the disk device of the present invention. In the figure, 1 is a SCSI control unit, 11
Is its CPU, 12 is ROM, 13 is RAM, 14 is a data buffer, 15 is a SCSI controller, 2 is a disk controller, 3 is a disk, 4 is a host computer,
5 indicates a SCSI bus.

【0037】この図1に示すこの発明のディスク装置に
は、ホストコンピュータ4がSCSIバス5上に接続さ
れている。すなわち、ディスク装置とホストコンピュー
タ4とのインターフェースは、SCSIインターフェー
ス装置である。その構成は、SCSIコントロール部1
が、後出の図3や図5、図8、図9等に従った制御を行
う点、および、SCSIコントロール部1内のRAM1
3に、後出の図4や図6に示す交替領域残数報告メッセ
ージ用のマップを設ける点で、従来の装置と異なってい
る。
In the disk device of the present invention shown in FIG. 1, a host computer 4 is connected on a SCSI bus 5. That is, the interface between the disk device and the host computer 4 is a SCSI interface device. The configuration is SCSI control unit 1
However, the point of performing control according to FIG. 3, FIG. 5, FIG. 8, FIG. 9 and the like described later, and the RAM 1 in the SCSI control unit 1.
3 is different from the conventional device in that a map for the spare area remaining number report message shown in FIG. 4 and FIG.

【0038】まず、通常の書き込み処理(ライトコマン
ド)のフェーズシーケンスについて説明する。図2は、
ディスク装置における通常の書き込み処理のフェーズシ
ーケンスの構成を示す図である。図において、P1〜P
5はフェーズを示す。
First, the phase sequence of a normal write process (write command) will be described. Figure 2
It is a figure which shows the structure of the phase sequence of the normal write process in a disk device. In the figure, P1 to P
Reference numeral 5 indicates a phase.

【0039】通常のコマンドシーケンスは、この図2に
示すように、 セレクション・フェーズP1 コマンド・フェーズP2 データ・フェーズP3 ステータス・フェーズP4 メッセージ・イン・フェーズP5 の順になっている。
As shown in FIG. 2, the normal command sequence is as follows: selection phase P1 command phase P2 data phase P3 status phase P4 message in phase P5.

【0040】各フェーズの内容と動作は、次のとおりで
ある。セレクション・フェーズP1で、ホストコンピュ
ータ4が、使用するディスク装置を選択する。あるディ
スク装置が操作対象として選択されると、そのディスク
装置は、コマンド・フェーズP2へ移行し、書き込み命
令(ライトコマンド)を受信して、データ・フェーズP
3へ移行する。
The contents and operation of each phase are as follows. In the selection phase P1, the host computer 4 selects the disk device to be used. When a disk device is selected as an operation target, the disk device shifts to the command phase P2, receives a write command (write command), and then the data phase P2.
Move to 3.

【0041】データ・フェーズP3では、ディスクに書
き込むデータを受信して、データの書き込みを行う。次
のステータス・フェーズP4で、ホストコンピュータ4
に対して、書き込み処理の結果(エラーがあるか否かの
報告)を報告する。
In the data phase P3, the data to be written on the disk is received and the data is written. In the next status phase P4, the host computer 4
, The result of the writing process (reporting whether there is an error) is reported.

【0042】メッセージ・イン・フェーズP5で、コマ
ンド・コンプリート・メッセージをホストコンピュータ
4へ送信して、ライトコマンドを終了する。書き込み処
理のフェーズシーケンスは、以上のようにして実行され
る。この発明のディスク装置では、通常の書き込み処理
において、ステータス・フェーズP4から移行した直後
のメッセージ・イン・フェーズ(P5)で、全交替領域
の総残りセクタ数を報告するように構成している。
In the message in phase P5, the command complete message is transmitted to the host computer 4, and the write command is completed. The phase sequence of the writing process is executed as described above. In the disk device of the present invention, in the normal write processing, the total number of remaining sectors in all the replacement areas is reported in the message in phase (P5) immediately after the status phase P4.

【0043】図3は、この発明のディスク装置における
通常の書き込み処理のフェーズシーケンスの構成の一実
施例を示す図である。図における符号は図2と同様であ
り、また、P51とP52はメッセージ・イン・フェー
ズを示す。
FIG. 3 is a diagram showing an embodiment of the construction of a phase sequence of a normal writing process in the disk device of the present invention. The reference numerals in the figure are the same as those in FIG. 2, and P51 and P52 indicate the message in phase.

【0044】この図3に示すように、この発明のディス
ク装置では、ライトコマンドのステータス・フェーズP
4で書き込み処理の結果を報告した後、メッセージ・イ
ン・フェーズ(P51,P52)へ移行すると、メッセ
ージ・イン・フェーズP51で、全交替領域の総残りセ
クタ数を報告し、同じメッセージ・イン・フェーズP5
2で、ホストコンピュータ4へ送出して、ライトコマン
ドを終了する。
As shown in FIG. 3, in the disk device of the present invention, the status phase P of the write command is written.
After reporting the result of the write processing in step 4, when the process moves to the message in phase (P51, P52), the total number of remaining sectors in all replacement areas is reported in the message in phase P51, and the same message in phase Phase P5
In step 2, the write command is sent to the host computer 4 to end the write command.

【0045】したがって、図2に示した通常のコマンド
シーケンスとの相違点は、ステータス・フェーズP4の
直後のメッセージ・イン・フェーズ(P5)で、コマン
ド・コンプリート・メッセージ(P52)を送出する直
前に、全交替領域の総残りセクタ数の報告メッセージ
(P51)をホストコンピュータ4へ送信すること、と
いうことができる。
Therefore, the difference from the normal command sequence shown in FIG. 2 is in the message in phase (P5) immediately after the status phase P4, immediately before the command complete message (P52) is sent. It can be said that the report message (P51) of the total number of remaining sectors in all the replacement areas is transmitted to the host computer 4.

【0046】[0046]

【実施例2】次に、この発明のディスク装置について、
第2の実施例を説明する。この実施例は、主として、請
求項2の発明に関連している。この実施例では、先の第
1の実施例のように、単に、全交替領域の総残りセクタ
数の報告メッセージを送信するだけでなく、アクセスし
たグループ(SCSIフォーマットで分割された領域)
に対する交替領域の総残りセクタ数について、ホストコ
ンピュータへ報告する点に特徴を有している。
[Embodiment 2] Next, regarding the disk device of the present invention,
A second embodiment will be described. This embodiment mainly relates to the invention of claim 2. In this embodiment, as in the first embodiment described above, not only is a report message of the total number of remaining sectors in all replacement areas transmitted, but also an accessed group (area divided by the SCSI format).
It is characterized in that it reports to the host computer the total number of remaining sectors in the replacement area for the.

【0047】したがって、そのハード構成や書き込み処
理のフェーズシーケンスの構成は、基本的に先の第1の
実施例と同様である。ここでは、この発明のディスク装
置において使用する交替領域残数の報告メッセージにつ
いて、その一例を説明する。
Therefore, the hardware constitution and the constitution of the phase sequence of the writing process are basically the same as those of the first embodiment. Here, an example of the spare area remaining number report message used in the disk device of the present invention will be described.

【0048】図4は、この発明のディスク装置において
使用する交替領域残数報告メッセージの構成について、
その一実施例を示す図である。この図4に示すように、
交替領域残数報告メッセージは、拡張メッセージ(2バ
イト以上で構成されるメッセージ)である。
FIG. 4 shows the structure of the spare area remaining number report message used in the disk device of the present invention.
It is a figure which shows the one Example. As shown in this FIG.
The spare area remaining number report message is an extended message (a message composed of 2 bytes or more).

【0049】まず、バイト0は、拡張メッセージである
ことを示す。バイト1は、このメッセージの長さ、バイ
ト2は、交替領域残数報告メッセージであることを示
す。バイト3は、全交替領域を示す番号で、値を“0
0”のように設定する。
First, byte 0 indicates an extension message. Byte 1 indicates the length of this message, and byte 2 indicates the spare area remaining number report message. Byte 3 is a number that indicates all the replacement areas, and the value is "0.
Set it like 0 ".

【0050】バイト4は、全交替領域に対する残りセク
タ数を示す。バイト5は、当該ライトコマンドがアクセ
スしたグループ番号、バイト6は、そのグループに対す
る交替領域の残りセクタ数を示す。
Byte 4 indicates the number of remaining sectors for all replacement areas. Byte 5 indicates the group number accessed by the write command, and byte 6 indicates the number of remaining sectors in the spare area for that group.

【0051】バイト7以降は省略しているが、複数のグ
ループをアクセスした場合、このバイト7以降に、先の
バイト5,6の内容(グループ番号,そのグループの交
替領域の残りセクタ数のメッセージ)を続ける。この交
替領域残数報告メッセージは、メモリ(図1のSCSI
コントロール部1内のRAM13)内に設けられたマッ
プ、すなわち、交替領域残数報告マップとして記録され
る。
Although bytes 7 and later are omitted, when a plurality of groups are accessed, the contents of the previous bytes 5 and 6 (group number, message of the number of remaining sectors in the spare area of the group) ) Continue. This spare area remaining number report message is sent to the memory (SCSI of FIG. 1).
It is recorded as a map provided in the RAM 13) in the control unit 1, that is, a spare area remaining number report map.

【0052】そして、欠陥セクタが生じて、交替領域が
使用されるたび毎に、交替領域の残りセクタ数を計算し
て記録しておき、アクセス終了時に読み出す。以上のよ
うな構成の交替領域残数報告メッセージを送出すること
により、アクセスしたグループに対する交替領域の総残
りセクタ数についても、ホストコンピュータへ報告する
ことができる。
Each time a defective sector occurs and the spare area is used, the number of sectors remaining in the spare area is calculated and recorded, and is read at the end of access. By sending the spare area remaining number report message having the above configuration, the total number of spare sectors in the spare area for the accessed group can also be reported to the host computer.

【0053】[0053]

【実施例3】次に、第3の実施例を説明する。この実施
例は、主として、請求項3の発明に関連しているが、請
求項1と請求項2の発明とも関連している。この実施例
では、交替領域の残りセクタ数が、所定の設定値(全交
替領域に対する設定値と、1グループ当りの交替領域に
対する設定値)よりも少なくなったときに、交替領域の
残りセクタ数を、ホストコンピュータへ報告する点に特
徴を有している。
Third Embodiment Next, a third embodiment will be described. This embodiment is mainly related to the invention of claim 3, but is also related to the inventions of claim 1 and claim 2. In this embodiment, when the number of remaining sectors in the spare area becomes smaller than a predetermined set value (set value for all spare areas and set value for spare area per group), the number of remaining sectors in the spare area Is reported to the host computer.

【0054】この第3の実施例でも、そのハード構成や
書き込み処理のフェーズシーケンスの構成は、基本的に
先の第1の実施例および第2の実施例と同様である。こ
こで、この発明のディスク装置について、フローチャー
トによりその動作を説明する。
Also in the third embodiment, the hardware configuration and the configuration of the phase sequence of the writing process are basically the same as those of the first and second embodiments. The operation of the disk device of the present invention will be described below with reference to a flowchart.

【0055】図5は、この発明のディスク装置におい
て、交替領域の残りセクタ数の検出時の主要な処理の流
れを示すフローチャートである。図において、#1〜#
8はステップを示す。
FIG. 5 is a flow chart showing the main processing flow when detecting the number of remaining sectors in the spare area in the disk device of the present invention. In the figure, # 1 to #
8 indicates a step.

【0056】システムのディスク装置が、ホストコンピ
ュータからのライトコマンドを受信すると、当該ディス
ク装置は、ディスクにデータを書き込む。そして、アク
セスしたグループに対するデータの書き込み中に、欠陥
セクタを検出する(ステップ#1)と、ステップ#2へ
進む。
When the disk device of the system receives the write command from the host computer, the disk device writes the data on the disk. Then, when a defective sector is detected during writing of data to the accessed group (step # 1), the process proceeds to step # 2.

【0057】ステップ#2で、アクセスしたグループ内
に、交替領域の空きセクタがあるかどうかチェックす
る。もし、交替領域の空きセクタがあれば、次のステッ
プ#3で、当該グループ内の交替領域にデータをライト
する。ライト動作が終了すると、ステップ#5へ進む。
In step # 2, it is checked whether or not there is a free sector in the spare area in the accessed group. If there is a free sector in the spare area, in the next step # 3, data is written in the spare area in the group. When the write operation is completed, the process proceeds to step # 5.

【0058】また、交替領域の空きセクタがないとき
は、ステップ#4で、他のグループの交替領域にデータ
をライトし、ライト動作の終了後、ステップ#5へ進
む。ステップ#5では、グループ内の交替領域の残りセ
クタ数と、予め決定された設定値(1グループ当りの交
替領域に対する設定値)とを比較する。
If there is no free sector in the spare area, the data is written in the spare area of another group in step # 4, and after the write operation is completed, the process proceeds to step # 5. In step # 5, the number of remaining sectors in the spare area in the group is compared with a predetermined set value (set value for the spare area per group).

【0059】もし、残りセクタ数の方が、設定値よりも
大きいときは、そのままこの図5のフローを終了する。
これに対して、残りセクタ数と設定値とが等しかった
り、設定値の方が大きいときは、ステップ#6へ進む。
If the number of remaining sectors is larger than the set value, the flow of FIG. 5 is ended as it is.
On the other hand, when the number of remaining sectors is equal to the set value or the set value is larger, the process proceeds to step # 6.

【0060】ステップ#6では、当該グループ内の交替
領域の残りセクタ数を、メモリ(図1のSCSIコント
ロール部1内のRAM13)内に設けられた交替領域残
数報告マップに記録する。このマップは、先の図4に示
した交替領域残数報告メッセージ(バイト2)と同じ内
容である。
In step # 6, the number of remaining sectors in the spare area in the group is recorded in the spare area remaining number report map provided in the memory (RAM 13 in the SCSI control unit 1 in FIG. 1). This map has the same contents as the spare area remaining number report message (byte 2) shown in FIG.

【0061】次のステップ#7で、全交替領域に対する
全残りセクタ数と、全交替領域に対する所定の設定値と
を比較する。もし、全残りセクタの方が、設定値よりも
大きいときは、そのままこの図5のフローを終了する。
これに対して、全残りセクタ数と設定値とが等しかった
り、設定値の方が大きいときは、ステップ#8へ進む。
In the next step # 7, the total number of remaining sectors for all the replacement areas is compared with a predetermined set value for all the replacement areas. If all the remaining sectors are larger than the set value, the flow of FIG. 5 is ended as it is.
On the other hand, when the total number of remaining sectors is equal to the set value or the set value is larger, the process proceeds to step # 8.

【0062】ステップ#8で、全交替領域の残りセクタ
数を、同じくメモリ内に設けられた交替領域残数報告マ
ップに記録する。以上のステップ#1〜#8の処理によ
って、SCSIコントロール部1内のメモリに設けられ
た交替領域残数報告マップには、当該グループ内の交替
領域の残りセクタ数、あるいは、全交替領域に対する全
残りセクタ数が、所定の設定値よりも小さくなったと
き、その旨を示す情報(交替領域残数報告メッセージ)
が記録される。
At step # 8, the number of remaining sectors in all the spare areas is recorded in the spare area remaining number report map also provided in the memory. As a result of the above steps # 1 to # 8, the spare area remaining number report map provided in the memory in the SCSI control unit 1 shows the number of remaining sectors in the spare area in the group, or the total area for all spare areas. Information indicating that the number of remaining sectors becomes smaller than the specified value (replacement area remaining number report message)
Is recorded.

【0063】当該ディスク装置は、先の図3に関連して
説明したように、ライトコマンドが終了する直前に、メ
ッセージ・イン・フェーズ(P51)で、この交替領域
残数報告マップの内容を、交替領域残数報告メッセージ
として、ホストコンピュータへ送出する。したがって、
ユーザは、ディスクの交換時期を正確に知ることができ
る。
As described with reference to FIG. 3 above, the disk device writes the contents of this spare area remaining number report map in the message in phase (P51) immediately before the end of the write command. It is sent to the host computer as a spare area remaining number report message. Therefore,
The user can know exactly when the disc should be replaced.

【0064】[0064]

【実施例4】次に、第4の実施例を説明する。この実施
例は、主として、請求項4の発明に関連しているが、請
求項3の発明とも関連している。この実施例では、先の
第3の実施例で説明した所定の設定値(全交替領域に対
する設定値と、1グループ当りの交替領域に対する設定
値)を、ホストコンピュータから設定可能にした点に特
徴を有している。
Fourth Embodiment Next, a fourth embodiment will be described. This embodiment is mainly related to the invention of claim 4, but is also related to the invention of claim 3. This embodiment is characterized in that the predetermined setting values (setting values for all replacement areas and setting values for replacement areas per group) described in the third embodiment can be set from the host computer. have.

【0065】この第4の実施例でも、そのハード構成や
書き込み処理のフェーズシーケンスの構成は、基本的に
先の第1から第3の実施例と同様である。ここでは、こ
の発明のディスク装置について、ホストコンピュータか
らの設定値の設定コマンドを説明する。
Also in the fourth embodiment, the hardware construction and the construction of the phase sequence of the write processing are basically the same as those of the first to third embodiments. Here, for the disk device of the present invention, a command for setting a setting value from the host computer will be described.

【0066】図6は、ホストコンピュータから発行され
るパラメータ設定コマンドの構成の一実施例を示す図で
ある。パラメータ設定コマンドは、この図6に示すよう
な構成である。
FIG. 6 is a diagram showing an embodiment of the configuration of the parameter setting command issued from the host computer. The parameter setting command has a structure as shown in FIG.

【0067】すなわち、バイト0〜バイト2からなり、
バイト0は、残数報告に関するパラメータを示す。ま
た、バイト1は、全交替領域に対する設定値をセットす
るパラメータ、バイト2は、1グループ当りの交替領域
に対する設定値をセットするパラメータを示す。
That is, it consists of byte 0 to byte 2,
Byte 0 indicates a parameter related to the remaining number report. Byte 1 shows a parameter for setting the set value for all the spare areas, and byte 2 shows a parameter for setting the set value for the spare area per group.

【0068】先に説明した設定値(全交替領域に対する
設定値と、1グループ当りの交替領域に対する設定値)
は、この図6に示したパラメータ設定コマンド(ベンダ
ー・ユニーク・コマンド)によって設定される。なお、
バイト0〜2(Extended message code)は、SCSI
−IIで定義されたメッセージ表の「Vender Unique」
を使用する。
The setting values described above (setting values for all replacement areas and setting values for replacement areas per group)
Are set by the parameter setting command (vendor unique command) shown in FIG. In addition,
Bytes 0 to 2 (Extended message code) are SCSI
-"Vender Unique" in the message table defined in II
To use.

【0069】この設定値を設定するためのコマンドは、
図3に示した書き込み処理のフェーズシーケンスで、デ
ータ・フェーズP3において、当該設定値をパラメータ
として送信する。バイト1やバイト2によって送信され
た設定値は、例えば、先の図4に示したSCSIコント
ロール部1内のメモリに設けられた交替領域残数報告マ
ップ等の記録されて、ライト動作が終了する毎に、残り
セクタと比較される。
The command for setting this set value is
In the phase sequence of the writing process shown in FIG. 3, the set value is transmitted as a parameter in the data phase P3. The set value transmitted by the byte 1 or the byte 2 is recorded, for example, in the spare area remaining number report map provided in the memory in the SCSI control unit 1 shown in FIG. 4, and the write operation is completed. Each time, it is compared with the remaining sector.

【0070】[0070]

【実施例5】次に、第5の実施例を説明する。この実施
例は、主として、請求項5の発明に関連しているが、請
求項1から請求項3の発明とも関連している。この実施
例では、先の第4の実施例で説明したパラメータ設定コ
マンドによって送信されたパラメータ、すなわち、所定
の設定値(全交替領域に対する設定値と、1グループ当
りの交替領域に対する設定値)を、ディスク上のユーザ
がアクセスすることができない非ユーザエリアに記録す
る点に特徴を有している。
Fifth Embodiment Next, a fifth embodiment will be described. This embodiment is mainly related to the invention of claim 5, but is also related to the inventions of claims 1 to 3. In this embodiment, the parameters transmitted by the parameter setting command described in the fourth embodiment, that is, predetermined setting values (setting values for all replacement areas and setting values for replacement areas per group) are set. The feature is that the data is recorded in a non-user area on the disc that cannot be accessed by the user.

【0071】この第5の実施例でも、そのハード構成や
書き込み処理のフェーズシーケンスの構成は、基本的に
先の第1や第4の実施例と同様である。ここで、この発
明のディスク装置について、ディスクのレイアウトにつ
いて説明する。
Also in the fifth embodiment, the hardware construction and the construction of the phase sequence of the write processing are basically the same as those of the first and fourth embodiments. Here, the disc layout of the disc device of the present invention will be described.

【0072】図7は、ディスク上のユーザエリアと非ユ
ーザエリアについて、そのレイアウトの一例を示す図で
ある。図において、○印はバッファトラックを示す。こ
の図7に示すように、ディスク上には、例えば、トラッ
ク「−16〜−1」や「10000」〜「10015」
のように、ユーザがアクセスできない非ユーザエリアが
設けられている。
FIG. 7 is a diagram showing an example of the layout of the user area and non-user area on the disc. In the figure, a circle mark indicates a buffer track. As shown in FIG. 7, on the disc, for example, tracks "-16 to -1" and "10000" to "10015" are recorded.
, A non-user area that the user cannot access is provided.

【0073】この第5の実施例では、図7で、非ユーザ
エリア内の○印で示したバッファトラックを利用して、
ホストコンピュータからパラメータ設定コマンドによっ
て送信されたパラメータで指定された所定の設定値(全
交替領域に対する設定値と、1グループ当りの交替領域
に対する設定値)を記録する。このように、非ユーザエ
リアに記録すれば、ユーザが誤って消去してしまう恐れ
がなく、また、ディスクを使用するたび毎にパラメータ
を設定する必要もないので、ライト時間を短縮すること
ができる。
In the fifth embodiment, the buffer track indicated by a circle in the non-user area in FIG. 7 is used,
A predetermined set value (set value for all spare areas and set value for spare areas per group) designated by the parameter transmitted by the parameter setting command from the host computer is recorded. In this way, if the data is recorded in the non-user area, there is no risk that the user accidentally erases it, and there is no need to set parameters every time the disc is used, so the write time can be shortened. .

【0074】[0074]

【実施例6】次に、第6の実施例を説明する。この実施
例は、主として、請求項6の発明に関連しているが、請
求項1から請求項5の発明とも関連している。この実施
例では、先の第5の実施例で説明した非ユーザエリアに
記録されたパラメータ、すなわち、所定の設定値(全交
替領域に対する設定値と、1グループ当りの交替領域に
対する設定値)を、パワーオン時、およびディスク交換
時に、当該ディスク装置が、自動的に読み出す点に特徴
を有している。
Sixth Embodiment Next, a sixth embodiment will be described. This embodiment is mainly related to the invention of claim 6, but is also related to the inventions of claims 1 to 5. In this embodiment, the parameters recorded in the non-user area described in the fifth embodiment, that is, predetermined setting values (setting values for all replacement areas and setting values for replacement areas per group) are set. The disk device is characterized in that the disk device automatically reads the data when the power is turned on, and when the disk is replaced.

【0075】この第6の実施例でも、そのハード構成や
書き込み処理のフェーズシーケンスの構成は、基本的に
先の第1や第5の実施例と同様である。この実施例で
は、パワーオン時、およびディスク交換時に、当該ディ
スク装置は、ディスクの初期化を行うので、次に、フロ
ーチャートによってディスク初期化の動作を説明する。
Also in the sixth embodiment, the hardware structure and the phase sequence structure of the writing process are basically the same as those of the first and fifth embodiments. In this embodiment, the disk device initializes the disk when the power is turned on and when the disk is replaced. Therefore, the disk initialization operation will be described below with reference to a flowchart.

【0076】図8は、この発明のディスク装置におい
て、ディスク初期化時の主要な処理の流れを示すフロー
チャートである。図において、#11〜#15はステッ
プを示す。ステップ#11で、ライトパワー設定,交替
情報読み出し等の通常の初期化を行う。ステップ#12
で、ディスク装置は、ディスクの非ユーザエリアから、
パラメータ、すなわち、所定の設定値(全交替領域に対
する設定値と、1グループ当りの交替領域に対する設定
値)を読み出す。
FIG. 8 is a flow chart showing the main processing flow at the time of disk initialization in the disk device of the present invention. In the figure, # 11 to # 15 indicate steps. In step # 11, normal initialization such as write power setting and replacement information reading is performed. Step # 12
Then, the disk device is from the non-user area of the disk,
A parameter, that is, a predetermined setting value (setting values for all replacement areas and setting values for replacement areas per group) is read.

【0077】ステップ#13で、ディスクにパラメータ
が記録されているかどうかチェックする。もし、ディス
クにパラメータが記録されていれば、次のステップ#1
4で、メモリ(図1や図4で説明したSCSIコントロ
ール部1内のRAM13)に、当該パラメータを書き込
んで、この図8のフローを終了する。
At step # 13, it is checked whether or not the parameters are recorded on the disc. If the parameters are recorded on the disc, next step # 1
In step 4, the parameter is written in the memory (RAM 13 in the SCSI control unit 1 described with reference to FIG. 1 and FIG. 4), and the flow of FIG. 8 ends.

【0078】また、先のステップ#13でチェックした
結果、ディスクにパラメータが記録されていなければ、
ステップ#15で、警告フラグをセットして、この図8
のフローを終了する。以上のステップ#11〜#15の
処理によって、ディスクが初期化され、ディスクに記録
されているパラメータが自動的に読み出される。
As a result of checking in step # 13, if the parameter is not recorded on the disc,
In step # 15, the warning flag is set and
Ends the flow. By the processing of steps # 11 to # 15 described above, the disc is initialized and the parameters recorded on the disc are automatically read.

【0079】[0079]

【実施例7】次に、第7の実施例を説明する。この実施
例は、主として、請求項7の発明に関連しているが、請
求項1から請求項6の発明とも関連している。この実施
例では、先の第6の実施例で説明したディスクの初期化
時に、パラメータ、すなわち、所定の設定値(全交替領
域に対する設定値と、1グループ当りの交替領域に対す
る設定値)が、ディスク上に記録されていない場合、パ
ワーオン後、またはディスク交換後に、ホストコンピュ
ータに対して警告を行う点に特徴を有している。
Seventh Embodiment Next, a seventh embodiment will be described. This embodiment is mainly related to the invention of claim 7, but is also related to the inventions of claims 1 to 6. In this embodiment, at the time of initialization of the disk described in the sixth embodiment, parameters, that is, predetermined set values (set values for all replacement areas and set values for replacement areas per group) If it is not recorded on the disc, it is characterized in that a warning is given to the host computer after power-on or after disc exchange.

【0080】この第7の実施例でも、そのハード構成や
書き込み処理のフェーズシーケンスの構成は、基本的に
先の第1や第6の実施例と同様である。この発明のディ
スク装置では、先の第6の実施例で、図8に関連して説
明したように、ディスクを初期化する。
Also in the seventh embodiment, the hardware configuration and the configuration of the phase sequence of the writing process are basically the same as those of the first and sixth embodiments. In the disk device of the present invention, the disk is initialized as described in connection with FIG. 8 in the sixth embodiment.

【0081】この場合に、もし、交替領域に関するパラ
メータが、ディスクに記録されていなければ(ホストコ
ンピュータが、当該パラメータを送信していない場
合)、ホストコンピュータに対して、その旨を警告す
る。ここで、この発明のディスク装置におけるフェーズ
シーケンスによって、ディスク初期化の警告動作を説明
する。
In this case, if the parameter relating to the spare area is not recorded on the disc (when the host computer has not transmitted the parameter), the host computer is warned to that effect. Here, a disk initialization warning operation will be described by a phase sequence in the disk apparatus of the present invention.

【0082】図9は、この発明のディスク装置における
ディスク初期化時のフェーズシーケンスの構成の一実施
例を示す図である。図における符号は図3と同様であ
る。ライト動作時には、セレクション・フェーズP1
で、あるディスク装置を選択し、コマンド・フェーズP
2で、選択されたディスク装置が、ライトコマンドを受
信する。
FIG. 9 is a diagram showing an embodiment of the structure of a phase sequence at the time of disk initialization in the disk device of the present invention. Reference numerals in the figure are the same as those in FIG. During write operation, selection phase P1
, Select a disk device, and execute command phase P
At 2, the selected disk device receives the write command.

【0083】ライトコマンドを受信すると、ディスク装
置は、このコマンド・フェーズP2の終了直後に、ステ
ータス・フェーズP4へ移行して、セットされた警告フ
ラグ(図8のステップ#15)に基き、ホストコンピュ
ータにエラー(警告エラー)を返信して、メッセージ・
イン・フェーズP5で終了する(図8のフローチャー
ト)。このように、ホストコンピュータに対して、当該
パラメータが送信されていないことを警告することによ
って、選択されたディスク装置は、パラメータ(全交替
領域に対する設定値と、1グループ当りの交替領域に対
する設定値)の送出を要求するので、交替領域の残りセ
クタ数を報告する機能が維持される。
Upon reception of the write command, the disk device shifts to the status phase P4 immediately after the end of the command phase P2, and based on the set warning flag (step # 15 in FIG. 8), the host computer Error (warning error) to
The process ends in the in-phase P5 (flowchart in FIG. 8). In this way, by alerting the host computer that the parameter has not been transmitted, the selected disk device sets the parameters (setting values for all replacement areas and setting values for replacement areas per group). ) Is requested, the function of reporting the number of remaining sectors in the spare area is maintained.

【0084】[0084]

【発明の効果】請求項1の発明では、自動的に交替領域
の残り総セクタ数をホストコンピュータへ報告するよう
にしている。したがって、ユーザは、セクタの残り数を
計算する必要なしに、ディスク全体の使用状態(劣化状
態)を把握することが可能となり、操作性が向上され
る。
According to the first aspect of the invention, the total number of remaining sectors in the spare area is automatically reported to the host computer. Therefore, the user can grasp the usage state (deteriorated state) of the entire disk without having to calculate the remaining number of sectors, and the operability is improved.

【0085】請求項2の発明では、アクセスしたグルー
プに対する交替領域の残り総セクタ数をホストコンピュ
ータへ報告するようにしている。したがって、ユーザ
は、当該グループ内の交替領域の残りセクタ数を計算す
る必要なしに、当該グループ内の使用状態(劣化状態)
を把握することが可能になる。
According to the second aspect of the invention, the total number of remaining sectors in the replacement area for the accessed group is reported to the host computer. Therefore, the user does not need to calculate the number of remaining sectors in the spare area in the group, and the usage status (degradation status) in the group
It becomes possible to grasp.

【0086】また、ユーザが、交替領域の残りセクタが
少ないグループへデータを書き込むことを回避すれば、
グループ内の交替領域が全て使用されてしまったときに
生じる、他グループ内の交替領域の空きセクタへ代替え
する余分なアクセス時間も節減される。
If the user avoids writing data to a group in which the number of remaining sectors in the spare area is small,
The extra access time for substituting an empty sector in the spare area in another group, which occurs when all the spare areas in the group are used up, is also saved.

【0087】請求項3の発明では、交替領域の残りセク
タ数が、ユーザ(ホストコンピュータ)が設定した設定
値よりも少なくなったとき、ホストコンピュータへ報告
するようにしている。したがって、ユーザは、迅速かつ
正確に、ディスクの交換時期を知ることができる。
According to the third aspect of the present invention, when the number of remaining sectors in the spare area becomes smaller than the set value set by the user (host computer), it is reported to the host computer. Therefore, the user can quickly and accurately know the disc replacement timing.

【0088】請求項4の発明では、ユーザが、交替領域
の残りセクタ数の報告に関するパラメータ(設定値)
を、任意に設定することができる。したがって、ユーザ
は、独自のディスクの交換時期を判断することができ
る。
In the invention of claim 4, the user sets a parameter (setting value) relating to the report of the number of remaining sectors in the spare area.
Can be set arbitrarily. Therefore, the user can judge the replacement time of the original disc.

【0089】請求項5の発明では、ディスク上の、ユー
ザがアクセスできない非ユーザエリアに、パラメータ
(設定値)を記録する。したがって、ユーザが誤って当
該パラメータを消去してしまう、という恐れがなくな
り、また、ディスクに書き込むことによって、ディスク
を使用するたびにパラメータを設定する必要がなくなる
ので、無駄な時間も省略される。
According to the fifth aspect of the invention, the parameter (setting value) is recorded in the non-user area on the disc that cannot be accessed by the user. Therefore, there is no fear that the user accidentally erases the parameter, and by writing the disc, it is not necessary to set the parameter each time the disc is used, and thus wasteful time is also omitted.

【0090】請求項6の発明では、パワーオン時および
ディスク交換時に、請求項5の発明で記録されたパラメ
ータを自動的に読み出すようにしている。したがって、
ディスク交換時等に、ユーザが当該パラメータを読み出
す処理が不要となり、操作性が向上される。
In the sixth aspect of the invention, the parameters recorded in the fifth aspect of the invention are automatically read at the time of power-on and the disc exchange. Therefore,
The user does not need to read the parameter when exchanging the disk, and the operability is improved.

【0091】請求項7の発明では、当該パラメータがデ
ィスク上の非ユーザエリアに記録されていない場合に、
ユーザ(ホストコンピュータ)に対してその旨を警告し
て、ホストコンピュータにパラメータの送出を要求す
る。したがって、ユーザに対してに交替領域の残りセク
タ数を報告する機能が、常に維持される。
According to the invention of claim 7, when the parameter is not recorded in the non-user area on the disc,
It warns the user (host computer) of that fact and requests the host computer to send parameters. Therefore, the function of reporting the number of remaining sectors in the spare area to the user is always maintained.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明のディスク装置について、その要部構
成の一実施例を示す機能ブロック図である。
FIG. 1 is a functional block diagram showing an embodiment of a main part configuration of a disk device of the present invention.

【図2】ディスク装置における通常の書き込み処理のフ
ェーズシーケンスの構成を示す図である。
FIG. 2 is a diagram showing a configuration of a phase sequence of a normal writing process in the disk device.

【図3】この発明のディスク装置における通常の書き込
み処理のフェーズシーケンスの構成の一実施例を示す図
である。
FIG. 3 is a diagram showing an embodiment of a configuration of a phase sequence of a normal writing process in the disk device of the present invention.

【図4】この発明のディスク装置において使用する交替
領域残数報告メッセージの構成について、その一実施例
を示す図である。
FIG. 4 is a diagram showing an embodiment of the structure of a spare area remaining number report message used in the disk device of the present invention.

【図5】この発明のディスク装置において、交替領域の
残りセクタ数の検出時の主要な処理の流れを示すフロー
チャートである。
FIG. 5 is a flowchart showing a main processing flow when detecting the number of remaining sectors in the spare area in the disk device of the present invention.

【図6】ホストコンピュータから発行されるパラメータ
設定コマンドの構成の一実施例を示す図である。
FIG. 6 is a diagram showing an example of a configuration of a parameter setting command issued from a host computer.

【図7】ディスク上のユーザエリアと非ユーザエリアに
ついて、そのレイアウトの一例を示す図である。
FIG. 7 is a diagram showing an example of a layout of user areas and non-user areas on a disc.

【図8】この発明のディスク装置において、ディスク初
期化時の主要な処理の流れを示すフローチャートであ
る。
FIG. 8 is a flowchart showing a main processing flow at the time of disk initialization in the disk device of the present invention.

【図9】この発明のディスク装置におけるディスク初期
化時のフェーズシーケンスの構成の一実施例を示す図で
ある。
FIG. 9 is a diagram showing an embodiment of a configuration of a phase sequence at the time of disk initialization in the disk device of the present invention.

【図10】ディスク上のユーザエリアと交替領域につい
て、そのレイアウトの一例を示す図である。
FIG. 10 is a diagram showing an example of a layout of a user area and a spare area on a disc.

【図11】ディスク上のユーザエリアと交替領域につい
て、あるグループの交替領域が不足した場合の一例を示
す図である。
FIG. 11 is a diagram showing an example of a case where there is a shortage of replacement areas in a certain group with respect to a user area and replacement areas on a disc.

【図12】リード・デフェクト・データ・コマンドの実
行に対応して返送されるデータについて、その構成を示
す図である。
FIG. 12 is a diagram showing the configuration of data returned in response to execution of a read defect data command.

【図13】ディスク初期化時に使用されるフォーマット
コマンドのタイプ0のパラメータを示す図である。
FIG. 13 is a diagram showing parameters of type 0 of a format command used at the time of disk initialization.

【図14】ディスク初期化時に使用されるフォーマット
コマンドのタイプ1のパラメータを示す図である。
FIG. 14 is a diagram showing parameters of type 1 of a format command used when initializing a disc.

【符号の説明】[Explanation of symbols]

1 SCSIコントロール部 11 CPU 12 ROM 13 RAM 14 データバッファ 15 SCSIコントローラ 2 ディスク制御部 3 ディスク 4 ホストコンピュータ 5 SCSIバス 1 SCSI control unit 11 CPU 12 ROM 13 RAM 14 data buffer 15 SCSI controller 2 disk control unit 3 disk 4 host computer 5 SCSI bus

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 ディスクが少なくとも1つ以上のグルー
プに分割されると共に、それぞれのグループに対して所
定のセクタ数を有する交替領域を具備し、かつ、ホスト
コンピュータと接続されたディスク装置において、 データの書き込みまたは読み出し動作の終了時に、動作
の終了と、全交替領域の残り総セクタ数とをホストコン
ピュータへ報告する手段を備え、 動作の終了時に、動作の終了と、全交替領域の残り総セ
クタ数とを報告することを特徴とするディスク装置。
1. A disk device, wherein a disk is divided into at least one or more groups, has a spare area having a predetermined number of sectors for each group, and is connected to a host computer. At the end of the write or read operation, the device is provided with a means for reporting the end of the operation and the total number of sectors remaining in all spare areas to the host computer. A disk device characterized by reporting a number.
【請求項2】 請求項1のディスク装置において、 データの書き込みまたは読み出しを行ったグループに対
する交替領域の残り総セクタ数をホストコンピュータへ
報告する手段を備え、 動作の終了時に、グループに対する交替領域の残り総セ
クタ数を報告することを特徴とするディスク装置。
2. The disk device according to claim 1, further comprising means for reporting to the host computer the total number of remaining sectors of the spare area for the group for which data has been written or read, and at the end of the operation, the spare area for the group A disk device characterized by reporting the total number of remaining sectors.
【請求項3】 請求項1または請求項2のディスク装置
において、 交替領域の残りセクタ数について予め設定された所定値
と、データの書き込みまたは読み出し動作の終了時にお
ける交替領域の残り総セクタ数とを比較し、所定値より
少なくなったことを検知する残りセクタ数検知手段を備
え、 残りセクタ数が所定値より少なくなったとき、その旨を
ホストコンピュータへ報告することを特徴とするディス
ク装置。
3. The disk device according to claim 1, wherein a predetermined value is set for the number of remaining sectors in the spare area, and the total number of remaining sectors in the spare area at the end of the data write or read operation. And a remaining sector number detecting means for detecting that the number of remaining sectors is less than a predetermined value, and when the number of remaining sectors is less than a predetermined value, the disk device is informed of that fact.
【請求項4】 請求項3のディスク装置において、 交替領域の残りセクタ数について予め設定される所定値
は、ホストコンピュータからの指示によって設定可能で
あることを特徴とするディスク装置。
4. The disk device according to claim 3, wherein a predetermined value set in advance for the number of remaining sectors in the spare area can be set by an instruction from the host computer.
【請求項5】 請求項4のディスク装置において、 ディスク装置が、交替領域の残りセクタ数について予め
設定される所定値をホストコンピュータから受信した
後、ディスク上のユーザがアクセス不可のディスク固有
の管理情報が記録されている非ユーザエリアに書き込む
ことを特徴とするディスク装置。
5. The disk-specific management according to claim 4, wherein after the disk device receives a predetermined value set in advance for the number of remaining sectors in the spare area from the host computer, the user cannot access the disk. A disk device characterized by writing in a non-user area where information is recorded.
【請求項6】 請求項5のディスク装置において、 パワーオン時およびディスク交換時に、ホストコンピュ
ータは、ディスク上の非ユーザエリアに書き込まれた交
替領域の残りセクタ数の設定値を、自動的に読み出すこ
とを特徴とするディスク装置。
6. The disk device according to claim 5, wherein the host computer automatically reads the set value of the number of remaining sectors of the spare area written in the non-user area on the disk at the time of power-on and disk replacement. A disk device characterized by the above.
【請求項7】 請求項6のディスク装置において、 ディスク上の非ユーザエリアに設けられた交替領域の残
りセクタ数の設定値の記録エリアに、当該設定値が記録
されているかどうかを検知する設定値記録有無検知手段
を備え、 前記ディスク上の非ユーザエリアに交替領域の残りセク
タ数の設定値が記録されていないときは、ホストコンピ
ュータに対してその旨を警告することを特徴とするディ
スク装置。
7. The disk device according to claim 6, wherein a setting for detecting whether or not the set value is recorded in a recording area for the set value of the number of remaining sectors of the spare area provided in the non-user area on the disk A disk device comprising value recording presence / absence detection means, and when the set value of the number of remaining sectors in the spare area is not recorded in the non-user area on the disk, the disk device is warned to that effect. .
JP18627592A 1992-06-19 1992-06-19 Disk device Pending JPH065002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18627592A JPH065002A (en) 1992-06-19 1992-06-19 Disk device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18627592A JPH065002A (en) 1992-06-19 1992-06-19 Disk device

Publications (1)

Publication Number Publication Date
JPH065002A true JPH065002A (en) 1994-01-14

Family

ID=16185451

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18627592A Pending JPH065002A (en) 1992-06-19 1992-06-19 Disk device

Country Status (1)

Country Link
JP (1) JPH065002A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6868511B2 (en) 1998-11-10 2005-03-15 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
US7076701B2 (en) 1998-11-10 2006-07-11 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
JP2011211540A (en) * 2010-03-30 2011-10-20 Canon Inc Recording apparatus

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6868511B2 (en) 1998-11-10 2005-03-15 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
US7076701B2 (en) 1998-11-10 2006-07-11 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
US7174487B2 (en) 1998-11-10 2007-02-06 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
US7197672B2 (en) 1998-11-10 2007-03-27 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
US7213181B2 (en) 1998-11-10 2007-05-01 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information of defect management, and method of allocating spare area and method of managing defects
US7266736B2 (en) 1998-11-10 2007-09-04 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
US7640464B2 (en) 1998-11-10 2009-12-29 Samsung Electronics Co., Ltd. Recording medium having spare area defect management and information on defect management, and method of allocating spare area and method of managing defects
US7752509B2 (en) 1998-11-10 2010-07-06 Samsung Electronics Co., Ltd Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
US7911894B2 (en) 1998-11-10 2011-03-22 Samsung Electronics Co., Ltd. Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects
JP2011211540A (en) * 2010-03-30 2011-10-20 Canon Inc Recording apparatus

Similar Documents

Publication Publication Date Title
US6467054B1 (en) Self test for storage device
US5761411A (en) Method for performing disk fault prediction operations
US8065492B2 (en) System and method for early detection of failure of a solid-state data storage system
JP2008204475A (en) Nonvolatile semiconductor storage device
JPH023215B2 (en)
JPH11126488A (en) Method and device for storing and controlling data of external memory using plural flash memories
JP2004342126A (en) Increasing memory performance in flash memory device by simultaneously writing sectors to multiple devices
JPH1196686A (en) Rotary storage device
JP2004311020A (en) Method of writing or reproducing data to or from optical recording medium, and optical recording medium therefor
JP6476969B2 (en) Storage control device, control program, and control method
JP2004013313A (en) Storage device, information processing system equipped with the storage device, formatting method for the storage device, recording method for data, and program for realizing recording of format and data.
US8228770B2 (en) Optical recording medium, recording/reproducing apparatus, and recording/reproducing method
JPH08241174A (en) Control method for disk controller
TWI314729B (en) A method and an appratus for accessing a recording medium, a computer program product for recording information and a recording medium
JP2006343923A (en) Disk recording device
JP2005284816A (en) Disk array system
JPH065002A (en) Disk device
JP3437502B2 (en) Dynamic defect management method for rewritable optical disk
JPH06243591A (en) Method for controlling magneto-optical disk device
US6426928B1 (en) Ability to distinguish true disk write errors
JP3841595B2 (en) Storage device alternation processing time judgment test method
JPH07182792A (en) Processing method for defect of information sector
JPH09305497A (en) Recording and reproducing device, controller therefor and data protecting method
JPH04245072A (en) Disk device with data management information area on medium
CN1985324A (en) Method of formatting recording medium, host apparatus, and recording and/or reproducing apparatus