Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7804186B2 - Storage control program, storage control method, and storage control device - Google Patents
[go: Go Back, main page]

JP7804186B2 - Storage control program, storage control method, and storage control device - Google Patents

Storage control program, storage control method, and storage control device

Info

Publication number
JP7804186B2
JP7804186B2 JP2022059254A JP2022059254A JP7804186B2 JP 7804186 B2 JP7804186 B2 JP 7804186B2 JP 2022059254 A JP2022059254 A JP 2022059254A JP 2022059254 A JP2022059254 A JP 2022059254A JP 7804186 B2 JP7804186 B2 JP 7804186B2
Authority
JP
Japan
Prior art keywords
chunks
storage
chunk
file
archive
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
JP2022059254A
Other languages
Japanese (ja)
Other versions
JP2023150248A (en
Inventor
悌 伊藤
Original Assignee
エフサステクノロジーズ株式会社
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 エフサステクノロジーズ株式会社 filed Critical エフサステクノロジーズ株式会社
Priority to JP2022059254A priority Critical patent/JP7804186B2/en
Publication of JP2023150248A publication Critical patent/JP2023150248A/en
Application granted granted Critical
Publication of JP7804186B2 publication Critical patent/JP7804186B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、ストレージ制御プログラム、ストレージ制御方法およびストレージ制御装置に関する。 The present invention relates to a storage control program, a storage control method, and a storage control device.

オンラインストレージサービス、クラウドストレージサービスなど、ネットワークを介してストレージ領域を提供するストレージサービスが普及している。また、このようなストレージサービスと顧客のコンピュータとの間でゲートウェイとして機能するストレージゲートウェイがある。 Storage services that provide storage space over a network, such as online storage services and cloud storage services, are becoming more common. There are also storage gateways that function as gateways between such storage services and customer computers.

例えば、顧客のコンピュータとクラウドストレージなどの外部ストレージとの間で書き込みデータを中継するストレージゲートウェイが提案されている。このストレージゲートウェイは、顧客のコンピュータからファイル単位でデータの書き込み要求を受け付け、書き込みが要求されたデータの重複を排除し、重複が排除されたデータをオブジェクト単位で外部ストレージに転送する。 For example, a storage gateway has been proposed that relays write data between a customer's computer and external storage such as cloud storage. This storage gateway accepts data write requests on a file-by-file basis from the customer's computer, deduplicates the data requested to be written, and transfers the deduplicated data to external storage on an object-by-object basis.

また、データの重複排除技術に関しては、例えば、データが同一である複数のチャンクをマージする際に、一方のチャンクに対応する参照カウントを他方のチャンクに引き継ぐようにしたストレージ装置が提案されている。さらに、ストレージに対するデータ格納技術に関しては、例えば、メタデータに含まれる単語の出現頻度および書き込み時刻が比較的近いファイルセット同士を同じクラスタに分類して、共通のテープ媒体に格納するようにした情報処理システムが提案されている。 Furthermore, with regard to data deduplication technology, for example, a storage device has been proposed that, when merging multiple chunks containing identical data, transfers the reference count corresponding to one chunk to the other chunk. Furthermore, with regard to data storage technology for storage, for example, an information processing system has been proposed that classifies file sets that have relatively similar word frequencies and write times in the same cluster and stores them on a common tape medium.

特開2019-95925号公報Japanese Patent Application Laid-Open No. 2019-95925 特開2017-45177号公報JP 2017-45177 A 特開2018-190393号公報JP 2018-190393 A

ところで、ストレージサービスの1つとして、データの長期保管に適したアーカイブストレージを提供するサービスがある。上記のストレージゲートウェイでも、データ格納先の外部ストレージとしてアーカイブストレージが利用される場合がある。この場合、例えば、1つまたは複数のオブジェクトを含むアーカイブストレージ用のデータセットが生成され、このデータセットを単位としてアーカイブストレージに格納される。 By the way, one type of storage service is one that provides archive storage suitable for long-term data storage. The storage gateway described above may also use archive storage as the external storage for storing data. In this case, for example, a dataset for archive storage containing one or more objects is generated, and this dataset is stored in the archive storage as a unit.

また、アーカイブストレージに格納されたデータセットのデフラグ処理は、例えば、次のような手順で実行される。データセットの中から、参照数が「0」のチャンクが多い第1のデータセットが特定され、第1のデータセットがアーカイブストレージから取り出されるとともに、アーカイブストレージから削除される。取り出されたデータセットから、参照数が「0」でない有効なチャンクが抽出され、抽出されたチャンクによって第2のデータセットが新たに生成(再構築)されて、アーカイブストレージに格納される。 Furthermore, defragmentation of datasets stored in archive storage is performed, for example, using the following procedure: A first dataset with many chunks with a reference count of "0" is identified from among the datasets, and the first dataset is retrieved and deleted from the archive storage. Valid chunks with a reference count other than "0" are extracted from the retrieved dataset, and a new second dataset is generated (reconstructed) using the extracted chunks and stored in the archive storage.

しかし、このような手順のデフラグ処理が繰り返されると、デフラグ処理によって新たに生成されたデータセットがアーカイブストレージに格納された後、短期間でそのデータセットがアーカイブストレージから削除されるというケースが発生し得る。このケースは、再構築されてアーカイブストレージに格納されたデータセットにおいて、参照数が「0」のチャンクが早期に増え、そのデータセットが再構築のために取り出されるとともにアーカイブストレージから削除される、というケースである。 However, when defragmentation processing using this procedure is repeated, cases may arise in which a newly generated dataset is stored in archive storage by defragmentation, and then deleted from archive storage shortly thereafter. In this case, the number of chunks with a reference count of "0" increases early in a dataset that has been reconstructed and stored in archive storage, and the dataset is retrieved for reconstruction and deleted from archive storage.

アーカイブストレージでは、長期保管という目的から、データセットの最短保管期間が定められ、最短保管期間が経過する前にデータセットを削除する場合には追加料金が発生する場合がある。上記のように、デフラグ処理によって生成されてアーカイブストレージに格納されたデータセットが短時間で削除されると、削除のための追加料金が発生してしまうという問題がある。 In archive storage, a minimum storage period for datasets is set for the purpose of long-term storage, and additional fees may be incurred if a dataset is deleted before the minimum storage period has elapsed. As mentioned above, if a dataset generated by defragmentation and stored in archive storage is deleted in a short period of time, additional fees may be incurred for the deletion, which is a problem.

1つの側面では、本発明は、外部ストレージからデータが短期間で削除される事態の発生を抑制可能なストレージ制御プログラム、ストレージ制御方法およびストレージ制御装置を提供することを目的とする。 In one aspect, the present invention aims to provide a storage control program, a storage control method, and a storage control device that can prevent data from being deleted from external storage in a short period of time.

1つの案では、コンピュータに、書き込みが要求された複数のファイルのそれぞれを分割することで得られた複数の分割データセットから、重複を排除して複数のチャンクを取得し、複数のチャンクから選択された2以上のチャンクをそれぞれまとめて複数の保管データセットを生成し、複数のファイルのうち第1のファイルの格納要求を受信すると、複数のチャンクのうち第1のファイルから参照されるチャンクを含む1以上の第1の保管データセットを特定し、1以上の第1の保管データセットを外部ストレージに格納するとともに、複数のチャンクのうち第1のファイルから参照されるチャンクに対応付けられた参照数を、複数の分割データセットのうち第1のファイルに含まれる分割データセットから参照される数の分だけ増加させ、複数のファイルのうち第2のファイルの削除要求を受信すると、複数のチャンクのうち第2のファイルから参照されるチャンクに対応する参照数を、複数の分割データセットのうち第2のファイルに含まれる分割データセットから参照される数の分だけ減少させ、複数の保管データセットのうち外部ストレージに格納された保管データセットの中から、複数のファイルのうち、直近の一定期間に外部ストレージへの格納が要求されたファイルから参照されている1以上の第1のチャンクを特定して外部ストレージから取得し、1以上の第1のチャンクとそれぞれ同じデータを有する1以上の第2のチャンクを生成し、1以上の第1のチャンクのそれぞれに対応する参照数を1以上の第2のチャンクにそれぞれ付け替えるとともに、1以上の第1のチャンクのそれぞれに対応する参照数を0に更新し、1以上の第2のチャンクをまとめて新たな保管データセットを生成して外部ストレージに格納し、複数の保管データセットのうち外部ストレージに格納された保管データセットおよび新たな保管データセットの中から、対応する保管データセット内のすべてのチャンクに対応する参照数が0である第2の保管データセットが検出されると、第2の保管データセットを外部ストレージから削除する、処理を実行させるストレージ制御プログラムが提供される。 In one proposal, a computer obtains multiple chunks by eliminating duplicates from multiple split datasets obtained by splitting each of multiple files for which writing is requested, and generates multiple storage datasets by combining two or more chunks selected from the multiple chunks.When a storage request for a first file of the multiple files is received, the computer identifies one or more first storage datasets including chunks referenced by the first file of the multiple chunks, stores the one or more first storage datasets in external storage, and increases the reference count associated with the chunk referenced by the first file of the multiple chunks by the number referenced by the split dataset included in the first file of the multiple split datasets.When a deletion request for a second file of the multiple files is received, the computer decreases the reference count associated with the chunk referenced by the second file of the multiple chunks by the number referenced by the split dataset included in the second file of the multiple split datasets. a storage control program for executing a process to identify one or more first chunks referenced by files among a plurality of files for which storage in external storage has been requested within a recent fixed period from among a plurality of storage datasets stored in external storage, acquire them from the external storage, generate one or more second chunks each having the same data as the one or more first chunks, assign one or more second chunks to the reference numbers corresponding to each of the one or more first chunks, respectively, and update the reference numbers corresponding to each of the one or more first chunks to zero, combine the one or more second chunks to generate a new storage dataset and store it in the external storage, and, if a second storage dataset in which the reference numbers corresponding to all chunks in the corresponding storage dataset are zero is detected from among the storage datasets stored in external storage and the new storage dataset among the plurality of storage datasets, delete the second storage dataset from the external storage.

また、1つの案では、上記のストレージ制御プログラムに基づく処理と同様の処理をコンピュータが実行するストレージ制御方法が提供される。
さらに、1つの案では、上記のストレージ制御プログラムに基づく処理と同様の処理を実行するストレージ制御装置が提供される。
In addition, one proposal provides a storage control method in which a computer executes processing similar to the processing based on the above-mentioned storage control program.
Furthermore, in one proposal, a storage control device is provided that executes processing similar to the processing based on the above-mentioned storage control program.

1つの側面では、外部ストレージからデータが短期間で削除される事態の発生を抑制できる。 On the one hand, it can prevent data from being deleted from external storage in a short period of time.

第1の実施の形態に係るストレージシステムの構成例および処理例を示す図である。1 illustrates a configuration example and a processing example of a storage system according to a first embodiment; 第2の実施の形態に係る情報処理システムの構成例を示す図である。FIG. 10 illustrates an example of a configuration of an information processing system according to a second embodiment. クラウドストレージゲートウェイのハードウェア構成例を示す図である。FIG. 2 illustrates an example of the hardware configuration of a cloud storage gateway. クラウドストレージゲートウェイが備える処理機能の構成例を示す図である。FIG. 2 is a diagram illustrating an example of the configuration of processing functions provided in a cloud storage gateway. チャンクマップテーブルのデータ構成例を示す図である。FIG. 10 is a diagram illustrating an example of the data configuration of a chunk map table. チャンク管理テーブルのデータ構成例を示す図である。FIG. 10 is a diagram illustrating an example of the data configuration of a chunk management table. オブジェクトの生成例を示す図である。FIG. 10 is a diagram illustrating an example of object generation. チャンクグループ管理テーブルのデータ構成例を示す図である。FIG. 10 is a diagram illustrating an example of the data configuration of a chunk group management table. デフラグ判定テーブルのデータ構成例を示す図である。FIG. 10 is a diagram illustrating an example of the data configuration of a defragmentation determination table. オブジェクトストレージおよびアーカイブストレージに対するデータ格納処理例を示す第1の図である。FIG. 1 is a first diagram illustrating an example of data storage processing for object storage and archive storage. オブジェクトストレージおよびアーカイブストレージに対するデータ格納処理例を示す第2の図である。FIG. 2 is a second diagram illustrating an example of data storage processing for object storage and archive storage. オブジェクトストレージおよびアーカイブストレージに対するデータ格納処理例を示す第3の図である。FIG. 3 is a third diagram illustrating an example of data storage processing for object storage and archive storage. デフラグ処理の比較例を示す第1の図である。FIG. 10 is a first diagram showing a comparative example of defragmentation processing. デフラグ処理の比較例を示す第2の図である。FIG. 11 is a second diagram showing a comparative example of defragmentation processing. 第2の実施の形態におけるデフラグ処理例を示す第1の図である。FIG. 11 is a first diagram illustrating an example of defragmentation processing according to the second embodiment. 第2の実施の形態におけるデフラグ処理例を示す第2の図である。FIG. 11 is a second diagram illustrating an example of defragmentation processing according to the second embodiment. 第2の実施の形態におけるデフラグ処理例を示す第3の図である。FIG. 10 is a third diagram illustrating an example of defragmentation processing according to the second embodiment. ファイル書き込み処理の手順を示すフローチャートの例(その1)である。10 is a first example of a flowchart illustrating a procedure for a file writing process. ファイル書き込み処理の手順を示すフローチャートの例(その2)である。10 is a second example of a flowchart illustrating a procedure for a file writing process. アーカイブストレージに対するデータ格納処理の手順を示すフローチャートの例である。10 is an example of a flowchart illustrating a procedure for a data storage process in archive storage. アーカイブストレージからのデータ削除処理の手順を示すフローチャートの例である。10 is an example of a flowchart illustrating a procedure for deleting data from archive storage. デフラグ処理の手順を示すフローチャートの例(その1)である。10 is a first example of a flowchart illustrating a procedure for defragmentation processing. デフラグ処理の手順を示すフローチャートの例(その2)である。10 is a second example of a flowchart illustrating a procedure for defragmentation processing.

以下、本発明の実施の形態について図面を参照して説明する。
〔第1の実施の形態〕
図1は、第1の実施の形態に係るストレージシステムの構成例および処理例を示す図である。図1に示すストレージシステムは、ストレージ制御装置1と外部ストレージ2を有する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
First Embodiment
1 is a diagram showing an example of the configuration and processing of a storage system according to a first embodiment. The storage system shown in FIG.

ストレージ制御装置1は、例えば図示しないクライアント装置からの要求に応じて、外部ストレージ2へのデータの格納や、外部ストレージ2からのデータの取り出し、外部ストレージ2に格納されたデータの削除などの制御処理を実行する。ストレージ制御装置1は、例えば、図示しないプロセッサを有するコンピュータである。この場合、上記の制御処理は、例えば、プロセッサがプログラムを実行することで実現される。 The storage control device 1 performs control processes such as storing data in the external storage 2, retrieving data from the external storage 2, and deleting data stored in the external storage 2 in response to requests from, for example, a client device (not shown). The storage control device 1 is, for example, a computer having a processor (not shown). In this case, the above control processes are realized, for example, by the processor executing a program.

外部ストレージ2は、ストレージ制御装置1の外部に接続されたストレージ領域である。外部ストレージ2は、データの長期保存に適するが、データの短期保存には適さない。例えば、外部ストレージ2にはデータの最短保管期間が設定されており、データの格納から最短保管期間が経過する前にそのデータが外部ストレージ2から削除される場合、追加の料金が発生する。 External storage 2 is a storage area connected externally to storage control device 1. External storage 2 is suitable for long-term data storage, but not for short-term data storage. For example, a minimum data storage period is set for external storage 2, and if data is deleted from external storage 2 before the minimum storage period has elapsed since the data was stored, additional charges will be incurred.

以下、ストレージ制御装置1の処理を説明する。
ストレージ制御装置1は、書き込みが要求された複数のファイルのそれぞれを分割することで得られた複数の分割データセットから、重複を排除することで複数のチャンクを取得する。また、ストレージ制御装置1は、取得した複数のチャンクから選択された2以上のチャンクをそれぞれまとめて、複数の保管データセットを生成する。図1の例では、m個のファイルFL1~FLmからチャンクCK1~CK9,・・・,CK21,CK22が取得されている。また、チャンクCK1~CK9,・・・,CK21,CK22から、n個の保管データセットAC1~ACnが生成されている。
The processing of the storage control device 1 will be described below.
The storage control device 1 acquires multiple chunks by eliminating duplicates from multiple split data sets obtained by dividing each of multiple files requested to be written. The storage control device 1 also generates multiple storage data sets by combining two or more chunks selected from the acquired multiple chunks. In the example of FIG. 1 , chunks CK1 to CK9, ..., CK21, and CK22 are acquired from m files FL1 to FLm. Furthermore, n storage data sets AC1 to ACn are generated from chunks CK1 to CK9, ..., CK21, and CK22.

ここで、図1では、ファイルFL1~FLmに含まれる各分割データセットには、対応するチャンクの符号が表示されている。例えば、ファイルFL1は4つの分割データセットに分割され、これらの分割データセットはそれぞれチャンクCK1,CK2,CK3,CK4に対応する。また、ファイルFL2は4つの分割データセットに分割され、これらの分割データセットはそれぞれチャンクCK1,CK5,CK3,CK6に対応する。ファイルFL1とファイルFL2との間では、チャンクCK1,CK3に対応する同じ内容の分割データセットが重複していることがわかる。 In Figure 1, each split dataset contained in files FL1 to FLm is labeled with the symbol of the corresponding chunk. For example, file FL1 is split into four split datasets, which correspond to chunks CK1, CK2, CK3, and CK4, respectively. File FL2 is split into four split datasets, which correspond to chunks CK1, CK5, CK3, and CK6, respectively. It can be seen that split datasets with the same content corresponding to chunks CK1 and CK3 overlap between files FL1 and FL2.

また、重複が排除された各チャンクには、参照数が対応付けられている。参照数は、対応するチャンクが、外部ストレージ2に格納されたファイルの分割データセットのうちいくつの分割データセットから参照されているかを示す。参照数の初期値は「0」である。 In addition, each chunk from which duplicates have been removed is associated with a reference number. The reference number indicates how many of the split data sets of the file stored in external storage 2 reference the corresponding chunk. The initial value of the reference number is "0".

ストレージ制御装置1は、複数のファイルのうち第1のファイルの格納要求を受信すると、この第1のファイルから参照されるチャンクを含む1以上の保管データセットを特定する。ストレージ制御装置1は、特定された1以上の第1の保管データセットを外部ストレージ2に格納する。これとともに、ストレージ制御装置1は、第1のファイルから参照されるチャンクに対応する参照数を、この第1のファイルに含まれる分割データセットから参照される数の分だけ増加させる。 When the storage control device 1 receives a storage request for a first file of multiple files, it identifies one or more stored datasets that include chunks referenced by this first file. The storage control device 1 stores the identified one or more first stored datasets in the external storage 2. At the same time, the storage control device 1 increases the reference count corresponding to the chunks referenced by the first file by the number referenced by the split datasets included in this first file.

例えば、ファイルFL1の格納が要求されると、ストレージ制御装置1は、ファイルFL1から参照されるチャンクCK1~CK4を含む保管データセットAC1を特定し、保管データセットAC1を外部ストレージ2に格納する。これとともに、ストレージ制御装置1は、チャンクCK1~CK4にそれぞれ対応する参照数を、ファイルFL1に含まれる分割データセットから参照される数の分だけ増加させる。例えば、チャンクCK1は、ファイルFL1内の1つの分割データセットから参照されているので、チャンクCK1に対応する参照数を「1」だけ増加させる。これにより、チャンクCK1に対応する参照数は「1」となる。 For example, when a request is made to store file FL1, the storage control device 1 identifies storage dataset AC1, which includes chunks CK1 to CK4 referenced by file FL1, and stores storage dataset AC1 in external storage 2. At the same time, the storage control device 1 increases the reference counts corresponding to chunks CK1 to CK4 by the number of references from split datasets included in file FL1. For example, because chunk CK1 is referenced by one split dataset within file FL1, the reference count corresponding to chunk CK1 is increased by "1". As a result, the reference count corresponding to chunk CK1 becomes "1".

このような手順で、外部ストレージ2に対するファイルFL1~FLmの格納が要求され、ファイルFL1~FLmに対応するチャンクを含むすべての保管データセットAC1~ACnが外部ストレージ2に格納されたとする。このとき、チャンクCK1~CK9に対応する参照数は、それぞれ「8」、「1」、「3」、「1」、「6」、「2」、「4」、「1」、「1」になったとする。また、チャンクCK21,CK22に対応する参照数は、それぞれ「1」、「1」になったとする。 Let's assume that a request to store files FL1 to FLm in external storage 2 is made using this procedure, and all of the saved data sets AC1 to ACn containing chunks corresponding to files FL1 to FLm are stored in external storage 2. At this point, let's assume that the reference counts corresponding to chunks CK1 to CK9 are "8", "1", "3", "1", "6", "2", "4", "1", and "1", respectively. Also, let's assume that the reference counts corresponding to chunks CK21 and CK22 are "1" and "1", respectively.

また、ストレージ制御装置1は、第2のファイルの削除要求を受信すると、この第2のファイルから参照されるチャンクに対応する参照数を、第2のファイルに含まれる分割データセットから参照される数の分だけ減少させる。例えば、ファイルFL1,FL2の削除が要求されたとする。この場合、ストレージ制御装置1は、図1に示すように、ファイルFL1,FL2から参照されるチャンクCK1~CK6に対応する参照数を、それぞれ「8」、「1」、「3」、「1」、「6」、「2」から「6」、「0」、「1」、「0」、「5」、「1」に更新する。 Furthermore, when the storage control device 1 receives a request to delete a second file, it decrements the reference counts corresponding to chunks referenced by this second file by the number of references from the split data sets included in the second file. For example, suppose a request is made to delete files FL1 and FL2. In this case, as shown in Figure 1, the storage control device 1 updates the reference counts corresponding to chunks CK1 to CK6 referenced by files FL1 and FL2 from "8", "1", "3", "1", "6", and "2" to "6", "0", "1", "0", "5", and "1", respectively.

また、ストレージ制御装置1は、外部ストレージ2に格納された保管データセットAC1~ACnの中から、直近の一定期間に外部ストレージ2への格納が要求されたファイルから参照されている1以上のチャンクを特定する。ストレージ制御装置1は、このような条件を満たすチャンクが特定されると、特定されたチャンクを外部ストレージ2から取得する。 The storage control device 1 also identifies one or more chunks from among the storage datasets AC1 to ACn stored in the external storage 2 that are referenced by files that have been requested to be stored in the external storage 2 within a certain recent period. When the storage control device 1 identifies chunks that satisfy these conditions, it acquires the identified chunks from the external storage 2.

図1では例として、上記条件を満たすチャンクとしてチャンクCK1,CK5,CK7が特定されたとする。ストレージ制御装置1は、例えば、チャンクCK1,CK5を含む保管データセットAC1とチャンクCK7を含む保管データセットAC2とを外部ストレージ2から取り出すことで、チャンクCK1,CK5,CK7を取得する。 In Figure 1, as an example, it is assumed that chunks CK1, CK5, and CK7 have been identified as chunks that satisfy the above conditions. The storage control device 1 obtains chunks CK1, CK5, and CK7 by, for example, retrieving stored dataset AC1, which includes chunks CK1 and CK5, and stored dataset AC2, which includes chunk CK7, from external storage 2.

ストレージ制御装置1は、取得したチャンクCK1,CK5,CK7とそれぞれ同じデータを有する新たなチャンクCK1’,CK5’,CK7’を生成する。このとき、ストレージ制御装置1は、元のチャンクCK1,CK5,CK7のそれぞれに対応する参照数を新たなチャンクCK1’,CK5’,CK7’にそれぞれ付け替える。図1の例では、チャンクCK1の参照数「6」がチャンクCK1’に付け替えられ、チャンクCK5の参照数「5」がチャンクCK5’に付け替えられ、チャンクCK7の参照数「4」がチャンクCK7’に付け替えられる。また、ストレージ制御装置1は、元のチャンクCK1,CK5,CK7のそれぞれに対応する参照数を「0」に更新する。 The storage control device 1 generates new chunks CK1', CK5', and CK7' that contain the same data as the acquired chunks CK1, CK5, and CK7, respectively. At this time, the storage control device 1 replaces the reference counts corresponding to the original chunks CK1, CK5, and CK7 with the new chunks CK1', CK5', and CK7', respectively. In the example of Figure 1, the reference count "6" for chunk CK1 is replaced with chunk CK1', the reference count "5" for chunk CK5 is replaced with chunk CK5', and the reference count "4" for chunk CK7 is replaced with chunk CK7'. The storage control device 1 also updates the reference counts corresponding to the original chunks CK1, CK5, and CK7 to "0."

なお、図示しないが、ストレージ制御装置1は、ファイルと元のチャンクCK1,CK5,CK7との対応関係を示す情報を、そのファイルと新たなチャンクCK1’,CK5’,CK7’との対応関係を示すように更新する。例えば、あるファイルのある分割データセットに元のチャンクCK1が対応付けられていた場合、この分割データセットに対応するチャンクが新たなチャンクCK1’に更新される。 Although not shown, the storage control device 1 updates the information indicating the correspondence between the file and the original chunks CK1, CK5, and CK7 to indicate the correspondence between the file and the new chunks CK1', CK5', and CK7'. For example, if the original chunk CK1 is associated with a certain split data set of a certain file, the chunk corresponding to this split data set is updated to the new chunk CK1'.

そして、ストレージ制御装置1は、新たなチャンクCK1’,CK5’,CK7’をまとめて新たな保管データセットACxを生成し、この保管データセットACxを外部ストレージ2に格納する。一方、上記の条件を満たすチャンクCK1,CK5,CK7が含まれる保管データセットAC1,AC2は、上記のように参照数が付け替えられるだけで、外部ストレージ2に格納され続ける。 The storage control device 1 then combines the new chunks CK1', CK5', and CK7' to generate a new storage dataset ACx, and stores this storage dataset ACx in the external storage 2. On the other hand, the storage datasets AC1 and AC2 that contain chunks CK1, CK5, and CK7 that satisfy the above conditions simply have their reference numbers changed as described above, and continue to be stored in the external storage 2.

また、ストレージ制御装置1は、外部ストレージ2に格納された保管データセットAC1~ACnおよび新たな保管データセットACxの中から、対応する保管データセット内のすべてのチャンクに対応する参照数が「0」である保管データセットが検出されると、この保管データセットを外部ストレージ2から削除する。ただし、上記のように保管データセットACxが外部ストレージ2に格納された時点では、すべてのチャンクに対応する参照数が「0」である保管データセットは検出されない。 Furthermore, when the storage control device 1 detects a storage dataset in which the reference count for all chunks in the corresponding storage dataset is "0" from among the storage datasets AC1 to ACn stored in the external storage 2 and the new storage dataset ACx, it deletes this storage dataset from the external storage 2. However, when the storage dataset ACx is stored in the external storage 2 as described above, a storage dataset in which the reference count for all chunks is "0" is not detected.

この後、図示しないが、例えばファイルFL3,FL4の削除が要求されたとする。この場合、ストレージ制御装置1は、ファイルFL3,FL4から参照されるチャンクに対応する参照数を、ファイルFL3,FL4に含まれる分割データセットから参照される数の分だけ減少させる。この処理により、チャンクCK3,CK6,CK8,CK9にそれぞれ対応する参照数が「0」になる。 After this, although not shown, suppose a request is made to delete files FL3 and FL4. In this case, the storage control device 1 reduces the reference counts corresponding to the chunks referenced by files FL3 and FL4 by the number referenced by the split data sets contained in files FL3 and FL4. As a result of this process, the reference counts corresponding to chunks CK3, CK6, CK8, and CK9 each become "0."

これにより、保管データセットAC1,AC2に含まれるすべてのチャンクの参照数が「0」になることから、ストレージ制御装置1は、保管データセットAC1,AC2を外部ストレージ2から削除する。一方、外部ストレージ2に格納されたばかりの保管データセットACxは、削除されずに格納され続ける。 As a result, the reference counts of all chunks contained in storage datasets AC1 and AC2 become "0," and the storage control device 1 deletes storage datasets AC1 and AC2 from external storage 2. Meanwhile, storage dataset ACx, which has just been stored in external storage 2, remains stored without being deleted.

ここで、ファイルFL1,FL2の削除要求を受信した場合のデフラグ処理の比較例について説明する。
この比較例では、ファイルの削除要求に伴い、参照数が「0」になるチャンクが多くなった保管データセットが発生すると、その保管データセットが取り出される。そして、取り出された保管データセット内のチャンクのうち、参照数が「0」でないチャンクだけによって新たな保管データセットが生成されて、外部ストレージ2に格納される。一方、取り出された保管データセットは外部ストレージ2から削除される。
Here, a comparative example of defragmentation processing when a request to delete files FL1 and FL2 is received will be described.
In this comparative example, when a file deletion request results in a storage dataset with many chunks whose reference count is "0," the storage dataset is extracted. Then, of the chunks in the extracted storage dataset, a new storage dataset is generated from only those chunks whose reference count is not "0," and the new storage dataset is stored in the external storage 2. Meanwhile, the extracted storage dataset is deleted from the external storage 2.

例えば、ファイルFL1,FL2の削除要求に応じて参照数が更新された後、参照数が「0」になるチャンクが多くなった保管データセットとして保管データセットAC1が特定される。すると、保管データセットAC1が取り出され、参照数が「0」でないチャンクCK1,CK3,CK5,CK6によって新たな保管データセットが生成されて、外部ストレージ2に格納される。一方、保管データセットAC1は外部ストレージ2から削除される。 For example, after the reference counts are updated in response to a request to delete files FL1 and FL2, storage dataset AC1 is identified as the storage dataset with the largest number of chunks with a reference count of "0." Then, storage dataset AC1 is extracted, and a new storage dataset is generated from chunks CK1, CK3, CK5, and CK6, whose reference counts are not "0," and stored in external storage 2. Meanwhile, storage dataset AC1 is deleted from external storage 2.

次に、ファイルFL3,FL4の削除が要求されると、チャンクCK3,CK6の参照数が「0」となる。この場合、参照数が「0」になるチャンクが多くなった保管データセットとして、新たに格納されたばかりの保管データセットが特定されて取り出されるとともに、外部ストレージ2から削除される。このように、比較例では、外部ストレージ2に格納されてから短期間で削除される保管データセットが発生しやすい。 Next, when a request is made to delete files FL3 and FL4, the reference counts of chunks CK3 and CK6 become "0." In this case, the newly stored stored dataset is identified as the stored dataset with the largest number of chunks with a reference count of "0," and is extracted and deleted from external storage 2. In this way, in the comparative example, stored datasets are likely to be deleted shortly after being stored in external storage 2.

これに対して、本実施の形態のストレージ制御装置1は、ファイルFL1,FL2の削除要求に応じて参照数が更新された後、参照数が「0」になるチャンクが多くなった保管データセットAC1を、外部ストレージ2から削除せずに残す。その代わり、ストレージ制御装置1は、直近の一定期間に外部ストレージ2への格納が要求されたファイルから参照されているチャンクCK1,CK5,CK7を特定する。 In contrast, the storage control device 1 of this embodiment does not delete from the external storage 2 the stored dataset AC1, which now has many chunks with a reference count of "0" after the reference count is updated in response to a deletion request for files FL1 and FL2. Instead, the storage control device 1 identifies chunks CK1, CK5, and CK7 that are referenced by files that have been requested to be stored in the external storage 2 within the most recent fixed period.

ストレージ制御装置1は、特定されたチャンクCK1,CK5,CK7とそれぞれ同じデータを有する新たなチャンクCK1’,CK5’,CK7’を生成する。このとき、元のチャンクCK1,CK5,CK7のそれぞれに対応する参照数が新たなチャンクCK1’,CK5’,CK7’にそれぞれ付け替えられ、元のチャンクCK1,CK5,CK7のそれぞれに対応する参照数が「0」に更新される。そして、ストレージ制御装置1は、新たなチャンクCK1’,CK5’,CK7’をまとめて新たな保管データセットACxを生成し、この保管データセットACxを外部ストレージ2に格納する。 The storage control device 1 generates new chunks CK1', CK5', and CK7' that contain the same data as the identified chunks CK1, CK5, and CK7, respectively. At this time, the reference numbers corresponding to the original chunks CK1, CK5, and CK7 are replaced with the reference numbers corresponding to the new chunks CK1', CK5', and CK7', respectively, and the reference numbers corresponding to the original chunks CK1, CK5, and CK7 are updated to "0." The storage control device 1 then combines the new chunks CK1', CK5', and CK7' to generate a new storage dataset ACx, and stores this storage dataset ACx in the external storage 2.

格納された保管データセットACxは、直近の一定期間に外部ストレージ2への格納が要求されたファイルから参照されているチャンクだけを含むので、各チャンクの参照数は短期間では「0」になりにくい。このため、保管データセットACxは、外部ストレージ2に格納されてから早期に削除される可能性が低い。一方、元のチャンクCK1,CK5,CK7を含む保管データセットAC1は、すべてのチャンクの参照数が「0」になるまで外部ストレージ2に格納され続ける。このため、保管データセットAC1についても、外部ストレージ2に格納されてから早期に削除される可能性が低い。 The stored storage dataset ACx contains only chunks referenced by files requested to be stored in external storage 2 within a recent fixed period, so the reference count for each chunk is unlikely to reach "0" in a short period of time. For this reason, storage dataset ACx is unlikely to be deleted early after being stored in external storage 2. On the other hand, storage dataset AC1, which contains the original chunks CK1, CK5, and CK7, will continue to be stored in external storage 2 until the reference counts for all chunks reach "0." For this reason, storage dataset AC1 is also unlikely to be deleted early after being stored in external storage 2.

このように、本実施の形態のストレージ制御装置1によれば、外部ストレージ2からデータが短期間で削除される事態の発生を抑制できる。
〔第2の実施の形態〕
次に、図1の外部ストレージ2としてアーカイブストレージが用いられ、図1のストレージ制御装置1としてクラウドストレージゲートウェイが用いられた場合の例について説明する。
In this way, the storage control device 1 of this embodiment can prevent data from being deleted from the external storage 2 in a short period of time.
Second Embodiment
Next, an example will be described in which an archive storage is used as the external storage 2 in FIG. 1 and a cloud storage gateway is used as the storage control device 1 in FIG.

図2は、第2の実施の形態に係る情報処理システムの構成例を示す図である。図2に示す情報処理システムは、クラウドストレージゲートウェイ100、NAS(Network Attached Storage)クライアント210およびクラウドストレージシステム220を含む。クラウドストレージゲートウェイ100は、ネットワーク231を介してNASクライアント210と接続され、また、ネットワーク232を介してクラウドストレージシステム220と接続されている。ネットワーク231は、例えばLAN(Local Area Network)であり、ネットワーク232は、例えばWAN(Wide Area Network)である。 Figure 2 is a diagram showing an example configuration of an information processing system according to the second embodiment. The information processing system shown in Figure 2 includes a cloud storage gateway 100, a NAS (Network Attached Storage) client 210, and a cloud storage system 220. The cloud storage gateway 100 is connected to the NAS client 210 via a network 231, and is also connected to the cloud storage system 220 via a network 232. The network 231 is, for example, a LAN (Local Area Network), and the network 232 is, for example, a WAN (Wide Area Network).

クラウドストレージシステム220は、ネットワーク232を介してクラウドストレージサービスを提供する。クラウドストレージシステム220は、クラウドストレージ領域として、オブジェクトストレージ221とアーカイブストレージ222とを提供する。オブジェクトストレージ221では、データがオブジェクト単位で管理される。例えば、オブジェクトストレージ221は、分散型のストレージシステムとして実現される。一方、アーカイブストレージ222は、データの長期保管に適したストレージ領域である。 Cloud storage system 220 provides cloud storage services via network 232. Cloud storage system 220 provides object storage 221 and archive storage 222 as cloud storage areas. In object storage 221, data is managed on an object-by-object basis. For example, object storage 221 is implemented as a distributed storage system. On the other hand, archive storage 222 is a storage area suitable for long-term data storage.

クラウドストレージシステム220は、サービスのクライアント(ここではクラウドストレージゲートウェイ100)から、オブジェクトストレージ221に対するオブジェクトの格納要求を受け付けて、オブジェクトをオブジェクトストレージ221に格納する。また、クラウドストレージシステム220は、オブジェクトストレージ221に格納されたオブジェクトの中から、アーカイブストレージ222に格納するオブジェクトの指定を受け付け、指定されたオブジェクトをアーカイブストレージ222に格納する。アーカイブストレージ222に対するデータの格納は、1つ以上のオブジェクトを含むアーカイブを単位として実行される。例えば、アーカイブストレージ222への格納対象として複数のオブジェクトが指定されると、それらの複数のオブジェクトを含むアーカイブが作成され、そのアーカイブがアーカイブストレージ222に格納される。なお、アーカイブストレージ222に格納されたオブジェクトは、オブジェクトストレージ221から削除されてもよい。 The cloud storage system 220 accepts a request to store an object in the object storage 221 from a service client (here, the cloud storage gateway 100), and stores the object in the object storage 221. The cloud storage system 220 also accepts a designation of an object to be stored in the archive storage 222 from among the objects stored in the object storage 221, and stores the designated object in the archive storage 222. Data storage in the archive storage 222 is performed in units of archives containing one or more objects. For example, when multiple objects are designated to be stored in the archive storage 222, an archive containing these multiple objects is created, and the archive is stored in the archive storage 222. Note that objects stored in the archive storage 222 may be deleted from the object storage 221.

オブジェクトストレージ221とアーカイブストレージ222のいずれについても、データの格納や読み出しの際に料金が発生する。また、前述のように、アーカイブストレージ222はデータの長期保管に適している。このため、例えば、アーカイブストレージ222ではアーカイブの最短保管期間が定められており、最短保管期間が経過する前にアーカイブを削除する場合には追加料金が発生する。 For both object storage 221 and archive storage 222, fees are incurred when storing and retrieving data. As mentioned above, archive storage 222 is suitable for long-term data storage. For this reason, for example, archive storage 222 has a minimum archive storage period, and an additional fee is incurred if an archive is deleted before the minimum storage period has elapsed.

なお、図示しないが、クラウドストレージシステム220には、オブジェクトストレージ221およびアーカイブストレージ222に対するアクセス要求の受け付けや、各ストレージへのアクセス制御などの処理を実行するサーバ装置が含まれる。これらの処理は、複数のサーバ装置によって分散して実行されてもよい。 Although not shown, the cloud storage system 220 includes a server device that receives access requests to the object storage 221 and archive storage 222 and performs processes such as access control to each storage. These processes may be distributed and performed by multiple server devices.

NASクライアント210は、クラウドストレージゲートウェイ100を、ファイルシステムによって管理される記憶領域を提供するNASサーバとして認識する。この記憶領域とは、クラウドストレージシステム220によって提供される記憶領域である。そして、NASクライアント210は、例えばNFS(Network File System)プロトコルやCIFS(Common Internet File System)プロトコルにしたがって、クラウドストレージゲートウェイ100に対してファイル単位でデータの読み書きを要求する。すなわち、NASクライアント210は、クラウドストレージゲートウェイ100のNASサーバ機能により、クラウドストレージシステム220の記憶領域を大容量の仮想的なネットワークファイルシステムとして利用できるようになる。 The NAS client 210 recognizes the cloud storage gateway 100 as a NAS server that provides a storage area managed by a file system. This storage area is provided by the cloud storage system 220. The NAS client 210 then requests the cloud storage gateway 100 to read and write data on a file-by-file basis, for example, according to the NFS (Network File System) protocol or the CIFS (Common Internet File System) protocol. In other words, the NAS server function of the cloud storage gateway 100 allows the NAS client 210 to use the storage area of the cloud storage system 220 as a large-capacity virtual network file system.

NASクライアント210は、例えば、データバックアップのためのバックアップソフトウェアを実行する。この場合NASクライアント210は、NASクライアント210に記憶されたファイル、またはNASクライアント210に接続されたサーバ(例えば業務サーバ)に記憶されたファイルを、NASサーバから提供される記憶領域にバックアップする。 The NAS client 210, for example, executes backup software for data backup. In this case, the NAS client 210 backs up files stored in the NAS client 210 or files stored on a server (e.g., a business server) connected to the NAS client 210 to a storage area provided by the NAS server.

クラウドストレージゲートウェイ100は、図1に示したストレージ制御装置1の一例である。クラウドストレージゲートウェイ100は、NASクライアント210とクラウドストレージシステム220との間で転送されるデータを中継する。 The cloud storage gateway 100 is an example of the storage control device 1 shown in Figure 1. The cloud storage gateway 100 relays data transferred between the NAS client 210 and the cloud storage system 220.

例えば、クラウドストレージゲートウェイ100は、NASサーバ機能により、NASクライアント210からファイルの書き込み要求を受信し、書き込みが要求されたファイルを内部にキャッシュする。クラウドストレージゲートウェイ100は、書き込みが要求されたファイルをチャンク単位に分割し、チャンク内の実データ(チャンクデータ)をオブジェクトストレージ221に格納する。このとき、所定個数のチャンクデータがグループ化されてオブジェクトが生成され、生成されたオブジェクトがオブジェクトストレージ221に転送される。 For example, the cloud storage gateway 100 receives a file write request from the NAS client 210 using its NAS server function, and caches the file requested to be written internally. The cloud storage gateway 100 divides the file requested to be written into chunks, and stores the actual data in the chunks (chunk data) in the object storage 221. At this time, a predetermined number of chunk data are grouped to generate an object, and the generated object is transferred to the object storage 221.

また、クラウドストレージゲートウェイ100は、NASクライアント210からのファイルをキャッシュする時点で、ファイルをチャンク単位に分割し、同一内容のチャンクデータが重複して保存されないようにする「重複排除」を行う。さらに、チャンクデータは圧縮された状態で格納されてもよい。例えば、クラウドストレージサービスでは、格納されるデータ量に応じて課金が行われる場合がある。重複排除やデータ圧縮を行うことで、クラウドストレージシステム220内の記憶領域に格納されるデータ量を削減し、サービス利用コストを抑制することができる。 In addition, when the cloud storage gateway 100 caches a file from the NAS client 210, it divides the file into chunks and performs "deduplication" to prevent duplicate chunk data of the same content from being stored. Furthermore, chunk data may be stored in a compressed state. For example, cloud storage services may charge based on the amount of data stored. By performing deduplication and data compression, it is possible to reduce the amount of data stored in the storage area within the cloud storage system 220 and suppress service usage costs.

さらに、クラウドストレージゲートウェイ100は、NASクライアント210から、アーカイブストレージ222に対するデータの格納要求を受け付ける。この格納要求は、例えば、クラウドストレージゲートウェイ100が提供するGUI(Graphical User Interface)やAPI(Application Programming Interface)を用いて受け付けられる。また、この格納要求は、ファイル単位で受け付けられる。クラウドストレージゲートウェイ100は、アーカイブストレージ222に格納するファイルの指定を受け付けると、そのファイルに含まれるチャンクデータのうち、アーカイブストレージ222に格納されていないチャンクデータを含むオブジェクトを特定する。クラウドストレージゲートウェイ100は、特定されたオブジェクトをアーカイブストレージ222に格納するようにクラウドストレージシステム220に要求する。この要求に応じて、特定されたオブジェクトがオブジェクトストレージ221から読み出され、アーカイブストレージ222に格納される。 Furthermore, the cloud storage gateway 100 accepts a request from the NAS client 210 to store data in the archive storage 222. This storage request is accepted, for example, using a GUI (Graphical User Interface) or API (Application Programming Interface) provided by the cloud storage gateway 100. This storage request is accepted on a file-by-file basis. When the cloud storage gateway 100 accepts the specification of a file to be stored in the archive storage 222, it identifies objects that include chunk data contained in the file that is not stored in the archive storage 222. The cloud storage gateway 100 requests the cloud storage system 220 to store the identified object in the archive storage 222. In response to this request, the identified object is read from the object storage 221 and stored in the archive storage 222.

図3は、クラウドストレージゲートウェイのハードウェア構成例を示す図である。クラウドストレージゲートウェイ100は、例えば、図3に示すようなコンピュータとして実現される。 Figure 3 shows an example hardware configuration of a cloud storage gateway. The cloud storage gateway 100 is realized, for example, as a computer such as that shown in Figure 3.

クラウドストレージゲートウェイ100は、プロセッサ101、RAM(Random Access Memory)102、HDD(Hard Disk Drive)103、GPU(Graphics Processing Unit)104、入力インタフェース(I/F)105、読み取り装置106および通信インタフェース(I/F)107を備える。 The cloud storage gateway 100 includes a processor 101, a RAM (Random Access Memory) 102, a HDD (Hard Disk Drive) 103, a GPU (Graphics Processing Unit) 104, an input interface (I/F) 105, a reading device 106, and a communication interface (I/F) 107.

プロセッサ101は、クラウドストレージゲートウェイ100全体を統括的に制御する。プロセッサ101は、例えばCPU(Central Processing Unit)、MPU(Micro Processing Unit)、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、またはPLD(Programmable Logic Device)である。また、プロセッサ101は、CPU、MPU、DSP、ASIC、PLDのうちの2以上の要素の組み合わせであってもよい。 The processor 101 provides overall control over the entire cloud storage gateway 100. The processor 101 is, for example, a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), or a PLD (Programmable Logic Device). The processor 101 may also be a combination of two or more elements of a CPU, MPU, DSP, ASIC, or PLD.

RAM102は、クラウドストレージゲートウェイ100の主記憶装置として使用される。RAM102には、プロセッサ101に実行させるOS(Operating System)プログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、プロセッサ101による処理に必要な各種データが格納される。 RAM 102 is used as the main storage device of cloud storage gateway 100. RAM 102 temporarily stores at least a portion of the OS (Operating System) program and application programs executed by processor 101. RAM 102 also stores various data necessary for processing by processor 101.

HDD103は、クラウドストレージゲートウェイ100の補助記憶装置として使用される。HDD103には、OSプログラム、アプリケーションプログラム、および各種データが格納される。なお、補助記憶装置としては、SSD(Solid State Drive)などの他の種類の不揮発性記憶装置を使用することもできる。 HDD 103 is used as a secondary storage device for cloud storage gateway 100. The HDD 103 stores the OS program, application programs, and various data. Note that other types of non-volatile storage devices, such as SSDs (Solid State Drives), can also be used as secondary storage devices.

GPU104には、表示装置104aが接続されている。GPU104は、プロセッサ101からの命令にしたがって、画像を表示装置104aに表示させる。表示装置104aとしては、液晶ディスプレイや有機EL(Electroluminescence)ディスプレイなどがある。 A display device 104a is connected to the GPU 104. The GPU 104 displays images on the display device 104a in accordance with instructions from the processor 101. Examples of the display device 104a include a liquid crystal display and an organic EL (electroluminescence) display.

入力インタフェース105には、入力装置105aが接続されている。入力インタフェース105は、入力装置105aから出力される信号をプロセッサ101に送信する。入力装置105aとしては、キーボードやポインティングデバイスなどがある。ポインティングデバイスとしては、マウス、タッチパネル、タブレット、タッチパッド、トラックボールなどがある。 An input device 105a is connected to the input interface 105. The input interface 105 transmits signals output from the input device 105a to the processor 101. Examples of the input device 105a include a keyboard and a pointing device. Examples of pointing devices include a mouse, touch panel, tablet, touchpad, and trackball.

読み取り装置106には、可搬型記録媒体106aが脱着される。読み取り装置106は、可搬型記録媒体106aに記録されたデータを読み取ってプロセッサ101に送信する。可搬型記録媒体106aとしては、光ディスク、半導体メモリなどがある。 A portable recording medium 106a is detachably attached to the reading device 106. The reading device 106 reads data recorded on the portable recording medium 106a and transmits it to the processor 101. Examples of the portable recording medium 106a include an optical disc and semiconductor memory.

通信インタフェース107は、ネットワーク107aを介して他の装置との間でデータの送受信を行う。
以上のようなハードウェア構成によって、クラウドストレージゲートウェイ100の処理機能を実現することができる。なお、NASクライアント210も、図3と同様のハードウェア構成を有するコンピュータとして実現可能である。
The communication interface 107 transmits and receives data to and from other devices via a network 107a.
The above hardware configuration can realize the processing functions of the cloud storage gateway 100. The NAS client 210 can also be realized as a computer having the same hardware configuration as that shown in FIG.

図4は、クラウドストレージゲートウェイが備える処理機能の構成例を示す図である。クラウドストレージゲートウェイ100は、記憶部110、ファイル入出力部120、重複排除処理部130およびクラウド通信部140を備える。 Figure 4 shows an example configuration of the processing functions of a cloud storage gateway. The cloud storage gateway 100 includes a storage unit 110, a file input/output unit 120, a deduplication processing unit 130, and a cloud communication unit 140.

なお、記憶部110は、例えば、RAM102やHDD103など、クラウドストレージゲートウェイ100が備える記憶装置に確保される記憶領域である。また、ファイル入出力部120、重複排除処理部130およびクラウド通信部140の処理は、例えば、プロセッサ101が所定のプログラムを実行することで実現される。 The memory unit 110 is a storage area allocated in a storage device provided in the cloud storage gateway 100, such as the RAM 102 or HDD 103. The processing of the file input/output unit 120, deduplication processing unit 130, and cloud communication unit 140 is realized, for example, by the processor 101 executing a predetermined program.

記憶部110には、ディレクトリテーブル111、チャンクマップテーブル112、チャンク管理テーブル113、チャンクグループ管理テーブル114およびデフラグ判定テーブル115が記憶される。また、記憶部110の記憶領域の一部は、データキャッシュ116として利用される。 The memory unit 110 stores a directory table 111, a chunk map table 112, a chunk management table 113, a chunk group management table 114, and a defragmentation judgment table 115. In addition, part of the memory area of the memory unit 110 is used as a data cache 116.

ディレクトリテーブル111は、ファイルシステムにおけるディレクトリ構造を表現するための管理情報である。ディレクトリテーブル111には、ディレクトリ構造上のディレクトリ(フォルダ)、またはディレクトリ内のファイルに対応するレコードが登録される。各レコードには、ディレクトリまたはファイルを識別するためのinode番号が登録されている。また、例えば、各レコードに親ディレクトリのinode番号が登録されることで、ディレクトリ間、およびディレクトリとファイルとの関係が表現される。 Directory table 111 is management information for representing the directory structure in a file system. Directory table 111 registers records corresponding to directories (folders) in the directory structure or files within a directory. Each record registers an inode number to identify the directory or file. Furthermore, for example, the relationship between directories and between directories and files is expressed by registering the inode number of the parent directory in each record.

チャンクマップテーブル112は、ファイルと重複排除されたチャンクとの対応関係を管理するための管理情報である。チャンク管理テーブル113は、チャンクとオブジェクトおよびチャンクグループとの対応関係や、チャンクの参照数、チャンクに対応するハッシュキーなどを管理するための管理情報である。なお、チャンクグループとは、1以上のオブジェクト(本実施の形態では、例として2以上の所定個数のオブジェクト)に含まれるチャンクのグループである。 The chunk map table 112 is management information for managing the correspondence between files and deduplicated chunks. The chunk management table 113 is management information for managing the correspondence between chunks and objects and chunk groups, the number of references to chunks, hash keys corresponding to chunks, etc. A chunk group is a group of chunks included in one or more objects (in this embodiment, for example, a predetermined number of objects greater than or equal to two).

チャンクグループ管理テーブル114は、アーカイブストレージ222に格納されたチャンクグループごとに、チャンクグループに含まれるチャンクのうち有効なチャンクを示す有効チャンク数と無効なチャンクを示す無効チャンク数とを管理するための管理情報である。デフラグ判定テーブル115は、アーカイブのグループごとに、そのグループに含まれるチャンクのうち有効なチャンクを示す有効チャンク数と無効なチャンクを示す無効チャンク数とを管理するための管理情報である。これらのチャンクグループ管理テーブル114およびデフラグ判定テーブル115は、アーカイブストレージ222に格納されたオブジェクトについてのデフラグの実行要否を判定するために利用される。 The chunk group management table 114 is management information for managing, for each chunk group stored in the archive storage 222, the number of valid chunks indicating valid chunks among the chunks included in the chunk group, and the number of invalid chunks indicating invalid chunks. The defragmentation determination table 115 is management information for managing, for each archive group, the number of valid chunks indicating valid chunks among the chunks included in that group, and the number of invalid chunks indicating invalid chunks. The chunk group management table 114 and defragmentation determination table 115 are used to determine whether defragmentation is required for objects stored in the archive storage 222.

データキャッシュ116は、重複排除されたチャンクをキャッシュするための記憶領域である。NASクライアント210から書き込みが要求されたファイルに対応するチャンクのデータは、重複排除された上で一旦データキャッシュ116に格納された後、オブジェクトに組み込まれてオブジェクトストレージ221に格納される。チャンクの格納によりデータキャッシュ116の容量が少なくなると、オブジェクトストレージ221に格納済みで、かつNASクライアント210からのアクセス頻度が低いチャンクは、データキャッシュ116から削除される。 The data cache 116 is a storage area for caching deduplicated chunks. Chunk data corresponding to a file requested to be written by the NAS client 210 is deduplicated and temporarily stored in the data cache 116, and then incorporated into an object and stored in the object storage 221. When the capacity of the data cache 116 decreases due to the storage of chunks, chunks that have already been stored in the object storage 221 and are infrequently accessed by the NAS client 210 are deleted from the data cache 116.

ファイル入出力部120は、NASサーバとしてのインタフェース処理を実行する。例えば、ファイル入出力部120は、NASクライアント210からファイルの読み書き要求や、アーカイブストレージ222へのファイルの格納要求を受け付け、要求内容に応じた処理を重複排除処理部130に依頼して、NASクライアント210に応答する。 The file input/output unit 120 performs interface processing as a NAS server. For example, the file input/output unit 120 accepts file read/write requests and file storage requests to the archive storage 222 from the NAS client 210, requests the deduplication processor 130 to perform processing according to the request, and responds to the NAS client 210.

クラウド通信部140は、重複排除処理部130からの要求に応じて、クラウドストレージシステム220との間の通信処理を実行する。例えば、重複排除処理部130は、オブジェクトストレージ221に対するオブジェクトのアップロードや、オブジェクトストレージ221からのオブジェクトのダウンロードを実行する。また、クラウド通信部140は、アーカイブストレージ222へのオブジェクトの格納要求や、アーカイブストレージ222からのアーカイブの取り出し要求をクラウドストレージシステム220に送信する。 The cloud communication unit 140 performs communication processing with the cloud storage system 220 in response to a request from the deduplication processing unit 130. For example, the deduplication processing unit 130 uploads objects to the object storage 221 and downloads objects from the object storage 221. The cloud communication unit 140 also sends requests to the cloud storage system 220 to store objects in the archive storage 222 and to retrieve archives from the archive storage 222.

重複排除処理部130は、ファイルの実データを重複を排除した状態で格納するための処理を実行する。重複排除処理部130は、重複判定部131、チャンク管理部132およびデフラグ処理部133を備える。 The deduplication processor 130 performs processing to store the actual data of a file with duplicates eliminated. The deduplication processor 130 includes a duplication determination unit 131, a chunk management unit 132, and a defragmentation processor 133.

重複判定部131は、書き込みが要求されたファイルの実データをチャンク単位に分割し、分割された実データを重複を排除しながらデータキャッシュ116に格納する。
チャンク管理部132は、重複判定部131によってデータキャッシュ116に格納されたチャンクを、適切なサイズになるように複数まとめてオブジェクトを生成する。チャンク管理部132は、生成されたオブジェクトを、クラウド通信部140を介してオブジェクトストレージ221に格納する。本実施の形態では例として、所定個数のチャンクによってオブジェクトが生成される。
The duplication determination unit 131 divides the actual data of the file for which writing is requested into chunks, and stores the divided actual data in the data cache 116 while eliminating duplicates.
The chunk management unit 132 generates an object by aggregating a plurality of chunks stored in the data cache 116 by the duplication determination unit 131 to an appropriate size. The chunk management unit 132 stores the generated object in the object storage 221 via the cloud communication unit 140. In this embodiment, as an example, an object is generated from a predetermined number of chunks.

デフラグ処理部133は、アーカイブストレージ222に格納されたファイルの削除要求に伴って参照されなくなったチャンク(無効チャンク)を監視し、その監視結果に基づいて、アーカイブストレージ222に格納されたオブジェクトのデフラグを実行する。本実施の形態において、デフラグとは、発生した無効チャンクをアーカイブストレージ222から削除して、アーカイブストレージ222の使用容量を削減するための処理である。 The defragmentation processing unit 133 monitors chunks (invalid chunks) that are no longer referenced due to a file deletion request stored in the archive storage 222, and defragments objects stored in the archive storage 222 based on the monitoring results. In this embodiment, defragmentation is a process for deleting invalid chunks that have occurred from the archive storage 222, thereby reducing the amount of space used by the archive storage 222.

次に、重複排除処理で利用される管理情報について、図5~図7を用いて説明する。
図5は、チャンクマップテーブルのデータ構成例を示す図である。チャンクマップテーブル112は、ファイルと重複排除されたチャンクとの対応関係を管理するための管理情報である。図5に示すように、チャンクマップテーブル112には、ファイル番号、オフセット、サイズおよびチャンク番号の各項目を有するレコードが登録される。各レコードは、ファイルの実データを分割して生成された1つのチャンクに対応付けられている。
Next, the management information used in the deduplication process will be described with reference to FIGS.
Fig. 5 is a diagram showing an example of the data configuration of a chunk map table. The chunk map table 112 is management information for managing the correspondence between files and deduplicated chunks. As shown in Fig. 5, the chunk map table 112 registers records each having the following fields: file number, offset, size, and chunk number. Each record is associated with one chunk generated by dividing the actual data of the file.

ファイル番号は、ファイルの識別番号を示す。オフセットは、ファイルの先頭からチャンクの先頭までのオフセット量を示す。サイズは、チャンクのサイズを示す。オフセットおよびサイズの値によって、ファイルにおけるチャンクの領域が特定される。 The file number indicates the file's identification number. The offset indicates the offset from the beginning of the file to the beginning of the chunk. The size indicates the size of the chunk. The offset and size values identify the chunk's area in the file.

チャンク番号は、ファイル上のチャンクに対応する、重複排除されたチャンクの識別番号を示す。あるファイル上の第1のチャンクと、それと同じファイルまたは他のファイル上の第2のチャンクとの間でデータの内容が同じ場合、第1のチャンクに対応するレコードと第2のチャンクに対応するレコードには同じチャンク番号が登録される。例えば図5では、ファイル番号「f1」およびオフセット「o1」で識別されるチャンクのレコードと、ファイル番号「f2」およびオフセット「o14」で識別されるチャンクのレコードとには、同じチャンク番号「ck1」が登録されている。これは、前者のチャンクと後者のチャンクとの間ではデータの内容が同じであり、このデータがチャンク番号「ck1」のチャンクとしてデータキャッシュ116やクラウドストレージシステム220に格納されていることを示す。 The chunk number indicates the identification number of a deduplicated chunk corresponding to a chunk in a file. If the data content is the same between a first chunk in a file and a second chunk in the same file or another file, the same chunk number is registered in the record corresponding to the first chunk and the record corresponding to the second chunk. For example, in Figure 5, the same chunk number "ck1" is registered in the record of the chunk identified by file number "f1" and offset "o1", and the record of the chunk identified by file number "f2" and offset "o14". This indicates that the data content is the same between the former chunk and the latter chunk, and that this data is stored in the data cache 116 or cloud storage system 220 as the chunk with chunk number "ck1".

図6は、チャンク管理テーブルのデータ構成例を示す図である。チャンク管理テーブル113は、重複排除されたチャンクとオブジェクトおよびチャンクグループとの対応関係や、チャンクの参照数、チャンクに対応するハッシュキーなどを管理するための管理情報である。図6に示すように、チャンク管理テーブル113には、チャンク番号、オブジェクト番号、オフセット、サイズ、チャンクグループ番号、参照数(1)、ハッシュキー、参照数(2)、アーカイブ番号およびアーカイブ格納日時の各項目を有するレコードが登録される。各レコードは、重複排除された1つのチャンクに対応付けられている。 Figure 6 shows an example of the data structure of a chunk management table. The chunk management table 113 is management information for managing the correspondence between deduplicated chunks and objects and chunk groups, the number of references to chunks, and the hash keys corresponding to chunks. As shown in Figure 6, the chunk management table 113 stores records having the following fields: chunk number, object number, offset, size, chunk group number, number of references (1), hash key, number of references (2), archive number, and archive storage date and time. Each record is associated with one deduplicated chunk.

オブジェクト番号は、チャンクが属するオブジェクトの識別番号を示す。オフセットは、オブジェクトの先頭からチャンクの先頭までのオフセット量を示す。サイズは、チャンクのサイズを示す。オフセットおよびサイズの値によって、オブジェクトにおけるチャンクの領域が特定される。 The object number indicates the identification number of the object to which the chunk belongs. The offset indicates the offset from the beginning of the object to the beginning of the chunk. The size indicates the size of the chunk. The offset and size values identify the chunk's area within the object.

チャンクグループ番号は、チャンクが属するチャンクグループの識別番号を示す。チャンクグループは、所定個数のオブジェクトに含まれるチャンクを含む。本実施の形態において、チャンクグループは、クラウドストレージシステム220との間におけるデータの転送単位となる。 The chunk group number indicates the identification number of the chunk group to which the chunk belongs. A chunk group contains chunks contained in a predetermined number of objects. In this embodiment, the chunk group is the unit of data transfer between the cloud storage system 220.

参照数(1)は、チャンク番号が示すチャンクが、ファイルを分割して生成されたチャンクのうちいくつのチャンクから参照されているかを示す。すなわち、参照数(1)は、チャンク番号が示すチャンクがファイル上のいくつのチャンクの間で重複しているかを示す。例えば、あるチャンク番号に対応する参照数(1)が「2」の場合、同じチャンク番号の値が登録された2つのレコードがチャンクマップテーブル112に存在することになる。 The reference count (1) indicates how many of the chunks generated by dividing the file reference the chunk indicated by the chunk number. In other words, the reference count (1) indicates how many chunks in the file overlap the chunk indicated by the chunk number. For example, if the reference count (1) corresponding to a certain chunk number is "2," then there will be two records in the chunk map table 112 that have the same chunk number value registered.

ここで、図5の例では、ファイル番号「f1」のファイルは2つのチャンクに分割されており、ファイル番号「f2」のファイルは4つのチャンクに分割されている。また、図6の例では、前者のファイルに含まれる2つのチャンクのデータと、後者のファイルに含まれるチャンクのうち先頭から2つのチャンクのデータとが、オブジェクト番号「ob1」のオブジェクトに属するチャンクとしてクラウドストレージシステム220に格納されている。 In the example of Figure 5, the file with file number "f1" is divided into two chunks, and the file with file number "f2" is divided into four chunks. Also, in the example of Figure 6, the data of the two chunks contained in the former file and the data of the first two chunks of the chunks contained in the latter file are stored in the cloud storage system 220 as chunks belonging to the object with object number "ob1".

ハッシュキーは、チャンクのデータに基づいて算出されたハッシュ値である。ハッシュキーは、書き込みが要求されたファイル内のチャンクのデータと同一のチャンクを検索するために利用される。 A hash key is a hash value calculated based on the chunk's data. The hash key is used to search for chunks with the same data as the chunk in the file being requested to be written.

ここで、図7は、オブジェクトの生成例を示す図である。この図7を用いて、オブジェクトの生成方法について説明する。
なお、図7に示すテーブル113aは、チャンク管理テーブル113から、オブジェクト番号「ob11」のオブジェクトに属するチャンクに対応するレコードのチャンク番号およびオブジェクト番号の各項目を抽出したものである。同様に、図7に示すテーブル113bは、チャンク管理テーブル113から、オブジェクト番号「ob12」のオブジェクトに属するチャンクに対応するレコードのチャンク番号およびオブジェクト番号の各項目を抽出したものである。また、図7に示すテーブル113cは、チャンク管理テーブル113から、オブジェクト番号「ob13」のオブジェクトに属するチャンクに対応するレコードのチャンク番号およびオブジェクト番号の各項目を抽出したものである。
7 is a diagram showing an example of object generation, and the object generation method will be described with reference to this FIG.
Table 113a shown in Fig. 7 is obtained by extracting from the chunk management table 113 the chunk number and object number items of records corresponding to chunks belonging to the object with object number "ob11". Similarly, table 113b shown in Fig. 7 is obtained by extracting from the chunk management table 113 the chunk number and object number items of records corresponding to chunks belonging to the object with object number "ob12". Furthermore, table 113c shown in Fig. 7 is obtained by extracting from the chunk management table 113 the chunk number and object number items of records corresponding to chunks belonging to the object with object number "ob13".

NASクライアント210から新規のファイルの書き込みや既存のファイルの更新が要求されると、重複判定部131は、ファイルの実データをチャンク単位に分割する。図7の例では、ファイルf11の実データが8個のチャンクに分割され、ファイルf12の実データが5個のチャンクに分割されたものとする。 When a NAS client 210 requests the writing of a new file or the updating of an existing file, the duplication determination unit 131 divides the actual data of the file into chunks. In the example of Figure 7, the actual data of file f11 is divided into eight chunks, and the actual data of file f12 is divided into five chunks.

ここでは説明を簡単にするために、これらのチャンクのデータはすべて異なる(重複していない)ものとする。このため、ファイルf11を分割して得られたチャンクのデータには個別のチャンク番号「ck11」~「ck18」が付与され、ファイルf12を分割して得られたチャンクのデータには個別のチャンク番号「ck19」~「ck23」が付与されている。そして、チャンク番号「ck11」~「ck23」にそれぞれ対応するチャンクのデータ(チャンクck11~ck23)は、データキャッシュ116に個別に格納される。 To simplify the explanation, we will assume that the data in these chunks is all different (non-overlapping). For this reason, the chunk data obtained by dividing file f11 is assigned individual chunk numbers "ck11" to "ck18," and the chunk data obtained by dividing file f12 is assigned individual chunk numbers "ck19" to "ck23." The chunk data corresponding to chunk numbers "ck11" to "ck23" (chunks ck11 to ck23) is stored individually in data cache 116.

各チャンクにはオブジェクトのオブジェクト番号が割り当てられ、そのオブジェクト番号がチャンク管理テーブル113に登録される。また、本実施の形態では、同じオブジェクト番号に割り当てられたチャンクの個数が所定数に達すると、オブジェクト番号がカウントアップされ、次のチャンクにはカウントアップ後のオブジェクト番号が割り当てられる。これにより、同一のオブジェクトに対しては所定個数のチャンクが割り当てられる。 Each chunk is assigned an object number for the object, and that object number is registered in the chunk management table 113. In addition, in this embodiment, when the number of chunks assigned to the same object number reaches a predetermined number, the object number is counted up, and the next chunk is assigned the incremented object number. In this way, a predetermined number of chunks are assigned to the same object.

なお、チャンクの個数が所定数に達していないオブジェクトの状態を、次のチャンクを受け入れ可能な「アクティブ」と呼ぶことにする。アクティブなオブジェクトは、オブジェクトストレージ221への格納準備が整っていない未完成なオブジェクトである。また、チャンクの個数が所定数に達したオブジェクトの状態を、次のチャンクを受け入れ不可能な「非アクティブ」と呼ぶことにする。非アクティブなオブジェクトは、オブジェクトストレージ221への格納準備が整ったオブジェクトとなり、所定のタイミングでオブジェクトストレージ221に転送される。実際には、所定個数の非アクティブなオブジェクトが発生した段階で、それらのオブジェクトがチャンクグループとしてまとめてオブジェクトストレージ221に転送される。 Note that the state of an object whose number of chunks has not yet reached a predetermined number will be called "active" and ready to accept the next chunk. An active object is an incomplete object that is not ready to be stored in object storage 221. Also, the state of an object whose number of chunks has reached a predetermined number will be called "inactive" and unable to accept the next chunk. Inactive objects are objects that are ready to be stored in object storage 221, and are transferred to object storage 221 at a predetermined time. In practice, when a predetermined number of inactive objects have been created, these objects are transferred together as a chunk group to object storage 221.

図7の例では、まず、チャンクck11~ck15がオブジェクト番号「ob11」のオブジェクト(オブジェクトob11)に割り当てられる。そして、この段階で、オブジェクトob11に含まれるチャンクの個数が所定数(図7では例として5個)に達し、オブジェクトob11が非アクティブになったとする。すると、次のチャンクck16には新たなオブジェクト番号「ob12」が割り当てられる。 In the example in Figure 7, chunks ck11 to ck15 are first assigned to the object with object number "ob11" (object ob11). At this stage, the number of chunks contained in object ob11 reaches a predetermined number (five in the example in Figure 7), and object ob11 becomes inactive. Then, the next chunk, ck16, is assigned a new object number, "ob12."

この後、チャンクck16~ck20がオブジェクト番号「ob12」のオブジェクト(オブジェクトob12)に割り当てられ、この段階でオブジェクトob12が非アクティブになったとする。すると、次のチャンクck21には新たなオブジェクト番号「ob13」が割り当てられる。図7の例では、チャンクck21~ck23がオブジェクト番号「ob13」のオブジェクト(オブジェクトob13)に割り当てられるが、この段階ではオブジェクトob13はアクティブの状態である。この場合、次に生成されるチャンク(図示せず)にはオブジェクト番号「ob13」が割り当てられることになる。 After this, chunks ck16 to ck20 are assigned to the object with object number "ob12" (object ob12), and at this stage object ob12 becomes inactive. The next chunk, ck21, is then assigned a new object number, "ob13." In the example in Figure 7, chunks ck21 to ck23 are assigned to the object with object number "ob13" (object ob13), but at this stage object ob13 is active. In this case, the next chunk created (not shown) will be assigned object number "ob13."

以上の手順により、ファイルの書き込みに伴うオブジェクトの生成では、重複排除によって所定個数のチャンクが新たに出現するたびに新たなオブジェクトが完成される。オブジェクトには、生成順にオブジェクト番号が付与される。また、1つのオブジェクトには、連続するチャンク番号を有するチャンクが割り当てられる。 By following the above procedure, when an object is created when a file is written, a new object is created each time a certain number of chunks are newly created through deduplication. Objects are assigned object numbers in the order in which they are created. Chunks with consecutive chunk numbers are also assigned to a single object.

以上の図7では、データの重複がない場合について説明した。例えば、この後に書き込みが要求されたファイル内のチャンクに、チャンクck11~ck23のいずれかと同じ内容のデータを含むチャンクが存在した場合、そのチャンクのデータはデータキャッシュ116に新たに格納されず、クラウドストレージシステム220にも転送されない。すなわち、このチャンクについては実データの書き込みが行われず、ファイルと格納済みのチャンクとを対応付けるためのメタデータのみがチャンクマップテーブル112に書き込まれる。このようにして、重複するデータが記憶されないようにする「重複排除処理」が実行される。 The above Figure 7 describes a case where there is no data duplication. For example, if a chunk in a file for which writing is subsequently requested contains data with the same content as any of chunks ck11 to ck23, the data for that chunk will not be newly stored in the data cache 116, nor will it be transferred to the cloud storage system 220. In other words, no actual data will be written to this chunk, and only metadata for associating the file with the stored chunks will be written to the chunk map table 112. In this way, a "deduplication process" is performed to prevent duplicate data from being stored.

なお、本実施の形態では、所定個数のチャンクがオブジェクトに割り当てられると、そのオブジェクトが非アクティブ化される。しかし、他の方法として、例えば、オブジェクトに割り当てられたチャンクの合計サイズが所定サイズを超えた場合に、そのオブジェクトが非アクティブ化されてもよい。 In this embodiment, an object is deactivated when a predetermined number of chunks are assigned to it. However, as an alternative, for example, an object may be deactivated when the total size of the chunks assigned to the object exceeds a predetermined size.

以下、図6を参照して説明を続ける。
参照数(2)は、チャンク番号が示すチャンクが、アーカイブストレージ222に格納されたファイルを分割して生成されたチャンクのうちいくつのチャンクから参照されているかを示す。すなわち、参照数(2)は、参照数(1)のうち、アーカイブストレージ222に格納されているファイルからの参照数を示す。
The description will be continued below with reference to FIG.
The reference count (2) indicates how many chunks, among the chunks generated by dividing a file stored in archive storage 222, reference the chunk indicated by the chunk number. In other words, the reference count (2) indicates the number of references from files stored in archive storage 222, out of the reference count (1).

アーカイブ番号は、チャンクが含まれるアーカイブの識別番号を示す。アーカイブ番号は、チャンクを含むオブジェクトがアーカイブストレージ222に格納されたときに登録される。 The archive number indicates the identification number of the archive containing the chunk. The archive number is registered when the object containing the chunk is stored in archive storage 222.

アーカイブ格納日時は、チャンクを参照するファイルが、アーカイブストレージ222に格納されたときの日時を示す。チャンクは複数のファイルから参照され得るが、アーカイブ格納日時としては、チャンクを参照するファイルが直近にアーカイブストレージ222に格納されたときの日時が登録される。したがって、参照数(2)がインクリメントされるとアーカイブ格納日時も更新される。 The archive storage date and time indicates the date and time when the file referencing the chunk was stored in archive storage 222. A chunk can be referenced by multiple files, but the archive storage date and time is the date and time when the file referencing the chunk was most recently stored in archive storage 222. Therefore, when the reference count (2) is incremented, the archive storage date and time is also updated.

次に、デフラグの実行要否を判定するために利用される管理情報について、図8、図9を用いて説明する。
図8は、チャンクグループ管理テーブルのデータ構成例を示す図である。チャンクグループ管理テーブル114には、チャンクグループがアーカイブストレージ222に格納されるごとに、そのチャンクグループに対応するレコードが作成される。各レコードには、チャンクグループ番号、有効チャンク数および無効チャンク数が登録される。
Next, the management information used to determine whether defragmentation is necessary will be described with reference to FIGS. 8 and 9. FIG.
8 is a diagram showing an example of the data configuration of the chunk group management table. In the chunk group management table 114, a record corresponding to that chunk group is created each time the chunk group is stored in the archive storage 222. In each record, the chunk group number, the number of valid chunks, and the number of invalid chunks are registered.

チャンクグループ番号は、チャンクグループの識別番号を示す。有効チャンク数は、チャンクグループに含まれるチャンクのうち、参照数(2)が1以上であるチャンクの数を示す。無効チャンク数は、チャンクグループに含まれるチャンクのうち、参照数(2)が0であるチャンクの数を示す。 The chunk group number indicates the identification number of the chunk group. The number of valid chunks indicates the number of chunks contained in the chunk group whose reference count (2) is 1 or greater. The number of invalid chunks indicates the number of chunks contained in the chunk group whose reference count (2) is 0.

図9は、デフラグ判定テーブルのデータ構成例を示す図である。デフラグ判定テーブル115には、所定数のアーカイブを含むアーカイブグループごとにレコードが作成される。アーカイブグループには、アーカイブの作成順に所定数のアーカイブが含められる。図9の例では、アーカイブグループには10個のアーカイブが含まれている。 Figure 9 shows an example of the data structure of a defragmentation judgment table. In the defragmentation judgment table 115, a record is created for each archive group that contains a predetermined number of archives. An archive group contains a predetermined number of archives in the order in which they were created. In the example of Figure 9, the archive group contains 10 archives.

デフラグ判定テーブル115の各レコードには、アーカイブ番号、有効チャンク数および無効チャンク数が登録される。アーカイブ番号は、アーカイブグループに含まれるアーカイブの識別番号を示す。有効チャンク数は、アーカイブグループ内の各アーカイブに含まれるチャンクのうち、参照数(2)が1以上であるチャンクの数を示す。無効チャンク数は、アーカイブグループ内の各アーカイブに含まれるチャンクのうち、参照数(2)が0であるチャンクの数を示す。 Each record in the defragmentation judgment table 115 registers an archive number, the number of valid chunks, and the number of invalid chunks. The archive number indicates the identification number of the archive included in the archive group. The number of valid chunks indicates the number of chunks included in each archive in the archive group that have a reference count (2) of 1 or more. The number of invalid chunks indicates the number of chunks included in each archive in the archive group that have a reference count (2) of 0.

次に、図10~図12を用いて、オブジェクトストレージ221およびアーカイブストレージ222に対するデータ格納処理例について説明する。
図10は、オブジェクトストレージおよびアーカイブストレージに対するデータ格納処理例を示す第1の図である。図10の例では、NASクライアント210からクラウドストレージゲートウェイ100に対して、ファイルF1,F2の書き込みが順に要求されたとする。
Next, an example of data storage processing in the object storage 221 and archive storage 222 will be described with reference to FIGS.
10 is a first diagram showing an example of data storage processing in object storage and archive storage. In the example of Fig. 10, it is assumed that the NAS client 210 requests the cloud storage gateway 100 to write files F1 and F2 in that order.

可変長チャンキングにより、ファイルF1はチャンクA~Dに分割され、ファイルF1はチャンクA,E,C,Fに分割されたとする。ここで、同じアルファベットの文字が付与されたチャンクのデータは同じ内容であるとする。例えば、ファイルF1,F2からそれぞれ分割されたチャンクAは、いずれも同じ内容のデータである。すなわち、ファイルF1,F2の間ではチャンクAのデータが重複している。 Let's say that file F1 is split into chunks A to D using variable-length chunking, and that file F1 is split into chunks A, E, C, and F. Here, we assume that the data in chunks assigned the same alphabetical character has the same content. For example, chunk A split from files F1 and F2 both contains the same data. In other words, the data in chunk A is duplicated between files F1 and F2.

このようなファイルF1,F2の書き込みが要求された場合、重複排除処理により、チャンクA~Fが1つずつデータキャッシュ116に格納される。また、チャンクA~Fに対応する参照数(ここでは参照数(1))は、それぞれ「2」、「1」、「2」、「1」、「1」、「1」となる。 When a request is made to write such files F1 and F2, chunks A to F are stored one by one in the data cache 116 through deduplication processing. Furthermore, the reference counts (here, reference count (1)) corresponding to chunks A to F are "2", "1", "2", "1", "1", and "1", respectively.

また、図10では例として、オブジェクトには3個のチャンクが割り当てられるものとする。この場合、チャンクA~CによりオブジェクトO1が生成され、チャンクD~FによりオブジェクトO2が生成される。そして、オブジェクトO1,O2は、PUTコマンドによりクラウドストレージゲートウェイ100からオブジェクトストレージ221に転送される。 Also, in Figure 10, as an example, three chunks are assigned to an object. In this case, object O1 is generated from chunks A to C, and object O2 is generated from chunks D to F. Objects O1 and O2 are then transferred from the cloud storage gateway 100 to the object storage 221 using a PUT command.

さらにこの後、NASクライアント210からクラウドストレージゲートウェイ100に対して、アーカイブストレージ222に対するファイルF1,F2の格納が要求されたとする。この場合、ファイルF1,F2に参照されるチャンクを含むオブジェクトO1,O2が特定される。そして、これらのオブジェクトO1,O2を含むアーカイブA1が生成され、アーカイブA1がアーカイブストレージ222に格納される。また、アーカイブA1に含まれるチャンクA~Fの参照数(2)として、参照数(1)と同じ値が設定される。 Furthermore, suppose that the NAS client 210 subsequently requests the cloud storage gateway 100 to store files F1 and F2 in archive storage 222. In this case, objects O1 and O2 containing chunks referenced by files F1 and F2 are identified. An archive A1 containing these objects O1 and O2 is then generated, and archive A1 is stored in archive storage 222. Furthermore, the reference count (2) of chunks A to F contained in archive A1 is set to the same value as the reference count (1).

図11は、オブジェクトストレージおよびアーカイブストレージに対するデータ格納処理例を示す第2の図である。図11の例では、図10の処理の後に、NASクライアント210からクラウドストレージゲートウェイ100に対して、ファイルF3,F4の書き込みが順に要求されたとする。 Figure 11 is a second diagram showing an example of data storage processing for object storage and archive storage. In the example of Figure 11, after the processing of Figure 10, the NAS client 210 requests the cloud storage gateway 100 to write files F3 and F4 in sequence.

可変長チャンキングにより、ファイルF3はチャンクA,C,E,G,Fに分割され、ファイルF4はチャンクA,E,G,H,Iに分割されたとする。これらのうち、チャンクA、C,Eはすでにデータキャッシュ116に格納されているので、チャンクA、C,Eについては参照数(1)のインクリメントのみが行われる。すなわち、チャンクA、C,Eの参照数(1)は、それぞれ「4」、「3」、「3」に更新される。一方、チャンクG~Iはデータキャッシュ116に新たに格納され、チャンクG~Iに対応する参照数(1)は、それぞれ「2」、「1」、「1」となる。また、チャンクG~IによってオブジェクトO3が生成され、オブジェクトO3がオブジェクトストレージ221に転送される。 Let's assume that file F3 has been split into chunks A, C, E, G, and F using variable-length chunking, and file F4 has been split into chunks A, E, G, H, and I. Of these, chunks A, C, and E are already stored in data cache 116, so only the reference counts (1) for chunks A, C, and E are incremented. That is, the reference counts (1) for chunks A, C, and E are updated to "4," "3," and "3," respectively. Meanwhile, chunks G to I are newly stored in data cache 116, and the reference counts (1) corresponding to chunks G to I become "2," "1," and "1," respectively. Furthermore, object O3 is generated from chunks G to I, and object O3 is transferred to object storage 221.

その後、NASクライアント210からクラウドストレージゲートウェイ100に対して、アーカイブストレージ222に対するファイルF3,F4の格納が要求されたとする。この場合、ファイルF3,F4に参照されるチャンクのうち、アーカイブストレージ222に格納されていないチャンクG,H,Iを含むオブジェクトO3が特定される。そして、このオブジェクトO3を含むアーカイブA2が生成され、アーカイブA2がアーカイブストレージ222に格納される。また、アーカイブA2に含まれるチャンクG~Iの参照数(2)として、参照数(1)と同じ値が設定される。 Then, suppose that the NAS client 210 requests the cloud storage gateway 100 to store files F3 and F4 in archive storage 222. In this case, object O3 is identified, which includes chunks G, H, and I that are not stored in archive storage 222 among the chunks referenced by files F3 and F4. An archive A2 is then generated that includes this object O3, and archive A2 is stored in archive storage 222. Furthermore, the reference count (2) of chunks G to I included in archive A2 is set to the same value as the reference count (1).

図12は、オブジェクトストレージおよびアーカイブストレージに対するデータ格納処理例を示す第3の図である。
図10、図11に示した手順により、NASクライアント210からクラウドストレージゲートウェイ100に対して、m番目のファイルFmまでの書き込みが要求されたとする。また、これに伴ってチャンクA~Mが生成され、チャンクA~Mを含む複数のオブジェクトがオブジェクトストレージ221に転送されたとする。
FIG. 12 is a third diagram illustrating an example of data storage processing in the object storage and archive storage.
10 and 11, it is assumed that a write request up to the m-th file Fm is made from the NAS client 210 to the cloud storage gateway 100. In addition, it is assumed that chunks A to M are generated accordingly, and multiple objects including chunks A to M are transferred to the object storage 221.

さらに、NASクライアント210からクラウドストレージゲートウェイ100に対して、ファイルFmまでのすべてのファイルについてのアーカイブストレージ222への格納が要求されたとする。これにより、先頭のアーカイブA1からn番目のアーカイブAnまでのアーカイブがアーカイブストレージ222に格納されたとする。このとき、チャンクA~Mの参照数(1)は、それぞれ「8」、「1」、「3」、「1」、「6」、「2」、「4」、「1」、「1」、「1」、「1」であったとする。また、チャンクA~Mの参照数(2)は、いずれも参照数(1)と同数であったとする。 Furthermore, suppose that the NAS client 210 requests the cloud storage gateway 100 to store all files up to file Fm in the archive storage 222. As a result, archives from the first archive A1 to the nth archive An are stored in the archive storage 222. At this time, the reference counts (1) of chunks A to M are "8", "1", "3", "1", "6", "2", "4", "1", "1", "1", and "1", respectively. Also, suppose that the reference counts (2) of chunks A to M are all the same as the reference count (1).

なお、データキャッシュ116は容量の上限があるため、クラウドストレージシステム220に転送済みのチャンク(オブジェクト)はデータキャッシュ116から削除されていく。ここでは、チャンクA~Mはデータキャッシュ116から削除されているとする。ただし、参照数(1),(2)などのチャンクA~Mの管理情報は、クラウドストレージゲートウェイ100の記憶部110に残される。また、オブジェクトストレージ221に転送済みのオブジェクトのうち、アーカイブストレージ222に格納済みのオブジェクトも、オブジェクトストレージ221から削除され得る。ここでは、ファイルF1~Fmに基づいて生成されたすべてのオブジェクトが、オブジェクトストレージ221から削除されているとする。 Note that, because the data cache 116 has a capacity limit, chunks (objects) that have already been transferred to the cloud storage system 220 are deleted from the data cache 116. Here, it is assumed that chunks A to M have been deleted from the data cache 116. However, management information for chunks A to M, such as reference counts (1) and (2), remains in the memory unit 110 of the cloud storage gateway 100. Furthermore, of the objects that have been transferred to the object storage 221, objects that have been stored in the archive storage 222 may also be deleted from the object storage 221. Here, it is assumed that all objects generated based on files F1 to Fm have been deleted from the object storage 221.

次に、図12の状態から、アーカイブストレージ222に格納されたデータのデフラグ処理が実行される場合について説明する。まず、図13、図14を用いてデフラグ処理の比較例を説明し、その後に図15~図17を用いて第2の実施の形態におけるデフラグ処理を説明する。 Next, we will explain the case where defragmentation processing is performed on data stored in archive storage 222 from the state shown in Figure 12. First, we will explain a comparative example of defragmentation processing using Figures 13 and 14, and then we will explain defragmentation processing in the second embodiment using Figures 15 to 17.

図13は、デフラグ処理の比較例を示す第1の図である。また、図14は、デフラグ処理の比較例を示す第2の図である。
オブジェクトストレージ221やアーカイブストレージ222を提供するサービスでは、一般的に、オブジェクト内の一部のデータ領域だけを削除するようなコマンドは用意されていない。このため、図13、図14に示すデフラグ処理の比較例では、無効なチャンクを含むオブジェクトを取得し、無効なチャンクを除去してオブジェクトを再構築した上で、再構築されたオブジェクトをアーカイブとしてアーカイブストレージ222に格納する、という手順が実行される。なお、図13、図14では、参照数として参照数(1)のみが用いられ、参照数(2)は用いられないものとする。
Fig. 13 is a first diagram showing a comparative example of defragmentation processing, and Fig. 14 is a second diagram showing a comparative example of defragmentation processing.
Services that provide object storage 221 and archive storage 222 generally do not provide a command for deleting only part of the data area within an object. Therefore, in the comparative example of defragmentation processing shown in Figures 13 and 14, the following procedure is executed: an object including invalid chunks is acquired, the invalid chunks are removed, the object is reconstructed, and the reconstructed object is then stored as an archive in archive storage 222. Note that in Figures 13 and 14, only reference count (1) is used as the reference count, and reference count (2) is not used.

図13では、NASクライアント210からクラウドストレージゲートウェイ100に対して、アーカイブストレージ222からのファイルF1,F2の削除が要求されたとする。例えば、ユーザ側(NASクライアント210側)においてファイルF1,F2の保管が必要とされる期間が終了した場合に、アーカイブストレージ222からのファイルF1,F2の削除が要求される。 In Figure 13, it is assumed that the NAS client 210 requests the cloud storage gateway 100 to delete files F1 and F2 from archive storage 222. For example, when the period during which files F1 and F2 need to be stored on the user side (NAS client 210 side) has ended, a request is made to delete files F1 and F2 from archive storage 222.

この場合、ファイルF1,F2に含まれる各チャンクの参照数(1)がデクリメントされ、デクリメント後に参照数(1)が「0」となったチャンクを一定数含むオブジェクトが再構築の対象として特定される。図13の例では、チャンクB,Dの参照数(1)が「0」となって再構築の対象となる。このため、チャンクB,Dを含むオブジェクトO1,O2を含むアーカイブA1がアーカイブストレージ222から取り出され、オブジェクトO1,O2が、例えばオブジェクトストレージ221を介して、クラウドストレージゲートウェイ100に転送される。また、取り出されたアーカイブA1は、アーカイブストレージ222から削除される。 In this case, the reference count (1) of each chunk contained in files F1 and F2 is decremented, and objects containing a certain number of chunks whose reference count (1) has become "0" after the decrement are identified as targets for reconstruction. In the example of Figure 13, the reference count (1) of chunks B and D becomes "0", making them targets for reconstruction. Therefore, archive A1 containing objects O1 and O2, which contain chunks B and D, is extracted from archive storage 222, and objects O1 and O2 are transferred to cloud storage gateway 100, for example, via object storage 221. In addition, the extracted archive A1 is deleted from archive storage 222.

クラウドストレージゲートウェイ100は、取得したオブジェクトO1,O2から参照数(1)が「0」のチャンクB,Dを除外し、残りのチャンクA,C,E,Fを用いてオブジェクトを再構築する。図13では例として、参照数(1)が大きいチャンクA,Eを用いてオブジェクトOxが生成され、参照数(1)が小さいチャンクC,Fを用いてオブジェクトOyが生成される。そして、オブジェクトOxを含むアーカイブAxと、オブジェクトOyを含むアーカイブAyとがアーカイブストレージ222に格納される。このように参照数(1)が大きいチャンクをまとめたオブジェクトと参照数(1)が小さいチャンクをまとめたオブジェクトとを別々に生成することで、後者のオブジェクト内のチャンクの参照数(1)が早期に「0」になり、このオブジェクトを一括して削除できる可能性を高められる。 The cloud storage gateway 100 removes chunks B and D with a reference count (1) of "0" from the acquired objects O1 and O2, and reconstructs the objects using the remaining chunks A, C, E, and F. In the example shown in Figure 13, object Ox is generated using chunks A and E with a large reference count (1), and object Oy is generated using chunks C and F with a small reference count (1). An archive Ax containing object Ox and an archive Ay containing object Oy are then stored in archive storage 222. By separately generating an object made up of chunks with a large reference count (1) and an object made up of chunks with a small reference count (1) in this way, the reference count (1) of the chunks in the latter object quickly becomes "0," increasing the likelihood that the objects can be deleted all at once.

次に、図14に示すように、NASクライアント210からクラウドストレージゲートウェイ100に対して、アーカイブストレージ222からのファイルF3,F4の削除が要求されたとする。この場合、ファイルF3,F4に含まれる各チャンクの参照数(1)がデクリメントされ、デクリメント後に参照数(1)が「0」となったチャンクを一定数含むオブジェクトが再構築の対象として特定される。図14の例では、チャンクC,F,H,Iの参照数(1)が「0」となって再構築の対象となる。このため、チャンクC,F,H,Iを含むオブジェクトO3,Oyを含むアーカイブA2,Ayがアーカイブストレージ222から取り出され、オブジェクトO3,Oyが、例えばオブジェクトストレージ221を介して、クラウドストレージゲートウェイ100に転送される。また、取り出されたアーカイブA2,Ayは、アーカイブストレージ222から削除される。 Next, as shown in FIG. 14, assume that the NAS client 210 requests the cloud storage gateway 100 to delete files F3 and F4 from archive storage 222. In this case, the reference count (1) of each chunk contained in files F3 and F4 is decremented, and objects containing a certain number of chunks whose reference count (1) has become "0" after the decrement are identified as targets for reconstruction. In the example of FIG. 14, the reference count (1) of chunks C, F, H, and I becomes "0," making them targets for reconstruction. Therefore, archives A2 and Ay containing objects O3 and Oy, which contain chunks C, F, H, and I, are extracted from archive storage 222, and objects O3 and Oy are transferred to the cloud storage gateway 100, for example, via object storage 221. Furthermore, the extracted archives A2 and Ay are deleted from archive storage 222.

クラウドストレージゲートウェイ100は、取得したオブジェクトO3,Oyから参照数(1)が「0」のチャンクC,F,H,Iを除外し、残りのチャンクGを用いてオブジェクトOzを再構築する。そして、オブジェクトOz含むアーカイブAzがアーカイブストレージ222に格納される。 The cloud storage gateway 100 removes chunks C, F, H, and I whose reference count (1) is "0" from the retrieved objects O3 and Oy, and reconstructs object Oz using the remaining chunk G. Then, archive Az containing object Oz is stored in archive storage 222.

以上の処理により、参照数(1)が「0」となった無効チャンクをアーカイブストレージ222から削除し、残りの有効チャンクだけを含むアーカイブをアーカイブストレージ222に残すことができる。これにより、アーカイブストレージ222の使用容量を減らすことができる。 By performing the above process, invalid chunks whose reference count (1) has reached "0" can be deleted from archive storage 222, and an archive containing only the remaining valid chunks can be left in archive storage 222. This reduces the amount of space used by archive storage 222.

しかしながら、図14でファイルF3,F4の削除が要求された際には、前回アーカイブストレージ222に格納されたばかりのアーカイブAyが削除されている。前述のように、アーカイブストレージ222ではアーカイブの最短保管期間が定められており、最短保管期間が経過する前にアーカイブを削除する場合には追加料金が発生する。図14の処理では、アーカイブAyが格納された後、最短保管期間が経過する前にこのアーカイブAyが削除されることになり、追加料金が発生してしまう。 However, when a request to delete files F3 and F4 is made in Figure 14, archive Ay, which was just stored in archive storage 222, has already been deleted. As mentioned above, archive storage 222 has a minimum storage period for archives, and deleting an archive before the minimum storage period has elapsed incurs an additional fee. In the process of Figure 14, archive Ay is stored and then deleted before the minimum storage period has elapsed, resulting in an additional fee.

このように、上記のデフラグ処理の比較例によれば、アーカイブストレージ222に定められた最短保管期間が経過する前に削除されるアーカイブが発生する可能性があり、料金コストが増大する可能性があるという問題がある。そこで、本実施の形態では、デフラグ処理において、保管期間が短いアーカイブが削除されにくくなるようにオブジェクトおよびアーカイブの再構築手順を変更する。 As such, the above comparative example of defragmentation processing poses the problem that archives may be deleted before the minimum storage period set for archive storage 222 has elapsed, which could result in increased fees. Therefore, in this embodiment, the object and archive reconstruction procedures are modified during defragmentation processing so that archives with short storage periods are less likely to be deleted.

以下、図15~図17を用いて、本実施の形態におけるデフラグ処理例について説明する。なお、図15~図17では、説明を簡単にするためにオブジェクト単位でデフラグ対象を選択するものとするが、実際には複数のオブジェクトを含むチャンクグループ単位でデフラグ対象が選択される。 An example of defragmentation processing in this embodiment will be explained below using Figures 15 to 17. Note that in Figures 15 to 17, for simplicity's sake, defragmentation targets are selected on an object-by-object basis, but in reality, defragmentation targets are selected on a chunk group basis, each chunk group containing multiple objects.

図15は、第2の実施の形態におけるデフラグ処理例を示す第1の図である。また、図16は、第2の実施の形態におけるデフラグ処理例を示す第2の図である。
図15では、図12の状態から、NASクライアント210からクラウドストレージゲートウェイ100に対して、アーカイブストレージ222からのファイルF1,F2の削除が要求されたとする。
Fig. 15 is a first diagram showing an example of defragmentation processing in the second embodiment, and Fig. 16 is a second diagram showing an example of defragmentation processing in the second embodiment.
15, it is assumed that the NAS client 210 requests the cloud storage gateway 100 to delete the files F1 and F2 from the archive storage 222 in the state shown in FIG.

この場合、クラウドストレージゲートウェイ100は、ファイルF1,F2に含まれる各チャンクの参照数(1),(2)をデクリメントする。そのデクリメントの後、クラウドストレージゲートウェイ100は、次の条件(1),(2)の少なくとも一方を満たすチャンクを含むオブジェクト(実際はチャンクグループ)を、デフラグ対象として選択する。 In this case, cloud storage gateway 100 decrements the reference counts (1) and (2) of each chunk contained in files F1 and F2. After this decrement, cloud storage gateway 100 selects, as targets for defragmentation, objects (actually chunk groups) that contain chunks that satisfy at least one of the following conditions (1) and (2):

条件(1):直近の一定期間にアーカイブストレージ222に対する格納が要求されたファイルから参照されている。
条件(2):参照数(2)が所定の閾値を超えている。
Condition (1): The file is referenced from a file that has been requested to be stored in the archive storage 222 within a recent fixed period.
Condition (2): The number of references (2) exceeds a predetermined threshold.

クラウドストレージゲートウェイ100は、デフラグ対象として選択されたオブジェクトから上記条件(1),(2)の少なくとも一方を満たすチャンクを抽出し、抽出された各チャンクと同じ内容のデータを含む新たなチャンクを生成する。このとき、クラウドストレージゲートウェイ100は、生成されたチャンクに対して、元のチャンクの参照数(1),(2)を付け替える。元のチャンクの参照数(1),(2)は、「0」となる。クラウドストレージゲートウェイ100は、生成された新たなチャンクを用いて新たなオブジェクトを生成し、生成されたオブジェクトを含む新たなアーカイブをアーカイブストレージ222に格納するようにクラウドストレージシステム220に要求する。 The cloud storage gateway 100 extracts chunks that satisfy at least one of the above conditions (1) and (2) from the object selected for defragmentation, and generates new chunks containing the same data content as each of the extracted chunks. At this time, the cloud storage gateway 100 replaces the reference counts (1) and (2) of the original chunks with the generated chunks. The reference counts (1) and (2) of the original chunks become "0". The cloud storage gateway 100 generates a new object using the generated new chunks, and requests the cloud storage system 220 to store a new archive containing the generated object in the archive storage 222.

図15では例として、上記の条件(1),(2)の少なくとも一方を満たすチャンクを含むオブジェクトとして、オブジェクトO1~O3が特定されたとする。例えば、オブジェクトO3に含まれるチャンクGは、最も遅くアーカイブストレージ222への格納が要求されたファイルFmから参照されており、条件(1)を満たす。また、オブジェクトO1に含まれるチャンクAやオブジェクトO2に含まれるチャンクEは、参照数(2)が大きく、条件(2)を満たす。 In Figure 15, as an example, let us assume that objects O1 to O3 have been identified as objects containing chunks that satisfy at least one of the above conditions (1) and (2). For example, chunk G contained in object O3 is referenced by file Fm, which was requested to be stored in archive storage 222 most recently, and therefore satisfies condition (1). Furthermore, chunk A contained in object O1 and chunk E contained in object O2 have a large reference count (2), and therefore satisfy condition (2).

この場合、クラウドストレージゲートウェイ100は、オブジェクトO1,O2を含むアーカイブA1と、オブジェクトO3を含むアーカイブA2とをアーカイブストレージ222から取り出す。ただし、クラウドストレージゲートウェイ100は、これらのアーカイブA1,A2を、この時点では削除しない。クラウドストレージゲートウェイ100は、アーカイブA1,A2に含まれるオブジェクトO1~O3を、例えばオブジェクトストレージ221を介して取得する。これにより、オブジェクトO1~O3がデフラグ対象として選択される。 In this case, the cloud storage gateway 100 retrieves archive A1, which contains objects O1 and O2, and archive A2, which contains object O3, from archive storage 222. However, the cloud storage gateway 100 does not delete these archives A1 and A2 at this point. The cloud storage gateway 100 obtains objects O1 to O3 contained in archives A1 and A2, for example, via object storage 221. As a result, objects O1 to O3 are selected as targets for defragmentation.

次に、図16に示すように、クラウドストレージゲートウェイ100は、取得したオブジェクトO1~O3から、条件(1),(2)の少なくとも一方を満たすチャンクを選択する。図16の例では、チャンクA,E,Gが選択されたとする。クラウドストレージゲートウェイ100は、選択されたチャンクA,E,Gとそれぞれ同じ内容のデータを含む新たなチャンクA’,E’,G’を生成する。クラウドストレージゲートウェイ100は、生成されたチャンクA’,E’,G’に対して、それぞれ元のチャンクA,E,Gの参照数「6」、「5」、「4」を付け替え、元のチャンクA,E,Gの参照数を「0」に更新する。このような参照数の付け替えは、参照数(1),(2)の両方について行われる。 Next, as shown in FIG. 16, the cloud storage gateway 100 selects chunks from the acquired objects O1 to O3 that satisfy at least one of conditions (1) and (2). In the example of FIG. 16, chunks A, E, and G are selected. The cloud storage gateway 100 generates new chunks A', E', and G' that contain the same data content as the selected chunks A, E, and G, respectively. The cloud storage gateway 100 replaces the reference counts of the original chunks A, E, and G, "6," "5," and "4," respectively, with the generated chunks A', E', and G', and updates the reference counts of the original chunks A, E, and G to "0." This replacement of reference counts is performed for both reference counts (1) and (2).

また、元のチャンクA,E,Gに対応するファイルを示す管理情報が、それぞれ新たなチャンクA’,E’,G’に付け替えられる。すなわち、チャンクマップテーブル112において、ファイル番号に対応付けられた元のチャンクのチャンク番号が、新たなチャンクのチャンク番号に更新される。 In addition, the management information indicating the files corresponding to the original chunks A, E, and G is reassigned to the new chunks A', E', and G', respectively. That is, in the chunk map table 112, the chunk number of the original chunk associated with the file number is updated to the chunk number of the new chunk.

クラウドストレージゲートウェイ100は、生成されたチャンクA’,E’,G’によって新たなオブジェクトOwを生成し、生成されたオブジェクトOwをアーカイブストレージ222に格納するようにクラウドストレージシステム220に要求する。これにより、オブジェクトOwを含むアーカイブAwが生成され、アーカイブストレージ222に格納される。 The cloud storage gateway 100 generates a new object Ow using the generated chunks A', E', and G', and requests the cloud storage system 220 to store the generated object Ow in the archive storage 222. As a result, an archive Aw containing the object Ow is generated and stored in the archive storage 222.

図17は、第2の実施の形態におけるデフラグ処理例を示す第3の図である。図17では、図16の状態から、NASクライアント210からクラウドストレージゲートウェイ100に対して、アーカイブストレージ222からのファイルF3,F4の削除が要求されたとする。 Figure 17 is a third diagram showing an example of defragmentation processing in the second embodiment. In Figure 17, it is assumed that, from the state shown in Figure 16, the NAS client 210 requests the cloud storage gateway 100 to delete files F3 and F4 from the archive storage 222.

この場合、クラウドストレージゲートウェイ100は、ファイルF3,F4に含まれる各チャンクの参照数(1),(2)をデクリメントする。図17の例では、このデクリメントにより、チャンクC,F,H,Iの参照数(2)が「0」になる。これにより、アーカイブA1,A2に含まれるすべてのチャンクの参照数(2)が「0」になる。このため、クラウドストレージゲートウェイ100は、アーカイブA1,A2を削除するようにクラウドストレージシステム220に要求する。アーカイブA1,A2はアーカイブストレージ222に格納されてから十分長い時間が経過しているので、追加領域が発生することなく、アーカイブA1,A2をアーカイブストレージ222から削除できる。 In this case, the cloud storage gateway 100 decrements the reference counts (1) and (2) of each chunk contained in files F3 and F4. In the example of Figure 17, this decrement causes the reference counts (2) of chunks C, F, H, and I to become "0." As a result, the reference counts (2) of all chunks contained in archives A1 and A2 become "0." Therefore, the cloud storage gateway 100 requests the cloud storage system 220 to delete archives A1 and A2. Because a sufficient amount of time has passed since archives A1 and A2 were stored in archive storage 222, archives A1 and A2 can be deleted from archive storage 222 without consuming additional space.

ここで、図13に示した比較例では、チャンクを参照するファイルがアーカイブストレージ222に格納された時期や、参照数の「多さ」には関係なく、単に参照数(1)が「0」のチャンクが多いオブジェクトが再構築の対象として選択されていた。このため、再構築されたオブジェクトを含む新たなアーカイブ(図13ではオブジェクトOyを含むアーカイブAy)がアーカイブストレージ222に格納された後、図14のように短時間でそのアーカイブが削除されるという事態が発生していた。 In the comparative example shown in Figure 13, the object selected for reconstruction was simply one with many chunks whose reference count (1) was "0," regardless of when the file referencing the chunk was stored in archive storage 222 or the "number" of references. As a result, after a new archive containing the reconstructed object (archive Ay containing object Oy in Figure 13) was stored in archive storage 222, the archive was deleted in a short time, as shown in Figure 14.

これに対して、本実施の形態のクラウドストレージゲートウェイ100は、参照数(1)が「0」のチャンクが多いオブジェクトをデフラグ対象として選択しない。その代わり、クラウドストレージゲートウェイ100は、上記の条件(1),(2)の少なくとも一方を満たすチャンクを含むオブジェクトをデフラグ対象として選択する。クラウドストレージゲートウェイ100は、条件(1),(2)の少なくとも一方を満たすチャンクと同じ内容のデータを含む新たなチャンクを生成し、新たなチャンクに元のチャンクの参照数(1),(2)を付け替え、元のチャンクの参照数(1),(2)を「0」にする。クラウドストレージゲートウェイ100は、新たなチャンクを用いて新たなオブジェクトを生成し、生成されたオブジェクトをアーカイブ化してアーカイブストレージ222に格納する。 In contrast, the cloud storage gateway 100 of this embodiment does not select as defragmentation targets objects with many chunks whose reference count (1) is "0." Instead, the cloud storage gateway 100 selects as defragmentation targets objects containing chunks that satisfy at least one of the above conditions (1) and (2). The cloud storage gateway 100 generates new chunks containing data with the same content as chunks that satisfy at least one of conditions (1) and (2), assigns the reference counts (1) and (2) of the original chunks to the new chunks, and sets the reference counts (1) and (2) of the original chunks to "0." The cloud storage gateway 100 generates new objects using the new chunks, archives the generated objects, and stores them in archive storage 222.

このようにして格納されたアーカイブは、条件(1),(2)の少なくとも一方を満たすチャンクだけを含む。条件(1)を満たすチャンクは、今後にある程度長い時間が経過してから削除が要求される可能性が高いファイルによって参照されているので、このチャンクの参照数(2)はすぐには「0」になりにくい。また、条件(2)を満たすチャンクも、現時点での参照数(2)が大きいので、参照数(2)はすぐには「0」になりにくい。このため、新たに格納されたアーカイブは、アーカイブに含まれるすべてのチャンクの参照数(2)が「0」になるまでに長い時間がかかる可能性が高く、短時間でアーカイブストレージ222からの削除の対象にはなりにくい。したがって、最短保管期間が経過する前に削除されることによる追加コストが発生しにくい。 An archive stored in this way contains only chunks that satisfy at least one of conditions (1) and (2). Chunks that satisfy condition (1) are referenced by files that are likely to be requested for deletion some time in the future, so the reference count (2) of these chunks is unlikely to immediately reach "0." Chunks that satisfy condition (2) also currently have a large reference count (2), so the reference count (2) is unlikely to immediately reach "0." For this reason, it is likely that a long time will pass before the reference counts (2) of all chunks contained in a newly stored archive reach "0," and they are unlikely to become targets for deletion from archive storage 222 in a short period of time. Therefore, additional costs are unlikely to be incurred due to deletion before the minimum storage period has elapsed.

一方、新たに生成されたチャンクに対応する元のチャンクは、参照数が「0」に更新されてアーカイブストレージ222に残される。このような元のチャンクを含むアーカイブでは、アーカイブ内のすべてのチャンクの参照数(2)が「0」になるまでアーカイブストレージ222に格納され続ける。 On the other hand, the original chunks corresponding to the newly generated chunks have their reference count updated to "0" and are left in archive storage 222. In archives containing such original chunks, they continue to be stored in archive storage 222 until the reference counts (2) of all chunks in the archive become "0".

このように、アーカイブの消去は、あくまで、アーカイブ内のすべてのチャンクの参照数(2)が「0」になったときに行われる。すなわち、上記の比較例のように、アーカイブに含まれるオブジェクト内の一部のチャンクを消去してオブジェクトを再構築するという処理が行われない。これにより、最短保管期間が経過する前にアーカイブが削除されるという事態を発生しにくくすることができる。 In this way, an archive is only deleted when the reference count (2) of all chunks in the archive reaches "0." In other words, unlike the comparative example above, the process of deleting some chunks in an object contained in the archive and reconstructing the object is not performed. This makes it less likely that an archive will be deleted before the minimum storage period has elapsed.

ここで、本実施の形態の処理では、上記の比較例の場合より、アーカイブストレージ222におけるデータの格納容量や、アーカイブストレージ222との間のアーカイブの入出力回数は多くなる可能性がある。しかし、格納容量や入出力回数の増加によるコストの増加より、最短保管期間が経過する前のアーカイブ削除による追加コストの発生回数を抑制する方が、全体としてコスト削減効果は高い。 Here, in the processing of this embodiment, the data storage capacity in archive storage 222 and the number of archive inputs and outputs to and from archive storage 222 may be greater than in the case of the comparative example described above. However, the overall cost reduction effect is greater in reducing the number of additional costs incurred by deleting archives before the minimum storage period has elapsed than in increasing costs due to increased storage capacity and number of inputs and outputs.

また、本実施の形態の処理により、アーカイブストレージ222には、デフラグが進むにつれて削除されにくいアーカイブが増えていく。このため、アーカイブストレージ222との間のアーカイブの入出力回数は、時間経過とともに減少していく。したがって、ある程度長い期間を通して見れば、上記の比較例の場合よりアーカイブストレージ222との間のアーカイブの入出力回数は少なくなるので、このような入出力回数の削減によるコスト削減効果も得ることが可能である。 Furthermore, with the processing of this embodiment, the number of archives in archive storage 222 that are difficult to delete increases as defragmentation progresses. As a result, the number of archive input/output operations between archive storage 222 decreases over time. Therefore, over a relatively long period of time, the number of archive input/output operations between archive storage 222 will be less than in the comparative example above, and it is possible to achieve cost reduction effects by reducing the number of input/output operations.

なお、後のフローチャートで説明するように、実際の処理では、参照数(2)が「0」のチャンクを多く含むチャンクグループの中から、デフラグ対象が選択される。これにより、デフラグ対象として選択されたチャンクグループにおいて、参照数(2)が「0」となるチャンクを増やし、そのチャンクグループ内の全チャンクの参照数(2)が早期に「0」となるようにすることができる。 As explained in the flowchart below, in actual processing, chunks to be defragmented are selected from chunk groups that contain many chunks with a reference count (2) of "0." This increases the number of chunks with a reference count (2) of "0" in the chunk group selected for defragmentation, enabling the reference count (2) of all chunks in that chunk group to quickly reach "0."

次に、クラウドストレージゲートウェイ100の処理について、フローチャートを用いて説明する。
図18、図19は、ファイル書き込み処理の手順を示すフローチャートの例である。
Next, the processing of the cloud storage gateway 100 will be described using a flowchart.
18 and 19 are examples of flowcharts showing the procedure of file writing processing.

[ステップS11]ファイル入出力部120は、NASクライアント210からファイルの書き込み要求とファイルのデータとを受信する。重複排除処理部130の重複判定部131は、書き込みが要求されたファイルのデータを取得し、ディレクトリテーブル111に、そのファイルのディレクトリ情報を示すレコードを追加する。このとき、ファイルにファイル番号が付与される。また、重複判定部131は、ファイルのデータを可変長のチャンクに分割する。 [Step S11] The file input/output unit 120 receives a file write request and file data from the NAS client 210. The duplication determination unit 131 of the deduplication processing unit 130 obtains the file data requested to be written and adds a record indicating the directory information for that file to the directory table 111. At this time, a file number is assigned to the file. The duplication determination unit 131 also divides the file data into variable-length chunks.

[ステップS12]重複判定部131は、ファイルの先頭側から順に、処理対象のチャンクを1つ選択する。また、重複判定部131は、選択されたチャンクのデータに基づくハッシュキーを算出する。 [Step S12] The duplication determination unit 131 selects one chunk to process, starting from the beginning of the file. The duplication determination unit 131 also calculates a hash key based on the data of the selected chunk.

[ステップS13]重複判定部131は、チャンクマップテーブル112にレコードを追加し、このレコードに次のような情報を登録する。ファイル番号の項目には、書き込みが要求されたファイルのファイル番号が登録され、オフセットおよびサイズの項目には、処理対象のチャンクについての情報が登録される。 [Step S13] The duplication determination unit 131 adds a record to the chunk map table 112 and registers the following information in this record: The file number field registers the file number of the file requested to be written, and the offset and size fields register information about the chunk to be processed.

[ステップS14]重複判定部131は、チャンク管理テーブル113を参照し、ステップS13で算出されたハッシュキーが登録されたレコードが存在するかを判定する。これにより、ステップS12で選択されたチャンクと同じ内容のチャンクがすでに格納済みか(重複しているか)が判定される。該当するレコードが見つかった場合、処理がステップS15に進められ、該当するレコードが存在しない場合、処理が図19のステップS21に進められる。 [Step S14] The duplication determination unit 131 references the chunk management table 113 and determines whether a record exists in which the hash key calculated in step S13 is registered. This determines whether a chunk with the same content as the chunk selected in step S12 has already been stored (whether there is a duplicate). If a matching record is found, processing proceeds to step S15; if a matching record does not exist, processing proceeds to step S21 in Figure 19.

[ステップS15]重複判定部131は、ステップS14でチャンク管理テーブル113から検索されたレコードからチャンク番号を取得し、取得したチャンク番号をステップS13でチャンクマップテーブル112に追加したレコードに登録する。 [Step S15] The duplication determination unit 131 obtains the chunk number from the record searched for in the chunk management table 113 in step S14, and registers the obtained chunk number in the record added to the chunk map table 112 in step S13.

[ステップS16]重複判定部131は、チャンク管理テーブル113のレコードのうち、ステップS15で取得したチャンク番号を含むレコードを参照し、このレコードに登録されている参照数(1)をカウントアップする。 [Step S16] The duplication determination unit 131 references the record in the chunk management table 113 that contains the chunk number obtained in step S15, and counts up the reference count (1) registered in this record.

[ステップS17]重複判定部131は、ステップS11で分割されたすべてのチャンクについて処理済みかを判定する。未処理のチャンクがある場合、処理がステップS12に進められ、未処理のチャンクが先頭側から1つ選択されて処理が継続される。一方、すべてのチャンクを処理済みの場合、重複判定部131は、ファイル書き込みが完了したことをファイル入出力部120に通知する。通知を受けたファイル入出力部120は、NASクライアント210に対してファイル書き込みの完了を示す応答情報を送信する。 [Step S17] The duplication determination unit 131 determines whether all chunks divided in step S11 have been processed. If there are unprocessed chunks, processing proceeds to step S12, where one unprocessed chunk is selected from the beginning and processing continues. On the other hand, if all chunks have been processed, the duplication determination unit 131 notifies the file input/output unit 120 that file writing has been completed. Upon receiving the notification, the file input/output unit 120 sends response information to the NAS client 210 indicating that file writing has been completed.

以下、図19を参照して説明を続ける。
[ステップS21]重複判定部131は、ステップS12で選択されたチャンクについての新たなチャンク番号を算出する。このチャンク番号は、チャンク管理テーブル113に登録されているチャンク番号の最大値に「1」を加算した値とされる。重複判定部131は、チャンク管理テーブル113に新たなレコードを追加する。重複判定部131は、追加されたレコードに対して、算出された新たなチャンク番号と、チャンクのサイズと、ステップS12で算出されたハッシュキーとを登録し、参照数(1)として「1」を登録する。
The description will be continued below with reference to FIG.
[Step S21] The duplication determination unit 131 calculates a new chunk number for the chunk selected in step S12. This chunk number is the maximum chunk number registered in the chunk management table 113 plus "1". The duplication determination unit 131 adds a new record to the chunk management table 113. The duplication determination unit 131 registers the calculated new chunk number, the chunk size, and the hash key calculated in step S12 in the added record, and registers "1" as the reference count (1).

[ステップS22]重複判定部131は、ステップS12で選択されたチャンクのデータをデータキャッシュ117に格納する。
[ステップS23]重複判定部131は、ステップS21で算出された新たなチャンク番号を、ステップS13でチャンクマップテーブル112に追加されたレコードに登録する。
[Step S22] The duplication determination unit 131 stores the data of the chunk selected in step S12 in the data cache 117.
[Step S23] The duplication determination unit 131 registers the new chunk number calculated in step S21 in the record added to the chunk map table 112 in step S13.

[ステップS24]ステップS12で選択されたチャンクに対して、オブジェクト番号が割り当てられる。このオブジェクト番号は、チャンクが属するオブジェクトを示す。このオブジェクト番号としては、現在作成中のオブジェクトのオブジェクト番号が割り当てられる。チャンク管理部132は、ステップS21でチャンク管理テーブル113に追加されたレコードに対して、割り当てられたオブジェクト番号を登録する。 [Step S24] An object number is assigned to the chunk selected in step S12. This object number indicates the object to which the chunk belongs. This object number is the object number of the object currently being created. The chunk management unit 132 registers the assigned object number in the record added to the chunk management table 113 in step S21.

また、チャンク管理部132は、同じレコードに対して、現在作成中のオブジェクトが属するチャンクグループを示すチャンクグループ番号を登録する。チャンクグループには、所定数のオブジェクトが作成順に含められる。このため、チャンクグループ番号は、所定数のオブジェクトが作成されるたびにインクリメントされる。 The chunk management unit 132 also registers, for the same record, a chunk group number that indicates the chunk group to which the object currently being created belongs. A chunk group contains a predetermined number of objects in the order in which they were created. Therefore, the chunk group number is incremented each time a predetermined number of objects are created.

なお、新たなチャンクグループ番号が登録された場合、チャンク管理部132は、そのチャンクグループ番号を含む新たなレコードをチャンクグループ管理テーブル114に追加する。このレコードには、有効チャンク数および無効チャンク数として初期値「0」が登録される。 When a new chunk group number is registered, the chunk management unit 132 adds a new record containing that chunk group number to the chunk group management table 114. The initial value "0" is registered in this record as the number of valid chunks and the number of invalid chunks.

[ステップS25]チャンク管理部132は、現在作成中のオブジェクトに含まれるチャンクの数が、所定の閾値(Mとする)に達したかを判定する。チャンク数が閾値Mに達した場合、処理がステップS26に進められる。一方、チャンク数が閾値Mに達していない場合、現在作成中のオブジェクトはアクティブ状態であるので、オブジェクトストレージ221に対してアップロードされない。この場合、ステップS26,S27の処理がスキップされる。 [Step S25] The chunk management unit 132 determines whether the number of chunks included in the object currently being created has reached a predetermined threshold (defined as M). If the number of chunks has reached threshold M, processing proceeds to step S26. On the other hand, if the number of chunks has not reached threshold M, the object currently being created is in an active state and is not uploaded to the object storage 221. In this case, steps S26 and S27 are skipped.

[ステップS26]現在作成中のオブジェクトはM個のチャンクを含む非アクティブ状態となり、チャンク管理部132は、このオブジェクトをオブジェクトストレージ221にアップロードするようにクラウド通信部140に依頼する。クラウド通信部140は、PUTコマンドによりオブジェクトをオブジェクトストレージ221にアップロードする。 [Step S26] The object currently being created becomes inactive and contains M chunks, and the chunk management unit 132 requests the cloud communication unit 140 to upload this object to the object storage 221. The cloud communication unit 140 uses a PUT command to upload the object to the object storage 221.

[ステップS27]チャンク管理部132は、現在作成中のオブジェクトを示すオブジェクト番号をインクリメントする。これにより、次回のステップS24の実行時には、チャンクに対して新たなオブジェクトのオブジェクト番号が割り当てられるようになる。 [Step S27] The chunk management unit 132 increments the object number indicating the object currently being created. As a result, the next time step S24 is executed, the object number of a new object will be assigned to the chunk.

この後、処理が図18のステップS17に進められる。
図20は、アーカイブストレージに対するデータ格納処理の手順を示すフローチャートの例である。ファイル入出力部120が、NASクライアント210からアーカイブストレージ222に対するファイルの格納要求を受信すると、図20の処理が開始される。この格納要求では、格納対象として1以上のファイルが指定される。
Thereafter, the process proceeds to step S17 in FIG.
Fig. 20 is an example of a flowchart showing the procedure for data storage processing in archive storage. The processing in Fig. 20 starts when the file input/output unit 120 receives a request from the NAS client 210 to store a file in the archive storage 222. This storage request specifies one or more files to be stored.

[ステップS31]チャンク管理部132は、格納対象として指定されたファイルに含まれるチャンクに対応するオブジェクト(チャンクのデータを含むオブジェクト)の中から、アーカイブストレージ222に格納されていないオブジェクトを特定する。この処理では、指定されたファイルに対応付けられたチャンク番号に対して、チャンク管理テーブル113においてアーカイブ番号が登録されていない場合に、そのチャンク番号が示すチャンクを含むオブジェクトがアーカイブストレージ222に格納されていないと判定される。 [Step S31] The chunk management unit 132 identifies objects that are not stored in archive storage 222 from among the objects (objects containing chunk data) corresponding to chunks included in the file specified as the storage target. In this process, if an archive number is not registered in the chunk management table 113 for the chunk number associated with the specified file, it is determined that the object containing the chunk indicated by that chunk number is not stored in archive storage 222.

[ステップS32]チャンク管理部132は、ステップS31で特定されたオブジェクトを含むアーカイブをアーカイブストレージ222に格納するように、クラウド通信部140に依頼する。クラウド通信部140は、特定されたオブジェクトのオブジェクト番号を指定して、クラウドストレージシステム220に対してアーカイブストレージ222に対する格納を要求する。これにより、特定されたオブジェクトを含むアーカイブが、オブジェクトストレージ221からアーカイブストレージ222に格納される。 [Step S32] The chunk management unit 132 requests the cloud communication unit 140 to store an archive containing the object identified in step S31 in the archive storage 222. The cloud communication unit 140 specifies the object number of the identified object and requests the cloud storage system 220 to store it in the archive storage 222. As a result, the archive containing the identified object is stored from the object storage 221 to the archive storage 222.

[ステップS33]チャンク管理部132は、チャンク管理テーブル113から、ステップS31で特定されたオブジェクトに含まれる各チャンクに対応するレコードを特定する。チャンク管理部132は、特定された各レコードに対して、アーカイブストレージ222に格納されたアーカイブを示すアーカイブ番号を登録する。 [Step S33] The chunk management unit 132 identifies records corresponding to each chunk included in the object identified in step S31 from the chunk management table 113. For each identified record, the chunk management unit 132 registers an archive number indicating the archive stored in the archive storage 222.

[ステップS34]チャンク管理部132は、ステップS31で特定されたオブジェクトのそれぞれについて、次のような処理を実行する。チャンク管理部132は、チャンクグループ管理テーブル114から、該当オブジェクトを含むチャンクグループに対応するレコードを特定する。チャンク管理部132は、特定されたレコードに登録された有効チャンク数に、該当オブジェクトに含まれるチャンクの数(上記のM)を加算する。 [Step S34] The chunk management unit 132 performs the following process for each object identified in step S31. The chunk management unit 132 identifies a record corresponding to the chunk group that includes the object in question from the chunk group management table 114. The chunk management unit 132 adds the number of chunks included in the object in question (M above) to the number of valid chunks registered in the identified record.

[ステップS35]チャンク管理部132は、デフラグ判定テーブル115から、ステップS32でアーカイブストレージ222に格納されたアーカイブが属するアーカイブグループに対応するレコードを特定する。チャンク管理部132は、特定されたレコードに登録された有効チャンク数に、当該アーカイブに含まれるチャンクの数(ステップS34で加算されたチャンク数の合計値)を加算する。 [Step S35] The chunk management unit 132 identifies a record from the defragmentation determination table 115 that corresponds to the archive group to which the archive stored in the archive storage 222 in step S32 belongs. The chunk management unit 132 adds the number of chunks included in the archive (the total number of chunks added in step S34) to the number of valid chunks registered in the identified record.

[ステップS36]チャンク管理部132は、チャンク管理テーブル113から、アーカイブストレージ222への格納が要求された各ファイルに対応付けられたチャンク番号を含むレコードを特定する。チャンク管理部132は、特定された各レコードに対して、アーカイブ格納時刻として現在の日時を登録する。すでに日時が登録されている場合には、その日時が現在の日時によって更新される。 [Step S36] The chunk management unit 132 identifies records from the chunk management table 113 that contain chunk numbers associated with each file requested to be stored in the archive storage 222. The chunk management unit 132 registers the current date and time as the archive storage time for each identified record. If a date and time has already been registered, that date and time is updated with the current date and time.

[ステップS37]チャンク管理部132は、アーカイブストレージ222への格納が要求された各ファイルに対応付けられたチャンク番号のそれぞれについて、次のような処理を実行する。チャンク管理部132は、チャンク管理テーブル113から該当チャンク番号を含むレコードを特定し、特定されたレコードに登録された参照数(2)をインクリメントする。 [Step S37] The chunk management unit 132 performs the following process for each chunk number associated with each file requested to be stored in the archive storage 222. The chunk management unit 132 identifies a record containing the corresponding chunk number from the chunk management table 113, and increments the reference count (2) registered in the identified record.

図21は、アーカイブストレージからのデータ削除処理の手順を示すフローチャートの例である。ファイル入出力部120がNASクライアント210から、アーカイブストレージ222からのファイルの削除要求を受信すると、図21の処理が開始される。この削除要求では、削除対象として1以上のファイルが指定される。 Figure 21 is an example of a flowchart showing the steps in the process of deleting data from archive storage. The process in Figure 21 begins when the file input/output unit 120 receives a request from the NAS client 210 to delete a file from the archive storage 222. This deletion request specifies one or more files to be deleted.

[ステップS41]チャンク管理部132は、チャンク管理テーブル113を参照し、削除対象として指定されたファイルに含まれる各チャンクに対応する参照数(1),(2)を減算する。具体的には、チャンク管理部132は、指定された各ファイルに対応付けられたチャンク番号のそれぞれについて、次のような処理を実行する。チャンク管理部132は、チャンク管理テーブル113から該当チャンク番号を含むレコードを特定し、特定されたレコードに登録された参照数(1),(2)をデクリメント(「1」だけ減算)する。 [Step S41] The chunk management unit 132 references the chunk management table 113 and decrements the reference counts (1) and (2) corresponding to each chunk included in the file specified to be deleted. Specifically, the chunk management unit 132 performs the following process for each chunk number associated with each specified file: The chunk management unit 132 identifies a record containing the relevant chunk number from the chunk management table 113 and decrements (subtracts 1) the reference counts (1) and (2) registered in the identified record.

[ステップS42]チャンク管理部132は、ステップS41の処理により参照数(2)が「0」のチャンクが発生したかを判定する。該当するチャンクが発生した場合、処理がステップS43に進められ、該当するチャンクが発生していない場合、データ削除処理が終了する。 [Step S42] The chunk management unit 132 determines whether a chunk with a reference count (2) of "0" has been generated as a result of the processing in step S41. If such a chunk has been generated, processing proceeds to step S43; if such a chunk has not been generated, the data deletion processing ends.

[ステップS43]チャンク管理部132は、チャンク管理テーブル113およびデフラグ判定テーブル115の該当レコードに登録された有効チャンク数および無効チャンク数を更新する。具体的には、チャンク管理部132は、参照数(2)が「0」になったチャンクのそれぞれについて、次のような処理を実行する。 [Step S43] The chunk management unit 132 updates the number of valid chunks and the number of invalid chunks registered in the corresponding records in the chunk management table 113 and the defragmentation judgment table 115. Specifically, the chunk management unit 132 performs the following process for each chunk whose reference count (2) has become "0".

チャンク管理部132は、チャンク管理テーブル113から、該当チャンクが属するチャンクグループに対応するレコードを特定する。チャンク管理部132は、特定されたレコードに登録された有効チャンク数をデクリメントし、無効チャンク数をインクリメントする。また、チャンク管理部132は、デフラグ判定テーブル115から、該当チャンクが属するアーカイブグループに対応するレコードを特定する。チャンク管理部132は、特定されたレコードに登録された有効チャンク数をデクリメントし、無効チャンク数をインクリメントする。 The chunk management unit 132 identifies a record from the chunk management table 113 that corresponds to the chunk group to which the chunk belongs. The chunk management unit 132 decrements the number of valid chunks registered in the identified record and increments the number of invalid chunks. The chunk management unit 132 also identifies a record from the defragmentation determination table 115 that corresponds to the archive group to which the chunk belongs. The chunk management unit 132 decrements the number of valid chunks registered in the identified record and increments the number of invalid chunks.

[ステップS44]チャンク管理部132は、有効チャンク数が「0」のアーカイブ(所属するすべてのチャンクの参照数(2)が「0」のアーカイブ)があるかを判定する。該当するアーカイブがある場合、処理がステップS45に進められ、該当するアーカイブがない場合、処理がステップS46に進められる。 [Step S44] The chunk management unit 132 determines whether there is an archive with a valid chunk count of "0" (an archive with a reference count (2) of all chunks to which it belongs equals "0"). If there is a matching archive, processing proceeds to step S45; if there is no matching archive, processing proceeds to step S46.

[ステップS45]チャンク管理部132は、有効チャンク数が「0」のアーカイブをアーカイブストレージ222から削除するように、クラウド通信部140に依頼する。クラウド通信部140は、該当するアーカイブのアーカイブ番号を指定して、クラウドストレージシステム220に対してアーカイブストレージ222からの削除を要求する。これにより、該当するアーカイブがアーカイブストレージ222から削除される。 [Step S45] The chunk management unit 132 requests the cloud communication unit 140 to delete archives with a valid chunk count of "0" from the archive storage 222. The cloud communication unit 140 specifies the archive number of the relevant archive and requests the cloud storage system 220 to delete it from the archive storage 222. As a result, the relevant archive is deleted from the archive storage 222.

なお、ステップS44,S45の処理は、アーカイブ単位でなく、アーカイブグループ単位で実行されてもよい。この場合、ステップS44では、デフラグ判定テーブル115において有効チャンク数が「0」のアーカイブグループがあるかが判定される。そして、該当するアーカイブグループがある場合、ステップS45では、そのアーカイブグループに含まれる各アーカイブがアーカイブストレージ222から削除される。 Note that steps S44 and S45 may be performed on an archive group basis, rather than on an archive basis. In this case, step S44 determines whether there is an archive group in the defragmentation determination table 115 for which the number of valid chunks is "0." If such an archive group is found, then in step S45, each archive included in that archive group is deleted from the archive storage 222.

[ステップS46]チャンク管理部132は、デフラグ判定テーブル115を参照し、無効チャンク数の割合が所定の閾値を超えたアーカイブグループがあるかを判定する。無効チャンク数の割合は、有効チャンク数と無効チャンク数との合計値に対する、無効チャンク数の割合として算出される。該当するアーカイブグループがある場合、処理がステップS47に進められ、該当するアーカイブグループがない場合、データ削除処理が終了する。 [Step S46] The chunk management unit 132 references the defragmentation determination table 115 and determines whether there is an archive group whose percentage of invalid chunks exceeds a predetermined threshold. The percentage of invalid chunks is calculated as the ratio of the number of invalid chunks to the total number of valid chunks and invalid chunks. If a matching archive group is found, processing proceeds to step S47; if no matching archive group is found, the data deletion process ends.

[ステップS47]チャンク管理部132は、デフラグ処理部133に対してデフラグ処理の開始を指示する。これにより、図22、図23に示すデフラグ処理の実行が開始される。 [Step S47] The chunk management unit 132 instructs the defragmentation processing unit 133 to start defragmentation processing. This starts the defragmentation processing shown in Figures 22 and 23.

図22、図23は、デフラグ処理の手順を示すフローチャートの例である。
[ステップS51]デフラグ処理部133は、図21のステップS47でデフラグ処理の開始が指示されてから、一定時間が経過するのを待つ。そして、デフラグ処理部133は、一定時間が経過するとステップS52の処理を実行する。このように開始指示から一定時間後にデフラグ処理を開始することで、参照数(2)が「0」の無効チャンクがさらに発生し、一括して削除可能なアーカイブがより多く発生することを期待できる。
22 and 23 are examples of flowcharts showing the procedure of the defragmentation process.
[Step S51] The defragmentation processing unit 133 waits for a certain period of time to elapse after the instruction to start defragmentation is received in step S47 of Fig. 21. Then, after the certain period of time has elapsed, the defragmentation processing unit 133 executes the processing of step S52. By starting defragmentation a certain period of time after the instruction to start, more invalid chunks with a reference count (2) of "0" are generated, and it is expected that more archives that can be deleted in bulk will be generated.

[ステップS52]デフラグ処理部133は、デフラグ判定テーブル115を参照し、無効チャンク数の割合が所定の閾値を超えたアーカイブグループを特定する。図21のステップS46と同様に、無効チャンク数の割合は、有効チャンク数と無効チャンク数との合計値に対する、無効チャンク数の割合として算出される。 [Step S52] The defragmentation processing unit 133 references the defragmentation determination table 115 and identifies archive groups whose percentage of invalid chunks exceeds a predetermined threshold. As in step S46 of FIG. 21, the percentage of invalid chunks is calculated as the ratio of the number of invalid chunks to the total number of valid chunks and invalid chunks.

[ステップS53]デフラグ処理部133は、ステップS52で特定されたアーカイブグループに含まれるチャンクグループの中から、処理対象として1つを選択する。
[ステップS54]デフラグ処理部133は、選択されたチャンクグループが、前述の条件(1),(2)の少なくとも一方を満たすチャンクを含むかを判定する。チャンクが条件(1)を満たすことは、チャンク管理テーブル113の該当レコードに登録されたアーカイブ格納時刻が直近の一定期間内の時刻であることにより判定される。また、チャンクが条件(2)を満たすことは、チャンクに対応する参照数(2)が所定の閾値を超えていることにより判定される。なお、条件(2)の閾値としては、例えば、参照数(2)が「2」以上の全チャンク(N個とする)の参照数(2)に基づく中央値(昇順でN/2番目の値)が設定される。
[Step S53] The defragmentation processing unit 133 selects one chunk group to be processed from among the chunk groups included in the archive group identified in step S52.
[Step S54] The defragmentation processing unit 133 determines whether the selected chunk group includes a chunk that satisfies at least one of the aforementioned conditions (1) and (2). Whether a chunk satisfies condition (1) is determined by whether the archive storage time registered in the corresponding record in the chunk management table 113 is within the most recent fixed period. Whether a chunk satisfies condition (2) is determined by whether the reference count (2) corresponding to the chunk exceeds a predetermined threshold. The threshold for condition (2) is set, for example, to the median (the N/2th value in ascending order) based on the reference count (2) of all chunks (assuming N chunks) whose reference count (2) is 2 or greater.

選択されたチャンクグループが該当するチャンクを1つ以上含む場合、処理がステップS55に進められ、該当するチャンクを1つも含まない場合、処理がステップS56に進められる。 If the selected chunk group contains one or more matching chunks, processing proceeds to step S55; if it does not contain any matching chunks, processing proceeds to step S56.

[ステップS55]デフラグ処理部133は、選択されたチャンクグループをデフラグ対象に指定する。
[ステップS56]デフラグ処理部133は、ステップS52で特定されたアーカイブグループに含まれるチャンクグループのすべてを処理対象として選択済みかを判定する。未選択のチャンクグループがある場合、処理がステップS53に進められ、未選択のチャンクグループが1つ選択される。一方、すべてのチャンクグループが選択済みの場合、処理がステップS57に進められる。
[Step S55] The defragmentation processor 133 designates the selected chunk group as a target for defragmentation.
[Step S56] The defragmentation processing unit 133 determines whether all of the chunk groups included in the archive group identified in step S52 have been selected as processing targets. If there are any unselected chunk groups, the process proceeds to step S53, where one unselected chunk group is selected. On the other hand, if all chunk groups have been selected, the process proceeds to step S57.

[ステップS57]デフラグ処理部133は、デフラグ対象に指定されたチャンクグループを含むアーカイブをアーカイブストレージ222からダウンロードするように、クラウド通信部140に依頼する。クラウド通信部140は、該当するアーカイブのアーカイブ番号を指定して、クラウドストレージシステム220に対してアーカイブストレージ222からの取り出しを要求する。これにより、該当するアーカイブがクラウドストレージゲートウェイ100にダウンロードされる。 [Step S57] The defragmentation processing unit 133 requests the cloud communication unit 140 to download the archive containing the chunk group designated as the defragmentation target from the archive storage 222. The cloud communication unit 140 specifies the archive number of the relevant archive and requests the cloud storage system 220 to retrieve it from the archive storage 222. As a result, the relevant archive is downloaded to the cloud storage gateway 100.

[ステップS58]デフラグ処理部133は、ダウンロードされたアーカイブに含まれるチャンクから、条件(1),(2)の少なくとも一方を満たすチャンクを抽出する。デフラグ処理部133は、抽出されたチャンクを、第1キーとしてチャンク管理テーブル113のアーカイブ格納日時を用い、第2キーとしてチャンク管理テーブル113の参照数(2)を用いてソートする。すなわち、抽出されたチャンクが、アーカイブ格納日時が新しい順にソートされ、アーカイブ格納日時が同じチャンクについて、参照数(2)が多い順にソートされる。 [Step S58] The defragmentation processing unit 133 extracts chunks that satisfy at least one of conditions (1) and (2) from the chunks contained in the downloaded archive. The defragmentation processing unit 133 sorts the extracted chunks using the archive storage date and time in the chunk management table 113 as the first key and the reference count (2) in the chunk management table 113 as the second key. In other words, the extracted chunks are sorted in descending order of the most recent archive storage date and time, and chunks with the same archive storage date and time are sorted in descending order of the reference count (2).

以下、図23を参照して説明を続ける。
[ステップS61]デフラグ処理部133は、ステップS58でソートされたチャンクのうち、先頭側から処理対象として1つを選択する。
The description will be continued below with reference to FIG.
[Step S61] The defragmentation processing unit 133 selects one chunk from the beginning of the chunks sorted in step S58 as a processing target.

[ステップS62]デフラグ処理部133は、デフラグ処理において作成中の既存チャンクグループがない、または、作成中の既存チャンクグループがあるがそのチャンクグループのサイズが規定サイズを超えている、という条件のいずれかを満たすかを判定する。いずれかの条件を満たす場合、処理がステップS63に進められ、いずれの条件も満たさない場合、処理がステップS64に進められる。 [Step S62] The defragmentation processing unit 133 determines whether either of the following conditions is met: there are no existing chunk groups being created during defragmentation processing, or there are existing chunk groups being created but the size of those chunk groups exceeds a specified size. If either condition is met, processing proceeds to step S63; if neither condition is met, processing proceeds to step S64.

[ステップS63]デフラグ処理部133は、チャンクグループを新たに作成する。作成されたチャンクグループには、新たなチャンクグループ番号が割り当てられる。また、チャンクグループ管理テーブル114に、新たなチャンクグループに対応するレコードが追加され、チャンクグループ番号が登録される。 [Step S63] The defragmentation processing unit 133 creates a new chunk group. A new chunk group number is assigned to the created chunk group. In addition, a record corresponding to the new chunk group is added to the chunk group management table 114, and the chunk group number is registered.

[ステップS64]デフラグ処理部133は、選択されたチャンクと同じ内容のデータを含む新たなチャンクをチャンクグループに追加する。ステップS63が実行された場合、ステップS63で新たに作成されたチャンクグループに新たなチャンクが追加される。一方、ステップS62でNoと判定された場合、作成中の既存チャンクグループに新たなチャンクが追加される。 [Step S64] The defragmentation processing unit 133 adds a new chunk containing data with the same content as the selected chunk to the chunk group. If step S63 is executed, the new chunk is added to the chunk group newly created in step S63. On the other hand, if the determination in step S62 is No, the new chunk is added to the existing chunk group being created.

この処理では、デフラグ処理部133は、新たなチャンクに新たなチャンク番号を割り当て、チャンク管理テーブル113にレコードを追加して、そのレコードにチャンク番号を登録する。また、デフラグ処理部133は、追加されたレコードに、追加先のチャンクグループのチャンクグループ番号を登録し、オブジェクト番号として、チャンクグループ番号と一対一で対応する新たなオブジェクト番号を登録する。なお、オフセットおよびサイズとしては、チャンクグループにおけるチャンクの先頭位置を示す値が登録される。 In this process, the defragmentation processing unit 133 assigns a new chunk number to the new chunk, adds a record to the chunk management table 113, and registers the chunk number in that record. The defragmentation processing unit 133 also registers the chunk group number of the chunk group to which the chunk is to be added in the added record, and registers a new object number that corresponds one-to-one with the chunk group number as the object number. Note that values indicating the starting position of the chunk in the chunk group are registered as the offset and size.

[ステップS65]デフラグ処理部133は、元のチャンク(ステップS61で選択されたチャンク)から新たなチャンクに対して、参照数(1),(2)を付け替える。具体的には、デフラグ処理部133は、チャンク管理テーブル113において、元のチャンクに対応する参照数(1),(2)の値を新たなチャンクに対応する参照数(1),(2)の項目にそれぞれコピーし、元のチャンクに対応する参照数(1),(2)の値を「0」に更新する。 [Step S65] The defragmentation processing unit 133 changes the reference counts (1) and (2) from the original chunk (the chunk selected in step S61) to the new chunk. Specifically, the defragmentation processing unit 133 copies the reference counts (1) and (2) corresponding to the original chunk to the reference counts (1) and (2) corresponding to the new chunk in the chunk management table 113, respectively, and updates the reference counts (1) and (2) corresponding to the original chunk to "0".

また、デフラグ処理部133は、チャンク管理テーブル113において、元のチャンクに対応するハッシュキーの値を新たなチャンクに対応するハッシュキーの項目にコピーする。さらに、デフラグ処理部133は、チャンクマップテーブル112に登録された、元のチャンクのチャンク番号を、すべて新たなチャンクのチャンク番号に更新する。これにより、チャンクとファイルとの対応関係を示す管理情報が更新され、元のチャンクはファイルから参照されなくなる。 The defragmentation processing unit 133 also copies the hash key value corresponding to the original chunk to the hash key item corresponding to the new chunk in the chunk management table 113. Furthermore, the defragmentation processing unit 133 updates all of the chunk numbers of the original chunks registered in the chunk map table 112 to the chunk numbers of the new chunks. This updates the management information indicating the correspondence between chunks and files, and the original chunks are no longer referenced by the files.

[ステップS66]デフラグ処理部133は、ステップS58でソートされたチャンクのすべてを処理対象として選択済みかを判定する。未選択のチャンクがある場合、処理がステップS61に進められ、未選択のチャンクのうち先頭のチャンクが選択される。一方、該当するすべてのチャンクが選択済みの場合、処理がステップS67に進められる。 [Step S66] The defragmentation processing unit 133 determines whether all of the chunks sorted in step S58 have been selected for processing. If there are unselected chunks, processing proceeds to step S61, where the first chunk among the unselected chunks is selected. On the other hand, if all applicable chunks have been selected, processing proceeds to step S67.

[ステップS67]デフラグ処理部133は、ステップS61~S66の処理で作成されたチャンクグループを含むアーカイブをアーカイブストレージ222に格納するように、クラウド通信部140に依頼する。クラウド通信部140は、作成された各チャンクグループを個別のオブジェクトとしてオブジェクトストレージ221にアップロードする。その後、クラウド通信部140は、アップロードされた各オブジェクトを含むアーカイブをアーカイブストレージ222に格納するように要求する。これにより、該当オブジェクトがアーカイブストレージ222に格納される。 [Step S67] The defragmentation processing unit 133 requests the cloud communication unit 140 to store an archive containing the chunk groups created in steps S61 to S66 in the archive storage 222. The cloud communication unit 140 uploads each created chunk group to the object storage 221 as an individual object. The cloud communication unit 140 then requests that an archive containing each uploaded object be stored in the archive storage 222. As a result, the relevant objects are stored in the archive storage 222.

[ステップS68]デフラグ処理部133は、チャンク管理テーブル113のレコードのうち、アーカイブストレージ222に格納されたアーカイブに含まれる全チャンクのレコードに対して、そのアーカイブのアーカイブ番号を登録する。また、デフラグ処理部133は、それらのレコードのアーカイブ格納日時の項目に、現在の日時を登録する。 [Step S68] The defragmentation processing unit 133 registers the archive numbers of all chunk records in the chunk management table 113 that are included in the archive stored in the archive storage 222. The defragmentation processing unit 133 also registers the current date and time in the archive storage date and time fields of those records.

さらに、デフラグ処理部133は、チャンクグループ管理テーブル114のレコードのうち、上記アーカイブに含まれる各チャンクグループに対応するレコードの有効チャンク数に、チャンクグループに含まれるチャンクの数を加算する。また、デフラグ判定テーブル115において上記アーカイブのアーカイブ番号に対応付けられた有効チャンク数に、上記アーカイブに含まれるチャンクの数を加算する。 Furthermore, the defragmentation processing unit 133 adds the number of chunks included in the chunk group to the number of valid chunks in the records in the chunk group management table 114 that correspond to each chunk group included in the archive. It also adds the number of chunks included in the archive to the number of valid chunks associated with the archive number of the archive in the defragmentation determination table 115.

また、デフラグ処理部133は、ステップS65で参照数(1),(2)が「0」に更新された元のチャンクのそれぞれについて、以下の処理を実行する。デフラグ処理部133は、チャンクグループ管理テーブル114のレコードのうち、該当チャンクが属するチャンクグループに対応するレコードにおいて、有効チャンク数をデクリメントし、無効チャンク数をインクリメントする。さらに、デフラグ処理部133は、デフラグ処理部133は、デフラグ判定テーブル115のレコードのうち、該当チャンクが属するアーカイブに対応するレコードにおいて、有効チャンク数をデクリメントし、無効チャンク数をインクリメントする。 The defragmentation processing unit 133 also performs the following processing for each of the original chunks whose reference counts (1) and (2) were updated to "0" in step S65. The defragmentation processing unit 133 decrements the number of valid chunks and increments the number of invalid chunks in the records of the chunk group management table 114 that correspond to the chunk group to which the chunk belongs. Furthermore, the defragmentation processing unit 133 decrements the number of valid chunks and increments the number of invalid chunks in the records of the defragmentation determination table 115 that correspond to the archive to which the chunk belongs.

[ステップS69]チャンク管理部132は、有効チャンク数が「0」のアーカイブ(所属するすべてのチャンクの参照数(2)が「0」のアーカイブ)があるかを判定する。該当するアーカイブがある場合、処理がステップS70に進められ、該当するアーカイブがない場合、デフラグ処理が終了する。 [Step S69] The chunk management unit 132 determines whether there is an archive with a valid chunk count of "0" (an archive with a reference count (2) of all chunks to which it belongs equals "0"). If there is a matching archive, processing proceeds to step S70; if there is no matching archive, defragmentation processing ends.

[ステップS70]チャンク管理部132は、有効チャンク数が「0」のアーカイブをアーカイブストレージ222から削除するように、クラウド通信部140に依頼する。クラウド通信部140は、該当するアーカイブのアーカイブ番号を指定して、クラウドストレージシステム220に対してアーカイブストレージ222からの削除を要求する。これにより、該当するアーカイブがアーカイブストレージ222から削除される。 [Step S70] The chunk management unit 132 requests the cloud communication unit 140 to delete archives with a valid chunk count of "0" from the archive storage 222. The cloud communication unit 140 specifies the archive number of the relevant archive and requests the cloud storage system 220 to delete it from the archive storage 222. As a result, the relevant archive is deleted from the archive storage 222.

なお、ステップS44,S45と同様に、ステップS69,S70の処理は、アーカイブ単位でなく、アーカイブグループ単位で実行されてもよい。
以上の処理によれば、クラウドストレージゲートウェイ100はデフラグ処理において、早期に削除されにくいアーカイブをアーカイブストレージ222に格納する。これにより、アーカイブが既定の最短保管期間の経過前にアーカイブストレージ222から削除される事態の発生確率を抑制できる。その結果、アーカイブストレージ222の利用コストを削減できる可能性を高めることができる。
As with steps S44 and S45, the processing of steps S69 and S70 may be executed in units of archive groups, rather than in units of archives.
According to the above process, during the defragmentation process, the cloud storage gateway 100 stores archives that are unlikely to be deleted early in the archive storage 222. This reduces the probability of an archive being deleted from the archive storage 222 before the specified minimum storage period has elapsed. As a result, it is possible to increase the possibility of reducing the usage costs of the archive storage 222.

なお、図22のステップS53~S56では、チャンクグループ単位でなくオブジェクト単位でデフラグ対象が指定されてもよい。しかし、実際の処理では大量のオブジェクトが作成されることから、オブジェクト単位でデフラグ対象が指定されると、小さなデフラグ対象データを用いたデフラグ処理が高頻度で実行される可能性があり、その場合には処理効率が低い。これに対して、複数のオブジェクトを含むチャンクグループ単位でデフラグ対象が指定されることで、処理効率を高めることができる。 In steps S53 to S56 of Figure 22, defragmentation targets may be specified on an object-by-object basis rather than on a chunk group basis. However, since a large number of objects are created in actual processing, if defragmentation targets are specified on an object-by-object basis, defragmentation processing using small defragmentation target data may be performed frequently, resulting in low processing efficiency. In contrast, processing efficiency can be improved by specifying defragmentation targets on a chunk group basis containing multiple objects.

同様に、図21のステップS46や図22のステップS52では、アーカイブグループ単位でなくアーカイブ単位で無効チャンクの割合が算出されてもよい。しかし、アーカイブグループ単位で無効チャンクの割合が算出される方が、処理効率を高めることができる。 Similarly, in step S46 of FIG. 21 and step S52 of FIG. 22, the percentage of invalid chunks may be calculated on an archive basis rather than on an archive group basis. However, calculating the percentage of invalid chunks on an archive group basis can improve processing efficiency.

なお、上記の各実施の形態に示した装置(例えば、ストレージ制御装置1、クラウドストレージゲートウェイ100)の処理機能は、コンピュータによって実現することができる。その場合、各装置が有すべき機能の処理内容を記述したプログラムが提供され、そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記憶装置、光ディスク、半導体メモリなどがある。磁気記憶装置には、ハードディスク装置(HDD)、磁気テープなどがある。光ディスクには、CD(Compact Disc)、DVD(Digital Versatile Disc)、ブルーレイディスク(Blu-ray Disc:BD、登録商標)などがある。 The processing functions of the devices described in the above embodiments (e.g., storage control device 1, cloud storage gateway 100) can be implemented by a computer. In this case, a program describing the processing details of the functions that each device should have is provided, and the processing functions are implemented on the computer by executing the program. The program describing the processing details can be recorded on a computer-readable recording medium. Examples of computer-readable recording media include magnetic storage devices, optical discs, and semiconductor memories. Magnetic storage devices include hard disk drives (HDDs) and magnetic tapes. Optical discs include CDs (Compact Discs), DVDs (Digital Versatile Discs), and Blu-ray Discs (BD, registered trademark).

プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CDなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。 When distributing a program, for example, the program is recorded on a portable recording medium such as a DVD or CD and sold. The program can also be stored in the storage device of a server computer, and then transferred from the server computer to other computers via a network.

プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムまたはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムにしたがった処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムにしたがった処理を実行することもできる。また、コンピュータは、ネットワークを介して接続されたサーバコンピュータからプログラムが転送されるごとに、逐次、受け取ったプログラムにしたがった処理を実行することもできる。 A computer that executes a program stores, for example, a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. The computer then reads the program from its own storage device and executes processing in accordance with the program. Note that the computer can also read the program directly from a portable recording medium and execute processing in accordance with that program. The computer can also execute processing in accordance with the received program each time a program is transferred from a server computer connected via a network.

1 ストレージ制御装置
2 外部ストレージ
AC1,AC2,ACn,ACx 保管データセット
CK1~CK9,CK21,CK22,CK1’,CK5’,CK7’ チャンク
FL1~FL4,FLm ファイル
1 Storage control device 2 External storage AC1, AC2, ACn, ACx Storage data set CK1 to CK9, CK21, CK22, CK1', CK5', CK7' Chunk FL1 to FL4, FLm File

Claims (5)

コンピュータに、
書き込みが要求された複数のファイルのそれぞれを分割することで得られた複数の分割データセットから、重複を排除して複数のチャンクを取得し、前記複数のチャンクから選択された2以上のチャンクをそれぞれまとめて複数の保管データセットを生成し、
前記複数のファイルのうち第1のファイルの格納要求を受信すると、前記複数のチャンクのうち前記第1のファイルから参照されるチャンクを含む1以上の第1の保管データセットを特定し、前記1以上の第1の保管データセットを外部ストレージに格納するとともに、前記複数のチャンクのうち前記第1のファイルから参照されるチャンクに対応付けられた参照数を、前記複数の分割データセットのうち前記第1のファイルに含まれる分割データセットから参照される数の分だけ増加させ、
前記複数のファイルのうち第2のファイルの削除要求を受信すると、前記複数のチャンクのうち前記第2のファイルから参照されるチャンクに対応する前記参照数を、前記複数の分割データセットのうち前記第2のファイルに含まれる分割データセットから参照される数の分だけ減少させ、
前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、前記複数のファイルのうち、直近の一定期間に前記外部ストレージへの格納が要求されたファイルから参照されている1以上の第1のチャンクを特定して前記外部ストレージから取得し、
前記1以上の第1のチャンクとそれぞれ同じデータを有する1以上の第2のチャンクを生成し、前記1以上の第1のチャンクのそれぞれに対応する前記参照数を前記1以上の第2のチャンクにそれぞれ付け替えるとともに、前記1以上の第1のチャンクのそれぞれに対応する前記参照数を0に更新し、前記1以上の第2のチャンクをまとめて新たな保管データセットを生成して前記外部ストレージに格納し、
前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、対応する保管データセット内のすべてのチャンクに対応する前記参照数が0である第2の保管データセットが検出されると、前記第2の保管データセットを前記外部ストレージから削除する、
ストレージ制御プログラム。
On the computer,
Obtaining a plurality of chunks from a plurality of divided data sets obtained by dividing each of the plurality of files for which writing is requested, while eliminating duplicates, and generating a plurality of storage data sets by combining two or more chunks selected from the plurality of chunks,
when a storage request for a first file of the plurality of files is received, one or more first storage datasets including chunks of the plurality of chunks referenced by the first file are identified, and the one or more first storage datasets are stored in an external storage, and a reference count associated with the chunks of the plurality of chunks referenced by the first file is increased by the number of references from split datasets included in the first file among the plurality of split datasets;
When a request to delete a second file among the plurality of files is received, the reference count corresponding to a chunk among the plurality of chunks referenced by the second file is decreased by the number of chunks referenced by a split data set included in the second file among the plurality of split data sets;
Among the plurality of stored data sets stored in the external storage, one or more first chunks that are referenced by files among the plurality of files for which storage in the external storage has been requested within a recent fixed period are identified and acquired from the external storage;
generating one or more second chunks each having the same data as the one or more first chunks, respectively reassigning the reference numbers corresponding to the one or more first chunks to the one or more second chunks, respectively, and updating the reference numbers corresponding to the one or more first chunks to 0, and aggregating the one or more second chunks to generate a new storage dataset and storing the new dataset in the external storage;
When a second storage dataset in which the reference count corresponding to all chunks in a corresponding storage dataset is 0 is detected from among the storage datasets stored in the external storage among the plurality of storage datasets, the second storage dataset is deleted from the external storage.
Storage control program.
前記1以上の第1のチャンクとして、前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、前記参照数が所定の閾値より大きいチャンクがさらに特定される、
請求項1記載のストレージ制御プログラム。
As the one or more first chunks, chunks whose reference count is greater than a predetermined threshold are further identified from among the plurality of stored datasets stored in the external storage.
The storage control program according to claim 1.
前記1以上の第1のチャンクの特定では、
前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、前記参照数が0のチャンクの割合が所定割合を超える1以上の第3の保管データセットを特定し、
前記1以上の第3の保管データセットの中から前記1以上の第1のチャンクを特定する、
請求項1または2記載のストレージ制御プログラム。
In identifying the one or more first chunks,
Identifying one or more third storage datasets from among the plurality of storage datasets stored in the external storage, in which the proportion of chunks with the reference count of 0 exceeds a predetermined proportion;
identifying the one or more first chunks from within the one or more third archived data sets;
3. The storage control program according to claim 1.
コンピュータが、
書き込みが要求された複数のファイルのそれぞれを分割することで得られた複数の分割データセットから、重複を排除して複数のチャンクを取得し、前記複数のチャンクから選択された2以上のチャンクをそれぞれまとめて複数の保管データセットを生成し、
前記複数のファイルのうち第1のファイルの格納要求を受信すると、前記複数のチャンクのうち前記第1のファイルから参照されるチャンクを含む1以上の第1の保管データセットを特定し、前記1以上の第1の保管データセットを外部ストレージに格納するとともに、前記複数のチャンクのうち前記第1のファイルから参照されるチャンクに対応付けられた参照数を、前記複数の分割データセットのうち前記第1のファイルに含まれる分割データセットから参照される数の分だけ増加させ、
前記複数のファイルのうち第2のファイルの削除要求を受信すると、前記複数のチャンクのうち前記第2のファイルから参照されるチャンクに対応する前記参照数を、前記複数の分割データセットのうち前記第2のファイルに含まれる分割データセットから参照される数の分だけ減少させ、
前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、前記複数のファイルのうち、直近の一定期間に前記外部ストレージへの格納が要求されたファイルから参照されている1以上の第1のチャンクを特定して前記外部ストレージから取得し、
前記1以上の第1のチャンクとそれぞれ同じデータを有する1以上の第2のチャンクを生成し、前記1以上の第1のチャンクのそれぞれに対応する前記参照数を前記1以上の第2のチャンクにそれぞれ付け替えるとともに、前記1以上の第1のチャンクのそれぞれに対応する前記参照数を0に更新し、前記1以上の第2のチャンクをまとめて新たな保管データセットを生成して前記外部ストレージに格納し、
前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、対応する保管データセット内のすべてのチャンクに対応する前記参照数が0である第2の保管データセットが検出されると、前記第2の保管データセットを前記外部ストレージから削除する、
ストレージ制御方法。
The computer
Obtaining a plurality of chunks from a plurality of divided data sets obtained by dividing each of the plurality of files for which writing is requested, while eliminating duplicates, and generating a plurality of storage data sets by combining two or more chunks selected from the plurality of chunks,
when a storage request for a first file of the plurality of files is received, one or more first storage datasets including chunks of the plurality of chunks referenced by the first file are identified, and the one or more first storage datasets are stored in an external storage, and a reference count associated with the chunks of the plurality of chunks referenced by the first file is increased by the number of references from split datasets included in the first file among the plurality of split datasets;
When a request to delete a second file among the plurality of files is received, the reference count corresponding to a chunk among the plurality of chunks referenced by the second file is decreased by the number of chunks referenced by a split data set included in the second file among the plurality of split data sets;
Among the plurality of stored data sets stored in the external storage, one or more first chunks that are referenced by files among the plurality of files for which storage in the external storage has been requested within a recent fixed period are identified and acquired from the external storage;
generating one or more second chunks each having the same data as the one or more first chunks, respectively reassigning the reference numbers corresponding to the one or more first chunks to the one or more second chunks, respectively, and updating the reference numbers corresponding to the one or more first chunks to 0, and aggregating the one or more second chunks to generate a new storage dataset and storing the new dataset in the external storage;
When a second storage dataset in which the reference count corresponding to all chunks in a corresponding storage dataset is 0 is detected from among the storage datasets stored in the external storage among the plurality of storage datasets, the second storage dataset is deleted from the external storage.
Storage control methods.
書き込みが要求された複数のファイルのそれぞれを分割することで得られた複数の分割データセットから、重複を排除して複数のチャンクを取得し、前記複数のチャンクから選択された2以上のチャンクをそれぞれまとめて複数の保管データセットを生成し、
前記複数のファイルのうち第1のファイルの格納要求を受信すると、前記複数のチャンクのうち前記第1のファイルから参照されるチャンクを含む1以上の第1の保管データセットを特定し、前記1以上の第1の保管データセットを外部ストレージに格納するとともに、前記複数のチャンクのうち前記第1のファイルから参照されるチャンクに対応付けられた参照数を、前記複数の分割データセットのうち前記第1のファイルに含まれる分割データセットから参照される数の分だけ増加させ、
前記複数のファイルのうち第2のファイルの削除要求を受信すると、前記複数のチャンクのうち前記第2のファイルから参照されるチャンクに対応する前記参照数を、前記複数の分割データセットのうち前記第2のファイルに含まれる分割データセットから参照される数の分だけ減少させ、
前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、前記複数のファイルのうち、直近の一定期間に前記外部ストレージへの格納が要求されたファイルから参照されている1以上の第1のチャンクを特定して前記外部ストレージから取得し、
前記1以上の第1のチャンクとそれぞれ同じデータを有する1以上の第2のチャンクを生成し、前記1以上の第1のチャンクのそれぞれに対応する前記参照数を前記1以上の第2のチャンクにそれぞれ付け替えるとともに、前記1以上の第1のチャンクのそれぞれに対応する前記参照数を0に更新し、前記1以上の第2のチャンクをまとめて新たな保管データセットを生成して前記外部ストレージに格納し、
前記複数の保管データセットのうち前記外部ストレージに格納された保管データセットの中から、対応する保管データセット内のすべてのチャンクに対応する前記参照数が0である第2の保管データセットが検出されると、前記第2の保管データセットを前記外部ストレージから削除する、処理部、
を有するストレージ制御装置。
Obtaining a plurality of chunks from a plurality of divided data sets obtained by dividing each of the plurality of files for which writing is requested, while eliminating duplicates, and generating a plurality of storage data sets by combining two or more chunks selected from the plurality of chunks,
when a storage request for a first file of the plurality of files is received, one or more first storage datasets including chunks of the plurality of chunks referenced by the first file are identified, and the one or more first storage datasets are stored in an external storage, and a reference count associated with the chunks of the plurality of chunks referenced by the first file is increased by the number of references from split datasets included in the first file among the plurality of split datasets;
When a request to delete a second file among the plurality of files is received, the reference count corresponding to a chunk among the plurality of chunks referenced by the second file is decreased by the number of chunks referenced by a split data set included in the second file among the plurality of split data sets;
Among the plurality of stored data sets stored in the external storage, one or more first chunks that are referenced by files among the plurality of files for which storage in the external storage has been requested within a recent fixed period are identified and acquired from the external storage;
generating one or more second chunks each having the same data as the one or more first chunks, respectively reassigning the reference numbers corresponding to the one or more first chunks to the one or more second chunks, respectively, and updating the reference numbers corresponding to the one or more first chunks to 0, and aggregating the one or more second chunks to generate a new storage dataset and storing the new dataset in the external storage;
a processing unit that, when a second storage dataset in which the reference count corresponding to all chunks in a corresponding storage dataset is 0 is detected from among the storage datasets stored in the external storage among the plurality of storage datasets, deletes the second storage dataset from the external storage;
A storage control device having:
JP2022059254A 2022-03-31 2022-03-31 Storage control program, storage control method, and storage control device Active JP7804186B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022059254A JP7804186B2 (en) 2022-03-31 2022-03-31 Storage control program, storage control method, and storage control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022059254A JP7804186B2 (en) 2022-03-31 2022-03-31 Storage control program, storage control method, and storage control device

Publications (2)

Publication Number Publication Date
JP2023150248A JP2023150248A (en) 2023-10-16
JP7804186B2 true JP7804186B2 (en) 2026-01-22

Family

ID=88326422

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022059254A Active JP7804186B2 (en) 2022-03-31 2022-03-31 Storage control program, storage control method, and storage control device

Country Status (1)

Country Link
JP (1) JP7804186B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012533126A (en) 2009-07-16 2012-12-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and program for deduplicating data in a distributed environment including sources and targets
US20150193160A1 (en) 2014-01-06 2015-07-09 International Business Machines Corporation Data Duplication that Mitigates Storage Requirements
JP2019095925A (en) 2017-11-20 2019-06-20 富士通株式会社 Information processing device and information processing program
JP2021076969A (en) 2019-11-06 2021-05-20 富士通株式会社 Information processing apparatus and information processing program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012533126A (en) 2009-07-16 2012-12-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and program for deduplicating data in a distributed environment including sources and targets
US20150193160A1 (en) 2014-01-06 2015-07-09 International Business Machines Corporation Data Duplication that Mitigates Storage Requirements
JP2019095925A (en) 2017-11-20 2019-06-20 富士通株式会社 Information processing device and information processing program
JP2021076969A (en) 2019-11-06 2021-05-20 富士通株式会社 Information processing apparatus and information processing program

Also Published As

Publication number Publication date
JP2023150248A (en) 2023-10-16

Similar Documents

Publication Publication Date Title
JP7323801B2 (en) Information processing device and information processing program
US9141621B2 (en) Copying a differential data store into temporary storage media in response to a request
JP6304406B2 (en) Storage apparatus, program, and information processing method
US10585857B2 (en) Creation of synthetic backups within deduplication storage system by a backup application
US9880746B1 (en) Method to increase random I/O performance with low memory overheads
US11372576B2 (en) Data processing apparatus, non-transitory computer-readable storage medium, and data processing method
JP6033241B2 (en) Backup and restore strategies for data deduplication
US20190361850A1 (en) Information processing system and information processing apparatus
US9189494B2 (en) Object file system
US9268832B1 (en) Sorting a data set by using a limited amount of memory in a processing system
US10789228B2 (en) Data presence/absence determination apparatus and computer-readable storage medium storing program for determination of data presence/absence
US9471245B1 (en) Method and apparatus for transferring modified data efficiently
JP2021043642A (en) Information processing device and information processing program
JP2013222230A (en) Information processing system
JP2019028954A (en) Storage control apparatus, program, and deduplication method
JP2019506667A (en) Distributed data deduplication within a processor grid
US20240037034A1 (en) Data intake buffers for deduplication storage system
US20170068483A1 (en) Storage device, computer readable recording medium, and storage device control method
JP7804186B2 (en) Storage control program, storage control method, and storage control device
JP2022074654A (en) Device, method and program for processing information
JP2024001607A (en) Information processing device and information processing method

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20240906

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20240918

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20241018

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20241128

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250930

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20251126

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20251222

R150 Certificate of patent or registration of utility model

Ref document number: 7804186

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150