JP3896077B2 - Computer system and file management method - Google Patents

Computer system and file management method Download PDF

Info

Publication number
JP3896077B2
JP3896077B2 JP2002377173A JP2002377173A JP3896077B2 JP 3896077 B2 JP3896077 B2 JP 3896077B2 JP 2002377173 A JP2002377173 A JP 2002377173A JP 2002377173 A JP2002377173 A JP 2002377173A JP 3896077 B2 JP3896077 B2 JP 3896077B2
Authority
JP
Japan
Prior art keywords
block
update
directory
file
snapshot
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
JP2002377173A
Other languages
Japanese (ja)
Other versions
JP2004157958A (en
Inventor
修 若森
聡 保科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2002377173A priority Critical patent/JP3896077B2/en
Publication of JP2004157958A publication Critical patent/JP2004157958A/en
Application granted granted Critical
Publication of JP3896077B2 publication Critical patent/JP3896077B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は計算機システムおよび同計算機システムで用いられるファイル管理方法に関し、特に過去のある所定の時点におけるファイルシステムのイメージを示すスナップショットを生成可能な計算機システムおよびファイル管理方法に関する。
【0002】
【従来の技術】
一般に、サーバコンピュータなどとして利用される計算機システムにおいては、その計算機システムに障害が発生した場合でも、ファイルシステムの一貫性を保持することが必要とされる。また、ファイルシステムの容量が大きい場合でも、障害からの復旧に時間がかからないことも要求される。
【0003】
近年、これらの要求を満たすファイルシステムが幾つか提案されている。例えば、従来では、コピーオンライト(COW)技術とロギング技術を用いることにより、システム障害時におけるファイルシステムの一貫性の保持と高速なリカバリを実現するファイルシステムが知られている(例えば、非特許文献1参照。)。
【0004】
また、コピーオンライト(COW)技術とロギング技術に加え、iノードをファイルとしてディスク上の任意の位置に記録することによって、前述の特徴の他に、指定した時点でのファイルシステムのイメージを記録する技術も知られている(例えば、特許文献1参照。)。
【0005】
これら従来の方法で使用されているコピーオンライト技術では、iノードなどのメタデータブロックやデータブロックを変更する時点でメタデータブロックやデータブロックを新規に作成し、作成したブロックに以前のブロックの内容をコピーし、コピーしたブロックの内容を変更するという方式を採用している。
【0006】
【非特許文献1】
“The Episode File System” Sailesh Chutani, Owen T. Anderson, Michael L. Kazar, Bruce W. Leverett, W. Anthony Mason, Robert N. Sidebotham Proceedings of the Winter USENIX 1992 Technical Conference, Jan 1992, p.43-59
【0007】
【特許文献1】
特表平8−511367号公報
【0008】
【発明が解決しようとする課題】
しかし、この方式では、元のブロックの内容は変更されずにそのまま保持されるため、過去の時点のスナップショットを容易に保存することができる反面、ファイルシステムの通常動作中に新たなブロックの生成やデータのコピーといった煩雑な処理を行うことが必要となる。
【0009】
また実際には、更新対象のブロックのみならず、そのブロックを含むファイルまたはディレクトリの階層構造上の上位ディレクトリのブロックをも含めてコピーすることが必要となり、ファイル書き込み時のオーバーヘッドは非常に大きなものとなる。
【0010】
さらに、ディスク上には、現在のファイルシステムのディレクトリ/ファイルに関する情報のみならず、ファイルシステムの更新処理の進行に伴って何世代にも渡るファイルシステムそれぞれに対応したディレクトリ/ファイルに関する情報が存在することとなる。よって、スナップショットを保存するためにファイルシステム上の多くのブロックを消費するという問題がある。
【0011】
本発明は上述の事情を考慮してなされたものであり、通常動作中におけるオーバーヘッドの低減を図ることができ、且つ何世代にも渡るファイルシステムそれぞれに対応したディレクトリ/ファイルに関する情報をファイルシステム内に構築することなく、指定された任意の時点のスナップショットを作成することが可能な計算機システムおよびファイル管理方法を提供することを目的とする。
【0012】
【課題を解決するための手段】
上述の課題を解決するため、本発明は、2次記憶装置上でファイルを階層構造で管理するファイルシステムを有する計算機システムにおいて、前記ファイルシステムの更新履歴を蓄積するためのログ記憶手段と、前記ファイルシステムで使用される前記2次記憶装置上のブロックの内容を更新する際に、そのブロックの更新前の内容を、当該ブロックを含むファイルまたはディレクトリを識別するための識別子および当該ブロックのブロック番号と共に前記ログ記憶手段に更新前イメージとして格納する更新前イメージ格納手段と、前記更新前イメージを前記ログ記憶手段に格納した後、前記ブロックを更新する手段と、前記ログ記憶手段に蓄積されている更新前イメージと前記ファイルシステムの現在のイメージとに基づいて、前記更新されたブロックを含むファイルまたはディレクトリの更新前の内容と、当該更新前のファイルまたはディレクトリを含む上位ディレクトリのディレクトリ情報とを復元することにより、過去の所定の時点における前記ファイルシステムのイメージを示すスナップショットを生成するスナップショット生成手段とを具備し、前記スナップショット生成手段は、前記更新されたブロックの更新前の内容を保持する第1の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手段と、前記更新されたブロックを含むファイルまたはディレクトリを管理するための管理情報を保持する前記ファイルシステム上の現在のイメージ上における管理情報ブロックの内容と前記第1の代替ブロックのブロック番号とに基づいて、前記管理情報が前記更新されたブロックの代わりに前記第1の代替ブロックへのリンク情報を持つように前記管理情報を修正し、当該修正された管理情報を保持する第2の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手段と、前記更新されたブロックのファイルまたはディレクトリが属する上位ディレクトリを保持する前記ファイルシステム上の現在のイメージ上におけるブロックの内容と前記第2の代替ブロックのブロック番号とに基づいて、前記上位ディレクトリが前記管理情報ブロックの代わりに前記第2の代替ブロックへのリンク情報を持つように前記上位ディレクトリのディレクトリ情報を修正し、当該修正されたディレクトリ情報を保持する第3の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手段とを含むことを特徴とする。
【0013】
この計算機システムにおいては、ブロックを更新する際に、更新対象のブロックの更新前データが、当該ブロックを含むファイルまたはディレクトリを識別するための識別子および当該ブロックのブロック番号と共にログ記憶手段に書き出され、そしてその後に更新対象のブロックが更新される。このようにして、ファイルシステムのブロック更新の度に、どのファイルまたはディレクトリ内のどのブロックが更新されたかを示す管理情報と更新前の内容とを含む更新前イメージがログ記憶手段に順次書き込まれていく。
【0014】
ファイルシステムのブロックは更新され、ファイルシステムには最新の状態に対応するファイル/ディレクトリのブロックだけが存在することとなる。スナップショットは、ログ記憶手段に蓄積されている更新前イメージとファイルシステムの現在のイメージとに基づいて生成される。更新されたブロックの更新前の内容とそのブロックがどのファイルまたはディレクトリ内のどのブロックであるかが各更新前イメージから判り、またファイルシステムの現在のイメージから当該ファイルまたはディレクトリを構成する現在のブロックの内容および当該ファイルまたはディレクトリと上位ディレクトリとの関係が判る。よって、ログ記憶手段に蓄積されている更新前イメージとファイルシステムの現在のイメージとに基づいて、更新されたブロックを含むファイルまたはディレクトリの更新前の内容と、当該更新前のファイルまたはディレクトリを含む上位ディレクトリのディレクトリ情報とを復元することにより、過去の所定の時点におけるファイルシステムのイメージを示すスナップショットを生成することが可能となる。
【0015】
したがって、何世代にも渡るファイルシステムそれぞれに対応したディレクトリ/ファイルに関する情報をファイルシステム内に構築することなく、必要なときにのみ、指定された任意の時点のスナップショットを作成することが可能となる。
【0018】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態を説明する。
図1には、本発明の第1実施形態に係る計算機システムの構成が示されている。この計算機システムは、例えばサーバコンピュータなどのコンピュータシステムとして使用されるものである。以下、このコンピュータシステム11のファイルシステムについて説明する。
【0019】
ファイル管理システム111はディスク記憶装置(DISK)などの2次記憶装置112上でファイルシステムを管理するためのものであり、コンピュータプログラムによって実現されている。ここで、ファイルシステムとは、2次記憶装置112上でファイルを階層構造で管理するためのデータ構造を意味する。2次記憶装置112上の記憶領域は物理的なブロックに分割されている。各ブロックのデータサイズは例えば512バイトである。以下では、UNIX(R)のファイルシステムを例示してその構成を説明することとする。
【0020】
ファイルシステムを管理するために、2次記憶装置112上には、図示のように、ブートブロック、スーパーブロック、iノードリスト領域、およびデータ領域が割り当てられている。ブートブロックは、ブートローダプログラムの格納に使用される領域である。スーパーブロックは、空きブロックのリストなどの情報を格納するために利用される。
【0021】
iノードリスト領域は、ファイルシステム内の個々のファイル/ディレクトリに関する情報を保持するiノードの集合を格納するためのブロック群である。iノードは、それに対応する個々のファイル/ディレクトリを管理するためのデータ構造である。iノードには、それに対応するファイル(ディレクトリもファイルの一種である)に関する管理情報として、1)ファイルの種類(通常ファイル、ディレクトリファイル等)、2)アクセス権、3)ファイルを構成する個々のブロックのブロック番号を示すアドレス情報、等が保持されている。
【0022】
iノードが格納された個々のiノードブロックは、それに対応するiノード番号によって参照される。iノード番号はファイルシステム内の個々のファイル/ディレクトリを一意に識別するためのファイル識別子であり、対応するファイル/ディレクトリのiノードを索引するためのインデックスとして使用される。
【0023】
データ領域は、ファイル/ディレクトリの実体が保持されるブロック群である。ディレクトリを保持するブロックには、当該ディレクトリに対応するiノード番号、およびその上位ディレクトリに対応するiノード番号に加え、当該ディレクトリ内に属する各ファイルまたはディレクトリに対応するiノード番号がディレクトリ情報として含まれている。
【0024】
ファイル管理システム111は、上述のような2次記憶装置112上のデータ構造を用いてファイルを階層構造で管理する。このファイル管理システム111は、過去の任意の時点のファイルシステムのイメージであるスナップショットを必要に応じて作成できるようにするために、更新前情報取得部201、およびスナップショット生成部202を備えている。
【0025】
更新前情報取得部201は、ファイルシステムの更新履歴をログ記憶領域113にシーケンシャルに蓄積する。ログ記憶領域113は不揮発性の記憶装置であり、本コンピュータシステム11がパワーオフされてもその記憶内容は消失されない。ログ記憶領域113は、例えば、2次記憶装置112とは異なる専用の記憶装置、またはファイルシステムとして利用されていない2次記憶装置112上の記憶領域を用いて実現されている。ログ記憶領域113は、管理情報記憶領域と、更新前データイメージ記憶領域とに分割されている。
【0026】
更新前情報取得部201は、2次記憶装置112上のブロックの内容が更新される際に、そのブロックの更新前の内容を、当該ブロックを含むファイルまたはディレクトリを識別するための識別子(iノード番号)および当該ブロックのブロック番号と共に、ログ記憶領域113に書き出す。この場合、iノード番号およびブロック番号は、ブロックの更新種別(変更、削除、追加等)を示すフラグと共に管理情報記憶領域に更新管理情報として格納され、またブロックの更新前の内容は、更新前データイメージ記憶領域に格納される。このようにして、ファイルシステムのブロック更新の度に、どのファイルまたはディレクトリ内のどのブロックが更新されたかを示す更新管理情報と更新前のデータ内容とを含む更新前イメージがログ記憶領域113に順次書き込まれていく。
【0027】
スナップショット生成部202は、ログ記憶領域113に蓄積されている更新前イメージとファイルシステムの現在のイメージとに基づいて、指定された過去の任意の時点のファイルシステムのイメージを示すスナップショットを生成する。この場合、スナップショットを生成すべき時点から現在までの間にログ記憶領域113に蓄積された更新前イメージが利用される。ログ記憶領域113内の最後尾の更新前イメージから順次参照しながら、更新されたファイル/ディレクトリの更新前の内容と、その更新前のファイル/ディレクトリを含む上位ディレクトリのディレクトリ情報とを復元していくことにより、指定された過去の任意の時点のスナップショットのイメージを作成することが出来る。
【0028】
スナップショットのイメージは2次記憶装置112上で復元することも可能であるが、通常、コンピュータシステム11の主記憶上には、iノードリスト領域のコピーであるiノードリスト203と各ディレクトリの情報のコピーであるディレクトリ情報204とが存在しており、それら情報からフィルシステムの現在のイメージを認識することが出来る。よって、主記憶上の情報を用いて、その主記憶上で過去の任意の時点のファイルシステムのイメージをスナップショットとして生成することも可能である。
【0029】
次に、図2および図3を参照して、ファイル管理システム111が更新前情報取得部201を用いて実行する更新前イメージの書き出し処理について説明する。
【0030】
ここでは、図2のようなツリー構造のファイルシステムにおいて、ディレクトリaの配下に存在するファイルbの内容を更新する場合について説明する。
【0031】
図3は、2次記憶装置112上に構築されたファイルシステムのデータ構造を示している。
iノードリスト領域には、ルートディレクトリのiノード、ディレクトリaのiノード、ファイルbのiノード、等が存在し、またデータ領域には、ルートディレクトリ、ディレクトリa、ファイルbそれぞれの実体を記憶したデータブロックが存在する。
【0032】
通常、ファイルは1以上のデータブロックから構成されており、ファイルbの管理情報を保持する管理情報ブロックであるiノードブロックには、ファイルbのデータの実体を構成しているデータブロックそれぞれのブロック番号(ここでは、ブロック番号98、100、110)へのリンクを持つポインタがアドレス情報として含まれている。
【0033】
同様に、ルートディレクトリのiノードブロックにはルートディレクトリのディレクトリ情報を保持するデータブロックを示すブロック番号が含まれており、そのルートディレクトリのデータブロック内にはそのカレントディレクトリであるルートディレクトリのiノードブロックを示すiノード番号(ここでは、3)と、その配下に存在するディレクトリaのiノードブロックを示すiノード番号(ここでは、4)がディレクトリ情報として含まれている。
【0034】
また、ディレクトリaの管理情報を保持するiノードブロックにはディレクトリaのデータブロックを示すブロック番号が含まれており、そのディレクトリaのデータブロック内には、その上位ディレクトリであるルートディレクトリのiノードブロックを示すiノード番号(ここでは、3)と、カレントディレクトリであるディレクトリaのiノードブロックを示すiノード番号(ここでは、4)と、ディレクトリa配下のファイルbのiノードブロックを示すiノード番号(ここでは、5)がディレクトリ情報として含まれている。
【0035】
いま、iノード番号5に対応するファイルb内のブロック100を更新する場合を考える。この場合、ブロック100の更新に先立ち、ファイルbのiノード番号5、更新対象のブロック番号100、および更新種別が変更であることを示すフラグ情報(M)からなる更新管理情報と、ブロック100の更新前データとがログ記憶領域113に格納される。
【0036】
図4のフローチャートには、ファイル/ディレクトリの更新時にファイル管理システム111によって実行される一連の処理手順が示されている。
【0037】
ファイル管理システム111は、オペレーティングシステムやアプリケーションプログラムからのファイル操作要求等によってファイル/ディレクトリの内容を更新する必要が生じた場合(ステップS101のYES)、まず、当該更新対象のファイル/ディレクトリのファイル/ディレクトリ名からそれに対応するiノード番号をサーチし、その更新対象のファイル/ディレクトリのiノードブロックを取得する(ステップS102)。
【0038】
次いで、ファイル管理システム111は、取得したiノードブロックに含まれるアドレス情報から更新対象のファイル/ディレクトリの実体を保持する各データブロックを認識する(ステップS103)。iノード番号5に対応するファイルb内のブロック100を更新する場合を考える。この場合、ファイル管理システム111は、更新前情報取得部201を用いて、更新管理情報(iノード番号=5、ブロック番号=100、フラグ情報=M)と、ブロック番号100のブロックの更新前の内容とを、更新前イメージとしてログ記憶領域113に書き込む(ステップS104,S105)。ログ記憶領域113に書き出している途中でブロック100の内容が変更されるのを防ぐため、ログ記憶領域113への書き込みを実行する前にブロック100をロックする。ログ記憶領域113への書き込みが終了すると、ブロック100のロックを解除する。
【0039】
この後、ファイル管理システム111は、ブロック番号100のブロックの内容を例えばbからb’に更新する(ステップS106)。この更新により、ファイルシステムは常に最新の状態に維持される。
【0040】
図5には、ログ記憶領域113に多数の更新前イメージ(更新前情報)が蓄積されている様子が示されている。
【0041】
スナップショットを作成可能な時点をTIME1,TIME2,TIME3,…とする。例えば、24時間ノンストップで稼働するコンピュータシステムにおいて、毎日12:00の時点におけるスナップショットを生成可能にする場合、24時間間隔でTIME1,TIME2,TIME3が設定される。本日の12:00の時点におけるスナップショットを生成する場合には、TIME3以降からカレントタイムまでに蓄積された更新前イメージ(更新前情報)が最後尾から順に用いられる。また、昨日の12:00の時点におけるスナップショットを生成する場合にはTIME2以降からカレントタイムまでに蓄積された更新前イメージ(更新前情報)が最後尾から順に用いられ、一昨日の12:00の時点におけるスナップショットを生成する場合にはTIME1以降からカレントタイムまでに蓄積された更新前イメージ(更新前情報)が最後尾から順に用いられることとなる。
【0042】
次に、図6を参照して、ファイルシステムの現在のイメージとログ記憶領域113の更新前イメージとを利用してスナップショットを作成する処理について説明する。
【0043】
ログ記憶領域113に蓄積されている更新前イメージの更新管理情報から、iノード番号5に対応するファイルbのブロック100が更新されたことが判る。
【0044】
(1)変更前のファイルb用のデータブロックの作成
ここでは、更新されたブロック100に代わる新たなブロックを作成するために、データ領域上に空きブロック(ここでは、ブロック番号170)を確保し、ログ記憶領域113に記憶されているブロック100の更新前データbをブロック番号170にコピーする。
【0045】
(2)変更前のファイルb用のiノードブロックの作成
次いで、変更前のファイルbに対応する新たなiノードブロックを生成するために、iノードリスト領域上に空きブロックを確保する。そして、更新されたファイルbを管理するための管理情報を保持するファイルbの現在のiノードブロックの内容をカレントファイルシステムから取得する。取得したファイルbのiノードブロックに含まれる管理情報の内、更新されたブロック100へのリンクを示すアドレス情報は修正され、ブロック番号170へのリンクを示すように書き換えられる。修正された管理情報は、iノードリスト領域上に確保された空きブロックに書き込まれ、これによってブロック番号98、170、110から構成される変更前のファイルbを管理するためのiノードブロック、つまり現在のファイルbのiノードブロックに代わる、1世代前のファイルb(−)に対応するiノードブロック、が生成される。1世代前のファイルb(−)には新たなiノード番号(ここでは、30)が割り当てられる。
【0046】
(3)(4)変更前のファイルbを含む上位ディレクトリのディレクトリ情報の復元
次に、変更前のファイルbを含む上位ディレクトリaのディレクトリ情報の復元が行われる。まず、上位ディレクトリaのディレクトリ情報を保持する現在のディレクトリaのデータブロックに代わる新たなデータブロックを作成するために、データ領域上に空きブロックを確保する。そして、ディレクトリaの現在のデータブロックの内容をカレントファイルシステムから取得する。取得したディレクトリaのディレクトリ情報の内、その配下に存在する現在のファイルbのiノードブロックへのリンクを示すアドレス情報については修正され、変更前のファイルb(−)のiノードブロックへのリンクを示すように書き換えられる。すなわち、現在のファイルbのiノードブロックを示すiノード番号5から、1世代前のb(−)のiノードブロックを示すiノード番号30に変更される。
【0047】
修正されたディレクトリ情報は、データ領域上の空きブロックに書き込まれ、これによって変更前のファイルb(−)を含む上位ディレクトリa(−)のデータブロックが生成される。
【0048】
また、iノードリスト領域上の空きブロックを用いて、上位ディレクトリa(−)のiノードブロックも生成される。この場合、ディレクトリaの現在のiノードブロックの管理情報をカレントファイルシステムから取得する。取得したディレクトリaの管理情報の内、現在のディレクトリaのブロックへのリンクを示すアドレス情報については修正され、ディレクトリa(−)のデータブロックへのリンクを示すように書き換えられる。修正された管理情報は、iノードリスト領域上に確保された空きブロックに書き込まれ、これによって1世代前のディレクトリa(−)のiノードブロックが生成される。この1世代前のディレクトリa(−)には、新たなiノード番号(ここでは、29)が割り当てられる。
【0049】
ディレクトリa(−)のデータブロックに保持されているカレントディレクトリのiノード番号は、現在のディレクトリaのiノード番号4から、ディレクトリa(−)のiノード番号29に変更される。
【0050】
(5)(6)次に、最上位のディレクトリである現在のルートディレクトリに代わる新たなルートディレクトリのデータブロックを作成するために、データ領域上に空きブロックを確保する。そして、ルートディレクトリの現在のデータブロックの内容をカレントファイルシステムから取得する。取得したルートディレクトリのディレクトリ情報の内、その配下に存在する現在のディレクトリaのiノードブロックへのリンクを示すアドレス情報については修正され、1世代前のディレクトリa(−)のiノードブロックへのリンクを示すように書き換えられる。すなわち、現在のディレクトリaのiノードブロックを示すiノード番号4から、1世代前のa(−)のiノードブロックを示すiノード番号29に変更される。修正されたディレクトリ情報は、データ領域上の空きブロックに書き込まれ、これによって1世代前のルートディレクトリ(−)のブロックが生成される。
【0051】
また、iノードリスト領域上の空きブロックを用いて、1世代前のルートディレクトリ(−)のiノードブロックも生成される。この場合、現在のルートディレクトリのiノードブロックの管理情報をカレントファイルシステムから取得する。取得したルートディレクトリの管理情報の内、現在のルートディレクトリのブロックへのリンクを示すアドレス情報については修正され、1世代前のルートディレクトリ(−)のブロックへのリンクを示すように書き換えられる。修正された管理情報は、iノード領域上の空きブロックに書き込まれ、これによって1世代前のルートディレクトリ(−)のiノードブロックが生成される。この1世代前のルートディレクトリ(−)には、新たなiノード番号(ここでは、28)が割り当てられる。ルートディレクトリ(−)のデータブロックに保持されているカレントディレクトリのiノード番号は、現在のルートディレクトリのiノード番号3から、ルートディレクトリ(−)のiノード番号29に変更される。
【0052】
このようにして、空きブロックを用いて変更前のファイルに対応するブロックとその上位ディレクトリに関するブロックとを作成することによって、更新されたファイルの更新前の内容と、当該変更前のファイルを含む上位ディレクトリのディレクトリ情報とを復元することにより、現在のファイルシステムのイメージをそのまま維持した状態で、過去の任意の時点のファイルシステムのイメージを示すスナップショットを生成することが可能となる。
【0053】
図7のフローチャートには、スナップショット生成時にスナップショット生成部202によって実行される一連の処理手順が示されている。
【0054】
スナップショット生成部202は、ログ記憶領域113の最後尾から更新前イメージを順に取得し(ステップS111)、そして指定された時点のスナップショットに関する全ての更新前イメージに対する処理が完了するまで、各更新前イメージ毎に以下の処理を再帰的に実行する(ステップS112)。
【0055】
まず、スナップショット生成部202は、最後尾の更新前イメージの内容から、どのファイル/ディレクトリにおけるどのブロックが更新されたのかを認識し、その更新されたファイル/ディレクトリに対応する変更前のファイル/ディレクトリを復元するためのデータブロック(変更前ファイル/ディレクトリ用データブロック)をデータ領域上に新規作成する(ステップS113)。
【0056】
例えば、上述の例では、iノード番号5に関連するファイルbのブロック100の内容が更新されたことがわかるので、更新されたブロック100に代わる変更前ファイル/ディレクトリ用データブロックを空きブロックを利用して新規に作成し、ログ記憶領域113に記録されているブロック100の更新前データの内容をこの新規作成した変更前ファイル/ディレクトリ用データブロックにコピーする。
【0057】
次に、スナップショット生成部202は、更新されたファイル/ディレクトリに対応する変更前のファイル/ディレクトリを復元するためのiノードブロック(変更前ファイル/ディレクトリ用iノードブロック)をiノードリスト領域上に新規作成する(ステップS114)。
【0058】
すなわち、スナップショット生成部202は、ファイルbの現在のiノードブロックの内容とステップS113で新規作成したデータブロックのブロック番号170とを使用して、変更されたファイルbのiノードの管理情報を修正し、それをiノードリスト領域上に新規作成した変更前ファイル/ディレクトリ用iノードブロックにコピーする。
【0059】
以上のステップS113,S114の処理は、上述の(1)(2)の処理に相当しており、これによって変更前のファイル/ディレクトリの内容が復元される。
【0060】
この後、スナップショット生成部202は、変更前ファイル/ディレクトリを含む上位ディレクトリa(−)用のデータブロックをデータ領域上に新規作成する(ステップS115)。ここでは、スナップショット生成部202は、更新されたファイルbの上位ディレクトリaの現在のデータブロックの内容とステップS114で作成した変更前ファイル/ディレクトリ用iノードブロックのiノード番号とに基づいて、上位ディレクトリaの現在のデータブロックの内容を修正し、それを新規作成したディレクトリa(−)用のデータブロックにコピーする。
【0061】
そして、スナップショット生成部202は、変更前ファイル/ディレクトリを含む上位ディレクトリa(−)用のiノードブロックをiノードリスト領域上に新規作成する(ステップS116)。ここでは、スナップショット生成部202は、更新されたファイルbの上位ディレクトリaの現在のiノードブロックの内容とステップS115で作成した上位ディレクトリa(−)用のデータブロックのブロック番号とに基づいて、上位ディレクトリaの現在のiノードブロックの内容を修正し、それを新規作成したディレクトリa(−)用のiノードブロックにコピーする。
【0062】
以上のステップS115,S116の処理は、上述の(3)(4)の処理に相当しており、これによって変更前のファイル/ディレクトリを含む上位ディレクトリの内容が復元される。そして、ルートディレクトリに遡るまで、ステップS115,S116の処理が各上位ディレクトリ毎に実行される(ステップS117)。これにより、更新前のファイル/ディレクトリからルートディレクトリに至るまでの各ディレクトリの情報を含むブロック(データブロック、iノードブロック)が新規作成され、変更前のファイルまたはディレクトリをルートディレクトリから参照するためのリンク情報が復元される。
【0063】
次に、図8を参照して、スナップショットを作成すべき時点とログ記憶領域113に記録すべき更新前イメージとの関係について説明する。
【0064】
スナップショットを作成すべき時点は1つのファイル更新タイミング毎に設定してもよいが、通常は、ある一定の時間間隔毎に設定される。この場合、同一のファイル/ディレクトリ内の同一ブロックの更新に際してはその更新前イメージをログ記憶領域113に逐次採取する必要はなく、スナップショットを作成すべき各時点を基準に、それ以降に最初に更新が行われる際にのみ当該更新に関する更新前イメージをログ記憶領域113に採取すればよい。
【0065】
図8においては、ファイルbのブロック100の更新を○、ファイルbのブロック98の更新を△、ファイルXのブロックNの更新を□で示している。スナップショットを作成すべき時点TIME1と次の時点TIME2との間のファイル更新において、ファイルbのブロック100の更新が何度か繰り返された場合を想定する。復元すべきファイルイメージはTIME1であるので、ログ記憶領域113に更新前イメージを採取するのは、TIME1以降における最初の更新時のみでよい。TIME1の時点におけるファイルbのブロック100の内容をログ記憶領域113に採取することにより、ファイルbのブロック100の内容をTIME1の時点に復元することが出来るからである。他のファイル/ブロックについても同様である。
【0066】
更新前イメージを採取すべきかどうかは、例えば、スナップショットを作成すべき前回の時点以降において、更新対象ブロックに対応する更新前イメージをログ記憶領域113に採取したかどうかを示す識別情報を該当するファイル/ディレクトリのiノード構造体の中に保持したり、更新前イメージをログ記憶領域113に採取したブロックの一覧をテーブルに登録することによって、判断することが出来る。ファイル/ディレクトリの更新時における一連の処理手順を図9に示す。以下では、iノード構造体の中に識別情報を保持する場合を想定する。
【0067】
ファイル管理システム111は、オペレーティングシステムやアプリケーションプログラムからのファイル操作要求等によってファイル/ディレクトリの内容を更新する必要が生じた場合(ステップS121のYES)、まず、当該更新対象のファイル/ディレクトリのファイル/ディレクトリ名からそれに対応するiノード番号をサーチし、その更新対象のファイル/ディレクトリのiノードブロックを取得する(ステップS122)。
【0068】
次いで、ファイル管理システム111は、取得したiノードブロックに含まれるアドレス情報から更新対象のファイル/ディレクトリの実体を保持する各データブロックを認識する(ステップS123)。iノード番号5に対応するファイルb内のブロック100を更新する場合を考える。この場合、ファイル管理システム111は、iノードブロックに含まれるiノード構造体内に保持されている上述の識別情報から、スナップショットを作成すべき直前の時点以降において既に当該更新対象ブロックに関する更新前イメージがログ記憶領域113に記録済みであるかどうかを判断する(ステップS124)。
【0069】
もし既に記録済みであるならば(ステップS124のYES)、当該ブロックの更新は2回目以降の更新であるので、更新前イメージの採取は行わず、当該ブロックの更新処理を実行する(ステップS128)。
【0070】
一方、記録されていない場合には(ステップS124のNO)、当該ブロックの更新は最初の更新であるので、以下の処理を実行する。
【0071】
すなわち、ファイル管理システム111は、更新前情報取得部201を用いて、更新管理情報(iノード番号=5、ブロック番号=100、フラグ情報=M)と、ブロック番号100のブロックの更新前の内容とを、更新前イメージとしてログ記憶領域113に書き込む(ステップS125,S126)。次いで、ファイル管理システム111は、ブロック番号100に関する更新前イメージが採取済みであることを示す識別情報をファイルbのiノード構造体に記録する(ステップS127)。
【0072】
ログ記憶領域113に書き出している途中でブロック100の内容が変更されるのを防ぐため、ログ記憶領域113への書き込みを実行する前にブロック100をロックする。ログ記憶領域113への書き込みおよび識別情報の記録が終了すると、ブロック100のロックを解除する。この後、ファイル管理システム111は、ブロック番号100のブロックの内容を例えばbからb’に更新する(ステップS128)。
【0073】
なお、iノード構造体への識別情報の記録は、例えば、メモリ上に存在するiノードリスト203上で行えば良い。iノードリスト203上の識別情報の内容は、次のスナップショットを作成すべき時点が到来した時にクリアされる。
【0074】
次に、図10乃至図12を参照して、ファイルを削除するファイル更新処理を行った際におけるスナップショットの復元動作について説明する。
【0075】
ここでは、図10のようなツリー構造のファイルシステムにおいて、ディレクトリaの配下に存在するファイルb全体を削除する場合について説明する。
【0076】
図11は、2次記憶装置112上に構築されたファイルシステムのデータ構造を示している。ここでは、簡単のために、ファイルbの実体が一つのデータブロックから構成されている場合を例示する。
【0077】
iノード番号5に対応するファイルb全体を削除するファイル更新処理では、ファイルbのデータブロック(ブロック番号100)が削除されると共に、ファイルbのiノードブロック(ここでは、ブロック番号7とする)も削除される。これに伴い、ディレクトリaのデータブロック(ここでは、ブロック番号90とする)に保持されているディレクトリ情報もaからa’に更新され、ファイルbのiノードブロックへのリンク情報が削除される。このような一連のファイル更新処理操作の実行に先立ち、ログ記憶領域113への更新前イメージの登録処理が以下のように行われる。
【0078】
まず、ファイルbのデータブロック(ブロック番号100)の更新に関する更新前イメージとして、ファイルbのiノード番号5、更新対象のブロック番号100、および更新種別が削除であることを示すフラグ情報(D)からなる更新管理情報と、ブロック100の更新前データとがログ記憶領域113に格納される。次に、ファイルbのiノードブロック(ブロック番号7)の更新に関する更新前イメージとして、ファイルbのiノード番号5、更新対象のブロック番号7、および更新種別が削除であることを示すフラグ情報(D)からなる更新管理情報と、ブロック7の更新前データとがログ記憶領域113に格納される。さらに、ディレクトリaの更新に関する更新前イメージとして、ディレクトリaのiノード番号4、更新対象のブロック番号90、および更新種別が変更であることを示すフラグ情報(M)からなる更新管理情報と、ブロック90の更新前データとがログ記憶領域113に格納される。これら3つの更新前イメージは、ファイルbの削除に関する1組の更新前イメージを構成する。
【0079】
図12には、ファイルシステムの現在のイメージとログ記憶領域113の更新前イメージとを利用してスナップショットが作成される様子が示されている。
【0080】
ログ記憶領域113に蓄積されている3つの更新前イメージそれぞれ更新管理情報から、iノード番号5に対応するファイルbが削除され、そのファイル削除に伴ってディレクトリaの内容が変更されたことが判る。
【0081】
また、ログ記憶領域113には、更新前データとして、ファイルbの変更前のデータ内容、ファイルbの変更前のiノードの内容、およびディレクトリaの変更前のデータ内容が蓄積されているので、それら変更前のデータの内容と、現在のファイルシステムイメージとから、図6と同様の手順で、削除前のファイルbのデータブロック及びiノードブロックと、削除前のファイルbを含むディレクトリaのデータブロックおよびiノードブロックと、そのディレクトリaを含むルートディレクトリのデータブロックおよびiノードブロックを空き領域に新規作成することにより、ファイルbの削除前のスナップショットを復元することが出来る。
【0082】
以上のように、本第1実施形態によれば、ファイル/ディレクトリの変更前イメージをログ領域にシーケンシャルに書き込むことで、特定の時点でのファイルシステムのスナップショットイメージを復元することが可能になる。しかも、通常動作中のブロック更新時には、そのブロックのツリー構造の上位ディレクトリの内容をコピーする必要がないため、それによるオーバーヘッドを無くすことが出来る。
【0083】
また、第1実施形態では、ファイルシステムのスナップショットイメージを2次記憶装置112上に復元することを前提としたが、読み出し要求されたブロックに関する更新前イメージまたはファイルシステムにおける現在のイメージを選択的に主記憶装置上に読み出すことにより、更新されたブロックを含むファイルまたはディレクトリの更新前の内容を復元することもできる。以下、この場合の例を本発明の第2実施形態として説明する。以下では、第1実施形態と異なる部分を主として説明することとする。
【0084】
本第2実施形態においては、図13に示されているように、読み出し要求されたブロックに関する更新前イメージをログ記憶領域113から高速に読み出せるようにするために、スナップショット用バッファ301と、このスナップショット用バッファ301を管理するためのスナップショット用バッファ管理テーブル302を使用する。
【0085】
スナップショット用バッファ301は主記憶上に割り当てられたバッファエリアであり、ここにはログ記憶領域113に蓄積された更新前イメージが読み出される。
【0086】
ここで、スナップショットイメージ生成部202によって実行されるスナップショットイメージ生成処理の原理について説明する。
【0087】
本第2実施形態においては、過去の任意の時点のスナップショットイメージを生成する際には、そのスナップショットイメージの作成に必要な更新前イメージがログ記憶領域113から読み出されて、スナップショット用バッファ301に格納される。そして、ブロックの読み出し要求を受けるたびに、その読み出し要求で指定されたブロック番号のブロックに対応する更新前イメージが存在するか否かを判別することによって、カレントファイルシステムまたはスナップショット用バッファ301から該当するブロックが選択的に読み出される。
【0088】
例えば、上述したようにファイルbがブロック番号98,100,110の3つのデータブロックから構成されており、ブロック番号100のブロックが更新されている場合を想定する。
【0089】
ファイルbの更新前イメージを復元することが利用者によって指定された場合、カレントファイルシステムで管理されているファイルbのiノードの内容に基づいて、ブロック番号98,100,110に対する読み出し要求が順次発行される。ブロック番号98のブロックは更新されていないので、そのブロック番号98に対応するブロックのデータが2次記憶装置112上のカレントファイルシステムから主記憶上に読み出される。ブロック番号100のブロックは更新されているので、そのブロック番号100のブロックの更新前データがスナップショット用バッファ301から主記憶上に読み出される。そして、ブロック番号110のブロックは更新されていないので、そのブロック番号110に対応するブロックのデータは2次記憶装置112上のカレントファイルシステムから主記憶上に読み出される。このようにして、ファイルbの更新前の内容が復元される。
【0090】
次に、図15を参照して、スナップショット用バッファ管理テーブル302の具体的な構成例について説明する。
【0091】
スナップショット用バッファ管理テーブル302には、ログ記憶領域113からスナップショット用バッファ301に読み出す各更新前イメージ毎に、iノード番号、ブロック番号、バッファのサイズ、更新前データの含まれるログ記憶領域113のオフセット、更新前データの含まれるバッファのアドレス、等を管理するためのエントリが存在する。
【0092】
バッファのサイズは更新前データのデータサイズに相当するものであり、図16に示すように、スナップショット用バッファ301上に確保される当該更新前データを保持するためのバッファエリアのサイズを示す。更新前データの含まれるバッファのアドレスは、図16に示すように、スナップショット用バッファ301上に確保される当該更新前データを保持するためのバッファエリアのアドレスを示す。また、ログ記憶領域113のオフセットは、当該更新前データが記憶されているログ記憶領域113の先頭アドレスからのオフセット値を示す。
【0093】
以下、これらスナップショット用バッファ301およびスナップショット用バッファ管理テーブル302を用いて実行される具体的な処理手順について説明する。
【0094】
更新前情報取得部201によって実行されるログ記憶領域113への更新前イメージの書き出し処理については、第1実施形態と同様に、上述の図4のフローチャートに示す手順によって実行される。
【0095】
スナップショットイメージを生成する際には、まず、スナップショット用バッファ管理テーブル302を作成する処理が実行される。図17のフローチャートにはその手順が示されている。
【0096】
すなわち、スナップショット生成部202は、ログ記憶領域113の最後尾から更新前イメージを順に取得し(ステップS201)、そして指定された時点のスナップショットに関する全ての更新前イメージに対する処理が完了するまで、各更新前イメージ毎に以下の処理を再帰的に実行する(ステップS202)。
【0097】
まず、スナップショット生成部202は、最後尾の更新前イメージの内容から、更新されたブロックのiノード番号、ブロック番号、更新前データのデータサイズ、およびその更新前データが記憶されているログ記憶領域113のオフセット値を取得し、それらをスナップショット用バッファ管理テーブル302に登録する(ステップS203)。
【0098】
この時点ではログ記憶領域113にある更新前データは読み出さない。そして、ログ記憶領域113に記憶された更新前イメージを一つずつ遡りながら(ステップS204)、ステップS203の処理を順次実行する。これにより、復元すべき所定の過去の時点までの全ての更新前イメージに関する管理情報がスナップショット用バッファ管理テーブル302に登録される。
【0099】
次に、図18のフローチャートを参照して、スナップショット用バッファ管理テーブル302を用いて実行されるスナップショットイメージ生成処理の手順を説明する。
【0100】
スナップショットイメージ生成処理は、個々のファイル/ディレクトリの過去のイメージの読み出し要求が発行される度にその都度実行される。すなわち、スナップショットイメージ上のファイルやディレクトリに対する読み出し要求が発生した場合には、カレントファイルシステムで管理されているファイルやディレクトリのiノードを参照することにより、当該ファイル/ディレクトリを構成する各ブロックのブロック番号が取得される。そしてそのブロック番号に対するデータの読み出し要求がスナップショット生成部202に発行される。
【0101】
スナップショット生成部202は、データ読み出し要求を受け付けると(ステップS211)、スナップショット用バッファ管理テーブル302を検索して、読み出し要求で指定されたブロック番号のブロックがスナップショット用バッファ管理テーブル302に登録されているかどうかを判断する(ステップS212)。読み出し要求で指定されたブロック番号のブロックがスナップショット用バッファ管理テーブル302に登録されていないならば(ステップS212のNO)、当該ブロックは更新されていないので、スナップショット生成部202はファイルシステムから現在のブロックを読み出し、それを要求元に返却する(ステップS213)。
【0102】
一方、読み出し要求で指定されたブロック番号のブロックがスナップショット用バッファ管理テーブル302に登録されているならば(ステップS212のYES)、スナップショット生成部202は、以下の処理を実行する。
【0103】
すなわち、スナップショット生成部202は、スナップショット用バッファ管理テーブル302の該当するエントリにバッファアドレスが登録されているかどうかを調べることにより、読み出し要求で指定されたブロック番号の更新前データがスナップショット用バッファ301上に既に存在するか否かを判断する(ステップS214)。スナップショット用バッファ301上に既に存在する場合には(ステップS214のYES)、スナップショット生成部202は、該当する更新前データをスナップショット用バッファ301から即座に読み出し、それを要求元に返却する(ステップS218)。
【0104】
スナップショット用バッファ301上に存在しない場合には(ステップS214のNO)、スナップショット生成部202は、スナップショット用バッファ301上にバッファエリアを確保した後(ステップS215)、該当する更新前データをログ記憶領域113から読み出してバッファエリア上に書き込む(ステップS216)。そして、スナップショット生成部202は、バッファアドレスをスナップショット用バッファ管理テーブル302の該当するエントリに登録した後(ステップS217)、更新前データをスナップショット用バッファ301から読み出し、それを要求元に返却する(ステップS218)。
【0105】
以上のように、第2実施形態においては、読み出し要求されたブロックに関する更新前データまたはカレントファイルシステムにおける現在のデータを選択的に読み出すことにより、更新されたブロックを含むファイルまたはディレクトリの更新前の内容を復元することができる。
【0106】
また、上記第1実施形態では、2次記憶装置112上に用意した新たなブロックを用いて更新前データのブロックを復元しているので、復元されたスナップショットではiノード番号が元のiノード番号とは異なる結果となったが、第2実施形態においては、ブロック読み出し要求に応じてオンデマンドで更新前データを返却する仕組みであるので、更新前のファイルシステムのスナップショットイメージを、iノード番号を変更することなく復元することが可能となる。また、スナップショットイメージを2次記憶装置112上に作成する場合には、多くのディスクI/Oが発生するため、スナップショットイメージの復元に時間がかかるが、第2実施形態の方式によれば、読み出し要求されたファイル/ディレクトリの更新前イメージを高速に復元することができる。
【0107】
なお、以上の第2実施形態の説明においては、ブロックを変更する場合を例に取って説明したが、ブロックを追加または削除した場合についても同様にその復元を行うことが出来る。例えば、ファイルbが削除された場合、ファイルbの全データブロックおよびiノードブロックそれぞれに関する更新前データと、上位ディレクトリaのデータブロックに関する更新前データとがログ記憶領域113に蓄積される。ディレクトリaの読み出し要求が発生すると、スナップショット用バッファ301を通じてログ記憶領域113からディレクトリaの更新前データが読み出される。ディレクトリaの更新前データには、削除されたファイルbのiノード番号が含まれており、そのiノード番号からファイルbのiノードブロックのブロック番号が判る。ファイルbのiノードブロックに対する読み出し要求が発生すると、スナップショット用バッファ301を通じてログ記憶領域113からファイルbのiノードブロックに関する更新前データが読み出される。この更新前データにはファイルbの全データブロックそれぞれのブロック番号が含まれているので、それらブロック番号に対する読み出し要求を発行することにより、ファイルbの更新前イメージが復元されることとなる。
【0108】
また、第2実施形態の方式においては、更新対象のブロックに対応するiノード番号についてはログ記憶領域113に蓄積せずとも、スナップショットイメージを生成することが出来る。
【0109】
また、スナップショット用バッファ管理テーブル302としては、配列を利用して実現する他、リンクリストやハッシュテーブルなどを利用して実現することもできる。さらに、スナップショット用バッファ管理テーブル302とスナップショット用バッファ301はログ記憶領域113に対するデータ読み出し速度の高速化を図るために設けたものであるので、これらスナップショット用バッファ管理テーブル302とスナップショット用バッファ301を用いずとも、読み出し要求されたブロックがログ記憶領域113に存在するかどうかを判別する事によって、スナップショットイメージを生成することが出来る。
【0110】
さらに、上記第1実施形態および第2実施形態それぞれに係るファイル管理システム111の機能はすべてコンピュータプログラムによって実現されているので、このプログラムをコンピュータ読み取り可能な記憶媒体を通じて通常のコンピュータに導入して実行するだけで、本第1実施形態および第2実施形態それぞれと同様の効果を得ることが出来る。
【0111】
また、本発明は、上記各実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。更に、上記各実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜な組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件から幾つかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題が解決でき、発明の効果の欄で述べられている効果が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。
【0112】
【発明の効果】
以上詳述した如く本発明によれば、通常動作中におけるオーバーヘッドの低減を図ることができ、且つ何世代にも渡るファイルシステムそれぞれに対応したディレクトリ/ファイルに関する情報をファイルシステム内に構築することなく、指定された任意の時点のスナップショットを作成することが可能となる。
【図面の簡単な説明】
【図1】本発明の第1実施形態に係る計算機システムの構成を示すブロック図。
【図2】同第1実施形態の計算機システムで管理されているファイルシステムのツリー構造の例を示す図。
【図3】図2のファイルシステムが更新される場合における更新前イメージの記録動作を説明するための図。
【図4】同第1実施形態の計算機システムにおいてファイル更新処理時に実行される一連の処理手順を示すフローチャート。
【図5】同第1実施形態の計算機システムに設けられたログ記憶領域に多数の更新前イメージが蓄積された様子を示す図。
【図6】同第1実施形態の計算機システムにおけるスナップショットの作成処理の様子を示す図。
【図7】同第1実施形態の計算機システムにおけるスナップショット作成処理の手順を示すフローチャート。
【図8】同第1実施形態の計算機システムにおける更新前イメージの記録動作とスナップショットを作成すべき時点との関係を示す図。
【図9】同第1実施形態の計算機システムにおいてファイル更新処理時に実行される一連の処理手順を示すフローチャート。
【図10】同第1実施形態の計算機システムで管理されているファイルシステムのツリー構造の例を示す図。
【図11】図10のファイルシステムが更新される場合における更新前イメージの記録動作を説明するための図。
【図12】同第1実施形態の計算機システムにおけるスナップショットの作成処理の様子を示す図。
【図13】本発明の第2実施形態に係る計算機システムで使用されるスナップショット用バッファとスナップショット用バッファ管理テーブルを説明するための図。
【図14】同第2実施形態におけるスナップショットイメージ生成処理の原理を説明するための図。
【図15】同第2実施形態で用いられるスナップショット用バッファ管理テーブルの構成例を示す図。
【図16】同第2実施形態で用いられるスナップショット用バッファ上に確保されるバッファエリアを示す図。
【図17】同第2実施形態においてスナップショット用バッファ管理テーブルを作成する処理の手順を示すフローチャート。
【図18】同第2実施形態におけるスナップショットイメージ生成処理の手順を示すフローチャート。
【符号の説明】
11…コンピュータシステム、111…ファイル管理システム、112…2次記憶装置、113…ログ記憶領域、201…更新前情報取得部、202…スナップショット生成部、203…iノードリスト、204…ディレクトリ情報、301…スナップショット用バッファ、302…スナップショット用バッファ管理テーブル。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a computer system and a file management method used in the computer system, and more particularly to a computer system and a file management method capable of generating a snapshot showing an image of a file system at a predetermined point in the past.
[0002]
[Prior art]
Generally, in a computer system used as a server computer or the like, it is necessary to maintain the consistency of a file system even when a failure occurs in the computer system. Further, even when the capacity of the file system is large, it is required that it takes no time to recover from a failure.
[0003]
In recent years, several file systems that satisfy these requirements have been proposed. For example, conventionally, a file system is known that uses copy-on-write (COW) technology and logging technology to achieve file system consistency and fast recovery in the event of a system failure (eg, non-patented). Reference 1).
[0004]
In addition to copy-on-write (COW) and logging technologies, inodes can be recorded as arbitrary files on the disk to record the image of the file system at a specified time in addition to the features described above. The technique to do is also known (for example, refer patent document 1).
[0005]
In the copy-on-write technology used in these conventional methods, a new metadata block or data block is created when the metadata block or data block such as an i-node is changed, and the previous block is replaced with the created block. A method of copying the contents and changing the contents of the copied blocks is adopted.
[0006]
[Non-Patent Document 1]
“The Episode File System” Sailesh Chutani, Owen T. Anderson, Michael L. Kazar, Bruce W. Leverett, W. Anthony Mason, Robert N. Sidebotham Proceedings of the Winter USENIX 1992 Technical Conference, Jan 1992, p. 43-59
[0007]
[Patent Document 1]
Japanese National Patent Publication No. 8-511367
[0008]
[Problems to be solved by the invention]
However, with this method, the contents of the original block are kept unchanged, so snapshots from the past time can be easily saved, but a new block is generated during normal operation of the file system. And complicated processing such as data copying.
[0009]
Actually, it is necessary to copy not only the block to be updated but also the block of the upper directory in the hierarchical structure of the file or directory containing the block, and the overhead when writing the file is very large. It becomes.
[0010]
Further, not only information on the current file system directory / file but also information on directories / files corresponding to generations of file systems as the file system update process progresses exists on the disk. It will be. Therefore, there is a problem that many blocks on the file system are consumed to save the snapshot.
[0011]
The present invention has been made in consideration of the above-mentioned circumstances, and can reduce overhead during normal operation, and information on directories / files corresponding to file systems for generations can be stored in the file system. It is an object of the present invention to provide a computer system and a file management method capable of creating a snapshot at a specified arbitrary point of time without constructing the file system.
[0012]
[Means for Solving the Problems]
In order to solve the above-described problem, the present invention provides a computer system having a file system that manages a file in a hierarchical structure on a secondary storage device, log storage means for accumulating the update history of the file system, When updating the contents of the block on the secondary storage device used in the file system, the contents before updating the block are replaced with an identifier for identifying the file or directory including the block and the block number of the block. A pre-update image storage means for storing the pre-update image in the log storage means, a means for updating the block after storing the pre-update image in the log storage means, and an accumulation in the log storage means Based on the pre-update image and the current image of the file system, the update is performed. A snapshot showing an image of the file system at a predetermined point in the past by restoring the contents before the update of the file or directory including the block and the directory information of the upper directory including the file or directory before the update. Snapshot generating means for generating The snapshot generation means newly generates a first alternative block that retains the contents before the update of the updated block using a free block of the secondary storage device, and the updated Based on the content of the management information block on the current image on the file system that holds management information for managing the file or directory including the block, and the block number of the first alternative block, the management information is The management information is modified to have link information to the first substitution block instead of the updated block, and a second substitution block holding the revised management information is stored in the secondary storage device. Means for newly generating a free block, and a higher order file to which the file or directory of the updated block belongs. Based on the content of the block on the current image on the file system holding the file and the block number of the second alternative block, the upper directory moves to the second alternative block instead of the management information block. Means for modifying the directory information of the upper directory so as to have the link information, and newly generating a third alternative block holding the modified directory information by using the free block of the secondary storage device. Include It is characterized by that.
[0013]
In this computer system, when updating a block, the pre-update data of the block to be updated is written to the log storage means together with an identifier for identifying the file or directory including the block and the block number of the block. Then, the block to be updated is updated. In this way, each time a block of the file system is updated, the pre-update image including the management information indicating which file or which block in the directory has been updated and the contents before the update are sequentially written to the log storage means. Go.
[0014]
The file system block is updated, and only the file / directory block corresponding to the latest state exists in the file system. The snapshot is generated based on the pre-update image stored in the log storage means and the current image of the file system. The pre-update contents of the updated block and which block in which file or directory the block is in can be determined from each pre-update image, and the current block that constitutes the file or directory from the current image in the file system And the relationship between the file or directory and the upper directory. Therefore, based on the pre-update image stored in the log storage means and the current image of the file system, the pre-update contents of the file or directory including the updated block and the pre-update file or directory are included. By restoring the directory information of the upper directory, a snapshot showing the image of the file system at a predetermined past time can be generated.
[0015]
Therefore, it is possible to create a snapshot at a specified point in time only when necessary without building information on directories / files corresponding to each generation of file systems in the file system. Become.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows the configuration of a computer system according to the first embodiment of the present invention. This computer system is used as a computer system such as a server computer. Hereinafter, the file system of the computer system 11 will be described.
[0019]
The file management system 111 is for managing a file system on a secondary storage device 112 such as a disk storage device (DISK), and is realized by a computer program. Here, the file system means a data structure for managing files in a hierarchical structure on the secondary storage device 112. The storage area on the secondary storage device 112 is divided into physical blocks. The data size of each block is, for example, 512 bytes. In the following, the configuration of the UNIX (R) file system will be described as an example.
[0020]
In order to manage the file system, a boot block, a super block, an i-node list area, and a data area are allocated on the secondary storage device 112 as shown in the figure. The boot block is an area used for storing a boot loader program. The super block is used to store information such as a list of free blocks.
[0021]
The i-node list area is a block group for storing a set of i-nodes that hold information regarding individual files / directories in the file system. An i-node is a data structure for managing individual files / directories corresponding to the i-node. In the i-node, management information related to the corresponding file (directory is also a kind of file), 1) file type (normal file, directory file, etc.), 2) access right, and 3) individual files constituting the file Address information indicating the block number of the block, etc. are held.
[0022]
Each i-node block in which the i-node is stored is referred to by the corresponding i-node number. The i-node number is a file identifier for uniquely identifying each file / directory in the file system, and is used as an index for indexing the i-node of the corresponding file / directory.
[0023]
The data area is a group of blocks in which file / directory entities are held. The block holding the directory includes the i-node number corresponding to the directory and the i-node number corresponding to the upper directory, as well as the i-node number corresponding to each file or directory belonging to the directory, as directory information. It is.
[0024]
The file management system 111 manages files in a hierarchical structure using the data structure on the secondary storage device 112 as described above. The file management system 111 includes a pre-update information acquisition unit 201 and a snapshot generation unit 202 so that a snapshot that is an image of a file system at an arbitrary past time can be created as necessary. Yes.
[0025]
The pre-update information acquisition unit 201 sequentially accumulates the file system update history in the log storage area 113. The log storage area 113 is a non-volatile storage device, and the stored contents are not lost even when the computer system 11 is powered off. The log storage area 113 is realized by using, for example, a dedicated storage device different from the secondary storage device 112 or a storage area on the secondary storage device 112 that is not used as a file system. The log storage area 113 is divided into a management information storage area and a pre-update data image storage area.
[0026]
When the content of the block on the secondary storage device 112 is updated, the pre-update information acquisition unit 201 uses the content before update of the block as an identifier (i-node) for identifying the file or directory including the block. Number) and the block number of the block. In this case, the i-node number and the block number are stored as update management information in the management information storage area together with a flag indicating the block update type (change, deletion, addition, etc.), and the contents before the block update are the same as before the update. Stored in the data image storage area. In this way, each time the block of the file system is updated, the pre-update image including the update management information indicating which block in which file or directory has been updated and the data content before the update are sequentially stored in the log storage area 113. It will be written.
[0027]
The snapshot generation unit 202 generates a snapshot indicating the image of the file system at any specified past time based on the pre-update image stored in the log storage area 113 and the current image of the file system. To do. In this case, the pre-update image accumulated in the log storage area 113 from the time when the snapshot should be generated to the present is used. While referring sequentially from the last pre-update image in the log storage area 113, the contents before the update of the updated file / directory and the directory information of the upper directory including the file / directory before the update are restored. By going, it is possible to create a snapshot image at a specified point in the past.
[0028]
Although the snapshot image can be restored on the secondary storage device 112, the i-node list 203, which is a copy of the i-node list area, and information on each directory are usually stored on the main memory of the computer system 11. Directory information 204 that is a copy of the file system, and the current image of the fill system can be recognized from the information. Therefore, it is also possible to generate a snapshot of a file system image at an arbitrary past time on the main memory using the information on the main memory.
[0029]
Next, with reference to FIG. 2 and FIG. 3, a pre-update image writing process executed by the file management system 111 using the pre-update information acquisition unit 201 will be described.
[0030]
Here, a case will be described in which the content of the file b existing under the directory a is updated in the tree-structured file system as shown in FIG.
[0031]
FIG. 3 shows the data structure of the file system constructed on the secondary storage device 112.
The i-node list area includes the i-node of the root directory, the i-node of the directory a, the i-node of the file b, and the like, and the substance of the root directory, the directory a, and the file b is stored in the data area. Data block exists.
[0032]
Normally, a file is composed of one or more data blocks, and an i-node block, which is a management information block that holds management information of the file b, is a block of each data block that constitutes the substance of the data of the file b. A pointer having a link to a number (here, block numbers 98, 100, 110) is included as address information.
[0033]
Similarly, the i-node block of the root directory includes a block number indicating a data block holding the directory information of the root directory, and the i-node of the root directory which is the current directory is included in the data block of the root directory. Directory information includes an i-node number indicating a block (here, 3) and an i-node number indicating an i-node block of the directory a existing thereunder (here, 4).
[0034]
The i-node block that holds the management information of the directory a includes a block number indicating the data block of the directory a, and the i-node of the root directory that is the upper directory is included in the data block of the directory a. An i-node number (here, 3) indicating a block, an i-node number (here, 4) indicating an i-node block of the directory a which is the current directory, and an i-node block indicating the i-node block of the file b under the directory a A node number (here, 5) is included as directory information.
[0035]
Consider a case where the block 100 in the file b corresponding to the i-node number 5 is updated. In this case, prior to the update of the block 100, the update management information including the i-node number 5 of the file b, the block number 100 to be updated, and the flag information (M) indicating that the update type is a change, Pre-update data is stored in the log storage area 113.
[0036]
The flowchart of FIG. 4 shows a series of processing procedures executed by the file management system 111 when updating a file / directory.
[0037]
When the file management system 111 needs to update the contents of the file / directory in response to a file operation request from the operating system or an application program (YES in step S101), first, the file / directory of the file / directory to be updated The inode number corresponding to the directory name is searched from the directory name, and the inode block of the file / directory to be updated is acquired (step S102).
[0038]
Next, the file management system 111 recognizes each data block that holds the substance of the file / directory to be updated from the address information included in the acquired i-node block (step S103). Consider a case where the block 100 in the file b corresponding to the i-node number 5 is updated. In this case, the file management system 111 uses the pre-update information acquisition unit 201 to update the management information (i-node number = 5, block number = 100, flag information = M) and the block before updating the block with the block number 100. The contents are written in the log storage area 113 as a pre-update image (steps S104 and S105). In order to prevent the contents of the block 100 from being changed during the writing to the log storage area 113, the block 100 is locked before the writing to the log storage area 113 is executed. When the writing to the log storage area 113 is completed, the block 100 is unlocked.
[0039]
Thereafter, the file management system 111 updates the content of the block with the block number 100 from, for example, b to b ′ (step S106). By this update, the file system is always kept up-to-date.
[0040]
FIG. 5 shows a state where a large number of pre-update images (pre-update information) are accumulated in the log storage area 113.
[0041]
Let TIME1, TIME2, TIME3,... Be the time points at which snapshots can be created. For example, in a computer system that operates non-stop for 24 hours, when it is possible to generate a snapshot at 12:00 every day, TIME1, TIME2, and TIME3 are set at intervals of 24 hours. When generating a snapshot at 12:00 today, pre-update images (pre-update information) accumulated from TIME 3 onward until the current time are used in order from the end. In addition, when generating a snapshot at 12:00 yesterday, images before update (pre-update information) accumulated from TIME2 onward until the current time are used in order from the end, and 12:00 on the day before yesterday. When generating a snapshot at a point in time, the pre-update images (pre-update information) accumulated from TIME 1 onward until the current time are used in order from the end.
[0042]
Next, a process for creating a snapshot using the current image of the file system and the pre-update image of the log storage area 113 will be described with reference to FIG.
[0043]
From the update management information of the pre-update image stored in the log storage area 113, it can be seen that the block 100 of the file b corresponding to the i-node number 5 has been updated.
[0044]
(1) Creation of data block for file b before change
Here, in order to create a new block in place of the updated block 100, an empty block (in this case, block number 170) is secured in the data area, and the block 100 stored in the log storage area 113 is updated. The previous data b is copied to the block number 170.
[0045]
(2) Creation of inode block for file b before change
Next, in order to generate a new i-node block corresponding to the file b before the change, an empty block is secured in the i-node list area. Then, the contents of the current i-node block of the file b holding the management information for managing the updated file b are acquired from the current file system. Of the management information included in the i-node block of the acquired file b, the address information indicating the link to the updated block 100 is corrected and rewritten to indicate the link to the block number 170. The corrected management information is written in an empty block secured in the i-node list area, and thereby an i-node block for managing the file b before change composed of block numbers 98, 170, and 110, that is, Instead of the i-node block of the current file b, an i-node block corresponding to the file b (-) one generation before is generated. A new inode number (here, 30) is assigned to the file b (-) one generation before.
[0046]
(3) (4) Restoring directory information of upper directory including file b before change
Next, the directory information of the upper directory a including the file b before change is restored. First, in order to create a new data block in place of the data block of the current directory a holding the directory information of the upper directory a, an empty block is secured in the data area. Then, the contents of the current data block in directory a are acquired from the current file system. Address information indicating the link to the i-node block of the current file b existing under the directory information of the acquired directory a is corrected, and the link to the i-node block of the file b (−) before the change is made. Is rewritten to indicate That is, the i-node number 5 indicating the i-node block of the current file b is changed to the i-node number 30 indicating the i-node block of b (−) one generation before.
[0047]
The corrected directory information is written in an empty block in the data area, and thereby, a data block of the upper directory a (−) including the file b (−) before the change is generated.
[0048]
In addition, an i-node block of the upper directory a (−) is also generated using an empty block on the i-node list area. In this case, management information of the current i-node block in directory a is acquired from the current file system. Of the management information of the acquired directory a, the address information indicating the link to the block of the current directory a is corrected and rewritten to indicate the link to the data block of the directory a (−). The corrected management information is written in an empty block secured in the i-node list area, thereby generating an i-node block of the directory a (−) one generation before. A new i-node number (29 in this example) is assigned to the directory a (-) one generation before.
[0049]
The i-node number of the current directory held in the data block of the directory a (−) is changed from the i-node number 4 of the current directory a to the i-node number 29 of the directory a (−).
[0050]
(5) (6) Next, in order to create a data block of a new root directory in place of the current root directory which is the highest directory, an empty block is secured in the data area. Then, the contents of the current data block in the root directory are acquired from the current file system. Among the acquired directory information of the root directory, the address information indicating the link to the i-node block of the current directory a existing under the directory information is corrected, and the directory information of the previous generation a (-) is updated to the i-node block. Rewritten to indicate a link. That is, the i-node number 4 indicating the i-node block of the current directory a is changed to the i-node number 29 indicating the i-node block of a (−) one generation before. The corrected directory information is written in an empty block in the data area, thereby generating a block of the root directory (-) one generation before.
[0051]
Also, an i-node block of the root directory (-) one generation before is generated using an empty block in the i-node list area. In this case, the management information of the i-node block of the current root directory is acquired from the current file system. Among the acquired management information of the root directory, the address information indicating the link to the block of the current root directory is corrected and rewritten to indicate the link to the block of the root directory (−) one generation before. The corrected management information is written into an empty block in the i-node area, and thereby an i-node block of the root directory (−) one generation before is generated. A new i-node number (in this case, 28) is assigned to the root directory (-) one generation before. The i-node number of the current directory held in the data block of the root directory (-) is changed from the i-node number 3 of the current root directory to the i-node number 29 of the root directory (-).
[0052]
In this way, by creating a block corresponding to the file before the change using a free block and a block related to the upper directory, the contents before the update of the updated file and the upper file including the file before the change are created. By restoring the directory information of the directory, it is possible to generate a snapshot showing the image of the file system at an arbitrary point in the past while maintaining the current image of the file system.
[0053]
The flowchart in FIG. 7 shows a series of processing procedures executed by the snapshot generation unit 202 when generating a snapshot.
[0054]
The snapshot generation unit 202 acquires the pre-update images in order from the tail of the log storage area 113 (step S111), and performs each update until processing for all the pre-update images related to the snapshot at the specified time is completed. The following processing is recursively executed for each previous image (step S112).
[0055]
First, the snapshot generation unit 202 recognizes which block in which file / directory has been updated from the contents of the last pre-update image, and the file / before-change corresponding to the updated file / directory. A new data block for restoring the directory (pre-change file / directory data block) is created in the data area (step S113).
[0056]
For example, in the above example, it can be seen that the content of the block 100 of the file b related to the i-node number 5 has been updated, so that the pre-change file / directory data block instead of the updated block 100 is used as a free block. The contents of the pre-update data of the block 100 that are newly created and recorded in the log storage area 113 are copied to the newly created file / directory data file before change.
[0057]
Next, the snapshot generation unit 202 adds an i-node block for restoring the file / directory before change corresponding to the updated file / directory on the i-node list area. Is newly created (step S114).
[0058]
That is, the snapshot generation unit 202 uses the contents of the current i-node block of the file b and the block number 170 of the data block newly created in step S113 to obtain the management information of the i-node of the file b that has been changed. The file is corrected and copied to the inode block for the file / directory before change newly created in the i-node list area.
[0059]
The processes in steps S113 and S114 described above correspond to the processes (1) and (2) described above, whereby the contents of the file / directory before the change are restored.
[0060]
Thereafter, the snapshot generation unit 202 newly creates a data block for the upper directory a (−) including the pre-change file / directory on the data area (step S115). Here, based on the contents of the current data block in the upper directory a of the updated file b and the i-node number of the pre-change file / directory i-node block created in step S114, the snapshot generation unit 202 The contents of the current data block in the upper directory “a” are corrected and copied to the data block for the newly created directory “a (−)”.
[0061]
Then, the snapshot generation unit 202 newly creates an i-node block for the upper directory a (−) including the pre-change file / directory on the i-node list area (step S116). Here, the snapshot generation unit 202 is based on the contents of the current i-node block in the upper directory a of the updated file b and the block number of the data block for the upper directory a (−) created in step S115. Then, the contents of the current i-node block of the upper directory a are modified and copied to the newly created i-node block for the directory a (−).
[0062]
The processes in steps S115 and S116 described above correspond to the processes (3) and (4) described above, whereby the contents of the upper directory including the file / directory before the change are restored. The processes in steps S115 and S116 are executed for each upper directory until the root directory is traced back (step S117). As a result, a block (data block, i-node block) including information on each directory from the file / directory before update to the root directory is newly created, and the file or directory before change is referred to from the root directory. Link information is restored.
[0063]
Next, with reference to FIG. 8, the relationship between the time when a snapshot should be created and the pre-update image to be recorded in the log storage area 113 will be described.
[0064]
The time point at which a snapshot should be created may be set for each file update timing, but is usually set for every certain time interval. In this case, when updating the same block in the same file / directory, it is not necessary to sequentially collect the pre-update image in the log storage area 113, and the first time after that is based on each time point when the snapshot should be created. The pre-update image relating to the update may be collected in the log storage area 113 only when the update is performed.
[0065]
In FIG. 8, the update of the block 100 of the file b is indicated by ◯, the update of the block 98 of the file b is indicated by Δ, and the update of the block N of the file X is indicated by □. Assume that the update of the block 100 of the file b is repeated several times in the file update between the time point TIME1 when the snapshot is to be created and the next time point TIME2. Since the file image to be restored is TIME1, the pre-update image is collected in the log storage area 113 only at the first update after TIME1. This is because the contents of the block 100 of the file b can be restored to the time of the TIME 1 by collecting the contents of the block 100 of the file b in the log storage area 113 at the time of the TIME 1. The same applies to other files / blocks.
[0066]
Whether or not the pre-update image should be collected corresponds to, for example, identification information indicating whether or not the pre-update image corresponding to the update target block has been collected in the log storage area 113 after the previous time when the snapshot should be created. The determination can be made by holding the file / directory in the i-node structure of the file / directory or registering a list of blocks obtained by collecting the pre-update image in the log storage area 113 in the table. FIG. 9 shows a series of processing procedures when updating a file / directory. In the following, it is assumed that identification information is held in an i-node structure.
[0067]
When the file management system 111 needs to update the contents of the file / directory in response to a file operation request from the operating system or an application program (YES in step S121), first, the file / directory in the file / directory to be updated The i-node number corresponding to the directory name is searched from the directory name, and the i-node block of the file / directory to be updated is obtained (step S122).
[0068]
Next, the file management system 111 recognizes each data block that holds the substance of the file / directory to be updated from the address information included in the acquired i-node block (step S123). Consider a case where the block 100 in the file b corresponding to the i-node number 5 is updated. In this case, the file management system 111 uses the above-described identification information held in the i-node structure included in the i-node block, and the pre-update image related to the update target block already after the time immediately before the snapshot should be created. Is recorded in the log storage area 113 (step S124).
[0069]
If it has already been recorded (YES in step S124), since the update of the block is the second and subsequent updates, the pre-update image is not collected and the update process of the block is executed (step S128). .
[0070]
On the other hand, if not recorded (NO in step S124), the update of the block is the first update, so the following processing is executed.
[0071]
That is, the file management system 111 uses the pre-update information acquisition unit 201 to update the management information (i-node number = 5, block number = 100, flag information = M) and the content before updating the block with the block number 100. Are written in the log storage area 113 as a pre-update image (steps S125 and S126). Next, the file management system 111 records identification information indicating that the pre-update image relating to the block number 100 has been collected in the i-node structure of the file b (step S127).
[0072]
In order to prevent the contents of the block 100 from being changed during the writing to the log storage area 113, the block 100 is locked before the writing to the log storage area 113 is executed. When the writing to the log storage area 113 and the recording of the identification information are completed, the block 100 is unlocked. Thereafter, the file management system 111 updates the content of the block with the block number 100 from, for example, b to b ′ (step S128).
[0073]
Note that the recording of the identification information in the i-node structure may be performed on the i-node list 203 existing on the memory, for example. The content of the identification information on the i-node list 203 is cleared when the next snapshot is to be created.
[0074]
Next, with reference to FIGS. 10 to 12, a snapshot restoration operation when performing a file update process for deleting a file will be described.
[0075]
Here, a case will be described in which the entire file b existing under the directory a is deleted in the tree-structured file system as shown in FIG.
[0076]
FIG. 11 shows a data structure of a file system constructed on the secondary storage device 112. Here, for the sake of simplicity, the case where the entity of the file b is composed of one data block is illustrated.
[0077]
In the file update process for deleting the entire file b corresponding to the i-node number 5, the data block (block number 100) of the file b is deleted and the i-node block of the file b (here, the block number 7 is used). Are also deleted. Along with this, the directory information held in the data block of directory a (here, block number 90) is also updated from a to a ′, and the link information to the i-node block of file b is deleted. Prior to the execution of such a series of file update processing operations, the pre-update image registration processing in the log storage area 113 is performed as follows.
[0078]
First, as an image before update relating to the update of the data block (block number 100) of file b, i-node number 5 of file b, block number 100 to be updated, and flag information (D) indicating that the update type is deletion The update management information consisting of and the pre-update data of the block 100 are stored in the log storage area 113. Next, as the pre-update image related to the update of the inode block (block number 7) of the file b, the inode number 5 of the file b, the block number 7 to be updated, and flag information indicating that the update type is deletion ( The update management information consisting of D) and the pre-update data of block 7 are stored in the log storage area 113. Further, as a pre-update image related to the update of the directory a, update management information including an i-node number 4 of the directory a, a block number 90 to be updated, and flag information (M) indicating that the update type is changed, and a block 90 pre-update data are stored in the log storage area 113. These three pre-update images constitute a set of pre-update images related to the deletion of the file b.
[0079]
FIG. 12 shows how a snapshot is created using the current image of the file system and the pre-update image of the log storage area 113.
[0080]
From the update management information for each of the three pre-update images stored in the log storage area 113, it can be seen that the file b corresponding to the i-node number 5 has been deleted, and the contents of the directory a have been changed along with the file deletion. .
[0081]
The log storage area 113 stores the data content before the change of the file b, the content of the i-node before the change of the file b, and the data content of the directory a before the change as data before the update. From the contents of the data before the change and the current file system image, the data block and i-node block of the file b before the deletion and the data of the directory a including the file b before the deletion are processed in the same procedure as in FIG. By newly creating a block, an i-node block, and a data block and an i-node block of a root directory including the directory a in a free area, a snapshot before deletion of the file b can be restored.
[0082]
As described above, according to the first embodiment, it is possible to restore the snapshot image of the file system at a specific point in time by sequentially writing the pre-change file / directory image to the log area. . In addition, when updating a block during normal operation, it is not necessary to copy the contents of the upper directory of the tree structure of the block, thereby eliminating the overhead caused thereby.
[0083]
In the first embodiment, it is assumed that the snapshot image of the file system is restored on the secondary storage device 112. However, the pre-update image related to the block requested to be read or the current image in the file system is selectively selected. In addition, the contents before update of the file or directory including the updated block can be restored by reading the data on the main storage device. Hereinafter, an example of this case will be described as a second embodiment of the present invention. In the following, portions different from the first embodiment will be mainly described.
[0084]
In the second embodiment, as shown in FIG. 13, in order to be able to read out the pre-update image related to the block requested to be read from the log storage area 113 at high speed, A snapshot buffer management table 302 for managing the snapshot buffer 301 is used.
[0085]
The snapshot buffer 301 is a buffer area allocated on the main memory, and the pre-update image stored in the log storage area 113 is read out here.
[0086]
Here, the principle of the snapshot image generation process executed by the snapshot image generation unit 202 will be described.
[0087]
In the second embodiment, when generating a snapshot image at an arbitrary point in the past, the pre-update image necessary for creating the snapshot image is read from the log storage area 113 and used for the snapshot. Stored in the buffer 301. Each time a block read request is received, it is determined from the current file system or snapshot buffer 301 by determining whether or not a pre-update image corresponding to the block with the block number specified in the read request exists. Corresponding blocks are selectively read out.
[0088]
For example, as described above, it is assumed that the file b is composed of three data blocks having block numbers 98, 100, and 110, and the block having the block number 100 is updated.
[0089]
When it is designated by the user to restore the pre-update image of file b, read requests for block numbers 98, 100, and 110 are sequentially made based on the contents of the inode of file b managed by the current file system. publish. Since the block with the block number 98 has not been updated, the data of the block corresponding to the block number 98 is read from the current file system on the secondary storage device 112 onto the main memory. Since the block having the block number 100 has been updated, the pre-update data of the block having the block number 100 is read from the snapshot buffer 301 onto the main memory. Since the block having the block number 110 has not been updated, the data of the block corresponding to the block number 110 is read from the current file system on the secondary storage device 112 onto the main memory. In this way, the contents before the update of the file b are restored.
[0090]
Next, a specific configuration example of the snapshot buffer management table 302 will be described with reference to FIG.
[0091]
In the snapshot buffer management table 302, for each pre-update image read from the log storage area 113 to the snapshot buffer 301, the log storage area 113 including the i-node number, block number, buffer size, and pre-update data. There are entries for managing the offset, the address of the buffer containing the pre-update data, and the like.
[0092]
The size of the buffer corresponds to the data size of the pre-update data, and indicates the size of the buffer area for holding the pre-update data secured on the snapshot buffer 301 as shown in FIG. As shown in FIG. 16, the address of the buffer including the pre-update data indicates the address of the buffer area for holding the pre-update data secured on the snapshot buffer 301. The offset of the log storage area 113 indicates an offset value from the head address of the log storage area 113 in which the pre-update data is stored.
[0093]
Hereinafter, a specific processing procedure executed by using the snapshot buffer 301 and the snapshot buffer management table 302 will be described.
[0094]
The pre-update image writing process to the log storage area 113 executed by the pre-update information acquisition unit 201 is executed according to the procedure shown in the flowchart of FIG. 4 described above, as in the first embodiment.
[0095]
When generating a snapshot image, first, processing for creating the snapshot buffer management table 302 is executed. The flow chart of FIG. 17 shows the procedure.
[0096]
That is, the snapshot generation unit 202 sequentially acquires the pre-update images from the tail of the log storage area 113 (step S201), and until the processing for all the pre-update images related to the snapshot at the specified time is completed. The following processing is recursively executed for each pre-update image (step S202).
[0097]
First, the snapshot generation unit 202 stores the inode number of the updated block, the block number, the data size of the pre-update data, and the pre-update data from the content of the last pre-update image. The offset values of the area 113 are acquired and registered in the snapshot buffer management table 302 (step S203).
[0098]
At this time, the pre-update data in the log storage area 113 is not read. Then, the process of step S203 is sequentially executed while tracing back the pre-update images stored in the log storage area 113 one by one (step S204). As a result, management information regarding all pre-update images up to a predetermined past time point to be restored is registered in the snapshot buffer management table 302.
[0099]
Next, the procedure of the snapshot image generation process executed using the snapshot buffer management table 302 will be described with reference to the flowchart of FIG.
[0100]
The snapshot image generation process is executed each time a request for reading a past image of each file / directory is issued. That is, when a read request for a file or directory on the snapshot image occurs, the i-node of the file or directory managed by the current file system is referred to, so that each block constituting the file / directory is referred to. The block number is obtained. A data read request for the block number is issued to the snapshot generation unit 202.
[0101]
Upon receipt of the data read request (step S211), the snapshot generation unit 202 searches the snapshot buffer management table 302 and registers the block having the block number specified in the read request in the snapshot buffer management table 302. It is determined whether it has been performed (step S212). If the block having the block number designated by the read request is not registered in the snapshot buffer management table 302 (NO in step S212), the block has not been updated, and the snapshot generation unit 202 can read from the file system. The current block is read and returned to the request source (step S213).
[0102]
On the other hand, if the block having the block number designated by the read request is registered in the snapshot buffer management table 302 (YES in step S212), the snapshot generation unit 202 executes the following processing.
[0103]
In other words, the snapshot generation unit 202 checks whether or not the buffer address is registered in the corresponding entry of the snapshot buffer management table 302, so that the pre-update data of the block number specified in the read request is used for the snapshot. It is determined whether or not it already exists on the buffer 301 (step S214). If the data already exists in the snapshot buffer 301 (YES in step S214), the snapshot generation unit 202 immediately reads the corresponding pre-update data from the snapshot buffer 301 and returns it to the request source. (Step S218).
[0104]
If it does not exist on the snapshot buffer 301 (NO in step S214), the snapshot generation unit 202 secures a buffer area on the snapshot buffer 301 (step S215), and then stores the corresponding pre-update data. The data is read from the log storage area 113 and written on the buffer area (step S216). The snapshot generation unit 202 registers the buffer address in the corresponding entry of the snapshot buffer management table 302 (step S217), reads the pre-update data from the snapshot buffer 301, and returns it to the request source. (Step S218).
[0105]
As described above, in the second embodiment, the pre-update data related to the block requested to be read or the current data in the current file system is selectively read, so that the file or directory including the updated block is updated. The contents can be restored.
[0106]
In the first embodiment, since the block of pre-update data is restored using a new block prepared on the secondary storage device 112, the i-node number of the restored snapshot is the original i-node. In the second embodiment, the pre-update data is returned on demand in response to the block read request. Therefore, the snapshot image of the file system before the update is stored in the i-node. It is possible to restore without changing the number. In addition, when creating a snapshot image on the secondary storage device 112, it takes time to restore the snapshot image because a lot of disk I / O occurs, but according to the method of the second embodiment, The pre-update image of the file / directory requested to be read can be restored at high speed.
[0107]
In the above description of the second embodiment, the case where a block is changed has been described as an example. However, when a block is added or deleted, the restoration can be performed similarly. For example, when the file b is deleted, pre-update data relating to all data blocks and i-node blocks of the file b and pre-update data relating to data blocks of the upper directory a are accumulated in the log storage area 113. When a read request for the directory a is generated, the pre-update data of the directory a is read from the log storage area 113 through the snapshot buffer 301. The pre-update data of the directory a includes the i-node number of the deleted file b, and the block number of the i-node block of the file b can be determined from the i-node number. When a read request for the i-node block of file b occurs, the pre-update data related to the i-node block of file b is read from log storage area 113 through snapshot buffer 301. Since the pre-update data includes the block numbers of all the data blocks of the file b, the pre-update image of the file b is restored by issuing a read request for these block numbers.
[0108]
In the method of the second embodiment, a snapshot image can be generated without storing the i-node number corresponding to the block to be updated in the log storage area 113.
[0109]
Further, the snapshot buffer management table 302 can be realized using an array, or a link list, a hash table, or the like. Further, since the snapshot buffer management table 302 and the snapshot buffer 301 are provided to increase the data reading speed with respect to the log storage area 113, the snapshot buffer management table 302 and the snapshot buffer management table 302 are used. Even if the buffer 301 is not used, it is possible to generate a snapshot image by determining whether or not the block requested to be read exists in the log storage area 113.
[0110]
Further, since all functions of the file management system 111 according to the first embodiment and the second embodiment are realized by a computer program, the program is introduced into a normal computer through a computer-readable storage medium and executed. By simply doing, the same effects as those of the first embodiment and the second embodiment can be obtained.
[0111]
Further, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention in the implementation stage. Furthermore, the above embodiments include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent requirements are deleted from all the constituent requirements shown in the embodiment, the problem described in the column of the problem to be solved by the invention can be solved, and the effect described in the column of the effect of the invention Can be obtained as an invention.
[0112]
【The invention's effect】
As described above in detail, according to the present invention, overhead during normal operation can be reduced, and information on directories / files corresponding to each generation of file systems can be created in the file system. It is possible to create a snapshot at a specified arbitrary point in time.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a computer system according to a first embodiment of the present invention.
FIG. 2 is a view showing an example of a tree structure of a file system managed by the computer system of the first embodiment.
3 is a diagram for explaining a recording operation of an image before update when the file system in FIG. 2 is updated. FIG.
FIG. 4 is a flowchart showing a series of processing procedures executed during file update processing in the computer system of the first embodiment.
FIG. 5 is a view showing a state in which a large number of pre-update images are accumulated in a log storage area provided in the computer system of the first embodiment.
FIG. 6 is a view showing a state of snapshot creation processing in the computer system of the first embodiment;
FIG. 7 is a flowchart showing a procedure of snapshot creation processing in the computer system of the first embodiment;
FIG. 8 is a view showing the relationship between the pre-update image recording operation and the point in time when a snapshot should be created in the computer system of the first embodiment;
FIG. 9 is a flowchart showing a series of processing procedures executed during file update processing in the computer system of the first embodiment;
FIG. 10 is a diagram showing an example of a tree structure of a file system managed by the computer system of the first embodiment.
11 is a diagram for explaining a recording operation of an image before update when the file system in FIG. 10 is updated. FIG.
FIG. 12 is a view showing a state of snapshot creation processing in the computer system of the first embodiment;
FIG. 13 is a diagram for explaining a snapshot buffer and a snapshot buffer management table used in the computer system according to the second embodiment of the present invention;
FIG. 14 is a view for explaining the principle of snapshot image generation processing in the second embodiment;
FIG. 15 is a view showing a configuration example of a snapshot buffer management table used in the second embodiment;
FIG. 16 is a view showing a buffer area secured on a snapshot buffer used in the second embodiment;
FIG. 17 is a flowchart showing a processing procedure for creating a snapshot buffer management table in the second embodiment;
FIG. 18 is a flowchart showing a procedure of snapshot image generation processing in the second embodiment;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 11 ... Computer system, 111 ... File management system, 112 ... Secondary storage device, 113 ... Log storage area, 201 ... Pre-update information acquisition unit, 202 ... Snapshot generation unit, 203 ... Inode list, 204 ... Directory information, 301... Snapshot buffer 302. Snapshot buffer management table

Claims (8)

2次記憶装置上でファイルを階層構造で管理するファイルシステムを有する計算機システムにおいて、
前記ファイルシステムの更新履歴を蓄積するためのログ記憶手段と、
前記ファイルシステムで使用される前記2次記憶装置上のブロックの内容を更新する際に、そのブロックの更新前の内容を、当該ブロックを含むファイルまたはディレクトリを識別するための識別子および当該ブロックのブロック番号と共に前記ログ記憶手段に更新前イメージとして格納する更新前イメージ格納手段と、
前記更新前イメージを前記ログ記憶手段に格納した後、前記ブロックを更新する手段と、
前記ログ記憶手段に蓄積されている更新前イメージと前記ファイルシステムの現在のイメージとに基づいて、前記更新されたブロックを含むファイルまたはディレクトリの更新前の内容と、当該更新前のファイルまたはディレクトリを含む上位ディレクトリのディレクトリ情報とを復元することにより、過去の所定の時点における前記ファイルシステムのイメージを示すスナップショットを生成するスナップショット生成手段とを具備し、
前記スナップショット生成手段は、
前記更新されたブロックの更新前の内容を保持する第1の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手段と、
前記更新されたブロックを含むファイルまたはディレクトリを管理するための管理情報を保持する前記ファイルシステム上の現在のイメージ上における管理情報ブロックの内容と前記第1の代替ブロックのブロック番号とに基づいて、前記管理情報が前記更新されたブロックの代わりに前記第1の代替ブロックへのリンク情報を持つように前記管理情報を修正し、当該修正された管理情報を保持する第2の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手段と、
前記更新されたブロックのファイルまたはディレクトリが属する上位ディレクトリを保持する前記ファイルシステム上の現在のイメージ上におけるブロックの内容と前記第2の代替ブロックのブロック番号とに基づいて、前記上位ディレクトリが前記管理情報ブロックの代わりに前記第2の代替ブロックへのリンク情報を持つように前記上位ディレクトリのディレクトリ情報を修正し、当該修正されたディレクトリ情報を保持する第3の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手段とを含むことを特徴とする計算機システム。
In a computer system having a file system for managing files in a hierarchical structure on a secondary storage device,
Log storage means for accumulating the update history of the file system;
When updating the contents of a block on the secondary storage device used in the file system, the contents before the update of the block are used as an identifier for identifying the file or directory including the block and the block of the block A pre-update image storage means for storing a pre-update image in the log storage means together with a number;
Means for updating the block after storing the pre-update image in the log storage means;
Based on the pre-update image stored in the log storage means and the current image of the file system, the contents before the update of the file or directory including the updated block and the file or directory before the update are obtained. And a snapshot generation means for generating a snapshot showing an image of the file system at a predetermined past time by restoring directory information of the upper directory including ,
The snapshot generation means includes:
Means for newly generating a first alternative block that retains the content before the update of the updated block using an empty block of the secondary storage device;
Based on the content of the management information block on the current image on the file system holding the management information for managing the file or directory containing the updated block and the block number of the first alternative block, The management information is modified so that the management information has link information to the first substitution block instead of the updated block, and the second substitution block holding the revised management information is changed to the second substitution block. Means for newly generating using an empty block of the next storage device;
Based on the contents of the block on the current image on the file system holding the upper directory to which the updated block file or directory belongs and the block number of the second alternative block, the upper directory manages the management The directory information of the upper directory is modified so as to have link information to the second substitute block instead of the information block, and a third substitute block holding the modified directory information is stored in the secondary storage device. And a means for newly generating a free block .
前記ログ記憶手段は不揮発性の記憶装置から構成されていることを特徴とする請求項1記載の計算機システム。  2. The computer system according to claim 1, wherein the log storage means is constituted by a nonvolatile storage device. 前記更新前イメージ格納手段は、
前記ファイルシステムで使用される前記2次記憶装置上のブロックの内容を更新する際に、その更新が、前記スナップショットを生成すべき所定の時点以降における当該ブロックに対する最初の更新であるかどうかを判別する手段と、
前記更新が前記スナップショットを生成すべき所定の時点以降における当該ブロックに対する最初の更新である場合にのみ、当該ブロックに関する更新前イメージを前記ログ記憶手段に格納する処理を実行する手段とを含むことを特徴とする請求項1記載の計算機システム。
The pre-update image storage means includes
When updating the contents of a block on the secondary storage device used in the file system, whether or not the update is the first update to the block after a predetermined time point when the snapshot should be generated Means for determining,
Means for executing a process of storing the pre-update image relating to the block in the log storage means only when the update is the first update to the block after a predetermined time point at which the snapshot should be generated. The computer system according to claim 1.
2次記憶装置上でファイルを階層構造で管理する計算機システム内のファイルシステムに関する過去の所定の時点におけるスナップショットを生成するためのファイル管理方法であって、A file management method for generating a snapshot at a predetermined past time concerning a file system in a computer system that manages files in a hierarchical structure on a secondary storage device,
前記ファイルシステムで使用される前記2次記憶装置上のブロックの内容を更新する際に、そのブロックの更新前の内容を、当該ブロックを含むファイルまたはディレクトリを識別するための識別子および当該ブロックのブロック番号と共に、更新前イメージとして前記ファイルシステムの更新履歴を蓄積するためのログ記憶手段に格納する更新前イメージ格納ステップと、When updating the contents of a block on the secondary storage device used in the file system, the contents before the update of the block are used as an identifier for identifying the file or directory including the block and the block of the block A pre-update image storing step for storing in the log storage means for accumulating the update history of the file system as a pre-update image together with a number;
前記更新前イメージを前記ログ記憶手段に格納した後、前記ブロックを更新するステッA step of updating the block after storing the pre-update image in the log storage means. プと、And
前記ログ記憶手段に蓄積されている更新前イメージと前記ファイルシステムの現在のイメージとに基づいて、前記更新されたブロックを含むファイルまたはディレクトリの更新前の内容と、当該更新前のファイルまたはディレクトリを含む上位ディレクトリのディレクトリ情報とを復元することにより、過去の所定の時点における前記ファイルシステムのイメージを示すスナップショットを生成するスナップショット生成ステップとを具備し、Based on the pre-update image stored in the log storage means and the current image of the file system, the contents before the update of the file or directory including the updated block and the file or directory before the update are obtained. Including a snapshot generation step of generating a snapshot showing an image of the file system at a predetermined past time by restoring directory information of an upper directory including:
前記スナップショット生成ステップは、The snapshot generation step includes:
前記更新されたブロックの更新前の内容を保持する第1の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成するステップと、Newly generating a first alternative block that retains the updated contents of the updated block by using an empty block of the secondary storage device;
前記更新されたブロックを含むファイルまたはディレクトリを管理するための管理情報を保持する前記ファイルシステム上の現在のイメージ上における管理情報ブロックの内容と前記第1の代替ブロックのブロック番号とに基づいて、前記管理情報が前記更新されたブロックの代わりに前記第1の代替ブロックへのリンク情報を持つように前記管理情報を修正し、当該修正された管理情報を保持する第2の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成するステップと、Based on the content of the management information block on the current image on the file system holding the management information for managing the file or directory containing the updated block and the block number of the first alternative block, The management information is modified so that the management information has link information to the first substitution block instead of the updated block, and the second substitution block holding the revised management information is changed to the second substitution block. Creating a new block using an empty block of the next storage device;
前記更新されたブロックのファイルまたはディレクトリが属する上位ディレクトリを保持する前記ファイルシステム上の現在のイメージ上におけるブロックの内容と前記第2の代替ブロックのブロック番号とに基づいて、前記上位ディレクトリが前記管理情報ブロックの代わりに前記第2の代替ブロックへのリンク情報を持つように前記上位ディレクトリのディレクトリ情報を修正し、当該修正されたディレクトリ情報を保持する第3の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成するステップとを含むことを特徴とするファイル管理方法。Based on the contents of the block on the current image on the file system holding the upper directory to which the updated block file or directory belongs and the block number of the second alternative block, the upper directory manages the management The directory information of the upper directory is modified so as to have link information to the second substitute block instead of the information block, and a third substitute block holding the modified directory information is stored in the secondary storage device. And a new generation step using an empty block.
前記ログ記憶手段は不揮発性の記憶装置から構成されていることを特徴とする請求項4記載のファイル管理方法。5. The file management method according to claim 4, wherein the log storage means is composed of a nonvolatile storage device. 前記更新前イメージ格納ステップは、The pre-update image storing step includes:
前記ファイルシステムで使用される前記2次記憶装置上のブロックの内容を更新する際に、その更新が、前記スナップショットを生成すべき所定の時点以降における当該ブロックに対する最初の更新であるかどうかを判別するステップと、When updating the contents of a block on the secondary storage device used in the file system, whether or not the update is the first update to the block after a predetermined time point when the snapshot should be generated A step of determining;
前記更新が前記スナップショットを生成すべき所定の時点以降における当該ブロックに対する最初の更新である場合にのみ、当該ブロックに関する更新前イメージを前記ログ記憶手段に格納する処理を実行するステップとを含むことを特徴とする請求項4記載のファイル管理方法。Only when the update is the first update to the block after a predetermined time point at which the snapshot should be generated, the process of storing the pre-update image for the block in the log storage unit is included. The file management method according to claim 4, wherein:
ディレクトリを含むファイルを階層構造で管理する計算機システム内のファイルシステムに関する過去の所定の時点におけるスナップショットを生成するためのプログラムであって、A program for generating a snapshot of a file system in a computer system that manages files including directories in a hierarchical structure at a predetermined past point in time,
前記ファイルシステムで使用される前記2次記憶装置上のブロックの内容を更新する際に、そのブロックの更新前の内容を、当該ブロックを含むファイルまたはディレクトリを識別するための識別子および当該ブロックのブロック番号と共に、更新前イメージとして前記ファイルシステムの更新履歴を蓄積するためのログ記憶手段に格納する更新前イメージ格納手順と、When updating the contents of a block on the secondary storage device used in the file system, the contents before the update of the block are used as an identifier for identifying the file or directory including the block and the block of the block A pre-update image storing procedure for storing in the log storage means for accumulating the update history of the file system as a pre-update image together with a number;
前記更新前イメージを前記ログ記憶手段に格納した後、前記ブロックを更新する手順と、A procedure for updating the block after storing the pre-update image in the log storage means;
前記ログ記憶手段に蓄積されている更新前イメージと前記ファイルシステムの現在のイメージとに基づいて、前記更新されたブロックを含むファイルまたはディレクトリの更新前の内容と、当該更新前のファイルまたはディレクトリを含む上位ディレクトリのディレクトリ情報とを復元することにより、過去の所定の時点における前記ファイルシステムのイメージを示すスナップショットを生成するスナップショット生成手順であって、前記更新されたブロックの更新前の内容を保持する第1の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手順と、前記更新されたブロックを含むファイルまたはディレクトリを管理するための管理情報を保持する前記ファイルシステム上の現在のイBased on the pre-update image stored in the log storage means and the current image of the file system, the contents before the update of the file or directory including the updated block and the file or directory before the update are obtained. A snapshot generation procedure for generating a snapshot showing an image of the file system at a predetermined past time by restoring directory information of a higher-level directory including the contents before update of the updated block A procedure for newly generating a first substitute block to be held using an empty block of the secondary storage device, and on the file system holding management information for managing a file or directory including the updated block Current a メージ上における管理情報ブロックの内容と前記第1の代替ブロックのブロック番号とに基づいて、前記管理情報が前記更新されたブロックの代わりに前記第1の代替ブロックへのリンク情報を持つように前記管理情報を修正し、当該修正された管理情報を保持する第2の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手順と、前記更新されたブロックのファイルまたはディレクトリが属する上位ディレクトリを保持する前記ファイルシステム上の現在のイメージ上におけるブロックの内容と前記第2の代替ブロックのブロック番号とに基づいて、前記上位ディレクトリが前記管理情報ブロックの代わりに前記第2の代替ブロックへのリンク情報を持つように前記上位ディレクトリのディレクトリ情報を修正し、当該修正されたディレクトリ情報を保持する第3の代替ブロックを前記2次記憶装置の空きブロックを用いて新たに生成する手順とを含むスナップショット生成手順とを前記計算機システムに実行させることを特徴とするプログラム。Based on the contents of the management information block on the image and the block number of the first replacement block, the management information has link information to the first replacement block instead of the updated block. A procedure for correcting the management information and newly generating a second alternative block holding the corrected management information using an empty block of the secondary storage device, and the file or directory of the updated block belongs Based on the content of the block on the current image on the file system holding the upper directory and the block number of the second alternative block, the upper directory replaces the management information block with the second alternative block. Modify the directory information of the upper directory so that it has link information to And causing the computer system to execute a snapshot generation procedure including a procedure for newly generating a third alternative block holding the corrected directory information using a free block of the secondary storage device. program.
前記更新前イメージ格納手順は、The pre-update image storage procedure includes:
前記ファイルシステムで使用される前記2次記憶装置上のブロックの内容を更新する際に、その更新が、前記スナップショットを生成すべき所定の時点以降における当該ブロックに対する最初の更新であるかどうかを判別する手順と、When updating the contents of a block on the secondary storage device used in the file system, whether or not the update is the first update to the block after a predetermined time when the snapshot should be generated The procedure to determine,
前記更新が前記スナップショットを生成すべき所定の時点以降における当該ブロックに対する最初の更新である場合にのみ、当該ブロックに関する更新前イメージを前記ログ記憶手段に格納する処理を実行する手順とを含むことを特徴とする請求項7記載のプログラム。And a procedure for executing a process of storing the pre-update image relating to the block in the log storage means only when the update is the first update to the block after a predetermined time when the snapshot should be generated. The program according to claim 7.
JP2002377173A 2002-09-11 2002-12-26 Computer system and file management method Expired - Fee Related JP3896077B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002377173A JP3896077B2 (en) 2002-09-11 2002-12-26 Computer system and file management method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002265856 2002-09-11
JP2002377173A JP3896077B2 (en) 2002-09-11 2002-12-26 Computer system and file management method

Publications (2)

Publication Number Publication Date
JP2004157958A JP2004157958A (en) 2004-06-03
JP3896077B2 true JP3896077B2 (en) 2007-03-22

Family

ID=32827508

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002377173A Expired - Fee Related JP3896077B2 (en) 2002-09-11 2002-12-26 Computer system and file management method

Country Status (1)

Country Link
JP (1) JP3896077B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7343449B2 (en) 2004-03-22 2008-03-11 Hitachi, Ltd. Storage subsystem and storage system
JP4790283B2 (en) * 2005-02-22 2011-10-12 株式会社日立製作所 Storage subsystem and storage system
JP4704893B2 (en) * 2005-11-15 2011-06-22 株式会社日立製作所 Computer system, management computer, storage system, and backup management method
JP4877921B2 (en) * 2006-01-25 2012-02-15 株式会社日立製作所 Storage system, storage controller, and recovery point detection method for storage controller
JP5028218B2 (en) * 2007-10-30 2012-09-19 株式会社日立製作所 Storage control device, storage system, and storage control device control method
US8443133B2 (en) * 2008-02-29 2013-05-14 Kabushiki Kaisha Toshiba Memory system storing management information and method of controlling same
JP2009211215A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
US8478799B2 (en) 2009-06-26 2013-07-02 Simplivity Corporation Namespace file system accessing an object store
CA2766231C (en) * 2009-06-26 2017-01-17 Simplivity Corporation Namespace file system accessing an object store

