JP2000020248A - Disk fault recovering method, disk driver, and recording medium - Google Patents

Disk fault recovering method, disk driver, and recording medium

Info

Publication number
JP2000020248A
JP2000020248A JP10196766A JP19676698A JP2000020248A JP 2000020248 A JP2000020248 A JP 2000020248A JP 10196766 A JP10196766 A JP 10196766A JP 19676698 A JP19676698 A JP 19676698A JP 2000020248 A JP2000020248 A JP 2000020248A
Authority
JP
Japan
Prior art keywords
disk
data
block
blocks
writing
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
JP10196766A
Other languages
Japanese (ja)
Inventor
Masahiko Yokoyama
昌彦 横山
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.)
Japan Digital Laboratory Co Ltd
Original Assignee
Japan Digital Laboratory 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 Japan Digital Laboratory Co Ltd filed Critical Japan Digital Laboratory Co Ltd
Priority to JP10196766A priority Critical patent/JP2000020248A/en
Publication of JP2000020248A publication Critical patent/JP2000020248A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a disk fault recovering method, a disk driver and a disk which are applicable to even an inexpensive stand-alone type computer device by dividing the disk into areas and automatically duplexing data. SOLUTION: The disk driver 2 sends a command to a disk device and receives a stylus from the disk device to control access to the disk 1. The disk 1 is divided (partitioned) into a system block where an OS and application programs are stored, a data block 12 where data are stored, and a backup block 13 where the same data as the data written to the data block 12 are stored and the disk driver 2 actualizes mirroring for even a disk device which does not have disk array structure by writing the data to the data block 12 and backup block 13 to make a fault recovery of data.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はディスクの障害回復
方法,ディスクの障害回復方法を実現するディスクドラ
イバ(ディスク制御プログラム)およびディスク(記録
媒体)に関する。
The present invention relates to a disk failure recovery method, a disk driver (disk control program) for realizing the disk failure recovery method, and a disk (recording medium).

【0002】[0002]

【従来の技術】従来、速度改善のアイデアとして複数台
のディスクをアレイ状に構成し、シーク時間や回転待ち
時間を短縮することによって高速化を図るディスクアレ
イ方式があったが、ディスクアレイ方式では複数のディ
スクをアレイ状に構成する上で必然的に部品点数が増大
し、この結果信頼性の低下という問題が生じた。このよ
うな問題点を解決すべく冗長情報をアレイの構成に含め
ることによって、ディスク装置へのアクセスの高速化と
障害防止対策を兼ね備えた技術としてRAID(Redund
ant Arrays of Independent(Inexpensive) Disks)があ
る。 (1) RAID1 RAIDは、データを分割して複数のディスクに格納
し、高速アクセスと高信頼性を実現する技術であり、分
割格納と障害対策の方式の違いによって幾つかのレベル
に分類されており、米国カルフォルニア大学バークレイ
校のパターソン博士(Dr.Patterson)らの論文(Patter
son,D.A,Gibson,G,Katz,R.H,"A Case forRedundant Arr
ays of Inexpensive Disks(RAID),"Report No.UCB/CSD
87/391,Computer Science Division,University of Cal
ifornia Berkeley,Dェc 1987)では5種類のRAIDが
定義されている。なお、その中ではRAID0は含まれ
ていないが、その有用性からRAID0はRAIDの一
種として考えられているので、現在ではRAIDは次に
示すようにRAID0〜RAID5の6レベルに分類さ
れている。そして、レベルによってディスク容量の使用
効率やデータアクセスの効率などが異なっている。 RAID0 ストライピング RAID1 ミラーリング(二重化) RAID2 ストライピング(バイト)とハミング
コードによるECC RAID3 ストライピング(バイト)とパリティ
ドライブ固定 RAID4 ストライピング(ブロック)とパリテ
ィドライブ固定 RAID5 ストライピング(ブロック)とパリテ
ィドライブ分散 例えば、RAID1ではディスクの二重化(ミラーリン
グ)を行なう。すなわち、図9(a),(b)に示すよ
うに全く同じ内容のデータを2台(2台以上でもよい)
のディスク94ー1,94ー2に書込む。これにより、
あるディスクが故障しても正常な方のディスクを用いて
処理を実行できる。なお、RAID1には図9(a)に
示すようにホストコンピュータ91のディスクドライバ
92などのソフトウエアによる処理で2重化を行なうソ
フトウエアRAIDと、図9(b)に示すようにディス
ク装置のコントローラ93などのハードウエアを利用し
て2重化を行なうハードウエアRAIDがある。
2. Description of the Related Art Conventionally, as a speed improvement idea, there has been a disk array system in which a plurality of disks are arranged in an array to shorten a seek time and a rotation waiting time to increase the speed. In configuring a plurality of disks in an array, the number of components is inevitably increased, and as a result, there has been a problem that reliability is reduced. Including redundant information in the array configuration to solve such a problem, RAID (Redundant Redundancy) is a technology that has both high-speed access to disk devices and failure prevention measures.
ant Arrays of Independent (Inexpensive) Disks). (1) RAID1 RAID is a technology that divides data and stores it on a plurality of disks to realize high-speed access and high reliability. RAID is classified into several levels depending on the difference between the divided storage and the method of troubleshooting. Dr. Patterson and others at the University of California, Berkeley (Patterson)
son, DA, Gibson, G, Katz, RH, "A Case for Redundant Arr
ays of Inexpensive Disks (RAID), "Report No.UCB / CSD
87/391, Computer Science Division, University of Cal
ifornia Berkeley, Dec 1987) defines five types of RAID. Although RAID0 is not included therein, RAID0 is considered as a type of RAID because of its usefulness. Therefore, RAID is currently classified into six levels of RAID0 to RAID5 as shown below. The efficiency of disk capacity and the efficiency of data access differ depending on the level. RAID0 striping RAID1 mirroring (duplexing) RAID2 striping (byte) and ECC by Hamming code RAID3 striping (byte) and parity drive fixed RAID4 striping (block) and parity drive fixed RAID5 striping (block) and parity drive distribution For example, in RAID1, disk Performs duplexing (mirroring). That is, as shown in FIGS. 9 (a) and 9 (b), two sets of data having exactly the same contents (two or more sets may be used).
To the discs 94-1 and 94-2. This allows
Even if a certain disk fails, the processing can be executed using the normal disk. It should be noted that RAID1 includes software RAID for performing duplication by processing by software such as a disk driver 92 of the host computer 91 as shown in FIG. 9A, and a disk device as shown in FIG. 9B. There is a hardware RAID that performs duplication using hardware such as the controller 93.

【0003】どちらも書込みは図10(a)に示すよう
に両方のディスク44−1,44−2に同時に行ない、
読み出しは図10(b)に示すように一方のディスク4
4−1から行なう。図10(c)に示すように一方のデ
ィスク44−2が故障した場合は、もう一方のディスク
44−1のみで動作する。すなわち、図9(a)のソフ
トウエアRAIDではディスクドライバ42が同一デー
タをディスク44−1,44−2に同時に書込んで2重
化を行なう。また、図9(b)のハードウエアRAID
ではホストコンピュータ41からのリクエストやコマン
ドを受取ったコントローラ43が同一データをディスク
44−1,44−2に書込んで同時に2重化を行なう。
In both cases, writing is performed simultaneously on both disks 44-1 and 44-2 as shown in FIG.
Reading is performed on one disk 4 as shown in FIG.
Perform from 4-1. When one disk 44-2 fails as shown in FIG. 10C, the operation is performed only with the other disk 44-1. That is, in the software RAID of FIG. 9A, the disk driver 42 writes the same data to the disks 44-1 and 44-2 at the same time to perform the duplication. Also, the hardware RAID shown in FIG.
Then, the controller 43, which has received a request or command from the host computer 41, writes the same data to the disks 44-1 and 44-2 and simultaneously duplicates the data.

