JPH07271647A - Duplex file system - Google Patents

Duplex file system

Info

Publication number
JPH07271647A
JPH07271647A JP6061822A JP6182294A JPH07271647A JP H07271647 A JPH07271647 A JP H07271647A JP 6061822 A JP6061822 A JP 6061822A JP 6182294 A JP6182294 A JP 6182294A JP H07271647 A JPH07271647 A JP H07271647A
Authority
JP
Japan
Prior art keywords
file
data
relay area
relay
area
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
JP6061822A
Other languages
Japanese (ja)
Inventor
Manabu Shirakawa
学 白川
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP6061822A priority Critical patent/JPH07271647A/en
Publication of JPH07271647A publication Critical patent/JPH07271647A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently perform the processes for writing data to duplex files by asynchronously performing the process for writing data to the main file and the process for writing data to the sub-file. CONSTITUTION:A 1st data writing means 15 writes data to the master file 12 at a data writing process request made by an AP 11 and stores information on the data written to the sub-file 13 in a 1st repeating area 14. A 2nd data writing means 16 operates asynchronously with the 1st data writing means 15 to copy the data stored in the 1st repeating area 14 to a 2nd repeating area 17 and the initialize the 1st repeating area 14, and further read the data out of the 2nd repeating area 17 and writes them to the sub-file 13.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、同一の情報を異なる2
つの外部記憶装置内のファイルに書き出し、情報の読み
込みは一方の外部記憶装置内のファイルから行う二重化
ファイルシステムに関する。
BACKGROUND OF THE INVENTION The present invention uses the same information for different 2
The present invention relates to a dual file system in which data is written to a file in one external storage device and information is read from a file in one external storage device.

【0002】[0002]

【従来の技術】従来の二重化ファイルシステムは、書き
出し処理は正ファイルおよび副ファイルの両ファイルに
行い、読み込み処理は正ファイルのみから行うものであ
り、ファイルの信頼性を向上させるために採用されるシ
ステムである。
2. Description of the Related Art In a conventional dual file system, a writing process is performed on both a primary file and a secondary file, and a reading process is performed only on the primary file, which is adopted to improve file reliability. System.

【0003】特開昭56−129964号公報には、こ
のような二重化ファイルシステムおいて、正ファイルと
副ファイルの2つのファイルにデータを書き出す処理の
効率化を図るために、それぞれのファイルに対応するダ
イレクトメモリアクセスチャネルとバッファレジスタを
共通化するという技術が記載されている。
Japanese Unexamined Patent Publication No. 56-129964 discloses a dual file system in which two files, a primary file and a secondary file, are written in order to improve the efficiency of the data writing process. There is described a technique of sharing a direct memory access channel with a buffer register.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の二重化
ファイルシステム、または特開昭56−129964号
公報方式記載の技術のいずれにおいても、正ファイルと
副ファイルに対するデータの書き出し処理は、正ファイ
ルに対しての書き出し処理完了後、副ファイルへの書き
出し処理を行うというように逐次に行なわれるため、二
重化を行っていない場合の書き込み処理よりも長い時間
の出力完了待ちが発生するという問題点がある。
In either of the above-mentioned conventional dual file system or the technique described in Japanese Patent Laid-Open No. 56-129964, the writing process of data to the primary file and the secondary file is performed on the primary file. Since the writing process to the secondary file is performed after the writing process is completed, the output completion wait time is longer than that of the writing process when the duplication is not performed. .

【0005】本発明の目的は、二重化ファイルへのデー
タ書き出し処理が、非二重化ファイルへのデータ書き出
し処理と同等の性能を実現する二重化ファイルシステム
を提供することにある。
An object of the present invention is to provide a duplicated file system in which the data writing process to a duplicated file realizes the same performance as the data writing process to a non-duplicated file.

【0006】本発明の他の目的は、正ファイルへのデー
タ書き出し処理と、副ファイルへのデータ書き出し処理
を非同期に実施することにより、二重化ファイルのデー
タ書き出し処理を効率的に実施する二重化ファイルシス
テムを提供することにある。
Another object of the present invention is to provide a dual file system for efficiently performing dual file data write processing by asynchronously performing data write processing to a primary file and data write processing to a secondary file. To provide.

【0007】さらに本発明の他の目的は、正ファイルに
障害が発生した際には、全ての入出力処理を副ファイル
に対して実施することにより、入出力処理を滞らせるこ
となく継続することができる二重化ファイルシステムを
提供することにある。
Still another object of the present invention is to continue all the input / output processing without delay by executing all the input / output processing for the secondary file when a failure occurs in the primary file. The purpose is to provide a dual file system that can do this.

【0008】さらに本発明の他の目的は、二重化ファイ
ルシステムを含む計算機システムに障害が発生した際
に、中継領域の内容を外部記憶装置に退避することによ
り、書き出し対象のデータを失うことなく、計算機シス
テムの再立ち上げ後に二重化ファイルシステムの運用を
再開することができる二重化ファイルシステムを提供す
ることにある。
Still another object of the present invention is to save the contents of the relay area to an external storage device when a failure occurs in a computer system including a duplicated file system so that the data to be written is not lost. An object of the present invention is to provide a redundant file system that can restart the operation of the redundant file system after restarting the computer system.

【0009】[0009]

【課題を解決するための手段】本発明の第1の二重化フ
ァイルシステムは、アプリケーションプログラムのデー
タを格納するためのファイルを2個のファイルで一つの
対として構成し、その一方を正ファイル、他方を副ファ
イルとし、書き出し処理は正ファイルおよび副ファイル
の両ファイルに行い、読み込み処理は正ファイルのみか
ら行う二重化ファイルシステムにおいて、前記副ファイ
ルに対する更新情報を一次的に格納しておく主記憶装置
上の第1の中継領域および第2の中継領域と、前記アプ
リケーションプログラムからのデータの書き出し処理要
求に応じて前記正ファイルにデータを書き出し、前記副
ファイルへ書き出すデータの更新情報をこの第1の中継
領域に格納する第1のデータ書き出し手段と、この第1
のデータ書き出し手段とは非同期に動作し、前記第1の
中継領域の内容を第2の中継領域にコピーした後、前記
第1の中継領域を初期化し、さらにこの第2の中継領域
に格納されたデータを読み込み、前記副ファイルに書き
出す第2のデータ書き出し手段とから構成されている。
According to a first duplicated file system of the present invention, a file for storing data of an application program is constituted by a pair of two files, one of which is a primary file and the other of which is a file. Is a secondary file, the writing process is performed for both the primary file and the secondary file, and the reading process is performed for the primary file only. In a dual file system, on the main storage device that temporarily stores update information for the secondary file Of the first relay area and the second relay area, and the update information of the data to be written to the primary file in response to the data write processing request from the application program and to be written to the secondary file. A first data writing means for storing in the area;
Of the first relay area, the content of the first relay area is copied to the second relay area, the first relay area is initialized, and the second relay area is stored in the second relay area. And second data writing means for reading the written data and writing it in the sub file.

【0010】本発明の第2の二重化ファイルシステム
は、第1の二重化ファイルシステムにおいて、前記第1
の中継領域および前記第2の中継領域は、前記副ファイ
ルにおけるデータの書き出し先ブロック番号と書き出し
データを格納するバッファ部と、前記第1のデータ書き
出し手段が前記第1の中継領域にデータを追加する時の
追加位置を示す終端レコードポインタ、前記第2のデー
タ書き出し手段が前記第2の中継領域からデータを取得
する時の先頭レコードの位置を示す先頭レコードポイン
タ、および未使用のバッファ数を格納するために利用す
る空きバッファ数カウンタからなる制御部とから構成さ
れている。
A second duplicated file system of the present invention is the same as the first duplicated file system according to the first duplicated file system.
And the second relay area, the buffer unit storing the write destination block number of the data in the sub-file and the write data, and the first data writing unit adds data to the first relay area. The end record pointer indicating the additional position when the data is read, the first record pointer indicating the position of the first record when the second data writing unit acquires data from the second relay area, and the number of unused buffers are stored. And a control unit composed of a free buffer number counter used for this purpose.

【0011】本発明の第3の二重化ファイルシステム
は、第2の二重化ファイルシステムにおいて、前記第2
の書き出し手段は、前記第1の中継領域の内容を前記第
2の中継領域にコピーし、第1の中継領域を初期化する
処理の間は、前記第1の中継領域を排他制御の対象とし
て、前記第1の書き出し手段からの前記第1の中継領域
への情報の書き出しを待たせるように構成されている。
A third duplicated file system of the present invention is the same as the second duplicated file system according to the second duplicated file system.
Writing means for copying the contents of the first relay area to the second relay area and setting the first relay area as an exclusive control target during the process of initializing the first relay area. The writing of information from the first writing means to the first relay area is put on hold.

【0012】本発明の第4の二重化ファイルシステム
は、第1、第2、および第3の二重化ファイルシステム
において、前記第1のデータ書き出し手段は、前記正フ
ァイルに障害が発生して入出力処理を実行できないと判
定した時に、前記第2のデータ書き出し手段の処理完了
を待ち合わせた後、全ての入出力処理を直接前記副ファ
イルに対して行い、前記正ファイルと前記第1の中継領
域に対しての入出力処理は行わないように構成されてい
る。
According to a fourth duplex file system of the present invention, in the first, second, and third duplex file systems, the first data writing means performs input / output processing when a failure occurs in the primary file. When it is determined that the second data writing means is not executed, all the input / output processing is directly performed on the sub file, and the primary file and the first relay area are processed. All input / output processing is not performed.

【0013】本発明の第5の二重化ファイルシステム
は、第1、第2、第3、および第4の二重化ファイルシ
ステムにおいて、前記二重化ファイルシステムを含む計
算機システムに障害が発生した際には、前記第1の中継
領域および前記第2の中継領域の内容を外部記憶装置に
退避する中継領域退避手段と、計算機システム再立ち上
げ後には、この外部記憶装置に退避した前記第1の中継
領域および前記第2の中継領域の内容を前記第1の中継
領域および前記第2の中継領域にロードする中継領域ロ
ード手段とを含んで構成されている。
According to a fifth duplex file system of the present invention, in the first, second, third, and fourth duplex file systems, when a failure occurs in a computer system including the duplex file system, A relay area saving means for saving the contents of the first relay area and the second relay area to an external storage device, and the first relay area and the first backup area saved to this external storage device after restarting the computer system. The relay area loading means is configured to load the contents of the second relay area into the first relay area and the second relay area.

【0014】本発明の第6の二重化ファイルシステム
は、第1、第2、第3、および第4の二重化ファイルシ
ステムにおいて、前記第1中継領域および第2の中継領
域を、外部記憶装置上に第1の中継ファイルおよび第2
の中継ファイルとして構成されている。
A sixth duplex file system of the present invention is the first, second, third and fourth duplex file system, wherein the first relay area and the second relay area are provided on an external storage device. First relay file and second
Is configured as a relay file.

【0015】本発明の第7の二重化ファイルシステム
は、第1、第2、第3、および第4の二重化ファイルシ
ステムにおいて、正ファイルにデータを書き出し、書き
出し先ブロック番号を記憶する正ファイルデータ書き出
しステップ、正ファイルへのデータ書き出しが正常終了
したか否かを判定する正ファイルデータ書き出し状態判
定ステップ、この正ファイルデータ書き出し状態判定ス
テップにおいて正ファイルへのデータ書き出しが正常終
了したと判定した場合に、第1の中継領域に空きバッフ
ァが存在するか否かを判定し、空きバッファが存在しな
い場合には一定時間経過後に再び空きバッファが存在す
るか否かを判定する空きバッファ存在判定ステップ、こ
の空きバッファ存在判定ステップにおいて空きバッファ
が存在すると判定した場合に、第1の中継領域の終端レ
コードポインタが指す領域の書き出し先ブロック番号に
前記正ファイルデータ書き出しステップで正ファイルに
データを書き出したブロック番号を、書き出しデータに
データ本体を書き出す第1の中継領域データ書き出しス
テップ、第1の中継領域の終端レコードポインタを次レ
コードに位置づける第1の中継領域終端レコードポイン
タ更新ステップ、第1の中継領域の空きバッファ数カウ
ンタから1減算する第1の中継領域空きバッファ数カウ
ンタ更新ステップ、前記正ファイルデータ書き出し状態
判定ステップにおいて正ファイルへのデータ書き出しが
異常終了したと判定した場合に、第1の中継領域の終端
レコードポインタと先頭レコードポインタがともにバッ
ファ部の先頭を指しているか否かを判定し、バッファ部
の先頭を指していない場合には一定時間経過後に再びバ
ッファ部の先頭を指しているか否かを判定する第1の中
継領域初期化完了判定ステップ、およびこの第1の中継
領域初期化完了判定ステップにおいて第1の中継領域の
終端レコードポインタと先頭レコードポインタがともに
バッファ部の先頭を指していると判定した場合に、副フ
ァイルにデータを書き出す副ファイルデータ書き出しス
テップとを含む第1のデータ書き出し手段と、第1の中
継領域に排他制御を施す第1の中継領域排他ステップ、
第1の中継領域の内容を第2の中継領域にコピーする中
継領域データコピーステップ、第1の中継領域を初期化
する第1の中継領域初期化ステップ、第1の中継領域の
排他制御を解除する第1の中継領域排他解除ステップ、
第2の中継領域の先頭レコードポインタと終端レコード
ポインタが等しいか否かを判定する第2の中継領域デー
タ読み込み完了判定ステップ、この第2の中継領域デー
タ読み込み完了判定ステップにおいて第2の中継領域の
先頭レコードポインタと終端レコードポインタが等しく
ないと判定した場合に、第2の中継領域内の先頭レコー
ドポインタが指すバッファから書き出し先ブロック番号
と書き出しデータを読み込む第2の中継領域データ読み
込みステップ、第2の中継領域の終端レコードポインタ
を次レコードに位置づける第2の中継領域終端レコード
ポインタ更新ステップ、第2の中継領域の空きバッファ
数カウンタに1加算する第2の中継領域空きバッファ数
カウンタ更新ステップ、および副ファイル内の書き出し
ブロック番号が示す領域に書き出しデータを書き出す副
ファイルデータ書き出しステップとを含む第2のデータ
書き出し手段とを含む。
According to a seventh duplex file system of the present invention, in the first, second, third, and fourth duplex file systems, data is written to a primary file and the primary file data is written to store the write destination block number. Step, a normal file data write status determination step to determine whether the data write to the primary file has completed normally, and a case where the data write to the primary file has been normally completed in this primary file data write status determination step , A free buffer existence determining step of determining whether or not a free buffer exists in the first relay area, and if a free buffer does not exist, again determining whether or not a free buffer exists after a lapse of a predetermined time. In the free buffer existence determination step, it is determined that there is a free buffer. In this case, the first relay that writes the block number in which the data was written to the primary file in the primary file data writing step to the write destination block number of the area pointed to by the end record pointer of the first relay area and the data body is written to the write data Area data writing step, first relay area end record pointer updating step for positioning the end record pointer of the first relay area to the next record, first relay area free space for subtracting 1 from the free buffer number counter of the first relay area When it is determined in the buffer number counter updating step and the primary file data writing status determining step that the data writing to the primary file has terminated abnormally, both the end record pointer and the head record pointer of the first relay area are the head of the buffer section. Determine whether or not However, if it does not point to the beginning of the buffer section, a first relay area initialization completion determination step of determining whether or not it points to the beginning of the buffer section again after a certain period of time, and this first relay area initialization A sub-file data writing step of writing data to a sub-file when it is determined that both the end record pointer and the top record pointer of the first relay area point to the head of the buffer section in the conversion completion determination step, Data writing means, and a first relay area exclusion step for performing exclusive control on the first relay area,
Relay area data copy step of copying the contents of the first relay area to the second relay area, first relay area initialization step of initializing the first relay area, and release of exclusive control of the first relay area First relay area exclusion releasing step,
In the second relay area data read completion determination step of determining whether or not the first record pointer and the end record pointer of the second relay area are equal, in the second relay area data read completion determination step, The second relay area data reading step of reading the write destination block number and the write data from the buffer pointed to by the first record pointer in the second relay area when it is determined that the first record pointer and the end record pointer are not equal, Second relay area end record pointer updating step of locating the end record pointer of the relay area of the next relay area to the next record, second relay area free buffer number counter updating step of adding 1 to the free buffer number counter of the second relay area, and Indicates the write block number in the subfile And a second data writing means including a sub-file data writing step to write the write data in the area.

