JP2004310228A - Data storage device - Google Patents

Data storage device Download PDF

Info

Publication number
JP2004310228A
JP2004310228A JP2003099769A JP2003099769A JP2004310228A JP 2004310228 A JP2004310228 A JP 2004310228A JP 2003099769 A JP2003099769 A JP 2003099769A JP 2003099769 A JP2003099769 A JP 2003099769A JP 2004310228 A JP2004310228 A JP 2004310228A
Authority
JP
Japan
Prior art keywords
data
recording medium
hdd
stored
storage device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003099769A
Other languages
Japanese (ja)
Inventor
Tetsuya Suzuka
哲也 鈴鹿
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003099769A priority Critical patent/JP2004310228A/en
Publication of JP2004310228A publication Critical patent/JP2004310228A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data storage device capable of improving data transferring performance while enhancing the safety of storage data. <P>SOLUTION: In case of deleting data from an HDD cache 121 temporarily storing data to be written in a removable HDD 500, the deletion of the data from the HDD cache 121 is waited until data 95-2b and 95-3b to be deleted are permanently recorded in a disk 560 within the removable HDD 500, whereby it is ensured that data 95-2a and 95-3a temporarily recorded in the removable HDD 500 are regularly present on the HDD cache 121, so that the restoration of the storage data state at the time of an abnormal termination of the removable HDD 500 can be restored when it is restarted. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、ディジタルデータを記録再生する情報機器におけるデータ保存技術に関するものである。
【0002】
【従来の技術】
従来から、ハードディスク等の大容量な記録メディアは、計算機をはじめとする多様な情報処理装置に2次記録媒体として使用されているが、これらの大容量記録メディアへのアクセスは、情報処理装置の1次記録媒体であるメモリ素子へのアクセスと比べると桁違いに遅い。
【0003】
そこで、2次記録媒体に書き込むデータを一時的に保存するキャッシュを1次記録媒体上に設け、このキャッシュへの書き込み完了をもってデータ保存の完了として次処理を実行可能としている。これにより、2次記録媒体上のデータの読み出しにおいて、読み出し対象のデータがキャッシュに存在するならば、キャッシュへのアクセスのみで読み出し処理が完了することができ、データ処理の高速化が実現される。
【0004】
以上のようなデータ処理の際に、データ保存処理を実行する従来のデータ保存装置について、以下に説明する。
図3は従来の情報処理装置におけるデータ保存装置の構成を示すブロック図である。また、図4は従来のデータ保存装置におけるデータ転送処理の流れを示すフローチャートである。
【0005】
図3において、データ保存装置1000a内のファイルシステム100aは、プロセッサ200aの指示に基づき、主メモリ300a上のデータをリムーバブルハードディスクドライブ(リムーバブルHDD)500a上にファイル92aとして保存したり、逆に、リムーバブルHDD500a上に保存されているファイル92aを主メモリ300a上に読み出したりする。
【0006】
ここで、ファイル92aはデータブロック95aを単位としてアクセスされるが、そのアクセス時のデータブロック95aの移動処理として、図4に示すように、ファイルライト処理17aでは、主メモリ300a上のデータ95−6g・・・がファイルシステム100a内のHDDキャッシュ121aに書き込まれる。ファイルリード処理16aでは、主メモリ300a上への読み込み対象のデータブロックがHDDキャッシュ121a中に存在すれば(本図では、データ(1)95−1fとデータ(5)95−5f)、リムーバブルHDD500aにアクセスすることなく、HDDキャッシュ121aから主メモリ300aに読み込まれる。
【0007】
1次記録媒体であるメモリ素子(本図では、不揮発性内部メモリ120a)を大容量化することはコストまたは実装サイズの観点から困難であり、キャッシュ(本図では、HDDキャッシュ121a)に2次記録媒体であるリムーバブルHDD500a上の全データを保存することはできない。そこで、HDDキャッシュ121aがオーバーフローする前に、HDDキャッシュ121a上のデータをリムーバブルHDD500aに保存して、HDDキャッシュ121a上に空き領域を確保する必要がある。HDDキャッシュ121a上のデータをリムーバブルHDD500a上に保存することをフラッシュと呼ぶが、高いデータ処理性能を実現するためには、このフラッシュをどのようなタイミングで実行すればよいか決定する必要がある。
【0008】
これに対して、キャッシュのフラッシュを時間的に分散されたタイミングで実行することにより、2次記録媒体へのアクセス負荷を平滑化する制御が考案されている(例えば、特許文献1を参照)。
【0009】
また、図4において、ファイルシステム100aの動作を制御するファイルシステム制御部110aは、リムーバブルHDD500aへのアクセス頻度を監視しており、その結果をメディアアクセス頻度116としてフラッシュ管理情報112aに保持している。HDDキャッシュ121aのフラッシュを制御するフラッシュ起動手段111aは、このメディアアクセス頻度116を参照し、アクセスが過密していないと判断した時のみ、制御バス150aを通じてHDDキャッシュ121aのフラッシュを実行して、HDDライト処理31aにより、リムーバブルHDD500aのディスク560aへライトする。
【0010】
この際に、キャッシュの導入により生じる問題として、保存データがキャッシュ上に存在するのみで2次記録媒体に書き込まれていない時間が生じるために、保存データが破壊される危険性が高まる点がある。すなわち、キャッシュ上に未フラッシュのデータが存在している時に、情報機器本体の電源が切られたり、または、2次記録媒体が取り外される等により、以降にフラッシュを実行することが不可能となれば、2次記録媒体に保存されたデータは一部のみ更新された不整合な状態となる。この不整合になったデータを整合のとれた状態に復旧する方法が必要である。
【0011】
特に書き込み中の2次記録媒体の取り外しに関しては、近年、記録メディアの高集積化に伴いカード形状の大容量記録メディアが普及してきているので、対応が必要である。
【0012】
これに対して、キャッシュを不揮発性メモリ上に構築して、電源が突然切られても、その時点のキャッシュ状態を保持させておき、再度電源が投入された時にキャッシュ上に未フラッシュ・データが存在すれば、そのデータを2次記録媒体へ書き出すことにより、2次記録媒体上のデータを復旧する方式が考案されている(例えば、特許文献2を参照)。
【0013】
【特許文献1】
特開平5−94373号公報(第5頁、第1図)
【0014】
【特許文献2】
特開平4−336612号公報(第1頁、第1図)
【0015】
【発明が解決しようとする課題】
上記のような従来のデータ保存装置において、前述のキャッシュをフラッシュするタイミングには、データ転送性能と保存データの安全性間のトレードオフが存在する。すなわち、フラッシュ間隔を長くするほど、キャッシュヒットする可能性と書き込みデータが連続領域にまとめられる可能性が高くなるので、データアクセス速度が向上する。一方、フラッシュ間隔を長くするほど、保存データがキャッシュ上に存在するのみで2次記録媒体に書き込まれていない時間が長くなるので、急な電源オフ等の異常終了により、保存データが不整合な状態になる危険性が高くなる。
【0016】
しかし、前述の従来技術では、2次記録媒体へのアクセスの統計情報からのみフラッシュするタイミングを制御しており、上記の転送性能と安全性との間のトレードオフを考慮した制御が実現できないという問題点を有していた。
【0017】
また、前述の従来技術では、異常終了した時点のキャッシュ状態を保持しておき、2次記録媒体の再起動時にキャッシュ上の未フラッシュ・データを書き出すことで、異常終了により破壊された保存データを復旧しているが、多くの2次記録媒体は、アクセス速度の向上を目的として内部にライトバッファを持つため、キャッシュの状態を保持しただけでは、異常終了時の保存データ状態を復旧できない可能性があるという問題点も有していた。
【0018】
また、キャッシュに滞留中のデータは、2次記録媒体にフラッシュした順ではなく、キャッシュヒットした頻度に基づく順序で削除されるため、2次記録媒体中のライトバッファに滞留しているデータが、キャッシュに存在する保証がなく、保存データの安全性が低下するという問題点をも有していた。
【0019】
ここで、2次記録媒体の再起動後の書き戻しでも、これらのデータが損なわれたままとなる状況を、図4を用いて次に説明する。
図4の例では、リムーバブルHDD500aは、内部にHDDライトバッファ531aを持ち、ディスク560aへライト要求されたデータは、一旦HDDライトバッファ531aに滞留した後、ディスク560aに保存される。図4に示すデータ転送状態では、HDDキャッシュ121a中にデータ(1)95−1f〜データ(5)95−5fが格納されており、そのうちデータ(1)、データ(2)および、データ(3)がフラッシュ済みデータ96aであり、HDDライト処理31aにより、リムーバブルHDD500aへライトされている。しかし、リムーバブルHDD500a内では、ディスク560aに保存されているのはデータ(1)95−1eのみであり、データ(2)95−2eとデータ(3)95−3eは、HDDライトバッファ531aに一時的に記録されているのみである。
【0020】
この状態で、主メモリ300a上のデータ(6)95−6gとデータ(7)95−7gを、ファイルライト処理17aにより、ファイルにライトするため、そのライト要求が発生すると、ファイルシステム100aは、HDDキャッシュ121aに前記の2つのデータを保持するための空きエリアを作成しようとして、最長不使用エントリの抽出手段123aを活性化する。
【0021】
最長不使用エントリの抽出手段123aは、フラッシュ済みデータ96aの中から、長い間キャッシュヒットしていないデータブロックを選択して、これを廃棄する。図4では、フラッシュ済みデータ96aのうち、データ(1)95−1fはファイルリード処理16aによりリードアクセスされたことがあるが、データ(2)95−2fとデータ(3)95−3fはリードアクセスされたことがない。そこで、データ(2)95−2fとデータ(3)95−3fが、HDDキャッシュ121aから削除される。
【0022】
この時点で、リムーバブルHDD500aが抜き取られると、HDDライトバッファ531aは揮発性メモリであるので、ここに滞留していたデータ(2)95−2eとデータ(3)95−3eは消えてしまう。しかし、これらのデータはHDDキャッシュ121aからも削除されているので、再度、リムーバブルHDD500aが動作可能となった時に、これらのデータを復旧することができず、結果的に、保存データの整合が取れないため保存データの安全性が低下することになる。
【0023】
本発明は、上記従来の問題点を解決するもので、保存データの安全性を高めるとともに、データ転送速度やデータ転送精度などのデータ転送性能を向上することができるデータ保存装置を提供する。
【0024】
【課題を解決するための手段】
上記の課題を解決するために、本発明の請求項1に記載のデータ保存装置は、データを一時的に保存するためのキャッシュ領域をもち、そのキャッシュ領域によりデータを一時的に記録する第1の記録媒体と、データを一時的に保存するためのバッファ領域をもち、そのバッファ領域からのデータを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記キャッシュ領域に保存した後に、そのデータを前記第2の記録媒体に転送して前記バッファ領域に一時的に保存し、その後、所定の時間が経過すると、前記バッファ領域からのデータを前記第2の記録媒体に記録して半永続的に保存するデータ保存装置であって、前記キャッシュ領域に保存されたデータを削除する場合、その削除対象データが前記第2の記録媒体上に転送されてからの経過時間が前記所定の時間以上になるまで、前記削除の実行を待機するよう構成したことを特徴とする。
【0025】
以上により、第2の記録媒体のバッファ領域に一時的に保存されているデータが第1の記録媒体上に常に存在することを保証することができる。
また、本発明の請求項2に記載のデータ保存装置は、データを一時的に保存するためのキャッシュ領域をもち、そのキャッシュ領域によりデータを一時的に記録する第1の記録媒体と、データを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記キャッシュ領域に保存した後に、そのデータを前記第2の記録媒体に転送して半永続的に保存するデータ保存装置であって、前記第2の記録媒体の異常終了した頻度に関する統計情報を取得し、前記統計情報に基づいて前記キャッシュ領域上のデータを前記第2の記録媒体に転送するタイミングを制御するよう構成したことを特徴とする。
【0026】
以上により、急な電源オフや、動作中の第2の記録媒体の取り外し等の異常終了が多発する状態ならば、第1の記録媒体上のキャッシュ領域を頻繁にフラッシュして第2の記録媒体の保存データが不整合な状態になる危険性を押さえ、第2の記録媒体の異常終了がない状態ならば、第1の記録媒体上のキャッシュ領域へのフラッシュを実行する間隔を長くして第2の記録媒体への書き込みデータの連続性を確保することができる。
【0027】
また、本発明の請求項3に記載のデータ保存装置は、請求項2に記載のデータ保存装置であって、前記第2の記録媒体が過去に異常終了した頻度に関する統計情報として、起動された回数と正常終了した回数をもつよう構成したことを特徴とする。
【0028】
以上により、第2の記録媒体が過去に異常終了した頻度に関する統計情報として、起動された回数と正常終了した回数から、第2の記録媒体における過去の異常終了の頻度を求め、その異常終了の頻度に基づいて、急な電源オフや、動作中の第2の記録媒体の取り外し等の異常終了が発生する危険性があると判断すれば、第1の記録媒体上のキャッシュ領域を頻繁にフラッシュして第2の記録媒体の保存データが不整合な状態になる危険性を押さえ、第2の記録媒体の異常終了が発生する危険性がないと判断すれば、第1の記録媒体上のキャッシュ領域へのフラッシュを実行する間隔を長くして第2の記録媒体への書き込みデータの連続性を確保することができる。
【0029】
また、本発明の請求項4に記載のデータ保存装置は、データを一時的に保存するためのキャッシュ領域をもち、そのキャッシュ領域によりデータを一時的に記録する第1の記録媒体と、データを一時的に保存するためのバッファ領域をもち、そのバッファ領域からのデータを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記キャッシュ領域に保存した後に、そのデータを前記第2の記録媒体に転送して前記バッファ領域に一時的に保存し、その後、所定の時間が経過すると、前記バッファ領域からのデータを前記第2の記録媒体に記録して半永続的に保存するデータ保存装置であって、前記キャッシュ領域に保存されたデータを削除する場合、その削除対象データが前記第2の記録媒体上に転送されてからの経過時間が前記所定の時間以上になるまで、前記削除の実行を待機するとともに、前記第2の記録媒体の異常終了した頻度に関する統計情報を取得し、前記統計情報に基づいて前記キャッシュ領域上のデータを前記第2の記録媒体に転送するタイミングを制御するよう構成したことを特徴とする。
【0030】
以上により、第2の記録媒体のバッファ領域に一時的に記録されているデータが第1の記録媒体に常に存在することを保証し、かつ、急な電源オフや、動作中の第2の記録媒体の取り外し等の異常終了が多発する状態ならば、第1の記録媒体上のキャッシュ領域を頻繁にフラッシュして第2の記録媒体の保存データが不整合な状態になる危険性を押さえ、第2の記録媒体の異常終了がない状態ならば、第1の記録媒体上のキャッシュ領域へのフラッシュを実行する間隔を長くして第2の記録媒体への書き込みデータの連続性を確保することができる。
【0031】
また、本発明の請求項5に記載のデータ保存装置は、データを一時的に記録する第1の記録媒体と、データを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記第1の記録媒体に一時的に保存した後に、そのデータを前記第2の記録媒体に転送して一時的に保存し、その後、所定の時間が経過すると、データを前記第2の記録媒体に半永続的に保存するデータ保存装置であって、前記第1の記録媒体に保存されたデータを削除する場合、その削除対象データが前記第2の記録媒体上に転送されてからの経過時間が前記所定の時間以上になるまで、前記削除の実行を待機するよう構成したことを特徴とする。
【0032】
以上により、第2の記録媒体に一時的に記録されているデータが第1の記録媒体上に常に存在することを保証することができる。
また、本発明の請求項6に記載のデータ保存装置は、データを一時的に記録する第1の記録媒体と、データを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記第1の記録媒体に一時的に保存した後に、そのデータを前記第2の記録媒体に転送して半永続的に保存するデータ保存装置であって、前記第2の記録媒体の異常終了した頻度に関する統計情報を取得し、前記統計情報に基づいて前記第1の記録媒体上のデータを前記第2の記録媒体に転送するタイミングを制御するよう構成したことを特徴とする。
【0033】
以上により、第2の記録媒体が異常終了した頻度に関する統計情報を取得し、その統計情報から、第2の記録媒体が異常終了する可能性が高い場合は、第1の記録媒体を頻繁にフラッシュして第2の記録媒体の保存データが不整合な状態になる危険性を押さえ、第2の記録媒体が異常終了する可能性がない場合は、第1の記録媒体へのフラッシュを実行する間隔を長くして第2の記録媒体への書き込みデータの連続性を確保することができる。
【0034】
【発明の実施の形態】
以下、本発明の実施の形態を示すデータ保存装置について、図面を参照しながら具体的に説明する。
【0035】
図1は本実施の形態のデータ保存装置の全体構成を示すブロック図である。また、図2は本実施の形態のデータ保存装置におけるデータ転送処理の流れを示すフローチャートである。
【0036】
図1において、データ保存装置1000は、データをファイル92として記録する記録メディアとして、脱着可能なハードディスクドライブ(リムーバブルハードディスクドライブ(リムーバブルHDD))500をもち、装置内の動作をシステムバス600を通じて制御するプロセッサ200と、プロセッサ200の作業用一時記録領域である主メモリ300と、リムーバブルHDD500上のファイル92へのアクセスを管理するファイルシステム100と、通信回線4000で接続された外部装置との通信を実行する通信処理部700とからなる。
【0037】
データ保存装置1000の主要な用途は、通信回線4000を介して渡されたデータをリムーバブルHDD500に保存することと、その逆に、リムーバブルHDD500に保存されたデータを、通信回線4000を介して外部装置に渡すことである。
【0038】
ファイルシステム100は、記録メディアとの間でやり取りされるデータを一時保存するための不揮発性内部メモリ120と、リムーバブルHDD500とのデータ転送を実行するHDD転送制御部140と、ファイルシステム100全体の動作を制御するファイルシステム制御部110とからなる。
【0039】
不揮発性内部メモリ120は、リムーバブルHDD500に対するデータをキャッシングしているHDDキャッシュ121をもつ。HDDキャッシュ121に滞留中のデータをリムーバブルHDD500へ書き出すタイミングは、ファイルシステム制御部110のフラッシュ起動手段111により、制御バス150を通じて指示される。フラッシュ起動手段111は、HDDキャッシュ121のフラッシュを管理するための情報であるフラッシュ管理情報112に基づいて制御を行う。
【0040】
リムーバブルHDD500は、HDD転送制御部140からの指示に基づいて記録・再生を実行するHDD制御部510と、HDD制御部510が使用する管理情報が記録されているHDD管理情報520と、HDD転送制御部140からのデータが記録されているディスクユニット590と、ディスクユニット590から読み出されたデータが一時的に保存されるHDDリードバッファ530と、HDD転送制御部140から渡されたデータが一時的に保存されるHDDライトバッファ531とからなる。
【0041】
HDDライトバッファ531とHDDリードバッファ530は、ファイルシステム100によるリムーバブルHDD500へのアクセスを高速化するために設けられている。ファイルシステム100は、ディスクアクセス処理34により書き込み対象のデータがディスク560に書き込まれるのを待たずに、HDDライト処理31によるHDDライトバッファ531への書き込み完了をもって、ファイルライト完了とすることができる。また、ファイルシステム100が読み込もうとしているデータが、過去にリードしたことがあり、HDDリードバッファ530に存在すれば、ディスク560にアクセスする必要無く読み出すことができる。
【0042】
HDDライトバッファ531とHDDリードバッファ530は、半導体メモリ上に構築されているが、半導体メモリへのアクセスはディスク560へのアクセスに比べて桁違いに高速であるので、これらバッファ530、531へのアクセスのみでファイルアクセスを実現できる場合は、データ転送が非常に高速となる。
【0043】
リムーバブルHDD500内のディスクユニット590は、保存データが磁性信号として記録されているディスク560と、ディスク560上の磁性信号を読み書きする磁気ヘッド550と、磁気ヘッド550によるディスク560上の読み書きを制御するヘッドアクセス回路540とからなる。
【0044】
HDD管理情報520は、個々のリムーバブルHDD500を識別するためのメディア識別子523と、このリムーバブルHDD500が起動された回数を示す起動回数データ521と、このリムーバブルHDD500が正常終了した回数を表す正常終了回数データ522とからなる。HDD管理情報520は、リムーバブルHDD500の電源がオフとなっても情報が失われない不揮発性の情報として記録されている。メディア識別子523は読み出し専用の情報であるが、起動回数データ521と正常終了回数データ522は、HDD制御部510がファイルシステム100からの情報に基づいて更新する。
【0045】
起動回数データ521は、リムーバブルHDD500の初期化処理(マウント処理と呼ぶ)が成功した時に、1つ加算される。リムーバブルHDD500のマウント処理は、動作中のデータ保存装置1000に新たにリムーバブルHDD500が挿入された時、または、リムーバブルHDD500が挿入されているデータ保存装置1000の電源が投入された時に、ファイルシステム100により実行され、その実行結果が、HDD転送制御部140を介して、HDD制御部510に通知される。
【0046】
正常終了回数データ522は、リムーバブルHDD500の終了処理(アンマウント処理と呼ぶ)が成功した時に、1つ加算される。リムーバブルHDD500のアンマウント処理は、リムーバブルHDD500が挿入されているデータ保存装置1000の電源を切る前に、または、リムーバブルHDD500を抜く前にファイルシステム100により実行される処理であり、HDDキャッシュ121に未フラッシュのデータが存在すれば、そのデータがリムーバブルHDD500に書き出される。
【0047】
ここで、ファイル92はデータブロック95を単位としてアクセスされるが、そのアクセス時のデータブロック95の移動処理として、図2に示すように、ファイルシステム100は、プロセッサ200からのファイルライト要求を受けると、HDDキャッシュ121に、書き込み対象のデータブロック(図2では、データ(6)95−6dとデータ(7)95−7d)を格納する空きエリアが存在するかチェックする。
【0048】
図2の例では、HDDキャッシュ121には、フラッシュ済みデータ96として、データ(1)95−1b、データ(2)95−2bおよびデータ(3)95−3bが存在し、未フラッシュデータ97として、データ(4)95−4bとデータ(5)95−5bが存在し、空きエリアが存在しない。
【0049】
HDDキャッシュ121にファイルライト対象のデータを格納するのに十分なエリアが存在しない場合、ファイルシステム100は、上記の2つのデータを保持するための空きエリアを作成しようとして、最長不使用エントリの抽出手段123を活性化する。最長不使用エントリの抽出手段123は、フラッシュ済みデータ96の中から、長い間キャッシュヒットしていないデータブロックを選択して、これを廃棄する。これは、過去にアクセスされたことが無いデータブロックは、今後もアクセスされる可能性が低いであろうという仮定に基づいて、今後キャッシュヒットする可能性が低いデータブロックを削除するアルゴリズムである。
【0050】
図2では、フラッシュ済みデータ96のうち、データ(1)95−1bはファイルリード処理16によりリードアクセスされたことがあるが、データ(2)95−2bとデータ(3)95−3bはリードアクセスされたことがない。そこで、データ(2)95−2bとデータ(3)95−3bがHDDキャッシュ121から取り出されて、廃棄待機キュー124に一時保存された後に、HDDキャッシュ121上から削除され、そのようにしてHDDキャッシュ121上の削除された領域に、ファイルライト処理17により、主メモリ300上の書き込み対象のデータ(6)95−6dとデータ(7)95−7d)を格納する。
【0051】
このように本実施の形態では、HDDキャッシュ121から削除されるデータを廃棄待機キュー124に一時的に保存しておくことを特徴とし、廃棄待機キュー124にデータが滞留する時間を、HDDライト処理31の後のリムーバブルHDD500内のHDDライトバッファ531におけるデータ滞留時間よりも長くし、HDDライト処理31の後から、削除対象のデータがHDDライトバッファ531からリムーバブルHDD500内のディスク560へ完全に記録されて永続的に記録されるようになるまで、不揮発性内部メモリ120上のHDDキャッシュ121からのデータ削除処理あるいは廃棄待機キュー124からの廃棄処理を待機しておくことにより、HDDライトバッファ531に一時的に保存されているデータ(図2では、データ(2)95−2aとデータ(3)95−3a)は、ファイルシステム100内のHDDキャッシュ121または廃棄待機キュー124にも存在することが保証される。
【0052】
これにより、リムーバブルHDD500がいつ異常終了した場合も、その時点で書き込み中であったデータがファイルシステム100内に保存されていることになり、リムーバブルHDD500が再起動した時には異常終了時点の保存データ状況を復元することが可能となる。
【0053】
また、ファイルシステム100内のフラッシュ起動手段111は、リムーバブルHDD500に対するマウント処理において、リムーバブルHDD500内のHDD制御部510と通信して転送制御情報33を受け渡しする。この時、リムーバブルHDD500のHDD管理情報520であるメディア識別子523、起動回数データ521および正常終了回数データ522がフラッシュ起動手段111に渡され、フラッシュ管理情報112に、それぞれ、メディア識別子113、メディア起動回数データ114およびメディア正常終了回数データ115として保存されている。
【0054】
リムーバブルHDD500が異常終了した場合(すなわち、アンマウント処理を実行せずに電源が切られた場合)は、その時のメディア識別子113は保存され、次にマウント処理が実行される時に、新しいリムーバブルHDDのメディア識別子523と比較される。両者が同一の場合は、前回異常終了したリムーバブルHDD500が再度起動されたと判断して、廃棄待機キュー124に保存されているデータとHDDキャッシュ121中のデータを、そのリムーバブルHDD500に書き出して、異常終了時点の保存データ状態を復元する。
【0055】
次に、HDDキャッシュ121内のデータをフラッシュする手順について説明する。
フラッシュは、HDDキャッシュ121がオーバーフローしないようにさえすれば、どのようなタイミングで実行しても、どのような順序でデータをフラッシュ対象としてもよい。データ転送速度を高めるには、できるだけフラッシュ間隔を長くし、連続したデータをまとめてリムーバブルHDD500へライトするのがよい。連続したデータをまとめてディスク560にライトすることにより、磁気ヘッド550が記録位置に移動するために生じる時間(シーク時間と呼ぶ)のための待ち時間を省くことが可能となる。
【0056】
しかし、フラッシュする間隔を長くするほど、保存データがHDDキャッシュ121上に存在するのみでリムーバブルHDD500に書き込まれていない時間が長くなるので、急な電源オフ等の異常終了により、リムーバブルHDD500上の保存データが不整合な状態になる危険性が高くなる。リムーバブルHDD500が異常終了する頻度は、データ保存装置1000に対するユーザの使用方法に依存する。リムーバブルHDD500を抜く前や、データ保存装置1000の電源を切る前には必ずアンマウント処理を実行するユーザならば、異常終了は発生しないし、そうでないユーザならばフラッシュ間隔を長くしていると異常終了が多発してしまう。
【0057】
これに対して、本実施の形態のデータ保存装置1000は、フラッシュ管理情報112中のメディア起動回数データ114とメディア正常終了回数データ115から異常終了する危険性を推測し、その危険性に応じてフラッシュを実行する頻度を決定することを特徴とする。
【0058】
フラッシュ起動手段111は、メディア起動回数データ114からメディア正常終了回数データ115を引く(減算する)ことにより、現在挿入されているリムーバブルHDD500が過去に異常終了した回数を求め、そのリムーバブルHDD500がどのように使用されてきたかを推測し、リムーバブルHDD500が異常終了しやすい状態で使用されてきたと判断すると、フラッシュを頻繁に実行して、リムーバブルHDD500内のディスク560の保存データが不整合な状態になる危険性を押さえ、逆に、リムーバブルHDD500がほとんど異常終了していない場合は、フラッシュ間隔を長くしてリムーバブルHDD500内のディスク560への書き込みデータの連続性を確保することができる。
【0059】
これらの結果、保存データの安全性を高めるとともに、データ転送速度やデータ転送精度などのデータ転送性能を向上することができる。
【0060】
【発明の効果】
以上のように本発明によれば、第2の記録媒体が異常終了した頻度に関する統計情報を取得し、その統計情報から、第2の記録媒体が異常終了する可能性が高い場合は、第1の記録媒体のキャッシュ領域を頻繁にフラッシュして第2の記録媒体の保存データが不整合な状態になる危険性を押さえ、第2の記録媒体が異常終了する可能性がない場合は、第1の記録媒体のキャッシュ領域へのフラッシュを実行する間隔を長くして第2の記録媒体への書き込みデータの連続性を確保することができる。
【0061】
また、第1の記録媒体上のキャッシュ領域からデータを削除する場合、削除対象のデータが第2の記録媒体に永続的に記録されるまで、第1の記録媒体上のキャッシュ領域からのデータ削除を待機することにより、第2の記録媒体に一時的に記録されているデータが第1の記録媒体上に常に存在することを保証して、第2の記録媒体が再起動した時に、その異常終了時点の保存データ状況を復元することができる。
【0062】
その結果、保存データの安全性を高めるとともに、データ転送速度やデータ転送精度などのデータ転送性能を向上することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態のデータ保存装置の構成を示すブロック図
【図2】同実施の形態のデータ保存装置におけるデータ転送処理のフローチャート
【図3】従来のデータ保存装置の構成を示すブロック図
【図4】同従来例のデータ保存装置におけるデータ転送処理のフローチャート
【符号の説明】
16 ファイルリード処理
17 ファイルライト処理
31 HDDライト処理
33 転送制御情報
34 ディスクアクセス処理
92 ファイル
95 データブロック
96 フラッシュ済みデータ
97 未フラッシュデータ
100 ファイルシステム
110 ファイルシステム制御部
111 フラッシュ起動手段
112 フラッシュ管理情報
113 メディア識別子
114 メディア起動回数データ
115 メディア正常終了回数データ
120 不揮発性内部メモリ
121 HDDキャッシュ
123 最長不使用エントリ抽出手段
124 廃棄待機キュー
140 HDD転送制御部
150 制御バス
200 プロセッサ
300 主メモリ
500 リムーバブルハードディスクドライブ(リムーバブルHDD)
510 HDD制御部
520 HDD管理情報
521 HDD起動回数データ
522 HDD正常終了回数データ
523 メディア識別子
530 HDDリードバッファ
531 HDDライトバッファ
540 ヘッドアクセス回路
550 磁気ヘッド
560 ディスク
590 ディスクユニット
600 システムバス
700 通信処理部
1000 データ保存装置
4000 通信回線
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data storage technique in an information device for recording and reproducing digital data.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, large-capacity recording media such as hard disks have been used as secondary recording media in various information processing apparatuses such as computers. It is orders of magnitude slower than accessing a memory element that is the primary recording medium.
[0003]
Therefore, a cache for temporarily storing data to be written to the secondary recording medium is provided on the primary recording medium, and when the writing to the cache is completed, the data storage is completed and the next process can be executed. As a result, in the reading of data on the secondary recording medium, if the data to be read exists in the cache, the read processing can be completed only by accessing the cache, and the speed of the data processing can be increased. .
[0004]
A conventional data storage device that performs data storage processing during the above data processing will be described below.
FIG. 3 is a block diagram showing a configuration of a data storage device in a conventional information processing device. FIG. 4 is a flowchart showing the flow of a data transfer process in a conventional data storage device.
[0005]
3, a file system 100a in a data storage device 1000a stores data on a main memory 300a as a file 92a on a removable hard disk drive (removable HDD) 500a or conversely, on the basis of an instruction from the processor 200a. The file 92a stored on the HDD 500a is read onto the main memory 300a.
[0006]
Here, the file 92a is accessed in units of the data block 95a. As a moving process of the data block 95a at the time of the access, as shown in FIG. .. Are written to the HDD cache 121a in the file system 100a. In the file read processing 16a, if the data block to be read into the main memory 300a exists in the HDD cache 121a (in this figure, data (1) 95-1f and data (5) 95-5f), the removable HDD 500a Is read from the HDD cache 121a into the main memory 300a without accessing the.
[0007]
It is difficult to increase the capacity of the memory element (the non-volatile internal memory 120a in this figure) as the primary recording medium from the viewpoint of cost or mounting size, and it is difficult to increase the capacity in the cache (the HDD cache 121a in this figure). It is not possible to save all data on the removable HDD 500a as a recording medium. Therefore, before the HDD cache 121a overflows, it is necessary to save the data in the HDD cache 121a in the removable HDD 500a and secure a free area in the HDD cache 121a. Saving data in the HDD cache 121a on the removable HDD 500a is called a flash. In order to realize high data processing performance, it is necessary to determine at what timing this flash should be executed.
[0008]
On the other hand, there has been devised a control for smoothing the access load to the secondary recording medium by executing the flushing of the cache at timings which are temporally distributed (for example, see Patent Document 1).
[0009]
In FIG. 4, the file system control unit 110a that controls the operation of the file system 100a monitors the frequency of access to the removable HDD 500a, and stores the result in the flash management information 112a as the media access frequency 116. . The flash activation unit 111a that controls the flushing of the HDD cache 121a refers to the media access frequency 116, executes the flushing of the HDD cache 121a through the control bus 150a, and executes the flushing of the HDD cache 121a only when it is determined that the access is not congested. By the write processing 31a, data is written to the disk 560a of the removable HDD 500a.
[0010]
At this time, as a problem caused by the introduction of the cache, there is a time when the stored data exists only in the cache but is not written to the secondary recording medium, and thus the risk of the stored data being destroyed increases. . That is, when unflashed data exists in the cache, the information device itself is turned off or the secondary recording medium is removed, so that it becomes impossible to execute flashing thereafter. For example, the data stored in the secondary recording medium is in an inconsistent state in which only part of the data is updated. There is a need for a method of restoring this inconsistent data to a consistent state.
[0011]
In particular, with respect to the removal of the secondary recording medium during writing, a card-shaped large-capacity recording medium has become widespread in recent years along with the high integration of the recording medium.
[0012]
On the other hand, a cache is built on the non-volatile memory so that even if the power is suddenly turned off, the cache state at that time is retained, and when the power is turned on again, unflashed data is not stored in the cache. If it exists, a method of restoring the data on the secondary recording medium by writing the data to the secondary recording medium has been devised (for example, see Patent Document 2).
[0013]
[Patent Document 1]
JP-A-5-94373 (page 5, FIG. 1)
[0014]
[Patent Document 2]
JP-A-4-336612 (page 1, FIG. 1)
[0015]
[Problems to be solved by the invention]
In the conventional data storage device as described above, there is a trade-off between the data transfer performance and the security of the stored data at the timing of flushing the cache. In other words, the longer the flush interval, the higher the possibility of a cache hit and the possibility of the write data being collected in a continuous area, so that the data access speed is improved. On the other hand, the longer the flush interval is, the longer the time during which the stored data exists only in the cache and is not written to the secondary recording medium, the longer the flash memory is turned off or the like, the more the stored data becomes inconsistent. The danger of becoming a condition increases.
[0016]
However, in the above-described prior art, the timing of flushing is controlled only from the statistical information of access to the secondary recording medium, and the control in consideration of the trade-off between transfer performance and security cannot be realized. Had problems.
[0017]
Further, in the above-described prior art, the cache state at the time of abnormal termination is retained, and the unflashed data in the cache is written out when the secondary recording medium is restarted, so that the stored data destroyed by the abnormal termination can be deleted. Although recovered, many secondary recording media have internal write buffers for the purpose of improving access speed, so it may not be possible to recover the saved data state at the time of abnormal termination simply by maintaining the cache state. There was also a problem that there is.
[0018]
In addition, data staying in the cache is deleted not in the order of flushing to the secondary recording medium, but in the order based on the frequency of cache hits. Therefore, the data staying in the write buffer in the secondary recording medium is deleted. There is also a problem that there is no guarantee that the data exists in the cache and the security of the stored data is reduced.
[0019]
Here, a situation in which these data remain damaged even after rewriting after restarting the secondary recording medium will be described with reference to FIG.
In the example of FIG. 4, the removable HDD 500a has an HDD write buffer 531a therein, and data requested to be written to the disk 560a temporarily stays in the HDD write buffer 531a and is then stored on the disk 560a. In the data transfer state shown in FIG. 4, data (1) 95-1f to data (5) 95-5f are stored in the HDD cache 121a, among which data (1), data (2), and data (3). ) Is flashed data 96a, which has been written to the removable HDD 500a by the HDD write processing 31a. However, in the removable HDD 500a, only the data (1) 95-1e is stored in the disk 560a, and the data (2) 95-2e and the data (3) 95-3e are temporarily stored in the HDD write buffer 531a. It is only recorded.
[0020]
In this state, the data (6) 95-6g and the data (7) 95-7g on the main memory 300a are written to the file by the file write processing 17a. In order to create a free area for holding the above two data in the HDD cache 121a, the longest unused entry extracting means 123a is activated.
[0021]
The longest unused entry extracting unit 123a selects a data block that has not been hit for a long time from the flushed data 96a and discards it. In FIG. 4, among the flushed data 96a, data (1) 95-1f has been read-accessed by the file read processing 16a, but data (2) 95-2f and data (3) 95-3f have been read-accessed. Have never been accessed. Therefore, the data (2) 95-2f and the data (3) 95-3f are deleted from the HDD cache 121a.
[0022]
At this time, if the removable HDD 500a is removed, the data (2) 95-2e and the data (3) 95-3e that have stayed here disappear because the HDD write buffer 531a is a volatile memory. However, since these data are also deleted from the HDD cache 121a, when the removable HDD 500a becomes operable again, these data cannot be recovered, and as a result, the consistency of the stored data can be obtained. The security of the stored data is reduced.
[0023]
SUMMARY OF THE INVENTION The present invention solves the above-mentioned conventional problems, and provides a data storage device capable of improving the security of stored data and improving data transfer performance such as data transfer speed and data transfer accuracy.
[0024]
[Means for Solving the Problems]
In order to solve the above problem, a data storage device according to claim 1 of the present invention has a cache area for temporarily storing data, and a first area for temporarily recording data by the cache area. And a second recording medium having a buffer area for temporarily storing data and capable of semi-permanently storing data from the buffer area, and storing the data in the first recording medium. When storing the data in the second recording medium via a medium, after storing the data in the cache area, the data is transferred to the second recording medium and temporarily stored in the buffer area. A data storage device for storing data from the buffer area on the second recording medium and storing the data from the buffer area semi-permanently after a predetermined time has elapsed, wherein the data is stored in the cache area. When deleting data, the execution of the deletion is waited until the elapsed time after the data to be deleted is transferred to the second recording medium is equal to or longer than the predetermined time. And
[0025]
As described above, it is possible to guarantee that the data temporarily stored in the buffer area of the second recording medium always exists on the first recording medium.
A data storage device according to a second aspect of the present invention has a cache area for temporarily storing data, a first storage medium for temporarily storing data in the cache area, A second recording medium that can be stored semi-permanently, and when data is stored in the second recording medium via the first recording medium, the data is stored in the cache area. A data storage device for transferring the data to the second recording medium and storing the data semi-permanently, and acquires statistical information on the frequency of abnormal termination of the second recording medium. The timing for transferring data in the cache area to the second recording medium is controlled based on the timing.
[0026]
As described above, if abnormal termination such as sudden power-off or removal of the second recording medium during operation frequently occurs, the cache area on the first recording medium is frequently flushed and the second recording medium is flushed. If there is no abnormal termination of the second recording medium, the interval of executing the flush to the cache area on the first recording medium may be extended to reduce the risk of the stored data becoming inconsistent. 2 can ensure continuity of data written to the recording medium.
[0027]
A data storage device according to a third aspect of the present invention is the data storage device according to the second aspect, wherein the data storage device is activated as statistical information on the frequency of abnormal termination of the second recording medium in the past. It is characterized in that it is configured to have the number of times and the number of times of normal termination.
[0028]
As described above, as the statistical information on the frequency of abnormal termination of the second recording medium in the past, the frequency of past abnormal termination in the second recording medium is obtained from the number of times of activation and the number of normal termination of the second recording medium. If it is determined based on the frequency that there is a risk of an abnormal end such as sudden power-off or removal of the second recording medium during operation, the cache area on the first recording medium is frequently flushed. Then, if it is determined that there is no danger that the data stored in the second recording medium will be in an inconsistent state and there is no danger of abnormal termination of the second recording medium, the cache on the first recording medium is The continuity of the data written to the second recording medium can be ensured by lengthening the interval at which the area is flushed.
[0029]
A data storage device according to a fourth aspect of the present invention has a cache area for temporarily storing data, a first recording medium for temporarily recording data in the cache area, A second recording medium having a buffer area for temporarily storing the data, and capable of semi-permanently storing data from the buffer area; and storing the data in the second storage medium via the first recording medium. When the data is stored in the storage medium, after storing the data in the cache area, the data is transferred to the second storage medium and temporarily stored in the buffer area. A data storage device that records data from the buffer area on the second recording medium semi-permanently when the data is passed, and deletes the data stored in the cache area; The execution of the deletion is waited until the elapsed time from the transfer of the deletion target data onto the second recording medium becomes equal to or longer than the predetermined time, and the frequency of abnormal termination of the second recording medium And acquiring timing information on the cache area based on the statistical information, and controlling a timing of transferring data in the cache area to the second recording medium based on the statistical information.
[0030]
As described above, it is ensured that the data temporarily recorded in the buffer area of the second recording medium always exists in the first recording medium, and that the power is suddenly turned off or the second recording during operation is performed. If the abnormal termination such as removal of the medium frequently occurs, the cache area on the first recording medium is frequently flushed to reduce the risk that the data stored in the second recording medium may become inconsistent. If there is no abnormal end of the second recording medium, it is possible to secure the continuity of the data to be written to the second recording medium by increasing the interval at which the flush to the cache area on the first recording medium is executed. it can.
[0031]
The data storage device according to claim 5 of the present invention has a first storage medium for temporarily storing data, and a second storage medium capable of storing data semi-permanently, Is stored in the second recording medium via the first recording medium, the data is temporarily stored in the first recording medium, and then the data is stored in the second recording medium. A data storage device for transferring and temporarily storing data, and after a predetermined time has elapsed, semi-permanently storing data in the second recording medium, wherein the data is stored in the first recording medium. When data is deleted, the execution of the deletion is waited until the elapsed time after the data to be deleted is transferred onto the second recording medium is equal to or longer than the predetermined time. I do.
[0032]
As described above, it is possible to guarantee that the data temporarily recorded on the second recording medium always exists on the first recording medium.
The data storage device according to claim 6 of the present invention includes a first storage medium for temporarily storing data, and a second storage medium capable of storing data semi-permanently, Is stored in the second recording medium via the first recording medium, the data is temporarily stored in the first recording medium, and then the data is stored in the second recording medium. A data storage device for transferring and semi-permanently storing, acquiring statistical information on the frequency of abnormal termination of the second recording medium, and storing data on the first recording medium based on the statistical information. The timing for transferring data to the second recording medium is controlled.
[0033]
As described above, statistical information on the frequency of abnormal termination of the second recording medium is obtained, and if the probability of abnormal termination of the second recording medium is high based on the statistical information, the first recording medium is frequently flushed. Then, the risk that the data stored in the second recording medium becomes inconsistent is suppressed, and if there is no possibility that the second recording medium is abnormally terminated, the interval for executing the flush to the first recording medium is set. And the continuity of the write data to the second recording medium can be ensured.
[0034]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a data storage device according to an embodiment of the present invention will be specifically described with reference to the drawings.
[0035]
FIG. 1 is a block diagram showing the overall configuration of the data storage device of the present embodiment. FIG. 2 is a flowchart showing a flow of a data transfer process in the data storage device of the present embodiment.
[0036]
In FIG. 1, a data storage device 1000 has a removable hard disk drive (removable hard disk drive (removable HDD)) 500 as a recording medium for recording data as a file 92, and controls operations in the device via a system bus 600. The communication between the processor 200, the main memory 300 which is a temporary working recording area of the processor 200, the file system 100 for managing access to the file 92 on the removable HDD 500, and the external device connected via the communication line 4000 is executed. And a communication processing unit 700.
[0037]
The main use of the data storage device 1000 is to store data passed through the communication line 4000 in the removable HDD 500, and conversely, to transfer the data stored in the removable HDD 500 to an external device through the communication line 4000. It is to pass to.
[0038]
The file system 100 includes a nonvolatile internal memory 120 for temporarily storing data exchanged with a recording medium, an HDD transfer control unit 140 for executing data transfer with the removable HDD 500, and an operation of the entire file system 100. And a file system control unit 110 for controlling
[0039]
The non-volatile internal memory 120 has an HDD cache 121 for caching data for the removable HDD 500. The timing of writing the data staying in the HDD cache 121 to the removable HDD 500 is instructed by the flash activation unit 111 of the file system control unit 110 through the control bus 150. The flash activation unit 111 performs control based on flash management information 112 which is information for managing flash of the HDD cache 121.
[0040]
The removable HDD 500 includes an HDD control unit 510 that performs recording / reproduction based on an instruction from the HDD transfer control unit 140, an HDD management information 520 in which management information used by the HDD control unit 510 is recorded, an HDD transfer control The disk unit 590 in which data from the unit 140 is recorded, the HDD read buffer 530 in which data read from the disk unit 590 is temporarily stored, and the data passed from the HDD transfer control unit 140 are temporarily stored. And an HDD write buffer 531 stored in the HDD.
[0041]
The HDD write buffer 531 and the HDD read buffer 530 are provided to speed up access to the removable HDD 500 by the file system 100. The file system 100 can determine that the file write has been completed when the write to the HDD write buffer 531 by the HDD write process 31 is completed without waiting for the data to be written to be written to the disk 560 by the disk access process 34. In addition, if the data to be read by the file system 100 has been read in the past and exists in the HDD read buffer 530, the data can be read without having to access the disk 560.
[0042]
Although the HDD write buffer 531 and the HDD read buffer 530 are constructed on a semiconductor memory, access to the semiconductor memory is orders of magnitude faster than access to the disk 560. If the file access can be realized only by the access, the data transfer becomes very fast.
[0043]
The disk unit 590 in the removable HDD 500 includes a disk 560 on which stored data is recorded as a magnetic signal, a magnetic head 550 for reading and writing the magnetic signal on the disk 560, and a head for controlling reading and writing on the disk 560 by the magnetic head 550. And an access circuit 540.
[0044]
The HDD management information 520 includes a media identifier 523 for identifying each removable HDD 500, start number data 521 indicating the number of times this removable HDD 500 has been started, and normal end number data indicating the number of times this removable HDD 500 has normally ended. 522. The HDD management information 520 is recorded as nonvolatile information that does not lose information even when the power of the removable HDD 500 is turned off. The media identifier 523 is read-only information, but the start count data 521 and the normal end count data 522 are updated by the HDD control unit 510 based on information from the file system 100.
[0045]
The activation count data 521 is incremented by one when the initialization process (called mount process) of the removable HDD 500 is successful. The mounting process of the removable HDD 500 is performed by the file system 100 when the removable HDD 500 is newly inserted into the operating data storage device 1000 or when the power of the data storage device 1000 into which the removable HDD 500 is inserted is turned on. The execution is performed, and the execution result is notified to the HDD control unit 510 via the HDD transfer control unit 140.
[0046]
The normal termination count data 522 is incremented by one when the termination processing (called unmount processing) of the removable HDD 500 is successful. The unmounting process of the removable HDD 500 is a process executed by the file system 100 before turning off the power of the data storage device 1000 in which the removable HDD 500 is inserted or before removing the removable HDD 500. If the data exists, the data is written to the removable HDD 500.
[0047]
Here, the file 92 is accessed on a data block 95 basis. As shown in FIG. 2, the file system 100 receives a file write request from the processor 200 as a movement process of the data block 95 at the time of the access. Then, it is checked whether or not the HDD cache 121 has a free area for storing a data block to be written (in FIG. 2, data (6) 95-6d and data (7) 95-7d).
[0048]
In the example of FIG. 2, in the HDD cache 121, data (1) 95-1b, data (2) 95-2b, and data (3) 95-3b exist as flushed data 96, and , Data (4) 95-4b and data (5) 95-5b, and no free area exists.
[0049]
If there is not enough area in the HDD cache 121 to store the file write target data, the file system 100 extracts the longest unused entry in an attempt to create a free area for holding the above two data. Activate the means 123. The longest unused entry extracting unit 123 selects a data block that has not been hit for a long time from the flushed data 96 and discards it. This is an algorithm that deletes a data block that has a low possibility of a cache hit in the future based on the assumption that a data block that has not been accessed in the past will be unlikely to be accessed in the future.
[0050]
In FIG. 2, among the flashed data 96, data (1) 95-1b has been read-accessed by the file read processing 16, but data (2) 95-2b and data (3) 95-3b have been read-accessed. Have never been accessed. Therefore, the data (2) 95-2b and the data (3) 95-3b are taken out of the HDD cache 121, temporarily stored in the discard standby queue 124, and then deleted from the HDD cache 121. In the deleted area of the cache 121, the data (6) 95-6d and the data (7) 95-7d to be written in the main memory 300 are stored by the file write processing 17.
[0051]
As described above, the present embodiment is characterized in that data to be deleted from the HDD cache 121 is temporarily stored in the destruction wait queue 124, and the time for which data remains in the destruction wait queue 124 is determined by the HDD write processing. The data to be deleted is made longer than the data residence time in the HDD write buffer 531 in the removable HDD 500 after 31 and the data to be deleted is completely recorded from the HDD write buffer 531 to the disk 560 in the removable HDD 500 after the HDD write processing 31. By waiting for data deletion processing from the HDD cache 121 on the nonvolatile internal memory 120 or destruction processing from the destruction wait queue 124 until the data is permanently recorded in the non-volatile internal memory 120, the HDD write buffer 531 is temporarily stored in the HDD write buffer 531. Data (Fig. 2 , Data (2) 95-2a and data (3) 95-3a) also in the HDD cache 121 or discard the wait queue 124 in the file system 100 is guaranteed to exist.
[0052]
Thus, even when the removable HDD 500 ends abnormally, the data being written at that time is stored in the file system 100, and when the removable HDD 500 is restarted, the stored data status at the time of the abnormal end Can be restored.
[0053]
Further, the flash activation unit 111 in the file system 100 communicates with the HDD control unit 510 in the removable HDD 500 to transfer the transfer control information 33 in the mounting process for the removable HDD 500. At this time, the media identifier 523, the number-of-starts data 521, and the number-of-normal-ends data 522, which are the HDD management information 520 of the removable HDD 500, are passed to the flash activation unit 111, and the media identifier 113 and the media activation number are respectively included in the flash management information 112. The data 114 and the media normal end count data 115 are stored.
[0054]
If the removable HDD 500 terminates abnormally (that is, if the power is turned off without executing the unmount processing), the media identifier 113 at that time is saved, and when the mount processing is next executed, the media of the new removable HDD is executed. It is compared with the identifier 523. If the two are the same, it is determined that the removable HDD 500 that was abnormally terminated last time has been restarted, and the data stored in the discard standby queue 124 and the data in the HDD cache 121 are written to the removable HDD 500, and the abnormal termination is performed. Restore the saved data state at the time.
[0055]
Next, a procedure for flushing data in the HDD cache 121 will be described.
The flush may be executed at any timing or in any order as long as the HDD cache 121 does not overflow. In order to increase the data transfer speed, it is preferable to extend the flash interval as much as possible and write continuous data to the removable HDD 500 collectively. By writing continuous data to the disk 560 collectively, a waiting time for a time (referred to as a seek time) required for the magnetic head 550 to move to the recording position can be omitted.
[0056]
However, the longer the flushing interval is, the longer the time that the stored data is only in the HDD cache 121 and is not written to the removable HDD 500 is longer. The risk of inconsistent data is increased. The frequency of the abnormal termination of the removable HDD 500 depends on the user's usage of the data storage device 1000. Before disconnecting the removable HDD 500 or turning off the power of the data storage device 1000, the user who executes the unmounting process does not cause abnormal termination. If the user does not perform the unmounting process, abnormal termination occurs if the flush interval is set longer. Frequently occur.
[0057]
On the other hand, the data storage device 1000 according to the present embodiment estimates the danger of abnormal termination from the media activation count data 114 and the media normal termination count data 115 in the flash management information 112, and according to the danger. It is characterized in that the frequency of executing the flush is determined.
[0058]
The flash activation unit 111 subtracts (subtracts) the media normal end count data 115 from the media start count data 114 to determine the number of times the currently inserted removable HDD 500 has abnormally ended in the past. If it is determined that the removable HDD 500 has been used in a state where it is likely to be abnormally terminated, the flash is frequently executed, and the data stored in the disk 560 in the removable HDD 500 may become inconsistent. On the other hand, when the removable HDD 500 has almost no abnormal termination, the flush interval can be increased to ensure the continuity of data written to the disk 560 in the removable HDD 500.
[0059]
As a result, the security of the stored data can be improved, and the data transfer performance such as data transfer speed and data transfer accuracy can be improved.
[0060]
【The invention's effect】
As described above, according to the present invention, the statistical information on the frequency of the abnormal termination of the second recording medium is acquired, and if the probability of the abnormal termination of the second recording medium is high from the statistical information, the first information is obtained. If the cache area of the second recording medium is frequently flushed to reduce the risk of inconsistent data stored in the second recording medium, and if there is no possibility that the second recording medium is abnormally terminated, the first The continuity of the data written to the second recording medium can be ensured by increasing the interval at which the flush to the cache area of the recording medium is executed.
[0061]
When data is deleted from the cache area on the first recording medium, data is deleted from the cache area on the first recording medium until the data to be deleted is permanently recorded on the second recording medium. Is assured that data temporarily recorded on the second recording medium always exists on the first recording medium, and when the second recording medium is restarted, The saved data status at the end can be restored.
[0062]
As a result, the security of the stored data can be improved, and the data transfer performance such as data transfer speed and data transfer accuracy can be improved.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a data storage device according to an embodiment of the present invention.
FIG. 2 is a flowchart of a data transfer process in the data storage device according to the embodiment;
FIG. 3 is a block diagram showing a configuration of a conventional data storage device.
FIG. 4 is a flowchart of a data transfer process in the conventional data storage device.
[Explanation of symbols]
16 File read processing
17 File Write Processing
31 HDD write processing
33 Transfer control information
34 Disk access processing
92 files
95 data blocks
96 Flushed data
97 Unflashed data
100 file system
110 File System Control Unit
111 Flash activation means
112 Flash management information
113 Media identifier
114 Media activation count data
115 Media normal end count data
120 Non-volatile internal memory
121 HDD Cache
123 Longest unused entry extraction means
124 Discard wait queue
140 HDD transfer control unit
150 control bus
200 processor
300 main memory
500 Removable Hard Disk Drive (Removable HDD)
510 HDD control unit
520 HDD management information
521 HDD start count data
522 HDD normal end count data
523 Media identifier
530 HDD read buffer
531 HDD write buffer
540 Head Access Circuit
550 magnetic head
560 disks
590 disk unit
600 system bus
700 Communication processing unit
1000 data storage device
4000 communication line

Claims (6)

データを一時的に保存するためのキャッシュ領域をもち、そのキャッシュ領域によりデータを一時的に記録する第1の記録媒体と、データを一時的に保存するためのバッファ領域をもち、そのバッファ領域からのデータを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記キャッシュ領域に保存した後に、そのデータを前記第2の記録媒体に転送して前記バッファ領域に一時的に保存し、その後、所定の時間が経過すると、前記バッファ領域からのデータを前記第2の記録媒体に記録して半永続的に保存するデータ保存装置であって、前記キャッシュ領域に保存されたデータを削除する場合、その削除対象データが前記第2の記録媒体上に転送されてからの経過時間が前記所定の時間以上になるまで、前記削除の実行を待機するよう構成したことを特徴とするデータ保存装置。It has a cache area for temporarily storing data, a first recording medium for temporarily recording data by the cache area, and a buffer area for temporarily storing data. A second recording medium capable of semi-permanently storing data, and when storing the data in the second recording medium via the first recording medium, storing the data in the cache area. After the data is transferred to the second recording medium, the data is transferred to the second recording medium and temporarily stored in the buffer area. After a predetermined time has elapsed, the data from the buffer area is transferred to the second recording medium. And a semi-permanent data storage device for deleting data stored in the cache area, the data to be deleted is transferred to the second recording medium. Until the elapsed time from is equal to or larger than the prescribed time, the data storage apparatus characterized by being configured so as to wait for execution of the deletion. データを一時的に保存するためのキャッシュ領域をもち、そのキャッシュ領域によりデータを一時的に記録する第1の記録媒体と、データを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記キャッシュ領域に保存した後に、そのデータを前記第2の記録媒体に転送して半永続的に保存するデータ保存装置であって、前記第2の記録媒体の異常終了した頻度に関する統計情報を取得し、前記統計情報に基づいて前記キャッシュ領域上のデータを前記第2の記録媒体に転送するタイミングを制御するよう構成したことを特徴とするデータ保存装置。A first recording medium having a cache area for temporarily storing data and temporarily recording data in the cache area; and a second recording medium capable of semi-permanently storing data. When data is stored in the second storage medium via the first storage medium, after storing the data in the cache area, the data is transferred to the second storage medium and stored in the second storage medium. A data storage device for storing data permanently, acquiring statistical information on the frequency of abnormal termination of the second recording medium, and storing data in the cache area in the second recording medium based on the statistical information. A data storage device configured to control transfer timing. 請求項2に記載のデータ保存装置であって、前記第2の記録媒体が過去に異常終了した頻度に関する統計情報として、起動された回数と正常終了した回数をもつよう構成したことを特徴とするデータ保存装置。3. The data storage device according to claim 2, wherein the second recording medium is configured to have the number of times of activation and the number of times of normal termination as statistical information on the frequency of abnormal termination in the past. Data storage device. データを一時的に保存するためのキャッシュ領域をもち、そのキャッシュ領域によりデータを一時的に記録する第1の記録媒体と、データを一時的に保存するためのバッファ領域をもち、そのバッファ領域からのデータを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記キャッシュ領域に保存した後に、そのデータを前記第2の記録媒体に転送して前記バッファ領域に一時的に保存し、その後、所定の時間が経過すると、前記バッファ領域からのデータを前記第2の記録媒体に記録して半永続的に保存するデータ保存装置であって、前記キャッシュ領域に保存されたデータを削除する場合、その削除対象データが前記第2の記録媒体上に転送されてからの経過時間が前記所定の時間以上になるまで、前記削除の実行を待機するとともに、前記第2の記録媒体の異常終了した頻度に関する統計情報を取得し、前記統計情報に基づいて前記キャッシュ領域上のデータを前記第2の記録媒体に転送するタイミングを制御するよう構成したことを特徴とするデータ保存装置。It has a cache area for temporarily storing data, has a first recording medium for temporarily recording data by the cache area, and a buffer area for temporarily storing data. A second recording medium capable of semi-permanently storing data, and when storing the data in the second recording medium via the first recording medium, storing the data in the cache area. After that, the data is transferred to the second recording medium and temporarily stored in the buffer area. After a predetermined time has elapsed, the data from the buffer area is transferred to the second recording medium. A data storage device for storing data in the cache area in a semi-permanent manner, and when deleting data stored in the cache area, the data to be deleted is transferred to the second recording medium. Waiting for execution of the deletion until the elapsed time from the second recording medium becomes equal to or longer than the predetermined time, acquiring statistical information on the frequency of abnormal termination of the second recording medium, and based on the statistical information, A data storage device configured to control a timing at which data in an area is transferred to the second recording medium. データを一時的に記録する第1の記録媒体と、データを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記第1の記録媒体に一時的に保存した後に、そのデータを前記第2の記録媒体に転送して一時的に保存し、その後、所定の時間が経過すると、データを前記第2の記録媒体に半永続的に保存するデータ保存装置であって、前記第1の記録媒体に保存されたデータを削除する場合、その削除対象データが前記第2の記録媒体上に転送されてからの経過時間が前記所定の時間以上になるまで、前記削除の実行を待機するよう構成したことを特徴とするデータ保存装置。A first recording medium for temporarily recording data, and a second recording medium capable of semi-permanently storing data, wherein the data is stored on the second recording medium via the first recording medium In the case of storing the data, the data is temporarily stored in the first recording medium, and then the data is transferred to the second recording medium and temporarily stored. Then, the data storage device semi-permanently stores data in the second recording medium, and when the data stored in the first recording medium is deleted, the deletion target data is the second recording medium. A data storage device configured to wait for execution of the deletion until an elapsed time after being transferred onto the medium is equal to or longer than the predetermined time. データを一時的に記録する第1の記録媒体と、データを半永続的に保存可能な第2の記録媒体とを有し、データを前記第1の記録媒体を介して前記第2の記録媒体に保存する場合には、前記データを前記第1の記録媒体に一時的に保存した後に、そのデータを前記第2の記録媒体に転送して半永続的に保存するデータ保存装置であって、前記第2の記録媒体の異常終了した頻度に関する統計情報を取得し、前記統計情報に基づいて前記第1の記録媒体上のデータを前記第2の記録媒体に転送するタイミングを制御するよう構成したことを特徴とするデータ保存装置。A first recording medium for temporarily recording data, and a second recording medium capable of semi-permanently storing data, wherein the data is stored on the second recording medium via the first recording medium If the data is stored in the data storage device, the data is temporarily stored in the first recording medium, and then the data is transferred to the second recording medium and stored semi-permanently, Statistical information on the frequency of abnormal termination of the second recording medium is obtained, and the timing of transferring data on the first recording medium to the second recording medium is controlled based on the statistical information. A data storage device, characterized in that:
JP2003099769A 2003-04-03 2003-04-03 Data storage device Pending JP2004310228A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003099769A JP2004310228A (en) 2003-04-03 2003-04-03 Data storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003099769A JP2004310228A (en) 2003-04-03 2003-04-03 Data storage device

Publications (1)

Publication Number Publication Date
JP2004310228A true JP2004310228A (en) 2004-11-04

Family

ID=33464083

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003099769A Pending JP2004310228A (en) 2003-04-03 2003-04-03 Data storage device

Country Status (1)

Country Link
JP (1) JP2004310228A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210062A (en) * 2010-03-30 2011-10-20 Canon Inc Storing apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210062A (en) * 2010-03-30 2011-10-20 Canon Inc Storing apparatus

Similar Documents

Publication Publication Date Title
KR101702201B1 (en) Optimized context drop for a solid state drive(ssd)
US6732293B1 (en) Method, software and apparatus for recovering and recycling data in conjunction with an operating system
KR100706808B1 (en) Data storage apparatus with non-volatile memory operating as write buffer and its block reclaim method
US7921258B1 (en) Nonvolatile disk cache for data security
US7085955B2 (en) Checkpointing with a write back controller
US8578089B2 (en) Storage device cache
JP2008276646A (en) Storage device and data management method for storage device
CA2651545A1 (en) Block-based storage system having recovery memory to prevent loss of data from volatile write cache
KR20100096075A (en) Local flash memory and remote server hybrid continuous data protection
WO2015054897A1 (en) Data storage method, data storage apparatus, and storage device
US20080183922A1 (en) Method, Apparatus And Software For Processing Input Or Output Requests For A Mirrored Storage Volume
KR20070061345A (en) Method for guarantying data storing space using dual journaling
US7055055B1 (en) Write cache flushing method for reducing data corruption
KR20170002848A (en) Apparatus and method for journaling based on garbage collection
US8423702B2 (en) Method and system of conserving battery power in a mobile computer system
JP3984789B2 (en) Method for handling data contamination and shared disks in saving, using, and recovering data, and computer-readable recording media
JP2006099802A (en) Storage controller, and control method for cache memory
JP2008140459A (en) Hybrid disk storage device and disk write-method applied to the device
KR20190089796A (en) Video managing apparatus and method of surveillance systems
JP2004310228A (en) Data storage device
KR100981064B1 (en) A method to maintain software raid consistency using journaling file system
JP2008269520A (en) Recorder and recording method
EP1091299A2 (en) Method, software and apparatus for recovering data in conjunction with an operating system
JP6242054B2 (en) Information processing apparatus, information processing method, and program
JP2008262452A (en) Cache method of recording device, and recording device