JP2009140142A - Journal file system and its repair method - Google Patents

Journal file system and its repair method Download PDF

Info

Publication number
JP2009140142A
JP2009140142A JP2007314529A JP2007314529A JP2009140142A JP 2009140142 A JP2009140142 A JP 2009140142A JP 2007314529 A JP2007314529 A JP 2007314529A JP 2007314529 A JP2007314529 A JP 2007314529A JP 2009140142 A JP2009140142 A JP 2009140142A
Authority
JP
Japan
Prior art keywords
file
repair
journal
rating
repaired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007314529A
Other languages
Japanese (ja)
Inventor
Risa Sanpei
理沙 三瓶
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2007314529A priority Critical patent/JP2009140142A/en
Publication of JP2009140142A publication Critical patent/JP2009140142A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To repair a file wherever possible within a time permitted for file repair, or within the limit of it. <P>SOLUTION: The journal file system and its repair method are achieved by a storage device in which a file and meta data ranked according to significance and journal as update content in the middle of the update of a file are stored and a computer which successively repairs the meta data of the file by using the journal successively from the file ranked in a high order within the limit of a prescribed time in response to restart accompanied by stop in the middle of file update. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

この発明は、ジャーナルファイルシステム及びその修復方法に係り、特に所定時間を目処に修復するジャーナルファイルシステム及びその修復方法に関する。   The present invention relates to a journal file system and a repair method thereof, and more particularly, to a journal file system and a repair method thereof for repairing a predetermined time.

一般的なファイルシステムは、ファイルの管理情報であるメタデータを持つ。ファイルを更新する際は、ファイルの中身であるユーザデータだけでなく、そのファイルに関連するメタデータの更新も必要になる。ジャーナルファイルシステムは、ファイル更新時にメタデータの更新内容をジャーナルに記録する。ファイル更新中に、障害等によりシステム停止となり、計算機の(キャッシュ)メモリ上のファイルやメタデータが失われたり、壊れたりしてファイルとメタデータとの整合が取れなくなった場合などに、ジャーナルファイルシステムは、そのジャーナルをもとにファイルとメタデータの整合を取り直し、ファイルを修復する。   A general file system has metadata which is file management information. When updating a file, it is necessary to update not only the user data that is the contents of the file but also the metadata related to the file. The journal file system records the updated contents of the metadata in the journal when the file is updated. Journal file when the system is stopped due to a failure, etc. during file update, and the file and metadata in the (cache) memory of the computer are lost or corrupted, making the file and metadata inconsistent. Based on the journal, the system reconfirms the file and metadata, and repairs the file.

このようにファイルを修復するために、ファイルの更新要求に対して応答する前に、磁気ディスク装置などの不揮発性の記憶装置に確保されたジャーナルに更新内容を記録する。 ジャーナルファイルシステムにおいては、2つの課題がある。一つは、ファイルの更新内容が磁気ディスク装置などにあるファイルとメタデータの実体に反映されていないものが修復対象になるので、このような修復対象が多いと、修復時間が長くなり、ファイルシステムの運用に影響するという課題である。他の一つは、磁気ディスク装置などにあるジャーナルに更新内容を記録した後に、ファイルの更新要求に対して応答するために、計算機の(キャッシュ)メモリを用いた性能の高速化の効果を減じ、ファイルシステムの性能がジャーナルへの記録のための磁気ディスク装置などへの入出力性能に依存するという課題である。   In order to repair the file in this way, the update content is recorded in a journal secured in a non-volatile storage device such as a magnetic disk device before responding to the file update request. There are two problems in the journal file system. One is that the update contents of the file are not reflected in the file and metadata entities on the magnetic disk device, etc., so the repair target will be longer if there are many such repair targets. It is a problem that affects the operation of the system. The other is to record the update contents in a journal on a magnetic disk device, etc., and then reduce the effect of speeding up the performance using the (cache) memory of the computer to respond to the file update request. The problem is that the performance of the file system depends on the input / output performance of a magnetic disk device for recording in a journal.

上記一つの課題に対して、特許文献1は、ファイルとメタデータの実体およびジャーナルを格納する、磁気ディスク装置などの記憶装置システムの制御装置によって、ジャーナルにあるファイルの更新内容をファイルとメタデータの実体に反映させる技術を開示している。   In response to the above-mentioned one problem, Patent Document 1 describes the update contents of a file in a journal by the control device of a storage system such as a magnetic disk device that stores the substance and journal of the file and metadata. The technology to be reflected in the entity is disclosed.

上記他の一つの課題に対して、特許文献2は、修復に許容される時間内に修復できるオブジェクトを選定し、選定したオブジェクトを対象にログをとることで、実行性能の低下を少なくする技術を開示している。   In response to the other problem, Patent Document 2 selects an object that can be repaired within a time allowed for repair, and logs the selected object as a target, thereby reducing a decrease in execution performance. Is disclosed.

米国特許公報USP7,047,355US Patent Publication USP 7,047,355 特開平6−175900JP-A-6-175900

特許文献1に開示の技術は、ジャーナルやファイルの実体を格納する装置として、様々な機能を高性能に実現する制御装置を持つRAID(Redundant Arrays of Inexpensive Disks)システムを用いる場合に、その制御装置において実現可能であり、一般のオフィスや個人にとっては受け入れにくい。   The technology disclosed in Japanese Patent Laid-Open No. 2004-228561 uses a control device when a RAID (Redundant Array of Inexpensive Disks) system having a control device that realizes various functions with high performance is used as a device for storing journal and file entities. It is feasible in general and is difficult to accept for general offices and individuals.

特許文献2に開示の技術は、修復時間と実行性能を優先的に考えたものであり、ログをとらないファイルは修復される可能性がないという新たな課題を発生する。   The technique disclosed in Patent Document 2 gives priority to restoration time and execution performance, and generates a new problem that a file that does not take a log is not likely to be restored.

したがって、ファイル修復に許容される時間内、又はそれを目処に可能な限りファイルを修復することが必要となる。   Therefore, it is necessary to repair the file as much as possible within the time allowed for the file repair or as a target.

本発明のジャーナルファイルシステム及びその修復方法は、重要度に応じて格付けされたファイルおよびメタデータとファイルの更新中の更新内容であるジャーナルとを格納する記憶装置、及びファイル更新中の停止に伴う再起動に応答して、所定時間を目処に格付けの上位のファイルから順次、ジャーナルを用いてファイルを修復する計算機の構成及び計算機の動作によって実現される。   The journal file system and the repair method thereof according to the present invention accompany a storage device that stores files and metadata that are rated according to importance and a journal that is an update content during file update, and a stop during file update. In response to the restart, this is realized by the configuration of the computer and the operation of the computer that repair the file using the journal sequentially from the higher-ranked file with a predetermined time as a target.

本発明によれば、ファイル修復に許容される時間内、又はそれを目処に可能な限りファイルを修復できる。   According to the present invention, a file can be repaired as much as possible within the time allowed for file repair or as a target.

以下、本発明を実施するための最良の形態を図面に基づいて詳細に説明する。   The best mode for carrying out the present invention will be described below in detail with reference to the drawings.

最初に、本発明を実施する前提となるジャーナルファイルシステムにおける、ジャーナルの記録と記録したジャーナルを用いたファイルシステムの修復について説明する。   First, journal recording and restoration of a file system using a recorded journal in a journal file system which is a premise for carrying out the present invention will be described.

図1はジャーナルファイルシステムの要点であるジャーナルログ(以下、単にジャーナル)への記録について説明する図である。ファイルを格納する記憶装置10にファイルのメタデータ管理領域20、領域30a及びジャーナル領域40が設けられている。   FIG. 1 is a diagram for explaining recording in a journal log (hereinafter simply referred to as a journal), which is the main point of the journal file system. A file metadata management area 20, an area 30a, and a journal area 40 are provided in the storage device 10 for storing files.

領域30aにファイルAを作成する場合を例として説明する。まずジャーナル領域40に「領域30aがファイルA用に使用中である。」と記録する。記録されたジャーナル領域40の状態を40aに示す。メタデータ管理領域20には「領域30aがファイルA用に使用される。」というメタデータを格納する。ファイルAとしてファイルデータを書き込むと、そのファイルデータは領域30aに書き込まれる。   A case where the file A is created in the area 30a will be described as an example. First, “Journal 30a is in use for file A” is recorded in the journal area 40. The state of the recorded journal area 40 is shown in 40a. In the metadata management area 20, metadata “area 30 a is used for file A” is stored. When file data is written as file A, the file data is written into area 30a.

ここで、ジャーナルファイルシステムは、一般にディスク装置のような不揮発性の記憶装置10上のメタデータ領域20にメタデータを書き込み、領域30aにファイルデータを書き込んでいるように振舞うが、それらのデータは、ジャーナルファイルシステムが動作するコンピュータ(図示略)の(キャッシュ)メモリに書き込まれるだけで、後にコンピュータのOS(オペレーティングシステム)によって(キャッシュ)メモリから読み出され、記憶装置10上のメタデータ領域20及び領域30aに書き込まれる。ファイルを修復するためのジャーナルは記憶装置10に格納され、ジャーナルファイルシステムはジャーナルの格納を確認した後に、ファイルの更新要求に対して応答する。   Here, the journal file system generally behaves as if writing metadata into the metadata area 20 on the non-volatile storage device 10 such as a disk device and writing file data into the area 30a. The metadata area 20 on the storage device 10 is simply written to the (cache) memory of the computer (not shown) on which the journal file system operates, and is later read from the (cache) memory by the OS (operating system) of the computer. And written in the area 30a. A journal for repairing the file is stored in the storage device 10, and the journal file system responds to the file update request after confirming the storage of the journal.

OSによって記憶装置10上のメタデータ領域20及び領域30aに書き込まれたならば、そのコンピュータの停止等によっても、それらのデータは保持されるので、修復の必要性が生じることはない。この状況になったならば、ジャーナル領域のジャーナルリプレイ開始位置(ポインタ)をずらし(40b)、それらのデータを修復対象外とする。   If the data is written in the metadata area 20 and the area 30a on the storage device 10 by the OS, even if the computer is stopped, the data is retained, so that there is no need for restoration. If this situation occurs, the journal replay start position (pointer) in the journal area is shifted (40b), and those data are excluded from the restoration target.

ここで問題は、それらのデータがコンピュータのメモリ上にあり、記憶装置10に書き込まれていない状態で、電源断等によりコンピュータが停止すると、メモリ上にあるそれらのデータが失われることである。   The problem here is that if the data is stored in the memory of the computer and not written in the storage device 10 and the computer is stopped due to a power failure or the like, the data in the memory is lost.

この問題への対応であるファイルシステムの修復について図2を用いて説明する。図1の状況に引き続いて、図2の領域30bにファイルBを作成するとする。   A file system repair, which is a response to this problem, will be described with reference to FIG. Following the situation of FIG. 1, assume that file B is created in area 30b of FIG.

ジャーナル領域40に「領域30bがファイルB用に使用中である。」と記録する。記録されたジャーナル領域40の状態を40cに示す。メタデータ領域20には「領域30bがファイルB用に使用される。」というメタデータを格納する。ファイルBとしてファイルデータを書き込むと、そのファイルデータは領域30bに書き込まれる。   In the journal area 40, “area 30b is in use for file B” is recorded. The state of the recorded journal area 40 is shown in 40c. In the metadata area 20, metadata “area 30 b is used for file B” is stored. When file data is written as file B, the file data is written into area 30b.

前述のように、ファイルBのメタデータ及びファイルデータの少なくとも一方はメモリにあり、記憶装置10に書き込まれていない状態を想定し、この状態で電源断等によりコンピュータが停止したとする。メモリにあるファイルBのメタデータ及びファイルデータの少なくとも一方は失われる。   As described above, it is assumed that at least one of the metadata and the file data of the file B is in the memory and is not written in the storage device 10, and it is assumed that the computer is stopped due to power interruption or the like in this state. At least one of the metadata of file B and the file data in memory is lost.

コンピュータが再立ち上げされると、ジャーナル領域40の状態40cから、ファイルBに対して領域30bが割り当てられていたことが明らかになる。ジャーナルファイルシステムによって、ジャーナルのデータがメタデータに相当するデータの場合と、メタデータ及びファイルデータの双方に相当するデータの場合がある。   When the computer is restarted, it becomes clear from the state 40c of the journal area 40 that the area 30b has been allocated to the file B. Depending on the journal file system, the journal data may be data corresponding to metadata, or data corresponding to both metadata and file data.

前者の場合は、ジャーナルを用いて、ファイルBのメタデータは修復されるが、修復されたメタデータに対応したファイルデータは修復されない。すなわち、メタデータとファイルデータとが整合しない状態になる。ただし、ファイルデータは修復されないが、メタデータが修復されるので、ジャーナルファイルシステムからファイルBに割り当てられた領域30bにはアクセスできる。後者の場合は、メタデータとファイルデータとが整合した状態で修復される。   In the former case, the metadata of the file B is restored using the journal, but the file data corresponding to the restored metadata is not restored. That is, the metadata and the file data are not matched. However, the file data is not restored, but since the metadata is restored, the area 30b allocated to the file B can be accessed from the journal file system. In the latter case, the metadata and the file data are restored in a consistent state.

以下、図面を用いて実施例を説明する。図3は、ジャーナルファイルシステムを有するシステムの構成を示す。   Embodiments will be described below with reference to the drawings. FIG. 3 shows the configuration of a system having a journal file system.

プロセッサ113により実行中のユーザプログラムが、ディスク装置115上のファイルやディレクトリにアクセスする場合、ディスクインターフェイス114を経由してディスク装置115に要求転送する。   When a user program being executed by the processor 113 accesses a file or directory on the disk device 115, the request is transferred to the disk device 115 via the disk interface 114.

本実施例では、サーバ1台とディスク装置1台とを接続したシステムであるが、サーバ複数台とディスク装置複数台とを接続したシステムでもよい。サーバ101のプロセッサ113は、メモリ102に格納されたプログラム103であるファイルアクセス処理104、ファイル作成処理105、ファイル削除処理106、格上げ判定処理107、格付け設定処理108、ファイルシステム修復処理109、ファイル修復予測時間算出処理110、格上げ処理111、格下げ処理112、及びユーザ通知処理121を実行する。これらの処理は、本実施例の主たる処理であり、これらの処理の下位には複数の処理がある。ディスク装置上115には、ファイル情報テーブル116、修復ファイルリスト117、定義リスト118、ファイル修復予測時間管理テーブル119、及び通知情報管理テーブル120を格納している。   In this embodiment, the system is a system in which one server and one disk device are connected, but a system in which a plurality of servers and a plurality of disk devices are connected may be used. The processor 113 of the server 101 includes a file access process 104, a file creation process 105, a file deletion process 106, an upgrade determination process 107, a rating setting process 108, a file system restoration process 109, a file restoration, which are programs 103 stored in the memory 102. The predicted time calculation process 110, the upgrade process 111, the downgrade process 112, and the user notification process 121 are executed. These processes are the main processes of this embodiment, and there are a plurality of processes below these processes. On the disk device 115, a file information table 116, a repair file list 117, a definition list 118, a file repair prediction time management table 119, and a notification information management table 120 are stored.

なお、図1及び図2で説明した、ディスク装置上115に設けられるメタデータ領域、ファイルを格納する領域及びジャーナル領域の図示を省略する。   Note that the metadata area, the file storage area, and the journal area provided on the disk device 115 described in FIGS. 1 and 2 are not shown.

図4は、修復するファイルの情報を保持するファイル情報テーブル116である。ファイル情報テーブル116は、ディスク装置115に格納される。ファイル情報テーブル116は、ファイルパス名201、アクセス回数202、アクセスユーザ203、ファイルの重要度属性である格付け204を保持する。ファイルパス名201は、ファイル、ディレクトリの位置情報である。。アクセス回数202は、ユーザプログラムがファイル、ディレクトリを作成、更新、及び属性変更した回数の合計である。アクセスユーザ203は、ファイルへアクセスしたユーザ名である。格付け204は、ファイルの重要度属性(A、B及びCのいずれか)である。   FIG. 4 is a file information table 116 that holds information on files to be repaired. The file information table 116 is stored in the disk device 115. The file information table 116 holds a file path name 201, an access count 202, an access user 203, and a rating 204 which is a file importance attribute. The file path name 201 is position information of files and directories. . The access count 202 is the total number of times that the user program has created, updated, and changed attributes of files and directories. The access user 203 is the name of the user who accessed the file. The rating 204 is a file importance attribute (A, B, or C).

