JP3967080B2 - Virtual disk control system and virtual disk control program - Google Patents

Virtual disk control system and virtual disk control program Download PDF

Info

Publication number
JP3967080B2
JP3967080B2 JP2001021444A JP2001021444A JP3967080B2 JP 3967080 B2 JP3967080 B2 JP 3967080B2 JP 2001021444 A JP2001021444 A JP 2001021444A JP 2001021444 A JP2001021444 A JP 2001021444A JP 3967080 B2 JP3967080 B2 JP 3967080B2
Authority
JP
Japan
Prior art keywords
data
disk device
mapping table
real
data mapping
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001021444A
Other languages
Japanese (ja)
Other versions
JP2002229741A (en
Inventor
宏治 伊藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2001021444A priority Critical patent/JP3967080B2/en
Publication of JP2002229741A publication Critical patent/JP2002229741A/en
Application granted granted Critical
Publication of JP3967080B2 publication Critical patent/JP3967080B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、データをランダムにディスク装置にライトする仮想ディスク制御システムおよび仮想ディスク制御プログラムに関するものである。
【0002】
【従来の技術】
従来、ディスク装置へのライト(データの書き込み)は、図7に示すように、ディスク装置のヘッドを所定位置に位置付け(seek)、次に、データをライト(write)するということを繰り返し、データをランダムな位置に書き込んでいた。
【0003】
また、バックアップは磁気テープなどの外部媒体に退避してデータを保存するようにしていた。
【0004】
【発明が解決しようとする課題】
上述したように、従来のディスク装置へのデータのライトは、図7に示すように、seek、writeという動作をデータの書き込み毎に繰り返す必要があり、seekが毎回発生して高速にライトできないという問題があった。
【0005】
また、ディスク装置上のデータをバックアップするには、ディスク装置上のあちこちのデータをseek、readして磁気テープなどの外部媒体にシーケンシャルに連続して書き込む必要があり、長時間を要するという問題もあった。
【0006】
本発明は、これらの問題を解決することを目的としている。
【0007】
【課題を解決するための手段】
図1を参照して課題を解決するための手段を説明する。
図1において、仮想ディスク装置4は、アプリ2,3などがデータをランダムな位置に書き込もうとする仮想的なディスク装置である。
【0008】
乱ライト・順ライト変換機構5は、仮想ディスク装置4への乱ライトを、実ディスク装置12に順ライトなどするものであって、データマッピングテーブル8、バックアッププログラム10などから構成されるものである。
【0009】
データマッピングテーブル8は、仮想ディスク装置4上のランダムなライト位置と、実ディスク装置12上の順のライト位置とを対応づけて記憶するものである。
【0010】
バックアッププログラム10は、実ディスク装置12上のデータをバックアップするものである。
次に、動作を説明する
アプリ2,3から仮想ディスク装置4へのランダムな位置へのライトがあると、乱ライト・順ライト変換機構5が実ディスク装置12の所定位置から順にライトすると共に、仮想ディスク装置4のランダムに書き込む位置と、実ディスク装置12に順に書き込んだ位置とを対応つけてデータマッピングテーブル8に記憶するようにしている。
【0011】
この際、仮想ディスク装置4のランダムな位置に書き込む位置と、実ディスク装置12に順に書き込んだ位置とを対応づけてデータマッピングテーブル8に書き込む際に、データマッピングテーブル8に既に仮想ディスク装置4の書き込む位置に対応づけて実ディスク装置12の位置が記憶されていた場合には今回の実ディスク装置12の位置で更新し、一方、記憶されていなかった場合には今回の実ディスク装置12の位置を新規に書き込むようにしている。
【0012】
また、バックアッププログラム10がバックアップ指示時に、データマッピングテーブル8をコピーして保存すると共に、データマッピングテーブル8上のエントリに登録されている実ディスク装置12の位置のデータを削除禁止とセットするようにしている。
【0013】
従って、仮想ディスク装置4上の任意の位置にライトしたデータについて実ディスク装置12上で順に書き込むと共にデータマッピングテーブル8に両者の対応関係を記憶して高速ライトを実現すると共に、バックアップ時にデータマッピングテーブル8をコピーして保存および退避データの削除禁止にして高速バックアップを実現することが可能となる。
【0014】
【発明の実施の形態】
次に、図1から図6を用いて本発明の実施の形態および動作を順次詳細に説明する。
【0015】
図1は、本発明のシステム構成図を示す。
図1において、処理装置1は、プロセッサおよびメモリを有するコンピュータであって、プログラムに従い各種処理を実行するものであり、ここでは、アプリケーションプログラム(以下単にアプリという)2,3、仮想ディスク装置4、および乱ライト・順ライト変換機構5などから構成されるものである。
【0016】
アプリ2,3は、データを仮想ディスク装置4のランダムな位置にライトして各種処理を実行するものである。
仮想ディスク装置4は、アプリ2,3がランダムな位置にデータをライトする対象の仮想的なディスク装置4である。アプリ2,3からの当該仮想ディスク装置4へのランダムな位置へのライトは、乱ライト・順ライト変換機構5によって取り込まれて、順ライトに変換されて実ディスク装置12に順に書き込まれる。
【0017】
乱ライト・順ライト変換機構5は、アプリ2,3から仮想ディスク装置4のランダムな位置にライトされたデータを取り込み、順ライトに変換して実ディスク装置12に書き込むと共に、仮想ディスク装置4上のライト位置と、実ディスク装置12に書き込んだ位置とを対応づけてデータマッピングテーブル8に記憶して管理したりなどするものであって、ここでは、データマッピング管理プログラム6、データビットマップ管理プログラム7、データマッピングテーブル8、データビットマップテーブル9、バックアッププログラム10、実ディスクI/O管理プログラム11などから構成されるものである。
【0018】
データマッピング管理プログラム6は、データマッピングテーブル8を管理するものであって、仮想ディスク装置4のランダムにデータをライトした位置と、実ディスク装置12の所定位置から順にライトした位置とを対応づけて書き込んで記憶させるものである。例えば新規にデータを書き込む場合には、仮想ディスク装置4のライト位置と、実ディスク装置12の今回のライト位置とを対応づけて新規に記憶し、一方、データの更新を行う場合には、仮想ディスク装置4のライト位置に対応づけて記憶されている実ディスク装置12のライト位置を今回の当該実ディスク装置12のライト位置で更新する(図2から図5を用いて後述する)。
【0019】
データビットマップ管理プログラム7は、実ディスク装置12内の空セクタを管理するテーブルであって、ディスク番号、セクタ番号に対応づけて空き領域か、使用中領域かの区別を設定して管理するものである(図3の(b)参照)。
【0020】
データマッピングテーブル8は、仮想ディスク装置4のランダムなライト位置と、実ディスク装置12の順なライト位置とを対応づけて記憶するものである(図3の(a)参照)。
【0021】
データビットマップテーブル9は、実ディスク装置12の空きセクタを管理するテーブルである(図3の(b)参照)。
バックアッププログラム10は、実ディスク装置12上のデータをバックアップするものであって、データマッピングテーブル8をコピーして保存すると共にデータマッピングテーブル8のセクタの削除禁止フラグをセット(あるいは該当セクタを削除禁止にセット)などしてバックアップするものである(図6を用いて後述する)。
【0022】
実ディスクI/O管理プログラム11は、実ディスク装置12にデータを順にライトするものである(図2から図6を用いて後述する)。
実ディスク装置12は、仮想ディスク装置4上のランダムな位置にライトしたデータを、実際に順にライトする対象のディスク装置である。
【0023】
図4は、本発明の説明図を示す。
図4において、データマッピングテーブル8は、図示のように、仮想ディスク装置4の先頭から分割した領域(仮想アドレス、例えばセクタ番号)に対応づけてエントリを設け、当該エントリに実ディスク装置12上で当該データを順にライトした位置(実アドレス、セクタ番号)を記憶するものである。図示の状態では、
・仮想ディスク装置4上の仮想アドレスVA4,VA2,VA5のランダムの位置順でデータがライトされたので、
・1回目に、データマッピングテーブル8には仮想ディスク装置4のVA4から矢印で示す位置に実ディスク装置12に順にデータをライトした実アドレスRA1が記憶され、
・2回目に、データマッピングテーブル8には仮想ディスク装置4のVA2から矢印で示す位置に実ディスク装置12に順にデータをライトした実アドレスRA2が記憶され、
・3回目に、データマッピングテーブル8には仮想ディスク装置4のVA5から矢印で示す位置に実ディスク装置12に順にデータをライトした実アドレスRA3が記憶される。
【0024】
・次に、仮想ディスク装置4上の仮想アドレスVA2のデータに、新たなデータがライトされたので、
・4回目に、データマッピングテーブル8には仮想ディスク装置4のVA2から矢印で示す位置に実ディスク装置12に順にデータをライトした実アドレスRA4で更新する(図示のRA2からRA4に更新する)。
【0025】
以上のように、仮想ディスク装置4にライトしたときにそのデータを実ディスク装置12で新規の実アドレスに順にライトして当該ライトした実アドレスRAを、仮想ディスク装置4からポイントされるデータマッピングテーブル8の該当位置に実アドレスを書き込むあるいは更新することにより、仮想ディスク装置4ではランダムライトが、実ディスク装置12で順ライトと変換されて実行され、その仮想アドレスと実アドレスはデータマッピングテーブル8に記憶して管理でき、順ライトによる高速ライトが可能となる。
【0026】
図3は、本発明のテーブル例を示す。
図3の(a)は、データマッピングテーブル8の例を示す。このデータマッピングテーブル8は、仮想ディスク装置4と実ディスク装置12の対応セクタの管理テーブルであって、例えば図示の下記の情報を対応づけて書き込んで管理するものである。
【0027】
・フラグ(Shared Flag):
・1:セクタが旧バージョンと共有している(バックアップ済である)
・0:セクタが旧バージョンと共有していない(バックアップ未である)
・ディスク番号:
・セクタ番号:
ここで、フラグ(Shared Flag)は実ディスク装置12の当該セクタのデータの退避の有無を表し、1の場合には旧バージョンのデータと共有しており、削除禁止と設定されている旨を表し、0の場合は旧バージョンのデータと共有していなく、削除禁止と設定されていない旨を表す。ディスク番号、セクタ番号は、仮想ディスク装置4と、実ディスク装置12とのデータをライトした位置(領域、ここでは、セクタ)の対応を記憶するものである(図4参照)。
【0028】
以上のように、データマッピングテーブル8にフラグ(削除禁止フラグ)とディスク番号、セクタ番号を登録し、仮想ディスク装置4のランダムにライトした位置(セクタ)と、実ディスク装置12の実際に順にライトした位置(セクタ)とを対応づけて記憶し、管理することが可能となる。尚、両者のセクタの対応管理は、仮想ディスク装置4のセクタと、実ディスク装置12のセクタとを対にして記憶したり、仮想ディスク装置4のセクタに対応するエントリに実ディスク装置12の対応するセクタを記憶したりなどすればよい。
【0029】
図3の(b)は、データビットマップテーブル9の例を示す。このデータビットマップテーブル9は、実ディスク装置12の空セクタの管理テーブルであって、図示の下記の情報を対応づけて記憶したものである。
【0030】
・セクタ番号:
・ビット0あるいは1:
・0:空領域
1:使用中
ここで、セクタ番号に対応づけてビット0(空領域)あるいはビット1(使用中領域)を記憶することにより、実ディスク装置12について順に終わりまでデータをライトした後、先頭に近い空領域を順に探してライトし、領域の再利用を高速かつ簡易に行い、実ディスク装置12の効率的な順ライトを行うことが可能となる。
【0031】
図2は、本発明の動作説明フローチャートを示す。
図2において、S1は、ライト要求を受け付ける。
S2は、初めての書き出しか判別する。これは、後述する図4のデータマッピングテーブル8に仮想ディスク装置4のランダムなライト位置と、実ディスク装置12の順のライト位置との対応づけが記憶されていなく、初めての書き出し(ライト)か判別する。YESの場合には、初めての書き出しと判明したので、S5に進む。一方、NOの場合には、既にデータマッピングテーブル8に記憶されていると判明したので、S3に進む。
【0032】
S3は、S2で初めての書き出しでないと判明したので、更に、既にバックアップとなっているか判別する。これは、S1で受け付けたライト位置のデータが、既にバックアップ済と、データマッピングテーブル8の該当セクタのフラグ(削除禁止フラグ、Shared flag)がセットされているか判別する。YESの場合には、バックアップされており削除禁止にセットされていると判明したので、S5に進む。一方、NOの場合には、バックアップされていなく削除禁止とセットされていないと判明したので、S4で既にライトしているセクタの割り当て情報を解放し(データビットマップテーブル9の対応するエントリに0をセットする)、S5に進む。
【0033】
S5は、新しいセクタを割り当てる。
図5は、本発明の動作説明フローチャート(セクタ割当)を示す。
図5において、S11は、空き領域があるか判別する。これは、実ディスク装置12に、順にライトする空き領域があるか判別する。YESの場合には、S12で新しいセクタを割り当て(実ディスク装置12中の空の新しいセクタを割当て)、これに続いて割り当てたセクタにデータを順にライトする。一方、S11のNOの場合には、実ディスク装置12に割り当てる空領域がないと判明したので、S13に進む。
【0034】
S13は、実ディスク装置12の先頭にちかい空きセクタを探す。これは、既述した図3の(b)のデータビットマップテーブル9を参照し、先頭から空きのセクタを探す(先頭からビット0の空のセクタを探す)。
【0035】
S14は、空のセクタがあるか判別する。YESの場合には、空のセクタが見つかったので、S15で空のセクタを割り当て、これに続いて割り当てたセクタにデータを順にライトする。一方、S14のNOの場合には、空セクタがないと判明したので、S16で空領域不足でライト要求をエラーにする。
【0036】
以上のように、実ディスク装置12に順に空領域(空セクタ)があればそれを割り当ててデータを順にライトし、一方、空領域がなくなったときはデータビットマップテーブル9を参照して先頭から空領域(空セクタ)を探して見つけた空領域(空セクタ)を割り当ててデータを順にライトし、実ディスク装置12の空領域を有効利用することが可能となる。
【0037】
図2のS6は、データマッピングテーブル8を更新する。これは、仮想ディスク装置4のランダムに書き込む当該位置と、実ディスク装置12に順に書き込む当該位置とを対応づけて書き込み(更新し)、記憶する。
【0038】
S7は、データを実ディスク装置にライトする。
以上の手順によって、仮想ディスク装置4のランダムな任意の位置へのライト要求を受け付け、データマッピングテーブル8を参照して、既にライトした位置のデータのときで、かつバックアップ未の場合にはそのデータの領域(セクタ)を再利用できるように解放した後、実ディスク装置12の所定の位置からヘッドの移動方向が一定方向となる方向へ新しい領域(セクタ)を割り当てデータを順にライトすると共にデータマッピングテーブル8に仮想ディスク装置4のランダムにライトする位置と、実ディスク装置12の順にライトした位置とを対応づけて記憶することにより、アプリなどからの仮想ディスク装置4のランダムな位置へのライトを、実際には実ディスク装置12の順の領域の位置へのライトに変換して実行し、順ライトによる高速ライトを実現することが可能となる。
【0039】
図6は、本発明のバックアップ説明図を示す。これは、既述した図1の構成でデータをバックアップするときの手順およびその動作を説明するものである。
図6の(a)は、バックアップフローチャートを示す。
【0040】
図6の(a)において、S21は、バックアップ要求を受け付ける。これは、アプリ2,3あるいは管理者からバックアップ要求を、図1の乱ライト・順ライト変換機構5が受け付ける。
【0041】
S22は、データマッピングテーブル8をコピーする。これは、既述した図1、図3の(a)、図4のデータマッピングテーブル8をコピーして保存する。
S23は、コピー元のデータマッピングテーブル8の全てのエントリのフラグを”1”にする。これは、コピー元(カレント)のデータマッピングテーブル8の全てのエントリのセクタのフラグ、例えば図3の(a)の全てのエントリのセクタのフラグ(Shared Flag)を”1”(セクタが旧バージョンと共有しているを表す)にセットする。これにより、カレントのデータマッピングテーブル8の全てのエントリのセクタのフラグ(削除禁止フラグ)がセットされたので、当該データマッピングテーブル8で管理されている全てのセクタのデータが削除禁止と設定され、S22でコピーして保存したデータマッピングテーブル22のセクタのデータが全て保存(退避)されたこととなる。このように、データマッピングテーブル22をコピーして保存およびデータマッピングテーブル22の全エントリのセクタのフラグをセットするのみで全セクタのデータのバックアップを実現でき、極めて迅速かつ簡易に全セクタのデータのバックアップが可能となる。
【0042】
図6の(b)は、バックアップ説明図を示す。図中の上段のカレント(コピー元)のデータマッピングテーブル8を、下段に示すようにコピーして保存すると共に、上段のカレントのデータマッピングテーブル8の実アドレスの登録されている全てのエントリのセクタのフラグ(削除禁止フラグ)を1(削除禁止)にセットすることにより、全データをバックアップすることが可能となる。
【0043】
そして、バックアップ後に、仮想ディスク装置4の仮想アドレスVA4のデータを更新したので、当該データを実ディスク装置12の順のセクタ(実アドレスRA5)にライトすると共に、仮想ディスク装置4の仮想アドレスVA4に対応するデータマッピングテーブル8のエントリ中で、右向きの矢印で示す5(RA5)に更新する(尚、旧のセクタRA1のフラグ(削除禁止フラグ)が1にセットされており、削除されなく、バックアップされている)。このように、バックアップ後にもカレントのデータマッピングテーブル8を使用してデータの更新を行うことが可能となると共に、バックアップしたデータ(セクタ)の削除禁止フラグがセットされ、いずれのデータ(セクタ)をバックアップしたかはコピーして保存したデータマッピングテーブル8により判明する。
【0044】
尚、バックアップ時に、データマッピングテーブル8をコピーしていずれのデータを保存したかを記憶すると共に、保存したデータが書き込まれている実ディスク装置12上のセクタ自身あるいは別途設けたセクタ管理テーブルに当該セクタの削除禁止ビット(バックアップ済ビット)をセットするようにしてもよい。
【0045】
【発明の効果】
以上説明したように、本発明によれば、仮想ディスク装置4でランダムな位置にライトするデータを、実ディスク装置12上では順に書き込むと共にデータマッピングテーブル8に両者の対応位置を記憶する構成を採用しているため、ランダムライトを高速に実行できると共に、バックアップ時にデータマッピングテーブル8をコピーして保存および削除禁止にセットし、高速かつ簡易にバックアップできる。
【図面の簡単な説明】
【図1】本発明のシステム構成図である。
【図2】本発明の動作説明フローチャートである。
【図3】本発明のテーブル例である。
【図4】本発明の説明図である。
【図5】本発明の動作説明フローチャート(セクタ割当)である。
【図6】本発明のバックアップ説明図である。
【図7】従来技術の説明図である。
【符号の説明】
1:処理装置
2、3:アプリ(アプリケーションプログラム)
4:仮想ディスク装置
5:乱ライト・順ライト変換機構
6:データマッピング管理プログラム
7:データビットマップ管理プログラム
8:データマッピングテーブル
9:データビットマップテーブル
10:バックアッププログラム
11:実ディスクI/O管理プログラム
12:実ディスク装置
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a virtual disk control system and a virtual disk control program for randomly writing data to a disk device.
[0002]
[Prior art]
Conventionally, as shown in FIG. 7, data is written to the disk device by repeatedly positioning the head of the disk device at a predetermined position and then writing the data. Was written at random positions.
[0003]
Further, the backup is saved on an external medium such as a magnetic tape to save the data.
[0004]
[Problems to be solved by the invention]
As described above, in writing data to the conventional disk device, as shown in FIG. 7, it is necessary to repeat the operations of seek and write every time data is written, and the seek occurs every time and cannot be written at high speed. There was a problem.
[0005]
In addition, in order to back up data on the disk device, it is necessary to continuously read and write data on the disk device and write them sequentially to an external medium such as a magnetic tape, which takes a long time. there were.
[0006]
The present invention aims to solve these problems.
[0007]
[Means for Solving the Problems]
Means for solving the problem will be described with reference to FIG.
In FIG. 1, a virtual disk device 4 is a virtual disk device in which applications 2, 3 and the like try to write data at random positions.
[0008]
The random write / sequential write conversion mechanism 5 performs random write to the virtual disk device 4 in order to the real disk device 12, and is composed of a data mapping table 8, a backup program 10, and the like. .
[0009]
The data mapping table 8 stores a random write position on the virtual disk device 4 and a sequential write position on the real disk device 12 in association with each other.
[0010]
The backup program 10 backs up data on the real disk device 12.
Next, when there is a write to a random position from the applications 2 and 3 for explaining the operation to the virtual disk device 4, the random write / forward write conversion mechanism 5 writes sequentially from a predetermined position of the real disk device 12, A random writing position in the virtual disk device 4 and a position sequentially written in the real disk device 12 are associated with each other and stored in the data mapping table 8.
[0011]
At this time, when writing to the data mapping table 8 by associating the position written in the random position of the virtual disk device 4 and the position sequentially written in the real disk device 12 into the data mapping table 8, the virtual disk device 4 is already stored in the data mapping table 8. When the position of the real disk device 12 is stored in association with the writing position, the position is updated with the current position of the real disk device 12, while when it is not stored, the position of the current real disk device 12 is updated. Is written newly.
[0012]
Further, when the backup program 10 instructs to backup, the data mapping table 8 is copied and stored, and the data at the position of the real disk device 12 registered in the entry on the data mapping table 8 is set to prohibit deletion. ing.
[0013]
Accordingly, data written to an arbitrary position on the virtual disk device 4 is sequentially written on the real disk device 12, and the correspondence between both is stored in the data mapping table 8 to realize high-speed writing, and at the time of backup, the data mapping table It is possible to realize high speed backup by copying 8 and prohibiting deletion of saved and saved data.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments and operations of the present invention will be described in detail sequentially with reference to FIGS.
[0015]
FIG. 1 shows a system configuration diagram of the present invention.
In FIG. 1, a processing device 1 is a computer having a processor and a memory, and executes various processes according to a program. Here, application programs (hereinafter simply referred to as applications) 2 and 3, a virtual disk device 4, And a random light / forward light conversion mechanism 5 and the like.
[0016]
The applications 2 and 3 execute various processes by writing data to random positions of the virtual disk device 4.
The virtual disk device 4 is a virtual disk device 4 to which the applications 2 and 3 write data at random positions. Writes to random positions from the applications 2 and 3 to the virtual disk device 4 are taken in by the random write / forward write conversion mechanism 5, converted to forward write, and written sequentially to the real disk device 12.
[0017]
The random write / sequential write conversion mechanism 5 takes in data written at random positions in the virtual disk device 4 from the applications 2 and 3, converts the data into sequential write, writes it to the real disk device 12, and on the virtual disk device 4. The write position and the position written in the real disk device 12 are associated with each other and stored in the data mapping table 8 for management. Here, the data mapping management program 6, the data bitmap management program 7, a data mapping table 8, a data bitmap table 9, a backup program 10, a real disk I / O management program 11, and the like.
[0018]
The data mapping management program 6 manages the data mapping table 8, and associates the positions of the virtual disk device 4 to which data is written at random and the positions of the real disk device 12 that are sequentially written from a predetermined position. It is written and stored. For example, when data is newly written, the write position of the virtual disk device 4 and the current write position of the real disk device 12 are newly stored in association with each other. The write position of the real disk device 12 stored in association with the write position of the disk device 4 is updated with the current write position of the real disk device 12 (described later with reference to FIGS. 2 to 5).
[0019]
The data bitmap management program 7 is a table for managing empty sectors in the real disk device 12, and manages by setting the distinction between the free area and the used area in association with the disk number and sector number. (See FIG. 3B).
[0020]
The data mapping table 8 stores a random write position of the virtual disk device 4 and a sequential write position of the real disk device 12 in association with each other (see FIG. 3A).
[0021]
The data bitmap table 9 is a table for managing free sectors of the real disk device 12 (see FIG. 3B).
The backup program 10 backs up data on the real disk device 12, and copies and saves the data mapping table 8 and sets a sector deletion prohibition flag in the data mapping table 8 (or prohibits deletion of the sector). And the like (which will be described later with reference to FIG. 6).
[0022]
The real disk I / O management program 11 sequentially writes data to the real disk device 12 (to be described later with reference to FIGS. 2 to 6).
The real disk device 12 is a disk device to which data written at random positions on the virtual disk device 4 is actually written sequentially.
[0023]
FIG. 4 is an explanatory diagram of the present invention.
4, the data mapping table 8 is provided with an entry corresponding to an area (virtual address, for example, sector number) divided from the head of the virtual disk device 4 as shown in FIG. The position (real address, sector number) where the data is sequentially written is stored. In the state shown,
Since the data was written in the random position order of the virtual addresses VA4, VA2 and VA5 on the virtual disk device 4,
In the first time, the data mapping table 8 stores the real address RA1 in which data is sequentially written to the real disk device 12 from the VA4 of the virtual disk device 4 to the position indicated by the arrow.
Second, the data mapping table 8 stores the real address RA2 in which data is sequentially written to the real disk device 12 from the VA2 of the virtual disk device 4 to the position indicated by the arrow.
In the third time, the data mapping table 8 stores the real address RA3 in which data is sequentially written to the real disk device 12 from the VA 5 of the virtual disk device 4 to the position indicated by the arrow.
[0024]
Next, since new data has been written to the data of the virtual address VA2 on the virtual disk device 4,
In the fourth time, the data mapping table 8 is updated with the real address RA4 in which data is sequentially written to the real disk device 12 from the VA2 of the virtual disk device 4 to the position indicated by the arrow (update from RA2 to RA4 in the drawing).
[0025]
As described above, when data is written to the virtual disk device 4, the data is sequentially written to the new real address by the real disk device 12, and the written real address RA is pointed to by the virtual disk device 4. By writing or updating the real address in the corresponding position 8, the random write is converted into the sequential write in the virtual disk device 4 and executed in the virtual disk device 4, and the virtual address and the real address are stored in the data mapping table 8. It can be stored and managed, and high-speed writing by forward writing is possible.
[0026]
FIG. 3 shows an example table of the present invention.
FIG. 3A shows an example of the data mapping table 8. The data mapping table 8 is a management table of corresponding sectors of the virtual disk device 4 and the real disk device 12, and for example, the following information shown in FIG.
[0027]
-Flag (Shared Flag):
・ 1: Sector is shared with the previous version (already backed up)
-0: The sector is not shared with the previous version (not backed up)
・ Disk number:
・ Sector number:
Here, the flag (Shared Flag) indicates whether or not the data in the sector of the real disk device 12 is saved, and in the case of 1, it indicates that the data is shared with the old version data and is set to prohibit deletion. , 0 indicates that the data is not shared with the data of the previous version and that deletion is not prohibited. The disk number and sector number store the correspondence between positions (areas, here, sectors) at which data is written between the virtual disk device 4 and the real disk device 12 (see FIG. 4).
[0028]
As described above, the flag (deletion prohibition flag), the disk number, and the sector number are registered in the data mapping table 8, and the randomly written position (sector) of the virtual disk device 4 and the actual disk device 12 are actually written in order. It is possible to store and manage the positions (sectors) associated with each other. The correspondence management of both sectors is performed by storing the sector of the virtual disk device 4 and the sector of the real disk device 12 as a pair, or the correspondence of the real disk device 12 to the entry corresponding to the sector of the virtual disk device 4. For example, a sector to be stored may be stored.
[0029]
FIG. 3B shows an example of the data bit map table 9. The data bit map table 9 is a management table of empty sectors of the real disk device 12, and stores the following information shown in association with each other.
[0030]
・ Sector number:
-Bit 0 or 1:
0: Empty area 1: In use Here, data is written to the real disk device 12 in order in order by storing bit 0 (empty area) or bit 1 (in-use area) in association with the sector number. Thereafter, empty areas close to the head are searched and written in order, and the areas can be reused at high speed and simply, and efficient sequential writing of the real disk device 12 can be performed.
[0031]
FIG. 2 shows a flowchart for explaining the operation of the present invention.
In FIG. 2, S1 accepts a write request.
In S2, it is determined whether or not writing is the first time. This is because the correspondence between the random write position of the virtual disk device 4 and the sequential write position of the real disk device 12 is not stored in the data mapping table 8 of FIG. Determine. In the case of YES, since it is determined that the writing is the first time, the process proceeds to S5. On the other hand, in the case of NO, since it is found that the data mapping table 8 has already been stored, the process proceeds to S3.
[0032]
In S3, since it has been determined that the writing is not the first time in S2, it is further determined whether or not it is already a backup. This determines whether the data at the write position accepted in S1 has already been backed up and the flag of the corresponding sector in the data mapping table 8 (deletion prohibition flag, Shared flag) is set. In the case of YES, since it is found that the data is backed up and set to prohibit deletion, the process proceeds to S5. On the other hand, in the case of NO, it has been found that the data has not been backed up and that deletion prohibition has been set, so the allocation information of the sector already written in S4 is released (the corresponding entry in the data bitmap table 9 is set to 0). ), And proceed to S5.
[0033]
S5 allocates a new sector.
FIG. 5 shows an operation explanation flowchart (sector allocation) of the present invention.
In FIG. 5, S11 determines whether there is a free area. This is to determine whether the real disk device 12 has a free area to be written in order. In the case of YES, a new sector is allocated in S12 (an empty new sector in the real disk device 12 is allocated), and subsequently data is sequentially written to the allocated sector. On the other hand, in the case of NO in S11, since it has been found that there is no free area to be allocated to the real disk device 12, the process proceeds to S13.
[0034]
In S13, an empty sector near the head of the real disk device 12 is searched. This is done by referring to the data bit map table 9 in FIG. 3B described above to search for an empty sector from the top (search for an empty sector of bit 0 from the top).
[0035]
S14 determines whether there is an empty sector. In the case of YES, since an empty sector has been found, an empty sector is assigned in S15, and subsequently data is sequentially written into the assigned sector. On the other hand, in the case of NO in S14, since it has been found that there is no empty sector, in S16, a write request is made an error due to insufficient empty area.
[0036]
As described above, if there is an empty area (empty sector) in sequence in the real disk device 12, it is assigned and data is written in order. On the other hand, when there is no more empty area, the data bitmap table 9 is referred to from the beginning. The empty area (empty sector) found by searching for the empty area (empty sector) is allocated and the data is sequentially written, so that the empty area of the real disk device 12 can be used effectively.
[0037]
In S6 of FIG. 2, the data mapping table 8 is updated. This is written (updated) and stored by associating the random writing position of the virtual disk device 4 with the writing position to the real disk device 12 in order.
[0038]
S7 writes the data to the real disk device.
With the above procedure, a write request to a random arbitrary position of the virtual disk device 4 is accepted, and the data mapping table 8 is referred to. When the data has already been written and the data has not been backed up, the data is stored. After the area (sector) is released so that it can be reused, a new area (sector) is allocated from a predetermined position of the real disk device 12 in a direction in which the moving direction of the head becomes a constant direction, and data is written in order and data mapping is performed. The table 8 stores the randomly written position of the virtual disk device 4 and the written position in the order of the real disk device 12 in association with each other, so that writing to the random position of the virtual disk device 4 from an application or the like can be performed. Actually, it is converted into a write to the position of the sequential area of the real disk device 12 and executed. It is possible to realize a high-speed light due.
[0039]
FIG. 6 shows a backup explanatory diagram of the present invention. This is to explain the procedure and operation when data is backed up with the configuration shown in FIG.
FIG. 6A shows a backup flowchart.
[0040]
In FIG. 6A, S21 accepts a backup request. In this case, the random write / forward write conversion mechanism 5 in FIG. 1 accepts a backup request from the applications 2 and 3 or the administrator.
[0041]
In S22, the data mapping table 8 is copied. In this case, the data mapping table 8 shown in FIGS. 1 and 3A and FIG. 4 is copied and stored.
In S23, the flags of all entries in the copy source data mapping table 8 are set to "1". This is because the sector flags of all entries in the copy source (current) data mapping table 8, for example, the sector flags (Shared Flag) of all entries in FIG. Set to). As a result, since the sector flags (deletion prohibition flag) of all entries in the current data mapping table 8 are set, the data of all sectors managed in the data mapping table 8 are set to prohibit deletion, This means that all the sector data in the data mapping table 22 copied and saved in S22 has been saved (saved). As described above, the data mapping table 22 can be copied and saved, and the data of all sectors can be backed up simply by setting the flags of the sectors of all entries in the data mapping table 22. Backup is possible.
[0042]
FIG. 6B shows a backup explanatory diagram. The upper (current copy source) data mapping table 8 in the drawing is copied and saved as shown in the lower row, and the sectors of all entries in which the real addresses of the upper current data mapping table 8 are registered are stored. By setting this flag (deletion prohibition flag) to 1 (deletion prohibition), all data can be backed up.
[0043]
Since the data of the virtual address VA4 of the virtual disk device 4 is updated after the backup, the data is written to the sector (real address RA5) in order of the real disk device 12, and the virtual address VA4 of the virtual disk device 4 is written. Update to 5 (RA5) indicated by a right-pointing arrow in the corresponding data mapping table 8 (Note that the flag (deletion prohibition flag) of the old sector RA1 is set to 1 and the backup is not deleted. Have been). As described above, it is possible to update the data using the current data mapping table 8 after the backup, and the deletion prohibition flag of the backed up data (sector) is set so that any data (sector) is stored. Whether the data has been backed up is determined from the data mapping table 8 that has been copied and saved.
[0044]
At the time of backup, the data mapping table 8 is copied to store which data is stored, and the sector itself on the actual disk device 12 in which the stored data is written or a sector management table provided separately is stored. You may make it set the deletion prohibition bit (backed up bit) of the sector.
[0045]
【The invention's effect】
As described above, according to the present invention, a configuration is adopted in which data to be written at random positions in the virtual disk device 4 is sequentially written on the real disk device 12 and the corresponding positions are stored in the data mapping table 8. Therefore, the random write can be executed at high speed, and the data mapping table 8 can be copied at the time of backup, set to prohibit storage and deletion, and can be backed up quickly and easily.
[Brief description of the drawings]
FIG. 1 is a system configuration diagram of the present invention.
FIG. 2 is a flowchart explaining the operation of the present invention.
FIG. 3 is an example table of the present invention.
FIG. 4 is an explanatory diagram of the present invention.
FIG. 5 is a flowchart for explaining the operation of the present invention (sector allocation).
FIG. 6 is an explanatory diagram of backup according to the present invention.
FIG. 7 is an explanatory diagram of a conventional technique.
[Explanation of symbols]
1: Processing device 2, 3: Application (application program)
4: Virtual disk device 5: random write / forward write conversion mechanism 6: data mapping management program 7: data bitmap management program 8: data mapping table 9: data bitmap table 10: backup program 11: real disk I / O management Program 12: Real disk device

Claims (2)

実ディスクで管理するアドレス情報と仮想的なアドレス情報の対応関係および削除禁止情報を管理するデータマッピングテーブルと、
仮想的なアドレス情報を指定した書き込み要求に応じて、指定された仮想的なアドレス情報が前記データマッピングテーブルに管理されていない場合には、実ディスクの領域を順次割り当ててデータマッピングテーブルを更新し、管理されていてかつ削除禁止でない場合には、実ディスクで割り当て済みの領域を開放すると共に実ディスクの領域を順次割り当ててデータマッピングテーブルを更新し、管理されていてかつ削除禁止の場合には、実ディスクの領域を順次割り当ててデータマッピングテーブルを過去の履歴を消さずに更新する割り当て処理手段と
前記割り当て処理手段によって割り当てられた領域に要求されたデータを書き込む書き込み手段と
を有する仮想ディスク制御システム。
A data mapping table for managing the correspondence between the address information managed by the physical disk and the virtual address information and the deletion prohibition information ;
In response to a write request that specifies virtual address information, if the specified virtual address information is not managed in the data mapping table, the real mapping area is sequentially allocated to update the data mapping table. If it is managed and the deletion is not prohibited, the allocated area on the real disk is released and the real disk area is allocated sequentially to update the data mapping table. Virtual disk control comprising: allocation processing means for sequentially allocating real disk areas and updating the data mapping table without erasing past history; and writing means for writing requested data in the areas allocated by the allocation processing means system.
コンピュータに、
仮想的なアドレス情報を指定した書き込み要求に応じて、指定された仮想的なアドレス情報が、実ディスクで管理するアドレス情報と仮想的なアドレス情報の対応関係および削除禁止情報を管理するデータマッピングテーブルに管理されていない場合には、実ディスクの領域を順次割り当ててデータマッピングテーブルを更新し、管理されていてかつ削除禁止でない場合には、実ディスクで割り当て済みの領域を開放すると共に実ディスクの領域を順次割り当ててデータマッピングテーブルを更新し、管理されていてかつ削除禁止の場合には、実ディスクの領域を順次割り当ててデータマッピングテーブルを過去の履歴を消さずに更新する割り当て処理手段と
前記割り当て処理手段によって割り当てられた領域に要求されたデータを書き込む書き込み手段と
として機能させるための仮想ディスク制御プログラム。
On the computer,
Data mapping table that manages the correspondence between address information and virtual address information managed by a physical disk and deletion prohibition information in response to a write request that specifies virtual address information If not managed, the real mapping area is allocated sequentially and the data mapping table is updated, and if it is managed and deletion is not prohibited, the allocated area is released on the real disk and the real disk An allocation processing means for sequentially allocating areas and updating the data mapping table, and in the case of management and deletion prohibition, allocating real disk areas in sequence and updating the data mapping table without deleting the past history; and Write the requested data to the area allocated by the allocation processing means Writing means and
Virtual disk control program to function as
JP2001021444A 2001-01-30 2001-01-30 Virtual disk control system and virtual disk control program Expired - Fee Related JP3967080B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001021444A JP3967080B2 (en) 2001-01-30 2001-01-30 Virtual disk control system and virtual disk control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001021444A JP3967080B2 (en) 2001-01-30 2001-01-30 Virtual disk control system and virtual disk control program

Publications (2)

Publication Number Publication Date
JP2002229741A JP2002229741A (en) 2002-08-16
JP3967080B2 true JP3967080B2 (en) 2007-08-29

Family

ID=18887006

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001021444A Expired - Fee Related JP3967080B2 (en) 2001-01-30 2001-01-30 Virtual disk control system and virtual disk control program

Country Status (1)

Country Link
JP (1) JP3967080B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4225206B2 (en) 2004-01-23 2009-02-18 日本電気株式会社 Replicated data storage system for storage device and replicated data storage program
JP5142629B2 (en) * 2007-08-22 2013-02-13 株式会社日立製作所 Storage system and method for backing up virtual volume
JP2021157462A (en) 2020-03-26 2021-10-07 富士通株式会社 Storage controller and storage control program
CN115509824B (en) * 2022-11-23 2023-03-14 深圳市科力锐科技有限公司 Data backup method, device, equipment and storage medium

Also Published As

Publication number Publication date
JP2002229741A (en) 2002-08-16

Similar Documents

Publication Publication Date Title
JP3662510B2 (en) Remapping control method for flash memory and flash memory structure by the same
US9785564B2 (en) Hybrid memory with associative cache
KR100324028B1 (en) Method for performing a continuous over-write of a file in a nonvolatile memory
US8019932B2 (en) Block management for mass storage
US7694105B2 (en) Data storage systems that implement sector sets
US6567307B1 (en) Block management for mass storage
US7035881B2 (en) Organization of read-write snapshot copies in a data storage system
US7814265B2 (en) Single sector write operation in flash memory
US8069306B2 (en) Data area managing method in information recording medium and information processor employing data area managing method
US7987328B2 (en) Data archive system
JP2000505215A (en) Memory management
US20050033930A1 (en) High-speed snapshot method
JP3793868B2 (en) Flash memory management device and recording medium
JP3967080B2 (en) Virtual disk control system and virtual disk control program
JP4394467B2 (en) Storage system, server apparatus, and preceding copy data generation method
US8060694B2 (en) Techniques for storing system images in slices on data storage devices
JP3008801B2 (en) Storage device system and disk array controller
JP2004013786A (en) Method for storing data and data storage controller
CN112052217B (en) Snapshot implementation method and device
JPH0235537A (en) Multiple volume update control system
JPH08272654A (en) File management device
JP2023044994A (en) memory system
JP2005031746A (en) Disk array apparatus and in-casing replication method
JPH07152624A (en) Duplex file writing method
JPH01258288A (en) Directory retrieving method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040326

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061114

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070113

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070515

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070530

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110608

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130608

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees