[go: up one dir, main page]

JP2007323377A - Recording apparatus, method for writing management data and method for repairing management data - Google Patents

Recording apparatus, method for writing management data and method for repairing management data Download PDF

Info

Publication number
JP2007323377A
JP2007323377A JP2006153065A JP2006153065A JP2007323377A JP 2007323377 A JP2007323377 A JP 2007323377A JP 2006153065 A JP2006153065 A JP 2006153065A JP 2006153065 A JP2006153065 A JP 2006153065A JP 2007323377 A JP2007323377 A JP 2007323377A
Authority
JP
Japan
Prior art keywords
management data
area
data
recording
recording medium
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
JP2006153065A
Other languages
Japanese (ja)
Inventor
Junji Inoue
淳次 井上
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2006153065A priority Critical patent/JP2007323377A/en
Publication of JP2007323377A publication Critical patent/JP2007323377A/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 prevent increase in overhead in doubly recording management data in a recording medium and to suitably repair the management data when power supply is shut down. <P>SOLUTION: A request contents discrimination part 202 discriminates whether data to be written in an HDD 100 are management data or file data on the basis of information on partition. When a request is concerned with the management data, a double writing control part 204 writes the management data in a master management data area of the HDD 100 and then writes the management data in a slave management data area of the HDD 100. In a driver level, double writing processing is achieved. When the recording apparatus is started after power shut down, an area in which data are finally written when power supply is shut down is discriminated on the basis of final written LBA data in the HDD 100 and the master and slave management data are repaired on the basis of the discriminated result. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、ファイルシステム(FileSystem)に基づきファイルデータをドライバにより制御されるHDD(Hard Disk Drive)などの記録媒体に記録する記録装置、それに適用される管理データの書き込み方法および修復方法に関する。   The present invention relates to a recording apparatus that records file data on a recording medium such as an HDD (Hard Disk Drive) controlled by a driver based on a file system, and a management data writing method and a restoration method applied to the recording apparatus.

詳しくは、この発明は、ドライバまたは記録媒体が、管理データの書き込み時には、記録媒体の各領域の利用用途情報に基づいて管理データであることを認識し、この管理データを正副管理データ領域の双方に書き込む構成とすることによって、管理データの二重書き込みによってオーバーヘッドが大きくなることを防止するようにした記録装置等に係るものである。   Specifically, the present invention recognizes that the driver or the recording medium is management data based on the usage information of each area of the recording medium when the management data is written, and the management data is transferred to both the primary and secondary management data areas. This configuration relates to a recording apparatus or the like that prevents an increase in overhead due to double writing of management data.

また、この発明は、記録媒体にファイルデータおよび正副管理データを記録する他に、最終書き込み位置のデータを記録し、データの書き込み中に電源の遮断があったとき、記録媒体の各領域の利用用途情報および最終書き込み位置のデータに基づいて記録媒体のいずれの領域への書き込み中に電源の遮断があったかを判断し、この判断結果に応じて正副管理データ領域に記録されている管理データの修復を行う構成とすることによって、管理データの修復を適切に行い得るようにした記録装置等に係るものである。   In addition to recording file data and primary / secondary management data on the recording medium, the present invention records data at the final writing position, and uses each area of the recording medium when the power is shut off during data writing. Based on the usage information and the data at the last writing position, it is determined which area of the recording medium was powered off, and the management data recorded in the primary and secondary management data area is restored according to the determination result Therefore, the present invention relates to a recording apparatus and the like that can appropriately repair management data.

HDDを搭載するシステムにおいては、近年、映像のデジタル録画/再生のニーズが高い。このような映像のデジタル録画/再生(ストリーム録画/再生)を行うには、高いスループットが要求される。高画質のストリームを1つ扱うにはシステムとして3MB/secのスループットが必要となる。ファイルシステム、HDDへはそれよりも高いスループットが要求される。さらに、複数ストリームの録画、再生を行う場合にはさらに厳しいスループットが要求される。一般的に、録画、再生のストリーム数が増加すると、スループットは指数関数的に減少する傾向にある。   In recent years, there is a high need for digital video recording / playback in a system equipped with an HDD. In order to perform such digital video recording / playback (stream recording / playback), high throughput is required. To handle one high-quality stream, the system requires a throughput of 3 MB / sec. Higher throughput is required for file systems and HDDs. Further, when recording and reproducing a plurality of streams, a stricter throughput is required. Generally, as the number of recording and playback streams increases, the throughput tends to decrease exponentially.

ファイルシステム、HDDを搭載した家電機器が爆発的に普及し、外的(停電など)、内的(温度異常など)からなる障害発生による電源遮断後の機器の早期回復のニーズがPCより高い。また、修復時における処理により記録済みコンテンツが破棄されることは望まれていない。   Household appliances equipped with file systems and HDDs have exploded in popularity, and the need for early recovery of equipment after power interruption due to external (such as power failure) and internal (such as abnormal temperature) failures is higher than PCs. Further, it is not desired that the recorded content is discarded by the process at the time of restoration.

ここで、ファイルシステム、HDDに対する要求として、(1)複数ストリームを扱える高いスループット性能、(2)高速な障害発生からの復帰/修復、(3)障害からの記録済みコンテンツの保護、がある。   Here, there are (1) high throughput performance capable of handling a plurality of streams, (2) recovery / recovery from a high-speed failure occurrence, and (3) protection of recorded content from a failure as requirements for the file system and HDD.

ファイルシステムの復旧の高速化を目指した技術として、代表的なものは、ジャーナリングファイルシステム(JournalingFileSystem)である。ジャーナリングファイルシステムの主な機能として、ライト(Write)トランザクションにおけるログの生成と記録がある。   A typical technology aimed at speeding up file system recovery is the journaling file system. The main function of the journaling file system is the generation and recording of logs in write transactions.

ログの内容はライトトランザクションで更新される管理データの変更履歴である。ファイルシステムによっては、管理データの変更内容までを履歴として残す。ジャーナリングファイルシステムは、ファイルシステムの復旧、修復の際にこのログを参照して障害が発生している可能性のある管理データを判別し、その管理データの内容をチェックして、不整合がある場合は、関連する管理データの別の内容を参照し、不整合がある管理データを修正してファイルシステムの整合性を保つことを行う。   The content of the log is a change history of management data updated by a write transaction. Depending on the file system, the contents of the management data change are left as a history. The journaling file system refers to this log when recovering and repairing the file system, determines the management data that may have failed, checks the contents of the management data, and there is an inconsistency In this case, another content of the related management data is referred to, the management data having inconsistency is corrected, and the consistency of the file system is maintained.

上述のログはログファイルとして記録媒体に記録される。ここで、記録媒体は管理データが記録される記録媒体上もしくは別記録媒体でもよい.ジャーナリングファイルシステムが記録媒体に書き出すデータは、管理データ、ファイル(File)データ、およびログデータである。   The above log is recorded on a recording medium as a log file. Here, the recording medium may be a recording medium on which management data is recorded or another recording medium. Data that the journaling file system writes to the recording medium is management data, file data, and log data.

この3つのデータは記録媒体への反映順序(書出し順序)を正確に守る必要がある。順序としては、ファイルデータ、ログデータを記録媒体へ反映させた後に、管理データを反映させる必要がある。さもなければ、「ファイルデータが古い内容のまま正しいファイルとして扱われてしまう」、「修復処理の肝となるログと管理データの内容の乖離が大きくなり修復に時間がかかる」、「ファイルシステムとしての整合性を保つために正常なファイルすら破棄されてしまう」、という弊害が生じる。   It is necessary to accurately observe the reflection order (writing order) of these three data on the recording medium. As an order, it is necessary to reflect management data after reflecting file data and log data on a recording medium. Otherwise, “the file data will be treated as a correct file with old contents”, “the gap between the log and the management data, which is the liver of the restoration process, will increase, and the restoration will take a long time”, “as a file system In order to maintain consistency, even normal files are discarded. ”