図5は、ファイルシステム修復時に修復の対象となるファイルパス名を格納した修復ファイルリスト117である。ユーザプログラムによって、ファイル、ディレクトリの作成、更新、および属性変更のいずれかの処理が開始されると、修復ファイルリスト117に処理対象のファイルのファイルパス名210が格納される。それらの処理が完了すると、修復ファイルリスト117から処理対象のファイルのファイルパス名210が削除される。格付け211は、処理対象のファイルのファイルパス名に対応する格付けであり、ファイル情報テーブル116に格納されている格付け204が格納される
図6は、システム管理者(Administratorまたはroot)が予め定義する、定義項目220と定義内容221を持つ定義リスト118である。この定義に基づき、ファイルやディレクトリの重要度属性として格付けが決定される。定義したアクセス回数を累積アクセス回数が超過したファイルやディレクトリ、及び定義したアクセスユーザ数を超過したファイルやディレクトリが、ファイルの重要度属性を格上げする対象となる。修復指定時間は、ファイルシステム修復時間の目標値である。
FIG. 5 shows a repair file list 117 that stores file path names to be repaired when the file system is repaired. When the user program starts processing for creating, updating, or changing attributes of a file or directory, the file path name 210 of the file to be processed is stored in the repair file list 117. When these processes are completed, the file path name 210 of the file to be processed is deleted from the repair file list 117. The rating 211 is a rating corresponding to the file path name of the file to be processed, and the rating 204 stored in the file information table 116 is stored. FIG. 6 is predefined by the system administrator (Administrator or root) A definition list 118 having definition items 220 and definition contents 221. Based on this definition, the rating is determined as the importance attribute of the file or directory. Files and directories whose cumulative access count exceeds the defined access count, and files and directories that exceed the defined access user count are targets for upgrading the importance attribute of the file. The specified repair time is a target value for the file system repair time.

図7はファイル修復予測時間管理テーブル119であり、修復回次230として前回と今回のファイルシステム修復における、修復ファイル数231とファイル修復予測時間232を格納する。ファイル修復予測時間232は、ファイル1つあたりの修復予測時間である。   FIG. 7 shows a file repair prediction time management table 119, which stores the number of repair files 231 and the file repair prediction time 232 in the previous and current file system repairs as the repair sequence 230. The predicted file repair time 232 is a predicted repair time per file.

図8は、修復または削除されたファイルを、そのオーナーに通知するための情報を格納する通知管理情報テーブル120である。通知管理情報テーブル120は、修復または削除されたファイルのファイルパス名240、そのファイルのオーナ241、ファイルが修復されたか削除されたかを示すフラグ242、及び、通知管理情報テーブルに登録されたのが現在の運用時なのか前回の運用時なのかを示す世代番号243を保持する。   FIG. 8 is a notification management information table 120 that stores information for notifying the owner of a repaired or deleted file. The notification management information table 120 includes a file path name 240 of a file that has been repaired or deleted, an owner 241 of the file, a flag 242 that indicates whether the file has been repaired or deleted, and that registered in the notification management information table. A generation number 243 indicating whether the current operation or the previous operation is held.

世代番号243は、現在の運用時であれば0、前回の運用時であれば1である。世代番号は、世代番号が1以上であれば、ファイルは修復されている。ファイルを修復する際に、修復対象のファイルパス名、ファイルオーナ、修復フラグ、世代番号を通知情報管理テーブル120に格納する。このとき、世代番号243には0を格納する。   The generation number 243 is 0 for the current operation and 1 for the previous operation. If the generation number is 1 or more, the file has been repaired. When a file is repaired, the file path name, file owner, repair flag, and generation number to be repaired are stored in the notification information management table 120. At this time, 0 is stored in the generation number 243.

ファイルを削除する際には、削除対象のファイルパス名、ファイルオーナ、削除フラグ、世代番号を通知情報管理テーブル120に格納する。世代番号243には0を格納する。   When deleting a file, the file path name, file owner, deletion flag, and generation number to be deleted are stored in the notification information management table 120. Generation number 243 stores 0.

図9は、コンピュータシステム起動後のジャーナルファイルシステム起動処理である(図1では図示略)。ジャーナルファイルシステムはコンピュータシステムの起動に伴って、自動的に起動されても良いし、コマンド等によって起動されても良い。   FIG. 9 shows journal file system activation processing after computer system activation (not shown in FIG. 1). The journal file system may be automatically activated with the activation of the computer system, or may be activated by a command or the like.

ファイルシステムの修復の要否を判定する(ステップ(以下、S)600)。システム緊急停止等の事象によりジャーナルファイルシステム内のファイルとメタデータの不整合が検出された場合、ファイルシステムの修復が必要と判定される。一般には、図2で説明したように、この時点でメタデータやファイルデータが記憶装置115内のそれぞれの実体に反映されていないジャーナルデータの有無によって、ファイルシステムの修復の要否を判定する。不要であれば、ジャーナルファイルシステム起動処理を終了する。   It is determined whether the file system needs to be repaired (step (hereinafter, S) 600). If an inconsistency between a file in the journal file system and metadata is detected due to an event such as an emergency system stop, it is determined that the file system needs to be repaired. In general, as described with reference to FIG. 2, whether or not the file system needs to be repaired is determined based on the presence or absence of journal data whose metadata or file data is not reflected in the respective entities in the storage device 115 at this time. If unnecessary, the journal file system activation process is terminated.

ファイルシステムの修復が必要ならば、ファイルシステム修復処理(後述)を実行する(S605)。通知情報管理テーブル120の世代番号243に1を加算する(S610)。通知情報管理テーブル120に複数行格納されていれば、それぞれの行の世代番号243に1を加算する。ファイルシステム修復処理を実行することで、ファイルが修復または削除された場合は、そのファイル名を通知情報管理テーブル120のフラグ242が修復及び削除のいずれかによって、通知情報管理テーブル120のファイルパス名240からファイル名を取得し、ログに出力する。またメールで通知情報管理テーブル120のファイルオーナ241に通知606する(S615)。通知した世代番号243が1以上の行を通知情報管理テーブル120から削除する(S620)。   If the file system needs to be repaired, a file system repair process (described later) is executed (S605). 1 is added to the generation number 243 of the notification information management table 120 (S610). If a plurality of rows are stored in the notification information management table 120, 1 is added to the generation number 243 of each row. When a file is repaired or deleted by executing file system repair processing, the file path name of the notification information management table 120 is changed according to whether the flag 242 of the notification information management table 120 is repaired or deleted. Get file name from 240 and output to log. In addition, a notification 606 is sent to the file owner 241 of the notification information management table 120 by e-mail (S615). The notified generation number 243 of 1 or more is deleted from the notification information management table 120 (S620).

図10はファイル作成処理104である。ユーザプログラムやコマンドによるファイルやディレクトリの作成要求に基づいて、ファイル作成処理の実行を開始する。修復ファイルリスト117への登録処理(後述)を実行し(S700)、ファイル情報テーブル116を割り当てる(S705)。ファイルやディレクトリごとに、図4に示したファイル情報テーブル116に1行分が用意される。ファイルの作成に伴い更新されるメタデータの更新履歴をジャーナルに記録する(S710)。   FIG. 10 shows the file creation process 104. Based on a file or directory creation request by a user program or command, execution of file creation processing is started. Registration processing (described later) in the repair file list 117 is executed (S700), and a file information table 116 is assigned (S705). One line is prepared in the file information table 116 shown in FIG. 4 for each file or directory. An update history of metadata updated as the file is created is recorded in the journal (S710).

本実施例では、ジャーナルへの記録はメタデータの更新履歴をジャーナルへの記録し、ファイルデータの更新履歴をジャーナルに記録しないジャーナルファイルシステムで説明する。図1で説明したように、ファイルデータは(キャッシュ)メモリ上に格納され、ファイル作成完了段階で一括して記憶装置115に格納されるジャーナルファイルシステムとして説明する。   In the present embodiment, the journal recording is described in a journal file system in which the metadata update history is recorded in the journal and the file data update history is not recorded in the journal. As described with reference to FIG. 1, the file data is described as a journal file system that is stored in the (cache) memory and stored in the storage device 115 at the same time when the file creation is completed.

作成するファイル、ディレクトリの位置をファイル情報テーブル116のファイルパス名201、アクセス回数202、アクセスユーザ203を記録する(S715)。格付け設定処理(後述)を実行すると(S720)、ファイル情報テーブル116の格付け204が記録される。   The file path name 201, the access count 202, and the access user 203 in the file information table 116 are recorded in the file and directory positions to be created (S715). When a rating setting process (described later) is executed (S720), the rating 204 of the file information table 116 is recorded.

ファイル及びディレクトリを作成する(S725)。図1及び図2を用いて説明したように、ファイル及びディレクトリの作成又は更新が完了したならば、メモリ上のファイルデータ及びメタデータを記憶装置115に反映(記憶装置115内のファイルデータ及びメタデータの実体領域に、メモリ上で作成又は更新したファイルデータ及びメタデータを書き込む)する(このステップの図示略)。   A file and a directory are created (S725). As described with reference to FIGS. 1 and 2, when the creation or update of the file and directory is completed, the file data and metadata in the memory are reflected in the storage device 115 (file data and metadata in the storage device 115). The file data and metadata created or updated on the memory are written into the data real area (not shown in this step).

