[go: up one dir, main page]

JP2001034517A - File replication system - Google Patents

File replication system

Info

Publication number
JP2001034517A
JP2001034517A JP11205142A JP20514299A JP2001034517A JP 2001034517 A JP2001034517 A JP 2001034517A JP 11205142 A JP11205142 A JP 11205142A JP 20514299 A JP20514299 A JP 20514299A JP 2001034517 A JP2001034517 A JP 2001034517A
Authority
JP
Japan
Prior art keywords
slave
file
data
master
storage device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11205142A
Other languages
Japanese (ja)
Inventor
Katsufumi Fujimoto
本 克 文 藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP11205142A priority Critical patent/JP2001034517A/en
Publication of JP2001034517A publication Critical patent/JP2001034517A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【課題】 ハードディスクの性能の影響を抑制してファ
イルレプリケーションの処理性能を向上させることがで
きるファイルレプリケーションシステムを提供する。 【解決手段】 マスタ計算機1はマスタ側レプリケーシ
ョン実行部1aを有し、マスタ側ハードディスク装置4
からマスタファイル6のデータを読み出すとともに、読
み出されたマスタファイル6のデータをネットワーク3
を介して順次スレーブ計算機2側へ送信する。また、ス
レーブ計算機2はスレーブ側レプリケーション実行部2
aを有し、マスタ計算機1から送信されたマスタファイ
ル6のデータとスレーブ側ハードディスク装置5から読
み出されたスレーブファイル7のデータとをスレーブ計
算機2上でバイト単位で比較し、この比較処理により検
出された相違部分のデータをスレーブ側ハードディスク
装置5に保持されたスレーブファイル7へ書き込む。
(57) [Summary] [PROBLEMS] To provide a file replication system capable of suppressing the influence of the performance of a hard disk and improving the processing performance of file replication. SOLUTION: A master computer 1 has a master side replication execution unit 1a, and a master side hard disk device 4
From the master file 6 and read the data of the read master file 6 from the network 3.
And sequentially transmitted to the slave computer 2 side. The slave computer 2 is a slave-side replication execution unit 2
a, and the data of the master file 6 transmitted from the master computer 1 and the data of the slave file 7 read from the slave hard disk device 5 are compared on a byte-by-byte basis on the slave computer 2. The data of the detected difference is written to the slave file 7 held in the slave hard disk device 5.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は複数の計算機を備え
た分散処理システムに係り、とりわけ複数の計算機で同
一内容のファイルを維持するファイルレプリケーション
システムに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a distributed processing system having a plurality of computers, and more particularly to a file replication system for maintaining files of the same contents in a plurality of computers.

【0002】[0002]

【従来の技術】従来から、1つの計算機(以下「マスタ
計算機」という)が保有するファイル(以下マスタファ
イル」という)の複製(以下「スレーブファイル」とい
う)を別の計算機(以下「スレーブ計算機」という)に
作り、マスタファイルとスレーブファイルとの整合性を
維持するよう運用されるファイルレプリケーションシス
テムが知られている。
2. Description of the Related Art Conventionally, a copy (hereinafter, referred to as "slave file") of a file (hereinafter, referred to as "slave file") held by one computer (hereinafter, referred to as "master computer") is transferred to another computer (hereinafter, "slave computer"). A file replication system is known that is operated to maintain consistency between a master file and a slave file.

【0003】このような従来のファイルレプリケーショ
ンシステムにおいては、マスタファイルとスレーブファ
イルとの整合性を維持するため、スレーブファイルの内
容をマスタファイルの内容と一致させるファイルレプリ
ケーションが定期的に行われる。このファイルレプリケ
ーションの処理においては、マスタ計算機側からスレー
ブ計算機側へマスタファイルがネットワークを介して送
られ、スレーブ計算機が保有するスレーブファイルの内
容が更新される。具体的には、(1)マスタ計算機のハ
ードディスク装置からマスタファイルを読み出し、
(2)マスタ計算機側からスレーブ計算機側へネットワ
ークを介してマスタファイルを送信し、(3)マスタフ
ァイルの内容をスレーブ計算機のハードディスク装置に
保持されたスレーブファイルへ書き込む、という一連の
処理が行われる。
In such a conventional file replication system, in order to maintain consistency between a master file and a slave file, file replication for matching the contents of the slave file with the contents of the master file is periodically performed. In the file replication process, the master file is sent from the master computer to the slave computer via the network, and the contents of the slave file held by the slave computer are updated. Specifically, (1) the master file is read from the hard disk device of the master computer,
A series of processings of (2) transmitting a master file from the master computer side to the slave computer side via the network and (3) writing the contents of the master file to the slave file held in the hard disk device of the slave computer are performed. .

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上述し
たファイルレプリケーションの処理では、マスタファイ
ルのデータをスレーブファイルへ全て書き込むので、そ
の処理性能がハードディスク装置の性能の影響を受けて
著しく低下してしまうという問題がある。なお、ファイ
ルレプリケーションの処理性能を決める要因としては、
ハードディスク装置の性能以外にネットワークの性能が
挙げられるが、ネットワークの性能の向上に伴って、ハ
ードディスク装置の性能が主なボトルネックとなるとい
う事態が増えている。
However, in the above-described file replication processing, since all data of the master file is written to the slave file, the processing performance is significantly reduced due to the performance of the hard disk device. There's a problem. The factors that determine the processing performance of file replication include:
There is network performance in addition to the performance of the hard disk device. With the improvement of the network performance, the situation in which the performance of the hard disk device becomes a main bottleneck is increasing.

【0005】本発明はこのような点を考慮してなされた
ものであり、ハードディスクの性能の影響を抑制してフ
ァイルレプリケーションの処理性能を向上させることが
できるファイルレプリケーションシステムを提供するこ
とを目的とする。
[0005] The present invention has been made in view of the above points, and it is an object of the present invention to provide a file replication system capable of suppressing the influence of the performance of a hard disk and improving the processing performance of file replication. I do.