さらに、障害発生時にログファイルが正常な状態であるという保障はなく、ログファイル自体に障害を生じている場合も考えられる。この場合の修復作業はログを用いずに管理データの内容を全てチェックして整合性を保つ必要があり、復旧には記録されている管理データの内容により時間が増加する傾向がある。   Furthermore, there is no guarantee that the log file is in a normal state when a failure occurs, and there may be a case where a failure has occurred in the log file itself. The repair work in this case needs to check the contents of the management data without using a log to maintain consistency, and the recovery tends to increase time depending on the contents of the management data recorded.

このように、ファイルシステム、HDDに対する、(2)高速な障害発生からの復帰/修復、(3)障害からの記録済みコンテンツの保護、の要求を満たすために、ジャーナリングファイルシステムを使用するには、ログを生成、記録(反映順序)するという処理を行わなくてはならないこと、ログファイルが正常であること等の要件をみたさなければ、要求を満たせないという問題がある。   Thus, in order to use the journaling file system to satisfy the requirements of (2) recovery / recovery from high-speed failure occurrence and (3) protection of recorded content from failure for the file system and HDD. However, there is a problem that the request cannot be satisfied unless requirements such as the process of generating and recording the log (reflection order) must be performed and the log file is normal.

ファイルシステムを使用するシステムにおいて、記録媒体として最も利用されているのがHDDである。このHDDは、HDDドライバにより制御されるホストコントローラ(HostController)に接続されている。   In a system using a file system, the HDD is most used as a recording medium. This HDD is connected to a host controller (HostController) controlled by the HDD driver.

これらの各機能ブロックの集合を総称してHDDユニット(HDDUnit)とした場合、近年このHDDユニットは大容量化と高速化を目的とした技術向上が行われている。大容量化に関しては現在主流の500GBから数年後には1TBという容量が見込まれており、ファイルシステムが管理する対象であるブロック数が増加する。   When the set of these functional blocks is collectively referred to as an HDD unit (HDD Unit), in recent years, the HDD unit has been improved in technology for the purpose of increasing the capacity and speed. Regarding the increase in capacity, a capacity of 1 TB is expected several years after the current mainstream 500 GB, and the number of blocks to be managed by the file system increases.

高速化技術に関してはHDDユニットへの読み書き要求を各ブロック内でバッファ/キャッシュし、HDD内部でヘッドのシークを最小に抑える、読み書き要求の発行や応答をまとめることにより効率よく読み書きを行う、などの高速化目指した取組みがなされておいる。   For high-speed technology, read / write requests to the HDD unit are buffered / cached in each block, the head seek is minimized within the HDD, read / write requests are issued and responses are efficiently read / written, etc. Efforts aimed at speeding up have been made.

これらは、リオーダリング、NCQ(NativeCommand Queuing)、TCQ(Tagged Command Queuing)、クラスタリングといった技術として一般化されている。これらの技術の肝となるのが要求をキューイング(Queuing)し、読み書きのために最適化して次の機能ブロックに対して要求を発行するというものである。これに従いHDDユニットが持つバッファ/キャッシュサイズも増加傾向にある。   These are generalized as techniques such as reordering, NCQ (Native Command Queuing), TCQ (Tagged Command Queuing), and clustering. The heart of these technologies is queuing requests, optimizing for reading and writing, and issuing requests to the next functional block. Accordingly, the buffer / cache size of the HDD unit is also increasing.

要求が各機能ブロックでキューイングされることにより、アプリケーション(Application)からファイルシステム、HDDユニットへの読み書き要求を行っても、記録媒体へ読み書きが終了するまでにタイムラグが生じる。バッファ/キャッシュサイズの増加にともないキューイングされる要求も増加し、タイムラグも増加する。   By queuing the request in each functional block, even if a read / write request from the application (Application) to the file system or HDD unit is made, a time lag occurs until the read / write to the recording medium is completed. As the buffer / cache size increases, the queued requests increase and the time lag also increases.

上述したように、HDDユニットではキューイングにより読み書き要求の順序の入れ替え、集約が行われ、ジャーナリングファイルシステムが望む要件が満たされない状況が発生する。さらに、ログファイルが使用できない場合のファイルシステムの復旧/修復に関しても、HDDの容量が増え管理する対象が増加にするために修復にかかる時間が増加するという問題がある。   As described above, in the HDD unit, the order of read / write requests is changed and aggregated by queuing, and a situation in which the requirements desired by the journaling file system are not satisfied occurs. Further, with respect to file system recovery / restoration when log files cannot be used, there is a problem that the time required for restoration increases because the capacity of the HDD increases and the number of objects to be managed increases.

この問題への対処方法としては、HDDユニットに対して強制的にバッファ/キャッシュされているデータを記録メディアへ同期させることが考えられる。しかし、これはキューイングを使用しないと等価であり、HDDの高速化を犠牲にするという問題ある。   A possible solution to this problem is to synchronize the data that is forcibly buffered / cached with respect to the HDD unit to the recording medium. However, this is equivalent to not using queuing, and there is a problem that the speeding up of the HDD is sacrificed.

上述したように、ジャーナリングファイルシステムが目的とする、(2)高速な障害発生からの復帰/修復、(3)障害からの記録済みコンテンツの保護と、HDDが目的とする(1)複数ストリームを扱える高いスループット性能とは技術的に相反しており、双方を組みこむ機器においてはトレードオフの関係となっている。   As described above, (2) recovery / recovery from high-speed failure occurrence, (3) protection of recorded content from failure, and (1) multiple streams aimed by the journaling file system. It is technically contradictory to the high throughput performance that can be handled, and there is a trade-off relationship between devices that incorporate both.

さらに、上述したようにHDDの高速化が行われて行く中で、ファイルシステム、HDDドライバの処理(CPU処理)時間が全体に対するスループットへの影響が大きくなってきている.特に、家電においては組込まれるCPUのメインストリームはPCより格段に性能(周波数、キャッシュ)が劣り、その影響が大きい。PCや旧来のHDDを使用している分にはHDDへのデータの読み書き(IO処理)による待ち時間(IO待ち時間)中に次のCPU処理が収まっているが、非力なCPUと高速なHDDの組み合わせでは、IO待ち時間が短くCPU処理が長くなる傾向にある。特に、複数ストリームを扱う機器では重大な問題となる。   In addition, as the speed of HDDs is increasing as described above, the processing time (CPU processing) time of the file system and HDD driver is greatly affecting the overall throughput. Particularly in home appliances, the mainstream of a CPU incorporated therein is significantly inferior in performance (frequency and cache) to that of a PC, and is greatly affected. The next CPU processing is accommodated during the waiting time (IO waiting time) by reading and writing data to the HDD (IO processing) as long as the PC or the old HDD is used, but the powerless CPU and the high-speed HDD In this combination, the IO waiting time is short and the CPU processing tends to be long. In particular, it becomes a serious problem in a device that handles a plurality of streams.

特許文献1には、ファイルの実データを記録した場所を示す情報(管理データ)を正規情報および予備情報として記録媒体に二重に記録しておき、正規情報に障害が発生して読めなくなった場合に、予備情報を用いて正規情報の復旧を可能とすることが記載されている。
特開2003−6017号公報
In Patent Document 1, information (management data) indicating the location where the actual data of a file is recorded is recorded twice on a recording medium as regular information and preliminary information, and the regular information becomes faulty and cannot be read. In this case, it is described that the regular information can be restored using the preliminary information.
JP 2003-6017 A

上述した特許文献1のようにファイルシステムの管理データを記録媒体に二重に記録しておくものでは、上述したジャーナリングファイルシステムのようにログデータを用いてファイルシステムを復旧する場合に生じる問題はなくなる。   In the case where the file system management data is recorded twice on the recording medium as in Patent Document 1 described above, the problem that occurs when the file system is restored using log data as in the journaling file system described above is Disappear.

しかし、記録媒体にファイルデータ(実データ)を記録する都度、それに対応して管理データを当該記録媒体に記録する必要があり、この二重書き込みの処理がアプリケーションレベルで行われるものであり、オーバーヘッドが大きくなるという問題がある。   However, each time file data (actual data) is recorded on a recording medium, management data needs to be recorded on the recording medium correspondingly, and this double writing processing is performed at the application level, and overhead There is a problem that becomes larger.

また、この特許文献1に記載される技術では、正規情報が読めなくなった場合に、予備情報に基づいて正規情報を復旧するものであるが、正規情報が読める場合であっても、その内容が正しい状態にあるとは限らない。   Further, in the technique described in Patent Document 1, when the regular information becomes unreadable, the regular information is restored based on the preliminary information. It is not always in the correct state.

この発明の目的は、ファイルシステムの管理データを記録媒体に二重に記録する際にオーバーヘッドが大きくなることを防止することにある。また、この発明の目的は、記録媒体に管理データを二重に記録するものにあって電源遮断時における管理データの修復を適切に行うことにある。   An object of the present invention is to prevent an increase in overhead when file system management data is recorded twice on a recording medium. Another object of the present invention is to record management data twice on a recording medium, and to appropriately repair the management data when the power is turned off.

この発明の概念は、
ファイルシステムに基づきファイルデータをドライバにより制御される記録媒体に記録する記録装置であって、
上記記録媒体は、少なくとも上記ファイルデータを記録するファイルデータ領域と、上記ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域を有し、
上記ドライバまたは上記記録媒体は、上記記録媒体の各領域の利用用途情報が格納された情報格納部を有し、
上記ドライバまたは上記記録媒体は、上記管理データの書き込み時には、上記情報格納部に格納されている利用用途情報に基づいて管理データの書き込みであることを認識し、該管理データを上記記録媒体の正管理データ領域および副管理データ領域の双方に書き込む
ことを特徴とする記録装置にある。
The concept of this invention is
A recording device for recording file data on a recording medium controlled by a driver based on a file system,
The recording medium has at least a file data area for recording the file data, a primary management data area and a secondary management data area for recording management data of the file system,
The driver or the recording medium has an information storage unit in which usage information of each area of the recording medium is stored.
When the management data is written, the driver or the recording medium recognizes that the management data is written based on the usage information stored in the information storage unit, and the management data is stored on the recording medium. The recording apparatus is characterized by writing to both the management data area and the sub management data area.

この発明においては、ファイルシステムに基づいて、ファイルデータが記録媒体に記録される。この記録媒体はドライバにより制御される。記録媒体は、少なくともファイルデータを記録するファイルデータ領域と、ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域を有している。   In the present invention, file data is recorded on a recording medium based on the file system. This recording medium is controlled by a driver. The recording medium has at least a file data area for recording file data, and a primary management data area and a secondary management data area for recording file system management data, respectively.

ファイルシステムにより記録媒体のファイルデータ領域にファイルデータの記録が行われるとき、それに関連して記録媒体の正、副管理データ領域に管理データの記録が行われる。   When file data is recorded in the file data area of the recording medium by the file system, management data is recorded in the primary and secondary management data areas of the recording medium in association therewith.

この場合、ドライバまたは記録媒体では、記録媒体の所定領域への所定データの書き込みが指示されるとき、記録媒体の各領域の利用用途情報に基づいて、つまり所定領域がファイルデータ領域であるか管理データ領域であるかにより、その所定データがファイルデータであるか管理データであるかが認識される。   In this case, when the driver or the recording medium is instructed to write the predetermined data to the predetermined area of the recording medium, the driver or the recording medium manages whether the predetermined area is a file data area based on the usage information of each area of the recording medium. Whether the predetermined data is file data or management data is recognized depending on whether it is a data area.

そして、ドライバまたは記録媒体の処理により、記録すべき所定データが管理データであるときは、当該所定データが所定領域(正管理データ領域)に記録されると共に、副管理データ領域にも記録される。例えば、副管理データ領域の書き込み位置(例えば記録媒体がHDDであるときはLBA)は、正管理データ領域の書き込み位置に予め設定されているオフセット値を加えることで得られる。   When the predetermined data to be recorded is management data by the processing of the driver or the recording medium, the predetermined data is recorded in the predetermined area (primary management data area) and also in the sub management data area. . For example, the write position of the sub management data area (for example, LBA when the recording medium is an HDD) can be obtained by adding a preset offset value to the write position of the primary management data area.

このように、ドライバまたは記録媒体が、管理データの書き込み時には、記録媒体の各領域の利用用途情報に基づいて管理データであることを認識し、この管理データを正副管理データ領域の双方に書き込む構成であり、その二重書き込みのための処理をドライバレベルあるいは記録媒体レベルで行うことから、上位階層の処理で行うものに比べてオーバーヘッドを小さくできる。   As described above, when writing the management data, the driver or the recording medium recognizes that it is management data based on the usage information of each area of the recording medium, and writes this management data to both the primary and secondary management data areas Since the processing for the double writing is performed at the driver level or the recording medium level, the overhead can be reduced as compared with the processing performed in the upper layer processing.

また、この発明の概念は、   The concept of the present invention is

ファイルシステムに基づきファイルデータを記録媒体に記録する記録装置であって、   A recording device for recording file data on a recording medium based on a file system,

上記記録媒体は、少なくとも上記ファイルデータを記録するファイルデータ領域と、上記ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域と、最終書き込み位置のデータを記録する最終位置データ記録領域とを有し、   The recording medium includes at least a file data area for recording the file data, a primary management data area and a secondary management data area for recording management data of the file system, and a final position data record for recording data of a final writing position, respectively. And having an area

データの書き込み中に電源の遮断があったとき、上記記録媒体の各領域の利用用途情報および上記最終位置データ記録領域に記録されている最終書き込み位置のデータに基づいて上記記録媒体のいずれの領域への書き込み中に上記電源の遮断があったかを判断し、該判断結果に応じて上記正管理データ領域および上記副管理データ領域に記録されている管理データの修復を行う管理データ修復部を備える   Any area of the recording medium based on the usage information of each area of the recording medium and the data of the final writing position recorded in the final position data recording area when the power is interrupted during data writing A management data restoration unit that judges whether or not the power supply has been shut down during writing to the management data and restores the management data recorded in the primary management data area and the secondary management data area according to the judgment result

ことを特徴とする記録装置にある。   The recording apparatus is characterized by the above.

この発明においては、ファイルシステムに基づいて、ファイルデータが記録媒体に記録される。この記録媒体はドライバにより制御される。記録媒体は、少なくともファイルデータを記録するファイルデータ領域と、ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域と、最終書き込み位置のデータを記録する最終位置データ記録領域を有している。   In the present invention, file data is recorded on a recording medium based on the file system. This recording medium is controlled by a driver. The recording medium has at least a file data area for recording file data, a primary management data area and a secondary management data area for recording file system management data, respectively, and a final position data recording area for recording data of the final writing position. is doing.

データの書き込み中に電源の遮断があったとき、記録媒体の各領域の利用用途情報および最終書き込み位置のデータに基づいて、記録媒体のいずれの領域への書き込み時に電源の遮断があったかが判断される。そして、その判断結果に応じて正副管理データ領域に記録されている管理データの修復が行われる。   When the power is shut down during data writing, it is determined which area of the recording medium was powered off based on the usage information of each area of the recording medium and the data of the last writing position. The Then, the management data recorded in the primary / secondary management data area is repaired according to the determination result.

例えば、正管理データ領域への書き込み中に上記電源の遮断があったときは、副管理データ領域の内容が正管理データ領域にコピーされることで修復が行われる。また例えば、副管理データ領域への書き込み時に上記電源の遮断があったときは、正管理データ領域の内容が副管理データ領域にコピーされることで修復が行われる。   For example, when the power supply is interrupted during writing to the primary management data area, the contents of the secondary management data area are copied to the primary management data area to be repaired. Further, for example, when the power is cut off when writing to the sub management data area, the contents of the main management data area are copied to the sub management data area, and the restoration is performed.

このように、記録媒体のいずれの領域への書き込み時に電源の遮断があったかの判断結果に応じて正副管理データ領域に記録されている管理データの修復が行われることで、正副管理データを適切に修復でき、従ってファイルシステムの復旧を適切に行い得る。   As described above, the management data recorded in the primary / secondary management data area is repaired according to the determination result as to which power supply was interrupted when writing to which area of the recording medium, so that the primary / secondary management data is appropriately stored. The file system can be restored properly.

この発明によれば、ドライバまたは記録媒体が、管理データの書き込み時には、記録媒体の各領域の利用用途情報に基づいて管理データであることを認識し、この管理データを正副管理データ領域の双方に書き込む構成とするものであり、管理データの二重書き込みによってオーバーヘッドが大きくなることを防止できる。   According to the present invention, when writing the management data, the driver or the recording medium recognizes that it is management data based on the usage information of each area of the recording medium, and this management data is transferred to both the primary and secondary management data areas. The configuration is such that the overhead is increased due to double writing of management data.

また、この発明によれば、記録媒体にファイルデータおよび正副管理データを記録する他に、最終書き込み位置のデータを記録し、電源の遮断があったとき、記録媒体の各領域の利用用途情報および最終書き込み位置のデータに基づいて記録媒体のいずれの領域への書き込み時に電源の遮断があったかを判断し、この判断結果に応じて正副管理データ領域に記録されている管理データの修復を行うものであり、管理データの修復を適切に行うことができる。   Further, according to the present invention, in addition to recording file data and primary / secondary management data on the recording medium, the data at the final writing position is recorded, and when the power is cut off, the usage information on each area of the recording medium and Based on the data at the final writing position, it is determined in which area of the recording medium the power was cut off, and the management data recorded in the primary / secondary management data area is restored according to this determination result. Yes, management data can be repaired appropriately.

以下、図面を参照しながら、この発明の実施の形態について説明する。図1は、実施の形態としての記録装置10の構成を示している。この記録装置10は、ソフトウェア(SW)部分と、ハードウェア(HW)部分とで構成されている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a configuration of a recording apparatus 10 as an embodiment. The recording apparatus 10 includes a software (SW) portion and a hardware (HW) portion.

SW部分は、アプリケーション(Application)106と、システムコールI/F(SystemCall I/F)107と、ファイルシステム(FileSystem)108と、ブロックナンバー(BlockNo)/LBA(Logical Block Addressing)変換処理部110と、HDDドライバ(Driver)111からなっている。   The SW part includes an application 106, a system call I / F 107, a file system 108, a block number (BlockNo) / LBA (Logical Block Addressing) conversion processing unit 110, , And an HDD driver 111.

HW部分は、ホストコントローラ114と、記録媒体を構成するHDD100とからなっている。上述したHDDドライバ111は、ホストコントローラ114を介して、HDD100を制御する。HDD100は、データが保存されるディスクメディア104を有し、このディスクメディア104にファイルデータ101、管理テーブル102、パーティションテーブル(Partition Table)103を記録すると共に、不揮発なメモリ空間上に最終書込みLBAデータ105を記録する。   The HW portion includes a host controller 114 and an HDD 100 that constitutes a recording medium. The HDD driver 111 described above controls the HDD 100 via the host controller 114. The HDD 100 has a disk medium 104 in which data is stored. The file data 101, the management table 102, and the partition table (Partition Table) 103 are recorded on the disk medium 104, and the last written LBA data is stored in a nonvolatile memory space. 105 is recorded.

HDD100に記録されている上述のデータは電源が遮断されても永続的に保たれている。また、管理テーブル102には、管理データ109がデータの種類毎にまとめられて複数格納されている。管理データ109のデータの種類には、例えばフリーブロックの管理テーブル、ファイル名、格納先の管理テーブル、ファイルシステムのバージョンナンバー等がある。
本実施の形態では、管理テーブル102の2重書き込みを行うが、説明上、それぞれを正および副として識別する。
The above-mentioned data recorded in the HDD 100 is kept permanently even when the power is turned off. In the management table 102, a plurality of management data 109 are stored for each data type. The data type of the management data 109 includes, for example, a free block management table, a file name, a storage destination management table, and a file system version number.
In this embodiment, the management table 102 is written twice, but for the sake of explanation, each is identified as primary and secondary.

図2は、HDD100のパーティション構造を示している。パーティションは最小3つとする。1つは管理テーブル102の正の格納先とし、1つは管理テーブル102の副の格納先とし、1つはファイルの内容であるファイルデータ101の格納先とし、正管理データ領域301、副管理データ領域302、ファイルデータ領域303とする。正管理データ領域301と副管理データ領域と302のパーティションサイズは同じである。   FIG. 2 shows the partition structure of the HDD 100. There are a minimum of three partitions. One is a positive storage destination of the management table 102, one is a secondary storage destination of the management table 102, and one is a storage destination of the file data 101 that is the contents of the file, the primary management data area 301, and the secondary management A data area 302 and a file data area 303 are assumed. The primary management data area 301 and the secondary management data area 302 have the same partition size.

図2では、パーティションを4つとしLBAの中腹に正管理データ領域301と副管理データ領域302を設定し、これら管理データ領域301,302を挟むように、ファイルデータ領域303が存在する。ファイルデータ領域303は、2つのパーティションに分割されているが、連続したLBAとして扱う。   In FIG. 2, there are four partitions, a primary management data area 301 and a secondary management data area 302 are set in the middle of the LBA, and a file data area 303 exists so as to sandwich these management data areas 301 and 302. The file data area 303 is divided into two partitions, but is handled as a continuous LBA.

図1において、アプリケーション106は、ファイルを扱うプログラムであり、ファイルデータ112を所有する。ファイルに対する操作は、アプリケーション106からシステムコールI/F107の関数を呼び出すことにより実行される。   In FIG. 1, an application 106 is a program that handles files, and owns file data 112. An operation on the file is executed by calling a function of the system call I / F 107 from the application 106.

システムコールI/Fは、ファイルシステム108に対し、アプリケーション106からのファイル操作にあったファイルシステム108の関数を、ファイル識別とファイルデータ112が格納されているメモリアドレスと、読み出し時にはファイルデータ112を格納するためのメモリアドレスとデータサイズ、処理に対するオプション/フラグなどを引数として呼び出す。   The system call I / F gives the file system 108 a function for the file operation from the application 106 to the file system 108, the file identification, the memory address where the file data 112 is stored, and the file data 112 at the time of reading. The memory address and data size for storage and options / flags for processing are called as arguments.

ファイルシステム108は、自身の初期化の際に、HDD100に記録されていた管理テーブル102から必要な管理データ109を読み込む。ファイルシステム108は、システムコールI/Fから呼び出しがあった機能に応じて、書き込みの場合は管理データ109を参照、検索し、操作対象となる管理データ109が格納されているファイルシステム108の管理単位であるブロックナンバーを特定する。   The file system 108 reads necessary management data 109 from the management table 102 recorded in the HDD 100 at the time of initialization. In the case of writing, the file system 108 refers to and searches the management data 109 according to the function called from the system call I / F, and manages the file system 108 in which the management data 109 to be operated is stored. Specify the unit block number.

ファイルシステム108は、そのブロックナンバーに対して必要な書換えを行う。また操作対象となる管理データ109がない場合は、生成を行う。ファイルデータ112または管理データ109をHDD100に書き込む際には、ファイルシステム108の管理単位であったフロックナンバーはブロックナンバー/LBA変換処理部110に渡されてLBAに変換される。ブロックナンバーとLBAの変換テーブルはファイルシステム108の構築時に管理データの1つの種類として作成される。   The file system 108 performs necessary rewriting for the block number. If there is no management data 109 to be operated, generation is performed. When writing the file data 112 or the management data 109 to the HDD 100, the flock number, which is the management unit of the file system 108, is transferred to the block number / LBA conversion processing unit 110 and converted to LBA. The block number / LBA conversion table is created as one type of management data when the file system 108 is constructed.

ブロックナンバー/LBA変換処理部110は、変換後のLBAとファイルデータ112または管理データ109の格納メモリアドレスなど、読み込み書き込みに必要となる情報をリクエストとしてまとめて、HDDドライバ111に渡す。HDDドライバ111は、そのリクエストの情報を元にリクエスト内容を判別し、必要に応じて二重書き込み処理をおこない、その内容によってホストコントローラ114を制御する。ホストコントローラ114によって、HDD100に対してデータの送受信を行う。   The block number / LBA conversion processing unit 110 collects information necessary for reading and writing such as the converted LBA and the storage memory address of the file data 112 or the management data 109 as a request and passes it to the HDD driver 111. The HDD driver 111 determines the request content based on the information of the request, performs double writing processing as necessary, and controls the host controller 114 according to the content. The host controller 114 transmits and receives data to and from the HDD 100.

図3は、管理データの二重書き込みの機能を、HDDドライバ111に実装した例を示している。図3に示すように、HDDドライバ111は、書き込みリクエストキュー(queue)201と、リクエスト内容判別部202と、パーティション利用用途情報格納部203と、二重書き込み制御部204と、コマンド生成部205と、ホストコントローラ制御部206とを有している。   FIG. 3 shows an example in which the function of double writing management data is implemented in the HDD driver 111. As shown in FIG. 3, the HDD driver 111 includes a write request queue (queue) 201, a request content determination unit 202, a partition usage information storage unit 203, a dual write control unit 204, and a command generation unit 205. And a host controller control unit 206.

ライトトランザクションを、図1および図3を使用して説明する。アプリケーション106がファイルデータ112をHDD100に書き込む際、ファイルシステム108は、必要となる管理データ109を書き換え、書き換えられた管理データ109を、ファイルデータ112とは別のHDD100へのリクエストとして、HDDドライバ111の書き込みリクエストキュー201に渡す。   The write transaction will be described with reference to FIGS. When the application 106 writes the file data 112 to the HDD 100, the file system 108 rewrites the necessary management data 109, and uses the rewritten management data 109 as a request to the HDD 100 different from the file data 112. To the write request queue 201.

リクエストの中には、HDD100のどのLBAにその管理データ109を書くかのアドレス情報が入っている。HDDドライバ111は、パーティションテーブル103およびパーティション利用用途情報格納部203を参照する。ここで、パーティションテーブル103は単に各パーティションの区切りの情報を持つが、パーティション利用用途情報格納部203はさらに各パーティションの利用用途情報、つまりファイルデータを記録するための領域であるか管理テーブルを記録するための領域であるか等の情報を持っている。   The request includes address information as to which LBA of the HDD 100 the management data 109 is to be written. The HDD driver 111 refers to the partition table 103 and the partition usage information storage unit 203. Here, the partition table 103 simply has information on the partition of each partition, but the partition usage information storage unit 203 further records a usage table for each partition, that is, an area for recording file data. It has information such as whether it is an area to do.

リクエスト内容判別部202は、パーティションに関わる情報を元に、HDD100に書き込むデータが管理データ109であるかファイルデータ112であるかの判別を行う。リクエストが管理データ109に対するものであれば、管理データ109を正管理データ領域301に書き込む。   The request content determination unit 202 determines whether the data written to the HDD 100 is the management data 109 or the file data 112 based on the information related to the partition. If the request is for the management data 109, the management data 109 is written into the primary management data area 301.

正管理データ領域301への管理データ109の書き込みが行われた後、当該管理データ109を、正管理データ領域301に書き込む際に使用したリクエストの内容にあるHDD100のLBAに対して、正管理データ領域301と副管理データ領域302のLBAのオフセットを加えて、副管理データ領域302に書き込む。   After the management data 109 is written to the primary management data area 301, the primary management data is transferred to the LBA of the HDD 100 in the content of the request used when writing the management data 109 to the primary management data area 301. The LBA offset of the area 301 and the sub management data area 302 is added, and the data is written to the sub management data area 302.

この場合、正管理データ領域301に記録されている内容を副管理データ領域302に反映させることを意図するこれらの処理は、二重書き込み制御部204、コマンド生成部205、ホストコントローラ206で実現される。   In this case, these processes intended to reflect the contents recorded in the primary management data area 301 to the secondary management data area 302 are realized by the dual write control unit 204, the command generation unit 205, and the host controller 206. The

ここで、管理データ109の正管理データ領域301への書き込みが終わらなければ、管理データ109の副管理データ領域302への書き込みは行われない。また、副管理データ領域302への管理データ109の書き込みが終了しなければ、次のリクエストの管理データ109の正管理データ領域301への書き込みは行わない。このように、管理データ109の正管理データ領域301、副管理データ領域302への書き込みの間で同期をとる。すなわち、これら正管理データ領域301および副管理データ領域302を同じ書き込み状態とする。   If the management data 109 has not been written to the primary management data area 301, the management data 109 is not written to the secondary management data area 302. If the management data 109 has not been written to the secondary management data area 302, the management data 109 of the next request is not written to the primary management data area 301. In this way, synchronization is established between writing the management data 109 to the primary management data area 301 and the secondary management data area 302. That is, the primary management data area 301 and the secondary management data area 302 are in the same writing state.

これに対して、リクエストがファイルデータ112に対するものであれば、当該ファイルデータをファイルデータ領域303に書き込む。   On the other hand, if the request is for the file data 112, the file data is written in the file data area 303.

また、HDD100の最終書き込みLBAデータ記録部207は、要求の内容からこれから書き込みを行う初めのLBAと書き込みサイズを、最終書き込みLBAデータ105と呼び、不揮発な領域に記録する。この場合、最終書き込みLBAデータ105を、ディスクメディア104の所定領域に記録してもよく、あるいは別途備えられている不揮発性メモリに記録してもよい。   Also, the last written LBA data recording unit 207 of the HDD 100 calls the first LBA to be written and the write size from the content of the request as the last written LBA data 105 and records it in a non-volatile area. In this case, the last written LBA data 105 may be recorded in a predetermined area of the disk medium 104 or may be recorded in a separately provided non-volatile memory.

図4は、管理データ109、ファイルデータ112をHDD100に書き込む際の、上述した処理の概略を示している。この書き込み処理では、管理データ109をHDD100に書き込む際には、正管理データ領域301の書き込み内容が副管理データ領域302にも反映され、パーティションレベルでのミラーリングが行われる。   FIG. 4 shows an outline of the above-described processing when the management data 109 and the file data 112 are written to the HDD 100. In this writing process, when the management data 109 is written to the HDD 100, the contents written in the primary management data area 301 are reflected in the secondary management data area 302, and mirroring at the partition level is performed.

次に、図1に示す記録装置10において、ライト(書き込み)トランザクション中に障害が発生して電源遮断が起きた場合における管理データの修復について説明する。図5は、電源遮断による管理データの修復パターンを示している。修復パターンとしては、パターン1とパターン2とがある。パターン1は、電源遮断のタイミングが、正管理データ領域への書き込み中であり、破壊状況が正管理データ領域の内容に不整合が発生している場合であって、その場合には修復方法としては、副管理データ領域の内容を正管理データ領域にコピーする方法が採られる。この場合には、修復後の状態としては、最後に発行したライトコマンドのデータが反映されていないものとなる。   Next, in the recording apparatus 10 shown in FIG. 1, the restoration of management data when a failure occurs during a write transaction and the power is cut off will be described. FIG. 5 shows a management data recovery pattern by power-off. There are pattern 1 and pattern 2 as the repair patterns. Pattern 1 is a case where the power-off timing is being written to the primary management data area, and the destruction status is inconsistent with the contents of the primary management data area. Adopts a method of copying the contents of the secondary management data area to the primary management data area. In this case, the state after the restoration does not reflect the data of the last issued write command.

パターン2は、電源遮断のタイミングが、副管理データ領域への書き込み中であり、破壊状況が副管理データ領域の内容に不整合が発生している場合であって、その場合には修復方法としては、正管理データ領域の内容を副管理データ領域にコピーする方法が採られる。この場合には、修復後の状態としては、最後に発行したライトコマンドのデータが反映されたものとなる。   Pattern 2 is when the power-off timing is during writing to the secondary management data area, and the destruction status is inconsistent with the contents of the secondary management data area. Adopts a method of copying the contents of the primary management data area to the secondary management data area. In this case, the data after the last issued write command is reflected as the state after the restoration.

図5A,Bを用いて、本実施の形態におけるファイルシステムの復旧処理、つまり管理データの修復処理を、さらに説明する。   With reference to FIGS. 5A and 5B, the file system recovery process, that is, the management data repair process in the present embodiment will be further described.

電源遮断後の記録装置10の起動において、HDD100から最終書き込みLBAデータ105を取得し、またパーティション情報とそのパーティションの利用用途情報を取得し、最後に書き込んでいたLBA(最終書き込みLBA)が、正管理データ領域301、副管理データ領域302、ファイルデータ領域303のいずれであるかを判別する。   When the recording apparatus 10 is started after the power is shut off, the last written LBA data 105 is acquired from the HDD 100, the partition information and the usage information of the partition are acquired, and the last written LBA (last written LBA) is correct. The management data area 301, the secondary management data area 302, or the file data area 303 is determined.

最終書き込みLBAがファイルデータ領域303であったときは、管理データの修復作業は行わずに、正管理データ領域301に格納されている管理データを元にファイルシステムをマウントする。   If the last written LBA is the file data area 303, the management system is not restored, and the file system is mounted based on the management data stored in the primary management data area 301.

また、最終書き込みLBAが正管理データ領域301であったときは、副管理データ領域302内の全データを、正管理データ領域301にコピーし、その後に正管理データ領域301に格納されている管理データを元にファイルシステムをマウントする。この場合の管理データの修復パターンは、上述した図5のパターン1に相当する。   When the last written LBA is the primary management data area 301, all the data in the secondary management data area 302 is copied to the primary management data area 301, and then the management stored in the primary management data area 301 is stored. Mount the file system based on the data. The management data repair pattern in this case corresponds to the above-described pattern 1 of FIG.

図6Aは最終書き込みLBAが正管理データ領域301であったときのファイルシステムの状態を示しており、図6Bは修復後のファイルシステムの状態を示している。なお、図6は、HDD100には、管理データが書き込まれた後に、対応するファイルデータが書き込まれるものである。後述する、図7においても、同様である。   FIG. 6A shows the state of the file system when the last written LBA is the primary management data area 301, and FIG. 6B shows the state of the file system after repair. In FIG. 6, the corresponding file data is written to the HDD 100 after the management data is written. The same applies to FIG. 7 described later.

また、最終書き込みLBAが副管理データ領域302であったときは、副管理データ領域302内の全データを、正管理データ領域301にコピーし、その後に正管理データ領域301に格納されている管理データを元にファイルシステムをマウントする。この場合の管理データの修復パターンは、上述したパターン2に相当する。   When the last written LBA is the secondary management data area 302, all the data in the secondary management data area 302 is copied to the primary management data area 301 and then the management stored in the primary management data area 301 is stored. Mount the file system based on the data. The management data repair pattern in this case corresponds to the above-described pattern 2.

図7Aは最終書き込みLBAが副管理データ領域302であったときのファイルシステムの状態を示しており、図7Bは修復後のファイルシステムの状態を示している。   FIG. 7A shows the state of the file system when the last written LBA is the secondary management data area 302, and FIG. 7B shows the state of the file system after repair.

なお、上述した修復処理は、ソフトウェアでの実装、またはHDD100内のファームとしての実装が可能である。   Note that the above-described repair processing can be implemented by software or as a firmware in the HDD 100.

図1に示す記録装置10によれば、HDDドライバ100には管理データの二重書き込みの機能が実装されており、管理データ109の書き込み時には、当該機能により、管理データ109がHDD100の正副の管理データ領域301,302に二重書き込みされるものであり、上位階層の処理で行うものに比べてオーバーヘッドを小さくできる。   According to the recording apparatus 10 shown in FIG. 1, the HDD driver 100 is provided with a management data double-writing function. When the management data 109 is written, the management data 109 is managed in the primary and secondary management of the HDD 100 by the function. Double writing is performed in the data areas 301 and 302, and the overhead can be reduced as compared with the processing performed in the upper layer processing.

またその際、正管理データ領域301に書き込む際に使用したリクエストの内容にあるHDD100のLBAに対して、正管理データ領域301と副管理データ領域302のLBAのオフセットを加えて、副管理データ領域302へ管理データ109の書き込みを行うものであり、少ないCPU処理時間で二重書き込みを実現できる。   At this time, the LBA offset of the primary management data area 301 and the secondary management data area 302 is added to the LBA of the HDD 100 in the content of the request used when writing to the primary management data area 301, and the secondary management data area The management data 109 is written to 302, and double writing can be realized with less CPU processing time.

また、図1に示す記録装置10によれば、ライトトランザクション中に電源遮断が起こった場合に、その後の起動時に、HDD100内の最終書き込みLBAデータ記録部207の情報に基づいて、HDD100のいずれの領域への書き込み時に電源の遮断があったかを判断し、その判断結果に応じて管理データの修復を行っているので(図5〜図7参照)、管理データを適切に修復でき、従ってファイルシステムの復旧を適切に行うことができる。   Further, according to the recording apparatus 10 shown in FIG. 1, when a power interruption occurs during a write transaction, any one of the HDDs 100 is determined based on the information of the last written LBA data recording unit 207 in the HDD 100 at the subsequent startup. Since it is determined whether or not the power has been shut down when writing to the area, and the management data is repaired according to the determination result (see FIGS. 5 to 7), the management data can be repaired appropriately. Recovery can be performed appropriately.

なお、上述実施の形態においては、二重書き込みの機能をHDDドライバ111に実装したものを示したが(図3参照)、この二重書き込みの機能をHDD100に実装することも考えられる。   In the above-described embodiment, the dual write function is implemented in the HDD driver 111 (see FIG. 3). However, it is conceivable that the dual write function is implemented in the HDD 100.

図8は、管理データの二重書き込みの機能を、HDD100に実装した例を示している。図8に示すように、HDD100は、コマンドキュー(queue)401と、コマンド内容判別部402と、パーティション利用用途情報格納部403と、二重書き込み制御部404と、メディア書き込み制御部405とを有している。   FIG. 8 shows an example in which the function of double writing management data is implemented in the HDD 100. As shown in FIG. 8, the HDD 100 has a command queue 401, a command content determination unit 402, a partition usage information storage unit 403, a dual write control unit 404, and a media write control unit 405. is doing.

ライトトランザクションで、HDDドライバ114からホストコントローラ114を介して受け取る書き込みコマンドは、コマンドキュー401に入る。このコマンドの中には、HDD100のどのLBAに書き込むかのアドレス情報が入っている。HDD100のコマンド内容判別部402は、パーティションテーブル103およびパーティション利用用途情報格納部403を参照し、これから書き込むデータが管理データ109かファイルデータ112かの判別を行う。   A write command received from the HDD driver 114 via the host controller 114 in the write transaction enters the command queue 401. This command includes address information indicating which LBA of the HDD 100 is to be written. The command content determination unit 402 of the HDD 100 refers to the partition table 103 and the partition usage information storage unit 403 to determine whether the data to be written is management data 109 or file data 112.

書き込みコマンドが管理データ109に対するものであれば、管理データ109を正管理データ領域301に書き込む。正管理データ領域301への管理データ109の書き込みが行われた後、当該管理データ109を、正管理データ領域301に書き込む際に使用したリクエストの内容にあるHDD100のLBAに対して、正管理データ領域301と副管理データ領域302のLBAのオフセットを加えて、副管理データ領域302に書き込む。   If the write command is for the management data 109, the management data 109 is written into the primary management data area 301. After the management data 109 is written to the primary management data area 301, the primary management data is transferred to the LBA of the HDD 100 in the content of the request used when writing the management data 109 to the primary management data area 301. The LBA offset of the area 301 and the sub management data area 302 is added, and the data is written to the sub management data area 302.

この正管理データ領域301に記録されている内容を副管理データ領域302にも反映させることを意図する処理は、二重書き込み制御部404、メディア書き込み制御部405で実現される。   The process intended to reflect the content recorded in the primary management data area 301 to the secondary management data area 302 is realized by the dual write control unit 404 and the media write control unit 405.

なお、書き込みコマンドがファイルデータ112に対するものであれば、ファイルデータ112を、ファイルデータ領域303に書き込む。   If the write command is for the file data 112, the file data 112 is written to the file data area 303.

このように二重書き込みの機能がHDD100に実装されるものにあっても、上述したように二重書き込みの機能がHDDドライバ111に実装されるものと同様に、上位階層の処理で行うものに比べてオーバーヘッドを小さくできる。   As described above, even if the dual write function is implemented in the HDD 100 as described above, the dual write function is implemented by higher-level processing as in the case where the dual write function is implemented in the HDD driver 111. Compared to the overhead can be reduced.

また、上述実施の形態においては、記録媒体がHDD100である記録装置10にこの発明を適用したものであるが、この発明は、その他の記録媒体を使用するものにも同様に適用できることは勿論である。   In the above-described embodiment, the present invention is applied to the recording apparatus 10 in which the recording medium is the HDD 100. However, the present invention can be similarly applied to apparatuses using other recording media. is there.

この発明は、管理データの二重書き込みによってオーバーヘッドが大きくなることを防止でき、また電源の遮断があった場合にその管理データの修復を適切に行うことができるものであり、ファイルシステムに基づきファイルデータをHDDなどの記録媒体に記録する記録装置に適用できる。   The present invention can prevent an increase in overhead due to double writing of management data, and can appropriately repair the management data when the power is cut off. The present invention can be applied to a recording apparatus that records data on a recording medium such as an HDD.

実施の形態としての記録装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a recording apparatus as an embodiment. HDDのパーティション構造を説明するための図である。It is a figure for demonstrating the partition structure of HDD. 二重書き込みの機能をHDDドライバに実装した場合における、HDDドライバの機能ブロックを示す図である。It is a figure which shows the functional block of a HDD driver at the time of mounting the dual write function in a HDD driver. 管理データ、ファイルデータの書き込み処理の概略を示す図である。It is a figure which shows the outline of the write-in process of management data and file data. 電源遮断による管理データの修復パターンを示す図である。It is a figure which shows the restoration pattern of the management data by power supply interruption. 最終書き込みLBAが正管理データ領域であったときのファイルシステムの修復前および修復後の状態を示している。It shows the state before and after the restoration of the file system when the last written LBA is the primary management data area. 最終書き込みLBAが副管理データ領域であったときのファイルシステムの修復前および修復後の状態を示している。It shows the state before and after the restoration of the file system when the last written LBA is the secondary management data area. 二重書き込みの機能をHDDに実装した場合における、HDDの機能ブロックを示す図であるIt is a figure which shows the functional block of HDD when the function of dual writing is mounted in HDD.

符号の説明Explanation of symbols

10・・・記録装置、101・・・ファイルデータ、102・・・管理テーブル、103・・・パーティションテーブル、104・・・ディスクメディア、105・・・最終書き込みLBAデータ、106・・・アプリケーション、107・・・システムコールI/F、108・・・ファイルシステム、109・・・管理データ、110・・・ブロックナンバー/LBA変換処理部、111・・・HDDドライバ、112・・・ファイルデータ、113・・・パーティションテーブル、114・・・ホストコントローラ、201・・・書き込みリクエストキュー、202・・・リクエスト内容判別部、203・・・パーティション利用用途情報格納部、204・・・二重書き込み制御部、205・・・コマンド生成部、206・・・ホストコントローラ制御部、207・・・最終書き込みLBAデータ記録部、301・・・正管理データ領域、302・・・副管理データ領域、303・・・ファイルデータ領域、401・・・コマンドキュー、402・・・コマンド内容判別部、403・・・パーティション利用用途情報格納部、404・・・二重書き込み制御部、405・・・メディア書き込み制御部   DESCRIPTION OF SYMBOLS 10 ... Recording device, 101 ... File data, 102 ... Management table, 103 ... Partition table, 104 ... Disk medium, 105 ... Last write LBA data, 106 ... Application, 107: System call I / F, 108: File system, 109: Management data, 110: Block number / LBA conversion processing unit, 111: HDD driver, 112: File data, 113 ... Partition table, 114 ... Host controller, 201 ... Write request queue, 202 ... Request content determination unit, 203 ... Partition usage information storage unit, 204 ... Double write control , 205... Command generation unit, 206. ..., Last write LBA data recording unit, 301... Primary management data area, 302... Secondary management data area, 303... File data area, 401. ..Command content determination unit, 403... Partition use application information storage unit, 404... Dual write control unit, 405.

Claims (6)

ファイルシステムに基づきファイルデータをドライバにより制御される記録媒体に記録する記録装置であって、
上記記録媒体は、少なくとも上記ファイルデータを記録するファイルデータ領域と、上記ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域を有し、
上記ドライバまたは上記記録媒体は、上記記録媒体の各領域の利用用途情報が格納された情報格納部を有し、
上記ドライバまたは上記記録媒体は、上記管理データの書き込み時には、上記情報格納部に格納されている利用用途情報に基づいて管理データの書き込みであることを認識し、該管理データを上記記録媒体の正管理データ領域および副管理データ領域の双方に書き込む
ことを特徴とする記録装置。
A recording device for recording file data on a recording medium controlled by a driver based on a file system,
The recording medium has at least a file data area for recording the file data, a primary management data area and a secondary management data area for recording management data of the file system,
The driver or the recording medium has an information storage unit in which usage information of each area of the recording medium is stored.
When the management data is written, the driver or the recording medium recognizes that the management data is written based on the usage information stored in the information storage unit, and the management data is stored on the recording medium. A recording apparatus that writes in both the management data area and the sub management data area.
ファイルシステムに基づきファイルデータをドライバにより制御される記録媒体に記録し、該記録媒体は上記ファイルデータを記録するファイルデータを記録領域と上記ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域を有する記録装置における管理データの書き込み方法であって、
上記ドライバまたは上記記録媒体が上記ファイルシステムによる上記記録媒体の所定領域への所定データの書き込み指示が上記管理データの書き込みであるか否かを、上記記録媒体の各領域の利用用途情報に基づいて判定する判定ステップと、
上記判定ステップで上記管理データの書き込みであると判定されるとき、上記ドライバまたは上記記録媒体が上記所定データを上記正管理データ領域および副管理データ領域に順次書き込む書き込みステップと
を備えることを特徴とする管理データの書き込み方法。
File data is recorded on a recording medium controlled by a driver based on the file system, and the recording medium records file data for recording the file data and a primary management data area and a secondary management data area for recording management data of the file system, respectively. A method of writing management data in a recording apparatus having a management data area,
Whether the driver or the recording medium is instructed to write the management data to the predetermined area of the recording medium by the file system is based on the usage information of each area of the recording medium. A determination step for determining;
A write step in which the driver or the recording medium sequentially writes the predetermined data in the primary management data area and the secondary management data area when it is determined in the determination step that the management data is written. To write management data.
ファイルシステムに基づきファイルデータを記録媒体に記録する記録装置であって、
上記記録媒体は、少なくとも上記ファイルデータを記録するファイルデータ領域と、上記ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域と、最終書き込み位置のデータを記録する最終位置データ記録領域とを有し、
データの書き込み中に電源の遮断があったとき、上記記録媒体の各領域の利用用途情報および上記最終位置データ記録領域に記録されている最終書き込み位置のデータに基づいて上記記録媒体のいずれの領域への書き込み中に上記電源の遮断があったかを判断し、該判断結果に応じて上記正管理データ領域および上記副管理データ領域に記録されている管理データの修復を行う管理データ修復部を備える
ことを特徴とする記録装置。
A recording device for recording file data on a recording medium based on a file system,
The recording medium includes at least a file data area for recording the file data, a primary management data area and a secondary management data area for recording management data of the file system, and a final position data record for recording data of a final writing position, respectively. And having an area
Any area of the recording medium based on the usage information of each area of the recording medium and the data of the final writing position recorded in the final position data recording area when the power is interrupted during data writing A management data restoration unit that judges whether or not the power supply has been cut off during writing to the management data and restores the management data recorded in the primary management data area and the secondary management data area according to the judgment result A recording apparatus.
上記管理データ修復部は、上記記録媒体の正管理データ領域への書き込み中に上記電源の遮断があったときは、上記副管理データ領域の内容を上記正管理データ領域にコピーする
ことを特徴とする請求項3に記載の記録装置。
The management data restoration unit copies the contents of the secondary management data area to the primary management data area when the power is shut down during writing to the primary management data area of the recording medium. The recording apparatus according to claim 3.
上記管理データ修復部は、上記記録媒体の副管理データ領域への書き込み中に上記電源の遮断があったときは、上記正管理データ領域の内容を上記副管理データ領域にコピーする
ことを特徴とする請求項3に記載の記録装置。
The management data restoration unit is configured to copy the contents of the primary management data area to the secondary management data area when the power is shut down during writing to the secondary management data area of the recording medium. The recording apparatus according to claim 3.
ファイルシステムに基づきファイルデータを記録媒体に記録し、該記録媒体は上記ファイルデータを記録するファイルデータを記録領域と上記ファイルシステムの管理データをそれぞれ記録する正管理データ領域および副管理データ領域と、最終書き込み位置のデータを記録する最終位置データ記録領域とを有する記録装置における管理データの修復方法であって、
データの書き込み中に電源の遮断があったとき、上記記録媒体の各領域の利用用途情報および上記記録媒体に記録されている最終書き込み位置のデータに基づいて上記記録媒体のいずれの領域への書き込み中に上記電源の遮断があったかを判断する判断ステップと、
上記判断ステップの判断結果に応じて上記正管理データ領域および上記副管理データ領域に記録されている管理データの修復を行う修復ステップと
を備えることを特徴とする管理データの修復方法。
File data is recorded on a recording medium based on the file system, and the recording medium records file data for recording the file data, a primary management data area and a secondary management data area for recording the management data of the file system, respectively. A management data recovery method in a recording apparatus having a final position data recording area for recording data of a final writing position,
When power is interrupted during data writing, writing to any area of the recording medium based on usage information of each area of the recording medium and data of the final writing position recorded on the recording medium A judgment step for judging whether or not the power supply has been shut off during,
A management data repairing method comprising: a repairing step of repairing management data recorded in the primary management data area and the secondary management data area in accordance with a judgment result of the judgment step.
JP2006153065A 2006-06-01 2006-06-01 Recording apparatus, method for writing management data and method for repairing management data Pending JP2007323377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006153065A JP2007323377A (en) 2006-06-01 2006-06-01 Recording apparatus, method for writing management data and method for repairing management data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006153065A JP2007323377A (en) 2006-06-01 2006-06-01 Recording apparatus, method for writing management data and method for repairing management data

Publications (1)

Publication Number Publication Date
JP2007323377A true JP2007323377A (en) 2007-12-13

Family

ID=38856122

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006153065A Pending JP2007323377A (en) 2006-06-01 2006-06-01 Recording apparatus, method for writing management data and method for repairing management data

Country Status (1)

Country Link
JP (1) JP2007323377A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385486A (en) * 2010-09-03 2012-03-21 深圳市拾三意强者科技有限公司 Method and device for penetrating and reducing disk and equipment
JP2013232075A (en) * 2012-04-27 2013-11-14 Brother Ind Ltd Information processing device and program
US9460005B2 (en) 2012-12-04 2016-10-04 Samsung Electronics Co., Ltd. Storage devices including memory device and methods of operating the same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0327429A (en) * 1989-06-23 1991-02-05 Sanyo Electric Co Ltd Duplexing method for data in information processor
JPH09319640A (en) * 1996-05-27 1997-12-12 Sharp Corp Information recording and reproducing device
JP2000020248A (en) * 1998-06-26 2000-01-21 Nippon Digital Kenkyusho:Kk Disk fault recovering method, disk driver, and recording medium
JP2004295563A (en) * 2003-03-27 2004-10-21 Fujitsu Ltd Highly reliable data management method to maintain data integrity
WO2005003952A1 (en) * 2003-07-07 2005-01-13 Hitachi Ulsi Systems Co., Ltd. Storage device and storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0327429A (en) * 1989-06-23 1991-02-05 Sanyo Electric Co Ltd Duplexing method for data in information processor
JPH09319640A (en) * 1996-05-27 1997-12-12 Sharp Corp Information recording and reproducing device
JP2000020248A (en) * 1998-06-26 2000-01-21 Nippon Digital Kenkyusho:Kk Disk fault recovering method, disk driver, and recording medium
JP2004295563A (en) * 2003-03-27 2004-10-21 Fujitsu Ltd Highly reliable data management method to maintain data integrity
WO2005003952A1 (en) * 2003-07-07 2005-01-13 Hitachi Ulsi Systems Co., Ltd. Storage device and storage system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385486A (en) * 2010-09-03 2012-03-21 深圳市拾三意强者科技有限公司 Method and device for penetrating and reducing disk and equipment
CN102385486B (en) * 2010-09-03 2014-01-01 深圳市拾三意强者科技有限公司 Method and device for penetrating and reducing disk and equipment
JP2013232075A (en) * 2012-04-27 2013-11-14 Brother Ind Ltd Information processing device and program
US9460005B2 (en) 2012-12-04 2016-10-04 Samsung Electronics Co., Ltd. Storage devices including memory device and methods of operating the same

Similar Documents

Publication Publication Date Title
US7975168B2 (en) Storage system executing parallel correction write
JP4374364B2 (en) Storage apparatus, storage system, and storage apparatus power control method
JP5409159B2 (en) Information processing apparatus, information processing apparatus control method, and program
US7487400B2 (en) Method for data protection in disk array systems
JP2005063441A (en) Hard disk drive controller for writing to hard disk drive using 4K block size and hard disk drive using the same
US10346051B2 (en) Storage media performance management
JP3904894B2 (en) Backup management method and storage control device used in this method
US8938641B2 (en) Method and apparatus for synchronizing storage volumes
US20090177916A1 (en) Storage system, controller of storage system, control method of storage system
JP2007280111A (en) Storage system and performance tuning method thereof
JP2004213470A (en) Disk array device, and data writing method for disk array device
JP2006059347A (en) Storage system using journaling
JP2007323377A (en) Recording apparatus, method for writing management data and method for repairing management data
US9081505B1 (en) Method and system for improving disk drive performance
JP2002278706A (en) Disk array device
JP2018022404A (en) Storage system, storage control device, and storage control program
JP4704463B2 (en) Storage control device, storage control program, and storage control method
US12073089B2 (en) Storage device and data recovery method by storage device
JP5585930B2 (en) Disk array device and data control method
JP2005242708A (en) File restoration method and file recording device
JP2005316697A (en) Disk array system and method for data backup
JP4798003B2 (en) Recording apparatus, recording method, program, and optical disk recording apparatus
JP2006277042A (en) Array controller, disk array control method, and program
KR100640602B1 (en) How to Recover Data from Disk Drives
JP2010015253A (en) Recording/reproducing device and recording/reproducing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120214

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120710