この段階でコンピュータが何らかの原因で停止したとしても、作成したファイルやメタデータは失われることがなくなったので、ステップ700で登録した修復ファイルリストの内容の削除処理(後述)を実行し(S730)、ジャーナルに記録したメタデータの更新履歴をジャーナルから削除する。ジャーナルに記録したメタデータの更新履歴のジャーナルからの削除は、図1を用いて説明したようにポインタをずらすことで実現される。   Even if the computer stops for some reason at this stage, the created files and metadata are no longer lost, so the process of deleting the contents of the repair file list registered in step 700 (described later) is executed (S730). The metadata update history recorded in the journal is deleted from the journal. Deletion of the update history of the metadata recorded in the journal from the journal is realized by shifting the pointer as described with reference to FIG.

図11は、ファイルアクセス処理104である。ファイルアクセス処理801は、ファイルに対する書き込み若しくは読み込み、またはファイルの属性変更の処理である。ユーザプログラムやコマンドによるファイルアクセス要求に基づいて、ファイルアクセス処理の実行を開始する。   FIG. 11 shows the file access process 104. A file access process 801 is a process of writing or reading a file, or changing a file attribute. Based on the file access request by the user program or command, the execution of the file access process is started.

修復ファイルリストへの登録処理(後述)を実行し(S800)、当該ファイルへのアクセスに伴い更新が必要となるメタデータの更新履歴をジャーナルに記録する(S805)。   A process of registering in the repair file list (described later) is executed (S800), and an update history of metadata that needs to be updated as the file is accessed is recorded in the journal (S805).

アクセスするファイル、ディレクトリのファイルパス名と、ファイル情報テーブル116のファイルパス名に一致する要素の、アクセス回数、アクセスユーザを更新する(S810)。格上げ判定処理(後述)を実行する(S815)。ファイルアクセスを実行し(S820)、修復ファイルリストからの削除処理(後述)を実行する(S825)。   The access count and access user of the element matching the file path name of the file and directory to be accessed and the file path name of the file information table 116 are updated (S810). Upgrade determination processing (described later) is executed (S815). File access is executed (S820), and deletion processing (described later) from the repair file list is executed (S825).

なお、S820及びS825に関わる、記憶装置115への反映及びジャーナルの削除に関しては、図10のS725及びS730と同じであるので説明を省略する。   Note that the reflection to the storage device 115 and the deletion of the journal related to S820 and S825 are the same as S725 and S730 in FIG.

図12は、ファイル削除処理106である。ユーザプログラムやコマンドによるファイルやディレクトリの要求に基づいて、ファイル削除処理の実行を開始する。修復ファイルリストへの登録処理(後述)を実行し(S900)、ファイル情報テーブルから削除するファイルパス名に一致するファイルパス名の要素(行)をファイル情報テーブル116から削除する(S905)。当該ファイルの削除に伴い更新や削除が必要となるメタデータの更新履歴をジャーナルに記録し(S910)、ファイル、ディレクトリ及びそのメタデータを削除する(S915)。915の処理結果が記憶装置115に反映された後に、修復ファイルリストからの削除処理(後述)を実行する(S920)。   FIG. 12 shows the file deletion process 106. Execution of file deletion processing is started based on a request for a file or directory by a user program or command. Processing for registering in the repair file list (described later) is executed (S900), and the file path name element (row) that matches the file path name to be deleted from the file information table is deleted from the file information table 116 (S905). An update history of metadata that needs to be updated or deleted with the deletion of the file is recorded in the journal (S910), and the file, directory, and its metadata are deleted (S915). After the processing result of 915 is reflected in the storage device 115, deletion processing (described later) from the repair file list is executed (S920).

図13は、修復ファイルリストへの登録処理である。この処理は、ファイル、ディレクトリの作成時(S700)、ファイルアクセス時(S800)、及びファイル削除時(S900)のようにファイルやディレクトリの状態に変化が生じる処理を実行する場合に呼ばれる。この処理では、修復ファイルリスト117の最後の要素(行)にファイルパス名を記録1002する(S1000)。図5を用いて説明したように、修復ファイルリスト117に格納されている要素(各行)が、修復対象のファイルである。   FIG. 13 shows the registration process to the repair file list. This process is called when executing a process in which the state of a file or directory changes, such as when a file or directory is created (S700), when a file is accessed (S800), or when a file is deleted (S900). In this process, the file path name is recorded 1002 in the last element (row) of the repair file list 117 (S1000). As described with reference to FIG. 5, the elements (each line) stored in the repair file list 117 are files to be repaired.

図14は、修復ファイルリストからの削除処理である。この処理は、ファイル、ディレクトリの作成時(S730)、ファイルアクセス時(S825)、ファイル削除時(S920)及びファイル修復(後述)時のように、ファイルやディレクトリの状態に変化が生じる処理の実行に伴って呼ばれる。なお、前述のように、記憶装置115にファイルに関連するメタデータの反映が完了したときに呼ばれる。   FIG. 14 shows a deletion process from the repair file list. This process is executed when a file or directory is changed (S730), when a file is accessed (S825), when a file is deleted (S920), or when a file is restored (described later). It is called with. As described above, this is called when the reflection of the metadata related to the file in the storage device 115 is completed.

対象のファイルパス名が、修復ファイルリスト117からファイルパス名に一致する要素(行)を削除し(S1100)、削除した要素(行)の空きを詰める(S1105)。   The element (line) whose target file path name matches the file path name is deleted from the repair file list 117 (S1100), and the deleted element (line) is filled with free space (S1105).

図15は、ファイル作成処理105において、ファイルの格付けの初期値を設定する格付け設定処理108である。そのファイルのオーナ属性がシステム管理者(root、administrator)の場合(S1200)、ファイル情報テーブル116のそのファイルの格付けとしてAを設定し(S1205)、オーナ属性がシステム管理者以外の場合は、ファイル情報テーブル116のファイルの格付けをCに設定する(S1210)。   FIG. 15 shows a rating setting process 108 for setting an initial value of the rating of the file in the file creation process 105. If the owner attribute of the file is the system administrator (root, administrator) (S1200), A is set as the rating of the file in the file information table 116 (S1205), and if the owner attribute is other than the system administrator, the file The file rating of the information table 116 is set to C (S1210).

図16は、ファイルへのアクセスに応じて(ファイルアクセス処理104のS815)、ファイル情報テーブル116に格納されたファイルの格付けを格上げする格上げ判定処理107である。ファイル情報テーブル116のファイルのアクセス回数がn回以上(図6の定義リスト118ではn=10)(S1300)、もしくは、アクセスユーザがm以上(図6の定義リスト118ではm=3)(S1310))の、ファイル情報テーブル116のファイルの格付けをBに更新する(S1305、S1315)。ただし、更新前のファイルの格付けが更新後の格付け以上の場合は、上記の更新は行わない。   FIG. 16 shows the upgrade determination process 107 for upgrading the rating of the file stored in the file information table 116 in accordance with the access to the file (S815 of the file access process 104). The file access count of the file information table 116 is n times or more (n = 10 in the definition list 118 in FIG. 6) (S1300), or the access user is m or more (m = 3 in the definition list 118 in FIG. 6) (S1310). )), The file rating of the file information table 116 is updated to B (S1305, S1315). However, if the file rating before update is higher than the rating after update, the above update is not performed.

図17は、ファイルシステム起動処理におけるファイルシステム修復処理(図9のS605)である。   FIG. 17 shows a file system repair process (S605 in FIG. 9) in the file system activation process.

修復ファイルリスト117のファイルパス名に対応する格付けを、ファイル情報テーブル116から修復ファイルリスト117にコピーする(S1400)。修復ファイルリスト117の先頭(行)をポイントし(S1405)、修復時間の測定を開始する(S1410)。ポイントしている修復ファイルリスト117の行にファイルがなければ(S1415)、修復時間測定を終了し(S1420)、ファイルシステム修復処理を終了する。   The rating corresponding to the file path name in the repair file list 117 is copied from the file information table 116 to the repair file list 117 (S1400). The head (line) of the repair file list 117 is pointed (S1405), and the measurement of the repair time is started (S1410). If there is no file in the line of the repair file list 117 pointed to (S1415), the repair time measurement is terminated (S1420), and the file system repair process is terminated.

ポイントしている修復ファイルリスト117のファイルの格付けがAであれば(S1425)、ファイル修復処理(後述)を実行し(S1430)、ステップ1460に処理を移す。格付けがAであれば、必ずファイル修復処理を実行することにより、修復指定時間に関わらず(修復指定時間を越えても)、重要度が高いファイルオーナがシステム管理者のファイルは修復されることになる。ステップ1425をステップ1435の後に実行するようにすれば、格付けAのファイルの修復に関しても修復指定時間を考慮することになるが、そのようにすると、重要度の高いファイルが修復されないまま、新たなファイル作成などの運用が開始されることになり、新たなシステム停止の要因を含んだ状態である可能性がある。   If the file rating of the repair file list 117 being pointed to is A (S1425), a file repair process (described later) is executed (S1430), and the process proceeds to step 1460. If the rating is A, the file repair process must be executed, and the system administrator's file will be repaired by the file owner with high importance regardless of the repair specified time (even if the repair specified time is exceeded). become. If step 1425 is executed after step 1435, the repair designation time will be taken into consideration for the repair of the file with the rating A, but if this is done, a new file will be restored without repairing the high-importance file. Operation such as file creation will be started, and there is a possibility that a new system stop factor is included.

格付けがAでなければ(S1425)、修復時間再見積もり処理(後述)により残りのファイルシステム修復時間を再見積もりし(S1435)、そのファイルシステム修復予測時間と修復指定時間の残りとの差が修復指定時間(定義リスト118に定義される修復指定時間であり、図6では10秒)の10%以内に収まるならば(S1440)、ステップ1460に処理を移す。   If the rating is not A (S1425), the remaining file system repair time is re-estimated by the repair time re-estimation process (described later) (S1435), and the difference between the predicted repair time of the file system and the remaining repair time is repaired. If it falls within 10% of the specified time (the repair specified time defined in the definition list 118, which is 10 seconds in FIG. 6) (S1440), the process proceeds to step 1460.

なお、修復指定時間の10%以内とは、修復指定時間を目処にして制御することであり、許容幅を表す値は他の値でも良い。また、状況によっては、修復指定時間より−10%を許容し、修復指定時間を越えることを許容しない制御もあり得る。   Note that “within 10% of the repair designation time” means that the control is performed with the repair designation time as a target, and the value indicating the allowable range may be another value. Further, depending on the situation, there may be a control that allows −10% from the designated repair time and does not allow the repair designated time to be exceeded.

ファイルシステム修復予測時間と修復指定時間の残り(図18を用いて後述される新たな修復指定時間)との差が修復指定時間(定義リスト118に当初設定された修復指定時間)の10%以内に収まらず(S1440)、ファイルシステム修復予測時間が修復指定時間の残りより短い場合は、格上げ処理(後述)を実行し(S1450)、ファイルシステム修復予測時間が修復指定時間の残りより長い場合は、格下げ処理(後述)を実行する(S1455)。   The difference between the estimated file system repair time and the rest of the repair specified time (a new repair specified time described later with reference to FIG. 18) is within 10% of the repair specified time (the repair specified time initially set in the definition list 118). If the predicted file system repair time is shorter than the remaining repair specified time (S1440), upgrade processing (described later) is executed (S1450). If the predicted file system repair time is longer than the remaining repair specified time, Then, a downgrade process (described later) is executed (S1455).

格上げ処理又は格下げ処理の結果としての格付けに応じた格付け別処理を実行し(S1460)、修復ファイルリスト117の次のファイルをポイントし(S1465)、ステップ1415に戻る。   A rating-specific process corresponding to the rating as a result of the upgrade process or the downgrade process is executed (S1460), the next file in the repair file list 117 is pointed (S1465), and the process returns to step 1415.

図18は、ファイルシステム修復処理(図17)又は後述の格付け別修復処理によって特定された1つのファイルに関連したメタデータとファイルの整合性を取り直すファイル修復処理である。ファイル修復時間測定を開始する(S1500)。   FIG. 18 shows a file repair process for reconciling the metadata and the file related to one file specified by the file system repair process (FIG. 17) or the repair process classified by rating described later. The file repair time measurement is started (S1500).

ジャーナルに記録された内容を再実行しメタデータとファイルの整合性を取り直すジャーナルリプレイを実行する(S1505)。ジャーナルリプレイに関しては、図2で説明したとおりであるが、ここでは特定されたファイルのジャーナルデータをジャーナルリプレイ開始ポインタから順次検索し、検索したジャーナルデータを記憶装置115に格納されている、そのファイルのメタデータに反映させていく。これは、前述のように、ジャーナルデータとしてメタデータをとる場合であるが、ファイルデータもジャーナルデータとしてとっている場合は、ファイルそのものの修復も可能である。   The contents recorded in the journal are re-executed, and journal replay is performed to restore the consistency between the metadata and the file (S1505). The journal replay is as described with reference to FIG. 2. Here, the journal data of the specified file is sequentially searched from the journal replay start pointer, and the searched journal data is stored in the storage device 115. Will be reflected in the metadata. As described above, this is a case where metadata is taken as journal data. However, when file data is also taken as journal data, the file itself can be repaired.

ファイル修復時間測定を終了する(S1510)。ステップ1500からステップ1510までの時間を、修復したファイルに関しての、測定したファイル修復時間とする(S1515)。修復指定時間から測定したファイル修復時間を減算し、これを新たな修復指定時間とする(S1520)。定義リスト118の修復指定時間を書き換えても良いが、ファイルシステムを起動するごとに定義リストの内容を管理者が設定することになるので、最初のファイルの修復時にワークエリアに新たな修復指定時間を格納し、これを用いて処理することが望ましい。さらに測定したファイル修復時間に基づいて、ファイル修復予測時間算出処理(後述)を実行する(S1525)。ファイル修復予測時間算出処理の処理の詳細は後述するが、1つのファイル当たりの修復予測時間であるファイル修復予測時間を算出する。   The file repair time measurement is terminated (S1510). The time from step 1500 to step 1510 is set as the measured file repair time for the repaired file (S1515). The measured file repair time is subtracted from the repair specified time, and this is used as a new repair specified time (S1520). You can rewrite the repair specification time in the definition list 118, but the administrator sets the contents of the definition list every time the file system is started. Therefore, a new repair specification time is added to the work area when the first file is repaired. It is desirable to store and process using this. Further, based on the measured file repair time, a file repair predicted time calculation process (described later) is executed (S1525). The details of the file repair prediction time calculation process will be described later, but a file repair prediction time that is a repair prediction time per file is calculated.

修復されたファイルのファイルパス名及びファイルオーナを通知情報管理テーブル120に格納する。また、修復フラグを「修復」、世代番号を「0」として通知情報管理テーブル120に格納する(S1530)。修復ファイルリスト117から修復されたファイルを削除するする修復ファイルリストからの削除処理(図14)を実行する(S1535)。   The file path name and file owner of the repaired file are stored in the notification information management table 120. Further, the repair flag is stored in the notification information management table 120 as “repair” and the generation number is “0” (S1530). Deletion processing (FIG. 14) from the repair file list for deleting the repaired file from the repair file list 117 is executed (S1535).

図19は、ファイルシステム修復処理(図17のS1435)の修復時間再見積り処理である。修復ファイルリストの格付けがB、B−、及びC+のファイル数を残りの修復ファイル数として求め(S1600)、求めた残りの修復ファイル数と、ファイル修復予測時間管理テーブル119の修復回次が今回の行に格納されているファイル修復予測時間とを乗算した値をファイルシステム修復予測時間としてファイルシステム修復処理に返す(S1605)。   FIG. 19 shows the restoration time re-estimation process of the file system restoration process (S1435 in FIG. 17). The number of files with the repair file list rating B, B-, and C + is obtained as the number of remaining repair files (S1600), and the number of remaining repair files obtained and the number of repairs in the file repair prediction time management table 119 are as follows. A value obtained by multiplying the predicted file repair time stored in the line is returned to the file system repair process as the predicted file system repair time (S1605).

図20は、1つのファイルの修復に要する時間を予測するファイル修復予測時間算出処理110である。ファイル修復処理(図18)時に、ファイルの修復に要した時間が測定される(測定したファイル修復時間)。   FIG. 20 shows a file repair prediction time calculation process 110 for predicting the time required to repair one file. During the file repair process (FIG. 18), the time required to repair the file is measured (measured file repair time).

今回のファイルシステム修復において、最初のファイルの修復であれば(S1700)、ファイル修復予測時間管理テーブル119に格納されている前回のファイル修復予測時間と測定したファイル修復時間との平均値を今回のファイル修復予測時間としてファイル修復予測時間管理テーブル119に記録し(S1705)、修復ファイル数を更新(+1)する(S1715)。   In the current file system repair, if the first file is repaired (S1700), the average value of the previous file repair predicted time stored in the file repair predicted time management table 119 and the measured file repair time is calculated as the current file system repair. The file repair prediction time is recorded in the file repair prediction time management table 119 (S1705), and the number of repair files is updated (+1) (S1715).

今回のファイルシステム修復において、2つ目以降のファイルの修復であれば(S1700)、ファイル修復予測時間管理テーブル119の今回のファイル修復予測時間と測定したファイル修復時間との平均値を今回のファイル修復予測時間としてファイル修復予測時間管理テーブル119に上書きし(S1710)、ファイル修復予測時間テーブル119の修復ファイル数を更新(+1)する(S1715)。   If the second and subsequent files are restored in the current file system restoration (S1700), the average value of the current file restoration estimated time and the measured file restoration time in the file restoration estimated time management table 119 is determined as the current file. The file repair prediction time management table 119 is overwritten as the repair prediction time (S1710), and the number of repair files in the file repair prediction time table 119 is updated (+1) (S1715).

図21は、ファイルの格付けに基づき、ファイル修復する格付け別修復処理である。格付け別修復処理は、修復対象のファイルの格付けがCまたはB−の場合(S1800)、ファイルとそのファイルに関連したメタデータを削除する(S1805)。さらに、削除したファイルのファイルパス名、ファイルオーナ、及び削除されたことを示す「削除」フラグを通知情報管理テーブル120に格納する(S1810)。ファイルの格付けがA、B、またはC+の場合は(S1800)、ファイル修復を実行する(S1815)。ファイルを削除する場合は、格上げ処理によって格付けCのものが先に削除されるように制御される。   FIG. 21 shows a rating-specific repair process for repairing a file based on the rating of the file. In the repair processing classified by rating, when the rating of the file to be repaired is C or B- (S1800), the file and metadata related to the file are deleted (S1805). Further, the file path name of the deleted file, the file owner, and the “delete” flag indicating that the file has been deleted are stored in the notification information management table 120 (S1810). If the file rating is A, B, or C + (S1800), file repair is executed (S1815). When deleting a file, it is controlled so that the rating C is deleted first by the upgrade process.

図22は、修復ファイルリスト117のファイルの格付けを格上げする格上げ処理111である。残り制限時間(ファイル修復処理(図18)において更新された新たな修復指定時間)をファイル修復予測時間管理テーブル119の今回のファイル修復予測時間で除算し、その商から修復されていないファイルの格付けがB及びC+のファイル数を引いた値をn(nは一時的な変数値)に代入する(S1900)。   FIG. 22 shows an upgrade process 111 for upgrading the file rating of the repair file list 117. The remaining time limit (new repair designation time updated in the file repair process (FIG. 18)) is divided by the current file repair predicted time in the file repair predicted time management table 119, and the rating of the file that has not been repaired from the quotient Substitute the value obtained by subtracting the number of files B and C + into n (n is a temporary variable value) (S1900).

修復ファイルリスト117に格付けB−のファイルが残っている場合(S1905)、B−からBへの格上げ処理を実行する(S1910)。後述するB−からBへの格上げ処理において、B−のファイルが残った場合(S1915)、処理を終了する。   If a file of rating B- remains in the repair file list 117 (S1905), upgrade processing from B- to B is executed (S1910). In the upgrade process from B- to B, which will be described later, if the B- file remains (S1915), the process ends.

修復ファイルリスト117に格付けB−のファイルが残っておらず(S1915)、修復ファイルリスト117に格付けCのファイルが残っている場合(S1920)、CからC+への格上げ処理を実行する(S1925)。   If there is no rating B- file remaining in the repair file list 117 (S1915) and a rating C file remains in the repair file list 117 (S1920), the upgrade process from C to C + is executed (S1925). .

図23は、ファイルの格付けをB−からBに格上げする格上げ処理である。B−からBへの格上げ処理は格上げ処理111から呼ばれる。修復ファイルリスト117の先頭からn個分の格付けB−のファイルを格付けBに格上げする。ここでnは、格上げ処理(図22)で算出された変数値nを指す。B−からB+への格上げは修復ファイルリスト117の先頭のファイルから優先的に実行する(S2000)。   FIG. 23 shows an upgrade process for upgrading a file from B- to B. The upgrade process from B- to B is called from the upgrade process 111. Rating n B files from the top of the repair file list 117 are upgraded to rating B. Here, n indicates the variable value n calculated in the upgrade process (FIG. 22). The upgrade from B- to B + is executed preferentially from the head file in the repair file list 117 (S2000).

nが0より大(S2005)、かつ現在指している修復ファイルリスト117のファイルの格付けがB−であれば(S2010)、このファイルの格付けB−をBに格上げし、修復ファイルリスト117の格付けをBに更新する(S2015)。nの値から1減算する(S2020)。修復ファイルリスト117の次の行(ファイル)を指し(S2025)、ステップ2005に戻る。nが0以下、または指している修復ファイルリスト117にファイルがなければ(S2005)、処理を終了する。   If n is greater than 0 (S2005) and the rating of the repaired file list 117 currently pointed to is B- (S2010), the rating B- of this file is upgraded to B, and the rating of the repaired file list 117 is Is updated to B (S2015). 1 is subtracted from the value of n (S2020). It points to the next line (file) in the repair file list 117 (S2025) and returns to step 2005. If n is 0 or less or there is no file in the repaired file list 117 pointed to (S2005), the process is terminated.

図24は、ファイルの格付けをCからC+に格上げする格上げ処理である。CからC+への格上げ処理は格上げ処理111から呼ばれる。修復ファイルリスト117に格納されている末尾のファイルからn個分の格付けCのファイルを格付けC+に格上げする。ここでnは、格上げ処理(図22)で算出され、B−からBへの格上げ処理(図23)で更新されたnを指す。CからC+への格上げは修復ファイルリスト117の末尾のファイルから優先的に実行する(S2100)。   FIG. 24 shows an upgrade process for upgrading the file rating from C to C +. The upgrade process from C to C + is called from the upgrade process 111. From the last file stored in the repair file list 117, n files of rating C are upgraded to rating C +. Here, n indicates n calculated by the upgrade process (FIG. 22) and updated by the upgrade process from B- to B (FIG. 23). The upgrade from C to C + is executed preferentially from the last file in the repair file list 117 (S2100).

nが0より大(S2105)、かつ現在指している修復ファイルリスト117のファイルの格付けがCであれば(S2110)、このファイルの格付けCをC+に格上げし、修復ファイルリスト117の格付けをC+に更新する(S2115)。nの値から1減算する(S2120)修復ファイルリスト117の一つ前のファイルを指し(S2125)、ステップ2105に戻る。nが0以下、又は指している修復ファイルリスト117にファイルがなければ(修復ファイルリスト117の先頭より前を指していれば)(S2105)、終了する。   If n is greater than 0 (S2105) and the rating of the repair file list 117 currently pointed to is C (S2110), the rating C of this file is upgraded to C +, and the rating of the repair file list 117 is C +. (S2115). 1 is subtracted from the value of n (S2120), the previous file in the repair file list 117 is pointed (S2125), and the process returns to step 2105. If n is 0 or less or there is no file in the repair file list 117 pointed to (if it points before the head of the repair file list 117) (S2105), the process ends.

図25は、修復ファイルリスト117のファイルの格付けを格下げする格下げ処理112である。残り制限時間(ファイル修復処理(図18)において更新された新たな修復指定時間)をファイル修復予測時間管理テーブル119の今回のファイル修復予測時間で除算し、その商から修復がされていないファイルの格付けがB及びC+のファイル数を引いた値に1を加えた値をn(nは一時的な変数値)に代入する(S2200)。   FIG. 25 shows a downgrade process 112 for downgrading the file rating of the repair file list 117. The remaining time limit (new repair designation time updated in the file repair process (FIG. 18)) is divided by the current file repair predicted time in the file repair predicted time management table 119, and the file of the file that has not been repaired from its quotient A value obtained by adding 1 to the value obtained by subtracting the number of files with ratings of B and C + is substituted for n (n is a temporary variable value) (S2200).

修復ファイルリスト117に格付けC+のファイルが残っている場合は(S2205)、C+からCへの格下げ処理を実行する(S2210)。後述するC+からCへの格下げ処理において、C+のファイルが残った場合(S2215)、処理を終了する。   If a file of rating C + remains in the repair file list 117 (S2205), a downgrade process from C + to C is executed (S2210). In the downgrade process from C + to C, which will be described later, if a C + file remains (S2215), the process ends.

修復ファイルリスト117に格付けC+のファイルが残っておらず(S2215)、修復ファイルリスト117に格付けBのファイルが残っている場合は(S2220)、BからB−への格下げ処理を実行する(S2225)。   If no rating C + file remains in the repair file list 117 (S2215) and a rating B file remains in the repair file list 117 (S2220), a downgrade process from B to B- is executed (S2225). ).

図26は、ファイルの格付けをC+からCに格下げする格下げ処理である。C+からCへの格下げ処理は格下げ処理112から呼ばれる。修復ファイルリスト117の先頭からn個分の格付けC+のファイルを格付けCに格下げする。ここでnは、格下げ処理(図25)で算出された変数値nを指す。C+からCへの格下げは修復ファイルリスト117の先頭のファイルから優先的に実行する(S2300)。   FIG. 26 shows a downgrade process for downgrading the file rating from C + to C. The downgrade process from C + to C is called from the downgrade process 112. Rating C + files from the top of the repair file list 117 are downgraded to rating C. Here, n indicates the variable value n calculated in the downgrade process (FIG. 25). The downgrade from C + to C is executed preferentially from the first file in the repair file list 117 (S2300).

nが0より大(S2305)、かつ現在指している修復ファイルリスト117のファイルの格付けがC+であれば(S2310)、このファイルの格付けC+をCに格下げし、修復ファイルリスト117の格付けをCに更新する(S2315)。nの値から1減算する(S2320)。修復ファイルリスト117の次の行(ファイル)を指し(S2325)、ステップ2305に戻る。nが0いか、または指している修復ファイルリスト117にファイルがなければ(S2305)、処理を終了する。   If n is greater than 0 (S2305) and the rating of the currently repaired file list 117 is C + (S2310), the rating C + of this file is downgraded to C, and the rating of the repaired file list 117 is C. (S2315). 1 is subtracted from the value of n (S2320). It points to the next line (file) in the repair file list 117 (S2325) and returns to step 2305. If n is 0 or there is no file in the repair file list 117 pointed to (S2305), the process is terminated.

図27は、ファイルの格付けをBからB−に格下げする格下げ処理である。BからB−への格下げ処理は格下げ処理112から呼ばれる。修復ファイルリスト117に格納されている末尾のファイルからn個分の格付けBのファイルを格付けB−に格下げする。ここでnは、格下げ処理(図25)で算出され、C+からCへの格下げ処理(図26)で更新されたnを指す。BからB−への格下げは修復ファイルリスト117の末尾のファイルから優先的に実行する(S2400)。   FIG. 27 shows a downgrade process for downgrading the file rating from B to B-. The downgrade process from B to B- is called from the downgrade process 112. The n files of rating B from the last file stored in the repair file list 117 are downgraded to the rating B-. Here, n indicates n calculated by the downgrade process (FIG. 25) and updated by the downgrade process from C + to C (FIG. 26). Downgrading from B to B- is executed preferentially from the last file in the repair file list 117 (S2400).

nが0より大(S2405)、かつ現在指している修復ファイルリスト117のファイルの格付けがBであれば(S2410)、このファイルの格付けBをB−に格下げし、修復ファイルリスト117の格付けをB−に更新する(S2415)。nの値から1減算する(S2420)。修復ファイルリスト117の一つ前のファイルを指し(S2425)、ステップ2405に戻る。nが0以下、又は指している修復ファイルリスト117にファイルがなければ(ファイルリスト117の先頭より前を指していれば)(S2405)、処理を終了する。   If n is greater than 0 (S2405), and the rating of the repaired file list 117 currently pointed to is B (S2410), the rating B of this file is downgraded to B-, and the rating of the repaired file list 117 is Update to B- (S2415). 1 is subtracted from the value of n (S2420). It points to the previous file in the repair file list 117 (S2425) and returns to step 2405. If n is 0 or less, or there is no file in the repaired file list 117 pointed to (if it points before the beginning of the file list 117) (S2405), the process ends.

図28は、ファイルシステム修復処理109によって修復または削除されたファイルパス名を出力したログの画面(a)2501、ファイルが修復されたことをファイルのオーナに通知するメールの画面(b)2502、及びファイルが削除されたことをファイルのオーナに通知するメールの画面(c)2503である。   FIG. 28 shows a log screen (a) 2501 that outputs the file path name that has been repaired or deleted by the file system repair processing 109, and a mail screen (b) 2502 that notifies the file owner that the file has been repaired. A mail screen (c) 2503 for notifying the owner of the file that the file has been deleted.

修復または削除されたファイルパス名を出力したログの画面2501は、ファイルシステムの起動を開始し、rootファイルシステムを修復する必要があることを検知し、ファイルシステム修復を開始し、通知情報管理テーブル120のフラグから/etc/hostsを修復したこと検出し、/etc/hostsを修復したことを表す。さらに、異なるファイルシステムもファイルシステム修復が必要であることを検知し、ファイルシステム修復を開始し、通知情報管理テーブル120のフラグから/home/root/var.txtが修復され、/home/foo/var.txtが削除されたことを検出し、/home/root/var.txtが修復され、/home/foo/var.txtが削除されたことを表す。また、異なるファイルシステムのファイルシステム修復を開始し、通知情報管理テーブル120のフラグから/tmpのファイルが削除されたことを検出し、/tmpのファイルが削除されたことを表す。   The log screen 2501 that outputs the file path name that has been repaired or deleted starts the start of the file system, detects that the root file system needs to be repaired, starts the file system repair, and the notification information management table It indicates that / etc / hosts has been repaired from the flag 120 and that / etc / hosts has been repaired. Further, it is detected that a different file system needs to be repaired, the file system repair is started, /home/root/var.txt is repaired from the flag of the notification information management table 120, and / home / foo / This indicates that var.txt has been deleted, /home/root/var.txt has been repaired, and /home/foo/var.txt has been deleted. Also, file system repair of a different file system is started, and it is detected from the flag of the notification information management table 120 that the / tmp file has been deleted, indicating that the / tmp file has been deleted.

ファイルが修復されたことをファイルオーナであるrootに通知するメール画面2502は、2501でログに出力されたrootのファイルが修復されたことをファイルオーナであるrootに通知するメール画面である。   A mail screen 2502 for notifying root, which is a file owner, that a file has been repaired is a mail screen for notifying root, which is a file owner, that a root file output to the log in 2501 has been repaired.

ファイルが削除されたことをファイルオーナであるfooに通知するメール画面2503は、2501でログに出力されたfooのファイルが削除されたことをファイルオーナであるfooに通知するメール画面である。   A mail screen 2503 for notifying the file owner foo that the file has been deleted is a mail screen for notifying the file owner foo that the file foo output to the log in 2501 has been deleted.

本実施例によれば、システム障害などによるシステム停止後のシステム再起動において、ファイルシステムの起動時間の短縮による稼動性向上と、破損ファイルをユーザへ通知することができる。   According to the present embodiment, when the system is restarted after the system is stopped due to a system failure or the like, it is possible to improve the operability by shortening the startup time of the file system and notify the user of a damaged file.

ジャーナルファイルシステムを説明する図である。It is a figure explaining a journal file system. ジャーナルファイルシステムの修復を説明する図である。It is a figure explaining restoration of a journal file system. 実施例のシステム構成を示す。The system configuration | structure of an Example is shown. ファイル情報テーブルを示す。A file information table is shown. 修復ファイルリストを示す。Show repair file list. システム管理者が予め定義する定義リストを示す。The definition list defined in advance by the system administrator is shown. ファイル修復予測時間管理テーブルを示す。A file repair prediction time management table is shown. 通知情報管理テーブルを示す。A notification information management table is shown. ジャーナルファイルシステム起動処理のフローチャートである。It is a flowchart of a journal file system starting process. ファイル作成処理のフローチャートである。It is a flowchart of a file creation process. ファイルアクセス処理のフローチャートである。It is a flowchart of a file access process. ファイル削除処理のフローチャートである。It is a flowchart of a file deletion process. 修復ファイルリストへの登録処理のフローチャートである。It is a flowchart of the registration process to a repair file list. 修復ファイルリストからの削除処理のフローチャートである。It is a flowchart of the deletion process from a repair file list. 格付け設定処理のフローチャートである。It is a flowchart of a rating setting process. 格上げ判定処理のフローチャートである。It is a flowchart of an upgrade determination process. ファイルシステム修復処理のフローチャートである。It is a flowchart of a file system repair process. ファイル修復処理のフローチャートである。It is a flowchart of a file repair process. 修復時間再見積り処理のフローチャートである。It is a flowchart of a repair time re-estimation process. ファイル修復予測時間算出処理のフローチャートである。It is a flowchart of file restoration prediction time calculation processing. 格付け別修復処理のフローチャートである。It is a flowchart of the repair process classified by rating. 格上げ処理のフローチャートである。It is a flowchart of an upgrade process. B−からBへの格上げ処理のフローチャートである。It is a flowchart of the upgrade process from B- to B. CからC+への格上げ処理のフローチャートである。It is a flowchart of the upgrade process from C to C +. 格下げ処理のフローチャートである。It is a flowchart of a downgrade process. C+からCへの格下げ処理のフローチャートである。It is a flowchart of the downgrade process from C + to C. BからB−への格下げ処理のフローチャートである。It is a flowchart of the downgrade process from B to B-. 修復または削除されたファイルをログまたはメールで通知する画面である。This is a screen for notifying a repaired or deleted file by log or email.

符号の説明Explanation of symbols

101:計算機(サーバ)、102:メモリ、103:プログラム、104:ファイルアクセス処理、105:ファイル作成処理、106:ファイル削除処理、107:格上げ判定処理、108:格付け設定処理、109:ファイルシステム修復処理、110:ファイル修復予測時間算出処理、111:格上げ処理、112:格下げ処理、113:プロセッサ、114:ディスクインターフェイス、115:記憶装置、116:ファイル情報テーブル、117:修復ファイルリスト、118:定義リスト、119:ファイル修復予測時間管理テーブル、120:通知情報管理テーブル、121:ユーザ通知処理。   101: Computer (server), 102: Memory, 103: Program, 104: File access processing, 105: File creation processing, 106: File deletion processing, 107: Rating determination processing, 108: Rating setting processing, 109: File system repair Processing: 110: File repair prediction time calculation processing, 111: Upgrade processing, 112: Downgrade processing, 113: Processor, 114: Disk interface, 115: Storage device, 116: File information table, 117: Repair file list, 118: Definition List: 119: File repair prediction time management table, 120: Notification information management table, 121: User notification processing.

Claims (8)

重要度に応じて格付けされたファイル、前記ファイルのメタデータ及び前記ファイルの更新中の更新内容をジャーナルとして格納する記憶装置、及び前記記憶装置に接続し、前記ファイル更新中の停止に伴う再起動に応答して、所定時間を目処に前記格付けの上位の前記ファイルから順次、前記ジャーナルを用いて前記ファイルを修復する計算機を有することを特徴とするジャーナルファイルシステム。   A file that is rated according to importance, a storage device that stores the metadata of the file and the update contents during the update of the file as a journal, and a restart that is connected to the storage device and that is stopped during the update of the file In response to the above, a journal file system comprising: a computer for repairing the file using the journal in order from the file with the highest ranking in a predetermined time. 前記ファイルの前記格付けは、修復の対象とする最上位、前記所定時間を目処に修復可能であれば修復の対象とする上位、及び削除の対象とする下位のいずれか一つであり、前記上位格付けのファイルの修復予測時間に比して前記所定時間が小なるときは、前記上位格付けのファイルを前記下位格付けに格下げし、前記格下げしたファイル及び該ファイルのメタデータを削除することを特徴とする請求項1記載のジャーナルファイルシステム。   The rating of the file is one of a top level to be repaired, a top level to be repaired if it can be repaired within the predetermined time, and a low level to be deleted. When the predetermined time is shorter than a predicted repair time of a rating file, the upper rating file is downgraded to the lower rating, and the downgraded file and metadata of the file are deleted. The journal file system as claimed in claim 1. 前記上位格付けのファイルの修復予測時間に比して前記所定時間が大なるときは、前記下位格付けのファイルを前記上位格付けに格上げし、前記格上げしたファイル及び該ファイルのメタデータを前記修復の対象とすることを特徴とする請求項2記載のジャーナルファイルシステム。   When the predetermined time is longer than the estimated repair time of the higher-ranked file, the lower-ranked file is upgraded to the higher-ranked file, and the upgraded file and the metadata of the file are subject to the repair. The journal file system according to claim 2, wherein: 前記修復したファイル及び前記削除したファイルを特定する情報を通知として出力することを特徴とする請求項3記載のジャーナルファイルシステム。   4. The journal file system according to claim 3, wherein information specifying the repaired file and the deleted file is output as a notification. ファイルの更新中の更新内容をジャーナルとして記憶装置に格納し、前記ファイル更新中の停止に伴う再起動に応答して、所定時間を目処に、重要度に応じて付された格付けの上位の前記ファイルから順次、前記記憶装置に格納されたジャーナルを用いて前記ファイルのメタデータを修復することを特徴とするジャーナルファイルシステムの修復方法。   The update contents during the update of the file are stored in a storage device as a journal, and in response to a restart associated with the stop during the file update, the upper rank of the rating assigned according to the importance is set for a predetermined time. A method for repairing a journal file system, comprising repairing metadata of the file sequentially from a file using a journal stored in the storage device. 前記ファイルの前記格付けは、修復の対象とする最上位、前記所定時間を目処に修復可能であれば修復の対象とする上位、及び削除の対象とする下位のいずれか一つであり、前記上位格付けのファイルの修復予測時間に比して前記所定時間が小なるときは、前記上位格付けのファイルを前記下位格付けに格下げし、前記格下げしたファイル及び該ファイルのメタデータを削除することを特徴とする請求項5記載のジャーナルファイルシステムの修復方法。   The rating of the file is one of a top level to be repaired, a top level to be repaired if it can be repaired within the predetermined time, and a low level to be deleted. When the predetermined time is shorter than a predicted repair time of a rating file, the upper rating file is downgraded to the lower rating, and the downgraded file and metadata of the file are deleted. The journal file system repairing method according to claim 5. 前記上位格付けのファイルの修復予測時間に比して前記所定時間が大なるときは、前記下位格付けのファイルを前記上位格付けに格上げし、前記格上げしたファイル及び該ファイルのメタデータを前記修復の対象とすることを特徴とする請求項6記載のジャーナルファイルシステムの修復方法。   When the predetermined time is longer than the estimated repair time of the higher-ranked file, the lower-ranked file is upgraded to the higher-ranked file, and the upgraded file and the metadata of the file are subject to the repair. The journal file system repair method according to claim 6, wherein: 前記修復したファイル及び前記削除したファイルを特定する情報を通知として出力することを特徴とする請求項7記載のジャーナルファイルシステムの修復方法。   8. The journal file system repair method according to claim 7, wherein information specifying the repaired file and the deleted file is output as a notification.
JP2007314529A 2007-12-05 2007-12-05 Journal file system and its repair method Pending JP2009140142A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007314529A JP2009140142A (en) 2007-12-05 2007-12-05 Journal file system and its repair method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007314529A JP2009140142A (en) 2007-12-05 2007-12-05 Journal file system and its repair method

Publications (1)

Publication Number Publication Date
JP2009140142A true JP2009140142A (en) 2009-06-25

Family

ID=40870703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007314529A Pending JP2009140142A (en) 2007-12-05 2007-12-05 Journal file system and its repair method

Country Status (1)

Country Link
JP (1) JP2009140142A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018511861A (en) * 2015-02-27 2018-04-26 アリババ・グループ・ホールディング・リミテッドAlibaba Group Holding Limited Method and device for processing data blocks in a distributed database
CN107977578A (en) * 2016-10-25 2018-05-01 中兴通讯股份有限公司 A kind of distributed memory system and its data recovery method and device
CN111026326A (en) * 2018-10-10 2020-04-17 三星电子株式会社 Memory controller, storage device, and method of managing metadata

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018511861A (en) * 2015-02-27 2018-04-26 アリババ・グループ・ホールディング・リミテッドAlibaba Group Holding Limited Method and device for processing data blocks in a distributed database
CN107977578A (en) * 2016-10-25 2018-05-01 中兴通讯股份有限公司 A kind of distributed memory system and its data recovery method and device
CN107977578B (en) * 2016-10-25 2022-12-02 中兴通讯股份有限公司 Distributed storage system and data restoration method and device thereof
CN111026326A (en) * 2018-10-10 2020-04-17 三星电子株式会社 Memory controller, storage device, and method of managing metadata
KR20200040544A (en) * 2018-10-10 2020-04-20 삼성전자주식회사 Memory controller, storage device including the same, and operating method of the memory controller
KR102553261B1 (en) * 2018-10-10 2023-07-07 삼성전자 주식회사 Memory controller, storage device including the same, and operating method of the memory controller
CN111026326B (en) * 2018-10-10 2024-03-19 三星电子株式会社 Memory controller, memory device and method for managing metadata

Similar Documents

Publication Publication Date Title
JP5975473B2 (en) Backup method, restore method, storage system, and program
US7263589B2 (en) Apparatus and method for controlling booting operation of computer system
US8819487B2 (en) System reset
JP6064608B2 (en) Storage device, backup program, and backup method
US20120198287A1 (en) File system error detection and recovery framework
US8959301B2 (en) Accessing data in a storage system
CN104050056A (en) File system backup of multi-storage-medium device
PL182609B1 (en) Method of and device for storing data in computers
CN104350477A (en) Optimized context drop for solid state drive (SSD)
US9146928B1 (en) Techniques for storing metadata of a filesystem in persistent memory
WO2013088284A1 (en) Tape drive system server
JP2010535379A (en) I / O control method and apparatus optimized for flash memory
CN105468544B (en) Method and device for realizing power-down prevention file system and power-down prevention file system
JP5956971B2 (en) WORM cartridge support realized by LTFS (LinearTapeFileSystem)
JP2009140142A (en) Journal file system and its repair method
JP5719083B2 (en) Database apparatus, program, and data processing method
US20070043968A1 (en) Disk array rebuild disruption resumption handling method and system
CN103699456A (en) File recording apparatus, file system management method, and changer drive
JP6248435B2 (en) Storage device and storage device control method
JP2006313531A (en) File management system
US7600151B2 (en) RAID capacity expansion interruption recovery handling method and system
JP6242054B2 (en) Information processing apparatus, information processing method, and program
JP2004355188A (en) Method and apparatus for controlling hard disk
JP2013025655A (en) Log file management module and log file management method
KR100775141B1 (en) An implementation method of FAT file system which the journaling is applied method