【0016】本発明の第8の二重化ファイルシステム
は、第7の二重化ファイルシステムにおいて、前記二重
化ファイルシステムを含む計算機システムに障害が発生
した際には、前記第1の中継領域および前記第2の中継
領域の内容を外部記憶装置に退避する中継領域退避手段
と、計算機システム再立ち上げ後には、この外部記憶装
置に退避した前記第1の中継領域および前記第2の中継
領域の内容を前記第1の中継領域および前記第2の中継
領域にロードする中継領域ロード手段とを含んで構成さ
れている。
An eighth redundant file system of the present invention is the seventh redundant file system, wherein when a failure occurs in a computer system including the redundant file system, the first relay area and the second redundant file system are used. A relay area saving means for saving the contents of the relay area in an external storage device, and a content of the first relay area and the second relay area saved in the external storage device after the computer system is restarted. One relay area and relay area loading means for loading the second relay area are included.

【0017】本発明の第9の二重化ファイルシステム
は、第1、第2、第3、および第4の二重化ファイルシ
ステムにおいて、正ファイルにデータを書き出し、書き
出し先ブロック番号を記憶する正ファイルデータ書き出
しステップ、正ファイルへのデータ書き出しが正常終了
したか否かを判定する正ファイルデータ書き出し状態判
定ステップ、この正ファイルデータ書き出し状態判定ス
テップにおいて正ファイルへのデータ書き出しが正常終
了したと判定した場合に、第1の中継ファイルに空きバ
ッファが存在するか否かを判定し、空きバッファが存在
しない場合には一定時間経過後に再び空きバッファが存
在するか否かを判定する空きバッファ存在判定ステッ
プ、この空きバッファ存在判定ステップにおいて空きバ
ッファが存在すると判定した場合に、第1の中継ファイ
ルの終端レコードポインタが指す領域の書き出し先ブロ
ック番号に前記正ファイルデータ書き出しステップで正
ファイルにデータを書き出したブロック番号を、書き出
しデータにデータ本体を書き出す第1の中継ファイルデ
ータ書き出しステップ、第1の中継ファイルの終端レコ
ードポインタを次レコードに位置づける第1の中継ファ
イル終端レコードポインタ更新ステップ、第1の中継フ
ァイルの空きバッファ数カウンタから1減算する第1の
中継ファイル空きバッファ数カウンタ更新ステップ、前
記正ファイルデータ書き出し状態判定ステップにおいて
正ファイルへのデータ書き出しが異常終了したと判定し
た場合に、第1の中継ファイルの終端レコードポインタ
と先頭レコードポインタがともにバッファ部の先頭を指
しているか否かを判定し、バッファ部の先頭を指してい
ない場合には一定時間経過後に再びバッファ部の先頭を
指しているか否かを判定する第1の中継ファイル初期化
完了判定ステップ、およびこの第1の中継ファイル初期
化完了判定ステップにおいて第1の中継ファイルの終端
レコードポインタと先頭レコードポインタがともにバッ
ファ部の先頭を指していると判定した場合に、副ファイ
ルにデータを書き出す副ファイルデータ書き出しステッ
プとを含む第1のデータ書き出し手段と、第1の中継フ
ァイルに排他制御を施す第1の中継ファイル排他ステッ
プ、第1の中継ファイルの内容を第2の中継ファイルに
コピーする中継ファイルデータコピーステップ、第1の
中継ファイルを初期化する第1の中継ファイル初期化ス
テップ、第1の中継ファイルの排他制御を解除する第1
の中継ファイル排他解除ステップ、第2の中継ファイル
の先頭レコードポインタと終端レコードポインタが等し
いか否かを判定する第2の中継ファイルデータ読み込み
完了判定ステップ、この第2の中継ファイルデータ読み
込み完了判定ステップにおいて第2の中継ファイルの先
頭レコードポインタと終端レコードポインタが等しくな
いと判定した場合に、第2の中継ファイル内の先頭レコ
ードポインタが指すバッファから書き出し先ブロック番
号と書き出しデータを読み込む第2の中継ファイルデー
タ読み込みステップ、第2の中継ファイルの終端レコー
ドポインタを次レコードに位置づける第2の中継ファイ
ル終端レコードポインタ更新ステップ、第2の中継ファ
イルの空きバッファ数カウンタに1加算する第2の中継
ファイル空きバッファ数カウンタ更新ステップ、および
副ファイル内の書き出しブロック番号が示す領域に書き
出しデータを書き出す副ファイルデータ書き出しステッ
プとを含む第2のデータ書き出し手段とを含む。
According to a ninth duplex file system of the present invention, in the first, second, third, and fourth duplex file systems, data is written to the primary file and the primary file data is written to store the write destination block number. Step, a normal file data write status determination step to determine whether the data write to the primary file has completed normally, and a case where the data write to the primary file has been normally completed in this primary file data write status determination step , A free buffer existence determining step of determining whether or not a free buffer exists in the first relay file, and if a free buffer does not exist, again determining whether or not a free buffer exists after a certain period of time, It is determined that there is a free buffer in the free buffer existence determination step. In this case, the block number at which the data is written to the primary file in the primary file data writing step is written to the writing destination block number of the area pointed to by the end record pointer of the first relay file, and the data body is written to the writing data. Relay file data writing step, first relay file end record pointer updating step for locating end record pointer of first relay file to next record, first relay file subtracting 1 from free buffer number counter of first relay file When it is determined in the free buffer number counter updating step and the normal file data writing status determining step that the data writing to the primary file has terminated abnormally, the end record pointer and the first record pointer of the first relay file are both buffered. The first relay file initialization complete. It is determined whether it is pointing to the beginning of the copy section, and if it is not pointing to the beginning of the buffer section When it is determined in the determination step and the first relay file initialization completion determination step that both the end record pointer and the start record pointer of the first relay file point to the beginning of the buffer section, the data is written to the sub file. First data writing means including a writing step for writing sub-file data, a first relay file exclusion step for performing exclusive control on the first relay file, and copying the contents of the first relay file to the second relay file Relay file data copy step, and a first relay file initialization step for initializing the first relay file. First release the exclusive control of the first relay file
Relay file exclusion release step, a second relay file data read completion determination step that determines whether the first record pointer and the end record pointer of the second relay file are equal, and this second relay file data read completion determination step If the first record pointer and the end record pointer of the second relay file are not equal to each other, the second relay that reads the write destination block number and the write data from the buffer pointed to by the first record pointer in the second relay file File data reading step, second relay file end record pointer updating step for locating end record pointer of second relay file to next record, second relay file free space for adding 1 to free buffer number counter of second relay file Bag And a second data writing means including § number counter update step, and the area indicated by the write block number of the secondary file and a sub file data writing step to write the write data.

【0018】[0018]

【実施例】以下本発明の一実施例について、図を参照し
ながら詳細に説明する。
An embodiment of the present invention will be described in detail below with reference to the drawings.

【0019】図1を参照すると、本発明の第1の実施例
である二重化ファイルシステムは、アプリケーションプ
ログラム(以下、APとする)11と、二重化ファイル
であり、利用者のデータを格納する外部記憶装置内の正
ファイル12と、二重化ファイルであり、正ファイル1
2に異常が発生した場合に利用するバックアップ用の外
部記憶装置内の副ファイル13と、副ファイル13に書
き出すデータの情報を一次的に格納する主記憶装置上の
第1の中継領域14と第2の中継領域17と、AP11
のデータの書き出し処理要求に応じて正ファイル12に
データを書き出し、副ファイル13へ書き出すデータの
情報をこの第1の中継領域14に格納するプログラムで
ある第1のデータ書き出しプログラム(以下、第1のデ
ータ書き出し手段とする)15と、第1のデータ書き出
し手段15とは非同期に動作し、第1の中継領域14に
格納されたデータを第2の中継領域17にコピーした
後、第1の中継領域14を初期化し、さらに第2の中継
領域17のデータを読み込み、副ファイル13に書き出
すプログラムである第2のデータ書き出しプログラム
(以下、第2のデータ書き出し手段とする)16とから
構成されている。
Referring to FIG. 1, a duplicated file system according to a first embodiment of the present invention is an application program (hereinafter referred to as AP) 11 and a duplicated file, which is an external storage for storing user data. A regular file 12 in the device and a duplicated file, a regular file 1
When an error occurs in the second storage device, a sub-file 13 in the external storage device for backup to be used, a first relay area 14 in the main storage device that temporarily stores information of data to be written to the sub-file 13, and 2 relay area 17 and AP 11
In accordance with the data writing processing request of the first data writing program to the primary file 12 and the information of the data to be written to the sub file 13 is stored in the first relay area 14. Data writing means 15) and the first data writing means 15 operate asynchronously, copy the data stored in the first relay area 14 to the second relay area 17, and then A second data writing program (hereinafter referred to as a second data writing means) 16 which is a program for initializing the relay area 14, reading the data in the second relay area 17, and writing the data in the secondary file 13 ing.

【0020】図2を参照すると、第1の中継領域14お
よび第2の中継領域17は、副ファイル13におけるデ
ータの書き出し先ブロック番号31と書き出しデータ3
2を格納するバッファ部24と、第1の中継領域14に
データを追加する時の追加位置を示す終端レコードポイ
ンタ21、第2の中継領域17からデータを取得する時
の先頭レコードの位置を示す先頭レコードポインタ2
2、および未使用のバッファ数を格納するために利用す
る空きバッファ数カウンタ23からなる制御部25で構
成されている。
Referring to FIG. 2, in the first relay area 14 and the second relay area 17, the data write destination block number 31 and the write data 3 in the sub file 13 are written.
2 shows a buffer unit 24 for storing 2, a terminating record pointer 21 indicating an addition position when data is added to the first relay area 14, and a position of a leading record when data is acquired from the second relay area 17. First record pointer 2
2, and a control unit 25 including a free buffer number counter 23 used to store the number of unused buffers.

【0021】次に本発明の第1の実施例である二重化フ
ァイルシステムについて、図1〜図4を参照して説明す
る。
Next, a duplicated file system according to the first embodiment of the present invention will be described with reference to FIGS.

【0022】AP11からのデータ書き出し処理要求に
応じて、第1のデータ書き出し手段15が起動される。
The first data writing means 15 is activated in response to the data writing processing request from the AP 11.

【0023】第1のデータ書き出し手段15は、まず正
ファイル12にデータを書き出し、データの書き出し先
ブロック番号を記憶する(ステップ31)。
The first data writing means 15 first writes the data to the primary file 12 and stores the block number of the writing destination of the data (step 31).

【0024】次に第1のデータ書き出し手段15は、第
1の中継領域14の空きバッファ数カウンタ23を参照
し、空きバッファ数カウンタ23が0か否かを判定する
(ステップ32)。ステップ32において空きバッファ
数カウンタ23が0の場合には、第1の中継領域14に
空き領域ができるまで待ち合わせるために、一定時間経
過後にステップ32に戻る(ステップ33)。
Next, the first data writing means 15 refers to the free buffer number counter 23 of the first relay area 14 and determines whether or not the free buffer number counter 23 is 0 (step 32). When the free buffer number counter 23 is 0 in step 32, the process returns to step 32 after a lapse of a certain time in order to wait until a free area is formed in the first relay area 14 (step 33).

【0025】第1のデータ書き出し手段15は、ステッ
プ32において空きバッファ数カウンタ23が0でない
場合、すなわち第1の中継領域14に空き領域が存在す
る場合には、まず第1の中継領域14内の終端レコード
ポインタ21の示す領域に、書き出し対象のデータ情報
を書き出し先ブロック番号31と書き出しデータ32の
形式で書き出す(ステップ34)。この際、書き出し先
ブロック番号31にはステップ31において正ファイル
にデータを書き出した位置を示すブロック番号を、書き
出しデータ32にはデータ本体を書き出す。さらに、第
1の中継領域14内の終端レコードポインタ21を次レ
コードに位置付け(ステップ35)、空きバッファ数カ
ウンタ23から1減算する(ステップ36)。
When the free buffer number counter 23 is not 0 in step 32, that is, when there is a free area in the first relay area 14, the first data writing means 15 first writes in the first relay area 14. The data information to be written is written in the area indicated by the end record pointer 21 in the format of the write destination block number 31 and the write data 32 (step 34). At this time, the block number indicating the position where the data was written to the primary file in step 31 is written to the write destination block number 31, and the data body is written to the write data 32. Further, the end record pointer 21 in the first relay area 14 is positioned at the next record (step 35), and 1 is subtracted from the free buffer number counter 23 (step 36).

【0026】第2のデータ書き出し手段16は、まず第
1の中継領域14に排他制御を施し(ステップ41)、
次に第1の中継領域14の内容を第2の中継領域17に
コピーし(ステップ42)、さらに第1の中継領域14
を初期化(ステップ43)した後、第1の中継領域14
に対する排他制御を解除する(ステップ44)。
The second data writing means 16 first performs an exclusive control on the first relay area 14 (step 41),
Next, the contents of the first relay area 14 are copied to the second relay area 17 (step 42), and the first relay area 14 is further copied.
After initializing (step 43), the first relay area 14
The exclusive control for is canceled (step 44).

【0027】ステップ43における第1の中継領域14
の初期化においては、終端レコードポインタ21と先頭
レコードポインタ22がともにバッファ部24の先頭を
指すようにし、さらに空きバッファ数カウンタ23はバ
ッファ部内バッファ数を示すようにする。
First relay area 14 in step 43
In the initialization of, the end record pointer 21 and the start record pointer 22 both point to the start of the buffer unit 24, and the free buffer number counter 23 indicates the number of buffers in the buffer unit.

【0028】次に第2のデータ書き出し手段16は、第
2の中継領域17内の先頭レコードポインタ22と終端
レコードポインタ21が等しいか否かを判定し(ステッ
プ45)、等しい場合には処理を終了する。
Next, the second data writing means 16 judges whether or not the start record pointer 22 and the end record pointer 21 in the second relay area 17 are equal (step 45), and if they are equal, the processing is executed. finish.

【0029】第2のデータ書き出し手段16は、ステッ
プ45において第2の中継領域17内の先頭レコードポ
インタ22と終端レコードポインタ21が異なる場合に
は、第2の中継領域17内の先頭レコードポインタ22
が示すバッファから書き出し先ブロック番号31と書き
出しデータ32を読み込み(ステップ46)、第2の中
継領域17内の先頭レコードポインタ22を次レコード
に位置づけ(ステップ47)、空きバッファ数カウンタ
23に1加算する(ステップ48)。
If the start record pointer 22 and the end record pointer 21 in the second relay area 17 are different in step 45, the second data writing means 16 starts the top record pointer 22 in the second relay area 17.
The write destination block number 31 and the write data 32 are read from the buffer indicated by (step 46), the head record pointer 22 in the second relay area 17 is positioned at the next record (step 47), and the free buffer number counter 23 is incremented by 1. (Step 48).

【0030】さらに第2のデータ書き出し手段16は、
副ファイル13内の書き出し先ブロック番号31に示さ
れた領域へ、書き出しデータ32を書き出し(ステップ
49)、ステップ45に戻る。
Further, the second data writing means 16 is
The write data 32 is written to the area indicated by the write destination block number 31 in the sub-file 13 (step 49), and the process returns to step 45.

【0031】以上により、本発明の第1の実施例である
二重化ファイルシステムの処理が完了する。
With the above, the processing of the duplicated file system according to the first embodiment of the present invention is completed.

【0032】本発明の第1の実施例である二重化ファイ
ルシステムは、正ファイルへのデータ書き出し処理と、
副ファイルへのデータ書き出し処理を非同期に実施する
ことにより、二重化ファイルのデータ書き出し処理を効
率的に実施することができる効果を有している。
The dual file system according to the first embodiment of the present invention includes a data writing process to a primary file,
By asynchronously performing the data writing process to the sub file, the data writing process of the duplicated file can be efficiently performed.

【0033】本発明の第2の実施例である二重化ファイ
ルシステムは、第1、第2、および第3の二重化ファイ
ルシステムにおいて、第1のデータ書き出し手段15
は、正ファイル12に障害が発生して入出力処理を実行
できないと判定した時に、第2のデータ書き出し手段1
6の処理完了を待ち合わせた後、全ての入出力処理を直
接副ファイル13に対して行い、正ファイル12と第1
の中継領域14に対しての入出力処理は行わないように
構成されたプログラムである。
The duplicated file system according to the second embodiment of the present invention is the first data writing means 15 in the first, second and third duplicated file systems.
When it is determined that a failure occurs in the primary file 12 and the input / output processing cannot be executed, the second data writing means 1
After waiting for the completion of the processing of No. 6, all the input / output processing is directly performed on the sub-file 13, and the primary file 12 and the first
The program is configured so that input / output processing with respect to the relay area 14 is not performed.

【0034】次に本発明の第2の実施例である二重化フ
ァイルシステムについて、図1〜図3を参照して説明す
る。
Next, a duplicated file system according to a second embodiment of the present invention will be described with reference to FIGS.

【0035】第1のデータ書き出し手段15は、ステッ
プ31において正ファイル12にデータを書き出した
後、該書き出し処理が正常終了したか否かを判定する
(ステップ37)。正常終了した場合にはステップ32
に至る。
After writing the data to the primary file 12 in step 31, the first data writing means 15 determines whether or not the writing process is normally completed (step 37). Step 32 if completed normally
Leading to.

【0036】第1のデータ書き出し手段15は、ステッ
プ37において正ファイル12に対するデータの書き出
し処理が異常終了したと判定した場合には、第1の中継
領域14内の終端レコードポインタ21と先頭レコード
ポインタ22がともにバッファ部24の先頭を指してい
るか否かを判定し(ステップ38)、指していなけれ
ば、一定時間経過再びステップ38を実行する(ステッ
プ39)。
When the first data writing means 15 determines in step 37 that the data writing process for the primary file 12 has terminated abnormally, the end record pointer 21 and the top record pointer in the first relay area 14 It is determined whether or not both 22 point to the head of the buffer section 24 (step 38), and if they do not point, step 38 is executed again for a certain period of time (step 39).

【0037】第1のデータ書き出し手段15は、ステッ
プ38において第1の中継領域14内の終端レコードポ
インタ21と先頭レコードポインタ22がともにバッフ
ァ部24の先頭を指していた場合には、データを副ファ
イル13に書き出す(ステップ3A)。
When the end record pointer 21 and the head record pointer 22 in the first relay area 14 both point to the head of the buffer section 24 in step 38, the first data writing means 15 sub-data. Write to file 13 (step 3A).

【0038】以上により、本発明の第2の実施例である
二重化ファイルシステムの処理が完了する。
With the above, the processing of the duplicated file system according to the second embodiment of the present invention is completed.

【0039】本発明の第2の実施例である二重化ファイ
ルシステムは、正ファイルに障害が発生した際には、全
ての入出力処理を副ファイルに対して実施することによ
り、入出力処理を滞らせることなく継続することができ
る効果を有している。
In the duplicated file system according to the second embodiment of the present invention, when a failure occurs in the primary file, all input / output processing is performed on the secondary file, thereby delaying the input / output processing. It has the effect that it can be continued without being allowed to.

【0040】本発明の第3の実施例である二重化ファイ
ルシステムは、第1、第2、第3、および第4の二重化
ファイルシステムにおいて、二重化ファイルシステムを
含む計算機システムに障害が発生した際には、第1の中
継領域14および第2の中継領域17の内容を外部記憶
装置1Cに退避するプログラムである中継領域退避プロ
グラム(以下、中継領域退避手段とする)18と、計算
機システム再立ち上げ後には、この外部記憶装置1Cに
退避した第1の中継領域14および第2の中継領域17
の内容を第1の中継領域14および第2の中継領域17
にロードするプログラムである中継領域ロードプログラ
ム(以下、中継領域ロード手段とする)19とを含んで
構成されている。
The duplex file system according to the third embodiment of the present invention is used in the first, second, third and fourth duplex file systems when a failure occurs in a computer system including the duplex file system. Is a program for saving the contents of the first relay area 14 and the second relay area 17 to the external storage device 1C, a relay area save program (hereinafter, referred to as a relay area save means) 18, and a restart of the computer system. Later, the first relay area 14 and the second relay area 17 saved in the external storage device 1C
Contents of the first relay area 14 and the second relay area 17
And a relay area loading program (hereinafter, referred to as a relay area loading means) 19 which is a program to be loaded into.

【0041】次に本発明の第3の実施例である二重化フ
ァイルシステムについて、図1、図2、および図5を参
照して説明する。
Next, a duplicated file system which is a third embodiment of the present invention will be described with reference to FIGS. 1, 2 and 5.

【0042】二重化ファイルシステムを含む計算機シス
テムに障害が発生した際に、オペレーティングシステム
の例外処理サブシステムから中継領域退避手段18が起
動される。
When a failure occurs in the computer system including the duplicated file system, the relay area saving means 18 is activated from the exception processing subsystem of the operating system.

【0043】中継領域退避手段18は、第1の中継領域
14および第2の中継領域17の内容をそのまま同形式
で外部記憶装置1Cに退避する(ステップ51)。
The relay area saving means 18 saves the contents of the first relay area 14 and the second relay area 17 as they are in the same format to the external storage device 1C (step 51).

【0044】二重化ファイルシステムを含む計算機シス
テムが再立ち上げされる際に、オペレーティングシステ
ムの初期化処理サブシステムから中継領域ロード手段1
9が起動される。
When the computer system including the duplicated file system is restarted, the relay area loading means 1 is loaded from the initialization processing subsystem of the operating system.
9 is activated.

【0045】中継領域ロード手段19は、中継領域退避
手段18により外部記憶装置1Cに退避した第1の中継
領域14および第2の中継領域17の内容を第1の中継
領域14および第2の中継領域17にロードする(ステ
ップ52)。
The relay area loading means 19 stores the contents of the first relay area 14 and the second relay area 17 saved in the external storage device 1C by the relay area saving means 18 in the first relay area 14 and the second relay area. The area 17 is loaded (step 52).

【0046】以上により、本発明の第3の実施例である
二重化ファイルシステムの処理が完了する。
With the above, the processing of the duplicated file system according to the third embodiment of the present invention is completed.

【0047】本発明の第3の実施例である二重化ファイ
ルシステムは、二重化ファイルシステムを含む計算機シ
ステムに障害が発生した際に、中継領域の内容を外部記
憶装置に退避することにより、書き出し対象のデータを
失うことなく、計算機システムの再立ち上げ後に二重化
ファイルシステムの運用を再開することができる効果を
有している。
The redundant file system according to the third embodiment of the present invention saves the contents of the relay area in the external storage device when a failure occurs in the computer system including the redundant file system, thereby making it a target of writing. It has an effect that the operation of the redundant file system can be restarted after the computer system is restarted without losing the data.

【0048】本発明の第4の実施例である二重化ファイ
ルシステムは、第1、第2、第3、および第4の二重化
ファイルシステムにおいて、副ファイル13に書き出す
データの情報を一次的に格納する外部記憶装置上の第1
の中継ファイル1Aと第2の中継ファイル1Bとを含
む。
The dual file system according to the fourth embodiment of the present invention temporarily stores the information of the data to be written in the secondary file 13 in the first, second, third and fourth dual file systems. First on external storage
Relay file 1A and second relay file 1B.

【0049】次に本発明の第4の実施例である二重化フ
ァイルシステムについて、図6〜図9を参照して説明す
る。
Next, a duplicated file system according to a fourth embodiment of the present invention will be described with reference to FIGS.

【0050】AP11からのデータ書き出し処理要求に
応じて、第1のデータ書き出し手段15が起動される。
The first data writing means 15 is activated in response to the data writing processing request from the AP 11.

【0051】第1のデータ書き出し手段15は、まず正
ファイル12にデータを書き出し、データの書き出し先
ブロック番号を記憶する(ステップ81)。
The first data writing means 15 first writes the data in the primary file 12 and stores the block number of the writing destination of the data (step 81).

【0052】次に第1のデータ書き出し手段15は、第
1の中継ファイル1Aの空きバッファ数カウンタ23を
参照し、空きバッファ数カウンタ23が0か否かを判定
する(ステップ82)。ステップ82において空きバッ
ファ数カウンタ23が0の場合には、第1の中継ファイ
ル1Aに空き領域ができるまで待ち合わせるために、一
定時間経過後にステップ82に戻る(ステップ83)。
Next, the first data writing means 15 refers to the free buffer number counter 23 of the first relay file 1A and determines whether or not the free buffer number counter 23 is 0 (step 82). If the free buffer number counter 23 is 0 in step 82, the process returns to step 82 after a lapse of a fixed time in order to wait until a free area is formed in the first relay file 1A (step 83).

【0053】第1のデータ書き出し手段15は、ステッ
プ82において空きバッファ数カウンタ23が0でない
場合、すなわち第1の中継ファイル1Aに空き領域が存
在する場合には、まず第1の中継ファイル1A内の終端
レコードポインタ21の示す領域に、書き出し対象のデ
ータ情報を書き出し先ブロック番号31と書き出しデー
タ32の形式で書き出す(ステップ84)。この際、書
き出し先ブロック番号31にはステップ81において正
ファイルにデータを書き出した位置を示すブロック番号
を、書き出しデータ32にはデータ本体を書き出す。さ
らに、第1の中継ファイル1A内の終端レコードポイン
タ21を次レコードに位置付け(ステップ85)、バッ
ファ数カウンタ23から1減算する(ステップ86)。
If the free buffer number counter 23 is not 0 in step 82, that is, if there is a free area in the first relay file 1A, the first data writing means 15 first writes in the first relay file 1A. The data information to be written is written in the area indicated by the end record pointer 21 in the format of the write destination block number 31 and the write data 32 (step 84). At this time, the block number indicating the position where the data is written to the primary file in step 81 is written to the write destination block number 31, and the data body is written to the write data 32. Further, the end record pointer 21 in the first relay file 1A is positioned at the next record (step 85), and 1 is subtracted from the buffer number counter 23 (step 86).

【0054】第1のデータ書き出し手段15は、ステッ
プ81において正ファイル12にデータを書き出した
後、該書き出し処理が正常終了したか否かを判定する
(ステップ87)。正常終了した場合にはステップ82
に至る。
After writing the data to the primary file 12 in step 81, the first data writing means 15 determines whether or not the writing process is normally completed (step 87). Step 82 if completed normally
Leading to.

【0055】第1のデータ書き出し手段15は、ステッ
プ87において正ファイル12に対するデータの書き出
し処理が異常終了したと判定した場合には、第1の中継
領域14内の終端レコードポインタ21と先頭レコード
ポインタ22がともにバッファ部24の先頭を指してい
るか否かを判定し(ステップ88)、指していなけれ
ば、一定時間経過再びステップ88を実行する(ステッ
プ89)。
When the first data writing means 15 determines in step 87 that the data writing process for the primary file 12 has terminated abnormally, the end record pointer 21 and the top record pointer in the first relay area 14 It is determined whether or not both 22 point to the head of the buffer section 24 (step 88), and if not pointed, step 88 is executed again for a certain period of time (step 89).

【0056】第1のデータ書き出し手段15は、ステッ
プ88において第1の中継領域14内の終端レコードポ
インタ21と先頭レコードポインタ22がともにバッフ
ァ部24の先頭を指していた場合には、データを副ファ
イル13に書き出す(ステップ8A)。
When the end record pointer 21 and the top record pointer 22 in the first relay area 14 both point to the top of the buffer section 24 in step 88, the first data writing means 15 sub-data. Write to file 13 (step 8A).

【0057】第2のデータ書き出し手段16は、まず第
1の中継ファイル1Aに排他制御を施し(ステップ9
1)、次に第1の中継ファイル1Aの内容を第2の中継
ファイル1Bにコピーし(ステップ92)、さらに第1
の中継ファイル1Aを初期化(ステップ93)した後、
第1の中継ファイル1Aに対する排他制御を解除する
(ステップ94)。
The second data writing means 16 first applies the exclusive control to the first relay file 1A (step 9).
1) Next, the contents of the first relay file 1A are copied to the second relay file 1B (step 92), and the first relay file 1B is further copied.
After initializing the relay file 1A of (step 93),
The exclusive control for the first relay file 1A is released (step 94).

【0058】ステップ93における第1の中継ファイル
1Aの初期化においては、終端レコードポインタ21と
先頭レコードポインタ22がともにバッファ部24の先
頭を指すようにし、さらに空きバッファ数カウンタ23
はバッファ部内バッファ数を示すようにする。
In the initialization of the first relay file 1A in step 93, the end record pointer 21 and the start record pointer 22 both point to the start of the buffer section 24, and the free buffer number counter 23
Indicates the number of buffers in the buffer section.

【0059】次に第2のデータ書き出し手段16は、第
2の中継ファイル1B内の先頭レコードポインタ22と
終端レコードポインタ21が等しいか否かを判定し(ス
テップ95)、等しい場合には処理を終了する。
Next, the second data writing means 16 determines whether or not the start record pointer 22 and the end record pointer 21 in the second relay file 1B are equal (step 95). finish.

【0060】第2のデータ書き出し手段16は、ステッ
プ95において第2の中継ファイル1B内の先頭レコー
ドポインタ22と終端レコードポインタ21が異なる場
合には、第2の中継ファイル1B内の先頭レコードポイ
ンタ22が示すバッファから書き出し先ブロック番号3
1と書き出しデータ32を読み込み(ステップ96)、
第2の中継ファイル1B内の先頭レコードポインタ22
を次レコードに位置づけ(ステップ97)、空きバッフ
ァ数カウンタ23を1加算する(ステップ98)。
If the start record pointer 22 and the end record pointer 21 in the second relay file 1B are different in step 95, the second data writing means 16 starts the start record pointer 22 in the second relay file 1B. From the buffer indicated by
1 and write data 32 are read (step 96),
First record pointer 22 in the second relay file 1B
Is positioned as the next record (step 97), and the free buffer number counter 23 is incremented by 1 (step 98).

【0061】さらに第2のデータ書き出し手段16は、
副ファイル13内の書き出し先ブロック番号31に示さ
れた領域へ、書き出しデータ32を書き出し(ステップ
99)、ステップ95に戻る。
Further, the second data writing means 16 is
The write data 32 is written in the area indicated by the write destination block number 31 in the sub-file 13 (step 99), and the process returns to step 95.

【0062】以上により、本発明の第4の実施例である
二重化ファイルシステムの処理が完了する。
With the above, the processing of the duplicated file system according to the fourth embodiment of the present invention is completed.

【0063】本発明の第4の実施例である二重化ファイ
ルシステムは、正ファイルへのデータ書き出し処理と、
副ファイルへのデータ書き出し処理を非同期に実施する
ことにより、二重化ファイルのデータ書き出し処理を効
率的に実施することができ、正ファイルに障害が発生し
た際には、全ての入出力処理を副ファイルに対して実施
することにより、入出力処理を滞らせることなく継続す
ることができる効果を有している。さらに第1の中継フ
ァイルおよび第2の中継ファイルを電子ディスク装置等
の高速外部記憶装置に設定することにより、二重化ファ
イルのデータ書き出し処理を一層効率的に実施すること
ができる効果を有している。
The dual file system according to the fourth embodiment of the present invention includes a data writing process to a primary file,
By performing the data write process to the secondary file asynchronously, the data write process of the duplicated file can be performed efficiently, and when a failure occurs in the primary file, all input / output processing is performed on the secondary file. By carrying out the above, there is an effect that the input / output processing can be continued without being delayed. Further, by setting the first relay file and the second relay file in a high-speed external storage device such as an electronic disk device, there is an effect that the data writing process of the duplicated file can be performed more efficiently. .

【0064】[0064]

【発明の効果】以上説明したように、本発明は、二重化
ファイルへのデータ書き出し処理を、非二重化ファイル
へのデータ書き出し処理に比べて最小限の遅延で実現す
ることができる効果を有している。
As described above, the present invention has an effect that the data writing process to the duplicated file can be realized with a minimum delay as compared with the data writing process to the non-duplicated file. There is.

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

【図1】本発明の第1〜第3の実施例を示すブロック図
である。
FIG. 1 is a block diagram showing first to third embodiments of the present invention.

【図2】本発明の第1〜第3の実施例における第1の中
継領域14および第2の中継領域17のデータ格納形式
を示す図である。
FIG. 2 is a diagram showing a data storage format of a first relay area 14 and a second relay area 17 in the first to third embodiments of the present invention.

【図3】本発明の第1および第2の実施例における第1
のデータ書き出し手段15の処理を示す流れ図である。
FIG. 3 is a first view of the first and second embodiments of the present invention.
6 is a flowchart showing the processing of the data writing means 15 of FIG.

【図4】本発明の第1の実施例における第2のデータ書
き出し手段16の処理を示す流れ図である。
FIG. 4 is a flowchart showing the processing of the second data writing means 16 in the first exemplary embodiment of the present invention.

【図5】本発明の第3の実施例における中継領域退避手
段18と中継領域ロード手段19の処理を示す流れ図で
ある。
FIG. 5 is a flowchart showing the processing of a relay area saving means 18 and a relay area loading means 19 in the third embodiment of the present invention.

【図6】本発明の第4の実施例を示すブロック図であ
る。
FIG. 6 is a block diagram showing a fourth embodiment of the present invention.

【図7】本発明の第4の実施例における第1の中継ファ
イル1Aおよび第2の中継ファイル1Bのデータ格納形
式を示す図である。
FIG. 7 is a diagram showing a data storage format of a first relay file 1A and a second relay file 1B according to a fourth embodiment of the present invention.

【図8】本発明の第4の実施例における第1のデータ書
き出し手段15の処理を示す流れ図である。
FIG. 8 is a flowchart showing the processing of the first data writing means 15 in the fourth embodiment of the present invention.

【図9】本発明の第4の実施例における第2のデータ書
き出し手段16の処理を示す流れ図である。
FIG. 9 is a flowchart showing the processing of the second data writing means 16 in the fourth embodiment of the present invention.

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

11 AP 12 正ファイル 13 副ファイル 14 第1の中継領域 15 第1の書き出し手段 16 第2の書き出し手段 17 第2の中継領域 18 中継領域退避手段 19 中継領域ロード手段 1A 第1の中継ファイル 1B 第2の中継ファイル 1C 外部記憶装置 21 終端レコードポインタ 22 先頭レコードポインタ 23 空きバッファ数カウンタ 24 バッファ部 25 制御部 31 書き出し先ブロック番号 32 書き出しデータ 11 AP 12 Primary File 13 Secondary File 14 First Relay Area 15 First Writing Means 16 Second Writing Means 17 Second Relay Area 18 Relay Area Saving Means 19 Relay Area Loading Means 1A First Relay File 1B First 2 relay file 1C external storage device 21 end record pointer 22 start record pointer 23 free buffer number counter 24 buffer unit 25 control unit 31 write destination block number 32 write data

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 アプリケーションプログラムのデータを
格納するためのファイルを2個のファイルで一つの対と
して構成し、その一方を正ファイル、他方を副ファイル
とし、書き出し処理は正ファイルおよび副ファイルの両
ファイルに行い、読み込み処理は正ファイルのみから行
う二重化ファイルシステムにおいて、 前記副ファイルに対する更新情報を一次的に格納してお
く主記憶装置上の第1の中継領域および第2の中継領域
と、 前記アプリケーションプログラムからのデータの書き出
し処理要求に応じて前記正ファイルにデータを書き出
し、前記副ファイルへ書き出すデータの更新情報をこの
第1の中継領域に格納する第1のデータ書き出し手段
と、 この第1のデータ書き出し手段とは非同期に動作し、前
記第1の中継領域の内容を第2の中継領域にコピーした
後、前記第1の中継領域を初期化し、さらにこの第2の
中継領域に格納されたデータを読み込み、前記副ファイ
ルに書き出す第2のデータ書き出し手段とを備えたこと
を特徴とする二重化ファイルシステム。
1. A file for storing data of an application program is configured as a pair of two files, one of which is a primary file and the other of which is a secondary file, and the writing process is performed for both the primary file and the secondary file. In a duplex file system in which a file is read and a read process is performed only from a primary file, a first relay area and a second relay area on a main storage device for temporarily storing update information for the sub-file; First data writing means for writing data to the primary file in response to a data writing request from an application program and storing update information of the data to be written to the sub file in the first relay area; Of the first relay area and the second data writing section of the second relay area. A second data writing means for initializing the first relay area after copying to the second relay area, reading the data stored in the second relay area, and writing the data to the sub file. Characteristic duplex file system.
【請求項2】 前記第1の中継領域および前記第2の中
継領域は、前記副ファイルにおけるデータの書き出し先
ブロック番号と書き出しデータを格納するバッファ部
と、前記第1のデータ書き出し手段が前記第1の中継領
域にデータを追加する時の追加位置を示す終端レコード
ポインタ、前記第2のデータ書き出し手段が前記第2の
中継領域からデータを取得する時の先頭レコードの位置
を示す先頭レコードポインタ、および未使用のバッファ
数を格納するために利用する空きバッファ数カウンタか
らなる制御部とから構成されることを特徴とする請求項
1記載の二重化ファイルシステム。
2. The first relay area and the second relay area include a buffer unit for storing a write destination block number of data in the sub-file and write data, and the first data writing unit for the first data writing unit. An end record pointer indicating an additional position when data is added to one relay area, a head record pointer indicating a position of a head record when the second data writing unit acquires data from the second relay area, 2. The duplicated file system according to claim 1, further comprising a control unit including a free buffer number counter used for storing the number of unused buffers.
【請求項3】 前記第2の書き出し手段は、前記第1の
中継領域の内容を前記第2の中継領域にコピーし、第1
の中継領域を初期化する処理の間は、前記第1の中継領
域を排他制御の対象として、前記第1の書き出し手段か
らの前記第1の中継領域への情報の書き出しを待たせる
ようにしたことを特徴とする請求項2記載の二重化ファ
イルシステム。
3. The second writing means copies the contents of the first relay area to the second relay area,
During the process of initializing the relay area, the first relay area is subject to exclusive control, and writing of information from the first writing means to the first relay area is kept waiting. The duplicated file system according to claim 2, wherein
【請求項4】 前記第1のデータ書き出し手段は、前記
正ファイルに障害が発生して入出力処理を実行できない
と判定した時に、前記第2のデータ書き出し手段の処理
完了を待ち合わせた後、全ての入出力処理を直接前記副
ファイルに対して行い、前記正ファイルと前記第1の中
継領域に対しての入出力処理は行わないことを特徴とす
る請求項1、請求項2および請求項3記載の二重化ファ
イルシステム。
4. When the first data writing means waits for the processing completion of the second data writing means when it is determined that a failure has occurred in the primary file and the input / output processing cannot be executed, 3. The input / output processing of No. 1 is directly performed on the sub file, and the input / output processing for the primary file and the first relay area is not performed. Duplicated file system described.
【請求項5】 前記二重化ファイルシステムを含む計算
機システムに障害が発生した際には、前記第1の中継領
域および前記第2の中継領域の内容を外部記憶装置に退
避する中継領域退避手段と、計算機システム再立ち上げ
後には、この外部記憶装置に退避した前記第1の中継領
域および前記第2の中継領域の内容を前記第1の中継領
域および前記第2の中継領域にロードする中継領域ロー
ド手段とを備えたことを特徴とする請求項1、請求項
2、請求項3、および請求項4記載の二重化ファイルシ
ステム。
5. A relay area saving means for saving the contents of the first relay area and the second relay area to an external storage device when a failure occurs in a computer system including the duplicated file system, After restarting the computer system, a relay area load for loading the contents of the first relay area and the second relay area saved in the external storage device into the first relay area and the second relay area 5. The duplex file system according to claim 1, claim 2, claim 3, and claim 4, further comprising:
【請求項6】 前記第1中継領域および第2の中継領域
を、外部記憶装置上に第1の中継ファイルおよび第2の
中継ファイルとして備えたことを特徴とする請求項1、
請求項2、請求項3、および請求項4記載の二重化ファ
イルシステム。
6. The first relay area and the second relay area are provided on an external storage device as a first relay file and a second relay file, respectively.
The duplicated file system according to claim 2, claim 3, or claim 4.
JP6061822A 1994-03-31 1994-03-31 Duplex file system Pending JPH07271647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6061822A JPH07271647A (en) 1994-03-31 1994-03-31 Duplex file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6061822A JPH07271647A (en) 1994-03-31 1994-03-31 Duplex file system

Publications (1)

Publication Number Publication Date
JPH07271647A true JPH07271647A (en) 1995-10-20

Family

ID=13182166

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6061822A Pending JPH07271647A (en) 1994-03-31 1994-03-31 Duplex file system

Country Status (1)

Country Link
JP (1) JPH07271647A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7069379B2 (en) 2002-03-15 2006-06-27 International Business Machines Corporation Multistage information recording method and system using magnetic recording disk units
US7724643B2 (en) 2004-09-13 2010-05-25 Nec Infrontia Corporation Recovery of duplex data system after power failure

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58144960A (en) * 1982-02-23 1983-08-29 Hitachi Ltd Double write controlling system
JPS58219656A (en) * 1982-06-16 1983-12-21 Hitachi Ltd Double writing magnetic disk controller
JPH0211043A (en) * 1988-06-29 1990-01-16 Hitachi Ltd Method for transferring information
JPH0536197A (en) * 1991-07-30 1993-02-12 Nec Ibaraki Ltd Double write magnetic disk sub system
JPH0659958A (en) * 1992-08-10 1994-03-04 Fujitsu Ltd File writing processing system
JP3121440B2 (en) * 1992-05-29 2000-12-25 小糸工業株式会社 Operation panel structure

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58144960A (en) * 1982-02-23 1983-08-29 Hitachi Ltd Double write controlling system
JPS58219656A (en) * 1982-06-16 1983-12-21 Hitachi Ltd Double writing magnetic disk controller
JPH0211043A (en) * 1988-06-29 1990-01-16 Hitachi Ltd Method for transferring information
JPH0536197A (en) * 1991-07-30 1993-02-12 Nec Ibaraki Ltd Double write magnetic disk sub system
JP3121440B2 (en) * 1992-05-29 2000-12-25 小糸工業株式会社 Operation panel structure
JPH0659958A (en) * 1992-08-10 1994-03-04 Fujitsu Ltd File writing processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7069379B2 (en) 2002-03-15 2006-06-27 International Business Machines Corporation Multistage information recording method and system using magnetic recording disk units
US7724643B2 (en) 2004-09-13 2010-05-25 Nec Infrontia Corporation Recovery of duplex data system after power failure

Similar Documents

Publication Publication Date Title
JP4248510B2 (en) Computer system, disk device, and data update control method
US5638508A (en) Method and a system for processing a log record
US7461201B2 (en) Storage control method and system for performing backup and/or restoration
US7587562B2 (en) Data duplication system, data duplication method and program
JPH0113571B2 (en)
JPH07210439A (en) Storage device
JP3135714B2 (en) Checkpoint restart method
JPH10133927A (en) Computer system and file managing method
JPH07271647A (en) Duplex file system
JPH0518143B2 (en)
JP2000293391A (en) Method and device for large-scale memory system management
US20050223180A1 (en) Accelerating the execution of I/O operations in a storage system
JPH04311219A (en) Data backup system
KR100365891B1 (en) Backup/recovery Apparatus and method for non-log processing of real-time main memory database system
JP3043662B2 (en) Data backup method
JP2003099208A (en) Method for data transfer between disk arrays and disk array system
JPH0744440A (en) Data save device
US20230004326A1 (en) Storage system control method and storage system
JP2005316697A (en) Disk array system and method for data backup
JPH07168673A (en) Dual system device
JP3022011B2 (en) Data backup system
JPH11212729A (en) Duplex disk device
JPH10333961A (en) Data base recovery system and computer-readable recording medium recording recovery program
JPS62194558A (en) Write control system of journal record
US5594909A (en) File I/O control device writing blocks to faster device first and canceling exclusive lock as each block is written

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980324