JP3866448B2 - Internode shared file control method - Google Patents

Internode shared file control method Download PDF

Info

Publication number
JP3866448B2
JP3866448B2 JP14350299A JP14350299A JP3866448B2 JP 3866448 B2 JP3866448 B2 JP 3866448B2 JP 14350299 A JP14350299 A JP 14350299A JP 14350299 A JP14350299 A JP 14350299A JP 3866448 B2 JP3866448 B2 JP 3866448B2
Authority
JP
Japan
Prior art keywords
file
token
disk area
server device
client device
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 - Fee Related
Application number
JP14350299A
Other languages
Japanese (ja)
Other versions
JP2000322306A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP14350299A priority Critical patent/JP3866448B2/en
Publication of JP2000322306A publication Critical patent/JP2000322306A/en
Application granted granted Critical
Publication of JP3866448B2 publication Critical patent/JP3866448B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複数のノード(ホストコンピュータ)から同一のファイルを共用することを可能とするノード間共用ファイルシステム(分散ファイルシステム)のコンシステンシ保証制御技術に関する。
【0002】
【従来の技術】
分散ファイルシステムにおいて、トークンを利用して複数のノード上にキャッシュされているデータのコンシステンシ(一貫性、整合性)を保つ方式は良く知られている。代表的な方式では、ファイルのアクセス範囲(通常、ブロック番号の始端と終端が用いられる)ごとにmultiple-read/single-writeの制御を行うトークンが用意される。そして、ファイルにアクセスしようとするノードは、自身がアクセス範囲のトークンを保持しているか否かを調べ、もし保持していなければトークンを管理しているサーバにトークンを要求する。トークンを管理しているサーバは、read権は複数のノードに渡されることを許し(multiple-read )、write 権は1つのノードのみに渡されるように(single-write)、アクセス権制御を実行する。
【0003】
【発明が解決しようとする課題】
上述の従来方式は、各ノードにキャッシュされているデータの一貫性を保ちつつサーバとクライアントの間の通信を減らすために有効な方式であるが、以下の問題点を有する。
1)ファイルアクセスの都度にトークンを獲得する必要がある。例えば、科学技術計算のための巨大なファイルをユーザがシーケンシャルにアクセスする場合、ユーザは、特定バイトずつのファイルアクセス要求を出す都度に、サーバにトークンを獲得するための要求を発行せざるを得ない。この事実は、オーバヘッドの増大を招く。
2)ファイルが最後にアクセスされた時刻を保持するファイルアクセス時刻(ファイル時刻)の正当性を保証するために、ユーザはファイルアクセス要求を発行する都度にサーバにそのアクセスの存在を通知せざるを得ない。この事実は、オーバヘッドの増大を招く。
3)ユーザはファイルサイズを更新するときにはその旨をサーバに通知し、サーバは他ノードに発行されている全てのトークンを回収しなければならない。このため、例えばファイルを拡張するプログラムとファイルをその先頭から順に読むプログラムをそれぞれ異なるノードで同時に実行させることができず、システム全体の性能が低下するといった問題が生ずる。
4)サーバが二重化され、障害発生時に運用サーバが待機系サーバに切り替えられる機能を有するシステムにおいて、待機系サーバへの切替えの時点でいままで運用されてきた時計も待機系のサーバ内の時計に切り替えられるため、ファイル時刻の逆転現象が発生する可能性がある。この事実は、データのコンシステンシの喪失を招く。
5)メインフレームで採用されるような、ディスクがノード間で直接共用されネットワークを介したデータ転送が削減される方式を、離散ファイルを特徴とするオープン系のファイルシステムに適用しようとした場合に、各ノードはファイルシステム上でブロックを割り当てる都度にサーバと通信する必要が生ずる。この事実は、オーバヘッドの増大を招く。
一方、トークンを利用した分散ファイルシステムにおいては、複数のノードが同時並行的なアクセスを行うため、ファイルシステムの耐故障性に関しても十分な配慮が必要である。一般に、ファイルシステムの耐故障性を向上させる方式として、ログファイルを設けてメタデータの更新をトランザクショナルに行うログ方式が知られている。ログ方式では一般に、1つのトランザクションの処理途中結果を他のトランザクションに見せてはならないという制約のために、いわゆる2フェーズロック制御が行われる。この制御では、更新に必要なロックが順に獲得されてゆき、全ての更新が完了した時点で一括して、メタデータの更新内容がログファイルロックに書き出され、書出しが完了した時点でロックが一括して返却される。この際に必然的に発生する複数のロック獲得に伴うデッドロックは、資源獲得を示す有向グラフを用いて自動的に検出され、デッドロックの原因となっている一方のトランザクションがキャンセルされ、再試行させられることにより解消される方式が、一般的に用いられる。
【0004】
しかし、上述のようなログ方式をトークンシステムに適用してデッドロックを自動的に検出し回復を図る汎用的な方式は考え出されていない。
また、従来のログ方式では、ログがキャッシュブロック単位に採取されると共に、トランザクション終了時にファイルシステムの実更新が発生するため、I/O量が相対的に多くなるという欠陥があった。
【0005】
また上記ログ方式では、トランザクションのキャンセル時のデータ復元処理がメタデータのみに限られ、性能向上のために用意きれたメモリに常駐する制御表は対象外であるため、プログラム作成が難しいという欠陥も持っていた。
【0006】
本発明の課題は、トークンを用いたノード間共用ファイルシステムにおいて、上述の各問題点を解決することにあり、ファイルアクセスに伴うオーバヘッドの増大とシステム性能の低下を抑制すると共に、二重化サーバシステムにおけるサーバ切替え時のファイル時刻の逆転を防止し、更にメタデータの更新をコンシステントにかつデッドロックフリーで行なうことにより従来のログ方式の性能上及びプログラム作成上の問題点を解決することにある。
【0007】
【課題を解決するための手段】
本発明は、ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上でそのファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイル制御システムを前提とする。
【0008】
本発明の第1の態様は、以下の構成を有する。
まず、クライアント装置からサーバ装置へのトークンの要求時に、サーバ装置において複数のクライアント装置間でのそのトークンの競合の有無が判定される。
【0009】
そして、その競合が無ければ、サーバ装置からクライアント装置へファイル全体のトークンが応答される。
以上の構成を有する本発明の第1の態様の構成では、例えばopen要求時等においてファイル全体のトークンが引き渡されることにより、可能な限り新たなトークン要求を行わずにファイルへの連続アクセスが可能となる。データベースアクセス等を除く一般的なファイルアクセスでは、1つのノードからのwrite 要求の発行時に他のノードからread命令が発行される確率は小さい。従って、1つのノードに引き渡されたファイル全体のトークンが回収される確率も低く、ファイルへの連続アクセス時にアクセス単位ごとにトークン要求が不要になることによる性能向上が期待できる。
【0010】
本発明の第2の態様は、以下の構成を有する。
まず、クライアント装置とサーバ装置の間で、ファイル時刻を制御するための時刻トークンが通信される。
【0011】
また、サーバ装置において、ファイル時刻の変更を許容するwrite 権の時刻トークンを複数のクライアント装置に同時に応答する制御が実行される。
また、クライアント装置において、write 権の時刻トークンが獲得された後は、サーバ装置にファイル時刻を問い合わせることなく、ファイルアクセスが実行される。
【0012】
また、サーバ装置において、所定のタイミングでクライアント装置からwrite 権の時刻トークンが回収され、自身が管理するファイル時刻が更新される。
以上の構成を有する本発明の第2の態様の構成では、クライアント装置は、ユーザプログラムが1つのファイルに連続アクセスするような場合において、そのファイルへの最終的なアクセスが終了するまでwrite 権の時刻トークンを返却する必要もまたアクセスの有無をサーバ部に通知する必要もなく、他のノードとの間でそのファイルのファイル時刻の同期をとる必要がなくなる。このため、システム全体の性能を向上させることが可能となる。
【0013】
本発明の第3の態様は、以下の構成を有する。
まず、クライアント装置とサーバ装置の間で、ファイルサイズの拡張を制御するためのサイズトークンが通信される。
【0014】
そして、クライアント装置において、ファイルの最終ブロックにアクセスする場合においてのみ、サーバ装置からそのファイルに対応するサイズトークンが獲得された上でその最終ブロックにアクセスされる。
【0015】
以上の構成を有する本発明の第3の態様の構成では、ファイルの最終ブロックにアクセスするのでなければ、サイズトークンを獲得することなくファイルにアクセスすることが可能となり、これと並行して、他のノードは、サイズトークンを獲得してファイルの最終ブロックにアクセスし、ファイルのサイズを拡張するwrite 操作処理を実行することができる。このため、例えばファイルを拡張するプログラムとファイルをその先頭から順に読むプログラムをそれぞれ異なるノードで同時に実行させることが可能となり、システム全体の性能を向上させることができる。
【0016】
本発明の第4の態様は、以下の構成を有する。
まず、クライアント装置とサーバ装置の間で、ファイルデータのアクセスを制御するためのデータトークンが通信される。
【0017】
そして、そのデータトークンの通信時に、そのデータトークンに対応するファイルのディスク上での位置を示すエクステント情報が通信される。
以上の構成を有する本発明の第4の態様の構成では、複数のノードは、ディスク装置内のファイルに、LAN経由ではなく直結された制御・データ線を介してアクセスすることが可能となる。
【0018】
本発明の第5の態様は、上述した本発明の第1乃至第4のいずれかの態様の構成を前提として、さらにサーバ装置が二重化される構成を前提とし、以下の構成を有する。
【0019】
まず、主系のサーバ装置においてファイル時刻が設定される際に、そのファイル時刻が従系のサーバ装置に送信される。
そして、その従系のサーバ装置において、そのファイル時刻が設定される。
【0020】
以上の構成を有する本発明の第5の態様の構成では、サーバ切替時にも、矛盾のないファイル時刻の付与が可能となる。
本発明の第6の態様は、以下の構成を有する。
【0021】
まず、サーバ装置において、複数のノードから共用される1つ以上のディスクボリューム毎に、空きディスク領域群、使用中ディスク領域群、及び各クライアント装置に対応するリザーブ中ディスク領域群が管理される。このとき、空きディスク領域群の管理が、ディスク領域の複数のサイズ範囲毎に行われるように構成することができる。
【0022】
次に、クライアント装置において、サーバ装置に対して、ディスク領域のリザーブが要求される。このとき、クライアント装置において、それが管理するリザーブ中ディスク領域群中のディスク領域が所定量を下回ったときに、サーバ装置に対して、新たなディスク領域のリザーブ要求が発行されるように構成することができる。
【0023】
次に、そのリザーブ要求に対して、サーバ装置において、空きディスク領域群からディスク領域がリザーブ中ディスク領域として確保され、それに関する情報がそのリザーブ要求を発行したクライアント装置に通知されると共に、その確保されたリザーブ中ディスク領域がリザーブ要求を発行したクライアント装置に対応するリザーブ中ディスク領域群として管理される。
【0024】
続いて、リザーブ要求を発行したクライアント装置において、そのリザーブ要求に応答してサーバ装置から通知された情報に対応するリザーブ中ディスク領域がリザーブ中ディスク領域群として管理される。このとき、クライアント装置において、リザーブ中ディスク領域群の管理が、ディスク領域の複数のサイズ範囲毎に行われるように構成することができる。
【0025】
更に、クライアント装置において、ユーザプログラムによるファイルへのデータ書出し要求に伴って新たなディスク領域を割り当てる必要が発生した場合に、そのクライアント装置が管理するリザーブ中ディスク領域群から最適なリザーブ中ディスク領域が選択され、そこに対してデータ書出しが実行され、そのリザーブ中ディスク領域がリザーブ中ディスク領域群としての管理からはずされ、そのデータ書出しを実行したリザーブ中ディスク領域に関する情報がサーバ装置に通知される。この通知は、ユーザプログラムがファイルをクローズし、又はキャッシュが一杯になり、或いはサーバ装置からデータトークンの回収を要求されるタイミングで行うように構成することができる。このとき、ユーザプログラムによるファイルへのデータ書出し要求に基づいて書き出されるデータが、主記憶上にキャッシュされ、リザーブ中ディスク領域の割り当てが遅延させられるように構成することができる。
【0026】
そして、サーバ装置において、クライアント装置から通知された情報に対応するデータ書出しが発生したリザーブ中ディスク領域が、その通知を行ったクライアント装置に対応するリザーブ中ディスク領域群としての管理からはずされて使用中ディスク領域として管理される。
【0027】
上述の本発明の第6の態様の構成において、クライアント装置において、ユーザプログラムによるファイルへのデータ書出し要求に伴って新たなディスク領域を割り当てる必要が発生した場合に、そのクライアント装置が管理するリザーブ中ディスク領域群からファイルへのデータ書出しが既に行われているディスク領域に連続するリザーブ中ディスク領域が選択され、その選択に失敗した場合には、サーバ装置に対して、その連続するリザーブ中ディスク領域のリザーブ要求が発行されるように構成することができる。
【0028】
また、サーバ装置において、クライアント装置の障害が監視され、その結果障害が検出されたクライアント装置に対応するリザーブ中ディスク領域群が、全て空きディスク領域群に変更されるように構成することができる。
【0029】
以上の構成を有する本発明の第6の態様の構成では、クライアント装置は、サーバ装置に問い合わせることなく、新たなディスク領域をファイルに割り当てることが可能となる。このため、クライアント装置とサーバ装置との間の通信回数を削減でき、システム全体の性能を向上させることが可能となる。また、新たに割り当てられたディスク領域は、データが書き込まれた後のクライアント装置からサーバ装置への応答によって初めて、そのファイルのメタデータ等として記憶される。このため、悪意をもってデータを覗くことを防止することが可能となる。
【0037】
【発明の実施の形態】
以下、本発明の実施の形態について詳細に説明する。
図1は、本発明の実施の形態の構成を示すブロック構成図である。
【0038】
#1〜#3の各ノード101は、ファイル105が格納されているディスク装置と直結され、またローカルエリアネットワーク(LAN)106によって相互に接続される。
【0039】
ファイル105を共用する複数のノード101(図中では、#1〜#3)の全てにクライアント部102、そのうちの2つのノード101(図中では、#1と#2)にサーバ部103が存在する。
【0040】
一方のノード101(#1)内のサーバ部103(#1)は主サーバ、他方のノード101(#2)のサーバ部103(#2)は従サーバと呼ばれる。
それぞれのノード101内のクライアント部102は、主サーバであるノード101(#1)内のサーバ部103(#1)とのみ通信することにより、ファイル操作処理を実行する。
【0041】
主サーバであるサーバ部103(#1)は、任意のクライアント部102からの要求(依頼)を処理して、その処理結果を、自身が保持するメタデータ104(#1)に反映させる。従サーバであるノード101(#2)内のサーバ部103(#2)が存在するときには、主サーバであるサーバ部103(#1)は、メタデータ104(#1)の更新内容(差分)をサーバ部103(#2)にも送る。従サーバであるサーバ部103(#2)は、送られてきたデータをノード101(#2)内のメタデータ104(#2)に反映させる。
【0042】
任意のノード101内のクライアント部102は、図2に示されるように、そのノード101内のオペレーティングシステム(OS)201内に存在し、そのノード101内のユーザプログラム202からのファイル操作要求を、主サーバであるノード101(#1)内のサーバ部103(#1)の助けを借りて処理する。#1又は#2のノード101内のサーバ部103は、そのノード101内のオペレーティングシステム201に組み込んでもよいし、ユーザデーモンプログラムとしてオペレーティングシステム201の外に実装してもよい。このサーバ部103は、複数のノード101上のクライアント部102からのファイル操作要求を、LAN106(図1参照)を介して受け付ける。
【0043】
上述の構成のもとでクライアント部102とサーバ部103がファイル操作制御を実行する場合、本実施の形態では、下記のトークンが用いられる。
1)ファイル105ごとに複数種類(例えば4種類)のトークンが用意され、その中に、ファイルサイズの拡張を制御しmultiple-read/single-write特性を有するサイズトークンが含めさせられる。
2)ファイル105ごとに複数種類(例えば4種類)のトークンが用意され、その中に、ファイル時刻を制御しmultiple-write/multiple-read特性を有する時刻トークンが含めさせられる。1つのノード101は、1つのファイル105について、read権の時刻トークンとwrite 権の時刻トークンを同時に取得できる。ただし、或るノード101内のクライアント部102がサーバ部103に或るファイル105についてのread権の時刻トークンを要求したときに、他のノード101内のクライアント部102がそのファイル105についてのwrite 権の時刻トークンを持っていた場合には、サーバ部103は、その、他のノード101内の時刻トークンを回収する。また逆に、或るノード101内のクライアント部102がサーバ部103に或るファイル105についてのwrite 権の時刻トークンを要求したときに、他のノード101内のクライアント部102がそのファイル105についてのread権の時刻トークンを持っていた場合も、サーバ部103は、その、他のノード101内の時刻トークンを取り上げる。すなわち、1つのファイル105については、複数のノードがそれぞれ、そのファイル105についてのread権の時刻トークンとwrite 権の時刻トークンを同時に保有するということはない。
3)ファイル105ごとに複数種類(例えば4種類)のトークンが用意され、その中に、ファイルサイズの縮小を制御しmultiple-read/single-write特性を有する属性トークンが含めさせられる。
4)ファイル105ごとに複数種類(例えば4種類)のトークンが用意され、その中に、ファイル内データのアクセス権を制御しファイル105を構成するブロックごとに存在するmultiple-read/single-write特性を有するデータトークンが含めさせられる。
また、本実施の形態は、下記の基本的動作を実行する。
5)各トークンは、サーバ部103によって管理され、トークンが必要なノード101内のクライアント部102は、サーバ部103に、必要なトークンの獲得を要求(依頼)する。
6)サーバ部103は、ファイル105を格納するディスク上のどこが空いているかを示す空きブロック情報(空きエクステント情報)及び個々のファイル105のディスク上での存在場所(ファイル105のエクステント情報)を、メタデータ104として管理している。
7)クライアント部102は、サーバ部103に、ディスク上の空きブロック群(空きエクステント群)を事前要求(リザーブ要求)し、ユーザプログラム202からのwrite 要求時には、事前要求で確保しておいた空きエクステント群の中から最適なものを割り当て、そこにユーザデータを書き込む。
続いて、本実施の形態の具体的な動作について、以下に順次説明する。
【0044】
図3は、任意のノード101内のクライアント部102が実行するファイル操作要求制御のメイン動作フローチャートであり、図5及び図6は、主サーバであるノード101(#1)内のサーバ部103(#1)が実行するファイル操作要求制御のメイン動作フローチャートである。なお、以下の説明において、特に言及しない場合には、「サーバ部103」と記述した場合には、主サーバであるノード101(#1)内のサーバ部103(#1)を指すものとする。
1)クライアント部102及びサーバ部103でのopen操作処理
任意のノード101において、ユーザプログラム202(図2)がファイル105のopen要求を実行すると、同一のノード101内のクライアント部102がそのopen要求を受け取る(図3のステップ301の判定がYES)。この結果、クライアント部102は、open操作処理を実行する(図3のステップ302)。図4は、クライアント部102が実行する図3のステップ302のopen操作処理の動作フローチャートである。
【0045】
まず、クライアント部102は、LAN106(図1)を介して、サーバ部103に、open要求を送信する。このopen要求には、アクセスの種別を示すオープンモード(read又はwrite )が付加される。
【0046】
その後、クライアント部102は、サーバ部103からの応答を待つ(図4のステップ402−>403−>402の処理ループ)。なお、タイムアウト時には、クライアント部102は、エラー処理を実行し(図4のステップ403−>404)、その後、図3のメイン動作フローチャートの処理ループに戻る。
【0047】
サーバ部103は、クライアント部102からopen要求を受信すると(図5のステップ500の判定がYES)、open操作処理を実行する(図5のステップ501)。図7は、サーバ部103が実行する図5のステップ501のopen操作処理の動作フローチャートである。
【0048】
まず、サーバ部103は、受信されたopen要求によって指定されているファイル105(図1)について、そのopen要求によって指定されているオープンモードと矛盾するデータトークンを他のノード101に渡しているかどうかを調べる(図7のステップ701)。
【0049】
サーバ部103は、上記オープンモードと矛盾するデータトークンを他のノード101に渡していない場合に、ファイル全体のデータトークン及びエクステント情報と、属性トークンと、サイズトークンと、時刻トークンと、属性データを、それぞれ応答データとして設定し(図7のステップ702〜706)、応答処理を実行する(図7のステップ707)。ファイル全体のデータトークンとサイズトークンは、それぞれ、前記open要求によって指定されているオープンモードが、readならread権のトークン、write ならwrite 権のトークンである。また、時刻トークンは、write 権のトークンである。さらに、属性データには、例えばファイルサイズ、アクセス権、ファイル作成日付、ファイル更新日付等のデータが含まれる。
【0050】
一方、サーバ部103は、上記オープンモードと矛盾するデータトークンを他のノード101に渡している場合には、ファイル全体のデータトークンは設定せずに、エクステント情報と、属性トークンと、サイズトークンと、時刻トークンと、属性データのみを、それぞれ応答データとして設定し(図7のステップ703〜706)、応答処理を実行する(図7のステップ707)。
【0051】
クライアント部102は、サーバ部103から応答を受信すると、その応答に含まれているファイル全体のデータトークン及びエクステント情報と、属性トークンと、サイズトークンと、時刻トークンと、属性データを、それぞれメモリ内のキャッシュ領域に保持する(図4のステップ402−>405〜409)。その後、クライアント部102は、ユーザプログラム202へのファイルディスクリプタの応答等の、その他のopen操作処理を実行し、その後、図3のメイン動作フローチャートの処理ループに戻る。
【0052】
以上のようにして、本実施の形態では、ファイル105のopen時に、競合が発生していなければ、以降のファイルアクセス(readアクセス又はwrite アクセス)に必要なトークンが全て渡されるため、クライアント部102は、サーバ部103との間で、トークン獲得のための通信を行う必要が全くなくなるという効果を有する。
【0053】
また、open要求時にファイル全体のトークンが引き渡されることにより、可能な限り新たなトークン要求を行わずにファイルへの連続アクセスが可能となる。データベースアクセス等を除く一般的なファイルアクセスでは、1つのノード101からのwrite 要求の発行時に他のノード101からread命令が発行される確率は小さい。従って、1つのノード101に引き渡されたファイル全体のトークンが回収される確率も低く、ファイル105への連続アクセス時にアクセス単位ごとにトークン要求が不要になることによる性能向上が期待できる。
2)クライアント部102でのread操作処理
任意のノード101で、ユーザプログラム202がファイル105のread要求を発行すると、同一のノード101内のクライアント部102がそのread要求を受け取る(図3のステップ303の判定がYES)。この結果、クライアント部102は、read操作処理を実行する(図3のステップ304)。図8は、クライアント部102が実行する図3のステップ304のread操作処理の動作フローチャートである。
【0054】
まず、クライアント部102は、必要な以下のトークンを保持しているかどうかを調べる(図8のステップ801)。
・read要求された範囲のread権のデータトークン
・属性トークン
・write 権の時刻トークン
・read要求が最終ブロックのread要求である場合のみ、
その最終ブロックについてのread権のサイズトークン
ここで、属性トークンが存在すれば、ファイル105の最終ブロックの1つ前のブロックまではファイル内容が変更されていないことが保証されるため、かかるブロックのread操作処理時にはサイズトークンは獲得する必要はない。一方、read要求が最終ブロックのread要求である場合において、上記サイズトークンが存在しない場合には、他のノード101内のクライアント部102がその最終ブロックからのファイルサイズの拡張処理(write 操作処理)を実行している可能性があり、最終ブロックのread可能範囲が保証されない。上記サイズトークンが獲得された場合には、最終ブロックのread可能範囲が保証されるため、ユーザプログラム202は、その最終ブロックについてのread操作処理が可能となる。
【0055】
このように本実施の形態では、ファイル105の最終ブロックにアクセスするのでなければ、サイズトークンを獲得することなくファイル105にアクセスすることが可能となり、これと並行して、他のノード101は、サイズトークンを獲得してファイル105の最終ブロックにアクセスし、ファイル105のサイズを拡張するwrite 操作処理を実行することができる。このため、例えばファイルを拡張するプログラムとファイルをその先頭から順に読むプログラムをそれぞれ異なるノード101で同時に実行させることが可能となり、システム全体の性能を向上させることができる。
【0056】
クライアント部102は、もし上記トークンを全て保持しているなら、サーバ部103にトークンを要求することなく、クライアント部102が保持する(キャッシュしている)データを使って、ユーザプログラム202の要求を処理する(図8のステップ801−>802)。その後、クライアント部102は、図3のメイン動作フローチャートの処理ループに戻る。
【0057】
一方、クライアント部102は、もし不足するトークンが存在するなら、そのトークンをLAN106(図1)を介してサーバ部103に要求し、サーバ部103からの応答を待つ(図8のステップ801−>803,ステップ804−>805−>804の処理ループ)。なお、タイムアウト時には、クライアント部102は、エラー処理を実行し(図4のステップ403−>404)、その後、図3のメイン動作フローチャートの処理ループに戻る。
【0058】
クライアント部102は、サーバ部103から応答を受信すると、その応答に基づいてユーザプログラム202の要求を処理する(図8のステップ804−>807)。その後、クライアント部102は、図3のメイン動作フローチャートの処理ループに戻る。
3)クライアント部102でのwrite 操作処理
任意のノード101で、ユーザプログラム202がファイル105のwrite 要求を発行すると、同一のノード101内のクライアント部102がそのwrite 要求を受け取る(図3のステップ305の判定がYES)。この結果、クライアント部102は、write 操作処理を実行する(図3のステップ306)。この処理は、read操作処理と同様の図8の動作フローチャートによって示される。
【0059】
まず、クライアント部102は、必要な以下のトークンを保持しているかどうかを調べる(図8のステップ801)。
・write 要求された範囲のwrite 権のデータトークン
・属性トークン
・write 権の時刻トークン
・write 要求が最終ブロックのwrite 要求である場合のみ、
その最終ブロックについてのwrite 権のサイズトークン
ここで、サイズトークンを用いることにより得られる効果は、read操作処理時の場合と同様である。
【0060】
クライアント部102は、もし上記トークンを全て保持しているなら、サーバ部103にトークンを要求することなく、クライアント部102が保持する(キャッシュしている)データを使って、ユーザプログラム202の要求を処理する(図8のステップ801−>802)。その後、クライアント部102は、図3のメイン動作フローチャートの処理ループに戻る。
【0061】
一方、クライアント部102は、もし不足するトークンが存在するなら、そのトークンをLAN106(図1)を介してサーバ部103に要求し、サーバ部103からの応答を待つ(図8のステップ801−>803,ステップ804−>805−>804の処理ループ)。なお、タイムアウト時には、クライアント部102は、エラー処理を実行し(図4のステップ403−>404)、その後、図3のメイン動作フローチャートの処理ループに戻る。
【0062】
クライアント部102は、サーバ部103から応答を受信すると、その応答に基づいてユーザプログラム202の要求を処理する(図8のステップ804−>807)。その後、クライアント部102は、図3のメイン動作フローチャートの処理ループに戻る。
4)クライアント部102でのファイル時刻操作処理
任意のノード101において、ユーザプログラム202(図2)がファイル105に関するファイル時刻を要求すると、同一のノード101内のクライアント部102がその要求を受け取る(図3のステップ307の判定がYES)。この結果、クライアント部102は、ファイル時刻操作処理を実行する(図3のステップ308)。図9は、クライアント部102が実行する図3のステップ308のファイル時刻操作処理の動作フローチャートである。
【0063】
まず、クライアント部102は、ユーザプログラム202から指定されたファイル105について、read権の時刻トークンのみを保持しているかどうかを調べる(図9のステップ901)。この判定がYESならば、クライアント部102は、自身が保持するファイル時刻をユーザプログラム202に応答する(図9のステップ903)。その後、クライアント部102は、図3のメイン動作フローチャートの処理ループに戻る。
【0064】
上記判定がNOならば、クライアント部102は次に、ユーザプログラム202から指定されたファイル105について、read権とwrite 権の各時刻トークンを保持しており、かつ前回サーバ部103から上記ファイル105に関するファイル時刻を取得してからそのファイル105に未アクセスであるかどうかを調べる(図9のステップ902)。この判定がYESの場合にも、クライアント部102は、自身が保持するファイル時刻をユーザプログラム202に応答する(図9のステップ903)。その後、クライアント部102は、図3のメイン動作フローチャートの処理ループに戻る。
【0065】
上記ステップ903の判定もNOならば、クライアント部102は、LAN106を介してサーバ部103に、自クライアント部102でのそのファイル105に関するファイルアクセスの有無を付加した要求であって、read権の時刻トークンの獲得要求を送信する(図9のステップ904)。
【0066】
その後、クライアント部102は、サーバ部103からの応答を待つ(図9のステップ905−>906−>905の処理ループ)。なお、タイムアウト時には、クライアント部102は、エラー処理を実行し(図9のステップ906−>907)、その後、図3のメイン動作フローチャートの処理ループに戻る。
【0067】
クライアント部102は、サーバ部103からファイル時刻を受信すると、そのファイル時刻をユーザプログラム202に応答する(図9のステップ905−>908)。また、クライアント部102は、そのファイル時刻を、クライアント部102内の上記ファイル105に対応するキャッシュ領域に保持する(図9のステップ909)。さらにクライアント部102は、上記キャッシュ領域において、上記ファイル105に対してファイルアクセスなしの状態を設定する(図9のステップ910)。
5)サーバ部103でのread権の時刻トークンの応答処理
任意のノード101において、クライアント部102が、前述した図3のステップ308及び図9のファイル時刻操作処理を実行することによって、サーバ部103にread権の時刻トークンを要求すると(図9のステップ904)、サーバ部103が、それを受け取ることにより(図5のステップ502の判定がYES)、read権の時刻トークンの応答処理を実行する(図5のステップ503)。図10は、サーバ部103が実行する図5のステップ503の応答処理の動作フローチャートである。
【0068】
サーバ部103は、クライアント部102からread権の時刻トークンの獲得要求を受信すると、まずその時刻トークンに対応するwrite 権の時刻トークンを保持するクライアント部102が存在するかどうかを調べる(図10のステップ1001)。
【0069】
この判定がYESの場合は、クライアント部102は、上記write 権の時刻トークンを保持する全てのクライアント部102に、そのwrite 権の時刻トークンの回収要求を発行し、全てのクライアント部102からの応答を待つ(図10のステップ1001−>1002,ステップ1003−>1004−>1003の処理ループ)。なお、タイムアウト時には、サーバ部103は、エラー処理を実行し(図10のステップ1004−>1005)、その後、図5及び図6のメイン動作フローチャートの処理ループに戻る。
【0070】
これに対して、各クライアント部102では、要求されたwrite 権の時刻トークンの回収処理を実行する(図3のステップ309−>310)。具体的には、各クライアント部102は、要求されたwrite 権の時刻トークンを無効化すると共に、その時刻トークンに対応するファイル105に対するファイルアクセスの有無を、サーバ部103への応答に付加する。
【0071】
サーバ部103は、ステップ1001の判定がNOであった場合、又は上記write 権の時刻トークンを保持する全てのクライアント部102からの応答を受信した場合に、read権の時刻トークンを要求しているクライアント部102に応答するファイル時刻を決定する(図10のステップ1006)。具体的には、要求元を含めて(図9のステップ904参照)、いずれかのノード101のクライアント部102がファイルアクセス有りを応答した場合は、サーバ部103は、自身がメタデータ104として保持する該当ファイル時刻を、現時刻により更新する。なお、各クライアント部102からファイルアクセス相対時刻間隔(何秒前にアクセスしたかを示すデータ)を応答させるようにし、応答された各クライアント部102からのファイルアクセス相対時刻間隔のうち最も小さい値によって、メタデータ104内の時刻を更新する(すなわち、[“現時刻”−“最も小さいファイルアクセス相対時刻間隔]にする)ように構成されてもよい。一方、いずれのノード101もファイルアクセス無しを応答した場合は、サーバ部103は、自身が保持するメタデータ104中の該当ファイル時刻を、そのまま使用する。
【0072】
続いて、サーバ部103は、決定したメタデータ104中のファイル時刻を、read権の時刻トークンを要求したクライアント部102に応答する(図10のステップ1007)。
【0073】
最後に、サーバ部103は、要求元のクライアント部102にread権の時刻トークンを渡したことをサーバ部103の主記憶中に記憶する(図10のステップ1008)。
【0074】
その後、サーバ部103は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
6)サーバ部103でのwrite 権の時刻トークンの応答処理
任意のノード101において、クライアント部102が、前述した図3のステップ304及び図8のread操作処理又は図3のステップ306及び図8のwrite 操作処理を実行することにより、サーバ部103にwrite 権の時刻トークンを要求すると、サーバ部103が、それを受け取ることにより(図5のステップ504の判定がYES)、write 権の時刻トークンの応答処理を実行する(図5のステップ505)。図11は、サーバ部103が実行する図5のステップ505の応答処理の動作フローチャートである。
【0075】
サーバ部103は、クライアント部102からwrite 権の時刻トークンの獲得要求を受信すると、まずその時刻トークンに対応するread権の時刻トークンを保持するクライアント部102が存在するかどうかを調べる(図11のステップ1101)。
【0076】
この判定がYESの場合は、クライアント部102は、上記read権の時刻トークンを保持する要求クライアント部102を除く全てのクライアント部102に、そのread権の時刻トークンの回収要求を発行し、全てのクライアント部102からの応答を待つ(図11のステップ1101−>1102,ステップ1103−>1104−>1103の処理ループ)。なお、タイムアウト時には、サーバ部103は、エラー処理を実行し(図11のステップ1104−>1105)、その後、図5及び図6のメイン動作フローチャートの処理ループに戻る。
【0077】
これに対して、各クライアント部102では、要求されたread権の時刻トークンの回収処理を実行する(図3のステップ309−>310)。具体的には、各クライアント部102は、要求されたread権の時刻トークンを無効化し、サーバ部103に応答を返す。
【0078】
サーバ部103は、ステップ1101の判定がNOであった場合、又は上記read権の時刻トークンを保持する全てのクライアント部102からの応答を受信した場合に、write 権の時刻トークンを、要求クライアント部102に応答する (図11のステップ1106)。
【0079】
最後に、サーバ部103は、要求元のクライアント部102にwrite 権の時刻トークンを渡したことをメタデータ104中に記憶する(図11のステップ1107)。
【0080】
その後、サーバ部103は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
上述の2)〜6)で示したように、本実施の形態では、ユーザプログラム202がファイル105のread操作処理又はwrite 操作処理を実行するときには、該当クライアント部102はそのファイル105についてのwrite 権の時刻トークンを使用する。この際、クライアント部102はそのファイル105についてのwrite 権の時刻トークンを保持していなければサーバ部103にそれを要求する。これに応答してサーバ部103は、他のノード101からそのファイル105に対応するread権の時刻トークンは回収するが、write 権の時刻トークンは回収しない。従って、クライアント部102は、ユーザプログラム202が1つのファイル105に連続アクセスするような場合において、そのファイル105への最終的なアクセスが終了するまでwrite 権の時刻トークンを返却する必要も、またアクセスの有無をサーバ部103に通知する必要もなく、他のノード101との間でそのファイル105のファイル時刻の同期をとる必要がなくなる。このため、システム全体の性能を向上させることが可能となる。
【0081】
なお、上述の制御によると、write 権の時刻トークンは、ユーザプログラム202がファイル105のファイル時刻を明示的に要求し、該当クライアント部102からサーバ部103にそのファイル105についてのread権の時刻トークンが要求された場合に回収されることになるが、これだけだと、ファイル時刻の要求が発生しない限り、ファイル105のファイル時刻がいつまでたってもサーバ部103側で確定しないことになる。これを防ぐために、例えば、クライアント部102は、ユーザプログラム202がファイル105をクローズしたタイミングで、サーバ部103にファイルアクセスの有無を通知し、サーバ部103はそれを受けてメタデータ104中の該当ファイル時刻を更新するように構成することができる。
7)サーバ部103でのデータトークンの応答処理
任意のノード101において、クライアント部102が、前述した図3のステップ304及び図8のread操作処理又は図3のステップ306及び図8のwrite 操作処理を実行することにより、サーバ部103にデータトークンを要求すると(図8のステップ803)、サーバ部103が、それを受け取ることにより(図5のステップ506の判定がYES)、データトークンの応答処理を実行する (図5のステップ507)。図12は、サーバ部103が実行する図5のステップ507の応答処理の動作フローチャートである。
【0082】
サーバ部103は、クライアント部102からデータトークンの獲得要求を受信すると、まずその要求に矛盾するデータトークンを保持するクライアント部102が存在するかどうかを調べる(図12のステップ1201)。
【0083】
この判定がYESの場合は、クライアント部102は、上記データトークンを保持する全てのクライアント部102に、そのデータトークンの回収要求を発行し、全てのクライアント部102からの応答を待つ(図12のステップ1201−>1202,ステップ1203−>1204−>1203の処理ループ)。なお、タイムアウト時には、サーバ部103は、エラー処理を実行し(図12のステップ1204−>1205)、その後、図5及び図6のメイン動作フローチャートの処理ループに戻る。
【0084】
これに対して、各クライアント部102では、要求されたデータトークンの回収処理を実行する(図3のステップ309−>310)。具体的には、各クライアント部102は、要求されたデータトークンを無効化し、サーバ部103に応答を返す。また、回収を要求されたデータトークンがwrite 権のデータトークンである場合には、各クライアント部102は、そのwrite 権のデータトークンで示されるファイル105の範囲で自身が更新したデータをキャッシュからディスク上に書き戻し、新たにそのファイル105に割り当てたエクステント情報を、上記応答に付加する。
【0085】
サーバ部103は、上述のデータトークンを保持する全てのクライアント部102からの応答を受信した場合に、上記応答がwrite 権のデータトークンに関するものであるならば、応答されたファイル105のエクステント情報を、自身が保持するメタデータ104に反映させる(図12のステップ1203−>1206)。
【0086】
その後、サーバ部103は、要求元のクライアント部102から指定された範囲のエクステント情報が付加されたデータトークンを、上記クライアント部102に応答する(図12のステップ1207)。
【0087】
一方、クライアント部102からのデータトークンの獲得要求に矛盾するデータトークンを保持するクライアント部102が存在せずステップ1201の判定がNOで、かつファイル全体のデータトークンを応答しても競合が発生せずステップ1208の判定もNOである場合には、サーバ部103は、ファイル全体のエクステント情報とファイル全体のデータトークンを、要求元のクライアント部102に応答する(図12のステップ1201−>1208−>1209)。
【0088】
上記競合が発生する場合には、サーバ部103は、要求元のクライアント部102から指定された範囲のエクステント情報が付加されたデータトークンを、上記クライアント部102に応答する(図12のステップ1207)。
【0089】
ステップ1207又は1209の処理の後、サーバ部103は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
サーバ部103からデータトークンを取得したクライアント部102は、前述した図4のステップ405又は図8のステップ807の処理において、自身が該当ファイル105に対応するデータトークンを保持していること、及び応答されたエクステント情報を、メモリ内のキャッシュ領域に記憶する。そして、クライアント部102は、それ以降のユーザプログラム202からの要求に基づくファイルアクセス処理(図8のステップ802)は、上記エクステント情報で示される、ディスク上のブロックに対して実行する。
【0090】
上述したように、データトークンの応答時に、ファイル105のエクステント情報も同時に応答される。このため、複数のノード101は、ディスク装置内のファイル105に、LAN106経由ではなく直結された制御・データ線を介してアクセスすることが可能となる。
8)サーバ部103におけるサイズトークンの応答処理
サーバ部103は、クライアント部102からサイズトークンを要求された場合には、その要求と矛盾するサイズトークンを他のクライアント部102から回収した上で、要求されたサイズトークンにファイルサイズを付加して要求元のクライアント部102に応答する(図5のステップ506−>507)。その後、サーバ部103は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
9)サーバ部103における属性トークンの応答処理
サーバ部103は、クライアント部102から属性トークンを要求された場合には、その要求と矛盾する属性トークンを他のクライアント部102から回収した上で、要求された属性トークンにファイル属性を付加して要求元のクライアント部102に応答する(図5のステップ508−>509)。その後、サーバ部103は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
10)エクステント管理の詳細
次に、サーバ部103及びクライアント部102におけるエクステント(ディスク領域)の管理の詳細について説明する。
【0091】
まず、サーバ部103は、複数のディスクボリュームを管理することができ、メタデータ104として、ファイル105の属性データ、各ディスクボリューム毎の空きエクステントに関する情報(空きスペース情報)、及びクライアント部102に貸し出したエクステントに関する情報(リザーブスペース情報)を保持している。
【0092】
空きスペース情報とリザーブスペース情報は、図13に示されるように、空きスペースBツリー1301として管理され、そのうち空きスペース情報は空きスペースキュー1302からアクセスでき、リザーブスペース情報はリザーブスペースキュー1303からアクセスできる。
【0093】
空きスペースキュー1302は、ディスクボリューム毎に、空きスペースBツリー1301に接続されている使用可能エクステント(使用中でもリザーブ中でもないエクステント)を管理する。
【0094】
リザーブスペースキュー1303は、クライアント部102毎に、そのクライアント部102にリザーブされ空きスペースBツリー1301に接続されているエクステントを管理する。
【0095】
また、サーバ部103は、使用中のエクステントは、iノードBツリー1304によって管理する。
一方、クライアント部102は、サーバ部103に要求することによりリザーブしたエクステントを、リザーブキュー1305によって管理する。
【0096】
クライアント部102は、主記憶上にキャッシュを持ち、ユーザプログラムが要求したディスク上のデータをキャッシュする。
サーバ部103内の空きスペーアスキュー1302とクライアント部102内のリザーブキュー1305は、ディスクボリューム毎に予め決められた個数分のヘッダを有しており、各ヘッダがエクステントのサイズに対応している。例えば、ヘッダの個数を4個とすると、各ヘッダが、1〜4KB(キロバイト)、4〜16KB、16〜64KB、64〜256KBの各サイズ範囲のエクステント群(空きスペースBツリー1301)を管理する。ヘッダの個数と各ヘッダが表すサイズは、各ディスクボリュームのファイルシステムを作成したときに決定される。
【0097】
図14は、1つのノード101(図1参照)内において、ユーザプログラム202(図2参照)が、ファイル105へのデータ書き込み(write 要求)を依頼したときのエクステント管理のシーケンスを示す図である。このシーケンスにおいて、クライアント部102が実行する処理は、図3のステップ306のwrite 操作処理における図8のステップ807の処理の一部である。また、サーバ部103が実行する処理は、図5のサーバ部103のメイン動作フローチャート内の特には図示しない一部の処理である。
【0098】
図14において、ユーザプログラム202がファイル105に対するwrite 要求を発行すると、クライアント部102は、キャッシュにデータを保持する。
ユーザプログラム202がファイル105をクローズし、又はキャッシュが一杯になり、或いはサーバ部103からデータトークンの回収を要求される(図12のステップ1202参照)ことにより、キャッシュされているデータをディスクに書き出す必要が発生した場合に、クライアント部102は、サーバ部103から受け取っていたファイル105のエクステント情報(図4のステップ405参照)を調べ、その要求が既にディスク領域が割り当てられているファイル領域に対するものであるか否かを認識し、ファイル105毎にキャッシュ内でエクステントが割り当てられていない領域で隣接するものをまとめる(このまとめられたファイル領域を書出し対象領域と呼ぶ)。次に、クライアント部102は、書出し対象領域のサイズを調べると共に、その領域の性質に従って、以下の何れかの処理を実行する。
▲1▼書出し対象領域に隣接する(直前の)領域に、同じファイル105に関するエクステントが既にサーバ部103から割り当てられている場合:クライアント部102は、割り当てられているエクステントのブロックアドレスと書出し対象領域のサイズを指定して、それに続くエクステントのリザーブ(貸し出し)をサーバ部103に依頼し、応答されたエクステントにデータを書き込む。なお、サーバ部103は、依頼されたエクステントが既に割当て済みの場合には、他のエクステントを返す。
▲2▼書出し対象領域に隣接する(直前の)領域に、同じファイル105に関するエクステントがいまだサーバ部103から割り当てられていない場合:クライアント部102は、書出し対象領域のサイズに対応するリザーブキュー1305の先頭に接続されているエクステントにデータを書き出す。クライアント部102は、リザーブキュー1305から、そのエクステントを取り除く。
以上の動作の後、クライアント部102は、サーバ部103に書出し完了を通知する。この際、クライアント部102は、使用したエクステント(リザーブスペース)のアドレスと、書出し対象領域のサイズを通知する。
【0099】
サーバ部103は、通知されたエクステント(リザーブスペース)のアドレスと、書出し対象領域のサイズとから、メタデータ104内の対象ファイル105に関する属性データを更新し、リザーブスペースキュー1303及び空きスペースBツリー1301上から、クライアント部102から通知されたエクステントを取り除き、そのエクステントをIノードBツリー1304に接続する。書き出されたエクステントのサイズが使用されたリザーブスペースよりも小さい場合には、サーバ部103は、残りのエクステントを、空きスペースとして空きスペースキュー1302の当該エクステントのサイズに対応するヘッダに接続する。
11)エクステント群のリザーブ制御処理
クライアント部102は、一定時間が経過するごとに、エクステント群リザーブ要求処理を実行する(図3のステップ311−>312)。この処理では、クライアント部102は、自身がリザーブキュー1305にリザーブしているエクステント群を調べ、リザーブ量が一定値以下になった場合に、サーバ部103に一定個数のエクステント群のリザーブを要求する。この処理は、各サイズのヘッダ毎に行われ、不足が発生したヘッダ以外についても、各リザーブ量が所定値以上となるように、各ヘッダに対して上記リザーブ処理が実行される。
【0100】
サーバ部103は、エクステント群のリザーブ要求を受信すると、エクステント群のリザーブ処理を実行する(図6のステップ512−>513)。この処理では、サーバ部103は、空きスペースキュー1302に接続されている空きスペースBツリー1301中から、使用可能なエクステント群を探し、それらを空きスペースキュー1302からリザーブスペースキュー1303に繋ぎ替えた後に、そのリザーブしたエクステント群をクライアント部102に応答する。その後、サーバ部103は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
【0101】
クライアント部102は、図3のステップ312において、サーバ部103から応答されたエクステント群をリザーブキュー1305に繋ぎ、ステップ312を終了して、図3のメイン動作フローチャートの処理ループに戻る。
【0102】
サーバ部103は、自身に対してmount を行っているクライアント部102の障害を検出した場合、又はクライアント部102からunmount 要求を受信した場合には、そのクライアント部102に対してリザーブしていたリザーブスペースキュー1303中のエクステント群の解放処理を実行して、それらを空きスペースキュー1302に繋ぎ替える(図5のステップ514−>515)。その後、サーバ部103は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
【0103】
上述のように、本実施の形態では、空きエクステント群がリザーブされることにより、クライアント部102は、サーバ部103に問い合わせることなく、キャッシュを活用して新たなエクステントをファイル105に割り当てることが可能となる。このため、クライアント部102とサーバ部103との間の通信回数を削減でき、システム全体の性能を向上させることが可能となる。
【0104】
また、新たに割り当てられたエクステントは、データが書き込まれた後のクライアント部102からサーバ部103への応答によって初めて、そのファイル105のメタデータ104として記憶される。このため、悪意をもってデータを覗くことを防止することが可能となる。
12)主サーバと従サーバの同期処理
主サーバであるノード101(#1)内のサーバ部103(#1)は、例えば図7、図10、図11、図12などにおいて、メタデータ104(#1)を更新する場合は、従サーバであるノード101(#2)内のサーバ部103(#2)に対して、メタデータ変更分と時刻データを送信し、従サーバがそれらを受信したことを確認した後に、クライアント部102に応答を返す。
【0105】
従サーバであるノード101(#2)内のサーバ部103(#2)は、上述のメタデータ変更分と時刻データを受信すると、メタデータ変更分を自身のメタデータ104(#2)に反映させると共に、送られてきた時刻データを記憶する (図6のステップ516−>517)。その後、サーバ部103(#2)は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
13)主サーバにおける障害発生時の、従サーバへの切替処理
従サーバであるノード101(#2)内のサーバ部103(#2)は、主サーバであるノード101(#1)内のサーバ部103(#1)の障害を監視しており、その障害を検出した場合には、サーバ切替処理を実行する(図6のステップ518−>519)。このとき、サーバ部103(#2)は、最後に主サーバであるサーバ部103(#1)から送られてきた時刻を過ぎるまで、自身の時刻の待ち合せを実行する。その後、サーバ部103(#2)は、図5及び図6のメイン動作フローチャートの処理ループに戻る。
【0106】
上述の制御により、サーバ切替時にも、矛盾のないファイル時刻の付与が可能となる。
次に、上述したようなノード間ファイル共用管理システムにおいて、分散ファイルシステムの耐故障性を高めるためのログ制御機構を実現するための実施の形態について説明する。
【0107】
図15は、ログ制御機構を実装したノード間ファイル共用管理システムの基本構成図である。
共用ファイル管理装置1501(図1のサーバ部103を有するノード101に対応する)は、共用されるファイルの「属性」や「実ディスク上での格納位置」などの、ファイルごとに存在する制御情報(ファイル情報と呼ぶ)と、実ディスクの空き領域などを示す制御情報(ディスク情報と呼ぶ)を保持している。これら2つの管理情報を総称してメタデータ1502(図1のメタデータ104に対応する)と呼び、障害に備えディスク上に格納されている。
【0108】
共用ファイル管理装置1501は、データを共用する#1〜#nの各ノード1503(クライアント部102を有するノード101に対応する)からの要求に従い、メタデータ1502をディスクから読み込み或いは更新し、ファイル情報を応答として返す。この際、異なる複数のメタデータブロックがアクセスされる可能性がある。
【0109】
各ノード1503は、返されたファイル情報をメモリ上にキャッシュし、それ以降必要が生ずるまで、共用ファイル管理装置1501と通信することなく、キャッシュされたメモリ上のファイル情報のみを用いて処理を実行する。
【0110】
各ノード1503がそれぞれのキャッシュ上に保持するファイル情報相互間の一貫性を保証するために、トークンが使用される。
トークンは、ファイル情報がノード1503に返される際に共用ファイル管理装置1501によりそのノード1503に対して発行され、共用ファイル管理装置1501が或るノード1503から矛盾する要求を受け付けたときに共用ファイル管理装置1501によって必要なノード1503から回収される。
【0111】
回吸を指示されたノード1503は、トークンによって指示されるキャッシュデータを無効化し、他ノード1503に伝えられるべき自身が行なったファイル情報の変更を応答する。
【0112】
応答を受けた共用ファイル管理装置1501は、通知された変更をメタデータ1502に反映した後に、要求に基づく処理を再開し、要求元に対して結果を応答すると共にトークンを発行する。
【0113】
共用ファイル管理装置1501が各ノード1503からの要求を処理するためには、メタデータ1502へのアクセスが必要となる。この場合に、毎回ディスクをアクセスしていたのでは性能が悪くなる。このため、ディスク上のデータを保持するバッファキャッシュ1504が共用ファイル管理装置1501内に設けられ、ディスクアクセスが削減される。バッファキャッシュ1504は、ディスク上の各ブロックに対応したエントリを持ち、各エントリにそのエントリのロックの有無を表示するためのロックワードが用意されることにより、或るスレッドが更新中のデータを他の要求を処理している他のスレッドが参照することが抑止される。
【0114】
メタデータ1502の実ディスクへの反映は、要求処理が全て正常に終了した時点、いわゆるトランザクション完了時まで遅らされる。トランザクションが正常に終了すると、バッファキャッシュ1504上に保持されている更新データが一括してログファイル1505に書き出され、その後、更新データのディスクへの反映タイミングがスケジュールされる。
【0115】
ログファイル1505はサイクリックに使用され、実ディスクへの書き込みが完了するたびに、書出しが完了した変更を保持するログ領域は空き領域に戻される。従って、実ディスクへの書出しがまだ完了していない、成功した要求に伴うメタデータの変更は必ずログファイル1505上に存在するので、共用ファイル管理装置1501で障害が発生しても、メタデータ1502の復旧は容易にかつ高速に行なえるという特徴を有する。
【0116】
次に、本実施の形態に係る上記基本構成に基づくロック継承制御処理につき、図16の説明図に基づいて説明する。尚、複数のクライアントから発行れる同一ファイルに対する操作要求を逐次化するためのファイル管理装置1501はファイル毎に用意するファイルロックを使用する。
【0117】
本実施の形態では、1つのノード1503からの要求を処理するために共用ファイル管理装置1501上で実行される第1の実行単位(スレッド)は、他のノード1503に発行しているトークンを回収する場合に、トークン処理の対象となっているファイルを示す情報を保持したトークン回収制御表1602をトークン回収待ちキュー1601につなぎ、該当するノード1503に対してトークン回収要求を送信した後、トークン回収完了メッセージの到着を待ち合わせる。
【0118】
トークンを保持しているノード1503におけるキャッシュの無効化が完了しそこから共用ファイル管理装置1501(図15)にトークン回収完了メッセージが通知されると、トークン回収完了メッセージを処理するために共用ファイル管理装置1501上で実行される第2の実行単位(スレッド)が、トークン回収待ちキュー1601を調べ、そのメッセージに対応するトークン回収制御表1602がキュー上に存在するならば、その制御表に「ロック縫承中」を表示した上で、メタデータ1502(図15)の更新処理及びトークンの解放処理を実行する。
【0119】
トークン回収完了メッセージの到着を待ち合わせていた第1の実行単位の待ちは、第2の実行単位によるトークン解放処理の結果解かれる。
各ノード1503は、共用ファイル管理装置1501からの要求に基づかずに自律的に、トークン回収完了メッセージを共用ファイル管理装置1501に通知することもできる。従って、トークン回収完了メッセージが共用ファイル管理装置1501に到着した際に、トークン回収待ちキュー1601に該当するトークン回収制御表1602がつながっていない場合が起こり得る。このようなときには、上記第2の実行単位は、通常のファイルロック獲得処理を実行し、この結果他の実行単位がファイルロックを保持していればファイルロックの解放を待ち合わせ、ファイルロックがはずれたらメタデータの更新処理及びトークン解放処理を実行する。
【0120】
上記第1の実行単位は、複数のノード1503に対してトークン回収要求を送信する可能性がある。このような場合には、共用ファイル管理装置1501は、複数のノード1503からトークン回収完了メッセージを相次いで受信する可能性がある。上記第2の実行単位は、第1番目のトークン回収完了メッセージを受信した時点で該当するトークン回収制御表1602にロック継承中を表示する。そして、第2番目以降のトークン回収完了メッセージを受信した他の各実行単位は、対応するトークン回収制御表1602にロック継承中が表示されていた場合には、継承中表示がオフとなるのを待ち合わせ、待ちが解けた時点でメタデータの更新処理及びトークン解放処理を実行する。このように、ロックの継承を行うことのできる実行単位は1つに制限される。
【0121】
以上のロック継承制御により、トークン制御において、デッドロックの発生を回避することのできる効率的なファイルロック制御が実現される。
次に、本実施の形態に係る図15に示される基本構成に基づくデッドロック検出処理について、図17の説明図に基づき説明する。
【0122】
共用ファイル管理装置1501(図15)は、各ファイルを管理するファイル制御表1701に、ファイルロックワード1701aに対応して、そのファイルロックを保持している実行単位(スレッド)を示すオーナ1701bを設定し、また、各バッファキャッシュ1504(図15)のエントリを管理するバッファキャッシュ制御表1702に、バッファキャッシュロックワード1702aに対応して、そのバッファキャッシュロックを保持している実行単位(スレッド)を示すオーナ1702bを設定する。
【0123】
また、共用ファイル管理装置1501は、各実行単位(スレッド)を管理するスレッド制御表1703に、その実行単位が待ち合わせしている対象を特定する情報である待ちリソース1703aと、その待ち合わせの原因を示す情報であるタイプ1703bを設定する。待ちリソース1703aとタイプ1703bには下記の何れかの設定が行われる。
1.ファイルロックの解放を待ち合わせる場合:
・タイプ1703bには、ファイルロック待ちを設定。
【0124】
・待ちリソース1703aには、該当するファイル制御表1701内のファイルロックワード1701aを指示する情報を設定。
2.バッファキャッシュロックの解放を待ち合わせる場合:
・タイプ1703bには、バッファキャッシュロック待ちを設定。
【0125】
・待ちリソース1703aには、該当するバッファキャッシュ制御表1702内のバッファキャッシュロックワード1702aを指示する情報を設定。
3.トークン回収を待ち合わせる場合:
・タイプ1703bには、トークン回収待ちを設定。
【0126】
・待ちリソース1703aには、該当するファイルを指示する情報を設定。
以上の情報を使い、各スレッド(実行単位)は、以下のようにデッドロックを検出する。
<スレッド(以下、スレッドAという)がファイルロックを要求した場合>
ステップ1:スレッドAは、ファイルロックの解放待ちに入る前に、そのファイルに対応するファイル制御表1701内のファイルロックワード1701aとオーナ1701aとから、そのファイルロックを保持しているスレッド(以下、スレッドBという)に対応するスレッド制御表1703を取得する。
ステップ2:スレッドAは、そのスレッド制御表1703内の待ちリソース1703aとタイプ1703bとから、スレッドBが待ち合わせている資源を求める。スレッドBが待ち合わせている資源がないかスレッドBがトークン回収を待ち合わせているならば、スレッドAは、デッドロックは発生していないと判定し、ファイルロックの解放待ちに入る。
ステップ3:スレッドBがトークン回収の待ち合わせ以外の待ち合わせをしている場合には、スレッドAは、スレッドBが待ち合わせている資源に対するロックを保持しているスレッドを求める。
ステップ4:スレッドAは、ステップ3で求めたスレッドがスレッドA自身ならば、デッドロックが発生したと判定し、スレッドA自身が実行しているトランザクションをキャンセルする。そうでなければ、スレッドAは、ステップ2の処理を繰り返す。
<スレッドAがバッファキャッシュロックを要求した場合>
ステップ1:スレッドAは、バッファキャッシュロックの解放待ちに入る前に、そのバッファキャッシュエントリに対応するバッファキャッシュ制御表1702内のバッファキャッシュロックワード1702aとオーナ1702bとから、そのバッファキャッシュロックを保持しているスレッドBに対応するスレッド制御表1703を取得する。
ステップ2:スレッドAは、そのスレッド制御表1703内の待ちリソース1703aとタイプ1703bとから、スレッドBが待ち合わせている資源を求める。スレッドBが待ち合わせている資源がないならば、スレッドAは、デッドロックは発生していないと判定し、バッファキャッシュロックの解放待ちに入る。
ステップ3:スレッドAは、スレッドBが待ち合わせている資源がトークン回収待ちという資源で且つトークン回収待対象ファイルのファイルロックをスレッドAが保持しているならば、デッドロックが発生したと判定する。
ステップ4:スレッドAは、スレッドBが待ち合わせている資源に対するロックを保持しているスレッドを求める。
ステップ5:スレッドAは、ステップ4で求めたスレッドがスレッドA自身ならば、デッドロックが発生したと判定し、スレッドA自身が実行しているトランザクションをキャンセルする。そうでなければ、スレッドAは、ステップ2の処理を繰り返す。
以上説明したデッドロックの検出処理により、トークンに基づいてトランザクション制御されているメタデータ1502等の更新処理におけるデッドロックの発生を適切に検出することができる。
【0127】
次に、本実施の形態に係る図15に示される基本構成に基づくログファイルの2次キャッシュ制御処理につき、図18の説明図に基づいて説明する。
2次キャッシュ1801は、ログファイル1505(図15)には書出しが完了しているが、ディスクへの反映は完了していないメタデータ1502を保持するキャッシュで、トランザクションキャンセル時の性能劣化の防止、通常処理での性能向上を図るために、共用ファイル管理装置1501上に設けられる。
【0128】
トランザクションが正常終了した場合、バッファキャッシュ1504上で更新されたデータは2次キャッシュ1801に送られ、変更表示がオンされる。
ログファイル1505の空き領域が不足してくると、2次キャッシュ1801上の変更表示がオンになっているデータが実ディスクに書き出され、変更表示がリセットされる。
【0129】
バッファキャッシュ1504から2次キャッシュにデータが移動させられる際に、2次キャッシュ1801の空き領域がなければ、変更表示がオンされていない2次キャッシュ領域が再使用される。
【0130】
もし、全てのページの変更表示がオンされているならば、一定の量の変更されたページが実ディスクに書き出され、変更表示がオフにさせられた後に再使用される。
【0131】
必要なメタデータ1502がバッファキャッシュ1504上に存在しない場合には、2次キャッシュ1801にデータが存在するならばそのデータが2次キャッシュ1801からバッファキャッシュ1504にコピーされる。必要なデータが2次キャッシュ1801にも存在しない場合には、そのデータがディスクからバッファキャッシュ1504に読み込まれる。
【0132】
以上説明した2次キャッシュ制御処理により、バッファキャッシュ1504の変更内容を実ディスク上に書き出すログフラッシュ処理を、実行中のトランザクションと独立して行うことが可能となり、システム性能の向上が実現される。
【0133】
続いて、本実施の形態に係る図15に示される基本構成に基づく、ログデータ量を削減できるログ制御処理につき、図19の説明図に基づいて説明する。
メタデータ1502がバッファキャッシュ1504上で更新された場合に、スレッドごとに存在するログキュー1901に、更新されたメタデータ1502の範囲を示す情報を記憶したログ制御表1902が追加される。この情報は、図19に示されるように、バッファキャッシュ1504上のエントリを指示するエントリIDと、そのエントリに属する範囲の始点アドレスstartと終点アドレスendとからなる。
【0134】
この際、ログキュー1901がサーチされ、ログキュー1901上に、更新されたメタデータ1502の範囲に対してオーバラップするか隣接する範囲を表すログ制御表1902が既に存在するならば、旧制御表1902の範囲が変更させられるだけで、新しいログ制御表1902は作成されない。
【0135】
トランザクションが正常に終了した場合、ログキュー1901上のログ制御表1902から、変更されたメタデータ1502が認識され、それがログファイル1505にログデータとして書き出される。書出しが完了したら、該当するバッファキャッシュ1504のエントリに対するロックが解放される。
【0136】
トランザクションが失敗に終った場合には、ログキュー1901から更新されたメタデータ1502が認識され、該当するバッファキャッシュ1504上のエントリが無効化される。
【0137】
以上説明したログ制御処理により、ログファイル1505に書き出されるログデータ量の削減が実現される。
最後に、本実施の形態に係る図15に示される基本構成に基づく、トランザクションキャンセル時におけるメモリ常駐制御表のリストア制御処理につき、図20の説明図に基づいて説明する。
【0138】
トランザクション処理の途中でデッドロック条件が検出されたり要求元のエラーなどが検出されることによりトランザクションがキャンセルされる場合には、バッファキャッシュ1504(図15)の無効化が行なわれる。これと共に、スレッドごとに存在するファイルロックキュー2001に接続されている各ファイル制御表2002がサーチされることにより、トランザクションの過程で獲得され解放されていないファイルロックが、全て解放させられる。
【0139】
ここで、ファイル制御表2002には、ファイルロックの獲得に伴って、共用ファイル管理装置1501(図15)内のメモリ上に存在する常駐制御表2003が書き換えられた場合に、その更新を示す制御表更新フラグが設定される。なお、1つのファイル制御表2002には、複数の常駐制御表2003に対応する複数の制御表更新フラグを、制御表更新マップとして設定することができる。
【0140】
今、トランザクションのキャンセルに伴いファイルロックが解除される際に、それに対応するファイルロックワードが設定されていたファイル制御表2002において何れかの制御表更新フラグがオンになっている場合には、ファイルロックの再獲得時にその制御表更新フラグに対応する常駐制御表2003のリロードが必要なことを示すリロードインジケータ(複数可)が表示された上で、ファイルロックが解放させられる。
【0141】
トランザクションがデッドロック検出等によりキャンセルされた場合には、その後、そのトランザクションに対応する要求が始めからから再試行される。そして、ファイルロックの再獲得時に、それに対応するファイルロックワードが設定されていたファイル制御表2002に何れかのリロードインジケータが表示されているならば、ファイルロックの獲得後に上記リロードインジケータによって指示される常駐制御表2003が、メタデータ1502(図15)の情報を使ってメモリ上に再構築される。
【0142】
以上説明したリストア制御処理により、トランザクションのキャンセルに伴う常駐制御表2003の高速なリストアが実現される。
ここで、本発明は、コンピュータにより使用されたときに、上述の本発明の実施の形態によって実現されるクライアント部102の機能又はサーバ部103の機能と同様の機能をコンピュータに行わせるためのコンピュータ読出し可能記録媒体として構成することもできる。この場合に、例えばフロッピィディスク、CD−ROMディスク、光ディスク、リムーバブルハードディスク等の可搬型記録媒体や、ネットワーク回線経由で、本発明の実施の形態の各種機能を実現するプログラムが、ノードを構成するコンピュータの本体内のメモリ(RAM又はハードディスク等)にロードされて、実行される。
【0143】
【発明の効果】
本発明の第1の態様の構成によれば、例えばopen要求時等においてファイル全体のトークンが引き渡されることにより、可能な限り新たなトークン要求を行わずにファイルへの連続アクセスが可能となる。データベースアクセス等を除く一般的なファイルアクセスでは、1つのノードからのwrite 要求の発行時に他のノードからread命令が発行される確率は小さい。従って、1つのノードに引き渡されたファイル全体のトークンが回収される確率も低く、ファイルへの連続アクセス時にアクセス単位ごとにトークン要求が不要になることによる性能向上が期待できる。
【0144】
本発明の第2の態様の構成によれば、クライアント装置は、ユーザプログラムが1つのファイルに連続アクセスするような場合において、そのファイルへの最終的なアクセスが終了するまでwrite 権の時刻トークンを返却する必要もまたアクセスの有無をサーバ部に通知する必要もなく、他のノードとの間でそのファイルのファイル時刻の同期をとる必要がなくなる。このため、システム全体の性能を向上させることが可能となる。
【0145】
本発明の第3の態様の構成によれば、ファイルの最終ブロックにアクセスするのでなければ、サイズトークンを獲得することなくファイルにアクセスすることが可能となり、これと並行して、他のノードは、サイズトークンを獲得してファイルの最終ブロックにアクセスし、ファイルのサイズを拡張するwrite 操作処理を実行することができる。このため、例えばファイルを拡張するプログラムとファイルをその先頭から順に読むプログラムをそれぞれ異なるノードで同時に実行させることが可能となり、システム全体の性能を向上させることができる。
【0146】
本発明の第4の態様の構成によれば、複数のノードは、ディスク装置内のファイルに、LAN経由ではなく直結された制御・データ線を介してアクセスすることが可能となる。
【0147】
本発明の第5の態様の構成によれば、サーバ切替時にも、矛盾のないファイル時刻の付与が可能となる。
本発明の第6の態様の構成によれば、クライアント装置は、サーバ装置に問い合わせることなく、新たなブロックをファイルに割り当てることが可能となる。このため、クライアント装置とサーバ装置との間の通信回数を削減でき、システム全体の性能を向上させることが可能となる。更に、サイズ毎にリザーブすることにより最適な連続ブロックを割り当てフラグメンテーションを防止すると共にファイルアクセス性能を向上させることができる。また、新たに割り当てられたエクステントは、データが書き込まれた後のクライアント装置からサーバ装置への応答によって初めて、そのファイルのメタデータ等として記憶される。このため、悪意をもってデータを覗くことを防止することが可能となる。
【0148】
本発明の第7の構成によれば、トークン制御において、デッドロックの発生を回避することのできる効率的なファイルロック制御が実現される。
本発明の第8の構成によれば、トークンに基づいてトランザクション制御されているメタデータ等の更新処理におけるデッドロックの発生を適切に検出することができる。
【0149】
本発明の第9の構成によれば、トランザクションのキャンセルに伴う常駐制御表の高速なリストアが実現される。
本発明の第10の構成によれば、ログファイルに書き出されるログデータ量の削減が実現される。
【0150】
本発明の第11の構成によれば、ログファイルを実ディスク上に書き出すログフラッシュ処理を、実行中のトランザクションと独立して行うことが可能となり、システム性能の向上が実現される。
【図面の簡単な説明】
【図1】本発明の実施の形態のシステム構成図である。
【図2】ノード内のソフトウェア構成図である。
【図3】クライアント部のメイン動作フローチャートである。
【図4】クライアント部のopen操作処理の動作フローチャートである。
【図5】サーバ部のメイン動作フローチャート(その1)である。
【図6】サーバ部のメイン動作フローチャート(その2)である。
【図7】サーバ部のopen操作処理の動作フローチャートである。
【図8】クライアント部のread/write操作処理の動作フローチャートである。
【図9】クライアント部のファイル時刻操作処理の動作フローチャートである。
【図10】サーバ部でのread権の時刻トークンの応答処理の動作フローチャートである。
【図11】サーバ部でのwrite 権の時刻トークンの応答処理の動作フローチャートである。
【図12】サーバ部でのデータトークンの応答処理の動作フローチャートである。
【図13】エクステント管理の詳細を示す図である。
【図14】エクステント管理のシーケンス図である。
【図15】ログ制御機構を実装したノード間ファイル共有管理システムの基本構成図である。
【図16】ロック継承制御処理の説明図である。
【図17】デッドロック検出処理の説明図である。
【図18】ログファイルの2次キャッシュ制御の説明図である。
【図19】ログデータ量を削減できるログ制御処理の説明図である。
【図20】トランザクションキャンセル時におけるメモリ常駐制御表のリストア処理の説明図である。
【符号の説明】
101、1503 ノード
102 クライアント部
103 サーバ部
104、1502 メタデータ
105 ファイル
106 LAN
201 オペレーティングシステム(OS)
202 ユーザプログラム
1501 共用ファイル管理装置
1504 バッファキャッシュ
1505 ログファイル
1601 トークン回収待ちキュー
1602 トークン回収制御表
1701、2002 ファイル制御表
1701a、1702a ファイルロック
1701b、1702b オーナ
1702 バッファキャッシュ制御表
1703 スレッド制御表
1703a 待ちリソース
1703b タイプ
1801 2次キャッシュ
1901 ログキュー
1902 ログ制御表
2001 ファイルロックキュー
2003 常駐制御表
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a consistency guarantee control technique for an inter-node shared file system (distributed file system) that makes it possible to share the same file from a plurality of nodes (host computers).
[0002]
[Prior art]
In a distributed file system, a method for maintaining the consistency (consistency, consistency) of data cached on a plurality of nodes using a token is well known. In a typical method, a token for performing multiple-read / single-write control is prepared for each file access range (usually, the beginning and end of a block number are used). Then, the node attempting to access the file checks whether or not it holds a token within the access range, and if not, requests the token from the server managing the token. The server managing the token executes the access right control so that the read right is allowed to be passed to multiple nodes (multiple-read) and the write right is passed to only one node (single-write). To do.
[0003]
[Problems to be solved by the invention]
The conventional method described above is an effective method for reducing communication between the server and the client while maintaining consistency of data cached in each node, but has the following problems.
1) It is necessary to acquire a token every time a file is accessed. For example, when a user accesses a huge file for scientific calculation sequentially, the user is forced to issue a request for acquiring a token to the server each time a file access request is made for each specific byte. Absent. This fact leads to an increase in overhead.
2) In order to guarantee the validity of the file access time (file time) that holds the time when the file was last accessed, the user must notify the server of the existence of the access each time a file access request is issued. I don't get it. This fact leads to an increase in overhead.
3) When updating the file size, the user notifies the server to that effect, and the server must collect all tokens issued to other nodes. For this reason, for example, a program for extending a file and a program for reading the file in order from the head cannot be executed simultaneously on different nodes, resulting in a problem that the performance of the entire system deteriorates.
4) In a system having a function in which servers are duplicated and the active server is switched to the standby server in the event of a failure, the clock that has been operated up to the time of switching to the standby server is also used as the clock in the standby server. Since it is switched, there is a possibility that the reverse of the file time may occur. This fact leads to loss of data consistency.
5) When applying the method of reducing the data transfer through the network by sharing the disk directly between nodes, as adopted in the mainframe, to an open file system characterized by discrete files. Each node needs to communicate with the server each time a block is allocated on the file system. This fact leads to an increase in overhead.
On the other hand, in a distributed file system using tokens, since a plurality of nodes perform concurrent access, sufficient consideration must be given to the fault tolerance of the file system. In general, as a method for improving the fault tolerance of a file system, a log method in which a log file is provided and metadata is updated transactionally is known. In the log method, in general, so-called two-phase lock control is performed due to the restriction that the result of processing a single transaction must not be shown to other transactions. In this control, the locks necessary for the update are acquired in order, and when all the updates are completed, the metadata update contents are written to the log file lock at the same time, and the lock is locked when the export is completed. Returned in bulk. A deadlock accompanying multiple lock acquisitions that occur inevitably at this time is automatically detected using a directed graph showing resource acquisition, and one transaction causing the deadlock is canceled and retried. In general, a method that can be eliminated by being used is used.
[0004]
However, a general-purpose system that automatically detects deadlock by applying the log system as described above to the token system and recovers it has not been devised.
Further, the conventional log method has a defect that the log is collected in units of cache blocks and the actual update of the file system occurs at the end of the transaction, resulting in a relatively large amount of I / O.
[0005]
Also, with the above log method, data restoration processing at the time of transaction cancellation is limited to only metadata, and control tables that reside in memory prepared for performance improvement are excluded, so there is a defect that it is difficult to create a program had.
[0006]
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems in an inter-node shared file system using tokens, and suppresses an increase in overhead and a decrease in system performance due to file access, and also in a duplex server system. An object of the present invention is to solve the problems in the performance and program creation of the conventional log method by preventing the reversal of the file time at the time of server switching, and further updating the metadata consistently and deadlock-free.
[0007]
[Means for Solving the Problems]
The present invention receives a file operation request from a user program, and a client device in one node acquires a token from a server device in the same or another node and then processes the file operation request. Suppose an inter-node shared file control system that enables sharing of the same file from a plurality of nodes.
[0008]
The first aspect of the present invention has the following configuration.
First, when a token is requested from the client device to the server device, the server device determines whether or not there is contention for the token among a plurality of client devices.
[0009]
If there is no conflict, the token of the entire file is returned from the server device to the client device.
With the configuration of the first aspect of the present invention having the above configuration, for example, when a token of the entire file is delivered at the time of an open request, continuous access to the file is possible without making a new token request as much as possible. It becomes. In general file access except database access, the probability that a read command is issued from another node when a write request from one node is issued is small. Therefore, the probability that the token of the entire file delivered to one node is collected is low, and performance improvement can be expected by eliminating the need for a token request for each access unit during continuous access to the file.
[0010]
The second aspect of the present invention has the following configuration.
First, a time token for controlling the file time is communicated between the client device and the server device.
[0011]
In the server device, control is performed to simultaneously respond to a plurality of client devices with a write right time token that allows the file time to be changed.
In addition, after the time token of the write right is acquired in the client device, the file access is executed without inquiring the file time from the server device.
[0012]
In the server device, the write time token is collected from the client device at a predetermined timing, and the file time managed by itself is updated.
In the configuration of the second aspect of the present invention having the above configuration, when the user program continuously accesses one file, the client device has the write right until the final access to the file is completed. There is no need to return the time token or to notify the server unit of access, and there is no need to synchronize the file time of the file with other nodes. For this reason, it becomes possible to improve the performance of the whole system.
[0013]
The third aspect of the present invention has the following configuration.
First, a size token for controlling the extension of the file size is communicated between the client device and the server device.
[0014]
In the client device, only when the last block of the file is accessed, a size token corresponding to the file is acquired from the server device, and then the last block is accessed.
[0015]
In the configuration of the third aspect of the present invention having the above configuration, the file can be accessed without acquiring a size token unless the last block of the file is accessed. The node can acquire a size token, access the last block of the file, and execute a write operation process for expanding the size of the file. For this reason, for example, it is possible to simultaneously execute a program for expanding a file and a program for reading the file in order from the head on different nodes, and the performance of the entire system can be improved.
[0016]
The fourth aspect of the present invention has the following configuration.
First, a data token for controlling access to file data is communicated between the client device and the server device.
[0017]
At the time of communication of the data token, extent information indicating the position on the disk of the file corresponding to the data token is communicated.
In the configuration of the fourth aspect of the present invention having the above configuration, a plurality of nodes can access the files in the disk device not via the LAN but via the directly connected control / data line.
[0018]
The fifth aspect of the present invention is based on the structure of any one of the first to fourth aspects of the present invention described above, and further assumes the structure in which the server device is duplicated, and has the following structure.
[0019]
First, when the file time is set in the master server device, the file time is transmitted to the slave server device.
Then, the file time is set in the slave server device.
[0020]
With the configuration of the fifth aspect of the present invention having the above configuration, it is possible to give consistent file times even when servers are switched.
The sixth aspect of the present invention has the following configuration.
[0021]
First, in the server device, a free disk area group, a used disk area group, and a reserved disk area group corresponding to each client apparatus are managed for each of one or more disk volumes shared by a plurality of nodes. At this time, the management of the free disk area group can be performed for each of a plurality of size ranges of the disk area.
[0022]
Next, the client device requests the server device to reserve the disk area. At this time, when the disk area in the reserved disk area group managed by the client apparatus falls below a predetermined amount, a new disk area reservation request is issued to the server apparatus. be able to.
[0023]
Next, in response to the reservation request, the server device secures a disk area from the free disk area group as a reserved disk area, and notifies the client apparatus that issued the reserve request and information about the reserved disk area. The reserved disk area thus reserved is managed as a reserved disk area group corresponding to the client apparatus that has issued the reserve request.
[0024]
Subsequently, in the client device that issued the reserve request, the reserved disk area corresponding to the information notified from the server apparatus in response to the reserve request is managed as a reserved disk area group. At this time, the client device can be configured to manage the reserved disk area group for each of a plurality of size ranges of the disk area.
[0025]
Furthermore, when it becomes necessary to allocate a new disk area in response to a data write request to a file by a user program in the client apparatus, the optimum reserved disk area is determined from the reserved disk area group managed by the client apparatus. Data is written to the selected disk area, the reserved disk area is removed from management as a reserved disk area group, and the server apparatus is notified of information related to the reserved disk area that has executed the data writing. . This notification may be configured such that the user program closes the file, the cache is full, or the data token is requested to be collected from the server device. At this time, the data written based on the data write request to the file by the user program is cached on the main memory, and the allocation of the reserved disk area can be delayed.
[0026]
In the server device, the reserved disk area where data writing corresponding to the information notified from the client apparatus has occurred is removed from the management as the reserved disk area group corresponding to the client apparatus that has made the notification, and used. Managed as medium disk space.
[0027]
In the configuration of the sixth aspect of the present invention described above, when a client device needs to allocate a new disk area in response to a data write request to a file by a user program, the reservation is managed by the client device If a reserved disk area that is contiguous with the disk area in which data has already been written from the disk area group to the file is selected, and the selection fails, the continuous reserved disk area for the server device Can be configured to issue a reserve request.
[0028]
Further, the server device can be configured such that the failure of the client device is monitored, and as a result, the reserved disk area group corresponding to the client apparatus in which the failure is detected is all changed to the free disk area group.
[0029]
In the configuration of the sixth aspect of the present invention having the above configuration, the client device can allocate a new disk area to the file without inquiring of the server device. For this reason, the frequency | count of communication between a client apparatus and a server apparatus can be reduced, and it becomes possible to improve the performance of the whole system. In addition, the newly allocated disk area is stored as metadata of the file and the like only after a response from the client apparatus to the server apparatus after the data is written. For this reason, it is possible to prevent the data from being viewed maliciously.
[0037]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail.
FIG. 1 is a block diagram showing the configuration of the embodiment of the present invention.
[0038]
Each of the nodes # 1 to # 3 is directly connected to a disk device in which the file 105 is stored, and is connected to each other by a local area network (LAN) 106.
[0039]
A client unit 102 exists in all of a plurality of nodes 101 (# 1 to # 3 in the drawing) sharing the file 105, and a server unit 103 exists in two nodes 101 (# 1 and # 2 in the drawing). To do.
[0040]
The server unit 103 (# 1) in one node 101 (# 1) is called a primary server, and the server unit 103 (# 2) of the other node 101 (# 2) is called a slave server.
The client unit 102 in each node 101 executes file operation processing by communicating only with the server unit 103 (# 1) in the node 101 (# 1) which is the main server.
[0041]
The server unit 103 (# 1), which is the main server, processes a request (request) from an arbitrary client unit 102 and reflects the processing result in the metadata 104 (# 1) held by itself. When the server unit 103 (# 2) in the node 101 (# 2) that is the slave server exists, the server unit 103 (# 1) that is the primary server updates the content (difference) of the metadata 104 (# 1). Is also sent to the server unit 103 (# 2). The server unit 103 (# 2), which is a slave server, reflects the transmitted data in the metadata 104 (# 2) in the node 101 (# 2).
[0042]
As shown in FIG. 2, the client unit 102 in an arbitrary node 101 exists in an operating system (OS) 201 in the node 101, and receives a file operation request from the user program 202 in the node 101. Processing is performed with the help of the server unit 103 (# 1) in the node 101 (# 1) which is the main server. The server unit 103 in the node 101 of # 1 or # 2 may be incorporated in the operating system 201 in the node 101, or may be installed outside the operating system 201 as a user daemon program. The server unit 103 receives file operation requests from the client units 102 on the plurality of nodes 101 via the LAN 106 (see FIG. 1).
[0043]
When the client unit 102 and the server unit 103 execute file operation control under the above-described configuration, the following token is used in the present embodiment.
1) A plurality of types (for example, four types) of tokens are prepared for each file 105, and a size token having multiple-read / single-write characteristics is included in the tokens by controlling the extension of the file size.
2) A plurality of types (for example, four types) of tokens are prepared for each file 105, and a time token having multiple-write / multiple-read characteristics is included in the token by controlling the file time. One node 101 can simultaneously acquire a read right time token and a write right time token for one file 105. However, when a client unit 102 in a certain node 101 requests a time token for a read right for a certain file 105 from the server unit 103, the client unit 102 in another node 101 has a write right for that file 105. The server unit 103 collects the time token in the other node 101. Conversely, when the client unit 102 in a certain node 101 requests the server unit 103 for a time token of the write right for a certain file 105, the client unit 102 in another node 101 may Even when the time token of the read right is held, the server unit 103 picks up the time token in the other node 101. That is, for a single file 105, a plurality of nodes do not have a read right time token and a write right time token for the file 105 at the same time.
3) A plurality of types (for example, four types) of tokens are prepared for each file 105, and attribute tokens having multiple-read / single-write characteristics are included in the tokens by controlling the reduction of the file size.
4) Multiple types (for example, four types) of tokens are prepared for each file 105, and the multiple-read / single-write characteristics that exist in each block constituting the file 105 by controlling the access right of the data in the file Is included.
Further, the present embodiment executes the following basic operation.
5) Each token is managed by the server unit 103, and the client unit 102 in the node 101 that requires the token requests (requests) the server unit 103 to acquire the necessary token.
6) The server unit 103 obtains free block information (free extent information) indicating where the file 105 is stored on the disk and the location of each file 105 on the disk (extent information of the file 105). It is managed as metadata 104.
7) The client unit 102 requests a free block group (free extent group) on the disk from the server unit 103 in advance (reservation request), and at the time of a write request from the user program 202, the free space reserved by the prior request. Allocate an optimal one from the extent group and write user data there.
Subsequently, specific operations of the present embodiment will be sequentially described below.
[0044]
FIG. 3 is a main operation flowchart of the file operation request control executed by the client unit 102 in an arbitrary node 101. FIGS. 5 and 6 show the server unit 103 (# 1) in the node 101 (# 1) which is the main server. It is a main operation | movement flowchart of file operation request control which # 1) performs. In the following description, unless otherwise stated, when “server unit 103” is described, it indicates the server unit 103 (# 1) in the node 101 (# 1) which is the main server. .
1) Open operation processing in the client unit 102 and the server unit 103
When the user program 202 (FIG. 2) executes an open request for the file 105 in an arbitrary node 101, the client unit 102 in the same node 101 receives the open request (the determination in step 301 in FIG. 3 is YES). As a result, the client unit 102 executes an open operation process (step 302 in FIG. 3). FIG. 4 is an operation flowchart of the open operation process in step 302 of FIG. 3 executed by the client unit 102.
[0045]
First, the client unit 102 transmits an open request to the server unit 103 via the LAN 106 (FIG. 1). An open mode (read or write) indicating the type of access is added to the open request.
[0046]
Thereafter, the client unit 102 waits for a response from the server unit 103 (processing loop of step 402->403-> 402 in FIG. 4). At the time of timeout, the client unit 102 executes error processing (step 403-> 404 in FIG. 4), and then returns to the processing loop of the main operation flowchart in FIG.
[0047]
When the server unit 103 receives an open request from the client unit 102 (YES in step 500 in FIG. 5), the server unit 103 executes an open operation process (step 501 in FIG. 5). FIG. 7 is an operation flowchart of the open operation process in step 501 of FIG. 5 executed by the server unit 103.
[0048]
First, for the file 105 (FIG. 1) specified by the received open request, the server unit 103 has passed a data token that contradicts the open mode specified by the open request to another node 101. (Step 701 in FIG. 7).
[0049]
When the server unit 103 does not pass the data token inconsistent with the open mode to the other node 101, the server unit 103 receives the data token and extent information of the entire file, the attribute token, the size token, the time token, and the attribute data. These are set as response data (steps 702 to 706 in FIG. 7), and response processing is executed (step 707 in FIG. 7). The data token and the size token of the entire file are a read right token if read and a write right token if write are specified by the open request, respectively. The time token is a token of write right. Furthermore, the attribute data includes data such as file size, access right, file creation date, file update date, and the like.
[0050]
On the other hand, if the server unit 103 passes a data token inconsistent with the open mode to another node 101, the data token of the entire file is not set, and the extent information, attribute token, size token, Only the time token and the attribute data are set as response data (steps 703 to 706 in FIG. 7), and the response process is executed (step 707 in FIG. 7).
[0051]
When the client unit 102 receives the response from the server unit 103, the data token and extent information of the entire file included in the response, the attribute token, the size token, the time token, and the attribute data are stored in the memory. (Step 402-> 405-409 in FIG. 4). Thereafter, the client unit 102 executes other open operation processing such as a response of a file descriptor to the user program 202, and then returns to the processing loop of the main operation flowchart of FIG.
[0052]
As described above, in this embodiment, if no conflict occurs when the file 105 is opened, all the tokens necessary for subsequent file access (read access or write access) are passed. Has the effect of eliminating the need for communication for token acquisition with the server unit 103.
[0053]
In addition, since the token of the entire file is handed over at the time of an open request, continuous access to the file is possible without making a new token request as much as possible. In general file access other than database access or the like, the probability that a read command is issued from another node 101 when a write request from one node 101 is issued is small. Therefore, the probability that the token of the entire file delivered to one node 101 is collected is low, and a performance improvement can be expected by eliminating the need for a token for each access unit during continuous access to the file 105.
2) Read operation processing in the client unit 102
When the user program 202 issues a read request for the file 105 at an arbitrary node 101, the client unit 102 in the same node 101 receives the read request (YES in step 303 in FIG. 3). As a result, the client unit 102 executes read operation processing (step 304 in FIG. 3). FIG. 8 is an operation flowchart of the read operation process in step 304 of FIG. 3 executed by the client unit 102.
[0054]
First, the client unit 102 checks whether or not it holds the following required token (step 801 in FIG. 8).
・ Read Data token for the requested read range
・ Attribute token
-Write time token
-Only when the read request is the last block read request,
The size token of the read right for the last block
Here, if an attribute token exists, it is guaranteed that the file contents have not been changed up to the block before the last block of the file 105, so it is necessary to acquire a size token during the read operation processing of such a block. There is no. On the other hand, if the read request is a read request for the final block and the size token does not exist, the client unit 102 in the other node 101 expands the file size from the final block (write operation process). The readable range of the last block is not guaranteed. When the size token is acquired, the readable range of the final block is guaranteed, so that the user program 202 can perform a read operation process for the final block.
[0055]
As described above, in this embodiment, if the last block of the file 105 is not accessed, it is possible to access the file 105 without obtaining a size token. A write operation process for acquiring the size token and accessing the final block of the file 105 and extending the size of the file 105 can be executed. For this reason, for example, a program for expanding a file and a program for reading the file in order from the head can be executed simultaneously on different nodes 101, and the performance of the entire system can be improved.
[0056]
If the client unit 102 holds all the tokens, the client unit 102 requests the user program 202 using the data held (cached) by the client unit 102 without requesting the server unit 103 for a token. Process (step 801-> 802 in FIG. 8). Thereafter, the client unit 102 returns to the processing loop of the main operation flowchart of FIG.
[0057]
On the other hand, if there is an insufficient token, the client unit 102 requests the token from the server unit 103 via the LAN 106 (FIG. 1) and waits for a response from the server unit 103 (step 801-> in FIG. 8). 803, processing loop of steps 804->805-> 804). At the time of timeout, the client unit 102 executes error processing (step 403-> 404 in FIG. 4), and then returns to the processing loop of the main operation flowchart in FIG.
[0058]
Upon receiving the response from the server unit 103, the client unit 102 processes the request of the user program 202 based on the response (step 804-> 807 in FIG. 8). Thereafter, the client unit 102 returns to the processing loop of the main operation flowchart of FIG.
3) Write operation processing in the client unit 102
When the user program 202 issues a write request for the file 105 in any node 101, the client unit 102 in the same node 101 receives the write request (the determination in step 305 in FIG. 3 is YES). As a result, the client unit 102 executes a write operation process (step 306 in FIG. 3). This process is shown by the operation flowchart of FIG. 8 similar to the read operation process.
[0059]
First, the client unit 102 checks whether or not it holds the following required token (step 801 in FIG. 8).
・ Write Data token of write right in the requested range
・ Attribute token
-Write time token
Only when the write request is a write request for the last block
Write right size token for the last block
Here, the effect obtained by using the size token is the same as in the case of the read operation process.
[0060]
If the client unit 102 holds all the tokens, the client unit 102 requests the user program 202 using the data held (cached) by the client unit 102 without requesting the server unit 103 for a token. Process (step 801-> 802 in FIG. 8). Thereafter, the client unit 102 returns to the processing loop of the main operation flowchart of FIG.
[0061]
On the other hand, if there is an insufficient token, the client unit 102 requests the token from the server unit 103 via the LAN 106 (FIG. 1) and waits for a response from the server unit 103 (step 801-> in FIG. 8). 803, processing loop of steps 804->805-> 804). At the time of timeout, the client unit 102 executes error processing (step 403-> 404 in FIG. 4), and then returns to the processing loop of the main operation flowchart in FIG.
[0062]
Upon receiving the response from the server unit 103, the client unit 102 processes the request of the user program 202 based on the response (step 804-> 807 in FIG. 8). Thereafter, the client unit 102 returns to the processing loop of the main operation flowchart of FIG.
4) File time operation processing in the client unit 102
In any node 101, when the user program 202 (FIG. 2) requests the file time for the file 105, the client unit 102 in the same node 101 receives the request (determination in step 307 in FIG. 3 is YES). As a result, the client unit 102 executes a file time operation process (step 308 in FIG. 3). FIG. 9 is an operation flowchart of the file time manipulation process in step 308 of FIG. 3 executed by the client unit 102.
[0063]
First, the client unit 102 checks whether or not the file 105 designated by the user program 202 holds only the read right time token (step 901 in FIG. 9). If this determination is YES, the client unit 102 responds to the user program 202 with the file time held by itself (step 903 in FIG. 9). Thereafter, the client unit 102 returns to the processing loop of the main operation flowchart of FIG.
[0064]
If the determination is NO, the client unit 102 next holds the time tokens of the read right and the write right for the file 105 designated by the user program 202, and the previous server unit 103 relates to the file 105. After obtaining the file time, it is checked whether or not the file 105 is not accessed (step 902 in FIG. 9). Even when this determination is YES, the client unit 102 responds to the user program 202 with the file time held by itself (step 903 in FIG. 9). Thereafter, the client unit 102 returns to the processing loop of the main operation flowchart of FIG.
[0065]
If the determination in step 903 is also NO, the client unit 102 is a request in which the presence or absence of file access regarding the file 105 in the client unit 102 is added to the server unit 103 via the LAN 106, and the read right time A token acquisition request is transmitted (step 904 in FIG. 9).
[0066]
Thereafter, the client unit 102 waits for a response from the server unit 103 (processing loop of steps 905 to 906 to 905 in FIG. 9). At the time of timeout, the client unit 102 executes error processing (steps 906 to 907 in FIG. 9), and then returns to the processing loop of the main operation flowchart in FIG.
[0067]
Upon receiving the file time from the server unit 103, the client unit 102 responds to the user program 202 with the file time (step 905-> 908 in FIG. 9). Further, the client unit 102 holds the file time in a cache area corresponding to the file 105 in the client unit 102 (step 909 in FIG. 9). Further, the client unit 102 sets a state in which no file is accessed for the file 105 in the cache area (step 910 in FIG. 9).
5) Response processing of read right time token in the server unit 103
In any node 101, when the client unit 102 requests the server unit 103 for a time token for read right by executing the above-described step 308 in FIG. 3 and the file time manipulation process in FIG. 9 (step 904 in FIG. 9). When the server unit 103 receives it (determination of step 502 in FIG. 5 is YES), the response processing of the read right time token is executed (step 503 in FIG. 5). FIG. 10 is an operation flowchart of the response process in step 503 of FIG. 5 executed by the server unit 103.
[0068]
Upon receiving a read right time token acquisition request from the client unit 102, the server unit 103 first checks whether there is a client unit 102 that holds a write right time token corresponding to the time token (FIG. 10). Step 1001).
[0069]
If this determination is YES, the client unit 102 issues a request for collecting the write right time token to all the client units 102 holding the write right time token, and the response from all the client units 102 (Step 1001-> 1002, step 1003->1004-> 1003 processing loop in FIG. 10). At the time of timeout, the server unit 103 executes error processing (step 1004-> 1005 in FIG. 10), and then returns to the processing loop of the main operation flowchart in FIGS.
[0070]
On the other hand, each client unit 102 executes a time token collection process for the requested write right (step 309-> 310 in FIG. 3). Specifically, each client unit 102 invalidates the time token of the requested write right, and adds to the response to the server unit 103 whether or not the file 105 corresponding to the time token is accessed.
[0071]
The server unit 103 requests a time token for the read right when the determination in step 1001 is NO or when a response is received from all the client units 102 that hold the time token for the write right. The file time to respond to the client unit 102 is determined (step 1006 in FIG. 10). Specifically, including the request source (see step 904 in FIG. 9), when the client unit 102 of any node 101 responds that there is a file access, the server unit 103 holds itself as metadata 104 The corresponding file time is updated with the current time. A file access relative time interval (data indicating how many seconds ago it was accessed) is made to respond from each client unit 102, and the smallest value of the file access relative time intervals from each responded client unit 102 is used. , The time in the metadata 104 may be updated (ie, [“current time” − “smallest file access relative time interval]”). When responding, the server unit 103 uses the corresponding file time in the metadata 104 held by itself as it is.
[0072]
Subsequently, the server unit 103 responds the determined file time in the metadata 104 to the client unit 102 that has requested the time token for the read right (step 1007 in FIG. 10).
[0073]
Finally, the server unit 103 stores in the main memory of the server unit 103 that the time token of the read right has been passed to the requesting client unit 102 (step 1008 in FIG. 10).
[0074]
Thereafter, the server unit 103 returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
6) Response processing of write right time token in the server unit 103
In any node 101, the client unit 102 executes the read operation process in step 304 and FIG. 8 described above or the write operation process in step 306 and FIG. 8 in FIG. When the time token is requested, the server unit 103 receives the request (the determination at step 504 in FIG. 5 is YES), and executes the response process for the write right time token (step 505 in FIG. 5). FIG. 11 is an operation flowchart of the response process in step 505 of FIG. 5 executed by the server unit 103.
[0075]
Upon receiving a write right time token acquisition request from the client unit 102, the server unit 103 first checks whether there is a client unit 102 that holds a read right time token corresponding to the time token (FIG. 11). Step 1101).
[0076]
If this determination is YES, the client unit 102 issues a collection request for the read right time token to all the client units 102 except the request client unit 102 that holds the read right time token. It waits for a response from the client unit 102 (step 1101-> 1102, step 1103->1104-> 1103 processing loop in FIG. 11). At the time of timeout, the server unit 103 executes error processing (step 1104-> 1105 in FIG. 11), and then returns to the processing loop of the main operation flowchart in FIGS.
[0077]
On the other hand, each client unit 102 executes a time token collection process for the requested read right (step 309-> 310 in FIG. 3). Specifically, each client unit 102 invalidates the requested read time token and returns a response to the server unit 103.
[0078]
When the determination in step 1101 is NO or when the server unit 103 receives responses from all the client units 102 that hold the time token for the read right, the server unit 103 sets the time token for the write right to the requesting client unit. 102 is responded (step 1106 in FIG. 11).
[0079]
Finally, the server unit 103 stores in the metadata 104 that the write time token has been passed to the requesting client unit 102 (step 1107 in FIG. 11).
[0080]
Thereafter, the server unit 103 returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
As described in 2) to 6) above, in the present embodiment, when the user program 202 executes the read operation process or the write operation process for the file 105, the corresponding client unit 102 has the write right for the file 105. Use the time token. At this time, if the client unit 102 does not hold the time token of the write right for the file 105, it requests it from the server unit 103. In response to this, the server unit 103 collects the read right time token corresponding to the file 105 from the other node 101, but does not collect the write right time token. Therefore, when the user program 202 continuously accesses one file 105, the client unit 102 needs to return a write right time token until final access to the file 105 is completed. It is not necessary to notify the server unit 103 of the presence or absence of the file 105, and it is not necessary to synchronize the file time of the file 105 with the other nodes 101. For this reason, it becomes possible to improve the performance of the whole system.
[0081]
According to the above control, the time token for the write right is that the user program 202 explicitly requests the file time of the file 105, and the time token for the read right for the file 105 from the corresponding client unit 102 to the server unit 103. However, if only this is requested, the server unit 103 will not determine the file time of the file 105 until the file time is requested. In order to prevent this, for example, the client unit 102 notifies the server unit 103 of the presence / absence of file access at the timing when the user program 202 closes the file 105, and the server unit 103 receives the corresponding information in the metadata 104. It can be configured to update the file time.
7) Data token response processing in the server unit 103
In any node 101, the client unit 102 executes the above-described read operation processing in step 304 and FIG. 8 in FIG. 3 or the write operation processing in step 306 and FIG. (Step 803 in FIG. 8), the server unit 103 receives the request (YES in step 506 in FIG. 5), and executes data token response processing (step 507 in FIG. 5). FIG. 12 is an operation flowchart of the response process in step 507 of FIG. 5 executed by the server unit 103.
[0082]
Upon receiving a data token acquisition request from the client unit 102, the server unit 103 first checks whether there is a client unit 102 that holds a data token that contradicts the request (step 1201 in FIG. 12).
[0083]
If this determination is YES, the client unit 102 issues a collection request for the data token to all the client units 102 that hold the data token, and waits for a response from all the client units 102 (FIG. 12). Step 1201-> 1202, step 1203->1204-> 1203 processing loop). At the time of timeout, the server unit 103 executes error processing (step 1204-> 1205 in FIG. 12), and then returns to the processing loop of the main operation flowchart in FIGS.
[0084]
On the other hand, each client unit 102 executes a collection process for the requested data token (step 309-> 310 in FIG. 3). Specifically, each client unit 102 invalidates the requested data token and returns a response to the server unit 103. If the data token requested to be collected is a write-right data token, each client unit 102 stores the data updated by itself within the range of the file 105 indicated by the write-right data token from the cache. The extent information newly written back and allocated to the file 105 is added to the response.
[0085]
When the server unit 103 receives responses from all the client units 102 that hold the above-described data tokens, if the response relates to a data token with a write right, the server unit 103 displays the extent information of the file 105 that has been responded to. This is reflected in the metadata 104 held by itself (step 1203-> 1206 in FIG. 12).
[0086]
Thereafter, the server unit 103 responds to the client unit 102 with a data token to which extent information in the range specified by the requesting client unit 102 is added (step 1207 in FIG. 12).
[0087]
On the other hand, there is no client unit 102 that holds a data token that contradicts the data token acquisition request from the client unit 102, and the determination in step 1201 is NO. If the determination in step 1208 is also NO, the server unit 103 responds to the requesting client unit 102 with the extent information of the entire file and the data token of the entire file (step 1201-> 1208-in FIG. 12). > 1209).
[0088]
When the contention occurs, the server unit 103 responds to the client unit 102 with a data token to which extent information in the range specified by the requesting client unit 102 is added (step 1207 in FIG. 12). .
[0089]
After the processing in step 1207 or 1209, the server unit 103 returns to the processing loop of the main operation flowchart of FIGS.
The client unit 102 that has acquired the data token from the server unit 103, in the process of step 405 in FIG. 4 or step 807 in FIG. The extent information thus stored is stored in a cache area in the memory. Then, the client unit 102 executes the file access process (step 802 in FIG. 8) based on the subsequent request from the user program 202 for the block on the disk indicated by the extent information.
[0090]
As described above, the extent information of the file 105 is also responded at the same time when the data token is responded. Therefore, the plurality of nodes 101 can access the file 105 in the disk device not via the LAN 106 but via the directly connected control / data line.
8) Size token response processing in the server unit 103
When the server unit 103 requests a size token from the client unit 102, the server unit 103 collects the size token that contradicts the request from the other client units 102, and then adds the file size to the requested size token. It responds to the requesting client unit 102 (step 506-> 507 in FIG. 5). Thereafter, the server unit 103 returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
9) Response processing of attribute token in server unit 103
When an attribute token is requested from the client unit 102, the server unit 103 collects an attribute token inconsistent with the request from another client unit 102, and adds a file attribute to the requested attribute token. It responds to the requesting client unit 102 (step 508 → 509 in FIG. 5). Thereafter, the server unit 103 returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
10) Details of extent management
Next, details of extent (disk area) management in the server unit 103 and the client unit 102 will be described.
[0091]
First, the server unit 103 can manage a plurality of disk volumes. As metadata 104, the attribute data of the file 105, information on free extents for each disk volume (free space information), and lending to the client unit 102 Holds information about the extents (reserved space information).
[0092]
As shown in FIG. 13, the free space information and the reserved space information are managed as a free space B tree 1301, of which free space information can be accessed from the free space queue 1302 and reserved space information can be accessed from the reserved space queue 1303. .
[0093]
The free space queue 1302 manages usable extents (extents that are not used or reserved) connected to the free space B-tree 1301 for each disk volume.
[0094]
The reserved space queue 1303 manages, for each client unit 102, extents reserved in the client unit 102 and connected to the free space B-tree 1301.
[0095]
Further, the server unit 103 manages extents in use by the i-node B tree 1304.
On the other hand, the client unit 102 manages the extents reserved by making a request to the server unit 103 using the reserve queue 1305.
[0096]
The client unit 102 has a cache on the main memory, and caches data on the disk requested by the user program.
The empty spare skew 1302 in the server unit 103 and the reserve queue 1305 in the client unit 102 have a predetermined number of headers for each disk volume, and each header corresponds to the extent size. For example, if the number of headers is four, each header manages an extent group (free space B tree 1301) in each size range of 1 to 4 KB (kilobytes), 4 to 16 KB, 16 to 64 KB, and 64 to 256 KB. . The number of headers and the size represented by each header are determined when the file system of each disk volume is created.
[0097]
FIG. 14 is a diagram showing an extent management sequence when the user program 202 (see FIG. 2) requests data write (write request) to the file 105 in one node 101 (see FIG. 1). . In this sequence, the processing executed by the client unit 102 is a part of the processing in step 807 in FIG. 8 in the write operation processing in step 306 in FIG. The processing executed by the server unit 103 is a part of the main operation flowchart of the server unit 103 in FIG.
[0098]
In FIG. 14, when the user program 202 issues a write request for the file 105, the client unit 102 holds the data in the cache.
When the user program 202 closes the file 105, the cache is full, or the server unit 103 is requested to collect a data token (see step 1202 in FIG. 12), the cached data is written to the disk. When necessary, the client unit 102 examines the extent information (see step 405 in FIG. 4) of the file 105 received from the server unit 103, and the request is for a file area to which a disk area has already been allocated. And the adjacent areas in the cache to which no extent is allocated are grouped for each file 105 (this grouped file area is referred to as a write target area). Next, the client unit 102 checks the size of the area to be written and executes one of the following processes according to the nature of the area.
(1) When an extent related to the same file 105 has already been allocated from the server unit 103 to an area adjacent to the write target area (immediately before): the client unit 102 sets the block address of the allocated extent and the write target area The server unit 103 is requested to reserve (lend out) the next extent, and data is written in the responded extent. If the requested extent has already been allocated, the server unit 103 returns another extent.
(2) When the extent related to the same file 105 has not yet been allocated from the server unit 103 to the area adjacent to the area to be written out (immediately before): the client unit 102 sets the reserve queue 1305 corresponding to the size of the area to be written out Write data to the first extent connected. The client unit 102 removes the extent from the reserve queue 1305.
After the above operation, the client unit 102 notifies the server unit 103 of the completion of writing. At this time, the client unit 102 notifies the address of the used extent (reserved space) and the size of the write target area.
[0099]
The server unit 103 updates attribute data related to the target file 105 in the metadata 104 based on the notified extent (reserved space) address and the size of the write target area, and reserve space queue 1303 and free space B-tree 1301. The extent notified from the client unit 102 is removed from above, and the extent is connected to the INodeB tree 1304. When the size of the written extent is smaller than the reserved space used, the server unit 103 connects the remaining extent as a free space to a header corresponding to the size of the extent in the free space queue 1302.
11) Extent group reserve control processing
The client unit 102 executes extent group reserve request processing every time a predetermined time elapses (steps 311 to 312 in FIG. 3). In this process, the client unit 102 checks the extent group reserved in the reserve queue 1305 and requests the server unit 103 to reserve a certain number of extent groups when the reserve amount becomes a predetermined value or less. . This process is performed for each size of header, and the above reserve process is executed for each header so that each reserved amount is equal to or greater than a predetermined value even for headers other than those that have a shortage.
[0100]
Upon receiving the extent group reservation request, the server unit 103 executes extent group reservation processing (steps 512 to 513 in FIG. 6). In this process, the server unit 103 searches for usable extent groups from the free space B-tree 1301 connected to the free space queue 1302 and connects them to the reserved space queue 1303 from the free space queue 1302. Then, the reserved extent group is returned to the client unit 102. Thereafter, the server unit 103 returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
[0101]
In step 312 of FIG. 3, the client unit 102 connects the extent group responded from the server unit 103 to the reserve queue 1305, ends step 312 and returns to the processing loop of the main operation flowchart of FIG.
[0102]
When the server unit 103 detects a failure of the client unit 102 that is mounting on the server unit 103 or receives an unmount request from the client unit 102, the reservation reserved for the client unit 102 is reserved. The extent group release processing in the space queue 1303 is executed, and they are connected to the free space queue 1302 (steps 514 to 515 in FIG. 5). Thereafter, the server unit 103 returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
[0103]
As described above, in this embodiment, the free extent group is reserved, so that the client unit 102 can allocate a new extent to the file 105 using the cache without making an inquiry to the server unit 103. It becomes. For this reason, the number of communications between the client unit 102 and the server unit 103 can be reduced, and the performance of the entire system can be improved.
[0104]
Further, the newly allocated extent is stored as the metadata 104 of the file 105 only after a response from the client unit 102 to the server unit 103 after the data is written. For this reason, it is possible to prevent the data from being viewed maliciously.
12) Synchronization processing of primary server and secondary server
The server unit 103 (# 1) in the node 101 (# 1) which is the primary server, for example, when updating the metadata 104 (# 1) in FIG. 7, FIG. 10, FIG. 11, FIG. After the metadata change amount and the time data are transmitted to the server unit 103 (# 2) in the node 101 (# 2) which is the server, and it is confirmed that the slave server has received them, the client unit 102 Returns a response.
[0105]
When the server unit 103 (# 2) in the node 101 (# 2), which is the slave server, receives the above-described metadata change and time data, it reflects the metadata change in its own metadata 104 (# 2). At the same time, the time data sent is stored (steps 516 to 517 in FIG. 6). Thereafter, the server unit 103 (# 2) returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
13) Processing for switching to a slave server when a failure occurs on the primary server
The server unit 103 (# 2) in the node 101 (# 2) that is the slave server monitors the failure of the server unit 103 (# 1) in the node 101 (# 1) that is the primary server, and the failure Is detected, server switching processing is executed (step 518-> 519 in FIG. 6). At this time, the server unit 103 (# 2) waits for its own time until the time finally sent from the server unit 103 (# 1) which is the main server has passed. Thereafter, the server unit 103 (# 2) returns to the processing loop of the main operation flowchart of FIGS. 5 and 6.
[0106]
With the above-described control, it is possible to give consistent file times even when servers are switched.
Next, an embodiment for realizing a log control mechanism for improving the fault tolerance of the distributed file system in the inter-node file sharing management system as described above will be described.
[0107]
FIG. 15 is a basic configuration diagram of an inter-node file sharing management system in which a log control mechanism is implemented.
The shared file management device 1501 (corresponding to the node 101 having the server unit 103 in FIG. 1) has control information that exists for each file, such as “attribute” of the shared file and “storage position on the real disk”. (Referred to as file information) and control information (referred to as disk information) indicating free space on the real disk and the like. These two pieces of management information are collectively referred to as metadata 1502 (corresponding to the metadata 104 in FIG. 1), and are stored on the disk in preparation for a failure.
[0108]
The shared file management apparatus 1501 reads or updates the metadata 1502 from the disk in accordance with a request from each of the nodes 1503 to #n sharing the data (corresponding to the node 101 having the client unit 102), and file information Is returned as a response. At this time, a plurality of different metadata blocks may be accessed.
[0109]
Each node 1503 caches the returned file information in the memory, and executes processing using only the file information in the cached memory without communicating with the shared file management device 1501 until it becomes necessary thereafter. To do.
[0110]
Tokens are used to ensure consistency between the file information that each node 1503 holds on its own cache.
The token is issued to the node 1503 by the shared file management apparatus 1501 when the file information is returned to the node 1503, and the shared file management apparatus 1501 receives a conflicting request from a certain node 1503. It is recovered from the required node 1503 by the device 1501.
[0111]
The node 1503 instructed to invalidate invalidates the cache data instructed by the token, and responds with the file information change made by itself to be transmitted to the other node 1503.
[0112]
Upon receiving the response, the shared file management apparatus 1501 reflects the notified change in the metadata 1502, and then resumes the processing based on the request, responds the result to the request source, and issues a token.
[0113]
In order for the shared file management apparatus 1501 to process a request from each node 1503, access to the metadata 1502 is required. In this case, if the disk is accessed every time, the performance deteriorates. For this reason, a buffer cache 1504 for holding data on the disk is provided in the shared file management apparatus 1501 to reduce disk access. The buffer cache 1504 has an entry corresponding to each block on the disk, and a lock word for indicating whether or not the entry is locked is prepared for each entry, so that data being updated by a certain thread can be stored. Reference to other threads that are processing the request is suppressed.
[0114]
Reflection of the metadata 1502 to the real disk is delayed until the request processing is completed normally, that is, until the so-called transaction is completed. When the transaction ends normally, the update data held on the buffer cache 1504 is written to the log file 1505 at a time, and then the update timing of the update data to the disk is scheduled.
[0115]
The log file 1505 is used cyclically, and each time writing to the real disk is completed, the log area holding the change that has been written is returned to the free area. Accordingly, the metadata change accompanying a successful request that has not yet been written to the physical disk always exists in the log file 1505, so even if a failure occurs in the shared file management apparatus 1501, the metadata 1502. It is characterized that it can be easily and quickly restored.
[0116]
Next, lock inheritance control processing based on the above basic configuration according to the present embodiment will be described based on the explanatory diagram of FIG. Note that the file management apparatus 1501 for serializing operation requests for the same file issued from a plurality of clients uses a file lock prepared for each file.
[0117]
In this embodiment, the first execution unit (thread) executed on the shared file management apparatus 1501 to process a request from one node 1503 collects a token issued to another node 1503. In this case, the token collection control table 1602 holding information indicating the file that is the target of token processing is connected to the token collection waiting queue 1601, a token collection request is transmitted to the corresponding node 1503, and then the token collection is performed. Wait for the completion message to arrive.
[0118]
When the cache invalidation in the node 1503 holding the token is completed and the token collection completion message is notified from there to the shared file management apparatus 1501 (FIG. 15), the shared file management is performed to process the token collection completion message. The second execution unit (thread) executed on the device 1501 examines the token collection waiting queue 1601, and if the token collection control table 1602 corresponding to the message exists on the queue, “lock” is stored in the control table. After “sewing” is displayed, update processing of the metadata 1502 (FIG. 15) and token release processing are executed.
[0119]
The waiting of the first execution unit waiting for the arrival of the token collection completion message is solved as a result of the token release processing by the second execution unit.
Each node 1503 can also autonomously notify the shared file management apparatus 1501 of a token collection completion message without being based on a request from the shared file management apparatus 1501. Therefore, when the token collection completion message arrives at the shared file management apparatus 1501, there may be a case where the token collection control table 1602 corresponding to the token collection waiting queue 1601 is not connected. In such a case, the second execution unit executes a normal file lock acquisition process. As a result, if another execution unit holds the file lock, the second execution unit waits for the file lock to be released. Metadata update processing and token release processing are executed.
[0120]
The first execution unit may transmit a token collection request to a plurality of nodes 1503. In such a case, the shared file management apparatus 1501 may receive token collection completion messages from a plurality of nodes 1503 one after another. The second execution unit displays lock inheriting in the corresponding token collection control table 1602 when the first token collection completion message is received. Then, each of the other execution units that have received the second and subsequent token collection completion messages displays that the inheritance display is turned off if the lock inheritance is displayed in the corresponding token collection control table 1602. Waiting and executing the metadata update process and token release process when the wait is solved. In this way, the number of execution units that can perform lock inheritance is limited to one.
[0121]
The above-described lock inheritance control realizes efficient file lock control that can avoid the occurrence of deadlock in token control.
Next, deadlock detection processing based on the basic configuration shown in FIG. 15 according to the present embodiment will be described based on the explanatory diagram of FIG.
[0122]
The shared file management apparatus 1501 (FIG. 15) sets an owner 1701b indicating the execution unit (thread) holding the file lock corresponding to the file lock word 1701a in the file control table 1701 for managing each file. In addition, the buffer cache control table 1702 that manages the entries of each buffer cache 1504 (FIG. 15) shows the execution unit (thread) that holds the buffer cache lock corresponding to the buffer cache lock word 1702a. The owner 1702b is set.
[0123]
In addition, the shared file management apparatus 1501 indicates a wait resource 1703a that is information for specifying a target that the execution unit is waiting for in the thread control table 1703 that manages each execution unit (thread), and the cause of the waiting. Information type 1703b is set. One of the following settings is performed for the waiting resource 1703a and the type 1703b.
1. When waiting for the release of a file lock:
Type 1703b is set to wait for a file lock.
[0124]
Information indicating the file lock word 1701a in the corresponding file control table 1701 is set in the waiting resource 1703a.
2. When waiting for the release of the buffer cache lock:
-Type 1703b is set to wait for buffer cache lock.
[0125]
Information indicating the buffer cache lock word 1702a in the corresponding buffer cache control table 1702 is set in the waiting resource 1703a.
3. When waiting for token collection:
Type 1703b is set to wait for token collection.
[0126]
-Information indicating the corresponding file is set in the waiting resource 1703a.
Using the above information, each thread (execution unit) detects a deadlock as follows.
<When a thread (hereinafter referred to as thread A) requests a file lock>
Step 1: The thread A holds the file lock from the file lock word 1701a and the owner 1701a in the file control table 1701 corresponding to the file (hereinafter referred to as “file lock”) before entering the file lock release waiting state. Thread control table 1703 corresponding to thread B) is acquired.
Step 2: The thread A obtains the resource that the thread B is waiting for from the waiting resource 1703a and the type 1703b in the thread control table 1703. If there is no resource that thread B is waiting for, or thread B is waiting for token collection, thread A determines that a deadlock has not occurred, and enters a file lock release wait state.
Step 3: If thread B is waiting other than the token collection wait, thread A seeks a thread that holds a lock for the resource that thread B is waiting for.
Step 4: If the thread A obtained in Step 3 is the thread A itself, the thread A determines that a deadlock has occurred, and cancels the transaction being executed by the thread A itself. Otherwise, thread A repeats the process of step 2.
<When thread A requests a buffer cache lock>
Step 1: Thread A holds the buffer cache lock from the buffer cache lock word 1702a and owner 1702b in the buffer cache control table 1702 corresponding to the buffer cache entry before entering the buffer cache lock release waiting state. A thread control table 1703 corresponding to the current thread B is acquired.
Step 2: The thread A obtains the resource that the thread B is waiting for from the waiting resource 1703a and the type 1703b in the thread control table 1703. If there is no resource for which thread B is waiting, thread A determines that a deadlock has not occurred and enters a buffer cache lock release wait state.
Step 3: The thread A determines that a deadlock has occurred if the resource that the thread B is waiting for is a resource that is waiting for token collection and the thread A holds the file lock of the token collection waiting target file.
Step 4: Thread A seeks a thread that holds a lock on the resource that thread B is waiting for.
Step 5: If the thread A obtained in Step 4 is the thread A itself, the thread A determines that a deadlock has occurred and cancels the transaction being executed by the thread A itself. Otherwise, thread A repeats the process of step 2.
By the deadlock detection process described above, it is possible to appropriately detect the occurrence of a deadlock in the update process of the metadata 1502 or the like that is transaction-controlled based on the token.
[0127]
Next, the log file secondary cache control processing based on the basic configuration shown in FIG. 15 according to the present embodiment will be described with reference to the explanatory diagram of FIG.
The secondary cache 1801 is a cache that holds the metadata 1502 that has been written to the log file 1505 (FIG. 15) but has not been reflected on the disk, and prevents performance degradation during transaction cancellation. In order to improve performance in normal processing, it is provided on the shared file management apparatus 1501.
[0128]
When the transaction ends normally, the data updated on the buffer cache 1504 is sent to the secondary cache 1801, and the change display is turned on.
When the free area of the log file 1505 becomes insufficient, data for which the change display on the secondary cache 1801 is turned on is written to the real disk, and the change display is reset.
[0129]
When data is moved from the buffer cache 1504 to the secondary cache, if there is no free area in the secondary cache 1801, the secondary cache area for which the change display is not turned on is reused.
[0130]
If the change display for all pages is on, a fixed amount of changed pages are written to the real disk and reused after the change display is turned off.
[0131]
If the necessary metadata 1502 does not exist in the buffer cache 1504, if the data exists in the secondary cache 1801, the data is copied from the secondary cache 1801 to the buffer cache 1504. If the necessary data does not exist in the secondary cache 1801, the data is read from the disk into the buffer cache 1504.
[0132]
By the secondary cache control process described above, the log flush process for writing the changed contents of the buffer cache 1504 onto the real disk can be performed independently of the transaction being executed, thereby improving the system performance.
[0133]
Next, log control processing capable of reducing the amount of log data based on the basic configuration shown in FIG. 15 according to the present embodiment will be described with reference to the explanatory diagram of FIG.
When the metadata 1502 is updated on the buffer cache 1504, a log control table 1902 storing information indicating the range of the updated metadata 1502 is added to the log queue 1901 that exists for each thread. As shown in FIG. 19, this information includes an entry ID that indicates an entry on the buffer cache 1504, and a start point address start and an end point address end of a range belonging to the entry.
[0134]
At this time, if the log queue 1901 is searched and if there is already a log control table 1902 on the log queue 1901 that overlaps or is adjacent to the range of the updated metadata 1502, the old control table 1902 Only the range is changed, and a new log control table 1902 is not created.
[0135]
When the transaction ends normally, the changed metadata 1502 is recognized from the log control table 1902 on the log queue 1901 and written into the log file 1505 as log data. When the writing is completed, the lock for the entry in the corresponding buffer cache 1504 is released.
[0136]
If the transaction is unsuccessful, the updated metadata 1502 is recognized from the log queue 1901 and the corresponding entry on the buffer cache 1504 is invalidated.
[0137]
By the log control process described above, the amount of log data written to the log file 1505 can be reduced.
Finally, restore control processing of the memory resident control table at the time of transaction cancellation based on the basic configuration shown in FIG. 15 according to the present embodiment will be described based on the explanatory diagram of FIG.
[0138]
When a transaction is canceled due to detection of a deadlock condition or an error of the request source during the transaction processing, the buffer cache 1504 (FIG. 15) is invalidated. At the same time, by searching each file control table 2002 connected to the file lock queue 2001 that exists for each thread, all file locks that have been acquired and released in the course of the transaction are released.
[0139]
Here, in the file control table 2002, when the resident control table 2003 existing on the memory in the shared file management apparatus 1501 (FIG. 15) is rewritten in accordance with the acquisition of the file lock, the control indicating the update is performed. A table update flag is set. In one file control table 2002, a plurality of control table update flags corresponding to a plurality of resident control tables 2003 can be set as a control table update map.
[0140]
Now, when a file lock is released due to the cancellation of a transaction, if any control table update flag is on in the file control table 2002 in which the corresponding file lock word is set, the file When the lock is reacquired, a reload indicator (s) indicating that the resident control table 2003 corresponding to the control table update flag needs to be reloaded is displayed, and then the file lock is released.
[0141]
If the transaction is canceled due to deadlock detection or the like, the request corresponding to the transaction is retried from the beginning. If any reload indicator is displayed in the file control table 2002 in which the corresponding file lock word has been set when the file lock is reacquired, the reload indicator indicates that the file lock has been acquired. The resident control table 2003 is reconstructed on the memory using the information of the metadata 1502 (FIG. 15).
[0142]
By the restore control processing described above, high-speed restore of the resident control table 2003 accompanying transaction cancellation is realized.
The present invention is a computer for causing a computer to perform the same function as the function of the client unit 102 or the function of the server unit 103 realized by the above-described embodiment of the present invention when used by the computer. It can also be configured as a readable recording medium. In this case, for example, a portable recording medium such as a floppy disk, a CD-ROM disk, an optical disk, a removable hard disk, or a program that implements various functions of the embodiment of the present invention via a network line constitutes a computer that constitutes a node. The program is loaded into a memory (RAM or hard disk) in the main body and executed.
[0143]
【The invention's effect】
According to the configuration of the first aspect of the present invention, for example, when the token of the entire file is handed over at the time of an open request or the like, continuous access to the file is possible without making a new token request as much as possible. In general file access except database access, the probability that a read command is issued from another node when a write request from one node is issued is small. Therefore, the probability that the token of the entire file delivered to one node is collected is low, and performance improvement can be expected by eliminating the need for a token request for each access unit during continuous access to the file.
[0144]
According to the configuration of the second aspect of the present invention, in the case where the user program continuously accesses one file, the client device obtains the time token of the write right until the final access to the file is completed. There is no need to return it, nor is it necessary to notify the server unit of access, and there is no need to synchronize the file time of the file with other nodes. For this reason, it becomes possible to improve the performance of the whole system.
[0145]
According to the configuration of the third aspect of the present invention, if the last block of the file is not accessed, the file can be accessed without acquiring the size token. , Obtain a size token, access the last block of the file, and execute a write operation that expands the size of the file. For this reason, for example, it is possible to simultaneously execute a program for expanding a file and a program for reading the file in order from the head on different nodes, and the performance of the entire system can be improved.
[0146]
According to the configuration of the fourth aspect of the present invention, a plurality of nodes can access a file in the disk device not via a LAN but via a directly connected control / data line.
[0147]
According to the configuration of the fifth aspect of the present invention, it is possible to give a consistent file time even when the server is switched.
According to the configuration of the sixth aspect of the present invention, the client device can allocate a new block to a file without making an inquiry to the server device. For this reason, the frequency | count of communication between a client apparatus and a server apparatus can be reduced, and it becomes possible to improve the performance of the whole system. Furthermore, by reserving for each size, it is possible to allocate optimal continuous blocks and prevent fragmentation and improve file access performance. Also, the newly allocated extent is stored as the metadata of the file and the like only after a response from the client device to the server device after the data has been written. For this reason, it is possible to prevent the data from being viewed maliciously.
[0148]
According to the seventh configuration of the present invention, efficient file lock control that can avoid the occurrence of deadlock is realized in token control.
According to the eighth configuration of the present invention, it is possible to appropriately detect the occurrence of a deadlock in update processing of metadata or the like that is transaction-controlled based on a token.
[0149]
According to the ninth configuration of the present invention, a high-speed restoration of the resident control table accompanying the cancellation of a transaction is realized.
According to the tenth configuration of the present invention, the amount of log data written to the log file can be reduced.
[0150]
According to the eleventh configuration of the present invention, the log flush processing for writing the log file on the real disk can be performed independently of the transaction being executed, and the system performance can be improved.
[Brief description of the drawings]
FIG. 1 is a system configuration diagram of an embodiment of the present invention.
FIG. 2 is a software configuration diagram in a node.
FIG. 3 is a main operation flowchart of the client unit.
FIG. 4 is an operation flowchart of an open operation process of a client unit.
FIG. 5 is a main operation flowchart (part 1) of the server unit;
FIG. 6 is a main operation flowchart (part 2) of the server unit;
FIG. 7 is an operation flowchart of an open operation process of the server unit.
FIG. 8 is an operation flowchart of read / write operation processing of a client unit.
FIG. 9 is an operation flowchart of file time operation processing of the client unit.
FIG. 10 is an operation flowchart of a read right time token response process in the server unit.
FIG. 11 is an operation flowchart of a write right time token response process in the server unit;
FIG. 12 is an operation flowchart of a data token response process in the server unit.
FIG. 13 is a diagram showing details of extent management.
FIG. 14 is a sequence diagram of extent management.
FIG. 15 is a basic configuration diagram of an inter-node file sharing management system in which a log control mechanism is implemented.
FIG. 16 is an explanatory diagram of a lock inheritance control process.
FIG. 17 is an explanatory diagram of deadlock detection processing;
FIG. 18 is an explanatory diagram of secondary cache control of a log file.
FIG. 19 is an explanatory diagram of a log control process that can reduce the amount of log data.
FIG. 20 is an explanatory diagram of restoration processing of a memory resident control table at the time of transaction cancellation.
[Explanation of symbols]
101, 1503 nodes
102 Client part
103 Server part
104, 1502 metadata
105 files
106 LAN
201 Operating system (OS)
202 User program
1501 Shared file management device
1504 Buffer cache
1505 log file
1601 Queue collection waiting queue
1602 Token collection control table
1701, 2002 File control table
1701a, 1702a File lock
1701b, 1702b Owner
1702 Buffer cache control table
1703 Thread control table
1703a Wait resource
1703b type
1801 Secondary cache
1901 Log Queue
1902 Log control table
2001 File lock queue
2003 Resident control table

Claims (28)

ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイル制御方法であって、
前記クライアント装置から前記サーバ装置へのトークンの要求時に、前記サーバ装置において複数の前記クライアント装置間での該トークンの競合の有無を判定し、該競合が無ければ、該要求がファイル全体のトークンを要求するものではない場合でも、前記サーバ装置から前記クライアント装置へファイル全体のトークンを応答する、
過程を含むことを特徴とするノード間共用ファイル制御方法。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A shared file control method between nodes that enables sharing of the same file from
When requesting a token from the client device to the server device, the server device determines whether or not the token conflicts among the plurality of client devices. If there is no conflict, the request uses the token of the entire file. A token of the entire file is returned from the server device to the client device, even if it is not a request .
A shared file control method between nodes including a process.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該サーバ装置であって、
前記クライアント装置から前記サーバ装置へのトークンの要求時に、複数の前記クライアント装置間での該トークンの競合の有無を判定する判定手段と、
該判定手段が該競合が無いと判定した場合には、該要求がファイル全体のトークンを要求するものではない場合でも、前記クライアント装置へファイル全体のトークンを応答する応答手段と、
を含むことを特徴とするサーバ装置。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. The server device constituting the inter-node shared file system that enables sharing of the same file from
A determination unit that determines whether or not there is contention for the token among the plurality of client devices when a token is requested from the client device to the server device;
If the determination means determines that there is no conflict, a response means for responding the token of the entire file to the client device, even if the request does not request a token of the entire file;
A server device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該サーバ装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
前記クライアント装置から前記サーバ装置へのトークンの要求時に、複数の前記クライアント装置間での該トークンの競合の有無を判定する機能と、
該判定手段が該競合が無いと判定した場合には、該要求がファイル全体のトークンを要求するものではない場合でも、前記クライアント装置へファイル全体のトークンを応答する機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium recording a program read by the computer that is the server device constituting the inter-node shared file system that enables sharing of the same file from
A function for determining the presence or absence of contention of the token among a plurality of the client devices at the time of a token request from the client device to the server device;
A function for responding the token of the entire file to the client device, even if the request does not request a token of the entire file, when the determination means determines that there is no conflict;
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイル制御方法であって、
前記クライアント装置と前記サーバ装置の間で、ファイル時刻を制御するための時刻トークンを通信し、
前記サーバ装置において、前記ファイル時刻の変更を許容するwrite 権の時刻トークンを複数の前記クライアント装置に同時に応答する制御を実行し、
前記クライアント装置において、前記write 権の時刻トークンを獲得した後は、前記サーバ装置にファイル時刻を問い合わせることなく、ファイルアクセスを実行し、
前記サーバ装置において、所定のタイミングで前記クライアント装置から前記write 権の時刻トークンを回収し、自身が管理するファイル時刻を更新する、
過程を含むことを特徴とするノード間共用ファイル制御方法。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A shared file control method between nodes that enables sharing of the same file from
A time token for controlling file time is communicated between the client device and the server device,
In the server device, a control is performed to simultaneously respond to a plurality of client devices with a write right time token that allows the file time to be changed,
In the client device, after acquiring the time token of the write right, the file access is executed without querying the server device for the file time,
In the server device, the time token of the write right is collected from the client device at a predetermined timing, and the file time managed by itself is updated.
A shared file control method between nodes including a process.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であって、
前記サーバ装置との間で、ファイル時刻を制御するための時刻トークンを通信する通信手段と、
前記サーバ装置から複数の前記クライアント装置に同時に応答され得るトークンであって前記ファイル時刻の変更を許容するwrite 権の時刻トークンを前記サーバ装置から獲得した後は、前記サーバ装置にファイル時刻を問い合わせることなく、ファイルアクセスを実行するアクセス制御手段と、
を含むことを特徴とするクライアント装置。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A client device constituting an inter-node shared file system that enables sharing of the same file from
Communication means for communicating a time token for controlling the file time with the server device;
After acquiring from the server device a write right time token that allows a plurality of client devices to respond simultaneously from the server device and allows the file time to be changed, the server device is inquired about the file time. Access control means for performing file access, and
A client device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
前記サーバ装置との間で、ファイル時刻を制御するための時刻トークンを通信する機能と、
前記サーバ装置から複数の前記クライアント装置に同時に応答され得るトークンであって前記ファイル時刻の変更を許容するwrite 権の時刻トークンを前記サーバ装置から獲得した後は、前記サーバ装置にファイル時刻を問い合わせることなく、ファイルアクセスを実行する機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium on which a program read by the computer is recorded when used by a computer that is the client device constituting the inter-node shared file system that enables sharing of the same file from
A function of communicating a time token for controlling the file time with the server device;
After acquiring from the server device a write right time token that allows the server device to respond to the plurality of client devices at the same time and allows the change of the file time, the server device is inquired about the file time. Without the ability to perform file access,
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該サーバ装置であって、
前記クライアント装置との間で、ファイル時刻を制御するための時刻トークンを通信する通信手段と、
前記ファイル時刻の変更を許容するwrite 権の時刻トークンを複数の前記クライアント装置に同時に応答する制御を実行する応答手段と、
所定のタイミングで前記クライアント装置から前記write 権の時刻トークンを回収し、自身が管理するファイル時刻を更新するファイル時刻更新手段と、
を含むことを特徴とするサーバ装置。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. The server device constituting the inter-node shared file system that enables sharing of the same file from
Communication means for communicating a time token for controlling the file time with the client device;
Response means for executing control to simultaneously respond to the plurality of client devices with a time token of write right that allows the file time to be changed;
A file time update means for collecting a time token of the write right from the client device at a predetermined timing and updating a file time managed by the client device;
A server device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該サーバ装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
前記クライアント装置との間で、ファイル時刻を制御するための時刻トークンを通信する機能と、
前記ファイル時刻の変更を許容するwrite 権の時刻トークンを複数の前記クライアント装置に同時に応答する制御を実行する機能と、
所定のタイミングで前記クライアント装置から前記write 権の時刻トークンを回収し、自身が管理するファイル時刻を更新する機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium recording a program read by the computer that is the server device constituting the inter-node shared file system that enables sharing of the same file from
A function of communicating a time token for controlling the file time with the client device;
A function of executing a control of simultaneously responding to the plurality of client devices with a time token of a write right that allows the file time to be changed;
A function of collecting a time token of the write right from the client device at a predetermined timing and updating a file time managed by the client device;
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイル制御方法であって、
前記クライアント装置と前記サーバ装置の間で、ファイルサイズの拡張を制御するためのサイズトークンを通信し、
前記クライアント装置において、ファイルの最終ブロックにアクセスする場合においてのみ、前記サーバ装置から該ファイルに対応するサイズトークンを獲得した上で該最終ブロックにアクセスする、
過程を含むことを特徴とするノード間共用ファイル制御方法。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A shared file control method between nodes that enables sharing of the same file from
Communicating a size token for controlling the extension of the file size between the client device and the server device;
In the client device, only when the last block of the file is accessed, the size block corresponding to the file is obtained from the server device and then the last block is accessed.
A shared file control method between nodes including a process.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であって、
前記サーバ装置との間で、ファイルサイズの拡張を制御するためのサイズトークンを通信する通信手段と、
ファイルの最終ブロックにアクセスする場合においてのみ、前記サーバ装置から該ファイルに対応するサイズトークンを獲得した上で該最終ブロックにアクセスするアクセス手段と、
を含むことを特徴とするクライアント装置。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A client device constituting an inter-node shared file system that enables sharing of the same file from
Communication means for communicating a size token for controlling the extension of the file size with the server device;
Only when accessing the final block of the file, an access means for acquiring the size token corresponding to the file from the server device and accessing the final block;
A client device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
前記サーバ装置との間で、ファイルサイズの拡張を制御するためのサイズトークンを通信する機能と、
ファイルの最終ブロックにアクセスする場合においてのみ、前記サーバ装置から該ファイルに対応するサイズトークンを獲得した上で該最終ブロックにアクセスする機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium on which a program read by the computer is recorded when used by a computer that is the client device constituting the inter-node shared file system that enables sharing of the same file from
A function of communicating a size token for controlling the extension of the file size with the server device;
Only when accessing the last block of the file, the function of obtaining the size token corresponding to the file from the server device and accessing the last block;
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイル制御方法であって、
前記クライアント装置と前記サーバ装置の間で、ファイルデータのアクセスを制御するためのデータトークンを通信し、
該データトークンの通信時に、該データトークンに対応するファイルのディスク上での位置を示すエクステント情報を通信する、
過程を含むことを特徴とするノード間共用ファイル制御方法。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A shared file control method between nodes that enables sharing of the same file from
Communicating a data token for controlling access of file data between the client device and the server device;
Communicating the extent information indicating the position of the file corresponding to the data token on the disk at the time of communication of the data token;
A shared file control method between nodes including a process.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であって、
前記サーバ装置との間で、ファイルデータのアクセスを制御するためのデータトークンを通信する第1の通信手段と、
該データトークンの通信時に、該データトークンに対応するファイルのディスク上での位置を示すエクステント情報を通信する第2の通信手段と、
を含むことを特徴とするクライアント装置。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A client device constituting an inter-node shared file system that enables sharing of the same file from
First communication means for communicating a data token for controlling access to file data with the server device;
A second communication means for communicating extent information indicating a position on a disk of a file corresponding to the data token at the time of communication of the data token;
A client device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
前記サーバ装置との間で、ファイルデータのアクセスを制御するためのデータトークンを通信する機能と、
該データトークンの通信時に、該データトークンに対応するファイルのディスク上での位置を示すエクステント情報を通信する機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium on which a program read by the computer is recorded when used by a computer that is the client device constituting the inter-node shared file system that enables sharing of the same file from
A function of communicating a data token for controlling access to file data with the server device;
A function of communicating extent information indicating a position on a disk of a file corresponding to the data token at the time of communication of the data token;
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該サーバ装置であって、
前記クライアント装置との間で、ファイルデータのアクセスを制御するためのデータトークンを通信する第1の通信手段と、
該データトークンの通信時に、該データトークンに対応するファイルのディスク上での位置を示すエクステント情報を通信する第2の通信手段と、
を含むことを特徴とするサーバ装置。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. The server device constituting the inter-node shared file system that enables sharing of the same file from
First communication means for communicating a data token for controlling access to file data with the client device;
A second communication means for communicating extent information indicating a position on a disk of a file corresponding to the data token at the time of communication of the data token;
A server device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該サーバ装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
前記クライアント装置との間で、ファイルデータのアクセスを制御するためのデータトークンを通信する機能と、
該データトークンの通信時に、該データトークンに対応するファイルのディスク上での位置を示すエクステント情報を通信する機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium recording a program read by the computer that is the server device constituting the inter-node shared file system that enables sharing of the same file from
A function of communicating a data token for controlling access to file data with the client device;
A function of communicating extent information indicating a position on a disk of a file corresponding to the data token at the time of communication of the data token;
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
請求項1、2、4、5、7、9、10、12、13、又は15のいずれか1項に記載のノード間共用ファイルシステムにおいて前記サーバ装置が二重化される構成を有するノード間共用ファイル制御方法であって、
主系のサーバ装置においてファイル時刻が設定される際に、該ファイル時刻を従系のサーバ装置に送信し、
該従系のサーバ装置において、該ファイル時刻を設定する、
過程を含むことを特徴とするノード間共用ファイル制御方法。
16. The inter-node shared file having a configuration in which the server device is duplicated in the inter-node shared file system according to claim 1, 2, 4, 5, 7, 9, 10, 12, 13, or 15. A control method,
When the file time is set in the master server device, the file time is transmitted to the slave server device,
In the slave server device, the file time is set.
A shared file control method between nodes including a process.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイル制御方法であって、
前記サーバ装置において、複数のノードから共用される1つ以上のディスクボリューム毎に、空きディスク領域群、使用中ディスク領域群、及び前記各クライアント装置に対応するリザーブ中ディスク領域群を管理し、
前記クライアント装置において、前記サーバ装置に対して、ディスク領域のリザーブを要求し、
該リザーブ要求に対して、前記サーバ装置において、前記空きディスク領域群からディスク領域をリザーブ中ディスク領域として確保し、それに関する情報を該リザーブ要求を発行したクライアント装置に通知すると共に、該確保したリザーブ中ディスク領域を前記リザーブ要求を発行したクライアント装置に対応する前記リザーブ中ディスク領域群として管理し、
前記リザーブ要求を発行したクライアント装置において、該リザーブ要求に応答して前記サーバ装置から通知された情報に対応するリザーブ中ディスク領域をリザーブ中ディスク領域群として管理し、
前記クライアント装置において、ユーザプログラムによるファイルへのデータ書出し要求に伴って新たなディスク領域を割り当てる必要が発生した場合に、該クライアント装置が管理する前記リザーブ中ディスク領域群から最適なリザーブ中ディスク領域を選択し、そこに対してデータ書出しを実行し、該リザーブ中ディスク領域を前記リザーブ中ディスク領域群としての管理からはずし、該データ書出しを実行したリザーブ中ディスク領域に関する情報を前記サーバ装置に通知し、
前記サーバ装置において、前記クライアント装置から通知された情報に対応する前記データ書出しが発生したリザーブ中ディスク領域を、該通知を行ったクライアント装置に対応する前記リザーブ中ディスク領域群としての管理からはずして前記使用中ディスク領域として管理する、
過程を含むことを特徴とするノード間共用ファイル制御方法。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A shared file control method between nodes that enables sharing of the same file from
In the server device, for each of one or more disk volumes shared by a plurality of nodes, a free disk space group, a used disk space group, and a reserved disk space group corresponding to each client device are managed,
In the client device, the server device is requested to reserve a disk area,
In response to the reservation request, the server apparatus secures a disk area from the free disk area group as a reserved disk area, notifies the client apparatus that issued the reservation request of information related to the reserved disk area, and reserves the reserved reservation. A medium disk area is managed as the reserved disk area group corresponding to the client device that issued the reserve request;
In the client device that has issued the reserve request, the reserved disk area corresponding to the information notified from the server apparatus in response to the reserve request is managed as a reserved disk area group;
In the client device, when it is necessary to allocate a new disk area in response to a data write request to a file by a user program, an optimum reserved disk area is selected from the reserved disk area group managed by the client apparatus. Select, execute data writing to the selected disk area, remove the reserved disk area from management as the reserved disk area group, and notify the server apparatus of information related to the reserved disk area that has executed the data writing. ,
In the server apparatus, the reserved disk area in which the data writing corresponding to the information notified from the client apparatus has occurred is removed from management as the reserved disk area group corresponding to the client apparatus that has made the notification. Manage as the in-use disk space,
A shared file control method between nodes including a process.
請求項18に記載の方法であって、
前記サーバ装置における前記空きディスク領域群及びリザーブ中ディスク領域群の管理と、前記クライアント装置における前記リザーブ中ディスク領域群の管理を、前記ディスク領域の複数のサイズ範囲毎に行う、
過程を更に含むことを特徴とするノード間共用ファイル制御方法。
The method according to claim 18, comprising:
Management of the free disk area group and reserved disk area group in the server apparatus and management of the reserved disk area group in the client apparatus are performed for each of a plurality of size ranges of the disk area.
The inter-node shared file control method further comprising a process.
請求項18に記載の方法であって、
前記クライアント装置において、前記ユーザプログラムによるファイルへのデータ書出し要求に伴って新たなディスク領域を割り当てる必要が発生した場合に、該クライアント装置が管理する前記リザーブ中ディスク領域群から前記ファイルへのデータ書出しが既に行われているディスク領域に連続するリザーブ中ディスク領域を選択し、該選択に失敗した場合には、前記サーバ装置に対して、該連続するリザーブ中ディスク領域のリザーブ要求を発行する、
過程を更に含むことを特徴とするノード間共用ファイル制御方法。
The method according to claim 18, comprising:
In the client device, when it is necessary to allocate a new disk area in response to a data write request to a file by the user program, data write from the reserved disk area group managed by the client apparatus to the file is performed. Selects a reserved disk area that is continuous with the disk area that has already been performed, and issues a reserve request for the continuous reserved disk area to the server device if the selection fails.
The inter-node shared file control method further comprising a process.
請求項18に記載の方法であって、
前記サーバ装置において、前記クライアント装置の障害を監視し、その結果障害が検出されたクライアント装置に対応する前記リザーブ中ディスク領域群を、全て前記空きディスク領域群に変更する、
過程を更に含むことを特徴とするノード間共用ファイル制御方法。
The method according to claim 18, comprising:
In the server apparatus, the failure of the client apparatus is monitored, and as a result, the reserved disk area group corresponding to the client apparatus in which the failure is detected is changed to the free disk area group.
The inter-node shared file control method further comprising a process.
請求項18に記載の方法であって、
前記クライアント装置において、それが管理する前記リザーブ中ディスク領域群中のディスク領域が所定量を下回ったときに、前記サーバ装置に対して、新たなディスク領域のリザーブ要求を発行する、
過程を更に含むことを特徴とするノード間共用ファイル制御方法。
The method according to claim 18, comprising:
In the client device, when a disk area in the reserved disk area group managed by the client apparatus falls below a predetermined amount, a new disk area reservation request is issued to the server apparatus.
The inter-node shared file control method further comprising a process.
請求項18に記載の方法であって、
前記クライアント装置において、前記ユーザプログラムによるファイルへのデータ書出し要求に基づいて書き出されるデータを、主記憶上にキャッシュし、前記リザーブ中ディスク領域の割り当てを遅延させる、
過程を更に含むことを特徴とするノード間共用ファイル制御方法。
The method according to claim 18, comprising:
In the client device, the data written based on the data write request to the file by the user program is cached on the main memory, and the allocation of the reserved disk area is delayed.
The inter-node shared file control method further comprising a process.
請求項18に記載の方法であって、
前記クライアント装置において、前記データ書出しを実行したリザーブ中ディスク領域に関する情報の前記サーバ装置への通知は、前記ユーザプログラムがファイルをクローズし、又はキャッシュが一杯になり、或いは前記サーバ装置からデータトークンの回収を要求されるタイミングで行う、
過程を更に含むことを特徴とするノード間共用ファイル制御方法。
The method according to claim 18, comprising:
In the client device, the server device is notified of information about the reserved disk area where the data writing has been executed. The user program closes the file, the cache is full, or the server device receives a data token. Perform recovery at the required timing,
The inter-node shared file control method further comprising a process.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であって、
前記サーバ装置に対して、ディスク領域のリザーブを要求するリザーブ要求手段と、
該リザーブ要求に応答して前記サーバ装置から通知された情報に対応するリザーブ中ディスク領域をリザーブ中ディスク領域群として管理するリザーブ中ディスク領域群管理手段と、
ユーザプログラムによるファイルへのデータ書出し要求に伴って新たなディスク領域を割り当てる必要が発生した場合に、前記リザーブ中ディスク領域群管理手段が管理する前記リザーブ中ディスク領域群から最適なリザーブ中ディスク領域を選択し、そこに対してデータ書出しを実行し、前記リザーブ中ディスク領域群管理手段に対して該データ書出しを実行したリザーブ中ディスク領域の管理をはずさせ、該リザーブ中ディスク領域に関する情報を前記サーバ装置に通知するクライアント側データ書出し制御手段と、
を含むことを特徴とするクライアント装置。
In response to a file operation request from a user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A client device constituting an inter-node shared file system that enables sharing of the same file from
Reserve request means for requesting the server device to reserve a disk area;
A reserved disk area group managing means for managing a reserved disk area corresponding to information notified from the server device in response to the reserve request as a reserved disk area group;
When it is necessary to allocate a new disk area in response to a data write request to a file by the user program, an optimum reserved disk area is determined from the reserved disk area group managed by the reserved disk area group management means. Select and execute data writing to the reserved disk area group management means, and remove the management of the reserved disk area from which the data writing has been executed. A client side data writing control means for notifying the device;
A client device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成する当該クライアント装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
前記サーバ装置に対して、ディスク領域のリザーブを要求する機能と、
該リザーブ要求に応答して前記サーバ装置から通知された情報に対応するリザーブ中ディスク領域をリザーブ中ディスク領域群として管理する機能と、
ユーザプログラムによるファイルへのデータ書出し要求に伴って新たなディスク領域を割り当てる必要が発生した場合に、自身が管理する前記リザーブ中ディスク領域群から最適なリザーブ中ディスク領域を選択し、そこに対してデータ書出しを実行し、該リザーブ中ディスク領域を前記リザーブ中ディスク領域群としての管理からはずし、該データ書出しを実行したリザーブ中ディスク領域に関する情報を前記サーバ装置に通知する機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium on which a program read by the computer is recorded when used by a computer that is the client device constituting the inter-node shared file system that enables sharing of the same file from
A function of requesting the server device to reserve a disk area;
A function of managing reserved disk areas corresponding to information notified from the server device in response to the reserve request as a reserved disk area group;
When it is necessary to allocate a new disk area in response to a data write request to a file by the user program, the optimum reserved disk area is selected from the reserved disk area group managed by itself, and the corresponding reserved disk area is selected. A function of performing data writing, removing the reserved disk area from management as the reserved disk area group, and notifying the server device of information relating to the reserved disk area for which the data writing has been performed;
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成するサーバ装置であって、
複数のノードから共用される1つ以上のディスクボリューム毎に、空きディスク領域群、使用中ディスク領域群、及び前記各クライアント装置に対応するリザーブ中ディスク領域群を管理するディスク領域管理手段と、
前記クライアント装置からのディスク領域のリザーブ要求に対して、前記空きディスク領域群からディスク領域をリザーブ中ディスク領域として確保し、それに関する情報を該リザーブ要求を発行したクライアント装置に通知すると共に、該確保したリザーブ中ディスク領域を前記リザーブ要求を発行したクライアント装置に対応する前記リザーブ中ディスク領域群として管理するリザーブ中ディスク領域確保手段と、
前記クライアント装置から通知された情報に対応するデータ書出しが発生したリザーブ中ディスク領域を、該通知を行ったクライアント装置に対応する前記リザーブ中ディスク領域群としての管理からはずして前記使用中ディスク領域として管理するサーバ側データ書出し制御手段と、
を含むことを特徴とするサーバ装置。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A server device constituting a shared file system between nodes that enables sharing of the same file from
A disk area management means for managing a free disk area group, an in-use disk area group, and a reserved disk area group corresponding to each client device for each of one or more disk volumes shared by a plurality of nodes;
In response to a disk area reservation request from the client apparatus, a disk area is reserved as a reserved disk area from the free disk area group, and information related thereto is notified to the client apparatus that issued the reservation request, and the reservation is made A reserved disk area securing means for managing the reserved disk area as the reserved disk area group corresponding to the client device that has issued the reserve request;
The reserved disk area in which data writing corresponding to the information notified from the client apparatus has occurred is removed from management as the reserved disk area group corresponding to the client apparatus that has made the notification, and is used as the in-use disk area Server-side data export control means to be managed;
A server device comprising:
ユーザプログラムからのファイル操作要求を受けて、1つのノード内のクライアント装置がそれと同一の又は他のノード内のサーバ装置からトークンを獲得した上で該ファイル操作要求を処理することにより、複数のノードからの同一ファイルの共用を可能とするノード間共用ファイルシステムを構成するサーバ装置であるコンピュータにより使用されたときにそれによって読み出されるプログラムを記録した記録媒体であって、
複数のノードから共用される1つ以上のディスクボリューム毎に、空きディスク領域群、使用中ディスク領域群、及び前記各クライアント装置に対応するリザーブ中ディスク領域群を管理する機能と、
前記クライアント装置からのディスク領域のリザーブ要求に対して、前記空きディスク領域群からディスク領域をリザーブ中ディスク領域として確保し、それに関する情報を該リザーブ要求を発行したクライアント装置に通知すると共に、該確保したリザーブ中ディスク領域を前記リザーブ要求を発行したクライアント装置に対応する前記リザーブ中ディスク領域群として管理する機能と、
前記クライアント装置から通知された情報に対応するデータ書出しが発生したリザーブ中ディスク領域を、該通知を行ったクライアント装置に対応する前記リザーブ中ディスク領域群としての管理からはずして前記使用中ディスク領域として管理する機能と、
を前記コンピュータに行わせるためのプログラムを記録したコンピュータ読出し可能記録媒体。
In response to a file operation request from the user program, a client device in one node acquires a token from a server device in the same or another node, and then processes the file operation request, whereby a plurality of nodes are processed. A recording medium on which a program read by the computer is recorded when used by a computer which is a server device constituting a shared file system between nodes that enables sharing of the same file from
A function of managing a free disk area group, a used disk area group, and a reserved disk area group corresponding to each client device for each of one or more disk volumes shared by a plurality of nodes;
In response to a disk area reservation request from the client apparatus, a disk area is reserved as a reserved disk area from the free disk area group, and information related thereto is notified to the client apparatus that issued the reservation request, and the reservation is made A function for managing the reserved disk area as the reserved disk area group corresponding to the client device that has issued the reserve request;
The reserved disk area in which data writing corresponding to the information notified from the client apparatus has occurred is removed from management as the reserved disk area group corresponding to the client apparatus that has made the notification, and is used as the in-use disk area Functions to manage,
A computer-readable recording medium on which a program for causing the computer to execute is recorded.
JP14350299A 1998-11-18 1999-05-24 Internode shared file control method Expired - Fee Related JP3866448B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14350299A JP3866448B2 (en) 1998-11-18 1999-05-24 Internode shared file control method

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP32846398 1998-11-18
JP10-328463 1999-03-10
JP6358999 1999-03-10
JP11-63589 1999-03-10
JP14350299A JP3866448B2 (en) 1998-11-18 1999-05-24 Internode shared file control method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2006253341A Division JP4286857B2 (en) 1998-11-18 2006-09-19 Internode shared file control method

Publications (2)

Publication Number Publication Date
JP2000322306A JP2000322306A (en) 2000-11-24
JP3866448B2 true JP3866448B2 (en) 2007-01-10

Family

ID=27298223

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14350299A Expired - Fee Related JP3866448B2 (en) 1998-11-18 1999-05-24 Internode shared file control method

Country Status (1)

Country Link
JP (1) JP3866448B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210117234A1 (en) * 2019-10-16 2021-04-22 EMC IP Holding Company LLC Storage system with efficient release of failed component resources during synchronous replication

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4049525B2 (en) 2000-08-16 2008-02-20 富士通株式会社 Distributed processing system
US7617238B2 (en) 2003-07-11 2009-11-10 Nippon Telegraph And Telephone Corporation System management method, system management device, system management program, and storage medium containing system management program
US9053141B2 (en) * 2011-10-31 2015-06-09 International Business Machines Corporation Serialization of access to data in multi-mainframe computing environments
US11093475B2 (en) * 2017-11-03 2021-08-17 Salesforce.Com, Inc. External change detection

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210117234A1 (en) * 2019-10-16 2021-04-22 EMC IP Holding Company LLC Storage system with efficient release of failed component resources during synchronous replication

Also Published As

Publication number Publication date
JP2000322306A (en) 2000-11-24

Similar Documents

Publication Publication Date Title
US7865485B2 (en) Multi-threaded write interface and methods for increasing the single file read and write throughput of a file server
CN109739935B (en) Data reading method and device, electronic equipment and storage medium
JP5007350B2 (en) Apparatus and method for hardware-based file system
US9519589B2 (en) Methods to perform disk writes in a distributed shared disk system needing consistency across failures
US7555504B2 (en) Maintenance of a file version set including read-only and read-write snapshot copies of a production file
US9130821B2 (en) Hybrid locking using network and on-disk based schemes
JP4557975B2 (en) Reassign ownership in a non-shared database system
CN101567805B (en) Method for recovering failed parallel file system
US7577690B2 (en) Managing checkpoint queues in a multiple node system
US20070174541A1 (en) Methods to perform disk writes in a distributed shared disk system needing consistency across failures
US20030078946A1 (en) Clustered filesystem
CN110998557A (en) High availability database through distributed storage
US20100306256A1 (en) Distributed Database Write Caching With Limited Durability
JP2014532919A (en) Online transaction processing
JPH10222407A (en) Method for processing multiple data base transactions in same process for reducing process overhead and redundant retrieval from data base server
JP2002528814A (en) Distributed transaction processing system and method
CN102073739A (en) Method for reading and writing data in distributed file system with snapshot function
CN112162846B (en) Transaction processing method, device and computer readable storage medium
CN110750507A (en) Client persistent caching method and system under global namespace facing DFS
CN109582686B (en) Method, device, system and application for ensuring consistency of distributed metadata management
JP2004213435A (en) Storage device system
CN109726211B (en) Distributed time sequence database
JP4286857B2 (en) Internode shared file control method
JP3866448B2 (en) Internode shared file control method
JP2685530B2 (en) How to manage shared data

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060718

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060919

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: 20061003

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061005

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20091013

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131013

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees