JP2822869B2 - Library file management device - Google Patents

Library file management device

Info

Publication number
JP2822869B2
JP2822869B2 JP5351949A JP35194993A JP2822869B2 JP 2822869 B2 JP2822869 B2 JP 2822869B2 JP 5351949 A JP5351949 A JP 5351949A JP 35194993 A JP35194993 A JP 35194993A JP 2822869 B2 JP2822869 B2 JP 2822869B2
Authority
JP
Japan
Prior art keywords
area
data
directory
block
data 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.)
Expired - Lifetime
Application number
JP5351949A
Other languages
Japanese (ja)
Other versions
JPH07200378A (en
Inventor
至之 鈴木
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 JP5351949A priority Critical patent/JP2822869B2/en
Publication of JPH07200378A publication Critical patent/JPH07200378A/en
Application granted granted Critical
Publication of JP2822869B2 publication Critical patent/JP2822869B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はライブラリファイル管理
装置に関し、特に、システムダウン等で発生した障害の
検知と復旧に特徴を有するライブラリファイル管理装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a library file management apparatus, and more particularly, to a library file management apparatus characterized in detecting and recovering from a failure caused by a system failure or the like.

【0002】[0002]

【従来の技術】互いに独立したデータ群は、一般に別々
なファイルに格納される。しかし、それたのデータ群が
同一の属性を持つ場合、一つのファイルとして集中的に
管理するのが、ファイルのアサイン、スペース管理及び
アクセスの面で効率的であることが多い。このような集
中管理を可能にするのが、ライブラリファイル管理装置
であり、個々のデータ群は、サブファイルとして管理さ
れる。
2. Description of the Related Art Data groups independent of each other are generally stored in separate files. However, when the data groups have the same attribute, it is often efficient to centrally manage them as one file in terms of file assignment, space management, and access. The library file management device enables such centralized management, and individual data groups are managed as subfiles.

【0003】ライブラリファイルは、一般にディレクト
リ領域、ブロック割当マップ(BAM)領域、データ領
域の3つの領域によって構成される。ディレクトリ領域
は、ディレクトリブロックと呼ばれるブロックから構成
され、サブファイルの記述情報を管理する。BAM領域
は、BAMブロックと呼ばれるブロックから構成され、
データ領域の空きスペースを管理する。また、データ領
域は、データブロックと呼ばれるブロックから構成さ
れ、各サブファイルのデータが格納される。
A library file is generally composed of three areas: a directory area, a block allocation map (BAM) area, and a data area. The directory area is composed of blocks called directory blocks, and manages description information of sub files. The BAM area is composed of blocks called BAM blocks.
Manage the free space in the data area. The data area is composed of blocks called data blocks, and stores data of each subfile.

【0004】ライブラリファイルでは、サブファイルが
使用するブロックの割当を論理トラック単位(ブロック
の集まり)として管理している。論理トラックの割当方
式としての1論理トラック単位に領域を取り出す方式で
は、1論理トラックが1ブロックから構成される場合、
1ブロックを取り出す度にBAMブロックの入出力が発
生して処理効率が大幅に低下する。
[0004] In the library file, the allocation of blocks used by the subfile is managed in units of logical tracks (collection of blocks). In a method of extracting an area in units of one logical track as a logical track allocation method, when one logical track is composed of one block,
Every time one block is taken out, input / output of a BAM block occurs and processing efficiency is greatly reduced.

【0005】そこで、ライブラリファイルのアクセスで
は、空き論理トラックが必要となった時、一度のいくつ
かの空き論理トラックをBAM領域から取り出し、メモ
リ上の制御テーブルでプール化し、プール中の空き論理
トラックがなくなった時に再度いくつかの論理トラック
をBAM領域から取り出す。また、不要となった論理ト
ラックの開放時には、プールへ返却し、プールが一杯に
なった時には、残りの不要な論理トラックのリストを作
成し、そのリストを元にしてBAM領域への返却を行な
っている。
Therefore, in the access to the library file, when an empty logical track is needed, some empty logical tracks are taken out from the BAM area once, pooled in a control table on the memory, and the empty logical tracks in the pool are obtained. When there are no more tracks, some logical tracks are taken out of the BAM area again. When an unnecessary logical track is released, it is returned to the pool. When the pool is full, a list of the remaining unnecessary logical tracks is created, and the list is returned to the BAM area based on the list. ing.

【0006】[0006]

【発明が解決しようとする課題】上述した従来のライブ
ラリファイル管理装置では、システムダウンやジョブア
ボート等の時に、データ領域とBAM領域との間で不一
致が生じるおそれがあった。例えば、BAM領域より空
きスペースを確保して使用中とした場合、その時点でま
だデータ領域へのデータ出力が行なわれる前にシステム
ダウン等が発生すると、データ領域上は無効なデータで
あるにも関らず、BAM領域にはデータ領域の論理トラ
ックが使用中である旨の情報が設定されることになり、
不一致が生じ、また、ディレクトリ領域の内容に矛盾が
発生し、正確なアクセスが行なわれなくなる問題があっ
た。
In the above-described conventional library file management apparatus, there is a possibility that inconsistency may occur between the data area and the BAM area when the system is down or the job is aborted. For example, if a free space is secured from the BAM area and it is determined that the data area is being used, if a system failure or the like occurs before data is still output to the data area at that time, invalid data is displayed on the data area. Regardless, information indicating that the logical track of the data area is being used is set in the BAM area.
There is a problem that inconsistency occurs and inconsistency occurs in the contents of the directory area, thereby preventing accurate access.

【0007】本発明は、上記従来の欠点を解決し、シス
テムダウン等による障害が発生した場合でも、障害復旧
機能によって、データ領域とBAM領域の設定の矛盾あ
るいはディレクトリ領域の矛盾を復旧することができる
ライブラリファイル管理装置を提供することを目的とす
る。
SUMMARY OF THE INVENTION The present invention solves the above-mentioned drawbacks, and can recover the inconsistency of the data area and the BAM area or the inconsistency of the directory area by the failure recovery function even when a failure occurs due to a system failure or the like. It is an object of the present invention to provide a library file management device capable of performing the above.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するた
め、本発明は、サブファイルのデータを格納するデータ
領域と、該データ領域の開始アドレスと終了アドレスを
格納するディレクトリ領域と、前記データ領域の使用の
有無を示す情報を格納する割当マップ領域とからなるラ
イブラリファイルの管理を行なうライブラリファイル管
理装置において、前記データ領域及びディレクトリ領域
が、サブファイル毎のタイムスタンプ情報を備え、前記
データ領域とディレクトリ領域の前記タイムスタンプ情
報に基づいて、前記ディレクトリ領域または割当マップ
領域に格納された情報の矛盾を復旧する復旧手段を備え
る構成としている。
In order to achieve the above object, the present invention provides a data area for storing data of a subfile, a directory area for storing a start address and an end address of the data area, In a library file management apparatus that manages a library file including an allocation map area that stores information indicating whether or not a file is used, the data area and the directory area include time stamp information for each subfile, and There is provided a recovery means for recovering inconsistency of information stored in the directory area or the allocation map area based on the time stamp information of the directory area.

【0009】他の好ましい態様によれば、前記データ領
域に格納されたサブファイルのアクセスに際して、前記
データ領域とディレクトリ領域のタイムスタンプ情報を
比較し、不一致の場合に障害が発生したことを検知する
障害検知手段を備える構成としている。
According to another preferred aspect, when accessing the sub-file stored in the data area, the time stamp information of the data area and the time stamp information of the directory area are compared, and if they do not match, it is detected that a failure has occurred. It is configured to include a failure detection unit.

【0010】また、他の好ましい態様によれば、前記復
旧手段は、前記割当マップ領域の情報で使用中とされて
いる前記データ領域のタイムスタンプ情報が、前記ディ
レクトリ領域に存在するか否かを判定し、存在しない場
合に当該データ領域を無効として、前記割当マップ領域
の情報を未使用に変更して前記割当マップ領域の矛盾を
復旧し、前記ディレクトリ領域の開始アドレスで示され
る前記データ領域から順次検索を行ない、前記タイムス
タンプ情報が前記ディレクトリ領域と異なる前記データ
領域を検出した場合、当該データ領域の1つ前のデータ
領域までを有効とし、該1つ前のデータ領域のアドレス
を前記ディレクトリ領域の最終アドレスとして前記ディ
レクトリ領域の矛盾を復旧する構成としている。
According to another preferred aspect, the restoration means determines whether or not the time stamp information of the data area used in the information of the allocation map area exists in the directory area. Determine, if not present, invalidate the data area, change the information of the allocation map area to unused, recover the inconsistency of the allocation map area, and start from the data area indicated by the start address of the directory area. If the data area where the time stamp information is different from the directory area is detected by performing a sequential search, the data area up to the data area immediately before the data area is validated, and the address of the data area immediately before the directory area is changed to the directory area. The inconsistency of the directory area is restored as the last address of the area.

【0011】[0011]

【実施例】次に本発明の好適な実施例について図面を参
照して説明する。図1は本発明のライブラリファイル管
理装置の全体構成を示すブロック図である。図1におい
て、本ライブラリファイル管理装置は、サブファイルア
クセス処理部2、障害検出処理部3、障害復旧処理部
4、メモリテーブル5、ライブラリファイル12を格納
する記憶装置11から構成される。
Next, a preferred embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the overall configuration of the library file management device of the present invention. In FIG. 1, the library file management device includes a sub file access processing unit 2, a failure detection processing unit 3, a failure recovery processing unit 4, a memory table 5, and a storage device 11 for storing a library file 12.

【0012】サブファイルアクセス処理部2は、ライブ
ラリファイル12に対するサブファイルの作成、追加、
削除等の処理を行なう。また、障害検知処理部3は、ラ
イブラリファイル12に障害が発生したことを検知す
る。さらに、障害復旧処理部4は、障害が発生したライ
ブラリファイル12の内容を復旧する処理を行なう。メ
モリテーブル5は、障害復旧処理に際してディレクトリ
ブロックのタイムスタンプデータを格納する。
The sub-file access processing unit 2 creates, adds,
Perform processing such as deletion. Further, the failure detection processing unit 3 detects that a failure has occurred in the library file 12. Further, the failure recovery processing unit 4 performs processing for recovering the contents of the library file 12 in which the failure has occurred. The memory table 5 stores the time stamp data of the directory block at the time of the failure recovery processing.

【0013】ライブラリファイル12を格納する記憶装
置11としては、ランダムアクセスが可能な装置が使用
され、例えば、磁気ディスクや光ディスクが使用され
る。記憶装置11には、1または複数のライブラリファ
イル12が格納される。また、1つのライブラリファイ
ル12には、1つあるいは複数のサブファイルが含まれ
る。
As the storage device 11 for storing the library file 12, a device capable of random access is used, and for example, a magnetic disk or an optical disk is used. The storage device 11 stores one or more library files 12. One library file 12 includes one or a plurality of subfiles.

【0014】図2にディスク装置11に格納されるライ
ブラリファイル12の構成を示す。ライブラリファイル
12は、ディレクトリ領域13、BAM領域14、デー
タ領域15により構成される。ディレクトリ領域13
は、ディレクトリブロック21の集合により構成され、
BAM領域14は、BAMブロック22の集合により構
成され、データ領域15は、データブロック23の集合
により構成される。
FIG. 2 shows the structure of the library file 12 stored in the disk device 11. The library file 12 includes a directory area 13, a BAM area 14, and a data area 15. Directory area 13
Is composed of a set of directory blocks 21,
The BAM area 14 is constituted by a set of BAM blocks 22, and the data area 15 is constituted by a set of data blocks 23.

【0015】図3に上記ライブラリファイル12の各領
域の構成例を示す。ディレクトリ領域13を構成するデ
ィレクトリブロック21は、管理情報21aと複数のデ
ィレクトリエントリ21bで構成される。管理情報21
aには、使用バイト数を書き込む。また、ディレクトリ
エントリ21bは、サブファイル名25a、開始ブロッ
クアドレス25b、終了ブロックアドレス25c、タイ
ムスタンプ25d、その他の情報25eを有する。
FIG. 3 shows a configuration example of each area of the library file 12. A directory block 21 constituting the directory area 13 includes management information 21a and a plurality of directory entries 21b. Management information 21
The number of used bytes is written in a. The directory entry 21b has a subfile name 25a, a start block address 25b, an end block address 25c, a time stamp 25d, and other information 25e.

【0016】サブファイル名25には、サブファイル毎
に付けた名称を書き込む。開始ブロックアドレス25b
及び終了ブロックアドレス25cには、サブファイルの
データを書き込んだ最初のデータブロック23のアドレ
ス及び最後のデータブロック23のアドレスを設定す
る。タイムスタンプ25dには、サブファイル作成時の
年月日及び時間を設定する。また、その他の情報25e
には、サブファイルの識別子等を設定する。
In the subfile name 25, a name given to each subfile is written. Start block address 25b
The address of the first data block 23 and the address of the last data block 23 in which the data of the subfile is written are set in the end block address 25c. In the time stamp 25d, the date and time when the subfile is created are set. In addition, other information 25e
, An identifier of the sub file is set.

【0017】BAM領域14を構成するBAMブロック
22は、NEXTポインタ22a、PRIORポインタ
22b、BAM記述22Cで構成される。NEXTポイ
ンタ22a及びPRIORポインタ22bには、次のB
AMブロック22の位置及び一つ前のBAMブロック2
2の位置を設定する。また、BAM記述22Cには、フ
ォーマット済みの論理トラック数24a、未使用の論理
トラック数24b、各データブロック23の使用の有無
を示す割当マップ24cが含まれる。割当マップ24c
については、データブロック23が使用中の場合に
「1」が、未使用の場合に「0」が設定される。
The BAM block 22 constituting the BAM area 14 includes a NEXT pointer 22a, a PRIOR pointer 22b, and a BAM description 22C. The next B is stored in the NEXT pointer 22a and the PRIOR pointer 22b.
Location of AM block 22 and previous BAM block 2
Set the position of 2. The BAM description 22C includes a formatted logical track number 24a, an unused logical track number 24b, and an allocation map 24c indicating whether or not each data block 23 is used. Assignment map 24c
Is set to “1” when the data block 23 is in use and “0” when it is not used.

【0018】データ領域15を構成するデータブロック
23は、NEXTポインタ23a、PRIORポインタ
23b、その他の情報23c、タイムスタンプ23d、
複数のレコード1〜nで構成される。NEXTポインタ
23a及びPRIORポインタ23bには、次のデータ
ブロック23の位置及び一つ前のデータブロック23の
位置が設定する。その他の情報23cには、ブロック内
に含まれているレコード数、ブロック中のバイト数など
を設定する。タイムスタンプ23dには、ディレクトリ
エントリのタイムスタンプ25dと同様、サブファイル
作成時の年月日及び時間を設定する。また、各レコード
には、データを書き込む。
The data block 23 constituting the data area 15 includes a NEXT pointer 23a, a PRIOR pointer 23b, other information 23c, a time stamp 23d,
It is composed of a plurality of records 1 to n. The position of the next data block 23 and the position of the immediately preceding data block 23 are set in the NEXT pointer 23a and the PRIOR pointer 23b. In the other information 23c, the number of records included in the block, the number of bytes in the block, and the like are set. In the time stamp 23d, similarly to the time stamp 25d of the directory entry, the date and time when the sub file is created are set. Data is written in each record.

【0019】ここで、ライブラリフィル12にサブファ
イルを作成する際の処理内容を図4から図6を用いて説
明する。図4は、ライブラリファイル12にサブファイ
ルをオープンするときの状態を示す。まず、ディレクト
リブロック21に新規のサブファイルに対応するディレ
クトリエントリ21bを作成する。
Here, the processing contents when creating a subfile in the library file 12 will be described with reference to FIGS. FIG. 4 shows a state when a sub file is opened in the library file 12. First, a directory entry 21b corresponding to a new subfile is created in the directory block 21.

【0020】そのディレクトリエントリ21bのサブフ
ァイル名25aには、ファイル名を設定し、開始ブロッ
クアドレス25bには、最初に確保したデータブロック
23のアドレスを設定し、終了ブロックアドレス25c
には、「0」を設定する。また、タイムスタンプ25d
には、その作成時の年月日及び時間を取得して設定す
る。図4では、1論理トラックに2つのデータブロック
23が格納される場合を示している。
The file name is set in the subfile name 25a of the directory entry 21b, the address of the data block 23 secured first is set in the start block address 25b, and the end block address 25c
Is set to "0". Also, time stamp 25d
Is set by acquiring the date and time at the time of creation. FIG. 4 shows a case where two data blocks 23 are stored in one logical track.

【0021】図5は、確保したデータブロック23にデ
ータを出力する状態を示す。データは、確保したデータ
ブロック23に順次書き込む。データブロックが不足し
た場合には、論理トラック単位でデータブロック23を
確保して追加する。各データブロック23間について
は、NEXTポインタ23a、PRIORポインタ23
bによって接続する。また、ディレクトリエントリ21
bに設定したタイムスタンプ25dと同一の値を、デー
タブロック23のタイムスタンプ23dに設定する。
FIG. 5 shows a state in which data is output to the secured data block 23. Data is sequentially written to the secured data block 23. When the data blocks are insufficient, the data blocks 23 are secured and added in logical track units. NEXT pointer 23a, PRIOR pointer 23
b. Also, the directory entry 21
The same value as the time stamp 25d set in b is set in the time stamp 23d of the data block 23.

【0022】図6は、サブファイルをクローズする時の
状態を示す。全てのデータの書き込みが終了した場合、
ディレクトリエントリ21bの最終ブロックアドレス2
5cに、最後のデータブロック23のアドレスを書き込
む。
FIG. 6 shows a state when the subfile is closed. When all data has been written,
Last block address 2 of directory entry 21b
In 5c, the address of the last data block 23 is written.

【0023】サブファイル作成時のシステムダウンによ
る障害では、BAMブロック22の設定上使用中になっ
ているデータブロックにデータが未更新である場合、デ
ィレクトリエントリ21bの最終ブロックアドレス25
bの値と、最終データブロック23のアドレスとが一致
していない場合が発生する。このような障害の復旧を障
害復旧処理部4が行なう。
In a failure due to a system failure at the time of creating a sub-file, if data is not updated in a data block which is in use due to the setting of the BAM block 22, the last block address 25 of the directory entry 21b is not updated.
A case occurs where the value of b does not match the address of the last data block 23. The recovery from such a failure is performed by the failure recovery processing unit 4.

【0024】ここで、障害復旧機能を実行せずにサブフ
ァイルをアクセスした場合の、障害検知処理部3による
障害検知と、障害を検知した場合の障害復旧処理部4に
よる復旧処理について説明する。ここでは、図5のデー
タ出力において、データブロック23(5)にデータを
書き込んだ後にシステムダウンが起こった場合を例にと
って説明する。
Here, the failure detection by the failure detection processing unit 3 when the sub-file is accessed without executing the failure recovery function and the recovery processing by the failure recovery processing unit 4 when a failure is detected will be described. Here, a case will be described as an example where a system down occurs after writing data to the data block 23 (5) in the data output of FIG.

【0025】まず、障害検知処理部3では、ディレクト
リエントリ21bの終了ブロックアドレス25cが
「0」か否かを判定する。「0」であれば、サブファイ
ルクローズ前の障害と判定し、ディレクトリエントリ2
1bの開始ブロックアドレス25bを元に、先頭のデー
タブロック23(1)を検索し、NEXTポインタ23
aを参照して順次データブロック23を検索する。その
際、データブロック23のタイムスタンプとディレクト
リエントリ21bのタイムスタンプとの比較を行なう。
両者のタイムスタンプが不一致であれば、そのデータブ
ロック23のでデータ書き込み前にシステムダウンした
ことが検知される。
First, the failure detection processing section 3 determines whether or not the end block address 25c of the directory entry 21b is "0". If it is “0”, it is determined that the failure is before the subfile is closed, and the directory entry 2
The first data block 23 (1) is searched based on the start block address 25b of the 1b, and the NEXT pointer 23
The data blocks 23 are sequentially searched with reference to a. At that time, the time stamp of the data block 23 is compared with the time stamp of the directory entry 21b.
If the two time stamps do not match, it is detected that the system has gone down before writing the data in the data block 23.

【0026】図5の例では、データブロック23(5)
のデータ書き込みが終了して、そのNEXTポインタ2
3aは、データブロック23(6)を示している。しか
し、データブロック23(6)は、データ書き込みが終
了しておらず、このため、データブロック23(6)と
のタイムスタンプの比較により不一致が検出されること
になる。
In the example of FIG. 5, the data block 23 (5)
Is completed, and the NEXT pointer 2
3a shows the data block 23 (6). However, the data writing to the data block 23 (6) has not been completed, and therefore, a mismatch is detected by comparing the time stamp with the data block 23 (6).

【0027】上記のような不一致が障害検知処理部3で
検知された場合、障害復旧処理部4は、一つ前のデータ
ブロック23(5)までを有効とし、ディレクトリエン
トリ21bの最終ブロックアドレス25cに、データブ
ロック23(5)のアドレスを設定し、かつデータブロ
ック23(5)のNEXTポインタ23aには、最終ブ
ロックであることを示す値(NUL)を設定する。
When the inconsistency as described above is detected by the failure detection processing unit 3, the failure recovery processing unit 4 validates the data block 23 (5) up to the immediately preceding data block and checks the last block address 25c of the directory entry 21b. , The address of the data block 23 (5) is set, and a value (NUL) indicating the last block is set in the NEXT pointer 23a of the data block 23 (5).

【0028】併せて、使用者に対して、BAMブロック
22上は使用中であるが、データブロック23上使用さ
れていないデータブロックが存在する可能性があるた
め、障害復旧機能実行の警告を行なう。
At the same time, the user is warned to execute the failure recovery function because there is a possibility that there is a data block which is in use on the BAM block 22 but not used on the data block 23. .

【0029】サブファイルの終わりへのレコードの追加
を行なう場合は、追加処理モードで該当するサブファイ
ルをオープンし、ディレクトリエントリ21bよりタイ
ムスタンプ25dを取得する。ディレクトリエントリ2
1bで示される最終のデータブロック23に空きが存在
すれば、そこにレコードを追加する。空が存在しなけれ
ば、新たにデータブロック23を確保する。そして、確
保した追加データブロック23には、ディレクトリエン
トリ21bより取得したタイムスタンプを設定する。レ
コードの追加が全て終了した場合、サブファイルをクロ
ーズし、ディレクトリエントリ21bの終了ブロックア
ドレス25Cに追加した最後のデータブロック23のア
ドレスを設定して更新する。
When a record is added to the end of the subfile, the corresponding subfile is opened in the addition processing mode, and the time stamp 25d is obtained from the directory entry 21b. Directory entry 2
If there is a free space in the last data block 23 indicated by 1b, a record is added thereto. If there is no sky, a new data block 23 is secured. Then, the time stamp obtained from the directory entry 21b is set in the secured additional data block 23. When all the records have been added, the sub file is closed, and the address of the last data block 23 added to the end block address 25C of the directory entry 21b is set and updated.

【0030】サブファイルへのレコード追加時にシステ
ムダウンが発生した場合、上記したサブファイル作成時
と同様な不一致状態が発生し得る。復旧については、上
述と同様に行なう。なお、障害復旧機能を実行せずに、
該当するサブファイルをアクセスした場合の障害検出に
おいては、ディレクトリエントリ21bの最終ブロック
アドレス25cにより最終のデータブロックを検索し、
そのデータブロック23のNEXTポインタ23aが最
終ブロックであることを示す値(NUL)以外の値であ
れば、追加中にシステムダウンが発生したことを検知で
きる。
When a system failure occurs when a record is added to a subfile, a mismatch state similar to that at the time of creating the subfile described above may occur. Recovery is performed in the same manner as described above. In addition, without executing the failure recovery function,
In the failure detection when the corresponding subfile is accessed, the last data block is searched by the last block address 25c of the directory entry 21b.
If the NEXT pointer 23a of the data block 23 is a value other than the value (NUL) indicating the last block, it can be detected that a system failure has occurred during the addition.

【0031】この状態を検知した場合、NEXTポイン
タ23aに基づいて順次データブロックを検索し、タイ
ムスタンプの不一致を検出する。タイムスタンプの不一
致を検知した後は、上述したサブファイル作成時の処理
と同様の復旧処理を行なうものである。
When this state is detected, data blocks are sequentially searched based on the NEXT pointer 23a, and a time stamp mismatch is detected. After detecting the mismatch of the time stamps, a recovery process similar to the above-described process at the time of creating the subfile is performed.

【0032】サブファイルの削除処理の時は、ディレク
トリエントリ21bより削除対象となるサブファイルの
情報をまず削除する。次に、BAMブロック22よりそ
のサブファイルの使用していた、全ての論理トラックを
開放する。データブロック23については、I/Oの削
減によりオーバーヘッドを軽減するため、ブロックの初
期化は行なわない。
In the process of deleting a subfile, information on the subfile to be deleted is first deleted from the directory entry 21b. Next, all logical tracks used by the sub file are released from the BAM block 22. The data block 23 is not initialized to reduce overhead by reducing I / O.

【0033】このサブファイル削除時のシステムダウン
では、BAMブロック22上は使用中であるが、該当す
るサブファイルが存在しない状態が発生する。復旧につ
いては、上述したサブファイル作成時の処理と同様の復
旧処理を行なう。
When the system goes down when the subfile is deleted, a state occurs in which the BAM block 22 is in use but the corresponding subfile does not exist. For recovery, the same recovery processing as the above-described processing at the time of creating the subfile is performed.

【0034】次に、障害復旧処理部4による障害復旧機
能について、図7から図9を用いて詳細に説明する。最
初に、データ領域15とBAM領域14との矛盾検査に
よるBAMブロック22の障害復旧を説明する。図7に
示すように、ディレクトリ領域13上の全てのディレク
トリブロック21を読み込む。読み込んだ内容を、タイ
ムスタンプをキーとしてソートし、メモリテーブル5に
格納する。次に、BAM領域14より先頭のBAMブロ
ック22を読み込む。そして、BAMブロック22上で
割当マップ24cに使用中として設定されているデータ
ブロック23の内容を読み込む。BAMブロック22上
で未使用のデータブロックであれば、特に読み込みを行
なわない。
Next, the failure recovery function of the failure recovery processing unit 4 will be described in detail with reference to FIGS. First, recovery of a failure of the BAM block 22 by checking inconsistency between the data area 15 and the BAM area 14 will be described. As shown in FIG. 7, all directory blocks 21 on the directory area 13 are read. The read contents are sorted using the time stamp as a key and stored in the memory table 5. Next, the first BAM block 22 is read from the BAM area 14. Then, the contents of the data block 23 set as being used in the allocation map 24c on the BAM block 22 are read. If it is an unused data block on the BAM block 22, no particular reading is performed.

【0035】読み込んだデータブロック23のタイムス
タンプ23dが、メモリテーブル5上に存在するかどう
かを調べる。存在しない場合は、システムダウン等によ
る無効なデータブロックであると判定し、BAMブロッ
ク22の割当マップ24cが使用中「1」となっている
場合は、未使用状態「0」に設定する。順次以上の処理
を、全てのデータブロック23に対して実行する。図8
においては、BAMブロック22のBAM記述22cの
中の割当マップ24cの値のみを取り出して示してい
る。
It is checked whether the time stamp 23d of the read data block 23 exists in the memory table 5. If the data block does not exist, it is determined that the data block is invalid due to a system down or the like, and if the allocation map 24c of the BAM block 22 is "1" in use, it is set to the unused state "0". The above processes are sequentially performed on all the data blocks 23. FIG.
5 shows only the value of the assignment map 24c in the BAM description 22c of the BAM block 22.

【0036】図7から図9で示す例では、図8に示すよ
うに、ブロック番号1の第1のデータブロック、ブロッ
ク番号2の第2のデータブロック23はBAMブロック
22上使用中となっているので、読み込みが行なわれ
る。タイムスタンプは、図7におけるファイルCの値と
一致するので、正しいデータブロックとして判定され
る。第3及び第4のデータブロックは、BAMブロック
22上未使用「0」となっているので、読み込まれな
い。
In the example shown in FIGS. 7 to 9, as shown in FIG. 8, the first data block of the block number 1 and the second data block 23 of the block number 2 are in use on the BAM block 22. Is read. Since the time stamp matches the value of file C in FIG. 7, it is determined as a correct data block. Since the third and fourth data blocks are unused “0” on the BAM block 22, they are not read.

【0037】使用中となっている第5のデータブロック
23は、タイムスタンプがファイルDと一致する。ま
た、第6のデータブロック23のタイムスタンプは、メ
モリテーブル5上に対応する値が存在しない。このた
め、未使用のデータブロック23と判定され、BAMブ
ロック22上の割当マップ24cの状態を未使用に変更
する。
The time stamp of the fifth data block 23 which is in use matches that of the file D. The time stamp of the sixth data block 23 has no corresponding value on the memory table 5. Therefore, it is determined that the data block 23 is unused, and the state of the allocation map 24c on the BAM block 22 is changed to unused.

【0038】次に、第2の復旧処理として、ディレクト
リエントリ21bの矛盾修正処理を説明する。まず、先
頭のディレクトリエントリ21bを読み込む。読み込ん
だディレクトリエントリ21bの、開始ブロックアドレ
ス25bから該当するサブファイルの先頭データブロッ
ク23を検索する。
Next, a description will be given of a process of correcting inconsistency of the directory entry 21b as a second recovery process. First, the first directory entry 21b is read. The head data block 23 of the corresponding subfile is searched from the start block address 25b of the read directory entry 21b.

【0039】次に、検索したデータブロック23のNE
XTポインタ23aを参照して順次データブロック23
を検索し、NEXTポインタ23aが最終データブロッ
クを示すまで検索を実施する。検索した最終データブロ
ック23について、そのタイムスタンプの値とディレク
トリブロックのタイムスタンプを比較する。比較の結
果、異なれば、1つ前のデータブロック23までを有効
とし、ディレクトリエントリ21bの最終ブロックアド
レス25cをその1つ前のデータブロック23のアドレ
スを設定して更新する。この処理を全てのディレクトリ
エントリ21bについて実行する。以上の障害復旧処理
によってライブラリファイルの復旧が完了することにな
る。以上好ましい実施例をあげて本発明を説明したが、
本発明は必ずしも上記実施例に限定されるものではな
い。
Next, the NE of the searched data block 23 is
The data blocks 23 are sequentially read by referring to the XT pointer 23a.
And the search is performed until the NEXT pointer 23a indicates the last data block. The time stamp value of the searched last data block 23 is compared with the time stamp of the directory block. As a result of the comparison, if they are different, the data block up to the previous data block 23 is validated, and the last block address 25c of the directory entry 21b is updated by setting the address of the previous data block 23. This process is executed for all directory entries 21b. The recovery of the library file is completed by the above failure recovery processing. Although the present invention has been described with reference to the preferred embodiments,
The present invention is not necessarily limited to the above embodiment.

【0040】[0040]

【発明の効果】以上説明したように本発明のライブラリ
ファイル管理装置によれば、システムダウン等による障
害が発生した場合でも、障害復旧機能によって、データ
領域とBAM領域の設定の矛盾あるいはディレクトリ領
域の矛盾を復旧することができるので、障害が発生して
もサブファイルを正確にアクセスすることができる。ま
た、障害の復旧前でも、アクセスすることで障害が発生
したことを検知することができる。
As described above, according to the library file management apparatus of the present invention, even if a failure occurs due to a system failure or the like, the inconsistency in the setting of the data area and the BAM area or the inconsistency of the directory area can be achieved by the failure recovery function. Since the inconsistency can be recovered, the subfile can be correctly accessed even if a failure occurs. In addition, even before recovery from the failure, it is possible to detect that the failure has occurred by accessing.

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

【図1】 本発明のライブラリファイル管理装置の全体
構成を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of a library file management device of the present invention.

【図2】 本発明で管理するライブラリファイルの構成
を示す図である。
FIG. 2 is a diagram showing a configuration of a library file managed by the present invention.

【図3】 ライブラリファイルに含まれる各領域を構成
するブロックの構成を示す図である。
FIG. 3 is a diagram showing a configuration of a block constituting each area included in a library file.

【図4】 サブファイルの作成時のオープン状態を示す
図である。
FIG. 4 is a diagram showing an open state when a subfile is created.

【図5】 サブファイルの作成時のデータ書き込み状態
を示す図である。
FIG. 5 is a diagram showing a data write state when a subfile is created.

【図6】 サブファイルの作成時のクローズ状態を示す
図である。
FIG. 6 is a diagram illustrating a closed state when a subfile is created.

【図7】 ディレクトリブロックの内容の例を示す図で
ある。
FIG. 7 is a diagram showing an example of the contents of a directory block.

【図8】 BAMブロックの内容例を示す図である。FIG. 8 is a diagram illustrating a content example of a BAM block.

【図9】 データブロックの内容例を示す図である。FIG. 9 is a diagram showing an example of the contents of a data block.

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

1 ライブラリファイル管理装置 2 サブファイルアクセス処理部 3 障害検知処理部 4 障害復旧処理部 5 メモリテーブル 11 記憶装置 12 ライブラリファイル 13 ディレクトリ領域 14 BAM領域 15 データ領域 21 ディレクトリブロック 22 BAMブロック 23 データブロック 1 Library File Management Device 2 Sub File Access Processing Unit 3 Failure Detection Processing Unit 4 Failure Recovery Processing Unit 5 Memory Table 11 Storage Device 12 Library File 13 Directory Area 14 BAM Area 15 Data Area 21 Directory Block 22 BAM Block 23 Data Block

フロントページの続き (56)参考文献 特開 平4−113426(JP,A) 特開 平4−314145(JP,A) 特開 平4−370848(JP,A) 特開 平5−35568(JP,A) 特開 平5−108448(JP,A) 特開 平5−134895(JP,A) 特開 平5−257778(JP,A) アスキー出版局編著,「標準MSーD OSハンドブック」,株式会社アスキ ー,1984年7月10日,p.95−97(「C HKDSK」の項参照) (58)調査した分野(Int.Cl.6,DB名) G06F 12/00 531Continuation of front page (56) References JP-A-4-113426 (JP, A) JP-A-4-314145 (JP, A) JP-A-4-370848 (JP, A) JP-A-5-35568 (JP) , A) JP-A-5-108448 (JP, A) JP-A-5-134895 (JP, A) JP-A-5-257778 (JP, A) Edited by ASCII Publishing Bureau, "Standard MS-DOS Handbook", ASCII Co., July 10, 1984, p. 95-97 (See “CHKDSK”) (58) Fields investigated (Int. Cl. 6 , DB name) G06F 12/00 531

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 サブファイルのデータを格納するデータ
領域と、該データ領域の開始アドレスと終了アドレスを
格納するディレクトリ領域と、前記データ領域の使用の
有無を示す情報を格納する割当マップ領域とからなるラ
イブラリファイルの管理を行なうライブラリファイル管
理装置において、 前記データ領域及びディレクトリ領域が、サブファイル
毎のタイムスタンプ情報を備え、 前記データ領域とディレクトリ領域の前記タイムスタン
プ情報に基づいて、前記ディレクトリ領域または割当マ
ップ領域に格納された情報の矛盾を復旧する復旧手段を
備えることを特徴とするライブラリファイル管理装置。
1. A data area for storing data of a subfile, a directory area for storing a start address and an end address of the data area, and an allocation map area for storing information indicating whether or not the data area is used. In the library file management device for managing the library file, the data area and the directory area include time stamp information for each sub-file, and the directory area or the directory area is provided based on the time stamp information of the data area and the directory area. A library file management device, comprising: recovery means for recovering inconsistency of information stored in an allocation map area.
【請求項2】 前記データ領域に格納されたサブファイ
ルのアクセスに際して、前記データ領域とディレクトリ
領域のタイムスタンプ情報を比較し、不一致の場合に障
害が発生したことを検知する障害検知手段を備えること
を特徴とする請求項1に記載のライブラリファイル管理
装置。
And a failure detecting means for comparing time stamp information of the data area with that of a directory area when accessing a sub-file stored in the data area, and detecting that a failure has occurred in the case of a mismatch. The library file management device according to claim 1, wherein:
【請求項3】 前記復旧手段は、前記割当マップ領域の
情報で使用中とされている前記データ領域のタイムスタ
ンプ情報が、前記ディレクトリ領域に存在するか否かを
判定し、存在しない場合に当該データ領域を無効とし
て、前記割当マップ領域の情報を未使用に変更して前記
割当マップ領域の矛盾を復旧し、 前記ディレクトリ領域の開始アドレスで示される前記デ
ータ領域から順次検索を行ない、前記タイムスタンプ情
報が前記ディレクトリ領域と異なる前記データ領域を検
出した場合、当該データ領域の1つ前のデータ領域まで
を有効とし、該1つ前のデータ領域のアドレスを前記デ
ィレクトリ領域の最終アドレスとして前記ディレクトリ
領域の矛盾を復旧することを特徴とする請求項1に記載
のライブラリファイル管理装置。
3. The recovery means determines whether or not the time stamp information of the data area used in the information of the allocation map area exists in the directory area. Invalidate the data area, change the information of the allocation map area to unused, restore the inconsistency of the allocation map area, sequentially search from the data area indicated by the start address of the directory area, and execute the time stamp. If the data area whose information is different from the directory area is detected, the data area up to the data area immediately before the data area is validated, and the address of the data area immediately before is set as the last address of the directory area. 2. The library file management device according to claim 1, wherein the inconsistency of the library file is restored.
JP5351949A 1993-12-31 1993-12-31 Library file management device Expired - Lifetime JP2822869B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5351949A JP2822869B2 (en) 1993-12-31 1993-12-31 Library file management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5351949A JP2822869B2 (en) 1993-12-31 1993-12-31 Library file management device

Publications (2)

Publication Number Publication Date
JPH07200378A JPH07200378A (en) 1995-08-04
JP2822869B2 true JP2822869B2 (en) 1998-11-11

Family

ID=18420732

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5351949A Expired - Lifetime JP2822869B2 (en) 1993-12-31 1993-12-31 Library file management device

Country Status (1)

Country Link
JP (1) JP2822869B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001016756A1 (en) * 1999-08-31 2001-03-08 Fujitsu Limited File apparatus and file access method
JP4586742B2 (en) * 2006-02-20 2010-11-24 日本電気株式会社 Area shared file management apparatus, recovery method of deleted member of area shared file, and program
JP5670935B2 (en) * 2012-02-27 2015-02-18 日本電信電話株式会社 Distributed data management system and operation method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
アスキー出版局編著,「標準MSーDOSハンドブック」,株式会社アスキー,1984年7月10日,p.95−97(「CHKDSK」の項参照)

Also Published As

Publication number Publication date
JPH07200378A (en) 1995-08-04

Similar Documents

Publication Publication Date Title
EP0479535B1 (en) File managing method
US5740445A (en) Information processing apparatus for generating directory information to manage a file using directories
US7624275B2 (en) Disk drive, control method thereof and disk-falsification detection method
US20050262033A1 (en) Data recording apparatus, data recording method, program for implementing the method, and program recording medium
JP2822869B2 (en) Library file management device
CN114780489B (en) Method and device for realizing distributed block storage bottom layer GC
JP2925042B2 (en) Information link generation method
CN114816247A (en) Logic data acquisition method and device
JPS62245348A (en) Method and device for updating data base
JP2679602B2 (en) Evacuation medium creation system
JPH0258653B2 (en)
JP3178671B2 (en) File system and its file recovery method
JP2001337857A (en) Database restoration system
JPH05151056A (en) Data controller
JP2001142750A (en) Device and method for managing data file recording and recording medium
JP3016255B2 (en) Database management system
JPH01140353A (en) System for maintaining data in data base
JPS63311451A (en) Access system for low-speed access medium incapable of rewriting
JPS63196959A (en) Saving and restoring system for file
JPS62297948A (en) Recovery system for fault of data base
JPH04209044A (en) Data base control system
JPH0498331A (en) Retrieval system for unused record of data file
JPH01276250A (en) System for managing file history using optical disk
JPH04336638A (en) Disk exchange system in system working mode
JPS6037503B2 (en) File storage device content update method