JP2013025773A - File management device - Google Patents
File management device Download PDFInfo
- Publication number
- JP2013025773A JP2013025773A JP2011163334A JP2011163334A JP2013025773A JP 2013025773 A JP2013025773 A JP 2013025773A JP 2011163334 A JP2011163334 A JP 2011163334A JP 2011163334 A JP2011163334 A JP 2011163334A JP 2013025773 A JP2013025773 A JP 2013025773A
- Authority
- JP
- Japan
- Prior art keywords
- file
- data
- write
- storage area
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、ストレージデバイスを用いてファイル操作を行う際に、キャッシュ領域を有するファイルシステムを介して単位領域毎のデータをリード・ライトする、ファイル管理装置に関する。 The present invention relates to a file management apparatus that reads / writes data for each unit area via a file system having a cache area when a file operation is performed using a storage device.
コンピュータ上で、ファイル装置に記録されるファイルを管理するための方式や、そのような管理を行なうソフトウェアは、ファイルシステムと呼ばれる。ファイルシステムは、アプリケーションプログラムからのファイル操作要求を受け付け、ファイル装置へのデータの保存等を効率的に行なう。一般的に、ファイルの作成方法、ファイル装置上でのファイル管理の方法、管理領域とデータ領域の格納場所等を含むファイル管理に関する様々な事項がファイルシステムの種類によってそれぞれ定められている。 A method for managing files recorded in a file device on a computer and software for performing such management are called a file system. The file system receives a file operation request from an application program and efficiently saves data in the file device. In general, various items related to file management including a file creation method, a file management method on a file device, a storage area of a management area and a data area, and the like are determined depending on the type of the file system.
例えば、FAT(File Allocation Table)ファイルシステムと呼ばれるファイルシステムは、ファイル装置を、ファイルの管理情報を格納する管理領域と、ファイルの内容を格納するデータ領域とに分けて管理する。管理領域は、FATとディレクトリエントリと称される情報とを含み、FATによってファイルを構成するデータの格納位置を管理し、また、ディレクトリエントリによってファイル名、ディレクトリ名、属性等を管理する(例えば、特許文献1参照)。 For example, a file system called a FAT (File Allocation Table) file system manages file devices by dividing them into a management area for storing file management information and a data area for storing file contents. The management area includes a FAT and information called a directory entry, manages the storage location of data constituting the file by the FAT, and manages the file name, directory name, attribute, etc. by the directory entry (for example, Patent Document 1).
特許文献1に開示されているように、ファイルシステムには、突然の電源遮断やシステムのクラッシュ時等にファイル操作処理が中断してしまい、ファイル装置の内容に不具合が発生したときに復旧できるように、障害回復機能を持つことが要求される。一般的に、ファイルシステムは、キャッシュ領域を持つことによって、アプリケーションプログラムに対して高速なファイル操作処理を提供している。したがって、突然電源が遮断され、あるいはシステムがダウンすると、キャッシュ領域に記憶されていたファイル操作の内容がファイル装置上には反映されず、あるいは、ファイル装置上の管理情報と、データ領域にあるファイル内容のデータとの間に不整合が生じ、信頼性の観点で問題があった。 As disclosed in Patent Document 1, in a file system, file operation processing is interrupted when the power is suddenly shut down or the system crashes, and the file system can be recovered when a problem occurs in the contents of the file device. In addition, it is required to have a failure recovery function. Generally, a file system provides a high-speed file operation process for an application program by having a cache area. Therefore, if the power is suddenly shut down or the system goes down, the contents of the file operation stored in the cache area are not reflected on the file apparatus, or the management information on the file apparatus and the file in the data area are not reflected. There was a problem with reliability from the viewpoint of reliability.
また、最悪の場合、FATチェーンの不正や、2つ以上のファイルが同じ単位領域を使用するクロスリンク等の問題が発生し、外部記憶であるストレージデバイスに保存された全てのファイルに対してアクセスができなくなる恐れがある。従来、これを防止するため、データを二重化させることで信頼性を確保することが行なわれている。しかしながら、この場合、ストレージデバイスの容量と同一、またはそれ以上のデータを確保する必要があり、コストがかかることから、PC(Personal Computer)等、比較的小規模のコンピュータシステムへの適用は困難であった。 In the worst case, problems such as FAT chain fraud and cross-links in which two or more files use the same unit area occur, and all files stored in a storage device that is external storage are accessed. There is a risk that it will not be possible. Conventionally, in order to prevent this, reliability has been ensured by duplicating data. However, in this case, it is necessary to secure data equal to or larger than the capacity of the storage device, which is costly. Therefore, it is difficult to apply to a relatively small computer system such as a PC (Personal Computer). there were.
本発明は上記した課題を解決するためになされたものであり、データを二重化すること無く、廉価構成でファイルシステムの信頼性向上をはかった、ファイル管理装置を提供することを目的とする。 SUMMARY An advantage of some aspects of the invention is that it provides a file management apparatus that improves the reliability of a file system with a low-cost configuration without duplicating data.
上記した課題を解決するために本発明は、ストレージデバイスを用いてファイル操作を行う際に、キャッシュ領域を有するファイルシステムを介して単位領域毎のデータをリード・ライトするファイル管理装置であって、書き込み可能な状態にオープンされたファイルのファイル名とライトデータとを含む管理情報を保持する不揮発性記憶領域を確保し、前記ファイルシステムからデータライト要求を受信すると、前記不揮発性記憶領域に前記管理情報を保持するバックアップ処理と、データライト中における電源断もしくはシステムクラッシュからの復旧時、前記不揮発性記憶領域を参照して前記不揮発性記憶領域に保持されている前記ライトデータを前記ストレージデバイスに書き戻す再起動処理と、を実行する制御部、を有することを特徴とする。 In order to solve the above problems, the present invention is a file management apparatus that reads and writes data for each unit area via a file system having a cache area when performing file operations using a storage device, A non-volatile storage area for holding management information including a file name and write data of a file opened in a writable state is secured, and when a data write request is received from the file system, the management is stored in the non-volatile storage area. In the backup process for holding information, and when recovering from a power failure or system crash during data write, the write data held in the nonvolatile storage area is written to the storage device with reference to the nonvolatile storage area Having a restarting process and a control unit for executing And butterflies.
本発明によれば、制御部は、データライト中における電源断もしくはシステムクラッシュからの復旧時、そのライトデータを、不揮発性記憶領域に保持された管理情報に基づきストレージデバイスに書き戻す処理を実行する。このように、データライト中に確保した不揮発性記憶領域に管理情報を保持し、電源断等の不測の事態発生時、その不揮発性記憶領域に保持されたデータをストレージデバイスに書き戻す再起動処理を実行することでデータの整合性を維持できる。したがって、データを二重化する必要が無いため廉価構成でメモリ資源の有効活用を図りながら信頼性の維持向上が期待できる。 According to the present invention, the control unit executes a process of writing back the write data to the storage device based on the management information held in the nonvolatile storage area at the time of recovery from a power failure or a system crash during the data write. . In this way, the management information is held in the non-volatile storage area secured during data write, and in the event of an unexpected situation such as a power failure, the restart process that writes back the data held in the non-volatile storage area to the storage device By executing this, data consistency can be maintained. Therefore, since it is not necessary to duplicate data, it can be expected to maintain and improve reliability while effectively using memory resources with a low-cost configuration.
本発明において、前記制御部は、前記ライトデータを書き戻す際に、前記キャッシュ領域の単位領域毎に割り当てられたフラグが有効化されている前記キャッシュ領域のデータを前記不揮発性記憶領域の空き領域に保持すると共に、前記ストレージデバイスに対する前記キャッシュ領域のデータのライトが終了すると、前記フラグを無効化して前記不揮発性記憶領域に保持された前記ライトデータを削除して空きを増やすことを特徴とする。本発明によれば、キャッシュ領域の単位領域毎に割り当てられたフラグ制御によりライトデータの保持と削除を行うことで不揮発性記憶領域の効率的な容量管理が可能になる。また、不揮発性記憶領域をデータベースとして管理することでライトデータの高速な一時保持を実現できる。 In the present invention, when the control unit writes back the write data, the controller assigns the cache area data in which a flag assigned to each unit area of the cache area is valid to an empty area of the nonvolatile storage area. And when the writing of the data in the cache area to the storage device is completed, the flag is invalidated and the write data held in the nonvolatile storage area is deleted to increase the space. . According to the present invention, it is possible to efficiently manage the capacity of a nonvolatile storage area by holding and deleting write data by flag control assigned to each unit area of the cache area. Moreover, high-speed temporary storage of write data can be realized by managing the nonvolatile storage area as a database.
本発明において、前記制御部は、前記不揮発性記憶領域に空きが無い場合、前記管理情報に更に含まれるタイムスタンプを参照して古いデータを優先して前記ストレージデバイスに書き戻し、前記空きを増やすことを特徴とする。本発明によれば、不揮発性記憶領域に空きが無い場合、管理情報に含まれるタイムスタンプをサーチして古いデータを優先的にストレージデバイスに書き戻し、新しいデータが保持される空き領域を作るため、不揮発性記憶領域の効率的な容量管理と、高速な一時記憶を実現することができる。 In the present invention, when there is no free space in the non-volatile storage area, the control unit refers to a time stamp further included in the management information and writes back old data preferentially to the storage device to increase the free space. It is characterized by that. According to the present invention, when there is no free space in the non-volatile storage area, the time stamp included in the management information is searched, the old data is preferentially written back to the storage device, and a free area for holding new data is created. In addition, efficient capacity management of the nonvolatile storage area and high-speed temporary storage can be realized.
本発明において、前記制御部は、前記管理情報に更に含まれるチェックサム値に基づき前記不揮発性記憶領域から前記ライトデータを削除することを特徴とする。本発明によれば、不揮発性記憶領域に保持されたデータを管理情報に含まれるチェックサム値に基づきデータベース管理することにより、不揮発性記憶領域からのライトデータの効率的な削除が可能になる。 In the present invention, the control unit deletes the write data from the nonvolatile storage area based on a checksum value further included in the management information. According to the present invention, it is possible to efficiently delete write data from the nonvolatile storage area by managing the data held in the nonvolatile storage area based on the checksum value included in the management information.
本発明において、前記制御部は、キャッシュモードが書き込みスルーの場合、ファイル書き込み関数コールからファイル書き込み関数コール終了までの間に前記ファイル名を保持し、前記キャッシュモードがコピーバックの場合、ファイルオープン関数コールからファイルクローズ関数コールまでの間に前記ファイル名を保持することを特徴とする。本発明によれば、ファイル名のバックアップのタイミングをキャッシュモードによりコントロールすることで、現在データライト中のファイル名を確実に保持でき、データに不整合が発生している個所を局所化することができる。 In the present invention, the control unit holds the file name between the file write function call and the end of the file write function call when the cache mode is write-through, and the file open function when the cache mode is copy back. The file name is held between a call and a file close function call. According to the present invention, the file name backup timing is controlled by the cache mode, so that the file name currently being written can be reliably held, and the location where the data inconsistency occurs can be localized. it can.
本発明において、前記制御部は、前記データライト中における電源断、またはシステムクラッシュからの復旧時、前記不揮発性記憶領域を参照し、前記ライトデータが保持されている場合、前記保持されているデータを前記ストレージデバイスに書き戻すと共に、前記不揮発性記憶領域に保持されている前記ライトデータを削除し、前記ライトデータが保持されていない場合、前記管理情報に基づきクローズされていない前記ファイル名を取得し、前記取得したファイル名の修復処理を実行することを特徴とする。本発明によれば、現在データライト中のファイル名を保持することでデータに不整合が発生している箇所を局所化でき、電源遮断やシステムクラッシュ発生時に不揮発性記憶領域を参照することで該当ファイルの整合性の判定が可能になるため、再起動処理に要する時間の短縮が可能になる。 In the present invention, the control unit refers to the nonvolatile storage area at the time of recovery from a power failure or a system crash during the data write, and if the write data is retained, the retained data Is written back to the storage device, and the write data held in the non-volatile storage area is deleted, and if the write data is not held, the file name that is not closed is acquired based on the management information Then, the process for repairing the acquired file name is executed. According to the present invention, it is possible to localize a location where data inconsistency occurs by holding the file name currently being written, and refer to the non-volatile storage area when a power shutdown or system crash occurs. Since the file consistency can be determined, the time required for the restart process can be shortened.
本発明によれば、データを二重化すること無く、廉価構成でファイルシステムの信頼性向上をはかった、ファイル管理装置を提供することができる。 According to the present invention, it is possible to provide a file management apparatus that improves the reliability of a file system with a low-cost configuration without duplicating data.
以下、添付図面を参照して本発明を実施するための実施の形態(以下、単に本実施形態という)について詳細に説明する。 Hereinafter, an embodiment for carrying out the present invention (hereinafter simply referred to as the present embodiment) will be described in detail with reference to the accompanying drawings.
(実施形態の構成)
図1は、本実施形態に係るファイル管理装置の構成を示すブロック図である。図1に示されるように、本実施形態に係るファイル管理装置1は、PC(Personal Computer)等の上位装置10と、SD(Secure
Digital)メモリカードや、USB(Universal Serial Bus)メモリ等のストレージデバイス20から構成される。特徴的には、ストレージデバイス20の一部領域に不揮発性記憶領域30が割り当てられ、後述する管理情報のバックアップDB(Data Base)として管理され、使用されることにある。なお、この不揮発性記憶領域30については、ストレージデバイス20の一部領域に割り当てられることなく、例えば、フラッシメモリ等の不揮発性記憶装置を外付けして割り当ててもよい。
(Configuration of the embodiment)
FIG. 1 is a block diagram showing the configuration of the file management apparatus according to this embodiment. As shown in FIG. 1, a file management apparatus 1 according to this embodiment includes a
It comprises a
上位装置10は、図1に、不図示のCPU(Central Processing
Unit)により実行されるプログラムが機能展開されて示されているように、アプリケーションプログラム101(以下、単にアプリケーション101という)と、ファイルシステム102と、キャッシュライブラリ103と、バックアップマネージャ100と、ブロックデバイスドライバ104と、を含む。なお、ここでは、便宜上、上位レイヤから順にそのプログラム構造を列挙した。
The
As shown in FIG. 3, the program executed by the (Unit) is expanded and shown as an application program 101 (hereinafter simply referred to as application 101),
アプリケーション101は、ファイル操作を行うプログラムであり、ファイルシステム102は、例えば、Windows(登録商標)等で使用される背景技術の項目で説明したFATである。FATの場合、ストレージデバイス20をクラスタと称される論理単位に分割し、データサイズに応じて1以上のクラスタを割り当てることでファイルを構成し、このとき、あるファイルを構成しているのはどのクラスタか、また、クラスタの使用あるいは未使用といった情報を管理領域に記録して管理する。
The
キャッシュライブラリ103は、高速小容量の揮発性メモリからなるキャッシュ領域を有する。ファイルシステム102があるセクタに対してリード要求を発した場合、キャッシュライブラリ103は、セクタアドレスに該当するデータがキャッシュ領域に存在するか否かを判定し、キャッシュ領域に存在しなければストレージデバイス20から対象となる領域のデータをリードし、キュッシュ領域にそのデータを保持する。一方、キャッシュ領域に存在すれば、そのデータをファイルシステム102に引き渡す。
The
また、ファイルシステム102があるセクタにライト要求を発した場合、キャッシュライブラリ103は、キャッシュ領域にセクタアドレスに対応するデータがキャッシュ領域に存在するか否かを判定し、存在しなければストレージデバイス20から対象となる領域のデータをキャッシュ領域にリードし、該当のデータをキャッシュ領域にライトする。キャッシュ領域にデータが存在すれば、キャッシュ領域にデータを書き込んだ後、ファイルのクローズ処理またはライト処理の終了間近でキャッシュ領域のデータをストレージデバイス20に一括でライトする。
When a write request is issued to a certain sector of the
キャッシュライブラリ103は、ページング方式が採用される場合、キャッシュ領域のページ毎にフラグが割り当てられていることから、ライトされた領域のページのフラグをONし、フラグがONの領域のみデータをストレージデバイス20に該当データを一括でライトする。
When the paging method is adopted, the
なお、キャッシュライブラリ103がストレージデバイス20に対してファイル名を保持しておく期間は、キャッシュモードにより異なる。具体的に、キャッシュ領域へのデータの書き込みと同時にストレージデバイス20にも書き込む「ライトスルーモード」の場合は、ライト関数コール時からライト関数コール終了までの間だけ保持するものとし、空き時間にキャッシュ領域に書き込んだデータをストレージデバイス20に書き込む「コピーバックモード」の場合は、ファイルオープン関数実行時からファイルクローズ関数実行時迄とする。また、上記のようにストレージデバイス20を用いてファイル操作を行う場合、最終的には、ブロックデバイスドライバ104によるセクタアドレスによりファイル内の各データがリード・ライトされるものとする。
Note that the period during which the
バックアップマネージャ100は、ファイルシステム102とキャッシュライブラリ103と、ブロックデバイスドライバ104と協働して動作することにより、「オープンされたファイルのファイル名とライトデータとを少なくとも含む管理情報を保持する不揮発性記憶領域30を確保し、ファイルシステム102からデータライト要求を受信すると、不揮発性記憶領域30にその管理情報を保持するバックアップ処理と、データライト中における電源断、もしくはシステムクラッシュからの復旧時、不揮発性記憶領域30を参照し、不揮発性記憶領域30に保持されているライトデータをストレージデバイス20に書き戻す再起動処理と、を実行する制御部」として機能する制御中枢となる。
The
ここで、不揮発性記憶領域30にバックアップされる情報の中は、データライト中の対象となる「ファイル名」と「ライトデータ」の他に、データの不整合をチェックするためのデータの合計値を表す「チェックサム値」、「キャッシュ領域の書き込み開始セクタアドレス」、データライト時の時間情報である「タイムスタンプ」等が含まれる。また、不揮発性記憶領域30へのアクセスには、リレーショナルデータベース管理システムであるSQL(Structured Query Language)を採用することにより、効率的なデータ管理を実現する。なお、バックアップマネージャ100が管理対象とするファイルは、キャッシュライブラリ103でキャッシュ領域のフラグを制御する可能性があるファイル(ライト処理)であり、読み込み専用でオープンされたファイルに関しては予期しない電源断等が発生してもファイルシステム102の管理情報は破壊されないため管理対象外である。管理対象外になる理由は、管理対象を追記しないためである。
Here, the information backed up in the
(実施形態の動作)
以下、本実施形態に係るファイル管理装置1の動作を、図2、図3のフローチャートを参照しながら説明する。まず、図2を参照してバックアップ処理動作から説明する。
(Operation of the embodiment)
Hereinafter, the operation of the file management apparatus 1 according to the present embodiment will be described with reference to the flowcharts of FIGS. First, the backup processing operation will be described with reference to FIG.
まず、キャッシュライブラリ103は、ファイルシステム102からデータライト要求を受信すると、該当するキャッシュ領域にデータを書き込み、対応するフラグをON状態に設定する(ステップS101)。続いて、キャッシュライブラリ103は、フラグがONになったタイミングで、バックアップマネージャ100に対して不揮発性記憶領域30の空き情報の問い合わせを行ない、バックアップ領域の空き状態の取得を行う(ステップS102)。
First, when receiving a data write request from the
キャッシュライブラリ103は、バックアップマネージャ100から空き情報の応答を受信すると(ステップS103)、キャッシュ領域に「空きがある」と判定された場合(ステップS104“YES”)、フラグがONになっているキャッシュ領域のデータ削除を行い(ステップS108)、バックアップマネージャ100を介して不揮発性記憶領域30にバックアップデータの挿入を行い、保持する(ステップS109)。このとき保持されるデータは、データライト中の対象となる「ファイル名」と、「ライトデータ」と、「チェックサム値」と、「キャッシュ領域の書き込み開始セクタアドレス」と、「タイムスタンプ」を含む管理情報である。
When the
一方、ステップS104で「空きがない」と判定された場合(ステップS104“NO”)、キャッシュライブラリ103は、キュッシュ領域のデータをバックアップマネージャ100経由で不揮発性記憶領域30に保持したバックアップデータのフラッシュ処理を実行する(ステップS105)。続いて、バックアップマネージャ100は、不揮発性記憶領域30に保持されたライトデータを、管理情報に含まれるタイムスタンプに基づきサーチし、古いデータ順にストレージデバイス20にライトする処理を実行すると共に(ステップS106)、不揮発性記憶領域30の空き領域を増やすためにライト済みのデータを削除する処理を実行してステップS102のバックアップ領域(不揮発性記憶領域30)の空き状態取得処理に戻る(ステップS107)。
On the other hand, if it is determined in step S104 that there is no space (“NO” in step S104), the
ところで、バックアップマネージャ100によるバックアップデータの挿入処理後(ステップS109)、キャッシュライブラリ103は、キャッシュ領域に保持されたキャッシュデータのパージ処理を実行し(ステップS110)、キャッシュ領域のデータをストレージデバイス20に書き込む(ステップS111)そしてこの書き込みが終了したキャッシュ領域に対応するフラグをOFF状態に設定し、このフラグがOFFになったタイミングで、バックアップマネージャ100に対し不揮発性記憶領域30のバックアップデータの削除要求を行う(ステップS112)。
By the way, after the backup data insertion processing by the backup manager 100 (step S109), the
これを受けてバックアップマネージャ100は、管理情報を参照し、この管理情報に含まれるチェックサム値に基づき不揮発性記憶領域30に保持されたバックアップデータのDB検索を実行する(ステップS113)。ここで、DB検索の結果、ヒットしたデータがあれば(ステップS114“YES”)、該当バックアップデータを効率的に削除し(ステップS115)、なければ(ステップS114“NO”)、上記した一連のバックアップ処理を終了する。
In response to this, the
次に、図3のフローチャートを参照して本実施形態に係るファイル管理装置1の電源断やシステムクラッシュ発生時からの復帰時の再起動処理の動作について説明する。この再起動処理は、不揮発性記憶領域30にバックアップデータが残っている場合、データライト中に電源断やシステムクラッシュが発生した可能性があることから、復帰に必要な処理を実行し、ファイルシステム102とストレージデバイス20との間のデータの整合性を確保させるものである。
Next, the operation of the restart process when the file management apparatus 1 according to the present embodiment is powered off or returned from the occurrence of a system crash will be described with reference to the flowchart of FIG. In this restart process, if backup data remains in the
例えば、電源遮断後に電源が復旧し、OS(Operating System)等の上位レイヤにおいて復旧作業が実行され、再起動がなされると(ステップS201)、バックアップマネージャ100は、不揮発性記憶領域30にライトデータが残っているか否かの問い合わせを行ないその応答を取得する(ステップS202)。バックアップマネージャ100は、不揮発性記憶領域30にライトデータが残っている場合(ステップS203“YES”)、管理情報に含まれるタイムスタンプをサーチして古いデータ順にストレージデバイス20に書き込み、保持されてあるデータを全て書き戻すフラッシュ処理を実行する(ステップS204)。ここで不要になったライトデータは、逐次、不揮発性記憶領域30から削除してステップS202のデータ取得処理に戻る(ステップS205)。
For example, when the power is restored after the power is shut down, the restoration work is executed in an upper layer such as an OS (Operating System), and the restart is performed (step S201), the
一方、ステップS203でライトデータが残っていない場合(ステップS203“NO”)は、バックアップデータの復旧処理を終了する。次に、上位レイヤは、クローズされずに終了したファイル名を不揮発性記憶領域30から該当のライトデータを取得する(ステップS207)。上位レイヤは、該当ファイルの有無をチェックし(ステップS208)、該当ファイルがあれば、取得したライトデータにFATチェーン修復とクロスリンクチェックを実行してトレージデバイスに修復後のライトデータを書き戻すチェックファイル処理を実行する(ステップS209)。
On the other hand, if there is no write data remaining in step S203 (step S203 “NO”), the backup data recovery processing is terminated. Next, the upper layer acquires the corresponding write data from the
このように、上位レイヤでは、ストレージデバイス20へのデータの修復後、クローズされなかったファイル名を対象にファルチェインの不正およびクロスリンクを修復することで一層信頼性の高い再起動処理が可能になる。なお、ステップS208で該当ファイルが無ければ(ステップS208“NO”)、上記した一連の復帰後の再起動処理を終了する。
As described above, in the upper layer, after repairing data to the
(発明の効果)
以上説明のように本実施形態に係るファイル管理装置1によれば、制御部(バックアップマネージャ100)は、データライト中における電源断もしくはシステムクラッシュからの復旧時、そのライトデータを、不揮発性記憶領域30に保持された管理情報に基づきストレージデバイス20に書き戻す処理を実行することで、データの整合性を維持することができる。したがって、データを二重化する必要が無いため廉価構成でメモリ資源の有効活用を図りながら信頼性の維持向上が期待できる。
(Effect of the invention)
As described above, according to the file management apparatus 1 according to the present embodiment, the control unit (backup manager 100) stores the write data in the nonvolatile storage area at the time of recovery from power failure or system crash during data write. Data consistency can be maintained by executing a process of writing back to the
また、キャッシュ領域の単位領域毎に割り当てられたフラグ制御によりライトデータの保持と削除を行うことで不揮発性記憶領域30の効率的な容量管理が可能になる。また、不揮発性記憶領域30をデータベースとして管理することでライトデータの高速な一時保持を実現できる。更に、不揮発性記憶領域30に空きが無い場合、管理情報に更に含まれるタイムスタンプを参照して古いデータを優先してストレージデバイス20に書き戻し、空きを増やし、新しいデータが保持される空き領域を作るため、不揮発性記憶領域30の効率的な容量管理と、高速な一時記憶を実現することができる。
Also, efficient storage management of the
また、本実施形態に係るファイル管理装置1によれば、制御部(バックアップマネージャ100)は、管理情報に更に含まれるチェックサム値に基づき不揮発性記憶領域30からライトデータを削除する。このように、ファイルシステム102とストレージデバイス20のデータの不整合をチェックするチェックサム値に基づきデータベース管理することで、不揮発性記憶領域30からのライトデータの効率的な削除が可能になる。また、ファイル名のバックアップのタイミングをキャッシュモードによりコントロールすることで、現在、データライト中のファイル名を確実に保持でき、データに不整合が発生している個所を局所化することができる。
Further, according to the file management apparatus 1 according to the present embodiment, the control unit (backup manager 100) deletes the write data from the
また、本実施形態に係るファイル管理装置1によれば、現在データライト中のファイル名を保持することでデータに不整合が発生している箇所を局所化でき、電源遮断やシステムクラッシュ発生時に不揮発性記憶領域30を参照することで該当ファイルの整合性の判定が可能になるため、再起動処理に要する時間の短縮が可能になる。
Further, according to the file management apparatus 1 according to the present embodiment, the location where the data inconsistency has occurred can be localized by holding the name of the file currently being written, and non-volatile when a power shutdown or system crash occurs Since the consistency of the corresponding file can be determined by referring to the
なお、本実施形態に係るファイル管理装置1によれば、バックアップマネージャ100は、ファイルシステム102とは独立して存在するプログラムモジュールであるものとして説明したが、ファイルシステム102中に組み込まれていて同様の効果を得ることが出来る。また、キャッシュライブラリ103等、一時保持する機構を持つファイルシステム102であれば、FATファイルシステムに限らず適用することが可能である。また、ファイルシステムに限らず、機器内部で扱われる、保持すべき情報がある場合には本発明を適用することで高い信頼性を保証することができる。
In the file management apparatus 1 according to the present embodiment, the
また、ファイルデータを二重化する機構で、一方のストレージデバイスに対してバックアップデータを保持することにより、ストレージデバイス固有の問題が一方で発生した場合、他方で保持するデータを復元することにより整合性をとることが可能である。また、高速処理が可能なストレージデバイス20の一部領域を不揮発性記憶領域30として割り当てた場合、テンポラリデータを一時保持する領域として扱うことでより高速な処理が可能になる。
In addition, with the mechanism that duplicates file data, by holding backup data for one storage device, if a problem specific to the storage device occurs on one side, restore the data held on the other side to ensure consistency. It is possible to take. Further, when a partial area of the
以上説明のように本実施形態に係るファイル管理装置1によれば、内部で扱うライトデータをストレージデバイス20に保持する際、外付けにより、もしくはストレージデバイス20の一部領域に割り当てられた不揮発性記憶領域30に変更が必要な箇所のみを効率的に保持することにより、全領域を二重化する必要がないため、一時保存領域の節約とデータの信頼性を向上させることが可能となる。また、この一時保存領域をDB管理することで高速な一時保存を実現可能となる。また、ストレージデバイス20へのデータライト中に電源断やシステムクラッシュが発生した場合でも、不揮発性記憶領域30のバックアップデータを書き戻すことによりデータの整合性を維持することができる。更に、不揮発性記憶領域30に、現在書き込み中のファイル名を保持することにより、データに不整合が発生している箇所を局所化させることができ、かつ、該当ファイルの整合のみ管理情報のチェックを行うことにより、復帰処理の時間を短縮することが可能になる。
As described above, according to the file management apparatus 1 according to the present embodiment, when the write data handled internally is held in the
以上、本実施形態について説明したが、本発明の技術的範囲は上記実施形態に記載の範囲には限定されないことは言うまでもない。上記実施形態に、多様な変更又は改良を加えることが可能であることが当業者に明らかである。またそのような変更又は改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。 As mentioned above, although this embodiment was described, it cannot be overemphasized that the technical scope of this invention is not limited to the range as described in the said embodiment. It will be apparent to those skilled in the art that various modifications or improvements can be added to the above embodiment. Further, it is apparent from the scope of the claims that the embodiments added with such changes or improvements can be included in the technical scope of the present invention.
1・・ファイル管理装置、10・・上位装置(PC)、20・・ストレージデバイス、30・・不揮発性記憶領域(バックアップDB)、100・・バックアップマネージャ(制御部)、101・・アプリケーションプログラム、102・・ファイルシステム、103・・キャッシュライブラリ、104・・ブロックデバイスドライバ DESCRIPTION OF SYMBOLS 1 ... File management apparatus, 10 ... Host apparatus (PC), 20 ... Storage device, 30 ... Non-volatile storage area (backup DB), 100 ... Backup manager (control part), 101 ... Application program, 102-File system, 103-Cache library, 104-Block device driver
Claims (6)
書き込み可能な状態にオープンされたファイルのファイル名とライトデータとを含む管理情報を保持する不揮発性記憶領域を確保し、前記ファイルシステムからデータライト要求を受信すると、前記不揮発性記憶領域に前記管理情報を保持するバックアップ処理と、データライト中における電源断、もしくはシステムクラッシュからの復旧時、前記不揮発性記憶領域を参照し、前記不揮発性記憶領域に保持されている前記ライトデータを前記ストレージデバイスに書き戻す再起動処理と、を実行する制御部、を有することを特徴とするファイル管理装置。 A file management device that reads / writes data for each unit area via a file system having a cache area when performing file operations using a storage device,
A non-volatile storage area for holding management information including a file name and write data of a file opened in a writable state is secured, and when a data write request is received from the file system, the management is stored in the non-volatile storage area. Backup processing for holding information, and when recovering from power failure or system crash during data write, refer to the non-volatile storage area, and write data stored in the non-volatile storage area to the storage device A file management apparatus comprising: a control unit that executes a restart process for writing back.
前記ライトデータを書き戻す際に、前記キャッシュ領域の単位領域毎に割り当てられたフラグが有効化されている前記キャッシュ領域のデータを前記不揮発性記憶領域の空き領域に保持すると共に、前記ストレージデバイスに対する前記キャッシュ領域のデータのライトが終了すると、前記フラグを無効化して前記不揮発性記憶領域に保持された前記ライトデータを削除して空きを増やすことを特徴とする請求項1記載のファイル管理装置。 The controller is
When writing back the write data, the cache area data in which a flag assigned to each unit area of the cache area is enabled is held in a free area of the nonvolatile storage area, and the storage device 2. The file management apparatus according to claim 1, wherein when writing of data in the cache area ends, the flag is invalidated and the write data held in the nonvolatile storage area is deleted to increase the space.
前記不揮発性記憶領域に空きが無い場合、前記管理情報に更に含まれるタイムスタンプを参照して古いデータを優先して前記ストレージデバイスに書き戻し、前記空きを増やすことを特徴とする請求項2記載のファイル管理装置。 The controller is
3. The storage device according to claim 2, wherein when there is no free space in the non-volatile storage area, the time stamp further included in the management information is referred to, and old data is preferentially written back to the storage device to increase the free space. File management device.
前記管理情報に更に含まれるチェックサム値に基づき前記不揮発性記憶領域から前記ライトデータを削除することを特徴とする請求項2記載のファイル管理装置。 The controller is
3. The file management apparatus according to claim 2, wherein the write data is deleted from the nonvolatile storage area based on a checksum value further included in the management information.
キャッシュモードが書き込みスルーの場合、ファイル書き込み関数コールからファイル書き込み関数コール終了までの間に前記ファイル名を保持し、前記キャッシュモードがコピーバックの場合、ファイルオープン関数コールからファイルクローズ関数コールまでの間に前記ファイル名を保持することを特徴とする請求項1記載のファイル管理装置。 The controller is
If the cache mode is write-through, the file name is retained between the file write function call and the end of the file write function call. If the cache mode is copy back, the file open function call to the file close function call The file management apparatus according to claim 1, wherein the file name is held in a file name.
前記データライト中における電源断、またはシステムクラッシュからの復旧時、前記不揮発性記憶領域を参照し、前記ライトデータが保持されている場合、前記保持されているデータを前記ストレージデバイスに書き戻すと共に、前記不揮発性記憶領域に保持されている前記ライトデータを削除し、前記ライトデータが保持されていない場合、前記管理情報に基づきクローズされていない前記ファイル名を取得し、前記取得したファイル名の修復処理を実行することを特徴とする請求項1記載のファイル管理装置。 The controller is
When recovering from a power failure or system crash during the data write, referring to the non-volatile storage area, and if the write data is retained, write back the retained data to the storage device, When the write data held in the nonvolatile storage area is deleted, and the write data is not held, the file name that is not closed is acquired based on the management information, and the acquired file name is restored The file management apparatus according to claim 1, wherein the process is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011163334A JP5751488B2 (en) | 2011-07-26 | 2011-07-26 | File management device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011163334A JP5751488B2 (en) | 2011-07-26 | 2011-07-26 | File management device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013025773A true JP2013025773A (en) | 2013-02-04 |
JP5751488B2 JP5751488B2 (en) | 2015-07-22 |
Family
ID=47784001
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011163334A Active JP5751488B2 (en) | 2011-07-26 | 2011-07-26 | File management device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5751488B2 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10143406A (en) * | 1996-11-14 | 1998-05-29 | Hitachi Ltd | File managing device |
JP2000305826A (en) * | 1999-04-20 | 2000-11-02 | Fujitsu Ltd | Multiwindow information processor and operating system |
JP2001034535A (en) * | 1999-07-21 | 2001-02-09 | Nec Eng Ltd | Cache memory backup system |
US20040078623A1 (en) * | 2002-10-17 | 2004-04-22 | Spinnaker Networks, Inc. | Method and system for providing persistent storage of user data |
JP2004272608A (en) * | 2003-03-10 | 2004-09-30 | Canon Inc | Electronic file system and electronic filing device |
JP2009075759A (en) * | 2007-09-19 | 2009-04-09 | Hitachi Ltd | Storage device, and method for managing data in storage device |
WO2010016115A1 (en) * | 2008-08-06 | 2010-02-11 | 富士通株式会社 | Disk array device control unit, data transfer device, and power recovery processing method |
-
2011
- 2011-07-26 JP JP2011163334A patent/JP5751488B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10143406A (en) * | 1996-11-14 | 1998-05-29 | Hitachi Ltd | File managing device |
JP2000305826A (en) * | 1999-04-20 | 2000-11-02 | Fujitsu Ltd | Multiwindow information processor and operating system |
JP2001034535A (en) * | 1999-07-21 | 2001-02-09 | Nec Eng Ltd | Cache memory backup system |
US20040078623A1 (en) * | 2002-10-17 | 2004-04-22 | Spinnaker Networks, Inc. | Method and system for providing persistent storage of user data |
JP2004272608A (en) * | 2003-03-10 | 2004-09-30 | Canon Inc | Electronic file system and electronic filing device |
JP2009075759A (en) * | 2007-09-19 | 2009-04-09 | Hitachi Ltd | Storage device, and method for managing data in storage device |
WO2010016115A1 (en) * | 2008-08-06 | 2010-02-11 | 富士通株式会社 | Disk array device control unit, data transfer device, and power recovery processing method |
Non-Patent Citations (2)
Title |
---|
CSND200401440009; 高野 了成: 'カーネル2.6対応 Linuxユーザのためのファイルシステム大百科' SoftwareDesign No.161, 20040318, pp.157-167, 株式会社技術評論社 * |
JPN6015004539; 高野 了成: 'カーネル2.6対応 Linuxユーザのためのファイルシステム大百科' SoftwareDesign No.161, 20040318, pp.157-167, 株式会社技術評論社 * |
Also Published As
Publication number | Publication date |
---|---|
JP5751488B2 (en) | 2015-07-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10289545B2 (en) | Hybrid checkpointed memory | |
JP6556911B2 (en) | Method and apparatus for performing an annotated atomic write operation | |
EP3724764B1 (en) | Write-ahead style logging in a persistent memory device | |
US10176190B2 (en) | Data integrity and loss resistance in high performance and high capacity storage deduplication | |
US20190251067A1 (en) | Snapshots for a non-volatile device | |
US8195891B2 (en) | Techniques to perform power fail-safe caching without atomic metadata | |
KR101567134B1 (en) | Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache | |
US9778860B2 (en) | Re-TRIM of free space within VHDX | |
KR102262409B1 (en) | NVM-based file system and method for data update using the same | |
US11030092B2 (en) | Access request processing method and apparatus, and computer system | |
KR20150053720A (en) | Swat command and appication programming interface for automic swap and trim of lbas | |
CN112035294B (en) | Security log file system and implementation method and medium thereof | |
US9335941B1 (en) | Crash consistency | |
KR100866513B1 (en) | Data Process Method Using Journaling File System Based on Flash Memory | |
KR20140083338A (en) | Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache | |
JP5751488B2 (en) | File management device | |
KR101966399B1 (en) | Device and method on file system journaling using atomic operation | |
KR20160146506A (en) | Method for accessing file, computer, and executable software product stored on computer-readable medium | |
TWI850721B (en) | In-memory journal | |
US11748259B2 (en) | System and method to conserve device lifetime for snapshot generation | |
TW201901417A (en) | Method for processing trim command in solid state disk | |
KR20180132314A (en) | A method and an apparatus for supporting transactions in the flash cache |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140611 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150116 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150210 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150402 |
|
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: 20150424 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150507 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5751488 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |