JP3614886B2 - File system - Google Patents

File system Download PDF

Info

Publication number
JP3614886B2
JP3614886B2 JP17121094A JP17121094A JP3614886B2 JP 3614886 B2 JP3614886 B2 JP 3614886B2 JP 17121094 A JP17121094 A JP 17121094A JP 17121094 A JP17121094 A JP 17121094A JP 3614886 B2 JP3614886 B2 JP 3614886B2
Authority
JP
Japan
Prior art keywords
drive
buffer
file system
update
updated
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
JP17121094A
Other languages
Japanese (ja)
Other versions
JPH0784727A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP17121094A priority Critical patent/JP3614886B2/en
Publication of JPH0784727A publication Critical patent/JPH0784727A/en
Application granted granted Critical
Publication of JP3614886B2 publication Critical patent/JP3614886B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
本発明は、ファイルなどのデータを格納するファイルシステムの改良に関するものであり、特に、信頼性に優れたファイルシステムに係る。
【0002】
【従来の技術】
大多数のコンピュータは、内部記憶装置と外部記憶装置を持つ。内部記憶装置は、外部からの継続的電力供給によって情報を保つ。代表的な内部記憶装置はRAMで構成された主メモリ(main memory) である。外部記憶装置は、原理や種類にかかわらず、何等かの記録媒体(例えば、磁気ディスクや光磁気ディスク)を持つ。記録媒体が着脱可能か否かにかかわらず、単一の外部記憶装置はドライブと呼ばれる。ドライブの媒体には、通常、多数のブロックが形成されている。このブロックはアクセスの単位である。
【0003】
例えば、ある規格のフロッピーディスクは2つのサーフェス(surfaces)を持ち、各サーフェスはそれぞれ、同心円状に配置された80のトラックを持ち、各トラックは16セクタに区分される。この各セクタ又はいくつかの連続したセクタが前記ブロックに相当する。固定ディスク装置では、記録媒体は、円筒状に積層された堅い円盤である。このため、固定ディスク装置はサーフェスを多数有する。また、トラックの代りにシリンダという用語が使われる。
【0004】
ほとんどの場合、ディスク上の情報を更新する単一の操作は、媒体上の複数のブロックを更新する。その第1の理由は、ブロックのサイズ(例えば256バイト)は、通常、単一の操作の情報量よりはるかに小さいからである。例えば、コンピュータ上で編集されたわずか数頁に過ぎない文書も、何十ものブロックやセクタを費やして保存される。第2の理由は、媒体上のデータが一般にファイル単位でアクセスされ、かつ、ファイルの管理情報は後述のFATやディレクトリの様に分かれて配置(記憶)されているからである。
【0005】
ファイルシステムは、外部記憶装置とこの外部記憶装置のデータをファイル単位でアクセスするための制御手順を総称する概念である。ファイルシステムは、管理情報(例えば、FAT(File Allocation Table) とディレクトリ)を必要とする。このため、ファイルを更新する場合、ファイルをわずか1セクタ延長するだけでも、ファイルの内容となるデータのほかに、FATやディレクトリも更新する必要がある。この結果、しばしば単一の操作が複数のブロックの内容を更新する。
【0006】
ファイルシステムでは、通常、バッファ(buffer)が用いられる。バッファとは、媒体へ書き込むべきデータを一時的に蓄積するメモリ上の所定の領域である。バッファは、主メモリを用いてもよいし、ドライブ駆動用のサブコンピュータ上に設けることも考えられる。例えば、ディスクとバッファを組み合わせたシステムでは、ディスク上のデータを変更する操作の際に、変更するブロックの内容を直接ディスクに書き込まず、バッファに一時的に格納する。バッファに書かれたブロックのデータ(以下、「バッファブロック」と呼ぶ)は、少なくともシステムを止める前には、媒体に書き込むべきものである。このようなバッファブロックがある程度たまってから実際のディスクアクセスを行えば、ディスクアクセスの回数を減らし、処理を効率化することができる。
【0007】
バッファがまだディスクに書いていないデータによって一杯になり、新たなデータがバッファに書き込めない場合は、不足する分のバッファブロックによって媒体を更新し、バッファのうち更新済みの領域に新たなデータを書き込む。
【0008】
【発明が解決しようとする課題】
上記のバッファを用いるファイルシステムは一般的であるが、このようなファイルシステムを用いる場合でも、かつては、単一のコンピュータの単一の論理的ドライブを実現するハードウェアとしては、実際に単一のドライブのみが接続された。単一のドライブしか有しないコンピュータは、しばしばドライブの故障によるデータの喪失を生じる。ドライブの故障は、電源の遮断、ヘッドクラッシュ、制御回路の故障など多様である。故障による最も不運な結果は、故障がデータ書き込み中に発生し、媒体がいわば「書きかけ」の状態になることである。
【0009】
ここで、「書きかけ」は同時に更新されるべき複数のブロックのうち、一部のみが更新され、残りは旧い内容になっている状態を表す。例えば、一般に、ファイル内のデータと、このファイルのFAT、ディレクトリの情報は、相互に矛盾してはならない。しかし、これらのうちいずれかが更新されていない状態でドライブが故障すると、相互に整合性を失い、ファイルのデータは失われるか、復元困難になる。また、「書きかけ」の他の例として、例えばFATのみディスクに書き込み済で、ディレクトリを書き込んでいない状態では、管理情報それ自体に矛盾が生じる。さらに、連続したブロックが単一のファイルの一部を構成している場合において、あるブロックの内容は更新されており、次のブロックの内容は旧いままという状態も、「書きかけ」の例である。旧いデータと新しいデータとの間では、当然、整合性が失われている。
【0010】
新しい内容と旧い内容が混じって整合性を失ったファイルのデータの復旧は、全体が旧い内容のままのファイルのデータの復旧よりも、はるかに困難である。この困難さの一つの原因は、旧い部分と新しい部分の特定が困難なことである。また、もう一つの原因は、(特に、ドライブが磁気ディスクの場合に生じるが)、動作不全に陥ったヘッドによる媒体上のデータの破壊である。これは、ヘッドから発生している書込用の磁界が故障の瞬間から不正常になったり、ヘッドが磁気面を損傷するからである。さらに、ファイルの管理情報を失うことによってファイル全体を失う事態も生じ得る。
【0011】
特に、不運にもコンピュータのシステム・ファイルを喪失すると、コンピュータ・システムを起動できなくなり、故障の診断や復旧自体も不可能になる。
【0012】
このようなデータの喪失に対する許容性は、分野によって異なる。例えば、帳票計算や実験データの整理あるいは文書作成の分野では、旧いデータからのやり直しが利く。このような分野では耐障害性をあまり要求されない。一方、大型プラントの制御や交通システムの制御あるいは銀行の口座管理などの分野では、データの消滅は許されず、やり直しが利かない。後者の分野では、データの喪失は、ただちに危険や権利義務関係の混乱を招くので、耐障害性が高度に要求される。
【0013】
近年では、計算機システムのダウンサイジングに伴って、従来は耐障害性を要求されないような分野にしか使用されていなかった各種のシステムが、高度の耐障害性が要求される分野においても利用されるようになってきている。例えば、小型計算機に多く利用されているUNIXのファイルシステムなどは、耐障害性を考慮していないファイル記憶装置であるが、高度の耐障害性が要求される分野でも利用されるようになってきている。このため、耐障害性の向上は重要な課題である。
【0014】
ファイルの喪失を防ぎ、耐障害性を向上させる手法の代表的なものは、ミラーリングと分散ファイルシステム(Distributed File System) である。ミラーリングは、単一のコンピュータに複数のドライブを接続し、各ドライブに全く同じデータを書き込む技術である。また、分散ファイルシステムは、コンピュータに3台以上のドライブを接続し、同一内容のファイルを常に2台以上のドライブ上に格納しておくシステムである。このように、同一内容のデータを複数のドライブに格納してファイルを多重化しておけば、一部のドライブが故障しても、残りのドライブに残ったファイルを用いて業務やファイルの復旧が可能である。
【0015】
しかし、ファイルの多重化にも次のような問題点が残る。その問題点は、複数のドライブでデータが「書きかけ」の状態が同時に発生し得ることである。なぜならば、従来は、複数のドライブへの書き込みが同時に起こり得たからである。また、従来、ドライブのブロックを更新するバッファブロックの単位は、ドライブのファイルへの操作の単位とは無関係に行われていたからである。
【0016】
例えば、単一の操作で、2つのドライブにおいて、それぞれ2つずつのバッファブロックを操作する場合、双方のドライブで1つのブロックのみが更新され、他方のブロックが更新されていない状態がしばしば発生した。特に不運な状態は、同じファイルがある全てのドライブにおいて「書きかけ」での故障が起きることである。この場合は、同一内容の複数のファイル全てが失われる。このため、全てのファイルの喪失の危険性をなくし、ファイルシステムの信頼性を向上させることが必要であった。
【0017】
本発明は、上記のような従来技術の問題点を解決するために提案されたものであり、その目的は、信頼性の高いファイルシステムを提供することである。さらに具体的な目的は、「書きかけ」によるブロック間の矛盾が生じにくいファイルシステムを提供することである。また、他の具体的な目的は、ドライブの故障の場合でも、同一内容の複数のファイルのうち少なくとも1つは失われないファイルシステムを提供することである。
【0018】
また、本発明の他の目的は、効率的にデータを処理するファイルシステムを提供することである。また、本発明の他の目的は、単純な構成のファイルシステムを提供することである。また、本発明の他の目的は、故障の影響が局限され他の部分に及びにくいファイルシステムを提供することである。また、本発明の他の目的は、信頼性が高く、かつ、従来のファイルシステムに導入が容易なファイルシステムを提供することである。
【0019】
【課題を解決するための手段】
上記の目的を達成するため、請求項1のファイルシステムは、不揮発性の記憶装置のドライブを複数有し、各ドライブの各々には、各ドライブの記録媒体上にアクセス単位である複数のブロックと、揮発性メモリ上のバッファに前記各ブロックに書き込むべきデータであるバッファブロックを一時的に格納するバッファ手段と、バッファブロックによる記録媒体の更新の必要性を判断する判断手段と、前記更新が必要と判断されたときに、全てのバッファブロックによってドライブのブロックを連続して更新する更新手段と、各ドライブにおける前記更新の時間的重複を回避して更新を逐次化する逐次化手段を有することを特徴とする。
【0020】
請求項2のファイルシステムは、前記逐次化手段は、一のドライブにおいて前記更新をしようとする際に他の更新中のドライブが存在するか否かを調査し、他の更新中のドライブが存在する場合は前記一のドライブにおける更新を抑止し、他の更新中のドライブが存在しない場合は前記一のドライブにおける更新を行うように構成されたことを特徴とする。
請求項3のファイルシステムは、前記逐次化手段は、更新中のドライブが存在した場合は所定時間待機後に再度調査を行い、更新中のドライブが存在しなくなった場合に更新を行うように構成されたことを特徴とする。
請求項4のファイルシステムは、前記逐次化手段は、各ドライブの状態を示すフラグをドライブの状態に応じて「更新中」、「調査中」及びそれ以外の状態にセットし、更新しようとするときに他のドライブのフラグを調査するように構成されたことを特徴とする。
請求項5のファイルシステムは、前記逐次化手段は、各ドライブの各々に個別に設けられたことを特徴とする。
【0021】
請求項6のファイルシステムは、前記各逐次化手段は、通信回線を経由して他のドライブの状態に関する情報を収集することによって前記調査を行うように構成されたことを特徴とする。
請求項7のファイルシステムは、前記逐次化手段は、各ドライブのフラグを他の全てのドライブに控えとして転送・コピーし、他のドライブではこの控えのフラグを参照することによって前記調査を行うように構成されたことを特徴とする。
請求項8のファイルシステムは、前記逐次化手段は、各ドライブの更新を所定のクロックに基づいて所定の各時間的サイクル内に制限することによって前記逐次化を行うように構成されたことを特徴とする。
請求項9のファイルシステムは、複数のドライブを有し、各ファイルが複数のドライブ 上に記録されたことを特徴とする。
【0022】
請求項10のファイルシステムは、不揮発性の記憶装置のドライブを複数有し、各ドライブの各々は、各ドライブの記録媒体上にアクセス単位である複数のブロックと、揮発性メモリ上のバッファに前記各ブロックに書き込むべきデータであるバッファブロックを、前記ドライブへのブロックの更新を要求する単一のデータ書き込み操作が発生する都度、その単一のデータ書き込み操作ごとに、前記各ブロックに書き込むべきデータであるバッファブロックを揮発性メモリ上のバッファに対して一時的に格納するバッファ手段と、バッファブロックによる記録媒体の更新の必要性を判断する判断手段と、前記判断手段によって更新が必要と判断されたときに、少なくとも前記単一のデータ書き込み操作の対象となるすべてのバッファブロックによってドライブのブロックを連続して更新する更新手段と、各ドライブにおける前記更新の時間的重複を回避して更新を逐次化する逐次化手段を有することを特徴とする。
【0023】
請求項11のファイルシステムは、前記バッファ手段は、前記発生した単一のデータ書き込み操作とこの書き込み操作の対象であるすべてのバッファブロックの対応付けを行う識別情報と共に、前記バッファブロックをバッファに対して一時的に格納するものであり、前記更新手段は、前記判断手段によって更新が必要と判断されたときに、前記識別情報に基づいて、単一のデータ書き込み操作に対応する全てのバッファブロックを単位として前記更新を行うように構成されたことを特徴とする。
請求項12のファイルシステムは、前記更新手段は、複数のデータ書き込み操作の対象に同一のバッファブロックが含まれる場合、それら複数のデータ書き込み操作に係る全てのバッファブロックを連続して更新するように構成されたことを特徴とする。
【0024】
請求項13のファイルシステムは、前記逐次化手段は、一のドライブにおいて前記更新をしようとする際に他の更新中のドライブが存在するか否かを調査し、他の更新中のドライブが存在する場合は前記一のドライブにおける更新を抑止し、他の更新中のドライブが存在しない場合は前記一のドライブにおける更新を行うように構成されたことを特徴とする。
請求項14のファイルシステムは、前記逐次化手段は、更新中のドライブが存在した場合は所定時間待機後に再度調査を行い、更新中のドライブが存在しなくなった場合に更新を行うように構成されたことを特徴とする。
請求項15のファイルシステムは、前記逐次化手段は、各ドライブの状態を示すフラグをドライブの状態に応じて「更新中」、「調査中」及びそれ以外の状態にセットし、更新しようとするときに他のドライブのフラグを調査するように構成されたことを特徴とする。
【0025】
請求項16のファイルシステムは、前記逐次化手段は、各ドライブの各々に個別に設けられたことを特徴とする。
請求項17のファイルシステムは、前記各逐次化手段は、通信回線を経由して他のドライブの状態に関する情報を収集することによって前記調査を行うように構成されたことを特徴とする。
請求項18のファイルシステムは、前記逐次化手段は、各ドライブのフラグを他の全てのドライブに控えとして転送・コピーし、他のドライブではこの控えのフラグを参照することによって前記調査を行うように構成されたことを特徴とする。
請求項19のファイルシステムは、前記逐次化手段は、各ドライブの更新を所定のクロックに基づいて所定の各時間的サイクル内に制限することによって前記逐次化を行うように構成されたことを特徴とする。
請求項20のファイルシステムは、複数のドライブを有し、各ファイルが複数のドライブ上に記録されたことを特徴とする。
【0026】
【作用】
請求項1,10の発明では、媒体の更新の際に、全てのバッファブロックによる更新が連続して行われるので、「書きかけ」の状態が更新最中のみに限定され、更新と更新の間にはファイルのブロック間の不整合が発生しない。このため、更新中以外の瞬間にドライブが故障してもファイル内の各ブロック間の整合性は失われない。また、請求項1の発明では、バッファ上の更新を全てのバッファブロックによって行うので、操作ごとのバッファブロックを峻別して扱う繁雑な処理が不要になる。また、全てのバッファブロックによる更新を一度に行うことから、更新をCPUの負荷が低い時に行っておけば、CPUの負荷が高いときに更新が必要となる可能性を低減させることができる。さらに、逐次化手段が更新のタイミングをずらすので、複数のドライブで「書きかけ」の状態が同時に発生することがない。このため、複数のドライブのデータが同時に失われることがなく、少なくとも1つのドライブにデータが残る。
【0027】
請求項2,13の発明では、逐次化手段が、更新ごとに毎回調査し他の更新中のドライブを検出することによって更新の時間的重複を避けるので、確実な逐次化を行うことができる。また、請求項4の発明は更新開始の制御を逐次化手段に与えることによって実現でき、更新自体を行うハードウェアや手順は従来通りのものが利用できるので従来の設備が有効活用できる。
【0028】
請求項3,14の発明では、逐次化手段が所定時間待機することによって逐次化を実現するので、更新のタイミングを割り振るスーパーバイザは不必要である。
【0029】
請求項4,15の発明では、各ドライブのハードウェアが異なっても逐次化手段は他のドライブのフラグさえ参照すれば更新中や調査中のドライブを検出することができる。また、各ドライブに逐次化手段を備える場合は更新しようとする側がフラグを参照する。このため、各ドライブを制御する上位のスーパーバイザを備える必要がない。
【0030】
請求項5,16の発明では、逐次化手段が各ドライブに分散しているので、故障したドライブがあっても他のドライブは影響を受けない。また、逐次化手段がドライブを制御する上位のスーパーバイザとして構成されている場合は逐次化手段の故障によって各ドライブでの処理が停止するが、請求項8の発明によれば、このような停止を回避することができる。
【0031】
請求項6,17の発明では、通信回線さえあれば逐次化手段がこの通信回線を用いて調査を行うので、フラグやスーパーバイザは不要となる。
【0032】
請求項7,18の発明では、各ドライブの逐次化手段は、調査の度に他のドライブの状態や他のドライブに設けられたフラグを通信回線で参照する必要がなくなるので、更新時の処理が高速化される。
請求項8,19の発明では、各ドライブでの更新の機会が所定のサイクルで確実に与えられ、特定のドライブでの更新が他のドライブでの更新の連続によって遅延する場合がなくなる。
【0033】
請求項9,20の発明は、いわゆる分散ファイルシステムであり、この発明では、通常、各ドライブごとにどのファイルが存在するかが異なる。このため、各ドライブのバッファが一杯になるタイミングが分散し、ドライブ更新のための待ち時間が減少する。すなわち、ミラーリングのように、全てのドライブの内容が同一の場合は、複数のドライブに対 する書き込みのタイミングが時間的に競合するので、無駄な待ち時間が発生するが、本発明ではそのような待ち時間の発生が減少する。
【0034】
請求項11の発明では、各操作とバッファブロックについて、コード番号のような識別情報を記録しておくことによって容易に対応関係を特定できるので、特殊なデータ構造を用いずに、単純な構成で操作単位の更新が実現できる。
【0035】
請求項12の発明では、複数の操作が同一のブロックを対象とした場合、そのうち一部の操作の内容のみによって当該ブロックが更新されることがないので、他の操作の対象としてのブロック間の整合性を喪失することがない。
【0036】
【実施例】
次に、本発明の実施例について図面に従って具体的に説明する。なお、後述する実施例はコンピュータ上に実現され、実施例の各機能は所定の手順(プログラム)がこのコンピュータを制御することで実現される。
【0037】
本明細書における各「手段」は実施例の各機能に対応する概念的なもので、必ずしも特定のハードウェアやソフトウェア・ルーチンに1対1には対応しない。同一のハードウェア要素が場合によって異なった手段を構成する。例えば、コンピュータはある命令を実行するときにある手段となり別の命令を実行するときは別の手段となりうる。また、一つの手段がわずか1命令によって実現される場合もあれば多数の命令によって実現される場合もある。
【0038】
したがって、本明細書では、以下、実施例の各機能を有する仮想的回路ブロック(手段)を想定して実施例を説明する。但し、コンピュータの使用は一例であり、本発明の機能の全部又は一部は、可能ならば、カスタムチップ(専用の集積回路)のような電子回路上に実現してもよい。
【0039】
実施例に用いられるコンピュータは、一般には、CPU(中央演算処理装置)と、RAM(随時書込読出型記憶素子)からなる主記憶装置とを有する。また、前記コンピュータの規模は自由であり、マイクロコンピュータ・パーソナルコンピュータ・スモールコンピュータ・ワークステーション・メインフレームなど、いかなる規模のものを用いてもよい。
【0040】
また、前記コンピュータのハードウェアは、典型的には、キーボードやマウスなどの入力装置と、ハードディスク装置などの外部記憶装置と、CRT表示装置やプリンタ印字装置などの出力装置と、必要な入出力制御回路を含む。
【0041】
但し、前記コンピュータのハードウェア構成は自由であり、本発明が実施できる限り、上記の構成要素の一部を追加・変更・除外してもよい。例えば、実施例は、複数のコンピュータを接続したコンピュータネットワーク上に実現してもよい。また、CPUの種類は自由であり、CPUを複数同時に用いたり、単一のCPUをタイムシェアリング(時分割)で使用し、複数の処理を同時平行的に行ってもよい。
【0042】
また、他の入力装置(例えば、タッチパネル・ライトペン・トラックボールなどのポインティングデバイスや、デジタイザ・イメージ読取装置やビデオカメラなどの画像入力装置・音声識別装置・各種センサなど)を用いてもよい。また、他の外部記憶装置(例えば、フロッピーディスク装置・RAMカード装置・磁気テープ装置・光学ディスク装置・光磁気ディスク装置・バブルメモリ装置・フラッシュメモリなど)を用いてもよい。また、他の出力装置(例えば、液晶表示装置・プラズマディスプレイ装置・ビデオプロジェクター・LED表示装置・音響発生回路・音声合成回路など)を用いてもよい。
【0043】
また、前記コンピュータにおいて実施例を実現するためのソフトウェアの構成としては、典型的には、実施例の各機能を実現するためのアプリケーションプログラムが、OS(オペレーティングシステム)上で実行される態様が考えられる。また、実施例を実現するためのプログラムの態様としては、典型的には、高級言語やアセンブラからコンパイル(翻訳)された機械語が考えられる。但し、前記コンピュータのソフトウェア構成も自由であり、本発明が実施できる限り、ソフトウェア構成を変更してもよい。例えば、必ずしもOSを用いる必要はなく、また、プログラムの表現形式も自由であり、BASICのようなインタプリタ(逐次解釈実行型)言語を用いてもよい。
【0044】
また、プログラムの格納態様も自由であり、ROM(読出し専用メモリ)に格納しておいてもよく、また、ハードディスク装置のような外部記憶装置に格納しておき、コンピュータの起動時や処理の開始時に主メモリ上にロード(読み込み)してもよい。また、プログラムを複数の部分に分割して外部記憶装置に格納しておき、処理内容に応じて必要なモジュールのみを随時主メモリ上にロード(読み込み)してもよい。さらに、プログラムの部分ごとに異なった態様で格納してもよい。
【0045】
また、本実施例における各手順の各ステップは、その性質に反しない限り、実行順序を変更し、複数同時に実行し、また、実行ごとに異なった順序で実行してもよい。このような順序の変更は、例えば、ユーザが実行可能な処理を選択するなどメニュー形式のインターフェース手法によって実現することができる。
【0046】
また、本明細書における「入力」は、本来の情報の入力のみならず、情報の入力と密接に関連する他の処理を含む。このような処理は、例えば、入力内容のエコーバックや修正・編集である。また、本明細書における「出力」は、本来の情報の出力のみならず、情報の出力と密接に関連する他の処理を含む。このような処理は、例えば、出力すべき範囲の入力や、画面スクロールの指示である。なお、対話的入出力手順によって入力と出力を一体的操作によって実現してもよく、このような一体的操作によって、選択・指定・特定などの処理を行ってもよい。
【0047】
また、本明細書におけるデータ(情報)やデータの格納手段は前記コンピュータ上においていかなる態様で存在してもよい。例えば、データのハードウェア上の所在部分は、主記憶装置・外部記憶装置・CPUのレジスタやキャッシュメモリなどいかなる部分でもよい。また、データの保持態様も自由である。例えば、データは、ファイル形式で保持されるのみならず、メモリやディスクなどの記憶装置を物理的アドレスで直接アクセスすることによって実現してもよい。また、データの表現形式も自由で、例えば、文字列を表すコードの単位は、文字単位でも単語単位でもよい。また、データは必要とされる一定時間だけ保持されれば十分で、その後消滅してもよく、保持時間の長短は自由である。また、辞書データのように当面変更されない情報は、ROMに格納してもよい。
【0048】
また、本明細書において、特定の情報への言及は確認的で、言及されない情報の存在を否定するものではない。すなわち、本発明の動作では、動作に必要な一般的な情報、例えば、各種ポインタ、カウンタ、フラグ、パラメータ、バッファなどが適宜用いられる。
【0049】
実施例の各部分が処理に要する情報は、特に記載がない場合、当該情報を保持している他の部分から獲得される。このような情報の獲得は、例えば、当該情報を格納している変数やメモリをアクセスすることによって実現することができる。なお、情報の消去・抹消は、当該情報の内容自体を必ずしも記憶領域から現実に削除せず、消去を表すフラグを設定するなど、情報の意味付けの変更によって行うことができる。
【0050】
1.第1実施例の構成
図1は第1実施例の構成要素を示す構成図である。この場合、図1に示すシステムは、複数のファイル記憶装置1S,2S,…,nS(nは2以上の任意の整数)と、これらの複数のファイル記憶装置1S,2S,…,nSを連結する共通のシステムバス10とによって構成されている。なお、各ファイル記憶装置1S,2S,…,nSは、請求の範囲にいうドライブに相当する。
【0051】
ファイル記憶装置1Sは、フラッシュ逐次化手段1A(請求の範囲にいう逐次化手段に相当する)、フラッシュ状態フラグ1B(請求の範囲にいうフラグに相当する)、バッファ管理手段(バッファフラッシュ手段)1C、ディスクバッファ1D、およびディスク1Eを有する。なお、ディスク1Eは、請求の範囲にいう記録媒体に相当する。また、バッファ管理手段1C及びディスクバッファ2Dは、請求の範囲にいうバッファ手段を構成する。また、バッファ管理手段1Cは、請求の範囲にいう判断手段及び更新手段としての役割も果たす。なお、本実施例において「フラッシュ」とは、バッファ上の全てのブロックによってドライブのブロックを更新する処理である。
【0052】
このうち、フラッシュ逐次化手段1Aは、バッファ管理手段1Cからのフラッシュ開始要求に応答して、フラッシュ状態フラグ1Bを「調査中」にし、他のファイル記憶装置のフラッシュ状態フラグを調べる。そして、このフラッシュ逐次化手段1Aは、他のファイル記憶装置中に「調査中」や「実行中」のフラグがない場合には、フラッシュ状態フラグ1Bを「更新中(実行中)」にし、要求元のバッファ管理手段1Cにフラッシュ開始許可を返す。また、フラッシュ状態フラグ1Bは、ファイル記憶装置1Sのフラッシュ状態を示すフラグであり、前述のように、フラッシュ逐次化手段1Aによる調査時またはフラッシュ管理手段1Cによるフラッシュ処理時には、フラッシュ逐次化手段1Aによって「調査中」または「更新中(実行中)」とされ、それ以外の場合には「通常」とされる。
【0053】
一方、バッファ管理手段1Cは、ファイル記憶装置1Sに対する外部からの操作要求に応答して、フラッシュ逐次化手段1Aにフラッシュ開始要求を送る。そして、このバッファ管理手段1Cは、前述のように、フラッシュ逐次化手段1Aからフラッシュ開始許可を受け取ると、それに応答して、ディスクバッファ1D内の将来的に更新必要性のある全データにより、ディスク1Eを更新する。
【0054】
次に、ファイル記憶装置2Sは、フラッシュ逐次化手段2A、フラッシュ状態フラグ2B、バッファ管理手段(バッファフラッシュ手段)2C、ディスクバッファ2D、およびディスク2Eを有する。これらの構成要素2A〜2Eも、ファイル記憶装置1Sの構成要素1A〜1Eと全く同様に構成されている。同様に、第n番目のファイル記憶装置nSは、フラッシュ逐次化手段nA、フラッシュ状態フラグnB、バッファ管理手段(バッファフラッシュ手段)nC、ディスクバッファnD、およびディスクnEを有し、これらの構成要素nA〜nEも、ファイル記憶装置1Sの構成要素1A〜1Eと全く同様に構成されている。
【0055】
なお、図2は図1のシステムの具体的な構成の一例を示す概念図であり、ファイル記憶装置1Sは、CPU(1F)、ROM(1G)、RAM(1H)、SCSI(1I)、ディスク1E、およびローカルバス1Jによって構成されており、ROM(1G)およびRAM(1H)内に、バッファ管理手段1C、フラッシュ逐次化手段1A、フラッシュ状態フラグ1B、およびディスクバッファ1Dが構成されている。同様に、ファイル記憶装置2Sは、CPU(2F)、ROM(2G)、RAM(2H)、SCSI規格インタフェース回路(2I)、ディスク2E、およびローカルバス2Jによって構成されており、ROM(2G)およびRAM(2H)内に、バッファ管理手段2C、フラッシュ逐次化手段2A、フラッシュ状態フラグ2B、およびディスクバッファ2Dが構成されている。
【0056】
なお、第1実施例は、3つ以上のドライブを有し、各ファイルが2つ以上のドライブ上に記録された、いわゆる分散ファイルシステムであり、この発明では、通常、各ドライブごとにどのファイルが存在するかが異なる。このため、各ドライブのバッファが一杯になるタイミングが分散し、ドライブ更新のための待ち時間が減少する。ミラーリングのように、全てのドライブの内容が同一のミラーリングにおいて逐次化を行う場合は、複数のドライブに対する書き込みの必要が常に同時に発生するので、無駄な待ち時間が発生する。
【0057】
また、第1実施例では、前記各ドライブがそれぞれ別個独立のディスク装置であり、各媒体が各ディスク装置の記録ディスクである。このため、第1実施例では、単一のディスクを論理的な複数のドライブとみなすパーティションと比べ、単一のドライブの故障によって複数のファイルが失われる可能性が除去できる。
【0058】
逆に、前記各ドライブは、単一のディスク装置内に設けられた各パーティションでもよい。このようにすれば、複数のドライブが不要であるから優れたファイルシステムが単純なハードウェア構成で廉価に実現できる。
【0059】
2.第1実施例の作用及び効果
以上のような構成を有する本実施例の分散ファイルシステムの作用について、図3および図4のフローチャートを参照して以下に説明する。この場合、図3は、バッファ管理手段がブロックの書き込み要求(更新要求)を受け取った場合の処理手順を示すフローチャート、図4は、フラッシュ逐次化手段がフラッシュ開始要求を受け取った場合の処理手順を示すフローチャートである。
【0060】
なお、ここでは、一例として、図1に示すファイル記憶装置1Sに対して、図5に示すようなブロックの更新を要求する操作要求が与えられた場合の例を説明する。そして、説明の便宜上、初期状態において、全てのファイル記憶装置1S〜nSの全てのディスク1E〜nEは、データの整合性が取れており、全てのファイル記憶装置1S〜nSのフラッシュ状態フラグの全てのフラッシュ状態フラグ1B〜nBは、「通常」であるとする。また、ファイル記憶装置1Sのディスクバッファ1Dは、図6に示すように、その全領域が「空き」であるとする。
【0061】
2−1.他のファイル記憶装置が全て「通常」である場合の処理
まず、バッファ管理手段1Cは、図5に示すブロック1,2,3の更新を必要とする操作1の要求に応答して、図3に示すように、ディスクバッファ1D内に、書き込みブロック数である3ブロック分の「空き」領域または更新必要性「無」の領域が存在するか否かを判断する(ステップ301)。この場合、図6に示すように、ディスクバッファ1D内には3ブロック分の「空き」領域があるため、この3ブロック分の「空き」領域の各々に、書き込みブロック1,2,3のブロックアドレスとデータ内容を格納し、更新必要性を「有」にする(ステップ306)。その結果、ディスクバッファ1Dの内容は、図7に示すようになる。この処理の途中では、ディスク1Eの更新は行われないので、ディスク1E内のデータの整合性は依然として保たれている。なお、ディスクバッファ内のブロックごとのデータ内容が請求の範囲にいうバッファブロックに対応する。
【0062】
次に、バッファ管理手段1Cは、図5に示すブロック4,5,6の更新を必要とする操作2の要求に応答して、図3に示すように、ディスクバッファ1D内に、書き込みブロック数である3ブロック分の「空き」領域または更新必要性「無」の領域が存在するか否かを判断する(ステップ301)。この場合、図7に示すように、ディスクバッファ1D内には3ブロック分の「空き」領域があるため、この3ブロック分の「空き」領域の各々に、書き込みブロック4,5,6のブロックアドレスとデータ内容を格納し、更新必要性を「有」にする(ステップ306)。その結果、ディスクバッファ1Dの内容は、図8に示すようになる。この処理の途中では、ディスク1Eの更新は行われないので、ディスク1E内のデータの整合性は依然として保たれている。
【0063】
続いて、バッファ管理手段1Cは、図5に示すブロック7,8,9の更新を必要とする操作3の要求に応答して、図3に示すように、ディスクバッファ1D内に、書き込みブロック数である3ブロック分の「空き」領域または更新必要性「無」の領域が存在するか否かを判断する(ステップ301)。この場合、図8に示すように、ディスクバッファ1D内には3ブロック分の「空き」領域または更新必要性「無」の領域がないため、バッファ管理手段1Cは、フラッシュ逐次化手段1Aにフラッシュ開始要求を送り(ステップ302)、フラッシュ逐次化手段1Aからのフラッシュ開始許可を待つ(ステップ303)。
【0064】
また、フラッシュ逐次化手段1Aは、バッファ管理手段1Cからのフラッシュ開始要求に応答して、図4に示すように、フラッシュ状態フラグ1Bを「調査中」にし(ステップ401)、他のファイル記憶装置2S,…,nSのフラッシュ状態フラグ2B,…,nBを調べ(ステップ402)、「調査中」または「更新中(実行中)」のファイル記憶装置が存在するか否かを判断する(ステップ403)。この時、他のいずれのファイル記憶装置2S,…,nSも「調査中」または「更新中(実行中)」でなければ、フラッシュ逐次化手段1Aは、フラッシュ状態フラグ1Bを「更新中(実行中)」にして、要求元のバッファ管理手段1Cにフラッシュ開始許可を返し(ステップ405)、バッファ管理手段1Cからのフラッシュ終了通知を待つ(ステップ406)。
【0065】
なお、ここまでの処理で、ファイル記憶装置1Sのディスク1Eは初期状態から全く更新されていないため、このディスク1E上のデータの整合性は依然として保たれたままである。
【0066】
さらに、バッファ管理手段1Cは、フラッシュ逐次化手段1Aからのフラッシュ開始許可に応答して、ディスクバッファ1D内の更新必要性「有」の全領域の全データにより、ディスクバッファ1Dのフラッシュ処理を行う(ステップ304)。すなわち、ここでは、更新必要性「有」の領域に格納されたブロック1,2,3,4,5,6のブロックアドレスとデータ内容によって、ディスク1Eを更新して、これらの6ブロック分の領域をディスク更新必要性「無」に変更する。
【0067】
このフラッシュ処理の途中において、ディスク1Eのブロック1,2,3の一部、またはブロック4,5,6の一部のみを更新した状態では、1つの操作で更新しなくてはならない複数のブロックの全てを更新した状態でないため、この時点ではディスク1E上のデータの整合性は取られていないが、この6ブロック分の全データによってディスク1Eの対象ブロック1,2,3,4,5,6を更新し終わった時点では、再びディスク1E上のデータの整合性が取られている。このフラッシュ処理の後、バッファ管理手段1Cは、フラッシュ逐次化手段1Aにフラッシュ終了通知を送る(ステップ305)。そして、フラッシュ逐次化手段1Aは、バッファ管理手段1Cからのフラッシュ終了通知を受け取ると、図4に示すように、フラッシュ状態フラグ1Bを「通常」に戻す(ステップ407)。
【0068】
バッファ管理手段1Cは引き続き、ディスクバッファ1Dの「空き」または更新必要性が「無」の領域の3ブロック分の領域の各々に、書き込みブロック7,8,9のブロックアドレスとデータ内容を格納し、更新必要性を「有」にする(ステップ306)。その結果、ディスクバッファ1Dの内容は、図9に示すようになる。しかし、この場合にはディスク1Eは更新されないため、依然としてディスク1E上のデータの整合性は保たれている。
【0069】
このように、本実施例のファイル記憶装置1Sにおいて、ディスク1E上のデータの整合性が崩れるのは、ディスクバッファ1Dのフラッシュ処理を行っている時、すなわち、フラッシュ状態フラグ1Bが「更新中(実行中)」になっている時のみである。
【0070】
2−2.他のファイル記憶装置のいずれかが「調査中」または「更新中(実行中)」である場合の処理
一方、例えば、ファイル記憶装置2Sがフラッシュ処理を行っている最中には、このファイル記憶装置2Sのフラッシュ状態フラグ2Bは「更新中(実行中)」になる。この状態で、ファイル記憶装置1Sのフラッシュ逐次化手段1Aがフラッシュ開始要求を受け取った場合には、このフラッシュ逐次化手段1Aは、図4に示すように、フラッシュ状態フラグ1Bを「調査中」にし(ステップ401)、他のファイル記憶装置2S,…,nSのフラッシュ状態フラグ2B,…,nBを調べ(ステップ402)、「調査中」または「更新中(実行中)」のファイル記憶装置が存在すると判断する(ステップ403)。続いて、フラッシュ逐次化手段1Aは、フラッシュ状態フラグ1Bを「通常」にして一定時間待機する(ステップ404)。
【0071】
そして、一定時間後、このフラッシュ逐次化手段1Aは、再び、図4に示すように、フラッシュ状態フラグ1Bを「調査中」にし(ステップ401)、他のファイル記憶装置2S,…,nSのフラッシュ状態フラグ2B,…,nBを調べ(ステップ402)、「調査中」または「更新中(実行中)」のファイル記憶装置があるか否かを判断する(ステップ403)。この場合、さらにファイル記憶装置2Sが「更新中(実行中)」であれば、フラッシュ逐次化手段1Aは、フラッシュ状態フラグ1Bを「通常」にして、再び、一定時間待機することになる。
【0072】
これに対して、フラッシュ逐次化手段1Aが待機している間に、ファイル記憶装置2Aでフラッシュ処理が終了し、フラッシュ状態フラグ2Bが「通常」に戻り、「調査中」または「更新中(実行中)」のファイル記憶装置がないと判断した場合には、フラッシュ逐次化手段1Aは、フラッシュ状態フラグ1Bを「更新中(実行中)」にして、要求元のバッファ管理手段1Cにフラッシュ開始許可を返し(ステップ405)、バッファ管理手段1Cからのフラッシュ終了通知を待つ(ステップ406)。最終的に、このフラッシュ逐次化手段1Aは、バッファ管理手段1Cからのフラッシュ終了通知を受け取った時点で、フラッシュ状態フラグ1Bを「通常」に戻す(ステップ407)。
【0073】
このように、第1実施例において、1つのファイル記憶装置1Sでフラッシュ処理を行おうとする場合には、フラッシュ逐次化手段1Aの作用により、他のファイル記憶装置が、フラッシュ処理のための「調査中」またはフラッシュ処理の「更新中(実行中)」である場合に、バッファ管理手段1Cによるフラッシュ処理の実行を一定時間の間制止し、「調査中」または「更新中(実行中)」のファイル記憶装置がなくなった時点で初めてバッファ管理手段1Cにフラッシュ開始許可を返して、ディスクバッファ1Dのフラッシュ処理を行わせることになる。したがって、同時に2つ以上のファイル記憶装置がフラッシュ処理を行うことがない。
【0074】
以上説明したように、第1実施例において、ディスク1E上のデータの整合性が崩れるのは、ディスクバッファ1Dのフラッシュ処理を行っている時、すなわち、フラッシュ状態フラグ1Bが「更新中(実行中)」になっている時のみであり、また、同時に2つ以上のファイル記憶装置がフラッシュ処理を行うことがないため、同時に2つ以上のファイル記憶装置がディスク上におけるデータの整合性を失ってしまうことはない。したがって、仮に、複数のあるいは全部のファイル記憶装置が同時に障害によってダウンした場合であっても、2重以上に多重化されて複数のファイル記憶装置に保存されたファイルのデータは、少なくとも1つのファイル記憶装置に確実に保存されていることになる。
【0075】
特に、第1実施例では、逐次化手段が、更新ごとに毎回他の更新中のドライブを検出することによって更新の時間的重複を避けるので、確実な逐次化を行うことができる。また、第1実施例では、更新開始の制御を逐次化手段に与えることによって信頼性の高いファイルシステムを実現でき、更新自体を行うハードウェアや手順は従来通りのものが利用できるので従来の設備が有効活用できる。すなわち、従来のファイルシステムに本発明を適用する際、ハードウェアやBIOS(Basic Input/Output System) などディスクにアクセスするための基本的な制御手順のみ変更すれば、ファイルシステムの論理的制御手順を変える必要がない(図10)。
【0076】
3.第2実施例
第2実施例では、前記バッファ手段は、操作と、各操作が対象とする各バッファブロックを識別情報を用いて記録するように構成され、前記更新手段は、前記識別情報に基づいて、単一の操作に対応する全てのバッファブロックを単位として前記更新を行うように構成されている。また、第2実施例では、前記更新手段は、複数の操作の対象に同一のバッファブロックが含まれる場合、それら複数の操作に係る全てのバッファブロックを連続して更新するように構成されている。例えば、操作内容をバッファに記録するごとに、操作番号と対象バッファブロック番号を対照表(図11)に記録する。また、ディスクバッファの所定の領域にも、各バッファブロックを操作対象とした操作番号を記録する。バッファブロック毎の操作番号を記録する(図12)。例えば、図11,図12では、操作1でブロック1,2が、操作2でブロック3,4が、操作3でブロック3,5が操作されている。この場合、更新はバッファブロック1,2を一体に行うほか、操作2,3に係るバッファブロック3,4,5を一体に行う。操作2に係るバッファブロック3,4のみを更新し、バッファブロック5を更新しない状態は、操作3に基づいてみれば「書きかけ」だからである。
【0077】
このような第2実施例では、各操作とバッファブロックについて、コード番号のような識別情報を記録しておくことによって容易に対応関係を特定できるので、特殊なデータ構造を用いずに、単純な構成で操作単位の更新が実現できる。
【0078】
また、第2実施例では、複数の操作が同一のブロックを対象とした場合、そのうち一部の操作の内容のみによって当該ブロックが更新されることがないので、他の操作の対象としてのブロック間の整合性を喪失することがない。
【0079】
4.他の実施例
なお、本発明は、前記実施例に限定されるものではなく、例えば、バッファフラッシュ手段およびフラッシュ逐次化手段の具体的な構成や処理の流れは、自由に変更可能である。また、これらの手段以外の各部の構成要素やファイル記憶装置全体の構成についても、同様に自由に変更可能であり、ファイル記憶装置の数も自由に選択可能である。
【0080】
例えば、バッファフラッシュを行う場合は、新たなデータを書き込む余地が不足した場合には限定されず、バッファフラッシュの命令がユーザ又はプログラムによって与えられたとき、媒体をドライブから取り外すための命令が与えられたとき、システムを停止しようとするときなど、自由に決定できる。
【0081】
また、例えば、前記各逐次化手段は、通信回線を経由して他のドライブの状態に関する情報を収集することによって前記調査を行うように構成してもよい(請求項6)。このような実施例では、通信回線さえあれば逐次化手段がこの通信回線を用いて調査を行うので、フラグやスーパーバイザは不要となる。
【0082】
また、例えば、前記逐次化手段は、各ドライブのフラグを他の全てのドライブに控えとして転送・コピーし、他のドライブではこの控えのフラグを参照することによって前記調査を行うように構成してもよい(請求項7)。このような実施例では、各ドライブの逐次化手段は、調査の度に他のドライブの状態や他のドライブに設けられたフラグを通信回線で参照する必要がなくなるので、更新時の処理が高速化される。上記のような通信やフラグの転送は、イーサネット及びMAPのようなLANを用いて行うこともできる。
【0083】
また、例えば、前記逐次化手段は、各ドライブの更新を所定のクロックに基づいて所定の各クロックサイクル内に制限することによって前記逐次化を行うように構成してもよい(請求項8)。このような実施例では、各ドライブでの更新の機会が所定のサイクルで確実に与えられ、特定のドライブでの更新が他のドライブでの更新の連続によって遅延する場合がなくなる。
【0084】
【発明の効果】
以上のように、本発明では、更新中以外の瞬間にドライブが故障してもファイル内の各ブロック間の整合性は失われないので、信頼性の高いファイルシステムを提供することができる。
【図面の簡単な説明】
【図1】本発明のファイルシステムの第1実施例の構成要素を示す構成図
【図2】図1のシステムの具体的な構成の一例を示す概念図
【図3】図1のバッファ管理手段がブロックの書き込み要求(更新要求)を受け取った場合の処理手順を示すフローチャート
【図4】図1のフラッシュ逐次化手段がフラッシュ開始要求を受け取った場合の処理手順を示すフローチャート
【図5】図1のファイル記憶装置1Sに対する操作要求の操作番号と更新対象ブロックアドレスを示す表
【図6】図1のディスクバッファ1Dの初期状態を示す表
【図7】図1のディスクバッファ1Dの操作1終了後の状態を示す表
【図8】図1のディスクバッファ1Dの操作2終了後の状態を示す表
【図9】図1のディスクバッファ1Dの操作3終了後の状態を示す表
【図10】分散ファイルシステムのソフトウェア構成を示す概念図であり
【図11】第2実施例における操作履歴表
【図12】第2実施例におけるディスクバッファの内容
【符号の説明】
1S,2S…ファイル記憶装置
1A,2A…フラッシュ逐次化手段
1B,2B…フラッシュ状態フラグ
1C,2C…バッファ管理手段
1D,2D…ディスクバッファ
1E,2E…ディスク
10…システムバス
[0001]
[Industrial application fields]
The present invention relates to an improvement of a file system for storing data such as a file, and particularly relates to a file system having excellent reliability.
[0002]
[Prior art]
Most computers have an internal storage device and an external storage device. The internal storage device keeps information by continuous power supply from the outside. A typical internal storage device is a main memory composed of RAM. The external storage device has some kind of recording medium (for example, a magnetic disk or a magneto-optical disk) regardless of the principle or type. Regardless of whether the recording medium is detachable or not, a single external storage device is called a drive. A large number of blocks are usually formed on a drive medium. This block is a unit of access.
[0003]
For example, a standard floppy disk has two surfaces, each surface having 80 tracks arranged concentrically, and each track is divided into 16 sectors. Each sector or several consecutive sectors corresponds to the block. In the fixed disk device, the recording medium is a hard disk stacked in a cylindrical shape. For this reason, the fixed disk device has many surfaces. The term cylinder is used instead of truck.
[0004]
In most cases, a single operation that updates information on the disk updates multiple blocks on the media. The first reason is that the block size (eg 256 bytes) is usually much smaller than the amount of information in a single operation. For example, a document edited on a computer, which is only a few pages, is saved by spending dozens of blocks and sectors. The second reason is that data on a medium is generally accessed in file units, and file management information is divided (stored) like a FAT or a directory, which will be described later.
[0005]
The file system is a concept generically referring to an external storage device and a control procedure for accessing data in the external storage device in file units. The file system requires management information (for example, FAT (File Allocation Table) and directory). For this reason, when updating a file, it is necessary to update the FAT and the directory in addition to the data that is the contents of the file even if the file is extended by only one sector. As a result, often a single operation updates the contents of multiple blocks.
[0006]
In the file system, a buffer is usually used. The buffer is a predetermined area on the memory that temporarily stores data to be written to the medium. The buffer may be a main memory or may be provided on a drive driving sub-computer. For example, in a system in which a disk and a buffer are combined, the contents of the block to be changed are temporarily not stored in the disk but temporarily stored in the buffer when the data on the disk is changed. Block data written in the buffer (hereinafter referred to as “buffer block”) should be written to the medium at least before shutting down the system. If actual disk access is performed after such buffer blocks have accumulated to some extent, the number of disk accesses can be reduced and the processing can be made more efficient.
[0007]
If the buffer is full with data that has not yet been written to disk, and new data cannot be written to the buffer, the media is updated with the insufficient buffer blocks, and new data is written to the updated area of the buffer. .
[0008]
[Problems to be solved by the invention]
A file system using the above-mentioned buffer is common, but even when such a file system is used, in the past, as a hardware for realizing a single logical drive of a single computer, it is actually a single unit. Only drive of was connected. Computers with only a single drive often result in data loss due to drive failure. There are various drive failures such as power interruption, head crash, and control circuit failure. The most unfortunate consequence of a failure is that the failure occurs during data writing and the medium is in a so-called “write” state.
[0009]
Here, “write over” represents a state in which only a part of the plurality of blocks to be updated at the same time is updated, and the rest has old contents. For example, generally, data in a file and information on the FAT and directory of this file should not contradict each other. However, if a drive fails while any of these has not been updated, they will lose consistency with each other and file data will be lost or difficult to restore. As another example of “writing”, for example, in a state where only the FAT has been written to the disk and no directory has been written, inconsistency occurs in the management information itself. In addition, when a continuous block forms part of a single file, the content of one block is updated and the content of the next block remains old. is there. Naturally, the consistency between the old data and the new data is lost.
[0010]
Recovering file data that has lost consistency due to a mix of new and old content is much more difficult than recovering file data that remains entirely old. One cause of this difficulty is the difficulty in identifying the old and new parts. Another cause is destruction of data on the medium by a head that has malfunctioned (particularly when the drive is a magnetic disk). This is because the magnetic field for writing generated from the head is always improper from the moment of failure, or the head damages the magnetic surface. Furthermore, a situation may occur in which the entire file is lost due to the loss of the file management information.
[0011]
In particular, if the computer system file is unfortunately lost, the computer system cannot be started, and failure diagnosis and recovery itself are impossible.
[0012]
The tolerance for such data loss varies from field to field. For example, in the fields of form calculation, organization of experiment data, and document creation, it is convenient to redo old data. In such a field, fault tolerance is not so required. On the other hand, in fields such as large plant control, transportation system control, and bank account management, data is not allowed to disappear and cannot be redone. In the latter area, loss of data immediately leads to danger and disruption of rights and obligations, so fault tolerance is highly required.
[0013]
In recent years, with the downsizing of computer systems, various systems that were conventionally used only in fields where fault tolerance is not required are also used in fields where high fault tolerance is required. It has become like this. For example, a UNIX file system that is widely used in small computers is a file storage device that does not consider fault tolerance, but has come to be used in fields that require high fault tolerance. ing. For this reason, improvement in fault tolerance is an important issue.
[0014]
Typical techniques for preventing file loss and improving fault tolerance are mirroring and the distributed file system. Mirroring is a technology that connects multiple drives to a single computer and writes exactly the same data to each drive. The distributed file system is a system in which three or more drives are connected to a computer and files having the same contents are always stored on two or more drives. In this way, if files with the same contents are stored in multiple drives and the files are multiplexed, even if some of the drives fail, the files remaining on the remaining drives can be used to restore work and files. Is possible.
[0015]
However, the following problems remain in file multiplexing. The problem is that data can be “written” in a plurality of drives at the same time. This is because, conventionally, writing to a plurality of drives can occur simultaneously. This is because, conventionally, the unit of the buffer block for updating the drive block is performed regardless of the unit of operation for the file of the drive.
[0016]
For example, when operating two buffer blocks on two drives in a single operation, it often happens that only one block is updated on both drives and the other block is not updated. . A particularly unlucky condition is that a “write over” failure occurs on all drives with the same file. In this case, all of the plurality of files having the same contents are lost. For this reason, it is necessary to eliminate the risk of losing all files and improve the reliability of the file system.
[0017]
The present invention has been proposed in order to solve the above-described problems of the prior art, and an object of the present invention is to provide a highly reliable file system. A more specific object is to provide a file system in which inconsistencies between blocks due to “writing” are unlikely to occur. Another specific object is to provide a file system in which at least one of a plurality of files having the same contents is not lost even in the case of a drive failure.
[0018]
Another object of the present invention is to provide a file system that efficiently processes data. Another object of the present invention is to provide a file system having a simple configuration. Another object of the present invention is to provide a file system in which the influence of a failure is localized and hardly reaches other parts. Another object of the present invention is to provide a file system that is highly reliable and easy to introduce into a conventional file system.
[0019]
[Means for Solving the Problems]
In order to achieve the above object, the file system of claim 1 comprises:Each drive has a plurality of blocks as access units on the recording medium of each drive, and data to be written to each block in a buffer on the volatile memory. A buffer means for temporarily storing a buffer block; a judgment means for judging the necessity of updating the recording medium by the buffer block; and when the update is judged to be necessary, all the buffer blocks An update means for continuously updating and a serialization means for serializing the updates while avoiding temporal overlap of the updates in each drive are characterized.
[0020]
The file system according to claim 2, wherein when the serialization unit tries to perform the update in one drive, it checks whether another drive being updated exists, and another drive being updated exists. In this case, updating in the one drive is suppressed, and updating in the one drive is performed when there is no other drive being updated.
The file system according to claim 3 is configured such that, when there is a drive being updated, the serializing unit performs a check again after waiting for a predetermined time, and updates when the drive being updated does not exist. It is characterized by that.
In the file system according to claim 4, the serialization unit attempts to update by setting a flag indicating the state of each drive to “updating”, “under investigation”, and other states according to the state of the drive It is sometimes configured to check other drive flags.
The file system according to claim 5 is characterized in that the serializing means is provided individually for each drive.
[0021]
The file system according to claim 6 is characterized in that each of the serializing means is configured to perform the investigation by collecting information on the state of another drive via a communication line.
The file system according to claim 7, wherein the serializing unit transfers and copies the flag of each drive to all other drives as a copy, and the other drive refers to the copy flag to perform the investigation. It is characterized by being configured.
9. The file system according to claim 8, wherein the serializing means is configured to perform the serialization by limiting updating of each drive within a predetermined time cycle based on a predetermined clock. And
The file system according to claim 9 has a plurality of drives, and each file has a plurality of drives. It is recorded above.
[0022]
The file system according to claim 10 includes a plurality of non-volatile storage device drives, and each drive has a plurality of blocks as access units on a recording medium of each drive and a buffer on a volatile memory. Each time a single data write operation requiring a block update to the drive occurs, the buffer block, which is the data to be written to each block, is written to each block for each single data write operation. The buffer means for temporarily storing the buffer block in the buffer on the volatile memory, the judgment means for judging the necessity of updating the recording medium by the buffer block, and the judgment means judged that the update is necessary All buffer blocks subject to at least the single data write operation Therefore the updating means for updating successively a block of the drive, characterized by having a serialization means for serializing updates to avoid temporal overlap of the update in each drive.
[0023]
12. The file system according to claim 11, wherein the buffer means includes the identification information for associating the generated single data write operation with all the buffer blocks that are targets of the write operation, and the buffer block to the buffer. And the update means stores all buffer blocks corresponding to a single data write operation based on the identification information when the update is determined to be necessary by the determination means. The updating is performed as a unit.
The file system according to claim 12 is configured such that, when the same buffer block is included in a plurality of data write operation targets, the update unit continuously updates all the buffer blocks related to the plurality of data write operations. It is structured.
[0024]
The file system according to claim 13, wherein when the serialization means tries to perform the update in one drive, it checks whether another drive being updated exists, and another drive being updated exists. In this case, updating in the one drive is suppressed, and updating in the one drive is performed when there is no other drive being updated.
The file system according to claim 14 is configured such that the serializing means performs an investigation again after waiting for a predetermined time when there is a drive being updated, and updates when the drive being updated does not exist. It is characterized by that.
15. The file system according to claim 15, wherein the serialization means sets a flag indicating the state of each drive to “updating”, “investigation”, and other states according to the state of the drive, and tries to update it. It is sometimes configured to check other drive flags.
[0025]
The file system according to a sixteenth aspect is characterized in that the serializing means is individually provided for each drive.
The file system according to claim 17 is characterized in that each of the serializing means is configured to perform the investigation by collecting information on the state of another drive via a communication line.
The file system according to claim 18, wherein the serializing means transfers and copies the flag of each drive as a copy to all other drives, and the other drive refers to the copy flag to perform the investigation. It is characterized by being configured.
20. The file system according to claim 19, wherein the serializing means is configured to perform the serialization by limiting updating of each drive within a predetermined time cycle based on a predetermined clock. And
The file system according to claim 20 has a plurality of drives, and each file is recorded on the plurality of drives.
[0026]
[Action]
Claims 1 and 10In the present invention, when updating the medium, all the buffer blocks are continuously updated. Therefore, the state of “writing” is limited to only during the update, and a block of the file is updated between the updates. No inconsistency occurs. For this reason, even if the drive fails at an instant other than during the update, the consistency between the blocks in the file is not lost. According to the first aspect of the present invention, since updating on the buffer is performed by all the buffer blocks, a complicated process for distinguishing the buffer blocks for each operation becomes unnecessary. In addition, since all the buffer blocks are updated at one time, if the update is performed when the CPU load is low, the possibility that the update is necessary when the CPU load is high can be reduced. Furthermore, since the serialization means shifts the update timing, the “writing” state does not occur simultaneously in a plurality of drives. For this reason, data of a plurality of drives are not lost at the same time, and data remains in at least one drive.
[0027]
According to the second and thirteenth aspects of the present invention, the serialization means investigates every update and detects other drives that are being updated, thereby avoiding the time overlap of the updates, so that reliable serialization can be performed. Further, the invention of claim 4 can be realized by giving the control for starting the update to the serialization means, and the hardware and procedure for performing the update itself can be used, so that the conventional equipment can be used effectively.
[0028]
According to the third and fourteenth aspects of the present invention, since the serialization means realizes serialization by waiting for a predetermined time, a supervisor for allocating update timing is unnecessary.
[0029]
According to the fourth and fifteenth inventions, even if the hardware of each drive is different, the serializing means can detect the drive being updated or investigated as long as it refers to the flags of other drives. Further, when each drive is provided with serialization means, the side to be updated refers to the flag. For this reason, it is not necessary to provide an upper supervisor that controls each drive.
[0030]
According to the fifth and sixteenth aspects of the present invention, since the serializing means is distributed to each drive, even if there is a failed drive, other drives are not affected. Further, when the serializing means is configured as a superior supervisor for controlling the drive, the processing in each drive is stopped due to the failure of the serializing means. It can be avoided.
[0031]
According to the sixth and 17th aspects of the present invention, if there is only a communication line, the serialization means uses this communication line to conduct an investigation, so that no flag or supervisor is required.
[0032]
In the inventions of claims 7 and 18, the serializing means of each drive does not need to refer to the state of another drive or the flag provided in the other drive every time it is investigated, so the processing at the time of update Is faster.
In the inventions of claims 8 and 19, the update opportunity in each drive is surely given in a predetermined cycle, and the case where the update in a specific drive is delayed due to the continuation of the update in another drive is eliminated.
[0033]
The inventions of claims 9 and 20 are so-called distributed file systems. In the present invention, which file normally exists for each drive is different. For this reason, the timing at which the buffer of each drive becomes full is dispersed, and the waiting time for drive update is reduced. That is, if the contents of all drives are the same as in mirroring, Since the timing of writing to be competed in time, a wasteful waiting time occurs, but the occurrence of such a waiting time is reduced in the present invention.
[0034]
Claim 11In this invention, since the correspondence relationship can be easily specified by recording the identification information such as the code number for each operation and the buffer block, the operation unit can be determined with a simple configuration without using a special data structure. Update can be realized.
[0035]
Claim 12In this invention, when a plurality of operations are targeted for the same block, the block is not updated only by the contents of some of the operations. There is no loss.
[0036]
【Example】
Next, embodiments of the present invention will be specifically described with reference to the drawings. In addition, the Example mentioned later is implement | achieved on a computer, and each function of an Example is implement | achieved when a predetermined procedure (program) controls this computer.
[0037]
Each “means” in the present specification is a conceptual one corresponding to each function of the embodiment, and does not necessarily correspond to a specific hardware or software routine on a one-to-one basis. The same hardware element constitutes different means depending on the case. For example, a computer can be one means when executing a certain instruction and another means when executing another instruction. One means may be realized by only one instruction, or may be realized by a large number of instructions.
[0038]
Therefore, in the present specification, the embodiment will be described below assuming a virtual circuit block (means) having each function of the embodiment. However, the use of a computer is an example, and all or part of the functions of the present invention may be realized on an electronic circuit such as a custom chip (dedicated integrated circuit) if possible.
[0039]
The computer used in the embodiments generally includes a CPU (Central Processing Unit) and a main storage device including a RAM (A Read / Write memory element as needed). The scale of the computer is arbitrary, and any scale such as a microcomputer, personal computer, small computer, workstation, mainframe, etc. may be used.
[0040]
The computer hardware typically includes an input device such as a keyboard and a mouse, an external storage device such as a hard disk device, an output device such as a CRT display device and a printer printer, and necessary input / output control. Includes circuitry.
[0041]
However, the hardware configuration of the computer is free, and as long as the present invention can be implemented, some of the above components may be added, changed, or excluded. For example, the embodiment may be realized on a computer network in which a plurality of computers are connected. The type of CPU is arbitrary, and a plurality of CPUs may be used simultaneously, or a single CPU may be used for time sharing (time division) to perform a plurality of processes simultaneously.
[0042]
Other input devices (for example, a pointing device such as a touch panel, a light pen, and a trackball, an image input device such as a digitizer, an image reading device, and a video camera, a voice identification device, and various sensors) may be used. Other external storage devices (for example, floppy disk devices, RAM card devices, magnetic tape devices, optical disk devices, magneto-optical disk devices, bubble memory devices, flash memories, etc.) may be used. Further, other output devices (for example, a liquid crystal display device, a plasma display device, a video projector, an LED display device, a sound generation circuit, a voice synthesis circuit, etc.) may be used.
[0043]
Further, as a configuration of software for realizing the embodiment in the computer, typically, an aspect in which an application program for realizing each function of the embodiment is executed on an OS (operating system) is considered. It is done. Further, as a program mode for realizing the embodiment, typically, a machine language compiled (translated) from a high-level language or an assembler can be considered. However, the software configuration of the computer is also free, and the software configuration may be changed as long as the present invention can be implemented. For example, it is not always necessary to use the OS, the program expression format is also free, and an interpreter (sequential interpretation execution type) language such as BASIC may be used.
[0044]
The program can be stored in any manner, and may be stored in a ROM (read only memory), or stored in an external storage device such as a hard disk device, when the computer is started or processing is started. Sometimes it may be loaded into the main memory. Alternatively, the program may be divided into a plurality of parts and stored in an external storage device, and only necessary modules may be loaded (read) onto the main memory as needed according to the processing contents. Furthermore, each program part may be stored in a different manner.
[0045]
In addition, as long as each step of each procedure in the present embodiment is not contrary to its nature, the execution order may be changed, and a plurality of steps may be executed simultaneously, or may be executed in different orders for each execution. Such a change in the order can be realized by a menu-type interface method such as selecting a process executable by the user.
[0046]
Further, “input” in the present specification includes not only original information input but also other processing closely related to information input. Such processing is, for example, echo back of input content or correction / editing. In addition, “output” in the present specification includes not only original information output but also other processing closely related to information output. Such a process is, for example, an input of a range to be output or a screen scroll instruction. Note that input and output may be realized by an integrated operation by an interactive input / output procedure, and processing such as selection / designation / specification may be performed by such an integrated operation.
[0047]
Further, data (information) and data storage means in this specification may exist in any manner on the computer. For example, the location of the data on the hardware may be any part such as a main storage device, an external storage device, a CPU register, or a cache memory. The data holding mode is also free. For example, data is not only held in a file format, but may be realized by directly accessing a storage device such as a memory or a disk with a physical address. The data expression format is also free. For example, the unit of the code representing the character string may be a character unit or a word unit. In addition, it is sufficient that the data is held for a certain period of time as required, and it may disappear thereafter, and the length of the holding time is arbitrary. Information that is not changed for the time being, such as dictionary data, may be stored in the ROM.
[0048]
Further, in this specification, reference to specific information is confirming and does not deny the existence of information that is not mentioned. That is, in the operation of the present invention, general information necessary for the operation, for example, various pointers, counters, flags, parameters, buffers, and the like are appropriately used.
[0049]
Information required for processing by each part of the embodiment is obtained from other parts holding the information unless otherwise specified. Such acquisition of information can be realized, for example, by accessing a variable or memory storing the information. Note that the information can be erased / erased by changing the meaning of the information, such as setting a flag indicating erasure, without actually deleting the content of the information itself from the storage area.
[0050]
1. Configuration of the first embodiment
FIG. 1 is a block diagram showing the components of the first embodiment. In this case, the system shown in FIG. 1 connects a plurality of file storage devices 1S, 2S,..., NS (n is an arbitrary integer greater than or equal to 2) and the plurality of file storage devices 1S, 2S,. And a common system bus 10. Each of the file storage devices 1S, 2S,..., NS corresponds to a drive referred to in the claims.
[0051]
The file storage device 1S includes a flash serialization unit 1A (corresponding to the serialization unit described in the claims), a flash state flag 1B (corresponding to the flag in the claims), and a buffer management unit (buffer flash unit) 1C. , A disk buffer 1D, and a disk 1E. The disk 1E corresponds to a recording medium referred to in the claims. Further, the buffer management means 1C and the disk buffer 2D constitute buffer means referred to in the claims. The buffer management unit 1C also serves as a determination unit and an update unit in the claims. In this embodiment, “flash” is a process of updating a drive block by all blocks on the buffer.
[0052]
Among these, the flash serializing means 1A responds to the flush start request from the buffer management means 1C and sets the flash status flag 1B to “investigation” and checks the flash status flags of other file storage devices. Then, the flash serialization means 1A sets the flash status flag 1B to “update (execution)” when there is no “under investigation” or “running” flag in another file storage device, and requests A flash start permission is returned to the original buffer management means 1C. Further, the flash status flag 1B is a flag indicating the flash status of the file storage device 1S. As described above, the flash serialization unit 1A performs the flash serialization unit 1A during the investigation by the flash serialization unit 1A or the flash management unit 1C. “Under investigation” or “Updating (executing)”, otherwise “Normal”.
[0053]
On the other hand, the buffer management means 1C sends a flush start request to the flash serialization means 1A in response to an external operation request for the file storage device 1S. Then, as described above, when the buffer management means 1C receives the flush start permission from the flash serialization means 1A, in response to this, all the data in the disk buffer 1D that will need to be updated in the future is used. 1E is updated.
[0054]
Next, the file storage device 2S includes a flash serialization unit 2A, a flash state flag 2B, a buffer management unit (buffer flash unit) 2C, a disk buffer 2D, and a disk 2E. These components 2A to 2E are also configured in the same manner as the components 1A to 1E of the file storage device 1S. Similarly, the nth file storage device nS has a flash serialization means nA, a flash status flag nB, a buffer management means (buffer flush means) nC, a disk buffer nD, and a disk nE, and these components nA ... To nE are configured in exactly the same way as the components 1A to 1E of the file storage device 1S.
[0055]
2 is a conceptual diagram showing an example of a specific configuration of the system shown in FIG. 1. The file storage device 1S includes a CPU (1F), a ROM (1G), a RAM (1H), a SCSI (1I), and a disk. 1E and a local bus 1J. In the ROM (1G) and RAM (1H), buffer management means 1C, flash serialization means 1A, flash status flag 1B, and disk buffer 1D are configured. Similarly, the file storage device 2S includes a CPU (2F), a ROM (2G), a RAM (2H), a SCSI standard interface circuit (2I), a disk 2E, and a local bus 2J. In the RAM (2H), buffer management means 2C, flash serialization means 2A, flash status flag 2B, and disk buffer 2D are configured.
[0056]
The first embodiment is a so-called distributed file system in which there are three or more drives and each file is recorded on two or more drives. In the present invention, which file is usually assigned to each drive. Is different. For this reason, the timing at which the buffer of each drive becomes full is dispersed, and the waiting time for drive update is reduced. When serialization is performed in the same mirroring where the contents of all drives are the same as in mirroring, a need for writing to a plurality of drives always occurs at the same time, resulting in unnecessary waiting time.
[0057]
In the first embodiment, each drive is a separate and independent disk device, and each medium is a recording disk of each disk device. For this reason, in the first embodiment, the possibility of losing a plurality of files due to a failure of a single drive can be eliminated as compared with a partition in which a single disk is regarded as a plurality of logical drives.
[0058]
Conversely, each drive may be each partition provided in a single disk device. In this way, since a plurality of drives are unnecessary, an excellent file system can be realized at a low cost with a simple hardware configuration.
[0059]
2. Operation and effect of the first embodiment
The operation of the distributed file system of the present embodiment having the above configuration will be described below with reference to the flowcharts of FIGS. In this case, FIG. 3 is a flowchart showing a processing procedure when the buffer management means receives a block write request (update request), and FIG. 4 shows a processing procedure when the flash serialization means receives a flush start request. It is a flowchart to show.
[0060]
Here, as an example, an example will be described in which an operation request for updating a block as shown in FIG. 5 is given to the file storage device 1S shown in FIG. For convenience of explanation, in the initial state, all the disks 1E to nE of all the file storage devices 1S to nS are consistent in data, and all the flash state flags of all the file storage devices 1S to nS are used. The flash state flags 1B to nB are assumed to be “normal”. Further, it is assumed that the entire disk storage 1D of the file storage device 1S is “free” as shown in FIG.
[0061]
2-1. Processing when all other file storage devices are "normal"
First, the buffer management means 1C responds to the request of the operation 1 that requires the update of the blocks 1, 2, and 3 shown in FIG. 5 with the number of write blocks in the disk buffer 1D as shown in FIG. It is determined whether or not there is an “empty” area for three blocks or an area having no update necessity (step 301). In this case, as shown in FIG. 6, since there are three blocks of “free” areas in the disk buffer 1D, each of the three blocks of “free” areas has the blocks of write blocks 1, 2, and 3. The address and data contents are stored, and the necessity for updating is set to “present” (step 306). As a result, the contents of the disk buffer 1D are as shown in FIG. In the middle of this processing, the disk 1E is not updated, so the data consistency in the disk 1E is still maintained. The data content of each block in the disk buffer corresponds to the buffer block referred to in the claims.
[0062]
Next, the buffer management means 1C responds to the request of the operation 2 that requires updating of the blocks 4, 5, and 6 shown in FIG. 5, and the number of write blocks in the disk buffer 1D as shown in FIG. It is determined whether or not there is an “empty” area for 3 blocks or an area having no update necessity (step 301). In this case, as shown in FIG. 7, since there are three blocks of “free” areas in the disk buffer 1D, each of the three blocks of “free” areas has blocks of write blocks 4, 5, and 6. The address and data contents are stored, and the necessity for updating is set to “present” (step 306). As a result, the contents of the disk buffer 1D are as shown in FIG. In the middle of this processing, the disk 1E is not updated, so the data consistency in the disk 1E is still maintained.
[0063]
Subsequently, the buffer management means 1C responds to the request of the operation 3 that requires the update of the blocks 7, 8, and 9 shown in FIG. 5, and the number of write blocks in the disk buffer 1D as shown in FIG. It is determined whether or not there is an “empty” area for 3 blocks or an area having no update necessity (step 301). In this case, as shown in FIG. 8, since there is no “empty” area for 3 blocks or “no” update necessity in the disk buffer 1D, the buffer management means 1C uses the flash serialization means 1A for flashing. A start request is sent (step 302), and the flash start permission from the flash serialization means 1A is awaited (step 303).
[0064]
Further, in response to the flush start request from the buffer management unit 1C, the flash serialization unit 1A sets the flash status flag 1B to “investigation” (step 401) as shown in FIG. The flash status flags 2B,..., NB of 2S,..., NS are examined (step 402), and it is determined whether there is a file storage device that is “under investigation” or “updated (execution)” (step 403). ). At this time, if any of the other file storage devices 2S,..., NS is not “investigating” or “updating (executing)”, the flash serialization means 1A sets the flash status flag 1B to “updated (executing) Middle ”), a flash start permission is returned to the requesting buffer management means 1C (step 405), and a flush end notification from the buffer management means 1C is awaited (step 406).
[0065]
In the process so far, the disk 1E of the file storage device 1S has not been updated at all from the initial state, so the consistency of data on the disk 1E is still maintained.
[0066]
Further, in response to the flash start permission from the flash serializing unit 1A, the buffer management unit 1C performs the flush process of the disk buffer 1D with all the data in all the areas in the disk buffer 1D that have the update necessity “present”. (Step 304). That is, here, the disk 1E is updated with the block addresses and data contents of the blocks 1, 2, 3, 4, 5, and 6 stored in the area where there is an update necessity “present”, and these 6 blocks are updated. Change the area to "None" for disk update necessity.
[0067]
In the midst of this flash processing, when only a part of the blocks 1, 2, 3 or only a part of the blocks 4, 5, 6 of the disk 1E is updated, a plurality of blocks that must be updated by one operation. Since the data on the disk 1E is not consistent at this point in time because all of the data are not updated, the target blocks 1, 2, 3, 4, 5, and 5 of the disk 1E are represented by all the data of these 6 blocks. When the update of 6 is completed, the consistency of the data on the disk 1E is taken again. After this flush processing, the buffer management means 1C sends a flush end notification to the flash serialization means 1A (step 305). When the flash serializer 1A receives the flush end notification from the buffer manager 1C, it returns the flash status flag 1B to “normal” as shown in FIG. 4 (step 407).
[0068]
The buffer management means 1C continues to store the block addresses and data contents of the write blocks 7, 8, and 9 in each of the three blocks of the “vacant” area of the disk buffer 1D or the “necessity of updating” area. The update necessity is set to “present” (step 306). As a result, the contents of the disk buffer 1D are as shown in FIG. However, since the disk 1E is not updated in this case, the data consistency on the disk 1E is still maintained.
[0069]
As described above, in the file storage device 1S of the present embodiment, the consistency of data on the disk 1E is lost when the disk buffer 1D is being flushed, that is, the flash status flag 1B is “updated ( It is only when “Running”).
[0070]
2-2. Processing when any of the other file storage devices is "Investigating" or "Updating (executing)"
On the other hand, for example, while the file storage device 2S is performing the flash process, the flash status flag 2B of the file storage device 2S is “updating (running)”. In this state, when the flash serializing unit 1A of the file storage device 1S receives a flush start request, the flash serializing unit 1A sets the flash status flag 1B to “under investigation” as shown in FIG. (Step 401), the flash status flags 2B,..., NB of the other file storage devices 2S,..., NS are examined (step 402), and there is a file storage device that is “under investigation” or “updated (execution)”. Then, it is determined (step 403). Subsequently, the flash serializing unit 1A sets the flash state flag 1B to “normal” and waits for a predetermined time (step 404).
[0071]
Then, after a certain time, the flash serializing means 1A again sets the flash status flag 1B to “investigation” (step 401), as shown in FIG. 4, and flushes the other file storage devices 2S,. The status flags 2B,..., NB are examined (step 402), and it is determined whether there is a file storage device that is “under investigation” or “updated (execution)” (step 403). In this case, if the file storage device 2S is “updating (running)”, the flash serialization unit 1A sets the flash state flag 1B to “normal” and again waits for a fixed time.
[0072]
On the other hand, while the flash serialization means 1A is on standby, the flash processing ends in the file storage device 2A, the flash status flag 2B returns to “normal”, and “in search” or “update in progress (execution) If it is determined that there is no file storage device “medium)”, the flash serialization unit 1A sets the flash status flag 1B to “updating (during execution)” and permits the requesting buffer management unit 1C to start flashing. Is returned (step 405), and a flush end notification from the buffer management means 1C is awaited (step 406). Finally, the flash serialization means 1A returns the flash status flag 1B to “normal” when it receives the flash end notification from the buffer management means 1C (step 407).
[0073]
Thus, in the first embodiment, when the flash processing is to be performed by one file storage device 1S, the operation of the flash serialization means 1A causes other file storage devices to perform “inspection” for the flash processing. In the case of “medium” or “updating (executing)” of the flash processing, execution of the flash processing by the buffer management means 1C is stopped for a certain period of time, and “inspection” or “updating (executing)” For the first time when the file storage device runs out, the buffer management means 1C is returned to the flash start permission, and the disk buffer 1D is flushed. Therefore, two or more file storage devices do not perform flash processing at the same time.
[0074]
As described above, in the first embodiment, the consistency of the data on the disk 1E is lost when the disk buffer 1D is being flushed, that is, the flash status flag 1B is “updated (during execution). ) ”, And since two or more file storage devices do not perform flash processing at the same time, two or more file storage devices simultaneously lose data consistency on the disk. There is no end. Therefore, even if a plurality or all of the file storage devices are down due to a failure at the same time, the data of the files multiplexed and stored in the plurality of file storage devices is at least one file. It is surely stored in the storage device.
[0075]
In particular, in the first embodiment, the serialization means detects another drive that is being updated for each update, thereby avoiding the time overlap of the updates, so that reliable serialization can be performed. Also, in the first embodiment, a highly reliable file system can be realized by giving the control of update start to the serialization means, and the hardware and procedure for performing the update itself can be used, so conventional equipment can be used. Can be used effectively. That is, when applying the present invention to a conventional file system, if only the basic control procedure for accessing the disk, such as hardware and BIOS (Basic Input / Output System) is changed, the logical control procedure of the file system can be changed. There is no need to change (FIG. 10).
[0076]
3. Second embodiment
In the second embodiment, the buffer means is configured to record the operation and each buffer block targeted by each operation using the identification information, and the update means is configured to perform a single operation based on the identification information. The updating is performed in units of all buffer blocks corresponding to the above operation. In the second embodiment, when the same buffer block is included in a plurality of operations, the updating unit is configured to continuously update all the buffer blocks related to the plurality of operations. . For example, every time the operation content is recorded in the buffer, the operation number and the target buffer block number are recorded in the comparison table (FIG. 11). Also, an operation number for each buffer block is recorded in a predetermined area of the disk buffer. The operation number for each buffer block is recorded (FIG. 12). For example, in FIGS. 11 and 12, blocks 1 and 2 are operated by operation 1, blocks 3 and 4 are operated by operation 2, and blocks 3 and 5 are operated by operation 3. In this case, the update is performed integrally with the buffer blocks 1 and 2, and the buffer blocks 3, 4 and 5 related to the operations 2 and 3 are performed together. This is because the state in which only the buffer blocks 3 and 4 related to the operation 2 are updated and the buffer block 5 is not updated is “write” in view of the operation 3.
[0077]
In the second embodiment, since the correspondence relationship can be easily specified by recording identification information such as a code number for each operation and the buffer block, a simple data structure is not used. The operation unit can be updated with the configuration.
[0078]
Further, in the second embodiment, when a plurality of operations target the same block, the block is not updated only by the contents of some of the operations. Will not lose its integrity.
[0079]
4). Other examples
The present invention is not limited to the above-described embodiment. For example, the specific configuration and the flow of processing of the buffer flush unit and the flash serialization unit can be freely changed. Further, the components of each unit other than these means and the configuration of the entire file storage device can be freely changed in the same manner, and the number of file storage devices can be freely selected.
[0080]
For example, performing buffer flush is not limited to the case where there is not enough room to write new data. When a buffer flush instruction is given by a user or a program, an instruction for removing the medium from the drive is given. When you want to stop the system, you can decide freely.
[0081]
Further, for example, each of the serializing means may be configured to perform the investigation by collecting information on the state of another drive via a communication line (Claim 6). In such an embodiment, as long as there is a communication line, the serialization means uses this communication line to perform an investigation, so that no flag or supervisor is required.
[0082]
Further, for example, the serialization means is configured to transfer and copy the flag of each drive to all other drives as a copy, and to perform the investigation by referring to this flag in the other drive. (Claim 7). In such an embodiment, the serialization means of each drive does not need to refer to the state of another drive or a flag provided in another drive every time an investigation is performed, so that the processing at the time of updating is fast. It becomes. The communication and flag transfer as described above can also be performed using a LAN such as Ethernet and MAP.
[0083]
Further, for example, the serialization unit may be configured to perform the serialization by limiting the update of each drive within a predetermined clock cycle based on a predetermined clock. In such an embodiment, an update opportunity in each drive is surely given in a predetermined cycle, and there is no case where an update in a specific drive is delayed by a series of updates in other drives.
[0084]
【The invention's effect】
As described above, according to the present invention, since the consistency between blocks in a file is not lost even if a drive fails at a moment other than during update, a highly reliable file system can be provided.
[Brief description of the drawings]
FIG. 1 is a block diagram showing components of a first embodiment of a file system of the present invention.
FIG. 2 is a conceptual diagram showing an example of a specific configuration of the system of FIG.
FIG. 3 is a flowchart showing a processing procedure when the buffer management unit of FIG. 1 receives a block write request (update request);
FIG. 4 is a flowchart showing a processing procedure when the flash serialization unit of FIG. 1 receives a flash start request;
5 is a table showing operation numbers and update target block addresses of operation requests for the file storage device 1S of FIG.
6 is a table showing an initial state of the disk buffer 1D of FIG.
7 is a table showing a state after the operation 1 of the disk buffer 1D of FIG.
8 is a table showing a state after the operation 2 of the disk buffer 1D in FIG.
FIG. 9 is a table showing a state after the operation 3 of the disk buffer 1D in FIG.
FIG. 10 is a conceptual diagram showing a software configuration of a distributed file system
FIG. 11 is an operation history table according to the second embodiment.
FIG. 12 shows the contents of a disk buffer in the second embodiment.
[Explanation of symbols]
1S, 2S ... File storage device
1A, 2A ... Flash serialization means
1B, 2B ... Flash status flag
1C, 2C... Buffer management means
1D, 2D ... disk buffer
1E, 2E ... disc
10 ... System bus

Claims (20)

不揮発性の記憶装置のドライブを複数有し、
各ドライブの各々には、
各ドライブの記録媒体上にアクセス単位である複数のブロックと、
揮発性メモリ上のバッファに前記各ブロックに書き込むべきデータであるバッファブロックを一時的に格納するバッファ手段と、
バッファブロックによる記録媒体の更新の必要性を判断する判断手段と、
前記更新が必要と判断されたときに、全てのバッファブロックによってドライブのブロックを連続して更新する更新手段と、
各ドライブにおける前記更新の時間的重複を回避して更新を逐次化する逐次化手段を有することを特徴とするファイルシステム。
A plurality of nonvolatile storage drives;
Each drive has a
A plurality of blocks as access units on the recording medium of each drive;
Buffer means for temporarily storing a buffer block which is data to be written to each block in a buffer on a volatile memory;
Determining means for determining the necessity of updating the recording medium by the buffer block;
Update means for continuously updating the blocks of the drive with all buffer blocks when it is determined that the update is necessary;
A file system comprising serialization means for serializing updates while avoiding temporal overlap of the updates in each drive.
前記逐次化手段は、一のドライブにおいて前記更新をしようとする際に他の更新中のドライブが存在するか否かを調査し、他の更新中のドライブが存在する場合は前記一のドライブにおける更新を抑止し、他の更新中のドライブが存在しない場合は前記一のドライブにおける更新を行うように構成されたことを特徴とする請求項1記載のファイルシステム。The serialization means investigates whether there is another drive being updated when attempting to perform the update in one drive, and if there is another drive being updated, in the one drive 2. The file system according to claim 1, wherein updating is inhibited, and updating in the one drive is performed when there is no other drive being updated. 前記逐次化手段は、更新中のドライブが存在した場合は所定時間待機後に再度調査を行い、更新中のドライブが存在しなくなった場合に更新を行うように構成されたことを特徴とする請求項2記載のファイルシステム。The serialization unit is configured to perform an investigation again after waiting for a predetermined time when a drive being updated exists, and to update when a drive being updated does not exist. 2. The file system according to 2. 前記逐次化手段は、各ドライブの状態を示すフラグをドライブの状態に応じて「更新中」、「調査中」及びそれ以外の状態にセットし、更新しようとするときに他のドライブのフラグを調査するように構成されたことを特徴とする請求項2記載のファイルシステム。The serializing means sets a flag indicating the state of each drive to “updating”, “under investigation”, and other states according to the state of the drive, and sets other drive flags when attempting to update. The file system according to claim 2, wherein the file system is configured to investigate. 前記逐次化手段は、各ドライブの各々に個別に設けられたことを特徴とする請求項1記載のファイルシステム。2. The file system according to claim 1, wherein the serializing means is provided individually for each drive. 前記各逐次化手段は、通信回線を経由して他のドライブの状態に関する情報を収集することによって前記調査を行うように構成されたことを特徴とする請求項4記載のファイルシステム。5. The file system according to claim 4, wherein each of the serializing units is configured to perform the investigation by collecting information related to a state of another drive via a communication line. 前記逐次化手段は、各ドライブのフラグを他の全てのドライブに控えとして転送・コピーし、他のドライブではこの控えのフラグを参照することによって前記調査を行うように構成されたことを特徴とする請求項4記載のファイルシステム。The serialization means is configured to transfer / copy the flag of each drive to all other drives as a copy, and the other drive refers to the copy flag to perform the investigation. The file system according to claim 4 . 前記逐次化手段は、各ドライブの更新を所定のクロックに基づいて所定の各時間的サイクル内に制限することによって前記逐次化を行うように構成されたことを特徴とする請求項1記載のファイルシステム。2. The file according to claim 1, wherein the serialization unit is configured to perform the serialization by limiting the update of each drive within a predetermined time cycle based on a predetermined clock. system. 複数のドライブを有し、各ファイルが複数のドライブ上に記録されたことを特徴とする請求項1記載のファイルシステム。2. The file system according to claim 1, comprising a plurality of drives, wherein each file is recorded on the plurality of drives. 不揮発性の記憶装置のドライブを複数有し、
各ドライブの各々は、
各ドライブの記録媒体上にアクセス単位である複数のブロックと、
揮発性メモリ上のバッファに前記各ブロックに書き込むべきデータであるバッファブロックを、前記ドライブへのブロックの更新を要求する単一のデータ書き込み操作が発生する都度、その単一のデータ書き込み操作ごとに、前記各ブロックに書き込むべきデータであるバッファブロックを揮発性メモリ上のバッファに対して一時的に格納するバッファ手段と、
バッファブロックによる記録媒体の更新の必要性を判断する判断手段と、
前記判断手段によって更新が必要と判断されたときに、少なくとも前記単一のデータ書き込み操作の対象となるすべてのバッファブロックによってドライブのブロックを連続して更新する更新手段と、
各ドライブにおける前記更新の時間的重複を回避して更新を逐次化する逐次化手段を有することを特徴とするファイルシステム。
A plurality of nonvolatile storage drives;
Each drive is
A plurality of blocks as access units on the recording medium of each drive;
Each time a single data write operation occurs , a buffer block, which is data to be written to each block in a buffer on volatile memory, is requested for each block to be updated to the drive. Buffer means for temporarily storing a buffer block, which is data to be written in each block, in a buffer on a volatile memory;
Determining means for determining the necessity of updating the recording medium by the buffer block;
Updating means for continuously updating blocks of the drive by at least all buffer blocks to be subjected to the single data write operation when it is determined by the determining means that updating is necessary;
A file system comprising serialization means for serializing updates while avoiding temporal overlap of the updates in each drive.
前記バッファ手段は、前記発生した単一のデータ書き込み操作とこの書き込み操作の対象であるすべてのバッファブロックの対応付けを行う識別情報と共に、前記バッファブロックをバッファに対して一時的に格納するものであり、
前記更新手段は、前記判断手段によって更新が必要と判断されたときに、前記識別情報に基づいて、単一のデータ書き込み操作に対応する全てのバッファブロックを単位として前記更新を行うように構成されたことを特徴とする請求項10に記載のファイルシステム。
The buffer means temporarily stores the buffer block in the buffer together with identification information for associating the generated single data write operation with all the buffer blocks that are targets of the write operation. Yes,
The update unit is configured to perform the update in units of all buffer blocks corresponding to a single data write operation based on the identification information when the determination unit determines that the update is necessary. The file system according to claim 10, wherein:
前記更新手段は、複数のデータ書き込み操作の対象に同一のバッファブロックが含まれる場合、それら複数のデータ書き込み操作に係る全てのバッファブロックを連続して更新するように構成されたことを特徴とする請求項11記載のファイルシステム。It said updating means, if it contains the same buffer block subject to a plurality of data write operations, characterized in that it is configured to continuously update all the buffer block according to the plurality of data write operations The file system according to claim 11. 前記逐次化手段は、一のドライブにおいて前記更新をしようとする際に他の更新中のドライブが存在するか否かを調査し、他の更新中のドライブが存在する場合は前記一のドライブにおける更新を抑止し、他の更新中のドライブが存在しない場合は前記一のドライブにおける更新を行うように構成されたことを特徴とする請求項10記載のファイルシステム。The serialization means investigates whether there is another drive being updated when attempting to perform the update in one drive, and if there is another drive being updated, in the one drive 11. The file system according to claim 10 , wherein the file system is configured to suppress the update and perform update in the one drive when there is no other drive being updated. 前記逐次化手段は、更新中のドライブが存在した場合は所定時間待機後に再度調査を行い、更新中のドライブが存在しなくなった場合に更新を行うように構成されたことを特徴とする請求項13記載のファイルシステム。The serialization unit is configured to perform an investigation again after waiting for a predetermined time when there is a drive being updated, and perform an update when there is no longer a drive being updated. 13. The file system according to 13. 前記逐次化手段は、各ドライブの状態を示すフラグをドライブの状態に応じて「更新中」、「調査中」及びそれ以外の状態にセットし、更新しようとするときに他のドライブのフラグを調査するように構成されたことを特徴とする請求項13記載のファイルシステム。The serializing means sets a flag indicating the status of each drive to “updating”, “investigating” and other states according to the status of the drive, and sets the flags of other drives when attempting to update. The file system of claim 13, wherein the file system is configured to investigate. 前記逐次化手段は、各ドライブの各々に個別に設けられたことを特徴とする請求項10記載のファイルシステム。11. The file system according to claim 10 , wherein the serializing means is provided individually for each drive. 前記各逐次化手段は、通信回線を経由して他のドライブの状態に関する情報を収集することによって前記調査を行うように構成されたことを特徴とする請求項15記載のファイルシステム。 16. The file system according to claim 15, wherein each of the serializing units is configured to perform the investigation by collecting information on the state of another drive via a communication line. 前記逐次化手段は、各ドライブのフラグを他の全てのドライブに控えとして転送・コピーし、他のドライブではこの控えのフラグを参照することによって前記調査を行うように構成されたことを特徴とする請求項15記載のファイルシステム。The serialization means is configured to transfer / copy the flag of each drive to all other drives as a copy, and the other drive refers to the copy flag to perform the investigation. The file system according to claim 15 . 前記逐次化手段は、各ドライブの更新を所定のクロックに基づいて所定の各時間的サイクル内に制限することによって前記逐次化を行うように構成されたことを特徴とする請求項10記載のファイルシステム。11. The file according to claim 10 , wherein the serialization means is configured to perform the serialization by limiting the update of each drive within a predetermined time cycle based on a predetermined clock. system. 複数のドライブを有し、各ファイルが複数のドライブ上に記録されたことを特徴とする請求項10記載のファイルシステム。11. The file system according to claim 10 , comprising a plurality of drives, wherein each file is recorded on the plurality of drives.
JP17121094A 1993-07-23 1994-07-22 File system Expired - Lifetime JP3614886B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17121094A JP3614886B2 (en) 1993-07-23 1994-07-22 File system

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP18307693 1993-07-23
JP5-183076 1993-07-23
JP17121094A JP3614886B2 (en) 1993-07-23 1994-07-22 File system