Also Published As

Publication number Publication date
JP2004157958A (en) 2004-06-03

Similar Documents

Publication Publication Date Title
US11086545B1 (en) Optimizing a storage system snapshot restore by efficiently finding duplicate data
KR101137299B1 (en) Hierarchical storage management for a file system providing snapshots
US7257690B1 (en) Log-structured temporal shadow store
US9128940B1 (en) Method and apparatus for performing file-level restoration from a block-based backup file stored on a sequential storage device
EP1918836B1 (en) Apparatus and method for a hardware-based file system
EP1695220B1 (en) System and method for supporting asynchronous data replication with very short update intervals
JP4336129B2 (en) System and method for managing multiple snapshots
US7650341B1 (en) Data backup/recovery
US7774565B2 (en) Methods and apparatus for point in time data access and recovery
KR100962055B1 (en) Sharing objects between computer systems
JP4699516B2 (en) Namespace replication program, namespace replication device, and namespace replication method
JP2005050024A (en) Computer system and program
CN106951375B (en) Method and device for deleting snapshot volume in storage system
CN1622087A (en) Managing file system versions
JP2016526737A (en) POSIX-compatible file system, method for generating file list, and storage device
US20080172423A1 (en) Hsm control program, hsm control apparatus, and hsm control method
US8060481B1 (en) Time indexed file system
JP3896077B2 (en) Computer system and file management method
JP3957464B2 (en) Data update device
JP2007305013A (en) Program, apparatus and method for hsm control
CN113821476B (en) Data processing method and device
JP4026278B2 (en) Data storage system
JP2007305012A (en) Hsm control program, hsm controller, and hsm control method
JP2008123104A (en) Data-access device
Page TR3002 by Dave Hitz, James Lau, & Michael Malcolm, Network Appliance, Inc.

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060829

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060919

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061120

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061215

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

Free format text: PAYMENT UNTIL: 20091222

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101222

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101222

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111222

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121222

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131222

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees