JP4347265B2 - RAID control apparatus and RAID control method - Google Patents

RAID control apparatus and RAID control method Download PDF

Info

Publication number
JP4347265B2
JP4347265B2 JP2005158776A JP2005158776A JP4347265B2 JP 4347265 B2 JP4347265 B2 JP 4347265B2 JP 2005158776 A JP2005158776 A JP 2005158776A JP 2005158776 A JP2005158776 A JP 2005158776A JP 4347265 B2 JP4347265 B2 JP 4347265B2
Authority
JP
Japan
Prior art keywords
area
raid
file
raid type
information
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.)
Active
Application number
JP2005158776A
Other languages
Japanese (ja)
Other versions
JP2006338091A (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.)
NEC System Technologies Ltd
Original Assignee
NEC System Technologies 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 NEC System Technologies Ltd filed Critical NEC System Technologies Ltd
Priority to JP2005158776A priority Critical patent/JP4347265B2/en
Publication of JP2006338091A publication Critical patent/JP2006338091A/en
Application granted granted Critical
Publication of JP4347265B2 publication Critical patent/JP4347265B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、複数のハードディスクドライブに分散してファイルを記憶させるRAID制御装置、およびRAID制御方法に関する。   The present invention relates to a RAID control apparatus and a RAID control method that store files in a distributed manner on a plurality of hard disk drives.

複数のハードディスクによって構成されるハードディスクアレイや、複数のハードディスクドライブの信頼性や性能を向上させる手法として、RAID(Redundant Arrays of Independent(Inexpensive) Disks)がある。そして、RAIDの手法を用いて情報を記憶するハードディスクアレイやハードディスクドライブはRAID装置と呼ばれている。   RAID (Redundant Arrays of Independent (Inexpensive) Disks) is a technique for improving the reliability and performance of a hard disk array composed of a plurality of hard disks and a plurality of hard disk drives. A hard disk array or hard disk drive that stores information using a RAID method is called a RAID device.

RAIDには、RAID0からRAID5の各手法(以下、RAIDの各手法をRAIDタイプという)がある。ユーザは、各ハードディスクに論理ボリューム(論理領域)を構築する際に、論理ボリュームごとにRAIDタイプを設定する。   There are RAID 0 to RAID 5 methods (hereinafter, RAID methods are referred to as RAID types). The user sets a RAID type for each logical volume when constructing a logical volume (logical area) on each hard disk.

従来の技術では、論理ボリュームを構築する際にRAIDタイプを設定すると、その論理ボリュームに記憶させるファイルは全てその論理ボリュームのRAIDタイプでなければならない。そのため、複数のタイプのRAIDを使用すると予想される場合には、例えば、信頼性を重視するRAID5の論理ボリュームと、容量効率を重視するRAID0の論理ボリュームとを予め別に作成しておく必要がある。そして、RAID装置の導入時に将来の使用容量、または、保存容量を予測して、それぞれの論理ボリュームの容量を決定する必要がある。   In the conventional technique, when a RAID type is set when a logical volume is constructed, all files stored in the logical volume must be the RAID type of the logical volume. For this reason, when it is expected that a plurality of types of RAID will be used, for example, a RAID 5 logical volume that emphasizes reliability and a RAID 0 logical volume that emphasizes capacity efficiency need to be created separately in advance. . It is necessary to determine the capacity of each logical volume by predicting the future used capacity or storage capacity when the RAID device is introduced.

具体的には、それが唯一であり絶対にデータを消失してはならない重要なファイルを保存するときには、冗長のために余計な記憶容量を使ってもRAID5が選択される。マスタファイルが別にある場合等、ハードディスクドライブの故障時には消失してもよいファイルを保存するときには、記憶容量をできるだけ使わないようにRAID0が選択される。そして、選択されたRAIDタイプに応じた論理ボリュームにファイルを記憶させる。   Specifically, when storing an important file that is unique and should not lose data, RAID 5 is selected even if extra storage capacity is used for redundancy. When storing a file that may be lost when the hard disk drive fails, such as when there is another master file, RAID 0 is selected so as to use as little storage capacity as possible. Then, the file is stored in the logical volume corresponding to the selected RAID type.

しかし、予測した各RAIDタイプのファイルを記憶する容量に対して、実際に使用する容量が異なってしまった場合、論理ボリュームの容量変更や再構築をしなければならない。   However, if the capacity actually used differs from the predicted capacity for storing each RAID type file, the capacity of the logical volume must be changed or reconstructed.

また、ファイルを入手した時には重要だったのでRAID5を選択していたが、その後重要度が低くなったので記憶容量を削減するためにRAID0に変更したりする場合がある。さらに、ファイルを入手した時には重要ではなかったのでRAID0を選択したが、その後重要になったのでRAID5に変更したりする場合がある。   In addition, RAID5 was selected because it was important when the file was obtained. However, since the importance was lowered after that, it may be changed to RAID0 in order to reduce the storage capacity. Furthermore, since it was not important when the file was obtained, RAID 0 was selected. However, since it became important after that, it may be changed to RAID 5.

なお、特許文献1には、RAID装置が記憶しているファイルごとにRAIDタイプを設定することができるシステムが記載されているが、ファイルのRAIDタイプを変更する方法について記載されていない。   Patent Document 1 describes a system that can set a RAID type for each file stored in a RAID device, but does not describe a method for changing the RAID type of a file.

特許文献2には、ファイルに冗長性を付加し、RAIDタイプを変更することができる装置が記載されている。   Patent Document 2 describes an apparatus that can add redundancy to a file and change a RAID type.

特開2000−99282号公報 (段落0015〜0030、図1)JP 2000-99282 A (paragraphs 0015 to 0030, FIG. 1) 特開2004−213064号公報 (段落0037〜0074、図1)JP 2004-213064 A (paragraphs 0037 to 0074, FIG. 1)

しかし、特許文献2に記載されている装置で、ファイルのRAIDタイプを変更する場合、一旦ファイルを読み出してRAID装置のキャッシュメモリに記憶させ、他の論理ボリュームに他のRAIDタイプで記憶させるという処理を行わなければならず、時間と手間とがかかる。   However, when changing the RAID type of a file in the apparatus described in Patent Document 2, the process of temporarily reading the file and storing it in the cache memory of the RAID apparatus and storing it in another logical volume with another RAID type It takes time and effort.

そこで、ファイルごとにRAIDタイプを設定し、設定したRAIDタイプを容易に変更することができるRAID制御装置、およびRAID制御方法を提供することを目的とする。   Accordingly, it is an object of the present invention to provide a RAID control apparatus and a RAID control method capable of setting a RAID type for each file and easily changing the set RAID type.

本発明によるRAID制御装置は、ホストコンピュータおよび複数のハードディスク装置に接続され、複数のハードディスク装置に分散してファイルを記憶させるRAID制御装置であって、ホストコンピュータからパリティ情報を用いた第1のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域を確保して当該領域に対して第1のRAIDタイプを示す情報を対応させ、当該ファイルのパリティ情報を生成し、第1のRAIDタイプを示す情報を対応させた領域にファイルのデータと生成したパリティ情報とを記憶させる第1の記憶制御手段と、ホストコンピュータからパリティ情報を用いない第2のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域であって第1の記憶制御手段が確保する領域と同容量の領域を確保し、当該領域に対して第2のRAIDタイプを示す情報を対応させ、第2のRAIDタイプを示す情報を対応させた領域における一部のブロックにファイルのデータを記憶させるとともに、第2のRAIDタイプを示す情報を対応させた領域における他のブロックを未使用状態に設定する第2の記憶制御手段と、第1のRAIDタイプを第2のRAIDタイプに変更する指示がホストコンピュータから入力された場合に、ファイルのデータと生成したパリティ情報とが記憶されている領域に対応する情報を第1のRAIDタイプを示す情報から第2のRAIDタイプを示す情報に変更するとともに、パリティ情報が記憶されていたブロックを未使用状態に設定する第1のタイプ変更手段と、第2のRAIDタイプを第1のRAIDタイプに変更する指示がホストコンピュータから入力された場合に、ファイルのデータが記憶されている領域に対応する情報を第2のRAIDタイプを示す情報から第1のRAIDタイプを示す情報に変更するとともに、当該ファイルのパリティ情報を生成し、当該領域における第2の記憶制御手段が未使用状態に設定したブロックが未だ未使用状態であれば、そのブロックに生成したパリティ情報を記憶させ、当該領域における第2の記憶制御手段が未使用状態に設定したブロックに他のデータが記憶されているときには他のブロックに生成したパリティ情報を記憶させる第2のタイプ変更手段とを備え、第1の記憶制御手段と第2の記憶制御手段とは、第2の記憶制御手段によって未使用状態に設定されたブロックを、確保する領域に含めることを特徴とする。 A RAID control apparatus according to the present invention is a RAID control apparatus that is connected to a host computer and a plurality of hard disk devices and stores files in a distributed manner on the plurality of hard disk devices. The RAID control device uses a first RAID using parity information from the host computer. When an instruction to store a file by type is input, an area composed of a plurality of blocks allocated across a plurality of hard disk devices is secured, and information indicating the first RAID type is associated with the area, First storage control means for generating parity information of the file, storing file data and the generated parity information in an area corresponding to information indicating the first RAID type, and using the parity information from the host computer Finger to store the file with the second RAID type Is input, an area having a plurality of blocks allocated across a plurality of hard disk devices and having the same capacity as the area secured by the first storage control means is secured, and The information indicating the RAID type 2 is associated, the file data is stored in some blocks in the area corresponding to the information indicating the second RAID type, and the information indicating the second RAID type is associated. File data and generation when a second storage control means for setting other blocks in the area to an unused state and an instruction to change the first RAID type to the second RAID type are input from the host computer The information corresponding to the area where the parity information is stored indicates the second RAID type from the information indicating the first RAID type. The host computer receives first type changing means for setting the block in which parity information is stored to an unused state and an instruction for changing the second RAID type to the first RAID type. The information corresponding to the area where the file data is stored is changed from the information indicating the second RAID type to the information indicating the first RAID type, and the parity information of the file is generated, If the block set in the unused state by the second storage control unit in the area is still in the unused state, the generated parity information is stored in the block, and the second storage control unit in the area is set in the unused state. When other data is stored in the set block, the second type for storing the parity information generated in the other block. And the first storage control means and the second storage control means include the block set in the unused state by the second storage control means in the area to be secured. .

第2の記憶制御手段は、未使用状態を示す情報を制御テーブルに設定することによってブロックを未使用状態に設定し、第1の記憶制御手段は、制御テーブルにおいて、未使用状態を示す情報が所定の数設定されていると、それらの情報に対応するブロックァイルのデータリティ情報とを記憶させるようにしてもよい。 The second storage control unit sets the block to an unused state by setting information indicating the unused state in the control table, and the first storage control unit stores the information indicating the unused state in the control table. When is a predetermined number set in the block corresponding to the information, it may be to store the data and parity information file.

第1の記憶制御手段と第2の記憶制御手段とは、制御テーブルで、領域と、領域記憶されているファイルのRAIDタイプを示す情報とを対応づけてもよい。 The first storage control means and the second storage control unit, the control table, and region, and information indicating the RAID type of file that is stored in the area may be associated.

本発明によるRAID制御方法は、ホストコンピュータの指示に応じて複数のハードディスク装置に分散してファイルを記憶させるRAID制御装置で実行されるRAID制御方法であって、ホストコンピュータからパリティ情報を用いた第1のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域を確保して当該領域に対して第1のRAIDタイプを示す情報を対応させ、当該ファイルのパリティ情報を生成し、第1のRAIDタイプを示す情報を対応させた領域にファイルのデータと生成したパリティ情報とを記憶させる第1の記憶制御処理と、ホストコンピュータからパリティ情報を用いない第2のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域であって第1の記憶制御処理で確保される領域と同容量の領域を確保し、当該領域に対して第2のRAIDタイプを示す情報を対応させ、第2のRAIDタイプを示す情報を対応させた領域における一部のブロックにファイルのデータを記憶させるとともに、第2のRAIDタイプを示す情報を対応させた領域における他のブロックを未使用状態に設定する第2の記憶制御処理と、第1のRAIDタイプを第2のRAIDタイプに変更する指示がホストコンピュータから入力された場合に、ファイルのデータと生成したパリティ情報とが記憶されている領域に対応する情報を第1のRAIDタイプを示す情報から第2のRAIDタイプを示す情報に変更するとともに、パリティ情報が記憶されていたブロックを未使用状態に設定する第1のタイプ変更処理と、第2のRAIDタイプを第1のRAIDタイプに変更する指示がホストコンピュータから入力された場合に、ファイルのデータが記憶されている領域に対応する情報を第2のRAIDタイプを示す情報から第1のRAIDタイプを示す情報に変更するとともに、当該ファイルのパリティ情報を生成し、当該領域における第2の記憶制御処理で未使用状態に設定されたブロックが未だ未使用状態であれば、そのブロックに生成したパリティ情報を記憶させ、当該領域における第2の記憶制御処理で未使用状態に設定されたブロックに他のデータが記憶されているときには他のブロックに生成したパリティ情報を記憶させる第2のタイプ変更処理とを実行し、第1の記憶制御処理および第2の記憶制御処理で、第2の記憶制御処理で未使用状態に設定されたブロックを、確保する領域に含めることを特徴とする。 A RAID control method according to the present invention is a RAID control method executed by a RAID control device that stores files in a distributed manner on a plurality of hard disk devices in accordance with an instruction from the host computer , and uses a parity information from the host computer. When an instruction to store a file with one RAID type is input, information indicating the first RAID type for the area is secured by securing an area composed of a plurality of blocks allocated over a plurality of hard disk devices. A first storage control process for generating the parity information of the file, storing the file data and the generated parity information in an area corresponding to the information indicating the first RAID type, and generating a parity from the host computer Finger to store the file with the second RAID type that does not use information Is input, an area composed of a plurality of blocks allocated over a plurality of hard disk devices and having the same capacity as the area secured in the first storage control process is secured, and The information indicating the second RAID type is associated, the file data is stored in some blocks in the area corresponding to the information indicating the second RAID type, and the information indicating the second RAID type is associated. When the host computer inputs a second storage control process for setting other blocks in the reserved area to an unused state and an instruction to change the first RAID type to the second RAID type, The information corresponding to the area where the generated parity information is stored is changed from the information indicating the first RAID type to the second RAID type. The host computer inputs a first type change process for setting a block in which parity information is stored to an unused state and an instruction for changing the second RAID type to the first RAID type. The information corresponding to the area where the file data is stored is changed from the information indicating the second RAID type to the information indicating the first RAID type, and the parity information of the file is generated, If the block set to the unused state in the second storage control process in the area is still unused, the generated parity information is stored in the block, and is not used in the second storage control process in the area When other data is stored in the block set to the state, the parity information generated in the other block is stored. The type change process is executed, and the block set to the unused state in the second storage control process is included in the area to be secured in the first storage control process and the second storage control process. And

本発明によれば、ファイルごとにRAIDタイプを設定し、設定したRAIDタイプを容易に変更することができる。   According to the present invention, a RAID type can be set for each file, and the set RAID type can be easily changed.

また、ハードディスク装置の記憶容量の利用効率を向上させることができる。 In addition , the utilization efficiency of the storage capacity of the hard disk device can be improved.

本発明の実施の形態について、図面を参照して説明する。図1は、本発明によるRAID制御装置を利用したファイル管理システムの実施の形態の一構成例を示すブロック図である。   Embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration example of an embodiment of a file management system using a RAID control device according to the present invention.

図1に示すファイル管理システムは、ファイルを記憶するハードディスクとハードディスクに対するデータ読み書き機能とを有するハードディスク装置(HDD:ハードディスクドライブ)30、31、32、33、各HDDに記憶させるファイルと、各HDDに行う処理を示す指示とを入力するホストコンピュータ10、およびホストコンピュータ10に入力された指示にもとづいて、各HDDにファイルを記憶させるRAIDコントローラ(RAID制御装置)20を含む。   The file management system shown in FIG. 1 is a hard disk device (HDD: hard disk drive) 30, 31, 32, 33 having a hard disk for storing files and a data read / write function for the hard disk, files stored in each HDD, and each HDD. A host computer 10 that inputs an instruction indicating processing to be performed, and a RAID controller (RAID control device) 20 that stores a file in each HDD based on the instruction input to the host computer 10 are included.

ホストコンピュータ10は、入力されたファイルをどのRAIDタイプで各HDDに記憶させるかを指定するRAIDタイプ指定部12、および入力されたファイルとRAIDタイプ指定部12が指定したRAIDタイプを示す情報とをRAIDコントローラ20に送信するIO発行部11を含む。   The host computer 10 includes a RAID type designating unit 12 that specifies which RAID type the input file is stored in each HDD, and the input file and information indicating the RAID type designated by the RAID type designating unit 12 An IO issuing unit 11 that transmits to the RAID controller 20 is included.

RAIDタイプ指定部12は、キーボード等の入力手段(図示せず)を介して入力されたファイルの重要度等に応じて、ファイルのRAIDタイプを指定する。具体的には、RAIDタイプ指定部12は、入力手段に、例えば、重要なファイルであり信頼性を重視することが入力されれば、RAID5を指定する。また、信頼性よりもHDDの利用効率を重視することが入力されれば、RAID0を指定する。なお、RAIDタイプ指定部12は、入力手段にRAIDタイプが入力されると、入力されたRAIDタイプを指定してもよい。   The RAID type designation unit 12 designates the RAID type of the file according to the importance level of the file input via an input means (not shown) such as a keyboard. Specifically, the RAID type designating unit 12 designates RAID 5 when, for example, an important file and importance is placed on the reliability is input to the input unit. In addition, if it is input that the HDD utilization efficiency is more important than reliability, RAID 0 is designated. The RAID type designation unit 12 may designate the input RAID type when the RAID type is input to the input unit.

IO発行部11は、RAIDタイプ指定部12が指定したRAIDタイプとファイルとファイルの記憶を指示するライトコマンドとをRAIDコントローラ20に送信する。また、ホストコンピュータ10は、各HDDに記憶させるファイルを管理するファイル管理プログラムを搭載している。そして、IO発行部11は、ファイル管理プログラムが、各HDDにおいて、ファイルを記憶する領域のブロックを示す論理アドレスを指定すると、指定された論理アドレスをRAIDコントローラ20に送信する。   The IO issuing unit 11 transmits to the RAID controller 20 the RAID type designated by the RAID type designation unit 12 and a file and a write command instructing storage of the file. In addition, the host computer 10 is equipped with a file management program for managing files stored in each HDD. When the file management program designates a logical address indicating a block of an area for storing a file in each HDD, the IO issue unit 11 transmits the designated logical address to the RAID controller 20.

具体的には、例えば、ホストコンピュータ10とRAIDコントローラ20とがSCSI(Small Computer System Interface)接続されていれば、ファイルの記憶を指示するライトコマンドのCDB(Command Descriptor Block)の未使用領域にRAIDタイプや論理アドレスを示すフラグを設ける。また、モードセレクトコマンドに、RAIDタイプや論理アドレスを指定するユニークページを定義し、ライトコマンドを送信する前にモードセレクトコマンドを送信してもよい。   Specifically, for example, if the host computer 10 and the RAID controller 20 are connected by a SCSI (Small Computer System Interface), a RAID in an unused area of a CDB (Command Descriptor Block) of a write command instructing file storage is used. A flag indicating the type and logical address is provided. Further, a unique page designating a RAID type or a logical address may be defined in the mode select command, and the mode select command may be transmitted before transmitting the write command.

RAIDコントローラ20は、IO発行部11から情報を受信するIO制御部21、IO発行部11が送信したRAIDタイプを認識するRAIDタイプ解析部23、各HDDの使用状況を示す制御テーブル25、制御テーブル25を参照してファイルのRAIDタイプを決定する割当制御部(割当制御手段)24、割当制御部24の制御に応じて、ファイルのRAIDタイプを変更するRAIDタイプ変更制御部22、割当制御部24の制御に応じて、ファイルに付加するパリティ情報を生成するパリティ情報生成部(パリティ情報生成手段)26、割当制御部24の制御に応じて、ファイルのコピーを生成するコピー制御部27、およびファイルを各HDDに送信して記憶させるHDD制御部(ハードディスク装置制御手段)28を含む。   The RAID controller 20 includes an IO control unit 21 that receives information from the IO issue unit 11, a RAID type analysis unit 23 that recognizes the RAID type transmitted by the IO issue unit 11, a control table 25 that indicates the usage status of each HDD, and a control table. 25, an allocation control unit (allocation control means) 24 that determines the RAID type of the file, a RAID type change control unit 22 that changes the RAID type of the file in accordance with the control of the allocation control unit 24, and an allocation control unit 24. A parity information generation unit (parity information generation means) 26 that generates parity information to be added to the file according to the control of the file, a copy control unit 27 that generates a copy of the file according to the control of the allocation control unit 24, and the file Includes an HDD control unit (hard disk device control means) 28 for transmitting and storing the information to each HDD.

図2は、各HDDが記憶するファイルを示す説明図である。図2では、各HDDがファイル41、42、43を信頼性を重視してRAID5で分散して記憶していることが例示されている。また、各HDDがファイル51、52、53をHDDの容量の利用効率を重視してRAID0で分散して記憶していることが例示されている。   FIG. 2 is an explanatory diagram showing files stored in each HDD. FIG. 2 exemplifies that each HDD stores files 41, 42, and 43 in a distributed manner using RAID 5 with emphasis on reliability. In addition, it is exemplified that each HDD stores the files 51, 52, and 53 in a distributed manner using RAID 0 with an emphasis on the HDD capacity utilization efficiency.

ここで、各HDDがファイル41をストライプサイズ(ファイルを記憶するために分割された各ブロックの大きさ)が128KBのRAID5で分散して記憶する場合を例に説明する。各HDDは所定の記憶容量の領域に並列に分割され、1のファイルを記憶する領域は各HDDに分散している。   Here, a case will be described as an example where each HDD stores the file 41 in a distributed manner with RAID 5 having a stripe size (the size of each block divided to store the file) of 128 KB. Each HDD is divided in parallel into an area having a predetermined storage capacity, and an area for storing one file is distributed among the HDDs.

ここで、各HDDが所定の記憶容量の領域に並列に分割されるとは、それぞれのHDDが、同じ大きさの記憶容量を有するように領域に分割されることをいう。具体的には、例えば、HDD30、31、32、33がそれぞれ0.5MBの記憶容量の領域を有するように分割される場合をいう。なお、一般に、各HDDは、それぞれ複数の領域を有するように分割される。すなわち、HDD30、31、32、33がそれぞれ0.5MBの記憶容量の領域を8つづつ有するように分割されたりする。そして、RAIDコントローラ20は、HDD30における1番目の領域と、HDD31における1番目の領域と、HDD32における1番目の領域と、HDD33における1番目の領域とを対応づける情報を記憶している。また、RAIDコントローラ20は、同様に、各HDDにおける2番目の領域から8番目の領域を、それぞれ対応づける情報を記憶している。   Here, that each HDD is divided into regions of a predetermined storage capacity in parallel means that each HDD is divided into regions so as to have the same storage capacity. Specifically, for example, the HDDs 30, 31, 32, and 33 are divided so that each has an area of a storage capacity of 0.5 MB. In general, each HDD is divided so as to have a plurality of areas. That is, the HDDs 30, 31, 32, and 33 are each divided so as to have 8 areas each having a storage capacity of 0.5 MB. The RAID controller 20 stores information associating the first area in the HDD 30, the first area in the HDD 31, the first area in the HDD 32, and the first area in the HDD 33. Similarly, the RAID controller 20 stores information for associating the second area to the eighth area in each HDD.

各HDDにおいて分割された各領域は、ファイル自体を記憶するブロックと、ファイルに付加されるパリティ情報を記憶するブロックとが設けられるようにそれぞれ分割される。そして、ファイル自体を記憶するブロックに、各ブロックを示す論理アドレスが設定される。   Each area divided in each HDD is divided so that a block for storing the file itself and a block for storing parity information added to the file are provided. Then, a logical address indicating each block is set in the block storing the file itself.

HDD制御部28は、各HDDを領域およびブロックに分割して論理アドレスを設定する。このとき、HDD制御部28は、ファイル管理プログラムを搭載しているホストコンピュータ10の指示に従って、領域およびブロックの分割と、論理アドレスの設定とを行う。HDD制御部28は、IO制御部21を介してホストコンピュータ10に、設定した論理アドレスの一覧を通知する。ホストコンピュータ10の記憶手段(図示せず)は、通知された論理アドレスの一覧を記憶する。   The HDD control unit 28 sets logical addresses by dividing each HDD into areas and blocks. At this time, the HDD control unit 28 divides areas and blocks and sets logical addresses in accordance with instructions from the host computer 10 on which the file management program is installed. The HDD control unit 28 notifies the host computer 10 of a list of set logical addresses via the IO control unit 21. A storage unit (not shown) of the host computer 10 stores a list of notified logical addresses.

図1には、ファイル管理システムが、HDD30、31、32、33の4台のHDDを含むことが例示されている。そこで、各HDDのいずれか1つが故障等した場合であってもRAID5で記憶したファイルを修復することができるようにするため、各HDDにおける一の領域は、ブロックをそれぞれ4個(1個はパリティ情報を記憶するブロック)含むように分割される。すると、4台×4個=16であるので、1のファイルを記憶する領域は、それぞれブロックを16個含む。   FIG. 1 illustrates that the file management system includes four HDDs 30, 31, 32, and 33. Therefore, in order to be able to repair a file stored in RAID5 even if any one of each HDD fails, one area in each HDD has four blocks (one is a A block for storing parity information). Then, 4 units × 4 units = 16, so the area for storing one file includes 16 blocks.

具体的には、ストライプサイズが128KBなので、128KB×16個=2MBであるため、各HDDは、1のファイルを記憶する領域の物理容量(各HDDに分散している領域の合計)が2MBになるように並列に分割される。そして、2MB÷4台=0.5MBなので、1つのファイルを記憶する領域の1つのHDDにおける物理容量は0.5MBとなり、各HDDは、0.5MBごとに領域に分割される。なお、16個のブロックのうち、4個はパリティ情報を記憶するので、分散している1つのファイルを記憶する領域の論理容量は(16個−4個)×128KB=1.5MBなので、1.5MBとなる。   Specifically, since the stripe size is 128 KB, 128 KB × 16 = 2 MB, so each HDD has a physical capacity of one file storage area (total of areas distributed to each HDD) is 2 MB. Are divided in parallel so that Since 2 MB ÷ 4 units = 0.5 MB, the physical capacity of one HDD in an area for storing one file is 0.5 MB, and each HDD is divided into areas every 0.5 MB. Of the 16 blocks, 4 store parity information, so the logical capacity of an area for storing one distributed file is (16-4 pieces) × 128 KB = 1.5 MB, so 1 .5MB.

各HDDは、前述したように分割された領域に、RAID5のファイルまたはRAID0のファイルを記憶する。なお、RAID0のファイルを記憶する場合、各HDDの各領域のパリティ情報を記憶するブロックは使用されない。そのため、HDD制御部28は、RAID0のファイルを記憶している領域内の未使用のブロックを抽出し、抽出したブロックを集めて仮想領域を生成して、その仮想領域に他のファイルやパリティ情報を記憶させる。   Each HDD stores a RAID 5 file or a RAID 0 file in the area divided as described above. When a RAID 0 file is stored, a block for storing parity information of each area of each HDD is not used. Therefore, the HDD control unit 28 extracts unused blocks in the area where the RAID 0 file is stored, collects the extracted blocks, generates a virtual area, and stores other files and parity information in the virtual area. Remember.

次に、RAIDタイプを変更する場合について説明する。図3は、各HDDが記憶しているファイルのRAIDタイプを変更する場合を示す説明図である。図3では、ファイル43をRAID5からRAID0に変更することが例示されている。   Next, a case where the RAID type is changed will be described. FIG. 3 is an explanatory diagram showing a case where the RAID type of a file stored in each HDD is changed. In FIG. 3, the file 43 is exemplified as being changed from RAID5 to RAID0.

ファイル43をRAID5からRAID0に変更する場合、HDD制御部28は、ファイル43のパリティ情報を各HDDから消去する。   When changing the file 43 from RAID 5 to RAID 0, the HDD control unit 28 erases the parity information of the file 43 from each HDD.

また、ファイル53をRAID0からRAID5に変更する場合、割当制御部24は、制御テーブル25を参照して各HDDの使用状況を参照し、ファイル53を記憶している領域のパリティ情報を記憶するために設けられたブロックが、仮想領域として他のファイルに使用されているか否かを判断する。   When the file 53 is changed from RAID 0 to RAID 5, the allocation control unit 24 refers to the usage status of each HDD with reference to the control table 25, and stores the parity information of the area in which the file 53 is stored. It is determined whether the block provided in is used for another file as a virtual area.

仮想領域として使用されている場合には、割当制御部24は、HDD制御部28に、仮想領域が記憶している情報を他の領域に記憶させ、パリティ情報を記憶するために設けられたブロックの情報を各HDDから消去する。   When used as a virtual area, the allocation control unit 24 causes the HDD control unit 28 to store information stored in the virtual area in another area and to store parity information. Are deleted from each HDD.

割当制御部24は、HDD制御部28に各HDDからファイル53を読み出させて、パリティ情報生成部26に、ファイル53のパリティ情報を生成させる。このとき、コピー制御部27は、仮想領域が記憶している情報をコピーしてHDD制御部28に出力してもよい。HDD制御部28は、パリティ情報生成部26が生成したパリティ情報をパリティ情報を記憶するために設けられたブロックに記憶させる。   The allocation control unit 24 causes the HDD control unit 28 to read the file 53 from each HDD, and causes the parity information generation unit 26 to generate the parity information of the file 53. At this time, the copy control unit 27 may copy the information stored in the virtual area and output it to the HDD control unit 28. The HDD control unit 28 stores the parity information generated by the parity information generation unit 26 in a block provided for storing the parity information.

図4は、制御テーブル25を示す説明図である。制御テーブル25は、論理アドレスが設定された各ブロックがどの領域に含まれているかを示す論理アドレステーブル60(図4(a))、各領域の状態や、物理位置、パリティ情報を記憶するために設けられたブロックの状態を示す状態テーブル61(図4(b))、および各物理位置が含む論理アドレスが設定されたブロックを示すブロックテーブル62(図4(c))を含む。   FIG. 4 is an explanatory diagram showing the control table 25. The control table 25 stores a logical address table 60 (FIG. 4A) indicating which area each block to which a logical address is set is included, and the state, physical position, and parity information of each area. 4 includes a state table 61 (FIG. 4B) indicating the state of the blocks provided in FIG. 4, and a block table 62 (FIG. 4C) indicating blocks in which logical addresses included in the respective physical positions are set.

割当制御部24は、論理アドレスに領域を割り当て、論理アドレステーブル60における領域が割り当てられた論理アドレスに対応する欄に領域の番号を設定する。   The assignment control unit 24 assigns an area to the logical address, and sets the area number in the column corresponding to the logical address to which the area is assigned in the logical address table 60.

割当制御部24は、各HDDの状態にしたがって、状態テーブル61の各領域の状態や、物理位置、パリティ情報を記憶するために設けられたブロックの状態を設定する。具体的には、各領域の状態の欄には、その領域が未使用であるのか、未割当であるのか、RAID0で使用されているのか、または、RAID5で使用されているのかが設定される。また、物理位置の欄には、その領域がひとまとまりのブロックによって構成されているのか(図4(b)では直接と記す)、または、分散した複数のブロックの集合によって構成されているのか(図4(b)では集合と記す)と、その領域のHDDにおける物理位置とが設定される。   The allocation control unit 24 sets the state of each area of the state table 61, the physical position, and the state of blocks provided for storing parity information according to the state of each HDD. Specifically, in the status column of each area, whether the area is unused, unallocated, used in RAID0, or used in RAID5 is set. . In the physical position column, whether the area is composed of a group of blocks (referred to as direct in FIG. 4B) or whether it is composed of a set of a plurality of dispersed blocks ( In FIG. 4B, it is referred to as a set) and the physical position of the area in the HDD is set.

なお、物理位置とは、その領域の各HDDにおける代表的なセクタ等を示したり、その領域の各HDDにおける代表的なセクタ等を簡単な計算で導き出したりすることができる情報である。領域の物理位置は各HDDによって異なることが考えられるが、説明の簡単のため、番号で示す。   The physical position is information that indicates a representative sector or the like in each HDD in the area, or that can be derived by a simple calculation. Although it is conceivable that the physical position of the area differs depending on each HDD, it is indicated by a number for simplicity of explanation.

また、パリティ情報を記憶するために設けられたブロックの状態の欄(図4(b)ではパリティ状態と記す欄)には、その領域におけるパリティ情報を記憶するために設けられたブロックが、仮想領域として他のファイルを記憶している場合に、その仮想領域を示す番号が設定される。   Further, in the column of the block state provided for storing the parity information (in FIG. 4B, the column indicated as the parity state), the block provided for storing the parity information in the region is the virtual state. When another file is stored as an area, a number indicating the virtual area is set.

なお、領域を示す番号は、その領域がひとまとまりのブロックによって構成されている場合にはその領域を示す物理位置が設定され、分散した複数のブロックの集合によって構成されている場合には、所定の仮想領域を示す番号が設定される。図4(b)には、領域を示す番号が100番以上であれば仮想領域をそれぞれ示し、100番未満であればひとまとまりのブロックによって構成されている領域の物理位置をそれぞれ示していることが例示されている。そして、仮想領域の物理位置の欄には、仮想領域として使用される領域の物理位置が設定される。図4(c)では、仮想領域として使用される領域の物理位置が設定されていない場合が、?で示されている。   Note that the number indicating the area is a physical position indicating the area when the area is configured by a group of blocks, and is predetermined when the area is configured by a set of a plurality of dispersed blocks. A number indicating the virtual area is set. In FIG. 4B, if the area number is 100 or more, a virtual area is shown, and if it is less than 100, the physical position of an area constituted by a group of blocks is shown. Is illustrated. The physical position of the area used as the virtual area is set in the physical position column of the virtual area. In FIG. 4C, what is the case where the physical position of the area used as the virtual area is not set? It is shown in

ブロックテーブル62は、論理アドレスが設定された各物理位置のブロックを、HDDごとに示している。図4(c)では、物理位置ごとに、各HDDに含まれるブロックが縦に示されている。   The block table 62 indicates a block at each physical position where a logical address is set for each HDD. In FIG. 4C, the blocks included in each HDD are shown vertically for each physical position.

次に、各HDDにファイルを記憶させたり、各HDDが記憶しているファイルのRAIDタイプを変更したりした場合の制御テーブル25の変化について説明する。   Next, changes in the control table 25 when a file is stored in each HDD or the RAID type of a file stored in each HDD is changed will be described.

図4で例示された状態の各HDDの論理アドレス0〜11のブロックに、RAID5のファイルを記憶させた場合について説明する。図5は、RAID5でファイルを記憶させた場合の制御テーブル25を示す説明図である。   A case where a RAID 5 file is stored in the blocks of logical addresses 0 to 11 of the HDDs in the state illustrated in FIG. 4 will be described. FIG. 5 is an explanatory diagram showing the control table 25 when a file is stored in RAID5.

制御テーブル25の初期状態を示す図4を参照すると、論理アドレス0〜11には領域が割り当てられていない(領域の欄が空欄)。ホストコンピュータ10が、論理アドレス0〜11にファイルを記憶させることを指示すると、割当制御部24は、論理アドレス0〜11に領域0を割り当てて、論理アドレステーブル60の論理アドレス0〜11の行の領域を0に設定する。そして、状態テーブル61の領域0に対応する状態の欄を、RAID5に設定する。また、ブロックテーブル62で示される物理位置0に対応する欄に、RAID5でファイルを記憶した各ブロックの論理アドレスと、パリティ情報を示す情報(図5では、Pと記す)とを設定する。すると、制御テーブル25は、図5に例示した状態に変更される。   Referring to FIG. 4 showing the initial state of the control table 25, no area is assigned to the logical addresses 0 to 11 (the area column is blank). When the host computer 10 instructs to store the files at the logical addresses 0 to 11, the allocation control unit 24 allocates the area 0 to the logical addresses 0 to 11, and the rows of the logical addresses 0 to 11 in the logical address table 60 are displayed. Is set to 0. Then, the status column corresponding to the area 0 of the status table 61 is set to RAID5. Further, in the column corresponding to the physical position 0 shown in the block table 62, the logical address of each block storing the file with RAID 5 and information indicating the parity information (denoted as P in FIG. 5) are set. Then, the control table 25 is changed to the state illustrated in FIG.

次に、図で例示された状態の各HDDの論理アドレス24〜35のブロックに、RAID0のファイルを記憶させた場合について説明する。図6は、RAID0でファイルを記憶させた場合の制御テーブル25を示す説明図である。 Next, a case where a RAID 0 file is stored in the block of the logical addresses 24 to 35 of each HDD in the state illustrated in FIG. 4 will be described. FIG. 6 is an explanatory diagram showing the control table 25 when a file is stored in RAID0.

ホストコンピュータ10が、論理アドレス24〜35にファイルを記憶させることを指示すると、割当制御部24は、論理アドレス24〜35に領域1を割り当てて、論理アドレステーブル60の論理アドレス24〜35の行の領域を1に設定する。そして、状態テーブル61の領域1に対応する状態の欄を、RAID0に設定する。また、各HDDにRAID0でファイルを記憶させる場合、ファイルにパリティ情報は付加されていないので、領域のパリティ情報を記憶するために設けられたブロックが未使用となる。そこで、割当制御部24は、そのブロックを仮想領域である領域100に割り当て、パリティ割当の欄に領域100を設定する。   When the host computer 10 instructs to store the files at the logical addresses 24 to 35, the assignment control unit 24 assigns the area 1 to the logical addresses 24 to 35 and the rows of the logical addresses 24 to 35 of the logical address table 60. Is set to 1. Then, the status column corresponding to the area 1 of the status table 61 is set to RAID0. Further, when storing a file with RAID 0 in each HDD, no parity information is added to the file, and therefore, a block provided for storing the parity information of the area is unused. Therefore, the allocation control unit 24 allocates the block to the area 100, which is a virtual area, and sets the area 100 in the parity allocation column.

そして、割当制御部24は、状態テーブル61の領域100に対応する物理位置の欄をRAID0でファイルを記憶させた物理位置である1に設定する。すると、パリティ情報が付加されなかったために使用されなかったブロックを使用可能にすることができる。   Then, the allocation control unit 24 sets the physical position column corresponding to the area 100 of the state table 61 to 1 which is the physical position where the file is stored in RAID0. Then, a block that is not used because parity information is not added can be made available.

なお、図6に例示したように、割当制御部24は、使用されている論理アドレスと連続していない論理アドレスにファイルを記憶することが指示された場合であっても、使用されている物理位置に連続した物理位置にファイルを記憶させる。具体的には、論理アドレス0〜11が使用されていて、論理アドレス24〜35にファイルを記憶することが指示された場合であっても、割当制御部24は、使用されている物理位置0に連続している物理位置1にファイルを記憶させる。   Note that, as illustrated in FIG. 6, the allocation control unit 24 uses the used physical address even when it is instructed to store the file at a logical address that is not continuous with the used logical address. The file is stored in a physical position continuous to the position. Specifically, even when logical addresses 0 to 11 are used and an instruction to store a file at logical addresses 24 to 35 is given, the allocation control unit 24 uses the physical location 0 used. The file is stored in the physical position 1 that is continuous to the.

次に、図6で例示された状態の各HDDが記憶しているRAID0のファイルを、RAID5に変更する場合について説明する。図7は、RAID0で記憶されたファイルをRAID5に変更する場合の制御テーブル25を示す説明図である。   Next, a case where a RAID 0 file stored in each HDD in the state illustrated in FIG. 6 is changed to RAID 5 will be described. FIG. 7 is an explanatory diagram showing the control table 25 when a file stored in RAID0 is changed to RAID5.

割当制御部24は、状態テーブル61の領域1の行の状態をRAID5に設定し、パリティ割当の欄に設定されていた領域番号を消去する。そして、領域100に対応する物理位置の欄の物理位置1を消去する。すると、領域100として利用可能にしていたブロックを領域1に戻し、そのブロックにRAID5のファイルのパリティ情報を記憶させることができる。割当制御部24は、ブロックテーブル62を参照して、HDD制御部28に、領域1の物理位置1が含むブロックが記憶しているファイルを読み出させ、パリティ情報生成部26に、パリティ情報を生成させる。HDD制御部28は、生成されたパリティ情報を、物理位置1におけるパリティ情報を記憶するためのブロックにそれぞれ記憶させる。   The allocation control unit 24 sets the status of the row of the area 1 in the status table 61 to RAID 5 and deletes the area number set in the parity allocation column. Then, the physical position 1 in the physical position column corresponding to the area 100 is erased. Then, the block that has been made available as the area 100 can be returned to the area 1, and the parity information of the RAID5 file can be stored in the block. The allocation control unit 24 refers to the block table 62, causes the HDD control unit 28 to read the file stored in the block included in the physical position 1 of the area 1, and sends the parity information to the parity information generation unit 26. Generate. The HDD control unit 28 stores the generated parity information in a block for storing the parity information at the physical position 1.

次に、図7で例示された状態の各HDDが領域0で記憶しているRAID5のファイルを、RAID0に変更する場合について説明する。図8は、RAID5で記憶されたファイルをRAID0に変更する場合の制御テーブル25を示す説明図である。   Next, a case where the RAID 5 file stored in the area 0 in each HDD in the state illustrated in FIG. 7 is changed to RAID 0 will be described. FIG. 8 is an explanatory diagram showing the control table 25 when a file stored in RAID5 is changed to RAID0.

割当制御部24は、状態テーブル61の領域0の行の状態をRAID0に設定し、パリティ割当を領域100に設定する。そして、領域100の行の物理位置に物理位置0を追加する。また、割当制御部24は、ブロックテーブル62を参照して、HDD制御部28に、物理位置0におけるパリティ情報を消去する。すると、RAID0で記憶されているファイルにはパリティ情報が付加されていないので、物理位置0におけるパリティ情報を記憶するためのブロックが使用可能になる。   The allocation control unit 24 sets the row state of the area 0 in the state table 61 to RAID 0 and sets the parity allocation to the area 100. Then, the physical position 0 is added to the physical position in the row of the area 100. Further, the allocation control unit 24 refers to the block table 62 and erases the parity information at the physical position 0 in the HDD control unit 28. Then, since parity information is not added to the file stored in RAID 0, a block for storing parity information at physical position 0 can be used.

次に、図8で例示された状態の各HDDに、複数のファイルをRAID0で記憶させる場合について説明する。図9は、RAID0のファイルを複数記憶させた場合の制御テーブル25を示す説明図である。   Next, a case where a plurality of files are stored in RAID 0 in each HDD illustrated in FIG. 8 will be described. FIG. 9 is an explanatory diagram showing the control table 25 when a plurality of RAID0 files are stored.

図8で例示された状態の各HDDに、3つのファイルをRAID0で記憶させる場合を例に説明する。図8を参照すると、論理アドレス36〜71には領域が割り当てられていない。ホストコンピュータ10が、論理アドレス36〜71に3つのファイルを記憶させることを指示すると、論理アドレス36〜47、48〜59、60〜71に、それぞれ領域2、3、4を割り当て、それらのブロックにそれぞれファイルを記憶させればよいことがわかる。そこで、割当制御部24は、論理アドレステーブル60の論理アドレス36〜47、48〜59、60〜71の各行の領域を2、3、4に設定する。   An example will be described in which three files are stored in RAID 0 in each HDD in the state illustrated in FIG. Referring to FIG. 8, no area is assigned to logical addresses 36-71. When the host computer 10 instructs to store three files at the logical addresses 36 to 71, areas 2, 3, and 4 are allocated to the logical addresses 36 to 47, 48 to 59, and 60 to 71, respectively. It is understood that it is only necessary to store the files in each. Therefore, the allocation control unit 24 sets the areas of the respective rows of the logical addresses 36 to 47, 48 to 59, and 60 to 71 of the logical address table 60 to 2, 3, and 4.