Publications (2)

Publication Number Publication Date
JPH0784727A JPH0784727A (en) 1995-03-31
JP3614886B2 true JP3614886B2 (en) 2005-01-26

Family

ID=26494007

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17121094A Expired - Lifetime JP3614886B2 (en) 1993-07-23 1994-07-22 File system

Country Status (1)

Country Link
JP (1) JP3614886B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009230407A (en) 2008-03-21 2009-10-08 Toshiba Corp Data update method, memory system and memory device
JP2011008570A (en) * 2009-06-26 2011-01-13 Buffalo Inc Storage device, information processing system, and computer program

Also Published As

Publication number Publication date
JPH0784727A (en) 1995-03-31

Similar Documents

Publication Publication Date Title
JP3197382B2 (en) Method and system for incremental time zero backup copy of data
US6330642B1 (en) Three interconnected raid disk controller data processing system architecture
JP2557172B2 (en) Method and system for secondary file status polling in a time zero backup copy process
US8108597B2 (en) Storage control method and system for performing backup and/or restoration
US7958328B2 (en) Computer system, storage system and method for saving storage area by integrating same data
US7330947B2 (en) Method and apparatus for backing up data in virtual storage medium
EP0566968A2 (en) Method and system for concurrent access during backup copying of data
US6205529B1 (en) Method and apparatus for defragmenting a storage device using a copy function in the device control logic
JP4163298B2 (en) Method of writing data to storage system
US7222135B2 (en) Method, system, and program for managing data migration
JP2005276208A (en) Communication-link-attached permanent memory system
US7664910B2 (en) Data management method and apparatus, hierarchical storage apparatus and computer-readable storage medium
KR20010007111A (en) Data processor storage systems with dynamic resynchronization of mirrored logical data volumes subsequent to a storage system failure
US20060085663A1 (en) Method for keeping snapshot image in a storage system
JP4892812B2 (en) Cache control and data processing system and processing program therefor
JPH0830398A (en) Optical disk system
JP4394467B2 (en) Storage system, server apparatus, and preceding copy data generation method
JP2005284816A (en) Disk array system
JP3614886B2 (en) File system
JPH0863394A (en) Storage device system and controlling mathod for storage device
US7836247B2 (en) Method, apparatus, and computer program product for permitting access to a storage drive while the drive is being formatted
US5933839A (en) Distributed file system for renewing data with high integrity
JPH11237959A (en) Multiple writing storage device
JP2003263276A (en) Disk system and disk access method
JP2003186629A (en) Data copy system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040622

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040823

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041026

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041028

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071112

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081112

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091112

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101112

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101112

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121112

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131112

Year of fee payment: 9

EXPY Cancellation because of completion of term