【0004】[シングルディスクシステム]シングルデ
ィスクシステムは、図11に示すように1台のディスク
を用いてデータの書込み/読み出しを行なうものであ
り、ディスクに書込まれたデータの信頼性向上は別段考
慮されていない。シングルディスクシステムではホスト
コンピュータ91側のデバイスドライバ92’がディス
ク装置にコマンドを(書込み/読み出し命令)発行し、
データの転送を行なってディスク94へのデータの書込
み/読み出しを行なう。 (2) その他 その他のディスクアレイの障害回復方法として特開平6
−230903号公報には、障害発生時に空き領域を障
害回復領域として確保することによりディスクアレイの
障害回復を行なう技術が開示されている。上記公報記載
の技術はRAID3〜5(ストライピングとパリティド
ライブを用いる方式)における障害回復の改善技術であ
り、RAID3,4,5のいずれかを適用したディスク
アレイに障害が発生した場合に、正常ドライブの空き領
域を障害回復領域として確保し、障害ドライブのデータ
を回復領域に分散格納すると共に回復されたデータの2
次パリティを生成して、新たなドライブの障害時におけ
るデータ消失を防止しようとするものである。
[Single Disk System] In a single disk system, as shown in FIG. 11, data is written / read using a single disk, and the reliability of data written on the disk is taken into consideration separately. Not. In the single disk system, the device driver 92 'of the host computer 91 issues a command (write / read command) to the disk device,
Data transfer is performed to write / read data to / from the disk 94. (2) Others As another disk array failure recovery method,
Japanese Patent Application Publication No. 230903 discloses a technique for recovering a disk array from a failure by securing an empty area as a failure recovery area when a failure occurs. The technology described in the above publication is a technology for improving failure recovery in RAIDs 3 to 5 (a method using striping and a parity drive). When a failure occurs in a disk array to which any of RAIDs 3, 4, and 5 is applied, a normal drive is used. Is secured as a failure recovery area, the data of the failed drive is distributed and stored in the recovery area, and the recovered data 2
The next parity is generated to prevent data loss when a new drive fails.

【0005】[0005]

【発明が解決しようとする課題】近年、Windows
95やWindowsNT(いずれも、米国マイクロソ
フト社の登録商標)等のOS(オペレーティング シス
テム)の採用により、ハードディスク(HDD)に対す
るアクセス量、データ量が増大し、それに伴いハードデ
ィスクの障害頻度が増大し、それによるデータ損失等の
被害が増大している。ディスクの障害には書込み/読み
出しヘッド等の機械的機構部分の故障によるディスクク
ラッシュ、ディスクに傷などがついたりした場合のセク
ターエラー、ノイズによる誤書込みによるデータエラー
等がある。
SUMMARY OF THE INVENTION In recent years, Windows
With the adoption of an operating system (OS) such as Windows 95 or Windows NT (both are registered trademarks of Microsoft Corporation in the United States), the amount of access to the hard disk (HDD) and the amount of data increase, and the frequency of hard disk failures increases. The damage such as data loss due to is increasing. Disk failures include a disk crash due to a failure of a mechanical mechanism such as a write / read head, a sector error when the disk is scratched, a data error due to erroneous writing due to noise, and the like.

【0006】RAID1では、ディスクにハードウエア
上の故障が生じた場合に重要なデータを保護できるが、
2台(または2n台)のディスクに同じデータを書込む
ので、シングルシステムに比べコストがかかるという問
題点、使用可能なディスクの容量が実質的に2分の1以
下になってしまうという問題点、上述したソフトウエア
RAID(図9(a))ではデータ書込み時に2回ディ
スクにアクセスしなければならないので、通常アクセス
の2倍以上書込み時間がかかるという問題点、ハードウ
エアRAID(図9(b))ではコントローラのコスト
がさらに必要となるという問題点があった。
[0006] RAID 1 can protect important data in the event of a hardware failure of a disk.
Since the same data is written to two (or 2n) disks, the cost is higher than in a single system, and the usable disk capacity is substantially reduced to half or less. However, in the above-described software RAID (FIG. 9A), it is necessary to access the disk twice at the time of data writing, so that the writing time is more than twice as long as the normal access, and the hardware RAID (FIG. 9B) )) Has a problem that the cost of the controller is further required.

【0007】また、シングルディスクシステムでは、デ
ィスクに冗長性がないので、ディスクにエラーが生じた
場合にデータの復元ができないという欠点があった。
[0007] Further, in the single disk system, since there is no redundancy in the disk, there is a disadvantage that data cannot be restored when an error occurs in the disk.

【0008】また、特開平6−230903号公報記載
のディスクアレイの障害回復方法では、障害が発生した
場合に一時的空き領域を障害回復領域として確保するも
のであり、障害発生時のペナルティが大きいという問題
点がある。
In the disk array failure recovery method described in JP-A-6-230903, a temporary vacant area is secured as a failure recovery area when a failure occurs, and the penalty at the time of failure occurrence is large. There is a problem.

【0009】本発明は、上記問題点および欠点を解決す
るためになされたものであり、ディスクアレイでの高速
アクセスと高信頼性を実現するためにディスクアレイの
各ディスクにデータを分割して格納するるRAIDとは
異なり、ディスクアレイ構成を有しないディスク装置に
ついて、ディスクの故障発生時に高い確率でデータを回
復できる、ディスクの障害回復方法、ディスクドライバ
およびディスクの提供を目的とし、ディスクを領域分割
して自動的にデータの二重化を行なうことにより低価格
なスタンドアローンタイプのコンピュータ装置にも適用
可能なディスクの障害回復方法、ディスクドライバおよ
びディスクの提供を目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems and disadvantages, and divides and stores data in each disk of a disk array in order to realize high-speed access and high reliability in the disk array. Unlike a RAID, a disk device that does not have a disk array configuration is provided with a disk failure recovery method, a disk driver, and a disk that can recover data with a high probability when a disk failure occurs. It is an object of the present invention to provide a disk failure recovery method, a disk driver, and a disk that can be applied to a low-cost stand-alone computer device by automatically duplicating data.

【0010】[0010]

【課題を解決するための手段】上記課題を解決するた
め、第1の発明のディスクの障害回復方法は、ディスク
領域を同容量の2ブロックを含む3ブロックに分割し、
前記同容量の2ブロックに同一データを書込み、前記同
容量のブロックのうち一方にディスクエラーが発生した
ときにはエラー未発生のブロックへのアクセスを行なう
ことを特徴とする。
In order to solve the above problems, a disk failure recovery method according to a first aspect of the present invention divides a disk area into three blocks including two blocks having the same capacity.
The same data is written to the two blocks having the same capacity, and when a disk error occurs in one of the blocks having the same capacity, access is made to a block in which no error has occurred.

【0011】また、第2の発明のディスクドライバは、
コンピュータ装置に内蔵または外付け接続して動作する
ディスク装置へのアクセス制御を行なうプログラムから
なるディスクドライバであって、ディスクへのデータの
書込みリクエストがあったとき、同容量の2ブロックを
含む3ブロックに分割されたディスクの同容量の一方の
ブロックへのデータの書込み終了後、更に、同一データ
を同容量の他のブロックに書込むための書込みコマンド
をディスク装置に発行してディスク装置に書込みを行な
わせ、ディスクへのデータの読み出しリクエストがあっ
たとき、同容量のブロックのうち所定のブロックから専
らデータの読み出しを行ない、所定のブロックにエラー
が発生したときには同容量の他のブロックからデータの
読み出しを行なうことを特徴とする。
A disk driver according to a second aspect of the present invention includes:
A disk driver comprising a program for controlling access to a disk device which operates internally or externally connected to a computer device, wherein three blocks including two blocks of the same capacity when a data write request to a disk is requested. After writing of data to one block of the same capacity of the divided disk is completed, a write command for writing the same data to another block of the same capacity is further issued to the disk device, and the data is written to the disk device. When there is a data read request to the disk, data is read exclusively from a predetermined block of blocks of the same capacity, and when an error occurs in a predetermined block, data is read from another block of the same capacity. Reading is performed.

【0012】また、第3の発明は上記第2の発明のディ
スクドライバにおいて、同容量の2ブロックにデータの
書込みを行なう場合に、アクセスを終了したセクタを保
持し、今回の書込みを前記セクタを含むブロックからの
書込み制御を行なうことを特徴とする。
According to a third aspect of the invention, in the disk driver of the second aspect, when writing data to two blocks having the same capacity, the sector for which access has been completed is held, and the current writing is performed by the sector. It is characterized in that writing control is performed from a block including the block.

【0013】また、第4の発明は上記第2または第3の
発明のディスクドライバにおいて、前記同容量の他のブ
ロックをバックアップ用ブロックとし、バックアップ用
ブロックにはアプリケーションによるリクエストを禁止
することを特徴とする。
According to a fourth aspect of the present invention, in the disk driver according to the second or third aspect, the other block having the same capacity is used as a backup block, and a request by an application is prohibited in the backup block. And

【0014】また、第5の発明の記録媒体は、コンピュ
ータ装置に内蔵または外付け接続して動作するディスク
装置によってデータの書込み/読み出しが行なわれる記
録媒体であって、ディスクの領域を同容量の2ブロック
を含む3ブロックに分割し、同容量の2ブロック中の一
方をデータの読み出しを他の一方のブロックより優先す
るデータブロックとし、同容量の2ブロック中の他方を
データブロックと同一データを書込むバックアップブロ
ックとし、3ブロック中の同容量でないブロックをプロ
グラムまたはインタープリタデータの読み出し/書込み
を行なうシステムブロックとして分割したことを特徴と
する。
A recording medium according to a fifth aspect of the present invention is a recording medium in which data is written / read by a disk device which operates by being connected to a computer device internally or externally. It is divided into three blocks including two blocks, and one of the two blocks having the same capacity is set as a data block in which data reading has priority over the other block, and the other of the two blocks having the same capacity is used as the data block. A backup block to be written is provided, and blocks of the same capacity among the three blocks are divided into system blocks for reading / writing program or interpreter data.