そして、割当制御部24は、状態テーブル61の領域2、3、4の各行の状態をRAID0に設定し、パリティ割当をそれぞれ領域100に設定する。また、状態テーブル61の領域100の行の物理位置に物理位置2、3、4を追加し、状態を未使用に設定する。そして、割当制御部24は、HDD制御部28に、物理位置2、3、4に、RAID0でファイルを記憶させる。   Then, the allocation control unit 24 sets the status of each row in the areas 2, 3, and 4 of the status table 61 to RAID 0 and sets the parity allocation to the area 100. Further, the physical positions 2, 3, and 4 are added to the physical position of the row of the area 100 of the state table 61, and the state is set to unused. Then, the allocation control unit 24 causes the HDD control unit 28 to store the file in the physical positions 2, 3, and 4 with RAID 0.

次に、図9で例示された状態の各HDDの仮想領域に、RAID5でファイルを記憶させる場合について説明する。図10は、仮想領域にRAID5でファイルを記憶させる場合の制御テーブル25を示す説明図である。   Next, a case where a file is stored with RAID 5 in the virtual area of each HDD in the state illustrated in FIG. 9 will be described. FIG. 10 is an explanatory diagram showing the control table 25 in the case where a file is stored in a virtual area with RAID5.

図9を参照すると、論理アドレス84〜95には領域が割り当てられていない。ホストコンピュータ10が、論理アドレス84〜95にファイルを記憶させることを指示すると、割当制御部24は、論理アドレス84〜95に未使用の仮想領域である領域100を割り当てて、論理アドレステーブル60の論理アドレス84〜95の行の領域を100に設定する。そして、状態テーブル61の領域100の行の状態をRAID5に設定する。   Referring to FIG. 9, no area is assigned to logical addresses 84-95. When the host computer 10 instructs to store the files at the logical addresses 84 to 95, the allocation control unit 24 allocates the unused virtual area 100 to the logical addresses 84 to 95, and stores the logical address table 60 in the logical address table 60. The area of the row of logical addresses 84 to 95 is set to 100. Then, the state of the row in the area 100 of the state table 61 is set to RAID5.

状態テーブル61の領域100の行の物理位置の欄は、物理位置0、2、3、4なので、割当制御部24は、HDD制御部28に、物理位置0、2、3、4におけるパリティ情報を記憶するためのブロックに、ファイルをRAID5で記憶させる。   Since the physical position column in the row of the area 100 of the state table 61 is the physical positions 0, 2, 3, and 4, the allocation control unit 24 sends the parity information at the physical positions 0, 2, 3, and 4 to the HDD control unit 28. The file is stored in RAID5 in the block for storing.

なお、各HDDに、領域と同じサイズのファイルを記憶させた場合について説明したが、領域と異なるサイズのファイルを各HDDに記憶させる場合であっても同様の処理を行うことができる。   Although the case where a file having the same size as the area is stored in each HDD has been described, the same processing can be performed even when a file having a size different from the area is stored in each HDD.

例えば、ファイルのサイズが領域よりも小さい場合には、領域の一部のブロックがファイルを記憶する。また、ファイルのサイズがテーブルの領域よりも大きい場合には、割当制御部24は、複数の領域を用いてファイルを記憶させる。   For example, when the size of the file is smaller than the area, some blocks in the area store the file. When the file size is larger than the table area, the allocation control unit 24 stores the file using a plurality of areas.

さらに、RAID0に割り当てられた領域に、その領域よりも小さいファイルをRAID5で記憶させる(上書きする)場合には、その領域に記憶されているファイルのパリティ情報を生成し、生成したパリティ情報とファイルとを、その領域のブロックに記憶させる。また、RAID5に割り当てられた領域に、その領域より小さいファイルをRAID0で記憶させる(上書きする)場合には、上書きされないブロック(すなわち、パリティ情報を記憶するために設けられたブロック)にパリティ情報が存在する可能性があるので、制御テーブル25が記憶している内容は変更せずに(すなわち、状態テーブル61の状態の欄をRAID5に設定したまま)、ファイルをその領域に記憶させる。   Further, when a file smaller than that area is stored (overwritten) in RAID 5 in the area assigned to RAID 0, the parity information of the file stored in that area is generated, and the generated parity information and file Are stored in the block of the area. When a file smaller than that area is stored in RAID 0 in the area assigned to RAID 5 (overwritten), parity information is stored in a block that is not overwritten (that is, a block provided for storing parity information). Since there is a possibility that the file exists, the contents stored in the control table 25 are not changed (that is, the state column of the state table 61 is set to RAID5), and the file is stored in the area.

次に、本発明の実施の形態のファイル管理システムの動作について、図面を参照して説明する。図11は、ファイル管理システムが、ファイルを記憶する際の動作を説明するフローチャートである。   Next, the operation of the file management system according to the embodiment of this invention will be described with reference to the drawings. FIG. 11 is a flowchart illustrating an operation when the file management system stores a file.

ホストコンピュータ10にファイルが入力され、RAIDタイプ指定部12がファイルを保存するRAIDタイプを指定すると、ホストコンピュータ10が搭載しているファイル管理プログラムは、記憶手段が記憶している論理アドレスの一覧を読み出し、入力されたファイルを記憶させる領域の論理アドレスを指定する。そして、IO発行部11は、入力されたファイルとRAIDタイプ指定部12が指定したRAIDタイプを示す情報と、指定した論理アドレスを示す情報とをRAIDコントローラ20に送信する。   When a file is input to the host computer 10 and the RAID type designation unit 12 designates a RAID type for storing the file, the file management program installed in the host computer 10 displays a list of logical addresses stored in the storage means. Specifies the logical address of the area where the read and input files are stored. Then, the IO issuing unit 11 transmits the input file, information indicating the RAID type specified by the RAID type specifying unit 12 and information indicating the specified logical address to the RAID controller 20.

RAIDコントローラ20のIO制御部21は、IO発行部11からファイルと、RAIDタイプを示す情報と、論理アドレスを示す情報とを受信すると、ファイルをHDD制御部28に出力し、RAIDタイプを示す情報をRAIDタイプ解析部23に出力し、ファイルと、論理アドレスを示す情報とを割当制御部24に出力する。   When the IO control unit 21 of the RAID controller 20 receives a file, information indicating the RAID type, and information indicating the logical address from the IO issuing unit 11, the IO control unit 21 outputs the file to the HDD control unit 28, and indicates the RAID type. Is output to the RAID type analysis unit 23, and the file and information indicating the logical address are output to the allocation control unit 24.

RAIDタイプ解析部23は、入力されたRAIDタイプを示す情報にもとづいて、ファイルをどのRAIDタイプで各HDDに記憶させるのかを解析する。そして、解析した結果をIO制御部21に出力する。IO制御部21は、RAIDタイプ解析部23が解析した結果を割当制御部24に出力する。   The RAID type analysis unit 23 analyzes which RAID type the file is stored in each HDD based on the information indicating the input RAID type. The analyzed result is output to the IO control unit 21. The IO control unit 21 outputs the result analyzed by the RAID type analysis unit 23 to the allocation control unit 24.

割当制御部24は、指定された論理アドレスを示す情報が入力されると、制御テーブル25を参照して、指定された論理アドレスを示す情報が示す論理アドレスが既に領域に割り当てられているか否かを判断する(ステップS101)。   When the information indicating the designated logical address is input, the allocation control unit 24 refers to the control table 25 to determine whether or not the logical address indicated by the information indicating the designated logical address has already been assigned to the area. Is determined (step S101).

割当制御部24は、指定された論理アドレスが領域に割り当てられていないと判断すると、制御テーブル25を検索して、未使用の領域の領域番号を抽出する(ステップS102)。   If the allocation control unit 24 determines that the designated logical address is not allocated to an area, the allocation control unit 24 searches the control table 25 and extracts an area number of an unused area (step S102).

割当制御部24は、抽出した領域番号から1つを選択し、選択した領域番号を制御テーブル25の論理アドレステーブル60の論理アドレスに対応する欄に設定する(ステップS103)。   The allocation control unit 24 selects one from the extracted area numbers, and sets the selected area number in the column corresponding to the logical address of the logical address table 60 of the control table 25 (step S103).

また、割当制御部24は、RAIDタイプ解析部23が解析した結果が入力されると、ホストコンピュータ10がRAID0を指定したか否かを判断する(ステップS104)。   In addition, when the result analyzed by the RAID type analysis unit 23 is input, the allocation control unit 24 determines whether the host computer 10 specifies RAID 0 (step S104).

割当制御部24は、RAID0が指定されたと判断すると、制御テーブル25の状態テーブル61の選択した領域番号に対応する状態の欄を、RAID0に設定する(ステップS105)。   If the allocation control unit 24 determines that RAID 0 is designated, it sets the status column corresponding to the selected area number in the status table 61 of the control table 25 to RAID 0 (step S105).

そして、割当制御部24は、制御テーブル25の状態テーブル61を参照して、未割当の領域の領域番号を検索して抽出し、領域番号を1つ選択する(ステップS106)。そして、ステップS103で選択された領域の領域番号に対応するパリティ割当の欄に、ステップS106で選択された領域番号を設定し、ステップS106で選択された領域番号に対応する物理位置の欄に、ステップS103で選択された領域番号に対応する物理位置を設定する(ステップS107)。   Then, the allocation control unit 24 refers to the state table 61 of the control table 25, searches for and extracts the area number of the unallocated area, and selects one area number (step S106). Then, the area number selected in step S106 is set in the parity allocation field corresponding to the area number of the area selected in step S103, and the physical position field corresponding to the area number selected in step S106 is set. A physical position corresponding to the area number selected in step S103 is set (step S107).

割当制御部24は、ステップS106で選択した未割当の領域のすべてのブロックに、物理位置を設定する(すなわち、仮想領域としてのブロックのすべてに、物理位置が設定される)と(ステップS108)、制御テーブル25の状態テーブル61におけるステップS106で選択した未割当の領域の状態を、未割当から未使用に変更して設定する(ステップS109)。   The allocation control unit 24 sets physical positions in all blocks in the unallocated area selected in step S106 (that is, physical positions are set in all blocks as virtual areas) (step S108). Then, the state of the unallocated area selected in step S106 in the state table 61 of the control table 25 is changed from unallocated to unused (step S109).

そして、割当制御部24は、制御テーブル25を参照して、ファイルを領域のブロックの大きさに分割し、分割したファイルと、選択した領域番号とをパリティ情報生成部26に出力する。   Then, the allocation control unit 24 refers to the control table 25, divides the file into area block sizes, and outputs the divided file and the selected area number to the parity information generation unit 26.

パリティ情報生成部26は、入力された分割されたファイルと、選択された領域番号とをHDD制御部28に出力する。   The parity information generation unit 26 outputs the input divided file and the selected area number to the HDD control unit 28.

また、割当制御部24は、ステップS104で、ホストコンピュータ10がRAID0を指定していないと判断すると、制御テーブル25の状態テーブル61の選択した領域番号に対応する状態の欄を、RAID5に設定する(ステップS110)。   If the allocation control unit 24 determines in step S104 that the host computer 10 does not specify RAID0, the allocation control unit 24 sets the status column corresponding to the selected area number in the status table 61 of the control table 25 to RAID5. (Step S110).

割当制御部24は、制御テーブル25を参照して、ファイルを領域のブロックの大きさに分割し、分割したファイルと、選択した領域番号とをパリティ情報生成部26に出力する。   The allocation control unit 24 refers to the control table 25, divides the file into area block sizes, and outputs the divided file and the selected area number to the parity information generation unit 26.

パリティ情報生成部26は、ブロックに分割されたファイルが入力されると、パリティ情報を生成する(ステップS111)。   When the file divided into blocks is input, the parity information generation unit 26 generates parity information (step S111).

パリティ情報生成部26は、生成したパリティ情報と、ブロックに分割されたファイルと、選択された領域番号とをHDD制御部28に出力する。   The parity information generation unit 26 outputs the generated parity information, the file divided into blocks, and the selected area number to the HDD control unit 28.

また、割当制御部24は、ステップS101で、指定された論理アドレスが既に領域に割り当てられていると判断すると、制御テーブル25を参照して、割り当てられている領域のRAIDタイプを確認する(ステップS112)。   If the allocation control unit 24 determines in step S101 that the specified logical address has already been allocated to the area, the allocation control unit 24 refers to the control table 25 and confirms the RAID type of the allocated area (step S101). S112).

割当制御部24は、割り当てられている領域のRAIDタイプと、指定されたRAIDタイプとが合致しないと判断すると(ステップS113)、割り当てられている領域のRAIDタイプを変更する処理を実行する(ステップS114)。なお、割り当てられている領域のRAIDタイプを変更する処理については後述する。   If the allocation control unit 24 determines that the RAID type of the allocated area does not match the designated RAID type (step S113), the allocation control unit 24 executes a process of changing the RAID type of the allocated area (step S113). S114). A process for changing the RAID type of the allocated area will be described later.

割当制御部24は、割り当てられている領域のRAIDタイプと、指定されたRAIDタイプとが合致すると判断したり(ステップS113)、割り当てられている領域のRAIDタイプを変更する処理を実行すると、指定されたRAIDタイプがRAID5であるか否かを判断する(ステップS115)。   When the allocation control unit 24 determines that the RAID type of the allocated area matches the specified RAID type (step S113), or executes the process of changing the RAID type of the allocated area, It is determined whether or not the RAID type set is RAID 5 (step S115).

割当制御部24は、指定されたRAIDタイプがRAID5であると判断すると、ファイルを領域のブロックの大きさに分割し、分割したファイルをパリティ情報生成部26に出力し、ステップS111以降の処理をパリティ情報生成部26に実行させる。   When determining that the designated RAID type is RAID 5, the allocation control unit 24 divides the file into block sizes of the area, outputs the divided file to the parity information generation unit 26, and performs the processing after step S111. The parity information generation unit 26 is caused to execute.

割当制御部24は、指定されたRAIDタイプがRAID5ではないと判断すると、ステップS116以降の処理をHDD制御部28に実行させる。   If the allocation control unit 24 determines that the designated RAID type is not RAID 5, the allocation control unit 24 causes the HDD control unit 28 to execute the processing from step S116.

HDD制御部28は、各HDDにファイル等を記憶させる(ステップS116)。なお、HDD制御部28は、パリティ情報生成部26がパリティ情報を生成した場合には、各HDDの所定のブロックにパリティ情報を記憶させる。   The HDD control unit 28 stores a file or the like in each HDD (step S116). When the parity information generation unit 26 generates parity information, the HDD control unit 28 stores the parity information in a predetermined block of each HDD.

次に、本発明の実施の形態のファイル管理システムが、各HDDが記憶しているファイルのRAIDタイプを変更する際の動作について説明する。   Next, the operation when the file management system according to the embodiment of this invention changes the RAID type of the file stored in each HDD will be described.

本発明の実施の形態のファイル管理システムが、各HDDが記憶しているファイルのRAIDタイプを変更する場合には、2つの場合が考えられる。   When the file management system according to the embodiment of the present invention changes the RAID type of a file stored in each HDD, there are two cases.

1つ目は、ホストコンピュータ10に、論理アドレスを指定し、RAIDタイプを変更する指示が入力された場合である。   The first is a case where the host computer 10 is instructed to specify a logical address and change the RAID type.

また、2つ目は、前述したファイルを記憶する際の動作で、割り当てられている領域のRAIDタイプと、指定されたRAIDタイプとが合致しない場合(ステップS113のNの場合)である。   The second is an operation when storing the above-described file, where the RAID type of the allocated area does not match the designated RAID type (N in step S113).

1つ目の場合と2つ目の場合とで、異なる動作について説明する。そこで、まず、1つ目の場合の動作について説明する。ホストコンピュータ10は、論理アドレスを指定し、変更後のRAIDタイプを示すコマンドをRAIDコントローラ20に送信する。   Different operations will be described in the first case and the second case. First, the operation in the first case will be described. The host computer 10 designates a logical address and transmits a command indicating the RAID type after the change to the RAID controller 20.

例えば、ホストコンピュータ10とRAIDコントローラ20とがSCSIインタフェースで接続されているのであれば、モードセレクトコマンドのユニークページをRAIDタイプを変更できるように定義してしておく。そして、ホストコンピュータ10のIO発行部11は、ファイルを各HDDに記憶させた後の任意のタイミングで、ホストコンピュータ10が、モードセレクトコマンドをRAIDコントローラ20に送信する等の動作を実行する。   For example, if the host computer 10 and the RAID controller 20 are connected via the SCSI interface, the unique page of the mode select command is defined so that the RAID type can be changed. The IO issuing unit 11 of the host computer 10 executes an operation such as the host computer 10 transmitting a mode select command to the RAID controller 20 at an arbitrary timing after the file is stored in each HDD.

RAIDコントローラ20のIO制御部21は、モードセレクトコマンドを受信すると、RAIDタイプ変更制御部22に出力する。RAIDタイプ変更制御部22は、モードセレクトコマンドが入力されると、モードセレクトコマンドのユニークページが示す変更後のRAIDタイプと、RAIDタイプを変更する論理アドレスとを割当制御部24に出力する。   When receiving the mode select command, the IO controller 21 of the RAID controller 20 outputs it to the RAID type change controller 22. When the mode select command is input, the RAID type change control unit 22 outputs the RAID type after change indicated by the unique page of the mode select command and the logical address for changing the RAID type to the assignment control unit 24.

また、2つ目の場合は、前述したファイルを記憶する際の動作の、ステップS113までの動作と同様の動作を行う。   In the second case, the same operation as that up to step S113 in the operation for storing the file is performed.

1つ目の場合と2つ目の場合とで共通するRAIDコントローラ20の動作について、図面を参照して説明する。図12は、各HDDが記憶しているファイルのRAIDタイプを変更する際のRAIDコントローラ20の動作を説明するフローチャートである。   The operation of the RAID controller 20 common to the first case and the second case will be described with reference to the drawings. FIG. 12 is a flowchart for explaining the operation of the RAID controller 20 when changing the RAID type of a file stored in each HDD.

割当制御部24は、ホストコンピュータ10の指示に応じて(前述した1つ目の場合)、または、制御テーブル25を参照して(前述した2つ目の場合)、RAIDタイプの変更がRAID5からRAID0への変更であるか否かを判断する(ステップS201)。   The allocation control unit 24 changes the RAID type from RAID 5 according to an instruction from the host computer 10 (first case described above) or referring to the control table 25 (second case described above). It is determined whether or not the change is to RAID0 (step S201).

割当制御部24は、RAIDタイプの変更がRAID5からRAID0への変更であると判断すると、制御テーブル25の状態テーブル61のRAIDタイプを変更する領域に対応する状態の欄をRAID0に変更して設定する(ステップS202)。   If the allocation control unit 24 determines that the change of the RAID type is a change from RAID 5 to RAID 0, the assignment control unit 24 changes the status column corresponding to the area to change the RAID type of the status table 61 of the control table 25 to RAID 0 and sets it. (Step S202).

そして、割当制御部24は、制御テーブル25の状態テーブル61を参照して、未割当の領域を検索して抽出し、1つを選択する(ステップS203)。そして、RAIDタイプを変更する領域に対応するパリティ割当の欄に、選択した領域の領域番号を設定する。そして、選択した領域に対応する物理位置の欄に、RAIDタイプを変更する領域に対応する物理位置を設定する(ステップS204)。   Then, the allocation control unit 24 refers to the status table 61 of the control table 25, searches for and extracts an unallocated area, and selects one (step S203). Then, the area number of the selected area is set in the parity allocation column corresponding to the area whose RAID type is to be changed. Then, the physical position corresponding to the area whose RAID type is to be changed is set in the physical position column corresponding to the selected area (step S204).

割当制御部24は、選択した未割当の領域のすべてのブロックに、物理位置が設定されると(ステップS205)、制御テーブル25の状態テーブル61における選択した領域番号を設定した未割当の領域の状態を、未割当から未使用に変更して設定する(ステップS206)。   When the physical position is set in all the blocks of the selected unallocated area (step S205), the allocation control unit 24 sets the selected area number in the status table 61 of the control table 25 to the unallocated area. The state is changed from unassigned to unused (step S206).

また、割当制御部24が、ステップS201で、RAIDタイプの変更がRAID5からRAID0への変更ではないと判断した場合について説明する。以下、説明の簡単のため、各領域と各物理位置とにそれぞれアルファベットを付する。   Further, a case will be described in which the allocation control unit 24 determines in step S201 that the RAID type change is not a change from RAID 5 to RAID 0. Hereinafter, for the sake of simplicity of explanation, each region and each physical position is given an alphabet.

割当制御部24は、制御テーブル25の状態テーブル61のRAIDタイプを変更する領域Cに対応する状態の欄をRAID5に変更して設定する(ステップS207)。   The allocation control unit 24 changes the status column corresponding to the area C in the status table 61 of the control table 25 to be changed to RAID 5 and sets it (step S207).

そして、割当制御部24は、制御テーブル25の状態テーブル61のRAIDタイプを変更する領域Cに対応するパリティ割当に設定されている領域番号Dを読み出す(ステップS208)。そして、読み出した領域番号Dの物理位置の欄から、RAIDタイプを変更する領域Cに対応する物理位置Cを消去し、制御テーブル25の状態テーブル61のRAIDタイプを変更する領域に対応するパリティ割当Dを消去する(ステップS209)。   Then, the allocation control unit 24 reads the region number D set in the parity allocation corresponding to the region C whose RAID type is to be changed in the state table 61 of the control table 25 (step S208). Then, the physical position C corresponding to the area C whose RAID type is to be changed is erased from the physical position column of the read area number D, and the parity allocation corresponding to the area whose RAID type is to be changed in the state table 61 of the control table 25. D is deleted (step S209).

割当制御部24は、制御テーブル25の状態テーブル61を参照して、ステップS208で読み出した領域番号Dの領域である領域Dの状態が使用中であるか否かを判断する(ステップS210)。   The allocation control unit 24 refers to the state table 61 of the control table 25 and determines whether or not the state of the region D that is the region of the region number D read in step S208 is in use (step S210).

割当制御部24は、使用中であれば、制御テーブル25の状態テーブル61を参照して、状態が未使用か未割当であって、物理位置が集合で、物理位置が1つ以上設定されている領域を抽出し、抽出した領域から1つ(領域E)を選択する(ステップS211)。そして、割当制御部24は、制御テーブル25の状態テーブル61におけるステップS211で選択した領域Eの物理位置の欄に設定されている物理位置から1つを選択(物理位置F)する(ステップS212)。   If the allocation control unit 24 is in use, the allocation control unit 24 refers to the status table 61 of the control table 25, and the status is unused or unallocated, the physical position is a set, and one or more physical positions are set. The selected region is extracted, and one (region E) is selected from the extracted regions (step S211). Then, the allocation control unit 24 selects one (physical position F) from the physical positions set in the physical position column of the area E selected in step S211 in the state table 61 of the control table 25 (step S212). .

割当制御部24は、制御テーブル25の状態テーブル61において、ステップS212で選択した物理位置Fを、ステップS211で選択した領域Eの物理位置の欄から消去する(ステップS213)。   The allocation control unit 24 deletes the physical position F selected in step S212 from the physical position column of the area E selected in step S211 in the state table 61 of the control table 25 (step S213).

割当制御部24は、制御テーブル25の状態テーブル61において、ステップS211で抽出した領域Eに対応する状態の欄を未割当に設定する(ステップS214)。   The allocation control unit 24 sets the status column corresponding to the area E extracted in step S211 to unallocated in the status table 61 of the control table 25 (step S214).

割当制御部24は、制御テーブル25の状態テーブル61において、ステップS208で読み出した領域Dに対応する物理位置の欄に、ステップS212で選択した物理位置F
を追加する(ステップS215)。
In the status table 61 of the control table 25, the allocation control unit 24 puts the physical position F selected in step S212 in the physical position column corresponding to the area D read in step S208.
Is added (step S215).

そして、割当制御部24は、制御テーブル25の状態テーブル61において、ステップS212で選択した物理位置Fに対応するパリティ割当の欄に、ステップS208で読み出した領域番号Dを設定する(ステップS216)。   Then, the allocation control unit 24 sets the area number D read in step S208 in the parity allocation column corresponding to the physical position F selected in step S212 in the state table 61 of the control table 25 (step S216).

割当制御部24は、制御テーブル25のブロックテーブル62において、RAIDタイプを変更する領域Cのブロックのうち、パリティ情報の存在を示す表示を消去し、ステップS212で選択した物理位置Fのブロックのうち、パリティ情報を記憶するために設けられたブロックが、パリティ情報を記憶していることを示す表示に変更する。   In the block table 62 of the control table 25, the allocation control unit 24 deletes the display indicating the presence of parity information among the blocks in the area C whose RAID type is to be changed, and among the blocks at the physical position F selected in step S212. The block provided for storing the parity information is changed to a display indicating that the parity information is stored.

また、HDD制御部28は、RAIDタイプを変更する領域Cからパリティ情報を読み出し、読み出したパリティ情報を、ステップS212で選択した物理位置Fのうち、パリティ情報を記憶するために設けられたブロックに記憶させる(ステップS217)。   Further, the HDD control unit 28 reads the parity information from the area C whose RAID type is to be changed, and stores the read parity information in the block provided for storing the parity information in the physical position F selected in step S212. Store (step S217).

割当制御部24は、ブロックテーブル62を参照して、HDD制御部28に、RAIDタイプを変更する領域Cに記憶されているファイルを読み出させ、パリティ情報生成部26に、パリティ情報を生成させる(ステップS218)。HDD制御部28は、生成されたパリティ情報を、領域Cのパリティ情報を記憶するためのブロックにそれぞれ記憶させる(ステップS219)。   The allocation control unit 24 refers to the block table 62, causes the HDD control unit 28 to read the file stored in the area C whose RAID type is to be changed, and causes the parity information generation unit 26 to generate parity information. (Step S218). The HDD control unit 28 stores the generated parity information in the block for storing the parity information of the area C (step S219).

以上に述べたように、この実施の形態によれば、ファイルごとにRAIDタイプを設定し、設定したRAIDタイプを容易に変更することができる。   As described above, according to this embodiment, a RAID type can be set for each file, and the set RAID type can be easily changed.

また、ファイルを記憶している領域内のブロックであって、パリティ情報を記憶していないブロックを使用して、分割したファイルと分割したファイルのパリティ情報とを記憶させるため、ハードディスクドライブの記憶容量の利用効率を向上させることができる。   Also, the storage capacity of the hard disk drive is used to store the divided file and the parity information of the divided file by using the blocks in the area where the file is stored and not storing the parity information. The utilization efficiency can be improved.

なお、以上に述べた実施の形態では、RAID0とRAID5の場合について説明したが、本発明は、他のRAIDタイプにも適用することができる。   In the embodiment described above, the cases of RAID 0 and RAID 5 have been described, but the present invention can also be applied to other RAID types.

例えば、RAID1の場合には、論理アドレスに対して分割した領域を2つ割り当て、それらをミラーリングで使用し、それぞれの領域をRAID0と同じ管理方法にすればよい。   For example, in the case of RAID1, two areas divided for a logical address may be allocated and used for mirroring, and each area may be managed by the same management method as RAID0.

また、例えば、RAID3の場合には、RAID5と同様の管理方法でありながら、ファイルを書き込む際にストライプサイズを小さくして、1つのファイルを4つのHDDに分散することで実現できる。このとき、パリティ情報を格納するHDDはRAID5と同じように移動していくため、一般的なRAID3とは異なるが、RAID3本来の目的である、1つのファイルを複数のHDDに分散させて、かつ、冗長パリティを持たせるという条件は満たしている。   Further, for example, in the case of RAID3, although the management method is the same as RAID5, it can be realized by reducing the stripe size when writing a file and distributing one file to four HDDs. At this time, since the HDD for storing the parity information moves in the same way as RAID 5, it is different from general RAID 3, but one file which is the original purpose of RAID 3 is distributed to a plurality of HDDs, and The condition of having redundant parity is satisfied.

なお、本発明の実施の形態は、ホストコンピュータ10とRAIDコントローラ20というシステム構成だけではなく、サーバに搭載するRAIDボードや、NAS(Network Attached Storage)装置など、HDDを搭載しかつRAIDの仕組みを利用する全ての装置に適用可能である。   In the embodiment of the present invention, not only the system configuration of the host computer 10 and the RAID controller 20, but also a RAID board mounted on a server and a NAS (Network Attached Storage) device such as a HDD and a RAID mechanism are provided. Applicable to all devices used.

本発明は、VOD(Video On Demand)サーバや放送システムなど映像情報を配信するシステムに適用することができる。また、X線やCTスキャン等の画像データを録画したり再生したりする医療分野等のシステムに適用することができる。さらに、ホームサーバやHDD搭載家庭電化製品など、一般家庭において大量のデータを扱う装置に適用することができる。   The present invention can be applied to a system that distributes video information, such as a VOD (Video On Demand) server or a broadcasting system. Further, the present invention can be applied to a system in the medical field that records and reproduces image data such as X-rays and CT scans. Furthermore, the present invention can be applied to a device that handles a large amount of data in a general household, such as a home server or an HDD-equipped home appliance.

具体的には、例えば、ホームサーバでは、使用者がコンピュータを用いて作成したデータや、デジタルカメラやデジタルビデオカメラで撮影した画像データや映像データなどのように、唯一のものは信頼性を重視してRAID5でHDDに記憶させる。また、テレビジョン放送の番組や、映画等は容量効率を重視してRAID0でHDDに記憶させる。そして、後になってHDDの空き容量が少なくなってきた場合には、撮影した画像データをRAID0に変更して空き容量を増やすことができる。また、お気に入りの映画をどうしても残しておきたい場合には、RAID5に変更することができる。   Specifically, for example, in a home server, the only thing that emphasizes reliability is data such as data created by a user using a computer, image data or video data shot with a digital camera or digital video camera, etc. Then, the data is stored in the HDD with RAID5. Also, television broadcast programs, movies, and the like are stored in the HDD with RAID 0 with an emphasis on capacity efficiency. If the free space of the HDD becomes small later, the captured image data can be changed to RAID 0 to increase the free space. Also, if you want to keep your favorite movie, you can change it to RAID5.

本発明によるRAID制御装置を利用したファイル管理システムの実施の形態の一構成例を示すブロック図である。It is a block diagram which shows one structural example of embodiment of the file management system using the RAID control apparatus by this invention. 各HDDが記憶するファイルを示す説明図である。It is explanatory drawing which shows the file which each HDD memorize | stores. 各HDDが記憶しているファイルのRAIDタイプを変更する場合を示す説明図である。It is explanatory drawing which shows the case where the RAID type of the file which each HDD has stored is changed. 制御テーブルを示す説明図である。It is explanatory drawing which shows a control table. RAID5でファイルを記憶させた場合の制御テーブルを示す説明図である。It is explanatory drawing which shows the control table at the time of storing a file by RAID5. RAID0でファイルを記憶させた場合の制御テーブルを示す説明図である。It is explanatory drawing which shows the control table at the time of storing a file by RAID0. RAID0で記憶されたファイルをRAID5に変更する場合の制御テーブルを示す説明図である。It is explanatory drawing which shows the control table in the case of changing the file memorize | stored by RAID0 to RAID5. RAID5で記憶されたファイルをRAID0に変更する場合の制御テーブルを示す説明図である。It is explanatory drawing which shows the control table in the case of changing the file memorize | stored by RAID5 to RAID0. RAID0のファイルを複数記憶させた場合の制御テーブルを示す説明図である。It is explanatory drawing which shows the control table at the time of storing several RAID0 files. 仮想領域にRAID5でファイルを記憶させる場合の制御テーブルを示す説明図である。It is explanatory drawing which shows the control table in the case of storing a file by RAID5 in a virtual area. ファイル管理システムが、ファイルを記憶する際の動作を説明するフローチャートである。It is a flowchart explaining operation | movement when a file management system memorize | stores a file. 各HDDが記憶しているファイルのRAIDタイプを変更する際のRAIDコントローラの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of a RAID controller at the time of changing the RAID type of the file which each HDD memorize | stores.

符号の説明Explanation of symbols

10 ホストコンピュータ
11 IO発行部
12 RAIDタイプ指定部
20 RAIDコントローラ
21 IO制御部
22 RAIDタイプ変更制御部
23 RAIDタイプ解析部
24 割当制御部
25 制御テーブル
26 パリティ情報生成部
27 コピー制御部
28 HDD制御部
30、31、32、33 HDD
60 論理アドレステーブル
61 状態テーブル
62 ブロックテーブル
DESCRIPTION OF SYMBOLS 10 Host computer 11 IO issuing part 12 RAID type designation | designated part 20 RAID controller 21 IO control part 22 RAID type change control part 23 RAID type analysis part 24 Allocation control part 25 Control table 26 Parity information generation part 27 Copy control part 28 HDD control part 30, 31, 32, 33 HDD
60 Logical address table 61 Status table 62 Block table

Claims (4)

ホストコンピュータおよび複数のハードディスク装置に接続され、前記複数のハードディスク装置に分散してファイルを記憶させるRAID制御装置において、
前記ホストコンピュータからパリティ情報を用いた第1のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域を確保して当該領域に対して第1のRAIDタイプを示す情報を対応させ、当該ファイルのパリティ情報を生成し、第1のRAIDタイプを示す情報を対応させた領域にファイルのデータと生成したパリティ情報とを記憶させる第1の記憶制御手段と、
前記ホストコンピュータからパリティ情報を用いない第2のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域であって前記第1の記憶制御手段が確保する領域と同容量の領域を確保し、当該領域に対して第2のRAIDタイプを示す情報を対応させ、第2のRAIDタイプを示す情報を対応させた領域における一部のブロックにファイルのデータを記憶させるとともに、第2のRAIDタイプを示す情報を対応させた領域における他のブロックを未使用状態に設定する第2の記憶制御手段と、
第1のRAIDタイプを第2のRAIDタイプに変更する指示が前記ホストコンピュータから入力された場合に、ファイルのデータと生成したパリティ情報とが記憶されている領域に対応する情報を第1のRAIDタイプを示す情報から第2のRAIDタイプを示す情報に変更するとともに、パリティ情報が記憶されていたブロックを未使用状態に設定する第1のタイプ変更手段と、
第2のRAIDタイプを第1のRAIDタイプに変更する指示が前記ホストコンピュータから入力された場合に、ファイルのデータが記憶されている領域に対応する情報を第2のRAIDタイプを示す情報から第1のRAIDタイプを示す情報に変更するとともに、当該ファイルのパリティ情報を生成し、当該領域における前記第2の記憶制御手段が未使用状態に設定したブロックが未だ未使用状態であれば、そのブロックに生成したパリティ情報を記憶させ、当該領域における前記第2の記憶制御手段が未使用状態に設定したブロックに他のデータが記憶されているときには他のブロックに生成したパリティ情報を記憶させる第2のタイプ変更手段とを備え、
前記第1の記憶制御手段と前記第2の記憶制御手段とは、前記第2の記憶制御手段によって未使用状態に設定されたブロックを、確保する領域に含める
ことを特徴とするRAID制御装置。
In a RAID control device that is connected to a host computer and a plurality of hard disk devices and stores files in a distributed manner on the plurality of hard disk devices,
When an instruction to store a file of the first RAID type using parity information is input from the host computer, an area composed of a plurality of blocks allocated across a plurality of hard disk devices is secured and the area is First, information indicating the first RAID type is associated to generate parity information of the file, and the file data and the generated parity information are stored in an area corresponding to the information indicating the first RAID type. Memory control means,
When the host computer inputs an instruction to store a file of the second RAID type that does not use parity information, the first storage is an area composed of a plurality of blocks allocated over a plurality of hard disk devices. An area having the same capacity as the area secured by the control means is secured, information indicating the second RAID type is associated with the area, and some blocks in the area associated with the information indicating the second RAID type A second storage control means for storing the data of the file and setting other blocks in the area corresponding to the information indicating the second RAID type to an unused state;
When an instruction to change the first RAID type to the second RAID type is input from the host computer, the information corresponding to the area where the file data and the generated parity information are stored is the first RAID. Changing the information indicating the type to the information indicating the second RAID type, and setting the block in which the parity information is stored to an unused state;
When an instruction to change the second RAID type to the first RAID type is input from the host computer, the information corresponding to the area in which the file data is stored is changed from the information indicating the second RAID type to the first RAID type. The information is changed to the information indicating the RAID type of 1 and the parity information of the file is generated, and if the block set in the unused state by the second storage control means in the area is still in the unused state, the block A second storage unit that stores the generated parity information, and stores the generated parity information in another block when other data is stored in the block set in the unused state by the second storage control unit in the area. And a type change means
The RAID control apparatus, wherein the first storage control unit and the second storage control unit include a block set in an unused state by the second storage control unit in an area to be secured .
第2の記憶制御手段は、未使用状態を示す情報を制御テーブルに設定することによってブロックを未使用状態に設定し、
第1の記憶制御手段は、前記制御テーブルにおいて、未使用状態を示す情報が所定の数設定されていると、それらの情報に対応するブロックァイルのデータリティ情報とを記憶させる
請求項記載のRAID制御装置。
The second storage control means sets the block to the unused state by setting information indicating the unused state in the control table,
First storage control means, in the control table, the information indicating the unused state is a predetermined number set in the block corresponding to the information, causes storing the data and parity information files The RAID control device according to claim 1 .
第1の記憶制御手段と第2の記憶制御手段とは、制御テーブルで、領域と、前記領域記憶されているファイルのRAIDタイプを示す情報とを対応づける
請求項記載のRAID制御装置。
The RAID control apparatus according to claim 2 , wherein the first storage control unit and the second storage control unit associate a region with information indicating a RAID type of a file stored in the region in a control table.
ホストコンピュータの指示に応じて複数のハードディスク装置に分散してファイルを記憶させるRAID制御装置で実行されるRAID制御方法であって
前記ホストコンピュータからパリティ情報を用いた第1のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域を確保して当該領域に対して第1のRAIDタイプを示す情報を対応させ、当該ファイルのパリティ情報を生成し、第1のRAIDタイプを示す情報を対応させた領域にファイルのデータと生成したパリティ情報とを記憶させる第1の記憶制御処理と、
前記ホストコンピュータからパリティ情報を用いない第2のRAIDタイプでファイルを記憶させる指示が入力された場合に、複数のハードディスク装置に亘って割り当てられる複数のブロックからなる領域であって前記第1の記憶制御処理で確保される領域と同容量の領域を確保し、当該領域に対して第2のRAIDタイプを示す情報を対応させ、第2のRAIDタイプを示す情報を対応させた領域における一部のブロックにファイルのデータを記憶させるとともに、第2のRAIDタイプを示す情報を対応させた領域における他のブロックを未使用状態に設定する第2の記憶制御処理と、
第1のRAIDタイプを第2のRAIDタイプに変更する指示が前記ホストコンピュータから入力された場合に、ファイルのデータと生成したパリティ情報とが記憶されている領域に対応する情報を第1のRAIDタイプを示す情報から第2のRAIDタイプを示す情報に変更するとともに、パリティ情報が記憶されていたブロックを未使用状態に設定する第1のタイプ変更処理と、
第2のRAIDタイプを第1のRAIDタイプに変更する指示が前記ホストコンピュータから入力された場合に、ファイルのデータが記憶されている領域に対応する情報を第2のRAIDタイプを示す情報から第1のRAIDタイプを示す情報に変更するとともに、当該ファイルのパリティ情報を生成し、当該領域における前記第2の記憶制御処理で未使用状態に設定されたブロックが未だ未使用状態であれば、そのブロックに生成したパリティ情報を記憶させ、当該領域における前記第2の記憶制御処理で未使用状態に設定されたブロックに他のデータが記憶されているときには他のブロックに生成したパリティ情報を記憶させる第2のタイプ変更処理とを実行し、
前記第1の記憶制御処理および前記第2の記憶制御処理で、前記第2の記憶制御処理で未使用状態に設定されたブロックを、確保する領域に含める
ことを特徴とするRAID制御方法。
A RAID control method executed by the RAID controller to store the files distributed across multiple hard disk apparatus in response to an instruction of the host computer,
When an instruction to store a file of the first RAID type using parity information is input from the host computer, an area composed of a plurality of blocks allocated across a plurality of hard disk devices is secured and the area is First, information indicating the first RAID type is associated to generate parity information of the file, and the file data and the generated parity information are stored in an area corresponding to the information indicating the first RAID type. Storage control processing of
When the host computer inputs an instruction to store a file of the second RAID type that does not use parity information, the first storage is an area composed of a plurality of blocks allocated over a plurality of hard disk devices. An area having the same capacity as the area secured by the control process is secured, information indicating the second RAID type is associated with the area, and a part of the area associated with the information indicating the second RAID type is associated with the area. A second storage control process for storing file data in a block and setting other blocks in an area corresponding to information indicating a second RAID type to an unused state;
When an instruction to change the first RAID type to the second RAID type is input from the host computer, the information corresponding to the area where the file data and the generated parity information are stored is the first RAID. Changing the information indicating the type to the information indicating the second RAID type, and setting the block in which the parity information is stored to an unused state;
When an instruction to change the second RAID type to the first RAID type is input from the host computer, the information corresponding to the area in which the file data is stored is changed from the information indicating the second RAID type to the first RAID type. The information is changed to the information indicating the RAID type of 1 and the parity information of the file is generated. If the block set to the unused state in the second storage control process in the area is still in the unused state, Parity information generated in a block is stored, and when other data is stored in a block set to an unused state in the second storage control process in the area, the generated parity information is stored in another block. Execute a second type change process,
A RAID control method characterized in that, in the first storage control process and the second storage control process, a block set in an unused state by the second storage control process is included in an area to be secured .
JP2005158776A 2005-05-31 2005-05-31 RAID control apparatus and RAID control method Active JP4347265B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005158776A JP4347265B2 (en) 2005-05-31 2005-05-31 RAID control apparatus and RAID control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005158776A JP4347265B2 (en) 2005-05-31 2005-05-31 RAID control apparatus and RAID control method

Publications (2)

Publication Number Publication Date
JP2006338091A JP2006338091A (en) 2006-12-14
JP4347265B2 true JP4347265B2 (en) 2009-10-21

Family

ID=37558624

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005158776A Active JP4347265B2 (en) 2005-05-31 2005-05-31 RAID control apparatus and RAID control method

Country Status (1)

Country Link
JP (1) JP4347265B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8775868B2 (en) * 2010-09-28 2014-07-08 Pure Storage, Inc. Adaptive RAID for an SSD environment
JP5319723B2 (en) 2011-03-24 2013-10-16 株式会社東芝 Memory system and program
US10942808B2 (en) 2018-12-17 2021-03-09 International Business Machines Corporation Adaptive data and parity placement using compression ratios of storage devices

Also Published As

Publication number Publication date
JP2006338091A (en) 2006-12-14

Similar Documents

Publication Publication Date Title
US7975115B2 (en) Method and apparatus for separating snapshot preserved and write data
US10977124B2 (en) Distributed storage system, data storage method, and software program
US7716183B2 (en) Snapshot preserved data cloning
US8607010B2 (en) Information processing system and management device for managing relocation of data based on a change in the characteristics of the data over time
JP4806556B2 (en) Storage system and configuration change method
US8239621B2 (en) Distributed data storage system, data distribution method, and apparatus and program to be used for the same
US8131926B2 (en) Generic storage container for allocating multiple data formats
JP5780067B2 (en) Storage system, storage control device, and storage control method
KR20130064521A (en) Data storage device and data management method thereof
JP6511795B2 (en) STORAGE MANAGEMENT DEVICE, STORAGE MANAGEMENT METHOD, STORAGE MANAGEMENT PROGRAM, AND STORAGE SYSTEM
JP2009104421A (en) Storage access device
US10564865B2 (en) Lockless parity management in a distributed data storage system
KR20080029677A (en) File storage system and file storage and file search method in file storage system
EP2157504A2 (en) Virtual disk management program, storage device management program, multinode storage system, and virtual disk managing method
US8195877B2 (en) Changing the redundancy protection for data associated with a file
US20120011319A1 (en) Mass storage system and method of operating thereof
US8656131B2 (en) Method and apparatus for expanding a virtual storage device
US7644206B2 (en) Command queue ordering by positionally pushing access commands
US7676644B2 (en) Data processing system, storage apparatus and management console
JP4347265B2 (en) RAID control apparatus and RAID control method
JPH09288547A (en) Array-type storage device
JPWO2015140931A1 (en) Hierarchical storage system with trial area, storage controller and program
US9848042B1 (en) System and method for data migration between high performance computing architectures and de-clustered RAID data storage system with automatic data redistribution
JP6693181B2 (en) Storage control device, storage control method, and storage control program
JP7261756B2 (en) Storage system, processing method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090414

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090615

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: 20090707

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090715

R150 Certificate of patent or registration of utility model

Ref document number: 4347265

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120724

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120724

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130724

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350