【0006】[0006]

【課題を解決するための手段】本発明は、マスタ計算機
と、前記マスタ計算機に接続された外部記憶装置であっ
てマスタファイルを保持するマスタ側外部記憶装置と、
前記マスタ計算機に通信路を介して接続されたスレーブ
計算機と、前記スレーブ計算機に接続された外部記憶装
置であって前記マスタファイルに対応するスレーブファ
イルを保持するスレーブ側外部記憶装置とを備え、前記
スレーブファイルの内容を前記マスタファイルの内容と
一致させるファイルレプリケーションを行うときに、前
記マスタファイルおよび前記スレーブファイルのデータ
をそれぞれ前記マスタ側外部記憶装置および前記スレー
ブ側外部記憶装置から読み出すとともに、読み出された
前記マスタファイルのデータと前記スレーブファイルの
データとを比較し、この比較処理により検出された相違
部分のデータを前記スレーブ側外部記憶装置に保持され
たスレーブファイルへ書き込むことを特徴とするファイ
ルレプリケーションシステムを提供する。
SUMMARY OF THE INVENTION The present invention provides a master computer, an external storage device connected to the master computer, and a master-side external storage device for holding a master file.
A slave computer connected to the master computer via a communication path, and an external storage device connected to the slave computer, the slave external storage device holding a slave file corresponding to the master file, When performing file replication for matching the contents of the slave file with the contents of the master file, the data of the master file and the data of the slave file are read from the master-side external storage device and the slave-side external storage device, respectively. Comparing the data of the master file with the data of the slave file, and writing the data of the difference detected by the comparison processing to the slave file held in the slave-side external storage device. Replication To provide a system.

【0007】なお、本発明においては、前記比較処理に
より検出された相違部分のデータを含む所定範囲のデー
タを前記スレーブ側外部記憶装置に保持されたスレーブ
ファイルへ書き込むことが好ましい。
In the present invention, it is preferable that a predetermined range of data including the data of the different portion detected by the comparison processing be written to a slave file held in the slave external storage device.

【0008】本発明によれば、マスタ計算機から送信さ
れたマスタファイルのデータとスレーブ側外部記憶装置
から読み出されたスレーブファイルのデータとを比較
し、この比較処理により検出された相違部分のデータを
スレーブ側外部記憶装置に保持されたスレーブファイル
へ書き込むようにしている。従って、スレーブ側外部記
憶装置からの読み出し量は増加するが、スレーブ側外部
記憶装置への書き込み量は減らすことができ、このた
め、外部記憶装置の読み出し性能が書き込み性能よりも
格段に高く、かつファイルの更新箇所が特定の場所に集
中する傾向が強いという事実を利用して、ファイルレプ
リケーションの処理性能を大幅に向上させることができ
る。
According to the present invention, the data of the master file transmitted from the master computer is compared with the data of the slave file read from the external storage device on the slave side, and the data of the different part detected by the comparison processing is compared. Is written to the slave file held in the slave-side external storage device. Therefore, although the read amount from the slave-side external storage device increases, the write amount to the slave-side external storage device can be reduced, so that the read performance of the external storage device is much higher than the write performance, and By taking advantage of the fact that file update locations tend to be concentrated at specific locations, the processing performance of file replication can be significantly improved.

【0009】また、本発明によれば、マスタファイルの
データとスレーブファイルのデータとを比較処理により
相違が検出されたときに、その相違部分のデータに加え
て、そのデータを含む所定範囲のデータをスレーブ側外
部記憶装置に保持されたスレーブファイルへ書き込むこ
とにより、スレーブファイルの更新箇所が多量に生じた
ような場合でも、比較処理の回数、およびスレーブ側外
部記憶装置へのアクセス回数(書き込み回数および読み
出し回数)を効果的に減らすことができ、このため、フ
ァイルレプリケーションの性能をより向上させることが
できる。
Further, according to the present invention, when a difference is detected between the data of the master file and the data of the slave file by comparison processing, in addition to the data of the difference, the data of a predetermined range including the data is included. Is written to the slave file held in the slave-side external storage device, so that the number of comparison processes and the number of accesses to the slave-side external storage device (the number of times of writing) And the number of read operations) can be effectively reduced, so that the performance of file replication can be further improved.

【0010】[0010]

【発明の実施の形態】以下、図面を参照して本発明の実
施の形態について説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0011】第1の実施の形態 まず、図1乃至図3により、本発明によるファイルレプ
リケーションシステムの第1の実施の形態について説明
する。
First Embodiment First, a first embodiment of a file replication system according to the present invention will be described with reference to FIGS.

【0012】図1は本発明によるファイルレプリケーシ
ョンシステムの第1の実施の形態の全体構成を示すブロ
ック図である。図1に示すように、ファイルレプリケー
ションシステムは、マスタ計算機1と、マスタ計算機1
にネットワーク(通信路)3を介して接続されたスレー
ブ計算機2とを備えている。このうち、マスタ計算機1
にはマスタ側ハードディスク装置(マスタ側外部記憶装
置)4が接続され、マスタ側ハードディスク装置4にて
マスタファイル6が保持されている。また、スレーブ計
算機2にはスレーブ側ハードディスク装置(スレーブ側
外部記憶装置)5が接続され、スレーブ側ハードディス
ク装置5にてマスタファイル6に対応するスレーブファ
イル7が保持されている。
FIG. 1 is a block diagram showing an overall configuration of a first embodiment of a file replication system according to the present invention. As shown in FIG. 1, the file replication system includes a master computer 1 and a master computer 1.
And a slave computer 2 connected to the slave computer 2 via a network (communication path) 3. Of these, master computer 1
Is connected to a master hard disk device (master external storage device) 4, and the master hard disk device 4 holds a master file 6. A slave hard disk device (slave external storage device) 5 is connected to the slave computer 2, and the slave hard disk device 5 holds a slave file 7 corresponding to the master file 6.