【0015】[0015]

【発明の実施の形態】<ディスクパーテション>図1
は、本発明のディスクの障害回復方法を適用可能なディ
スクの領域構成の一実施例を示す図であり、本発明では
ディスクを3つのブロック(パーテション)にわけて構
成する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS <Disk Partition> FIG.
FIG. 1 is a diagram showing an embodiment of a disk area configuration to which a disk failure recovery method of the present invention can be applied. In the present invention, a disk is configured by dividing into three blocks (partitions).

【0016】図1で、ディスク1は制御プログラムやア
プリケーションプログラムおよびユティリティプログラ
ム等のプログラムやインタープリターコードを格納した
り、プログラムの実行時に中間値等を格納したりするシ
ステムブロック11と、データファイルが格納されるデ
ータブロック12,データブロック12に書込んだデー
タと同じデータを格納するバックアップブロック13を
有している。なお、ディスク1は、本実施例ではハード
ディスク(HDD)を用いているがこれに限定されな
い。
In FIG. 1, a disk 1 stores a program such as a control program, an application program and a utility program, an interpreter code, a system block 11 for storing intermediate values and the like when the program is executed, and a data file. It has a data block 12 to be stored and a backup block 13 for storing the same data as the data written in the data block 12. In this embodiment, a hard disk (HDD) is used as the disk 1, but the disk 1 is not limited to this.

【0017】これらブロック11〜13はディスクの物
理的連続領域(通常はセクタ単位)をメーカー側で予め
分割して出荷するか、或いはディスクのフォーマット時
に割り付けられる(データブロック12とバックアップ
ブロック13は同じ大きさが割当てられる)。また、デ
ィスク1上にディスク1のエラー発生箇所およびその種
類(書込みエラー、読取りエラー等の別)を書込むログ
領域を確保するようにしてもよい(本実施例では、ログ
領域をコンピュータ装置本体(ホスト)に設けたフラッ
シュメモリ等の不揮発性メモリに確保している)。
These blocks 11 to 13 are shipped by dividing the physical continuous area (usually in units of sectors) of the disk by the manufacturer in advance or allocated when formatting the disk (the data block 12 and the backup block 13 are the same). Size is assigned). Further, a log area for writing the error occurrence location of the disk 1 and its type (whether a write error or a read error, etc.) may be secured on the disk 1 (in the present embodiment, the log area is set to the computer apparatus main body). (This is secured in a nonvolatile memory such as a flash memory provided in the (host).)

【0018】なお、本実施例では上述のようにコンピュ
ータ装置が1台のディスク装置100を内蔵または外付
けしている場合を例とし、1つのディスクをシステムブ
ロック、データブロック、およびバックアップブロック
の3ブロックに分割したが、コンピュータ装置が2台ま
たはそれ以上の台数のディスク装置を内蔵または外付け
できる場合に、2台またはそれ以上のディスク装置で駆
動される各ディスク(記録媒体)の領域を連続的領域と
みなして3ブロックに分割してもよい。また、コンピュ
ータ装置が内蔵または外付けするディスク装置の台数n
を、n=a+2mとするとき、a台をシステムブロック
とし、m台をデータブロックとし、他のm台をバックア
ップブロックとみなすこともできる(a,m≧1)。
In this embodiment, as described above, a case where the computer device has one disk device 100 built-in or externally attached is taken as an example, and one disk is composed of a system block, a data block, and a backup block. Although divided into blocks, if two or more disk devices can be built-in or externally attached to a computer device, the area of each disk (recording medium) driven by two or more disk devices is contiguous. It may be divided into three blocks considering the target area. Also, the number n of disk devices built in or external to the computer device
Is set to n = a + 2m, a units can be regarded as system blocks, m units as data blocks, and other m units as backup blocks (a, m ≧ 1).

【0019】<ディスクバックアップシステムの概要>
図2は、本発明のディスクの障害回復方法の説明図であ
り、(a)はアプリケーションプログラムの通常動作中
のディスクへのアクセス状態を示し、(b)はデータブ
ロックに障害が生じたときの動作状態を示す図である。
以下の説明では、1台のディスク装置がコンピュータ装
置(以下、ホストと記す)に内蔵または外付けされた場
合を例とするが、上述したように複数のディスク装置が
ホストコンピュータに内蔵または外付けされていてもよ
い。すなわち、ディスクアレイではデータは分割されて
各ディスクに離散的に格納されるが(並列的格納)、本
発明ではデータは連続したブロック内に書込まれ、読み
出される(直列的格納)。
<Overview of Disk Backup System>
2A and 2B are explanatory diagrams of a disk failure recovery method according to the present invention. FIG. 2A shows the state of access to a disk during normal operation of an application program, and FIG. 2B shows the state when a failure occurs in a data block. It is a figure showing an operation state.
In the following description, an example is described in which one disk device is built in or externally attached to a computer device (hereinafter, referred to as a host). However, as described above, a plurality of disk devices are built in or externally attached to a host computer. It may be. That is, in a disk array, data is divided and stored discretely on each disk (parallel storage), but in the present invention, data is written and read in a continuous block (serial storage).

【0020】図2で、ディスクドライバ2はディスク装
置100にコマンドを与え、また、ディスク装置100
やOSとスティタスを授受しながらディスク1へのアク
セス制御を行なうディスク制御用プログラム群で構成さ
れており、ディスクバックアップ用に本発明に基づく次
のような機能を有するディスクバックアッププログラム
群を含んでいる。なおディスクドライバをディスクバッ
クアップモジュールを含むハードウエア(ディスクコン
トローラ)で構成することもできる)。また、ディスク
ドライバ2はホスト側にあってもよいし、ディスク装置
側にあってもよい。
In FIG. 2, the disk driver 2 gives a command to the disk device 100,
And a disk control program group for controlling access to the disk 1 while exchanging status with the OS, and includes a disk backup program group having the following functions based on the present invention for disk backup. . Note that the disk driver may be configured with hardware (disk controller) including a disk backup module). Further, the disk driver 2 may be located on the host side or on the disk device side.

【0021】また、図2で、ディスク1へのアクセスは
書込み時にはデータブロック12およびバックアップブ
ロック13の双方に書込み、正常動作では読み出しはデ
ータブロック12から行なう。一方のブロックにエラー
(セクタエラー等)が生じた場合には、他の一方のブロ
ックで読み出し/書込みを行なう。
In FIG. 2, access to the disk 1 is performed by writing to both the data block 12 and the backup block 13 during writing, and reading is performed from the data block 12 during normal operation. When an error (sector error or the like) occurs in one block, reading / writing is performed in the other block.

【0022】[ディスクドライバの機能概要] 1. アクセス頻度の高いブロック、すなわち、システム
ブロック11にはミラーリング(データの二重化)を行
なわなず、システムブロック12に書込まれるデータ以
外のデータ(アプリケーションプログラムにより作成さ
れり、更新されるデータファイルに書込まれたり/読み
出されたりするデータ)のミラーリングを行なう。 2. 上記データのミラーリングのために、ディスク1上
にデータブロック12と同サイズ(容量)のバックアッ
プブロック13を確保する。 3. ユーザ(すなわち、ユーザ用アプリケーションプロ
グラム或いはユーザの操作)によってはバックアップブ
ロック13へのアクセスは読み出し、書き込み共にでき
ない。 4. ミラーリングはファイル単位ではなくデータ単位で
行なう。 5. OSからのデータ読み出しのためのアクセス要求、
すなわちデータリードアクセスリクエストがあった場合
には、データブロック12のデータの読み出しを最優先
とする。 6. OSからのデータ書込みのためのアクセス要求、す
なわちデータライトリクエストがあった場合には、高速
化を図るために前回アクセスしたセクタに近いブロック
からアクセスする。例えば、バックアップブロック13
にあるセクタにアクセスしていた場合には今回のアクセ
スはバックアップブロック13の当該セクタに近い位置
(続くセクタ)にデータを書込んでから、データブロッ
ク12に同一データを書込みに行く。 7. データブロック12またはバックアップブロック1
3のいずれか一方にエラーが発生した場合には、シング
ルシステム(図11)の場合のようにOSにエラー発生
スティタス(エラー発生状態を示すフラグ)を返さず
に、ディスクドライブ2は書込みの場合には現在書込も
うとしているデータをエラー未発生ブロックに書込むよ
うにしてから、読み出しの場合にはデータブロック12
から読み出そうとしたデータをバックアップブロック1
3から読み込むようにしてから、エラー通知(例えば、
警告ランプ表示、警告メッセージ表示、警告音出力、警
告メッセージ出力等によるユーザへのエラー発生通知)
を行なう。 8. データブロック12またはバックアップブロック1
3のいずれか一方にエラーが発生した場合には、上述し
たように、書込みの場合には現在書込もうとしているデ
ータをエラー未発生ブロックに書込むようにしてから、
以後、書込みデータの転送をエラー未発生ブロックのみ
に行なう。また、読み出しの場合にはデータブロック1
2から読み出そうとしたデータをバックアップブロック
13から読み込むようにしてから、以後、読み込みアク
セスをバックアップブロック13のみに行なう。 9. エラー発生時のディスクエラーログ(エラー発生日
時、エラー発生ディスク、エラー発生セクタ、エラーの
種類等を示すディスクエラー情報)は、ホストの不揮発
性メモリに格納し、電源が投入時に前回の処理でディス
クにエラーが生じている場合に表示する。 10. システムブロック11にエラーが生じた場合に
は、OSにエラー発生ステイタス(エラー発生状態を示
すフラグ)を返す。以後の処理はOS側の指示に基づ
く。 11. データブロック12およびバックアップブロック
13の両者にエラーが発生した場合には、OSにエラー
スティタス(エラー発生状態を示すフラグ)を返す。以
後の処理はOS側の指示に基づく。この場合、ディスク
ドライバ2は現在のブロックへのアクセスを禁止しない
ようにするため(すなわち、現在のブロックへのアクセ
スをOS側の指示により行なえるようにするため)、現
在ブロックをアクセスブロックとしてOSにエラーステ
ィタスを返す。
[Overview of Function of Disk Driver] 1. Blocks with high access frequency, ie, system blocks 11 are not mirrored (duplicated data), and data (application programs) other than data written to system blocks 12 Mirroring of data written / read to / from a data file created or updated by 2. A backup block 13 of the same size (capacity) as the data block 12 is secured on the disk 1 for mirroring the data. 3. Depending on the user (that is, user application program or user operation), access to the backup block 13 cannot be read or written. 4. Mirroring is performed in data units, not file units. 5. An access request for reading data from the OS,
That is, when there is a data read access request, the highest priority is given to reading data from the data block 12. 6. When there is an access request for data writing from the OS, that is, a data write request, access is made from a block close to the previously accessed sector in order to increase the speed. For example, the backup block 13
In the current access, the data is written to a position in the backup block 13 close to the sector (the next sector), and then the same data is written to the data block 12. 7. Data block 12 or backup block 1
In the case where an error occurs in any one of the disk drives 2 and 3, the disk drive 2 does not return an error occurrence status (a flag indicating an error occurrence state) to the OS as in the case of the single system (FIG. 11). First, the data to be written is written in the block where no error has occurred, and in the case of reading, the data block 12 is used.
Data to be read from the backup block 1
3 and then read the error notification (for example,
Error notification to the user by warning lamp display, warning message display, warning sound output, warning message output, etc.)
Perform 8. Data block 12 or backup block 1
In the case where an error occurs in any one of the blocks No. 3, as described above, in the case of writing, the data to be written is written to an error-free block.
Thereafter, transfer of the write data is performed only to the block where no error has occurred. In the case of reading, data block 1
2 is read from the backup block 13, and thereafter, read access is performed only to the backup block 13. 9. The disk error log at the time of error occurrence (disk error information indicating the date and time when the error occurred, the disk in which the error occurred, the sector in which the error occurred, the type of error, etc.) is stored in the non-volatile memory of the host. Displayed when an error has occurred on the disc. 10. When an error occurs in the system block 11, an error occurrence status (a flag indicating an error occurrence state) is returned to the OS. Subsequent processing is based on an instruction from the OS. 11. If an error occurs in both the data block 12 and the backup block 13, an error status (a flag indicating an error occurrence state) is returned to the OS. Subsequent processing is based on an instruction from the OS. In this case, the disk driver 2 sets the current block as an access block so as not to prohibit access to the current block (that is, to enable access to the current block according to an instruction from the OS). Returns the error status.

【0023】<ディスクドライバの動作> [正常動作時]図3は、ディスク装置100が正常動作
(ディスクエラーが発生していないときの動作をいう)
を行なっているときのディスクドライバ2の基本的動作
の説明図であり、(a)はOSからシステムブロック1
1へのリード/ライトアクセスまたはデータブロック1
2からのデータ読み出しのためのデータリードリクエス
トがあった場合のディスクドライバ2の基本的動作の説
明図、(b)はデータブロック12へのデータライトリ
クエストがあった場合のディスクドライバ2のデータア
クセス時の基本的動作の説明図である。また、図4はデ
ィスクドライバ2のデータアクセス時の基本的動作を示
すフローチャートである。以下、図3および図4を基に
ディスクドライバ2のアプリケーションプログラムによ
るデータアクセス時の基本的動作について説明する。な
お、図3(a),(b)で矢印の記号S0〜S18は図
4のフローチャートのステップを意味する。
<Operation of Disk Driver> [During Normal Operation] FIG. 3 shows normal operation of the disk device 100 (operation when a disk error has not occurred).
FIG. 7 is an explanatory diagram of a basic operation of the disk driver 2 when the operation is performed.
Read / write access to 1 or data block 1
FIG. 2B is an explanatory diagram of the basic operation of the disk driver 2 when there is a data read request for reading data from the data block 2, and FIG. 2B shows data access of the disk driver 2 when there is a data write request to the data block 12. FIG. 4 is an explanatory diagram of a basic operation at the time. FIG. 4 is a flowchart showing the basic operation of the disk driver 2 when accessing data. Hereinafter, a basic operation at the time of data access by the application program of the disk driver 2 will be described with reference to FIGS. 3 (a) and 3 (b), the symbols S0 to S18 of the arrows indicate the steps in the flowchart of FIG.

【0024】図3および図4で、コンピュータ装置でア
プリケーションプログラム3からのディスクアクセス要
求があると、OS4はディスクドライバ2にディスクア
クセスリクエストを出す(S0)。
3 and 4, when the computer device receives a disk access request from the application program 3, the OS 4 issues a disk access request to the disk driver 2 (S0).

【0025】ディスクドライバ2はOS4からのディス
クアクセスリクエストを受取ると、リクエストを調べ
(S1)、それがリードリクエストの場合には読み込み
命令およびデータブロック12の読み込み開始セクタお
よび転送セクタ数等からなるリードコマンドをディスク
装置100に発行し、OS4からのディスクアクセスリ
クエストがライトリクエストの場合には書込み命令およ
びデータブロック12の書込み開始セクタおよび転送セ
クタ数等からなるライトコマンドをディスク装置100
に発行する(S2)。
When the disk driver 2 receives the disk access request from the OS 4, it checks the request (S1). If the request is a read request, the disk driver 2 reads the read command and the read start sector of the data block 12, the number of transfer sectors, and the like. When a disk access request from the OS 4 is a write request, a write command and a write command including a write start sector and the number of transfer sectors of the data block 12 are issued to the disk device 100.
(S2).

【0026】ディスクドライバ2はディスク装置100
へのコマンド発行後、割込み待ち処理を行ない、割込み
待ちスティタス(状態フラグ等)をOS4に渡す(OS
4が割込み待ちスティタスを受取った場合、OS4はア
プリケーションプログラム3にディスク装置100が割
込み待ちであることを知らせる。この場合、アプリケー
ションプログラム3の処理がディスク1への(またはデ
ィスク1からの)データ転送を伴わない処理であれば処
理の実行は可能となり、そうでない場合にはOS4から
転送開始通知を受取るまで、実行待ちとなる)。ディス
ク装置100は転送割込み可能(アクセス可能)となる
と、割込みスティタスをディスクドライバ2に返す(ま
たは、ディスクドライバ2は、ディスク装置100に設
けられているスティタスバイトを所定タイミングでサー
チし、スティタスバイトの割込み相当ビットがオンにな
ったか否かを判定する)(S3)。
The disk driver 2 is a disk device 100
After issuing the command to the OS 4, an interrupt wait process is performed, and the interrupt wait status (status flag, etc.) is passed to the OS 4 (OS
When 4 receives the interrupt wait status, the OS 4 notifies the application program 3 that the disk device 100 is waiting for an interrupt. In this case, if the processing of the application program 3 does not involve data transfer to (or from) the disk 1, the processing can be executed. Otherwise, the processing is performed until a transfer start notification is received from the OS 4. Wait for execution). When the disk device 100 becomes transfer interruptible (accessible), it returns an interrupt status to the disk driver 2 (or the disk driver 2 searches for a status byte provided in the disk device 100 at a predetermined timing, and It is determined whether or not the interrupt equivalent bit has been turned on) (S3).

【0027】ディスクドライバ2は、上記ステップS0
でOS4から受取ったディスクアクセスリクエストを調
べ(S4)、ディスクアクセスリクエストがリードリク
エストの場合にはOS4に割込みスティタスを返し(S
5)、ディスク装置100にデータ転送許可を出して、
ディスク1のデータブロック12からアプリケーション
側の読み込み用バッファ(メモリ)へのデータ(読み出
しデータ)の転送を行なわせ(S6)、最終割込み処理
終了(=転送終了:転送セクタ数をカウントによる判
定)後(S7)、リクエスト終了処理を行ない(S
8)、OS4に終了通知を出す(S9)。
The disk driver 2 executes the above-mentioned step S0
Examines the disk access request received from the OS 4 (S4), and returns an interrupt status to the OS 4 if the disk access request is a read request (S4).
5) issuing a data transfer permission to the disk device 100,
The data (read data) is transferred from the data block 12 of the disk 1 to the read buffer (memory) on the application side (S6), and after the final interrupt processing is completed (= transfer completed: the number of transfer sectors is determined by counting). (S7), a request end process is performed (S7).
8) A termination notification is issued to the OS 4 (S9).

【0028】また、上記ステップS0でOS4から受取
ったディスクアクセスリクエストが、ライトリクエスト
の場合にはディスクドライバ2はOS4に割込みスティ
タスを返し(S10)、ディスク装置100にデータ転
送通知を出して、アプリケーション側の読み込み用バッ
ファ(メモリ)からディスク1のデータブロック12へ
のデータ(書込みデータ)の転送を行なわせ(S1
1)、データブロック12への書込みが終ると(S1
2)、最終割込み処理を行なうことなくディスク装置1
00にバックアップブロック13へのライトコマンド
(書込み命令,バックアップブロック13の書込み開始
セクタ数,転送セクター数等を含む)を発行し(S1
3)、ディスク装置100かデータの書込み(転送)可
能を意味する割込みスティタスが返されると、それをO
S4に渡し(S14)、ディスク装置100にデータ転
送通知を出して、アプリケーション側の読み込み用バッ
ファ(メモリ)からデータブロック12に書込んだと同
一のデータ(書込みデータ)をバックアップブロック1
3に転送を行なわせる(S15)。
If the disk access request received from the OS 4 in step S0 is a write request, the disk driver 2 returns an interrupt status to the OS 4 (S10), sends a data transfer notification to the disk device 100, (Write data) from the read buffer (memory) on the side to the data block 12 of the disk 1 (S1).
1) When the writing to the data block 12 is completed (S1)
2) The disk device 1 without performing the final interrupt processing
00, a write command to the backup block 13 (including a write command, the number of write start sectors of the backup block 13, the number of transfer sectors, etc.) is issued (S1).
3) When the disk device 100 returns an interrupt status indicating that data can be written (transferred), the status is set to O.
The data is transferred to S4 (S14), a data transfer notification is issued to the disk device 100, and the same data (write data) as written in the data block 12 from the read buffer (memory) on the application side is stored in the backup block 1
3 (S15).

【0029】ディスク装置100へのデータ転送(=バ
ックアップブロック13への書込み)の最終処理が終了
すると(S16)、ディスクドライバ2はリクエスト終
了処理を行ない(S17)、OS4に終了スティタスを
渡す(S18)。
When the final processing of the data transfer to the disk device 100 (= writing to the backup block 13) is completed (S16), the disk driver 2 performs a request end processing (S17) and passes an end status to the OS 4 (S18). ).

【0030】上記動作により、ディスク装置100は正
常動作時にはディスク1のデータブロック12からデー
タを読み出し、書込みはデータブロック12とバックア
ップブロック13に同一データを書込む。すなわち、デ
ィスク装置1台を内蔵または外付けする最小ディスク構
成のコンピュータ装置でもミラーリングを行なうことが
できる。
By the above operation, the disk device 100 reads data from the data block 12 of the disk 1 during normal operation, and writes the same data to the data block 12 and the backup block 13 for writing. That is, mirroring can be performed by a computer device having a minimum disk configuration in which one disk device is built in or externally mounted.

【0031】なお、上記図4の説明ではアプリケーショ
ンプログラムによるデータアクセス時の基本的動作につ
いて説明したが、OSによるプログラムアクセス時の動
作、すなわち、システムブロック11のアクセスについ
ては、上記フローチャートのうち、ステップS0,ステ
ップS12およびS16を省略すると共に、ステップS
1〜S11、ステップS16〜S18でアクセスするブ
ロックをデータブロック12ではなくシステムブロック
13とし、アプリケーションプログラム3をOS4と
し、データをプログラム等とすればよい。
Although the basic operation at the time of data access by the application program has been described in the above description of FIG. 4, the operation at the time of program access by the OS, that is, the access of the system block 11, is described in the flowchart. S0, steps S12 and S16 are omitted, and step S
The blocks accessed in steps 1 to S11 and steps S16 to S18 may be replaced by the system block 13 instead of the data block 12, the application program 3 may be the OS 4, and the data may be the program.

【0032】[エラーが生じた場合の動作]図5は、デ
ィスク装置100にエラーが発生した場合のディスクド
ライバ2の基本的動作の説明図であり、(a)はシステ
ムブロック11にエラーが発生した場合のディスクドラ
イバ2の基本的動作の説明図、(b)はデータブロック
12またはバックアップブロック13にエラーが生じた
場合のディスクドライバ2の基本的動作の説明図であ
る。 (:システムブロックのエラー)図5または図6で、デ
ィスクドライバ2はディスク装置100から送られるス
ティタスを調べ(T1)、システムブロック11のエラ
ーが発生した場合にはエラースティタスをOS4に渡し
て、エラー回復処理をOS4に委ねる(T2)。
[Operation when Error Occurs] FIG. 5 is an explanatory diagram of the basic operation of the disk driver 2 when an error occurs in the disk device 100. FIG. FIG. 7B is an explanatory diagram of a basic operation of the disk driver 2 in the case where the error occurs, and FIG. 7B is an explanatory diagram of a basic operation of the disk driver 2 when an error occurs in the data block 12 or the backup block 13. (: System block error) In FIG. 5 or FIG. 6, the disk driver 2 checks the status sent from the disk device 100 (T1). If an error of the system block 11 occurs, the disk driver 2 passes the error status to the OS4. Error recovery processing is entrusted to the OS 4 (T2).

【0033】(データブロック,バックアップブロック
のエラー)上記ステップT1で、データブロック12ま
たはバックアップブロック13にエラーが発生した場合
には、データブロック12とバックアップブロック13
に共にエラーが発生しているか否かを調べ、データブロ
ック12とバックアップブロック13に共にエラーが発
生している場合(データブロック12とバックアップブ
ロック13に同時にエラーが生じた場合と、一方のブロ
ックにエラーが生じた後で他の一方に新たにエラーが生
じた場合とを含む)にはT4に遷移し、データブロック
12とバックアップブロック13のいずれか一方にエラ
ーが発生した場合にはT6に遷移する(T3)。
(Errors in Data Block and Backup Block) If an error occurs in the data block 12 or the backup block 13 in step T1, the data block 12 and the backup block 13
It is determined whether an error has occurred in both the data block 12 and the backup block 13 (if an error has occurred in the data block 12 and the backup block 13 at the same time, The transition to T4 occurs when an error has occurred and another error has occurred in the other one), and the transition to T6 occurs when one of the data block 12 and the backup block 13 has an error. (T3).

【0034】(:データブロックとバックアップブロッ
ク共にエラー)上記ステップT3で、データブロック1
2とバックアップブロック13に共にエラーが発生した
場合には、エラースティタスをOS4に渡し、OS4ま
たはアプリケーションプログラム3にエラー処理を委ね
る。この場合、ディスクドライバ2は現在のブロックへ
のアクセスを禁止しないようにするため(すなわち、現
在のブロックへのアクセスをOS側の指示により行なえ
るようにするため)、現在のブロックをアクセスブロッ
クとしてOSにエラー発生スティタスを返し(T4)、
ユーザへのエラー通知を行なう。実施例ではエラー通知
はエラー通知プログラム5が行なっているので、ディス
クドライバ2はこの場合エラー通知プログラムに遷移す
る(T5)。
(: Both the data block and the backup block have errors) In step T3, the data block 1
When an error occurs in both the backup block 2 and the backup block 13, the error status is passed to the OS 4, and the error processing is entrusted to the OS 4 or the application program 3. In this case, the disk driver 2 sets the current block as an access block so as not to prohibit access to the current block (that is, to allow access to the current block according to an instruction from the OS). An error occurrence status is returned to the OS (T4),
Notify the user of the error. In the embodiment, since the error notification is performed by the error notification program 5, the disk driver 2 transits to the error notification program in this case (T5).

【0035】(データブロックまたはバックアップブロ
ックの一方のエラー)上記ステップT3で、データブロ
ック12またはバックアップブロック13のいずれか一
方にエラーが発生した場合で、リードアクセスの途中で
エラーが生じたときにはデータをバックアップブロック
から読み出す(データ転送)。すなわち、データブロッ
ク12にエラーが生じた場合にはバックアップブロック
13の読み出し開始アドレス(セクタ)に現在の転送セ
クタ数を加えて読み出し再開アドレスとしてOS4に与
え、バックアップブロック13からデータを読み出すよ
うにしてから(T6)、ディスクドライバ2はエラー通
知プログラムに遷移してユーザへのリードエラー通知を
行なわせる(T7)。また、上記ステップT3で、ライ
トアクセスの途中にエラーが生じた場合で、エラーがデ
ータブロック12に生じたときにはバックアップブロッ
クに同一データを書込むようにバックアップブロック1
3の書込み開始アドレス(セクタ)をOS4に与えると
共に、ライトコマンドをディスク装置100に与えてバ
ックアップブロック13にデータを書き直しを開始させ
(T8)、T11に遷移する(T9)。また、ライトア
クセスの途中にエラーが生じた場合で、エラーがバック
アップブロック13に生じた場合には、書込み中断ステ
ィタスをOS4に渡してライトアクセスを終了させる
(T10)。ディスクドライバ2はエラー通知プログラ
ムに遷移してユーザへのライトエラー通知を行なわせる
(T11)。
(Either Data Block or Backup Block Error) In step T3, if an error occurs in either the data block 12 or the backup block 13 and the error occurs during read access, the data is deleted. Read from backup block (data transfer). That is, when an error occurs in the data block 12, the current transfer sector number is added to the read start address (sector) of the backup block 13 and given to the OS 4 as a read restart address, and data is read from the backup block 13. From (T6), the disk driver 2 transitions to the error notification program and notifies the user of a read error (T7). In step T3, when an error occurs during the write access, when the error occurs in the data block 12, the backup block 1 writes the same data to the backup block.
The write start address (sector) of No. 3 is given to the OS 4 and a write command is given to the disk device 100 to start rewriting data in the backup block 13 (T8), and transit to T11 (T9). If an error occurs in the middle of the write access and the error occurs in the backup block 13, the write interruption status is passed to the OS 4 to terminate the write access (T10). The disk driver 2 transitions to the error notification program and causes the user to perform a write error notification (T11).

【0036】[ディスクアクセス効率向上動作]本発明
のディスクの障害回復方法では、ディスクドライバ2が
データブロック12とバックアップブロック13に同一
データを書込むミラーリングを行なうので、一方のブロ
ックへの書込みを終って、他方のブロックにアクセスを
開始する場合に、RAID1のように書込みヘッドをそ
のつど移動していてはシーク時間がかかり、1台のディ
スクを用いる場合にはシングルディスクシステム(図1
1)の2倍時間がかかることになるが、本発明ではコン
ピュータ装置の起動時やアプリケーションの実行時にシ
ステムブロック11からのOSやプログラムの読み出し
や、設定値の書込み等とデータブロック12からのデー
タ読み出し時には、後述するようにシングルシステムの
場合と同様のアクセスを行ない、ミラーリングによる時
間効率の低下を最小限に止めるようにしている。また、
ディスク容量についても、システムブロック11を二重
化しないことにより、データブロックとバックアップブ
ロックのディスク容量比を高くするようにしている。
[Operation for Improving Disk Access Efficiency] In the disk failure recovery method of the present invention, since the disk driver 2 performs mirroring for writing the same data to the data block 12 and the backup block 13, the writing to one block is completed. When the access to the other block is started, a seek time is required when the write head is moved each time as in RAID1, and when a single disk is used, a single disk system (FIG. 1) is used.
In the present invention, it takes twice as long as 1). However, according to the present invention, when the computer device is started or an application is executed, the OS or the program is read from the system block 11, the set value is written, and the data from the data block 12 are written. At the time of reading, the same access as in the case of the single system is performed as will be described later, so that a decrease in time efficiency due to mirroring is minimized. Also,
As for the disk capacity, the system block 11 is not duplicated to increase the disk capacity ratio between the data block and the backup block.

【0037】(:データ読み出し動作)図7は、ディス
クドライバ2によるディスク装置100のデータ読み出
し動作制御の説明図であり、(a)はディスク装置10
0が正常動作している場合のシステムブロック11に対
する読み出し動作の説明図、(b)はディスク装置10
0が正常動作している場合のデータブロック12に対す
る読み出し動作の説明図、(c)はデータブロック12
にエラーが生じた場合のバックアップブロック13に対
する読み出し動作(エラー発生時)の説明図である。
(: Data Read Operation) FIGS. 7A and 7B are explanatory diagrams of the data read operation control of the disk device 100 by the disk driver 2. FIG.
FIG. 4 is an explanatory diagram of a read operation for the system block 11 when the disk drive 10 is operating normally.
FIG. 8 is an explanatory diagram of a read operation for the data block 12 when 0 is operating normally, and FIG.
FIG. 9 is an explanatory diagram of a read operation (when an error occurs) for the backup block 13 when an error occurs in FIG.

【0038】図7(a),(b)に示すようにディスク
装置100が正常動作している場合の読み出し動作は、
OSからリクエストされたブロックのデータを転送する
動作のみであり、この場合のアクセス速度はシングルデ
ィスクシステムの場合と同様となる。また、図7(c)
に示すようにデータブロック12にエラーが発生した場
合には、データブロック12からの転送はおこなわず、
バックアップブロック13から転送するので、この場合
のアクセス速度もシングルディスクシステムの場合と同
様となる。
As shown in FIGS. 7A and 7B, the read operation when the disk device 100 is operating normally is as follows.
Only the operation of transferring the data of the block requested by the OS is performed, and the access speed in this case is similar to that of the single disk system. FIG. 7 (c)
When an error occurs in the data block 12 as shown in (1), the transfer from the data block 12 is not performed.
Since the data is transferred from the backup block 13, the access speed in this case is the same as that of the single disk system.

【0039】(:データ書込み動作)図8は、ディスク
ドライバ2によるディスク装置100の書込み動作制御
の説明図であり、(a)はディスク装置100が正常に
動作している場合で、データブロック12にデータを書
込んだ場合の次の書込みにおけるアクセスブロックの説
明図、(b)はディスク装置100が正常動作している
場合で、バックアップブロック13にデータを書込んだ
場合の次の書込みにおけるアクセスブロックの説明図で
ある。
(: Data Write Operation) FIGS. 8A and 8B are diagrams for explaining the write operation control of the disk device 100 by the disk driver 2. FIG. 8A shows the case where the disk device 100 is operating normally and the data block 12 shown in FIG. FIG. 8B is an explanatory diagram of an access block in the next write when data is written to the backup block 13. FIG. 11B shows an access in the next write when data is written to the backup block 13 when the disk device 100 is operating normally. It is explanatory drawing of a block.

【0040】図8(a),(b)に示すようにディスク
装置100が正常動作している場合の書込み動作は、シ
ーク時間(ヘッドの移動時間)の短縮を図るため、シン
グルシステムの場合と同様に今回のアクセスで最初に書
込むセクタを前回アクセスしたセクタに近いブロックか
らアクセスすることによって結果としてデータ書込み時
間を短縮する。
As shown in FIGS. 8 (a) and 8 (b), the write operation when the disk device 100 is operating normally is performed in a single system in order to shorten the seek time (movement time of the head). Similarly, by accessing the first sector to be written in this access from a block close to the previously accessed sector, the data write time is shortened as a result.

【0041】具体的には、図8(a)でデータ書込みを
データブロック12から開始すると、データのミラーリ
ングを行なうためにデータブロック12に書込みを終了
した後はバックアップブロック13から同一データの書
込みを開始してバックアップブロック13のあるセクタ
(p)で書込みを終了し、書込み終了セクタ(p)の位
置をメモリに保持する。ここで、次のアクセスでデータ
ブロック12から書込みを開始するようにするとシーク
時間がかかるので、これをほぼゼロにするために前回の
アクセスの終了位置であるバックアップブロック13の
書込み終了セクタ(p)に最も近い位置である(p+
1)セクタまたは終了セクタ(p)を含むブロック(こ
の場合はバックアップブロック13)から書込みを開始
して、バックアップブロック13への書込みを終了する
とデータブロック12に同一データの書込みを開始して
データブロック12のあるセクタ(q)で書込みを終了
する。 また、次のアクセス動作はデータブロック12
の書込み終了セクタ(q)に最も近い位置である(q+
1)セクタまたは終了セクタを含むブロック(この場合
はデータブロック12)から書込みを開始してデータブ
ロック12への書込みを終了するとバックアップブロッ
ク13への同一データの書込みを開始する。このような
アクセス動作を繰り返すことにより、シーク時間が短縮
される。
More specifically, when data writing is started from the data block 12 in FIG. 8A, the same data is written from the backup block 13 after writing to the data block 12 is completed to perform data mirroring. Then, the writing is completed at a certain sector (p) of the backup block 13, and the position of the writing end sector (p) is held in the memory. Here, if writing is started from the data block 12 in the next access, a seek time is required. Therefore, in order to reduce the seek time to almost zero, the write end sector (p) of the backup block 13 which is the end position of the previous access. (P +
1) Writing is started from a block including the sector or the end sector (p) (in this case, the backup block 13), and when writing to the backup block 13 is completed, writing of the same data to the data block 12 is started and the data block is started. The writing is completed in a certain sector (q) of twelve. The next access operation is performed in the data block 12.
Is the position closest to the write end sector (q) of (q +
1) When writing is started from a block including the sector or the end sector (in this case, the data block 12) and writing to the data block 12 is completed, writing of the same data to the backup block 13 is started. By repeating such an access operation, the seek time is reduced.

【0042】すなわち、バックアップブロック13から
データブロック12にヘッダを移動させる時間をtとす
ると、アクセス毎にデータブロック12からの書込みを
開始する方式では、n回アクセスを行なうと(n−1)
tバックアップブロック13からデータブロックのシー
ク時間がかかる。これに対し、本発明の書込み動作のよ
うに前回のアクセス終了位置に近いセクタから今回のア
クセスを開始する方式では、前回のアクセス終了位置に
近いセクタから今回データを書込む位置までのヘッダの
移動時間をt’とし、n回アクセスを行なうと(n−
1)t’のシーク時間がかかるが、t’<<tであるか
ら、(n−1)t’<<(n−1)tとなり、アクセス
開始シーク時間が大幅に節約できる。
That is, assuming that the time for moving the header from the backup block 13 to the data block 12 is t, in the method of starting writing from the data block 12 for each access, n-times access is performed (n-1).
It takes a seek time from the backup block 13 to the data block. On the other hand, in the method of starting the current access from the sector near the previous access end position as in the write operation of the present invention, the header is moved from the sector near the previous access end position to the position where the current data is written. When the time is t ′ and the access is performed n times, (n−
1) Although a seek time of t 'is required, since t'<< t, (n-1) t '<< (n-1) t, and an access start seek time can be greatly reduced.

【0043】また、エラー発生時のエラー情報を格納す
るログ領域を不揮発性メモリに設けることにより、次回
電源立ち上げ時にディスクにアクセスしなくてもエラー
の発生をユーザに通知できる。
Further, by providing a log area for storing error information at the time of occurrence of an error in the nonvolatile memory, it is possible to notify the user of the occurrence of the error without accessing the disk at the next power-on.

【0044】[0044]

【発明の効果】上記に述べたとおり、本発明によれば、
ハードディスクに生じる障害からデータを保護する際、
ハードディスクに障害が生じることを回避或いは防止す
ることを直接の目的とするのではなく、ハードディスク
に障害が生じることを自明の事象として受入れ回復する
ことを目的としてデータのミラーリングを行なっている
のでディスクエラーの発生時に高い確率でデータを回復
できる。特に、低価格なスタンドアローンタイプのコン
ピュータ装置、例えば、1台のディスク装置を接続する
か内蔵して稼働可能に構成されたコンピュータ装置にも
適用可能である。
As described above, according to the present invention,
When protecting data from hard disk failures,
Disk error is not intended to avoid or prevent hard disk failure, but is to mirror data for the purpose of accepting and recovering from hard disk failure as a trivial event. Data can be recovered with a high probability in the event of an occurrence. In particular, the present invention can be applied to a low-cost stand-alone type computer device, for example, a computer device which is configured to be operable with one disk device connected or built therein.

【0045】ディスクアレイではデータは分割されて各
ディスクに離散的に格納されるが、本発明ではデータは
連続したブロック内に書込まれ、読み出されるので、デ
ィスクドライバの構成がRAIDの場合より簡素化でき
る。また、複数のディスクがホストコンピュータに内蔵
または外付けされていてもよい。
In a disk array, data is divided and stored discretely in each disk. However, in the present invention, data is written and read in continuous blocks, so that the configuration of a disk driver is simpler than in the case of RAID. Can be Further, a plurality of disks may be built in or external to the host computer.

【0046】前回のアクセス位置を保持して今回の書込
み動作を行なうようにしているので、ミラーリング時の
高速化が実現できる。
Since the current write operation is performed while holding the previous access position, high-speed mirroring can be realized.

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

【図1】本発明のディスクの障害回復方法を適用可能な
ディスクの領域構成の一実施例を示す図である。
FIG. 1 is a diagram showing an embodiment of a disk area configuration to which a disk failure recovery method of the present invention can be applied.

【図2】本発明のディスクの障害回復方法の説明図であ
る。
FIG. 2 is an explanatory diagram of a disk failure recovery method according to the present invention.

【図3】ディスク装置が正常動作を行なっているときの
ディスクドライブの基本的動作の説明図である。
FIG. 3 is an explanatory diagram of a basic operation of the disk drive when the disk device is performing a normal operation.

【図4】ディスクドライバのデータアクセス時の基本的
動作を示すフローチャートである。
FIG. 4 is a flowchart showing a basic operation of the disk driver when accessing data.

【図5】ディスク装置にエラーが発生した場合のディス
クドライバの基本的動作を示す説明図である。
FIG. 5 is an explanatory diagram showing a basic operation of a disk driver when an error occurs in a disk device.

【図6】ディスクドライバのデータアクセス時の基本的
動作を示すフローチャートである。
FIG. 6 is a flowchart showing a basic operation of the disk driver when accessing data.

【図7】ディスクドライバによるディスク装置のデータ
読み出し動作制御の説明図である。
FIG. 7 is an explanatory diagram of data read operation control of a disk device by a disk driver.

【図8】ディスクドライバによるディスク装置の書込み
動作制御の説明図である。
FIG. 8 is an explanatory diagram of write operation control of a disk device by a disk driver.

【図9】RAID1によるディスクの二重化(ミラーリ
ング)方式の説明図である。
FIG. 9 is an explanatory diagram of a dual disk (mirroring) system using RAID1.

【図10】RAID1によるディスク障害時のデータ回
復動作の説明図である。
FIG. 10 is an explanatory diagram of a data recovery operation at the time of a disk failure by RAID1.

【図11】シングルディスクシステムの説明図である。FIG. 11 is an explanatory diagram of a single disk system.

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

1 ディスク(記録媒体) 2 ディスクドライバ 3 アプリケーションプログラム(アプリケーション) 11 システムブロック 12 データブロック 13 バックアップブロック 100 ディスク装置 DESCRIPTION OF SYMBOLS 1 Disk (recording medium) 2 Disk driver 3 Application program (application) 11 System block 12 Data block 13 Backup block 100 Disk device

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ディスク領域を同容量の2ブロックを含
む3ブロックに分割し、前記同容量の2ブロックに同一
データを書込み、前記同容量のブロックのうち一方にデ
ィスクエラーが発生したときにはエラー未発生のブロッ
クへのアクセスを行なうことを特徴とするディスクの障
害回復方法。
1. A disk area is divided into three blocks including two blocks of the same capacity, and the same data is written in the two blocks of the same capacity. When a disk error occurs in one of the blocks of the same capacity, no error is detected. An error recovery method for a disk, comprising accessing an occurred block.
【請求項2】 コンピュータ装置に内蔵または外付け接
続して動作するディスク装置へのアクセス制御を行なう
プログラムからなるディスクドライバであって、ディス
クへのデータの書込みリクエストがあったとき、同容量
の2ブロックを含む3ブロックに分割されたディスクの
前記同容量の一方のブロックへのデータの書込み終了
後、更に、同一データを前記同容量の他のブロックに書
込むための書込みコマンドをディスク装置に発行してデ
ィスク装置に書込みを行なわせ、 ディスクへのデータの読み出しリクエストがあったと
き、前記同容量のブロックのうち所定のブロックから専
らデータの読み出しを行ない、前記所定のブロックにエ
ラーが発生したときには前記同容量の他のブロックから
データの読み出しを行なうことを特徴とするディスクド
ライバ。
2. A disk driver comprising a program for controlling access to a disk device that operates internally or externally connected to a computer device, wherein when a data write request to a disk is requested, the disk driver has a capacity of two. After writing data to one block of the same capacity of the disk divided into three blocks including blocks, a write command for writing the same data to another block of the same capacity is further issued to the disk device. When a request to read data from the disk is made, data is exclusively read from a predetermined block of the blocks having the same capacity, and an error occurs in the predetermined block. Reading data from another block of the same capacity. I disk driver.
【請求項3】 前記同容量の2ブロックにデータの書込
みを行なう場合に、前回アクセスを終了したセクタを保
持し、今回の書込みを前記セクタを含むブロックからの
書込み制御を行なうことを特徴とする請求項2記載のデ
ィスクドライバ。
3. When data is written to the two blocks having the same capacity, a sector which has been accessed last time is held, and writing control is performed from a block including the sector in writing this time. The disk driver according to claim 2.
【請求項4】 前記同容量の他のブロックをバックアッ
プ用ブロックとし、バックアップ用ブロックにはアプリ
ケーションによるリクエストを禁止することを特徴とす
る請求項2または3記載のディスクドライバ。
4. The disk driver according to claim 2, wherein another block of the same capacity is used as a backup block, and a request by an application is prohibited in the backup block.
【請求項5】 コンピュータ装置に内蔵または外付け接
続して動作するディスク装置によってデータの書込み/
読み出しが行なわれる記録媒体であって、 前記ディスクの領域を同容量の2ブロックを含む3ブロ
ックに分割し、前記同容量の2ブロック中の一方をデー
タの読み出しを他の一方のブロックより優先するデータ
ブロックとし、前記同容量の2ブロック中の他方を前記
データブロックと同一データを書込むバックアップブロ
ックとし、前記3ブロック中の同容量でないブロックを
プログラムまたはインタープリタデータの読み出し/書
込みを行なうシステムブロックとして分割したことを特
徴とする記録媒体。
5. A disk drive which operates by being connected to a computer device internally or externally to write / read data.
A recording medium from which reading is performed, wherein the area of the disc is divided into three blocks including two blocks of the same capacity, and one of the two blocks of the same capacity is given priority over data reading over the other block. Data blocks, the other of the two blocks having the same capacity being a backup block for writing the same data as the data block, and the non-capacity block of the three blocks being a system block for reading / writing program or interpreter data. A recording medium characterized by being divided.
JP10196766A 1998-06-26 1998-06-26 Disk fault recovering method, disk driver, and recording medium Pending JP2000020248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10196766A JP2000020248A (en) 1998-06-26 1998-06-26 Disk fault recovering method, disk driver, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10196766A JP2000020248A (en) 1998-06-26 1998-06-26 Disk fault recovering method, disk driver, and recording medium

Publications (1)

Publication Number Publication Date
JP2000020248A true JP2000020248A (en) 2000-01-21

Family

ID=16363275

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10196766A Pending JP2000020248A (en) 1998-06-26 1998-06-26 Disk fault recovering method, disk driver, and recording medium

Country Status (1)

Country Link
JP (1) JP2000020248A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003042840A1 (en) * 2001-11-12 2003-05-22 Legend (Beijing) Limited A method for backing up and recovering data in a hard disk
JP2005250827A (en) * 2004-03-04 2005-09-15 Clarion Co Ltd Storage device, on-vehicle equipment, and control method of storage device
JP2005258668A (en) * 2004-03-10 2005-09-22 Qd Factory Co Ltd Method for storing data in electronic computer system and electronic computer system
JP2007323377A (en) * 2006-06-01 2007-12-13 Sony Corp Recording apparatus, method for writing management data and method for repairing management data
JP2008519350A (en) * 2004-11-05 2008-06-05 データ ロボティクス インコーポレイテッド A dynamically expandable and shrinkable fault-tolerant storage system using virtual hot spares
JP2008204460A (en) * 2007-02-16 2008-09-04 Seagate Technology Llc Near instantaneous backup and restoration of disc partition
US7654904B2 (en) 2002-11-15 2010-02-02 Nintendo Co., Ltd. Game machine, backup control program of game data and backup control method
US7664981B2 (en) 2004-07-22 2010-02-16 Samsung Electronics Co., Ltd. Method of restoring source data of hard disk drive and method of reading system information thereof
US7873782B2 (en) 2004-11-05 2011-01-18 Data Robotics, Inc. Filesystem-aware block storage system, apparatus, and method
KR20210002571A (en) 2018-11-22 2021-01-08 가부시끼가이샤 도시바 Information processing device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003042840A1 (en) * 2001-11-12 2003-05-22 Legend (Beijing) Limited A method for backing up and recovering data in a hard disk
US7654904B2 (en) 2002-11-15 2010-02-02 Nintendo Co., Ltd. Game machine, backup control program of game data and backup control method
JP2005250827A (en) * 2004-03-04 2005-09-15 Clarion Co Ltd Storage device, on-vehicle equipment, and control method of storage device
JP4500562B2 (en) * 2004-03-04 2010-07-14 クラリオン株式会社 Storage device, in-vehicle device, and control method of storage device
JP2005258668A (en) * 2004-03-10 2005-09-22 Qd Factory Co Ltd Method for storing data in electronic computer system and electronic computer system
US7664981B2 (en) 2004-07-22 2010-02-16 Samsung Electronics Co., Ltd. Method of restoring source data of hard disk drive and method of reading system information thereof
US7814273B2 (en) 2004-11-05 2010-10-12 Data Robotics, Inc. Dynamically expandable and contractible fault-tolerant storage system permitting variously sized storage devices and method
JP2008519350A (en) * 2004-11-05 2008-06-05 データ ロボティクス インコーポレイテッド A dynamically expandable and shrinkable fault-tolerant storage system using virtual hot spares
US7814272B2 (en) 2004-11-05 2010-10-12 Data Robotics, Inc. Dynamically upgradeable fault-tolerant storage system permitting variously sized storage devices and method
US7818531B2 (en) 2004-11-05 2010-10-19 Data Robotics, Inc. Storage system condition indicator and method
US7873782B2 (en) 2004-11-05 2011-01-18 Data Robotics, Inc. Filesystem-aware block storage system, apparatus, and method
US9043639B2 (en) 2004-11-05 2015-05-26 Drobo, Inc. Dynamically expandable and contractible fault-tolerant storage system with virtual hot spare
JP2007323377A (en) * 2006-06-01 2007-12-13 Sony Corp Recording apparatus, method for writing management data and method for repairing management data
JP2008204460A (en) * 2007-02-16 2008-09-04 Seagate Technology Llc Near instantaneous backup and restoration of disc partition
KR20210002571A (en) 2018-11-22 2021-01-08 가부시끼가이샤 도시바 Information processing device

Similar Documents

Publication Publication Date Title
KR100211788B1 (en) Failure prediction for disk arrays
US5195100A (en) Non-volatile memory storage of write operation identifier in data sotrage device
US5233618A (en) Data correcting applicable to redundant arrays of independent disks
JP3133004B2 (en) Disk array device and control method therefor
JP3235815B2 (en) Data storage method and queuing method
US5608891A (en) Recording system having a redundant array of storage devices and having read and write circuits with memory buffers
US6886075B2 (en) Memory device system and method for copying data in memory device system
US7770076B2 (en) Multi-platter disk drive controller and methods for synchronous redundant data operations
US20080184062A1 (en) System and method for detecting write errors in a storage device
US8041891B2 (en) Method and system for performing RAID level migration
JPH08263227A (en) Holding method of consistency of parity data in disk array
JP3230645B2 (en) Data processing method, system and device
WO2002003204A1 (en) Three interconnected raid disk controller data processing system architecture
US8375187B1 (en) I/O scheduling for flash drives
JP2000020248A (en) Disk fault recovering method, disk driver, and recording medium
US7130973B1 (en) Method and apparatus to restore data redundancy and utilize spare storage spaces
JP2913840B2 (en) Collective disk unit
KR19990051729A (en) Structure of Raid System with Dual Array Controllers
JP2002278706A (en) Disk array device
JP2778268B2 (en) Recording medium control device
JP3613722B2 (en) Disk array device
GB2402803A (en) Arrangement and method for detection of write errors in a storage system
JPH0744331A (en) Disk array device and its control method
JP3597550B2 (en) Disk array device
JP2023133864A (en) Storage apparatus and rebuild control method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20040608

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040608

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080422

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080616

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090317

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090514

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091020