【0013】ここで、マスタ計算機1はマスタ側レプリ
ケーション実行部1aを有し、マスタ側ハードディスク
装置4からマスタファイル6のデータを読み出すととも
に、読み出されたマスタファイル6のデータをネットワ
ーク3を介して順次スレーブ計算機2側へ送信すること
ができるようになっている。また、スレーブ計算機2は
スレーブ側レプリケーション実行部2aを有し、マスタ
計算機1から送信されたマスタファイル6のデータとス
レーブ側ハードディスク装置5から読み出されたスレー
ブファイル7のデータとをスレーブ計算機2上でバイト
単位で比較し、この比較処理により検出された相違部分
のデータをスレーブ側ハードディスク装置5に保持され
たスレーブファイル7へ書き込む(上書きする)ことが
できるようになっている。
Here, the master computer 1 has a master-side replication execution unit 1a, reads data of the master file 6 from the master hard disk device 4, and transfers the read data of the master file 6 via the network 3. The data can be sequentially transmitted to the slave computer 2 side. Further, the slave computer 2 has a slave-side replication execution unit 2a, and stores the data of the master file 6 transmitted from the master computer 1 and the data of the slave file 7 read from the slave-side hard disk device 5 on the slave computer 2. , And the data of the different part detected by the comparison processing can be written (overwritten) to the slave file 7 held in the slave hard disk device 5.

【0014】次に、このような構成からなる本発明の第
1の実施の形態の作用について説明する。
Next, the operation of the first embodiment of the present invention having such a configuration will be described.

【0015】図1において、スレーブファイル7の内容
をマスタファイル6の内容と一致させるファイルレプリ
ケーションを行うときには、マスタ計算機1のマスタ側
レプリケーション実行部1aにより、マスタ側ハードデ
ィスク装置4からマスタファイル6のデータが読み出さ
れ、読み出されたマスタファイル6のデータがネットワ
ーク3を介して順次スレーブ計算機2側へ送信される。
In FIG. 1, when performing file replication for matching the contents of the slave file 7 with the contents of the master file 6, the master-side replication execution unit 1 a of the master computer 1 transmits the data of the master file 6 from the master-side hard disk device 4. Is read, and the read data of the master file 6 is sequentially transmitted to the slave computer 2 via the network 3.

【0016】この状態で、スレーブ計算機2のスレーブ
側レプリケーション実行部2aは、図2および図3に示
すような処理を行う。ここで、図2は本発明の第1の実
施の形態におけるスレーブ側レプリケーション実行部2
aの処理内容を説明するためのフローチャート、図3は
本発明の第1の実施の形態におけるファイル更新方法の
一例を説明するための概念図である。なおここでは、説
明を簡略化するため、ネットワーク3およびスレーブフ
ァイル7からのデータの読み出しおよび書き込みを1バ
イト単位で行う場合を例に挙げて説明するが、バッファ
等を用いて複数バイトのデータを一括して読み書きする
ことも当然可能である。
In this state, the slave-side replication execution unit 2a of the slave computer 2 performs processing as shown in FIGS. Here, FIG. 2 shows the slave-side replication execution unit 2 according to the first embodiment of the present invention.
FIG. 3 is a conceptual diagram for explaining an example of a file updating method according to the first embodiment of the present invention. Note that, here, for simplicity of explanation, a case in which reading and writing of data from the network 3 and the slave file 7 are performed in byte units will be described as an example. It is of course possible to read and write all at once.

【0017】図2および図3に示すように、スレーブ計
算機2のスレーブ側レプリケーション実行部2aにおい
ては、まず、ファイルの始端からのオフセット位置を表
す変数iに0を代入する(ステップ101)。
As shown in FIGS. 2 and 3, the slave-side replication execution unit 2a of the slave computer 2 first substitutes 0 for a variable i representing an offset position from the start of a file (step 101).

【0018】次に、変数iの値とファイルサイズ(バイ
ト数)Nとを比較し(ステップ102)、変数iの値が
N以上である場合には、処理を停止する(ステップ10
3)。
Next, the value of the variable i is compared with the file size (the number of bytes) N (step 102). If the value of the variable i is not less than N, the processing is stopped (step 10).
3).

【0019】一方、変数iの値がNより小さい場合に
は、ネットワーク3を介して送信されてきたバイト列か
ら先頭の1バイトのデータを読み出し(ステップ10
4)、この読み出されたデータを変数xに代入する(ス
テップ105)。
On the other hand, if the value of the variable i is smaller than N, the first one-byte data is read out from the byte string transmitted via the network 3 (step 10).
4) Substitute the read data for a variable x (step 105).

【0020】次に、スレーブファイル7のオフセット位
置iに格納された1バイトのデータを読み出し(ステッ
プ106)、この読み出されたデータを変数yに代入す
る(ステップ107)。
Next, 1-byte data stored at the offset position i of the slave file 7 is read (step 106), and the read data is substituted for a variable y (step 107).

【0021】その後、変数xの値と変数yの値とを比較
し、両者が同一である場合には、変数iの値を1だけ増
やしてステップ102へ戻る(ステップ109)。
Thereafter, the value of the variable x is compared with the value of the variable y. If they are the same, the value of the variable i is increased by 1 and the process returns to step 102 (step 109).

【0022】これに対し、変数xの値と変数yの値とが
異なっている場合には、変数xの値をスレーブファイル
7のオフセット位置iへ書き込み(ステップ110)、
変数iの値を1だけ増やしてステップ102へ戻る(ス
テップ109)。
On the other hand, when the value of the variable x is different from the value of the variable y, the value of the variable x is written to the offset position i of the slave file 7 (step 110).
The value of the variable i is increased by 1 and the process returns to step 102 (step 109).

【0023】このように本発明の第1の実施の形態によ
れば、マスタ計算機1から送信されたマスタファイル6
のデータとスレーブ側ハードディスク装置5から読み出
されたスレーブファイル7のデータとをスレーブ計算機
2上で比較し、この比較処理により検出された異なるバ
イトをスレーブ側ハードディスク装置5に保持されたス
レーブファイル7へ書き込むようにしている。従って、
スレーブ側ハードディスク装置5からの読み出し量は増
加するが、スレーブ側ハードディスク装置5への書き込
み量は減らすことができ、このため、ハードディスク装
置の読み出し性能が書き込み性能よりも格段に高く、か
つファイルの更新箇所が特定の場所に集中する傾向が強
いという事実を利用して、ファイルレプリケーションの
処理性能を大幅に向上させることができる。
As described above, according to the first embodiment of the present invention, the master file 6 transmitted from the master computer 1
Is compared with the data of the slave file 7 read from the slave hard disk device 5 on the slave computer 2, and the different bytes detected by this comparison processing are compared with the slave file 7 held in the slave hard disk device 5. I try to write to. Therefore,
Although the amount of data read from the slave hard disk device 5 increases, the amount of data written to the slave hard disk device 5 can be reduced. Therefore, the read performance of the hard disk device is much higher than the write performance, and the file is updated. By taking advantage of the fact that locations tend to be concentrated at specific locations, the processing performance of file replication can be significantly improved.

【0024】なお、上述した第1の実施の形態において
は、マスタファイル6のデータとスレーブファイル7の
データとの比較処理をスレーブ計算機2上で行うように
しているが、これに限らず、スレーブ側ハードディスク
装置5から読み出されたスレーブファイル7のデータを
ネットワーク3を介してスレーブ計算機2側からマスタ
計算機1側へ送信し、この送信されたスレーブファイル
7のデータとマスタ側ハードディスク装置4から読み出
されたマスタファイル6のデータとをマスタ計算機1上
で比較し、この比較処理により検出された相違部分のデ
ータをネットワーク3を介してマスタ計算機1側からス
レーブ計算機2側へ送信してスレーブ側ハードディスク
装置5に保持されたスレーブファイル7へ書き込むよう
にしてもよい。これにより、マスタ計算機1からスレー
ブ計算機2へのネットワーク3の帯域が、スレーブ計算
機2からマスタ計算機1へのネットワーク3の帯域と比
べて小さいような場合でも適切に対応することができ、
上述した第1の実施の形態と同様の作用効果を奏するこ
とが可能である。
In the above-described first embodiment, the comparison between the data in the master file 6 and the data in the slave file 7 is performed on the slave computer 2. However, the present invention is not limited to this. The data of the slave file 7 read from the side hard disk device 5 is transmitted from the slave computer 2 to the master computer 1 via the network 3, and the transmitted data of the slave file 7 and the read data from the master side hard disk device 4 are read. The data of the output master file 6 is compared on the master computer 1, and the data of the difference detected by the comparison processing is transmitted from the master computer 1 to the slave computer 2 via the network 3 and the slave The data may be written to the slave file 7 held in the hard disk device 5. This makes it possible to appropriately cope with a case where the bandwidth of the network 3 from the master computer 1 to the slave computer 2 is smaller than the bandwidth of the network 3 from the slave computer 2 to the master computer 1.
The same operation and effect as those of the first embodiment can be obtained.

【0025】なお、上述した第1の実施の形態におい
て、マスタ側レプリケーション実行部1aおよびスレー
ブ側レプリケーション実行部2aはCPU(中央演算処
理装置)上で動作するプログラムとして実現することが
できる。このようなプログラムはマスタ計算機1または
スレーブ計算機2上のメモリやハードディスク等の内部
記憶装置、およびフレキシブルディスクやCD−ROM
等の外部記憶装置のようなコンピュータ読み取り可能な
各種の記録媒体に格納され、マスタ計算機1またはスレ
ーブ計算機2上のCPUから逐次読み出されて実行され
ることにより上述したような機能を実現する。
In the above-described first embodiment, the master-side replication execution section 1a and the slave-side replication execution section 2a can be realized as programs operating on a CPU (Central Processing Unit). Such a program is stored in an internal storage device such as a memory or a hard disk on the master computer 1 or the slave computer 2, a flexible disk or a CD-ROM.
The functions described above are realized by being stored in various computer-readable recording media such as an external storage device, and sequentially read out from the CPU on the master computer 1 or the slave computer 2 and executed.

【0026】第2の実施の形態 次に、図1、図4乃至図7により、本発明によるファイ
ルレプリケーションシステムの第2の実施の形態につい
て説明する。本発明の第2の実施の形態は、比較処理に
より検出された相違部分のデータに加えて、そのデータ
を含む所定範囲のデータをスレーブ側ハードディスク装
置5に保持されたスレーブファイル7へ書き込むように
した点を除いて、他は図1乃至図3に示す第1の実施の
形態と略同一である。本発明の第2の実施の形態におい
て、上述した第1の実施の形態と同一部分には同一符号
を付して詳細な説明は省略する。
Second Embodiment Next, a second embodiment of the file replication system according to the present invention will be described with reference to FIGS. 1, 4 to 7. According to the second embodiment of the present invention, in addition to the difference data detected by the comparison processing, a predetermined range of data including the data is written to the slave file 7 held in the slave hard disk device 5. Except for this point, other parts are substantially the same as those of the first embodiment shown in FIGS. In the second embodiment of the present invention, the same portions as those in the above-described first embodiment are denoted by the same reference numerals, and detailed description is omitted.

【0027】本発明の第2の実施の形態において、図1
に示すスレーブ計算機2のスレーブ側レプリケーション
実行部2aは、マスタファイル6のデータとスレーブフ
ァイル7のデータとをスレーブ計算機2上で比較すると
きに、マスタファイル6のデータとスレーブファイル7
のデータとを始端から終端へ向けて順に比較し、この比
較処理により相違が検出されたときに、その相違部分の
データに加えて、そのデータの位置からサイズMだけ進
んだ位置までのデータをスレーブ側ハードディスク装置
5に保持されたスレーブファイル7へ書き込むことがで
きるようになっている。なお、更新範囲を規定するMの
値は、スレーブファイル7のサイズよりも小さい固定値
とすることができる。
In the second embodiment of the present invention, FIG.
When the slave-side replication execution unit 2a of the slave computer 2 compares the data of the master file 6 and the data of the slave file 7 on the slave computer 2, the data of the master file 6 and the slave file 7 are compared.
Are compared in order from the start end to the end, and when a difference is detected by this comparison processing, in addition to the data of the difference portion, the data from the position of the data to a position advanced by size M from the position of the data is compared. Writing to the slave file 7 held in the slave hard disk device 5 can be performed. Note that the value of M that defines the update range can be a fixed value smaller than the size of the slave file 7.

【0028】図1において、スレーブファイル7の内容
をマスタファイル6の内容と一致させるファイルレプリ
ケーションを行うときには、マスタ計算機1のマスタ側
レプリケーション実行部1aにより、マスタ側ハードデ
ィスク装置4からマスタファイル6のデータが読み出さ
れ、読み出されたマスタファイル6のデータがネットワ
ーク3を介して順次スレーブ計算機2側へ送信される。
In FIG. 1, when performing file replication for matching the contents of the slave file 7 with the contents of the master file 6, the master-side replication execution unit 1 a of the master computer 1 transmits the data of the master file 6 from the master-side hard disk device 4. Is read, and the read data of the master file 6 is sequentially transmitted to the slave computer 2 via the network 3.

【0029】この状態で、スレーブ計算機2のスレーブ
側レプリケーション実行部2aは、図4および図5に示
すような処理を行う。ここで、図4は本発明の第2の実
施の形態におけるスレーブ側レプリケーション実行部2
aの処理内容を説明するためのフローチャート、図5は
本発明の第2の実施の形態におけるファイル更新方法の
一例を説明するための概念図である。なおここでは、説
明を簡略化するため、ネットワーク3およびスレーブフ
ァイル7からのデータの読み出しおよび書き込みを1バ
イト単位で行う場合を例に挙げて説明するが、バッファ
等を用いて複数バイトのデータを一括して読み書きする
ことも当然可能である。
In this state, the slave-side replication execution unit 2a of the slave computer 2 performs processing as shown in FIGS. Here, FIG. 4 shows the slave-side replication execution unit 2 according to the second embodiment of the present invention.
FIG. 5 is a conceptual diagram for explaining an example of a file updating method according to the second embodiment of the present invention. Note that, here, for simplicity of explanation, a case in which reading and writing of data from the network 3 and the slave file 7 are performed in byte units will be described as an example. It is of course possible to read and write all at once.

【0030】図4および図5に示すように、スレーブ計
算機2のスレーブ側レプリケーション実行部2aにおい
ては、まず、ファイルの始端からのオフセット位置を表
す変数iに0を代入する(ステップ201)。
As shown in FIGS. 4 and 5, the slave-side replication execution unit 2a of the slave computer 2 first substitutes 0 for a variable i representing an offset position from the beginning of a file (step 201).

【0031】次に、変数iの値とファイルサイズ(バイ
ト数)Nとを比較し(ステップ202)、変数iの値が
N以上である場合には、処理を停止する(ステップ20
3)。
Next, the value of the variable i is compared with the file size (the number of bytes) N (step 202). If the value of the variable i is not less than N, the processing is stopped (step 20).
3).

【0032】一方、変数iの値がNより小さい場合に
は、ネットワーク3を介して送信されてきたバイト列か
ら先頭の1バイトのデータを読み出し(ステップ20
4)、この読み出されたデータを変数xに代入する(ス
テップ205)。
On the other hand, when the value of the variable i is smaller than N, the first one-byte data is read from the byte string transmitted via the network 3 (step 20).
4) Substitute the read data into a variable x (step 205).

【0033】次に、スレーブファイル7のオフセット位
置iに格納された1バイトのデータを読み出し(ステッ
プ206)、この読み出されたデータを変数yに代入す
る(ステップ207)。
Next, 1-byte data stored at the offset position i of the slave file 7 is read (step 206), and the read data is substituted for a variable y (step 207).

【0034】その後、変数xの値と変数yの値とを比較
し、両者が同一である場合には、変数iの値を1だけ増
やしてステップ202へ戻る(ステップ209)。
Thereafter, the value of the variable x is compared with the value of the variable y. If they are the same, the value of the variable i is increased by 1 and the process returns to step 202 (step 209).

【0035】これに対し、変数xの値と変数yの値とが
異なっている場合には、ネットワーク3を介して送信さ
れてきたバイト列の先頭から、さらに(M−1)バイト
のデータを読み出し(ステップ210)、この読み出さ
れたデータを配列x′のx′[1]からx′[M−1]
へ代入するとともに、変数xの値を配列x′[0]へ代
入する(ステップ211)。
On the other hand, when the value of the variable x is different from the value of the variable y, (M-1) bytes of data are further transferred from the head of the byte string transmitted via the network 3. Reading (step 210), the read data is converted from x '[1] to x' [M-1] of the array x '.
And assigns the value of the variable x to the array x '[0] (step 211).

【0036】その後、配列x′のx′[0]からx′
[M−1]までのMバイトのデータを一括してスレーブ
ファイル7のオフセット位置iへ書き込み(ステップ2
12)、変数iの値をMだけ増やしてステップ202へ
戻る(ステップ213)。
Then, from x '[0] to x' of the array x '
M bytes of data up to [M-1] are collectively written to the offset position i of the slave file 7 (step 2).
12), increase the value of the variable i by M, and return to step 202 (step 213).

【0037】このように本発明の第2の実施の形態によ
れば、マスタファイル6のデータとスレーブファイル7
のデータとをスレーブ計算機2上で比較するときに、マ
スタファイル6のデータとスレーブファイル7のデータ
とを始端から終端へ向けて順に比較し、この比較処理に
より相違が検出されたときに、その相違部分のデータに
加えて、そのデータの位置からサイズMだけ進んだ位置
までのデータをスレーブ側ハードディスク装置5に保持
されたスレーブファイル7へ書き込むようにしている。
従って、スレーブファイル7の更新箇所が多量に生じた
ような場合でも、比較処理の回数、およびスレーブ側ハ
ードディスク装置5へのアクセス回数(書き込み回数お
よび読み出し回数)を効果的に減らすことができ、この
ため、ファイルレプリケーションの性能をより向上させ
ることができる。
As described above, according to the second embodiment of the present invention, the data of the master file 6 and the slave file 7
Are compared on the slave computer 2 with the data of the master file 6 and the data of the slave file 7 in order from the start end to the end. When a difference is detected by this comparison processing, In addition to the data of the different part, the data from the position of the data to the position advanced by the size M is written to the slave file 7 held in the slave hard disk device 5.
Therefore, even when a large number of updated portions of the slave file 7 occur, the number of times of the comparison process and the number of times of access to the slave side hard disk device 5 (the number of times of writing and the number of times of reading) can be effectively reduced. Therefore, the performance of file replication can be further improved.

【0038】なお、上述した第2の実施の形態において
は、更新範囲を規定するMの値を固定値としているが、
これに限らず、スレーブファイル7の更新頻度に応じて
Mの値を可変とするようにしてもよい。具体的には例え
ば、スレーブファイル7の更新頻度が多くなるにつれて
Mの値を大きくし、スレーブファイル7の更新頻度が少
なくなるにつれてMの値を小さくするようにすることが
できる。
In the above-described second embodiment, the value of M defining the update range is fixed.
The present invention is not limited to this, and the value of M may be made variable according to the update frequency of the slave file 7. Specifically, for example, the value of M can be increased as the update frequency of the slave file 7 increases, and the value of M can be decreased as the update frequency of the slave file 7 decreases.

【0039】また、上述した第2の実施の形態において
は、比較処理により相違が検出されたときに、その相違
部分のデータに加えて、そのデータの位置からサイズM
だけ進んだ位置までのデータをスレーブ側ハードディス
ク装置5に保持されたスレーブファイル7へ書き込むよ
うにしているが、これに限らず、任意のファイル更新方
法を採用することができる。
In the above-described second embodiment, when a difference is detected by the comparison processing, in addition to the data of the difference, the size M is determined from the position of the data.
Although the data up to the position advanced by only one is written in the slave file 7 held in the slave hard disk device 5, the present invention is not limited to this, and any file updating method can be adopted.

【0040】具体的には例えば、図6に示すように、マ
スタファイル6のデータとスレーブファイル7のデータ
とを始端から終端へ向けて順に比較し、この比較処理に
より相違が検出されたときに、そのファイルに関しては
それ以上の比較処理を行うことなく、その相違部分のデ
ータに加えて、そのデータの位置から終端の位置までの
データをスレーブ側外部ハードディスク装置5に保持さ
れたスレーブファイル7へ書き込むようにすることがで
きる。
Specifically, for example, as shown in FIG. 6, the data of the master file 6 and the data of the slave file 7 are sequentially compared from the start end to the end, and when a difference is detected by this comparison processing, The data from the position of the data to the end position is added to the slave file 7 held in the slave-side external hard disk drive 5 in addition to the data of the difference, without performing further comparison processing on the file. Can be written.

【0041】また、図7に示すように、サイズNのファ
イルをあらかじめサイズMのブロックの並びであるとみ
なし、マスタファイル6のデータとスレーブファイル7
のデータとをサイズMのブロックごとに比較し、この比
較処理により相違が検出されたときに、そのブロックに
関してはそれ以上の比較処理を行うことなく、その相違
部分のデータに加えて、そのデータの位置からブロック
内の最後の位置までのデータをスレーブ側ハードディス
ク装置5に保持されたスレーブファイル7へ書き込むよ
うにすることができる。
As shown in FIG. 7, a file of size N is regarded as a sequence of blocks of size M in advance, and the data of the master file 6 and the slave file 7 are stored.
Is compared for each block of size M, and when a difference is detected by this comparison processing, the block is subjected to the data in addition to the data of the difference without further comparison processing. The data from the position to the last position in the block can be written to the slave file 7 held in the slave hard disk device 5.

【0042】[0042]

【発明の効果】以上説明したように本発明によれば、ス
レーブ側外部記憶装置への書き込み量は減らすことがで
き、このため、外部記憶装置の読み出し性能が書き込み
性能よりも格段に高く、かつファイルの更新箇所が特定
の場所に集中する傾向が強いという事実を利用して、フ
ァイルレプリケーションの処理性能を大幅に向上させる
ことができる。また、マスタファイルのデータとスレー
ブファイルのデータとを比較処理により相違が検出され
たときに、その相違部分のデータに加えて、そのデータ
を含む所定範囲のデータをスレーブ側外部記憶装置に保
持されたスレーブファイルへ書き込むことにより、スレ
ーブファイルの更新箇所が多量に生じたような場合で
も、比較処理の回数、およびスレーブ側外部記憶装置へ
のアクセス回数(書き込み回数および読み出し回数)を
効果的に減らすことができ、このため、ファイルレプリ
ケーションの性能をより向上させることができる。
As described above, according to the present invention, the amount of writing to the slave-side external storage device can be reduced, so that the read performance of the external storage device is much higher than the write performance, and By taking advantage of the fact that file update locations tend to be concentrated at specific locations, the processing performance of file replication can be significantly improved. When a difference between the master file data and the slave file data is detected by the comparison process, in addition to the difference data, a predetermined range of data including the data is held in the slave external storage device. By writing to a slave file, the number of times of comparison processing and the number of times of access to the slave-side external storage device (the number of times of writing and the number of times of reading) can be effectively reduced even when a large number of updated portions of the slave file occur. Therefore, the performance of file replication can be further improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明によるファイルレプリケーションシステ
ムの第1および第2の実施の形態の全体構成を示すブロ
ック図。
FIG. 1 is a block diagram showing an overall configuration of a file replication system according to first and second embodiments of the present invention.

【図2】本発明によるファイルレプリケーションシステ
ムの第1の実施の形態の作用を説明するためのフローチ
ャート。
FIG. 2 is a flowchart for explaining the operation of the first embodiment of the file replication system according to the present invention.

【図3】本発明によるファイルレプリケーションシステ
ムの第1の実施の形態におけるファイル更新方法の一例
を説明するための概念図。
FIG. 3 is a conceptual diagram for explaining an example of a file updating method in the first embodiment of the file replication system according to the present invention.

【図4】本発明によるファイルレプリケーションシステ
ムの第2の実施の形態の作用を説明するためのフローチ
ャート。
FIG. 4 is a flowchart for explaining the operation of the second embodiment of the file replication system according to the present invention.

【図5】本発明によるファイルレプリケーションシステ
ムの第2の実施の形態におけるファイル更新方法の一例
を説明するための概念図。
FIG. 5 is a conceptual diagram illustrating an example of a file update method in a second embodiment of the file replication system according to the present invention.

【図6】図5に示すファイル更新方法の変形例を説明す
るための概念図。
FIG. 6 is a conceptual diagram for explaining a modification of the file updating method shown in FIG. 5;

【図7】図5に示すファイル更新方法の別の変形例を説
明するための概念図。
FIG. 7 is a conceptual diagram for explaining another modified example of the file updating method shown in FIG. 5;

【符号の説明】[Explanation of symbols]

1 マスタ計算機 1a マスタ側レプリケーション実行部 2 スレーブ計算機 2a スレーブ側レプリケーション実行部 3 ネットワーク(通信路) 4 マスタ側ハードディスク装置(マスタ側外部記憶装
置) 5 スレーブ側ハードディスク装置(スレーブ側外部記
憶装置) 6 マスタファイル 7 スレーブファイル
Reference Signs List 1 master computer 1a master-side replication execution unit 2 slave computer 2a slave-side replication execution unit 3 network (communication path) 4 master-side hard disk device (master-side external storage device) 5 slave-side hard disk device (slave-side external storage device) 6 master File 7 Slave file

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】マスタ計算機と、 前記マスタ計算機に接続された外部記憶装置であってマ
スタファイルを保持するマスタ側外部記憶装置と、 前記マスタ計算機に通信路を介して接続されたスレーブ
計算機と、 前記スレーブ計算機に接続された外部記憶装置であって
前記マスタファイルに対応するスレーブファイルを保持
するスレーブ側外部記憶装置とを備え、 前記スレーブファイルの内容を前記マスタファイルの内
容と一致させるファイルレプリケーションを行うとき
に、前記マスタファイルおよび前記スレーブファイルの
データをそれぞれ前記マスタ側外部記憶装置および前記
スレーブ側外部記憶装置から読み出すとともに、読み出
された前記マスタファイルのデータと前記スレーブファ
イルのデータとを比較し、この比較処理により検出され
た相違部分のデータを前記スレーブ側外部記憶装置に保
持されたスレーブファイルへ書き込むことを特徴とする
ファイルレプリケーションシステム。
A master computer; an external storage device connected to the master computer, the master external storage device holding a master file; a slave computer connected to the master computer via a communication path; An external storage device connected to the slave computer, comprising: a slave-side external storage device that holds a slave file corresponding to the master file; and performing file replication for matching the content of the slave file with the content of the master file. When performing, the data of the master file and the slave file are read from the master-side external storage device and the slave-side external storage device, respectively, and the read master file data and the read slave file data are compared. And the comparison process detects A file replication system, wherein the data of the different part is written to a slave file held in the slave external storage device.
【請求項2】前記マスタ側外部記憶装置から読み出され
た前記マスタファイルのデータを前記通信路を介して前
記マスタ計算機側から前記スレーブ計算機側へ送信し、
この送信された前記マスタファイルのデータと前記スレ
ーブ側外部記憶装置から読み出された前記スレーブファ
イルのデータとを前記スレーブ計算機上で比較し、この
比較処理により検出された相違部分のデータを前記スレ
ーブ側外部記憶装置に保持されたスレーブファイルへ書
き込むことを特徴とする請求項1記載のファイルレプリ
ケーションシステム。
2. The data of the master file read from the external storage device on the master side is transmitted from the master computer side to the slave computer side via the communication path,
The transmitted master file data and the slave file data read from the slave external storage device are compared on the slave computer, and the difference data detected by the comparison process is compared with the slave data. 2. The file replication system according to claim 1, wherein writing is performed to a slave file held in the external storage device.
【請求項3】前記スレーブ側外部記憶装置から読み出さ
れた前記スレーブファイルのデータを前記通信路を介し
て前記スレーブ計算機側から前記マスタ計算機側へ送信
し、この送信された前記スレーブファイルのデータと前
記マスタ側外部記憶装置から読み出された前記マスタフ
ァイルのデータとを前記マスタ計算機上で比較し、この
比較処理により検出された相違部分のデータを前記通信
路を介して前記マスタ計算機側から前記スレーブ計算機
側へ送信して前記スレーブ側外部記憶装置に保持された
スレーブファイルへ書き込むことを特徴とする請求項1
記載のファイルレプリケーションシステム。
3. The slave file data read from the slave external storage device is transmitted from the slave computer side to the master computer side via the communication path, and the transmitted data of the slave file is transmitted. And the data of the master file read from the external storage device on the master side are compared on the master computer, and the data of the difference detected by the comparison process is transmitted from the master computer side via the communication path. 2. The method according to claim 1, wherein the data is transmitted to the slave computer and written into a slave file held in the slave external storage device.
The described file replication system.
【請求項4】前記比較処理により検出された相違部分の
データを含む所定範囲のデータを前記スレーブ側外部記
憶装置に保持されたスレーブファイルへ書き込むことを
特徴とする請求項1記載のファイルレプリケーションシ
ステム。
4. The file replication system according to claim 1, wherein a predetermined range of data including the data of the different portion detected by said comparison processing is written to a slave file held in said slave external storage device. .
【請求項5】前記比較処理において前記マスタファイル
のデータと前記スレーブファイルのデータとを始端から
終端へ向けて順に比較し、この比較処理により相違が検
出されたときに、その相違部分のデータに加えて、その
データの位置から所定サイズだけ進んだ位置までのデー
タを前記スレーブ側外部記憶装置に保持されたスレーブ
ファイルへ書き込むことを特徴とする請求項1記載のフ
ァイルレプリケーションシステム。
5. The comparison processing compares the data of the master file and the data of the slave file in order from the start end to the end, and when a difference is detected by the comparison processing, the data of the difference part is added. 2. The file replication system according to claim 1, further comprising: writing data up to a position advanced by a predetermined size from the position of the data to a slave file held in the slave-side external storage device.
【請求項6】前記比較処理において前記マスタファイル
のデータと前記スレーブファイルのデータとを始端から
終端へ向けて順に比較し、この比較処理により相違が検
出されたときに、その相違部分のデータに加えて、その
データの位置から終端の位置までのデータを前記スレー
ブ側外部記憶装置に保持されたスレーブファイルへ書き
込むことを特徴とする請求項1記載のファイルレプリケ
ーションシステム。
6. The comparison process compares the data of the master file and the data of the slave file in order from the start end to the end, and when a difference is detected by the comparison process, the data of the difference portion is added. 2. The file replication system according to claim 1, wherein data from the data position to the end position is written to a slave file held in the slave-side external storage device.
【請求項7】前記比較処理において前記マスタファイル
のデータと前記スレーブファイルのデータとを所定サイ
ズのブロックごとに比較し、この比較処理により相違が
検出されたときに、その相違部分のデータに加えて、そ
のデータの位置からブロック内の最後の位置までのデー
タを前記スレーブ側外部記憶装置に保持されたスレーブ
ファイルへ書き込むことを特徴とする請求項1記載のフ
ァイルレプリケーションシステム。
7. The comparison processing compares the data of the master file with the data of the slave file for each block of a predetermined size, and when a difference is detected by the comparison processing, adds the data of the difference. 2. The file replication system according to claim 1, wherein data from the data position to the last position in the block is written to a slave file held in the slave external storage device.
JP11205142A 1999-07-19 1999-07-19 File replication system Pending JP2001034517A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11205142A JP2001034517A (en) 1999-07-19 1999-07-19 File replication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11205142A JP2001034517A (en) 1999-07-19 1999-07-19 File replication system

Publications (1)

Publication Number Publication Date
JP2001034517A true JP2001034517A (en) 2001-02-09

Family

ID=16502127

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11205142A Pending JP2001034517A (en) 1999-07-19 1999-07-19 File replication system

Country Status (1)

Country Link
JP (1) JP2001034517A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG125107A1 (en) * 2003-02-28 2006-09-29 Microsoft Corp Method for managing file replication in applications
JP2010092239A (en) * 2008-10-07 2010-04-22 Alpine Electronics Inc File system managing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG125107A1 (en) * 2003-02-28 2006-09-29 Microsoft Corp Method for managing file replication in applications
JP2010092239A (en) * 2008-10-07 2010-04-22 Alpine Electronics Inc File system managing apparatus

Similar Documents

Publication Publication Date Title
CN113721967B (en) Differential packet generation method, differential packet generation device, and upgrade method
US5276840A (en) Disk caching method for writing data from computer memory including a step of writing a plurality of physically adjacent blocks in a single I/O operation
US6018747A (en) Method for generating and reconstructing in-place delta files
US6735642B2 (en) DMA doorbell
US8977802B2 (en) Access device, information recording device, controller, real time information recording system, access method, and program
JP2013532853A (en) Storage apparatus and data control method
CN108027753A (en) On-vehicle control apparatus, program updating system and program renewal software
US6675257B1 (en) System and method for managing storage space on a sequential storage media
JPS63163930A (en) Alignment correction system
JP2002251310A (en) File system creation method for flash memory
US6654856B2 (en) System and method for managing storage space of a cache
WO2024001863A9 (en) Data processing method and related device
KR20060017816A (en) Method and device for transferring data between main memory and storage device
JP2001034517A (en) File replication system
CN112346771B (en) Upgrade file generation method and device
JP6439874B2 (en) Information processing apparatus, information processing method, and information processing program
JP3667585B2 (en) Distributed memory type parallel computer and its data transfer completion confirmation method
CN116301602B (en) Data recording or reading method, device, collection equipment, vehicle and medium
US11237770B2 (en) Storage system and queue control method of storage system
JP3133991B2 (en) Data transfer method and data transfer system
US7536507B1 (en) Methods, systems, and computer program products for preserving atomic writes using leaves and bitmaps
JP2003099297A (en) File distribution system and method, program and recording medium
US20050015412A1 (en) Method to maintain data integrity during flash file transfer to raid controller flash using a terminal emulation program
JPS5953579B2 (en) character compression device
TW202536629A (en) Method for upgrading program and program upgrading device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040910

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070928

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071119

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080125