JP5002296B2 - Cluster system and program - Google Patents
Cluster system and program Download PDFInfo
- Publication number
- JP5002296B2 JP5002296B2 JP2007081623A JP2007081623A JP5002296B2 JP 5002296 B2 JP5002296 B2 JP 5002296B2 JP 2007081623 A JP2007081623 A JP 2007081623A JP 2007081623 A JP2007081623 A JP 2007081623A JP 5002296 B2 JP5002296 B2 JP 5002296B2
- Authority
- JP
- Japan
- Prior art keywords
- area
- server machine
- data
- master
- input
- 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
Links
Images
Description
本発明は、複数のサーバマシンと共有ディスク装置とから構成されたクラスタシステム及びプログラムに関し、特に、フェールオーバが発生した場合であっても、共有ディスク装置内のデータの整合を図ることが可能なクラスタシステム及びプログラムに関する。 The present invention relates to a cluster system and a program composed of a plurality of server machines and a shared disk device, and in particular, a cluster capable of matching data in the shared disk device even when a failover occurs. The present invention relates to a system and a program.
例えば、非特許文献1で開示されているクラスタシステムでは、図16に示すように、稼動系のサーバマシン10(#A)と待機系のサーバマシン10(#B)とが設けられ、稼動系のサーバマシン10(#A)がアプリケーション11(#A)を実行し、(i)に示すように、実行結果であるデータを共有ディスク装置13に書き込む。その間、(ii)に示すように、稼動系のサーバマシン10(#A)のクラスタソフト12(#A)と待機系のサーバマシン10(#B)のクラスタソフト12(#B)とは、通信路14を経由して、ハートビートaと呼ばれる所定のパケット交換をし続け、互いの生存を通知し合う。
For example, in the cluster system disclosed in Non-Patent Document 1, an active server machine 10 (#A) and a standby server machine 10 (#B) are provided as shown in FIG. The server machine 10 (#A) executes the application 11 (#A), and writes data as an execution result to the shared
そして、待機系のサーバマシン10(#B)がハートビートaの断絶を検出した場合に、(iii)に示すように、待機系のサーバマシン10(#B)で同一のアプリケーション11(#B)を起動させることでアプリケーション処理を継続させる、所謂フェールオーバbが一般に行われている。 When the standby server machine 10 (#B) detects the disconnection of the heartbeat a, as shown in (iii), the same application 11 (#B) is stored in the standby server machine 10 (#B). In general, so-called failover b is performed in which application processing is continued by activating.
ハートビートaが断絶する理由としては主に以下がある。
(1)稼動系のサーバマシン10(#A)のダウン。
(2)通信路14の障害。
(3)稼動系のサーバマシン10(#A)におけるCPU高負荷等による一時的なスローダウンの発生。
The main reasons for the heartbeat a breaking are as follows.
(1) The active server machine 10 (#A) is down.
(2) A failure of the
(3) Temporary slowdown due to high CPU load or the like in the active server machine 10 (#A).
上記(1)の場合であれば、単純に待機系のサーバマシン10(#B)にフェールオーバbすれば良いが、上記(2)及び(3)の場合には稼動系のサーバマシン10(#A)が処理を継続するため、フェールオーバbしてしまうと以下に示すような不都合が生じる。 In the case of (1) above, failover b should simply be performed on the standby server machine 10 (#B), but in the cases (2) and (3), the active server machine 10 (# Since A) continues the processing, the following inconvenience occurs when failover b occurs.
すなわち、図16に示すように、複数台のサーバマシン10(#A,#B)が同一の共有ディスク装置13に接続された状態でクラスタ構成を組む場合、上記(2)及び(3)が原因のハートビートaの断絶によりフェールオーバbが行われると、図17に示すように、稼動系のサーバマシン10(#A)と待機系のサーバマシン10(#B)との両系が共有ディスク装置13内の同一のデータ領域15に書き込みを行う可能性があり、その場合、共有ディスク装置13内のデータの整合性が失われ、データが破壊されてしまう恐れがある。
That is, as shown in FIG. 16, when a cluster configuration is formed with a plurality of server machines 10 (#A, #B) connected to the same shared
このため、従来のクラスタシステムでも、この不都合に対する対策が幾つか施されている。以下、この対策を施した従来技術を2つ紹介する。 For this reason, some countermeasures against this inconvenience are taken even in the conventional cluster system. Two conventional technologies that have taken this measure are introduced below.
第1の従来技術は、上記(1)乃至(3)に対処するものであり、SCSI仕様として定義されているリザーブ排他機能が使用され、1つのLU(Logical Unit)につきI/O(readやwrite)を発行可能なサーバが1つに絞られている。つまり、図18の(i)に示すようにハートビートa切れが検出され、(ii)に示すように待機系のサーバマシン10(#B)にフェールオーバbする際、(iii)に示すように待機系のサーバマシン10(#B)が共有ディスク装置13内の対象LUをリザーブし、(iv)に示すように稼動系のサーバマシン10(#A)がそれ以上対象LUに書き込みを行うのを防いでから、アプリケーション11(#B)を起動し、(v)に示すように共有ディスク装置13への書き込みを行うようにしている。
The first prior art deals with the above (1) to (3), uses the reserve exclusive function defined as the SCSI specification, and uses one I / O (read or other) per LU (Logical Unit). The number of servers that can issue (write) is limited to one. That is, when a heartbeat a break is detected as shown in (i) of FIG. 18 and failover b is performed to the standby server machine 10 (#B) as shown in (ii), as shown in (iii) The standby server machine 10 (#B) reserves the target LU in the shared
第2の従来技術は、上記(1)及び(2)に対処するものであり、図19に示すように、QUORUM用領域17と呼ばれる特殊なLUを共有ディスク装置13内に設け、(iii)に示すように、クラスタを構成するサーバマシン10(#A,#B)からその時々の現在時刻を定期的に書き込むことで、(i)に示すハートビートa以外にサーバマシン10(#A,#B)の状態を監視する。
The second prior art deals with the above (1) and (2). As shown in FIG. 19, a special LU called a
第2の従来技術によれば、通信路14の障害が理由で待機系のサーバマシン10(#B)がハートビートa断絶を確認した場合でも、待機系のサーバマシン10(#B)がQUORUM用領域17を参照する。QUORUM用領域17は、通信路14に障害があっても参照可能であるので、稼動系のサーバマシン10(#A)が現在時刻のwriteを継続していることを確認することができ、稼動系のサーバマシン10(#A)がダウンしていないことを知ることができる。
しかしながら、このような従来のクラスタシステムでは、以下のような問題がある。 However, such a conventional cluster system has the following problems.
まず、第1の従来技術の場合、図18の(iii)及び(iv)に示すようなリザーブ排他が可能な否かは、共有ディスク装置13や、そのマルチパスドライバ(図示せず)の実装に依存するという問題がある。そのため、新しい共有ディスク装置13やそのマルチパスドライバに対応するためには、毎回検証することが必要になる。また、共有ディスク装置13やそのマルチパスドライバによって、細かな制限事項が付きがちである。例えば、ある共有ディスク装置13では、ディスクI/Oの物理的なパスが多重化されている環境で片パス障害が起きると、リザーブが維持されない状態に陥ってしまい、排他できなくなってしまう。
First, in the case of the first prior art, whether or not reserve exclusion as shown in (iii) and (iv) of FIG. 18 is possible is determined by mounting the shared
また、第2の従来技術の場合、例えば、図20に示すように、(i)稼動系のサーバマシン10(#A)がwrite中にCPU高負荷に陥りスローダウンしてしまった場合には、(ii)待機系のサーバマシン10(#B)はハートビートa切れを検出し、稼動系のサーバマシン10(#A)がダウンしたと思ってしまい、(iii)フェールオーバbを実施してしまう。これにより、(iv)待機系のサーバマシン10(#B)は、QUORUM用領域17に現在時刻を書き込むとともに、(v)アプリケーションデータ用領域18のデータ領域15にデータをwriteする。
In the case of the second prior art, for example, as shown in FIG. 20, when (i) the active server machine 10 (#A) falls into a high CPU load during write and slows down. (Ii) The standby server machine 10 (#B) detects that the heartbeat a has expired and thinks that the active server machine 10 (#A) has gone down, and (iii) performs failover b End up. Thus, (iv) the standby server machine 10 (#B) writes the current time in the
一方、(vi)稼動系のサーバマシン10(#A)も停止した訳ではないので、スローダウンした状態でQUORUM用領域17に現在時刻を書き込むとともに、(vii)復帰直後から、アプリケーションデータ用領域18のデータ領域15へのデータのwriteを継続する。
On the other hand, since (vi) the active server machine 10 (#A) is not stopped, the current time is written in the
このように、稼動系のサーバマシン10(#A)がスローダウンから復帰した直後に、両サーバから同じLUへの書き込みが行われ、データ破壊が発生する可能性があるという問題がある。 In this way, immediately after the active server machine 10 (#A) recovers from the slowdown, there is a problem in that data is written to the same LU from both servers and data corruption may occur.
本発明はこのような事情に鑑みてなされたものであり、複数のサーバマシンと共有ディスク装置とから構成されたクラスタシステムにおいて、共有ディスク装置やそのマルチパスドライバの実装に依存せずにリザーブ排他が可能であり、かつ、フェールオーバが発生した場合であっても、複数のサーバマシンの書き込みによるデータ破損を発生させることなく、共有ディスク装置内のデータの整合を図ることが可能なクラスタシステム及びプログラムを提供することを目的とする。 The present invention has been made in view of such circumstances, and in a cluster system composed of a plurality of server machines and a shared disk device, reserved exclusive use is not required without depending on the implementation of the shared disk device and its multipath driver. Cluster system and program capable of matching data in a shared disk device without causing data corruption due to writing in a plurality of server machines even when failover occurs The purpose is to provide.
上記の目的を達成するために、本発明では、以下のような手段を講じる。 In order to achieve the above object, the present invention takes the following measures.
すなわち、請求項1の発明は、複数のサーバマシンと、複数のサーバマシンに接続された共有ディスク装置とから構成されたクラスタシステムであって、複数のサーバマシンは、複数のサーバマシン上でそれぞれ動作するアプリケーションと、複数のサーバマシン上でそれぞれ動作するクラスタソフトと、複数のサーバマシン上でそれぞれ動作するフィルタドライバとを備え、共有ディスク装置は、アプリケーションのデータを格納するマスター領域と、各サーバマシンのデータを格納する各サーバ用領域と、各サーバマシンで共有する共通領域とを備え、各サーバ用領域は、それぞれデータを格納するためのキャッシュ領域及びパッチ領域を備え、共通領域は、キャッシュ領域に格納されたデータの、マスター領域へのコピー許可であるコミット権が付与されたサーバマシンを規定したコミット権管理部を備え、複数のサーバマシンに備えられた各クラスタソフトは、互いに定期的に通信して互いの生存状態を確認し合うと共に、それぞれ稼動系と待機系との2種類の状態を持っている。 That is, the invention of claim 1 is a cluster system including a plurality of server machines and a shared disk device connected to the plurality of server machines, and the plurality of server machines are respectively connected to the plurality of server machines. The shared disk device includes an application that operates, cluster software that operates on each of a plurality of server machines, and a filter driver that operates on each of the plurality of server machines. Each server area includes a server area for storing machine data and a common area shared by each server machine. Each server area includes a cache area and a patch area for storing data, and the common area includes a cache area. Copy permission for copying data stored in the area to the master area The cluster software provided in the multiple server machines communicates with each other periodically to check each other's survival status, and includes the commit right management unit that defines the server machines to which the server rights are granted. There are two types of states, active and standby.
そして、クラスタソフトが稼動系の場合には、クラスタソフトは、コミット権管理部を変更して自サーバマシンのみにコミット権が付与されるようにし、自サーバマシン側からマスター領域が見える状態にし、自サーバマシンに備えられたアプリケーションを起動させる。また、自サーバマシンに備えられたフィルタドライバは、I/O入力を待ち、I/O入力がマスター領域への読取要求だった場合には、読取要求データの一部または全部が自サーバマシン用のキャッシュ領域にあればキャッシュ領域から読み取り、読取要求データが他にもあればマスター領域から読み取り、読み取ったデータを、読取要求をしたI/O入力側に返し、I/O入力がマスター領域への書込要求だった場合であり、自サーバマシン用のキャッシュ領域に書き込むための空き容量がなく、自サーバマシンにコミット権が付与されているのであれば、キャッシュ領域のデータをマスター領域にコピーしてキャッシュ領域をクリアし、自サーバマシンにコミット権が付与されていないのであれば書込要求をしたI/O入力側にエラーを返し、しかる後にマスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込み、この書き込み結果を書込要求をしたI/O入力側に返し、I/O入力がマスター領域への読取要求でも書込要求でもない場合には、自サーバマシンに備えられたフィルタドライバの下位側にI/O入力によるデータを受け渡し、返り値をI/O入力側へ返す。 When the cluster software is active, the cluster software changes the commit right management unit so that the commit right is given only to the own server machine, and the master area is visible from the own server machine side. Start the application provided on the local server machine. Also, the filter driver provided in the own server machine waits for I / O input, and when the I / O input is a read request to the master area, part or all of the read request data is for the own server machine. Read from the cache area if there is any other read request data, read from the master area if there is any other read request data, return the read data to the I / O input side that requested the read, and the I / O input to the master area If there is no free space to write to the cache area for the local server machine and the commit right is granted to the local server machine, the cache area data is copied to the master area. Clear the cache area, and if the commit right is not granted to the local server machine, an error will be sent to the I / O input side that made the write request. Thereafter, the write position information and the written data in the master area are written in the cache area for the own server machine, and this write result is returned to the I / O input side that requested the write, and the I / O input is the master area. If the request is neither a read request nor a write request, the I / O input data is transferred to the lower side of the filter driver provided in the server machine, and the return value is returned to the I / O input side.
一方、クラスタソフトが待機系の場合であって、待機系のクラスタソフトが、稼動系のクラスタソフトが生存していないと判定した場合には、判定したクラスタソフトは、コミット権管理部を変更して自サーバマシンにのみコミット権が付与されるようにし、稼動系のクラスタソフトが備えられているサーバマシン用のキャッシュ領域のデータを自サーバマシン用のパッチ領域にコピーしてパッチ領域をマスター領域の一部として代用し、自サーバマシン側からマスター領域が見えるようにし、自サーバマシンに備えられたアプリケーションを起動する。そして、自サーバマシン上に備えられたフィルタドライバは、自サーバマシンに備えられたクラスタソフトが稼動系になった後、I/O入力を待ち、I/O入力がマスター領域への読取要求だった場合には、読取要求データの一部または全部が自サーバマシン用のパッチ領域にあればパッチ領域から読み取り、読取要求データの一部または全部が自サーバマシン用のキャッシュ領域にあればキャッシュ領域から読み取り、読取要求データが他にもあればマスター領域から読み取り、読み取ったデータを、読取要求したI/O入力側に返し、I/O入力がマスター領域への書込要求だった場合には、書込要求先の全部が自サーバマシン用のパッチ領域にあればパッチ領域に書き込んでI/O入力側に返し、そうでない場合にはパッチ領域に該当するデータのみをパッチ領域に書き込み、自サーバマシン用のキャッシュ領域に書き込むための空き容量が無ければコミット権管理部を参照して自サーバマシンにコミット権が付与されているか否かを確認し、付与されているならマスター領域に自サーバマシン用のキャッシュ領域のデータをコピーしてキャッシュ領域をクリアし、付与されていないならI/O入力側にエラーを返し、しかる後にマスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込み、I/O入力側に返し、I/O入力がマスター領域への読取要求でも書込要求でもない場合には、自サーバマシンに備えられたフィルタドライバの下位層にI/O入力によるデータを受け渡し、返り値をI/O入力側へ返す。 On the other hand, if the cluster software is the standby system and the standby cluster software determines that the active cluster software is not alive, the determined cluster software changes the commit right management unit. The commit right is granted only to the local server machine, and the data in the cache area for the server machine equipped with the active cluster software is copied to the patch area for the local server machine, and the patch area becomes the master area. As an alternative, the master area can be seen from the server machine side, and the application provided on the server machine is started. The filter driver provided on the local server machine waits for I / O input after the cluster software provided on the local server machine becomes active, and the I / O input is a read request to the master area. If part or all of the read request data is in the patch area for the local server machine, it is read from the patch area, and if part or all of the read request data is in the cache area for the local server machine, the cache area is read. If there is any other read request data read from the master area, the read data is returned to the I / O input side that requested the read, and if the I / O input is a write request to the master area If all the write request destinations are in the patch area for the local server machine, write to the patch area and return to the I / O input side; otherwise, it corresponds to the patch area If there is no free space to write only the data to the patch area and write to the cache area for the local server machine, refer to the commit right management unit to check whether the commit right is granted to the local server machine. If it is assigned, the cache area data for the local server machine is copied to the master area to clear the cache area. If not assigned, an error is returned to the I / O input side, and then the write position information in the master area Are written in the cache area for the own server machine and returned to the I / O input side, and the I / O input is neither a read request nor a write request to the master area, it is prepared for the own server machine. The data by the I / O input is transferred to the lower layer of the received filter driver, and the return value is returned to the I / O input side.
請求項2の発明は、請求項1の発明のクラスタシステムに適用されるプログラムである。
The invention of
請求項3の発明は、請求項3の発明のプログラムにおいて、各フィルタドライバは、自サーバマシンのキャッシュ領域と同じデータを持つメモリキャッシュ領域をそれぞれ備え、自サーバマシン用のキャッシュ領域を参照する代わりに、自サーバマシン用のメモリキャッシュ領域を参照し、マスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込む代わりに、自サーバマシン用のメモリキャッシュ領域およびキャッシュ領域に書き込み、キャッシュ領域のデータをマスター領域にコピーする代わりに、メモリキャッシュ領域のデータをマスター領域にコピーするプログラムである。 According to a third aspect of the present invention, in the program of the third aspect, each filter driver has a memory cache area having the same data as the cache area of the own server machine, and refers to the cache area for the own server machine. Instead of referring to the memory cache area for the own server machine and writing the write position information and the written data in the master area to the cache area for the own server machine, the memory cache area and the cache area for the own server machine are stored. This is a program for copying data in the memory cache area to the master area instead of copying data in the write / cache area to the master area.
本発明によれば、複数のサーバマシンと共有ディスク装置とから構成されたクラスタシステムにおいて、共有ディスク装置やそのマルチパスドライバの実装に依存せずにリザーブ排他が可能であり、かつ、フェールオーバが発生した場合であっても、複数のサーバマシンの書き込みによるデータ破損を発生させることなく、共有ディスク装置内のデータの整合を図ることが可能なクラスタシステム及びプログラムを実現することができる。 According to the present invention, in a cluster system composed of a plurality of server machines and a shared disk device, reserve exclusion is possible without depending on the implementation of the shared disk device and its multipath driver, and failover occurs. Even in this case, it is possible to realize a cluster system and a program capable of matching data in the shared disk device without causing data corruption due to writing in a plurality of server machines.
以下に、本発明を実施するための最良の形態について図面を参照しながら説明する。 The best mode for carrying out the present invention will be described below with reference to the drawings.
なお、以下の各実施の形態の説明に用いる図中の符号は、図16乃至図20と同一部分については同一符号を付して示し、重複説明を省略する。 In addition, the code | symbol in the figure used for description of each following embodiment attaches | subjects and shows the same code | symbol about the same part as FIG. 16 thru | or FIG.
(第1の実施の形態)
図1は、第1の実施の形態に係るクラスタシステムの構成例を示す機能ブロック図である。
(First embodiment)
FIG. 1 is a functional block diagram illustrating a configuration example of the cluster system according to the first embodiment.
すなわち、本実施の形態に係るクラスタシステムは、複数のサーバマシン(ここでは、一例として2つのサーバマシン10(#A,#B)を示す)と、これらサーバマシン10(#A,#B)に接続された共有ディスク装置13とから構成されたクラスタシステムである。ここでは、仮に、初期状態として、サーバマシン10(#A)が稼動系、サーバマシン10(#B)が待機系であるとする。各サーバマシン10(#A,#B)はそれぞれ、各サーバマシン10(#A,#B)上でそれぞれ動作するアプリケーション11(#A,#B)、クラスタソフト12(#A,#B)、フィルタドライバ21(#A,#B)、ディスクドライバ22(#A,#B)を備えている。フィルタドライバ21は、アプリケーション11とディスクドライバ22との間に介挿して設けられる。アプリケーション11は、主にサーバアプリケーションを想定しており、本実施の形態では、プロキシキャッシュサーバであるとする。
That is, the cluster system according to the present embodiment includes a plurality of server machines (here, two server machines 10 (#A, #B) are shown as an example) and these server machines 10 (#A, #B). This is a cluster system composed of the shared
共有ディスク装置13は、各サーバマシン10(#A,#B)それぞれとFC(Fiber Channel)ケーブル23(#A,#B)で接続されており、QUORUM用領域17とマスター領域30とを備えている。それぞれを異なるLUに分けても良いし、異なるパーティションに分けても良い。
The shared
図2は、共有ディスク装置13の詳細構成例を示す概念図である。
FIG. 2 is a conceptual diagram showing a detailed configuration example of the shared
図2に示すようにQUORUM用領域17は、共通領域170、サーバA用領域171、及びサーバB用領域172の3つの領域からなる。更に、共通領域170はコミット権管理テーブル170aを、サーバA用領域171はキャッシュ領域171aとパッチ領域171bを、サーバB用領域172はキャッシュ領域172aとパッチ領域172bをそれぞれ備えている。
As shown in FIG. 2, the
キャッシュ領域171aは、サーバマシン10(#A)のアプリケーション11(#A)からFCケーブル23(#A)を経由してデータがwriteされる領域である。同様に、キャッシュ領域172aは、サーバマシン10(#B)のアプリケーション11(#B)からFCケーブル23(#B)を経由してデータがwriteされる領域である。
The
コミット権管理テーブル170aは、キャッシュ領域171a,172aに格納されたデータの、マスター領域30へのコピー許可であるコミット権が付与されたサーバマシン10を規定している。図2は、サーバマシン10(#A)に対してコミット権が付与され、サーバマシン10(#B)に対してコミット権が付与されていない例を示している。
The commit right management table 170a defines the
マスター領域30は、キャッシュ領域171a,172aに書き込まれたデータが一杯になった場合に、キャッシュ領域171a,172aに書き込まれたデータを移動する領域である。移動は、キャッシュ領域171a,172aが一杯になった場合に、コミット権を持っているサーバマシン10、すなわち、コミット権管理テーブル170aにおいて「コミット有」と規定されたサーバマシン10のフィルタドライバ21が、マスター領域30にコミットすることによって開始される。
The
このような本実施の形態に係るクラスタシステムでは、クラスタソフト12(#A,#B)同士が、互いに定期的に通信して互いのサーバマシン10の生存状態を確認し合うと共に、それぞれ稼動系と待機系との2種類の状態を持つ。以下の説明では、サーバマシン10(#A)が稼動系であり、サーバマシン(#B)が待機系であるものとする。したがって、クラスタソフト12(#A)は稼動系の状態であり、クラスタソフト12(#B)は待機系の状態となっている。
In such a cluster system according to the present embodiment, the cluster software 12 (#A, #B) regularly communicate with each other to check the survival state of each other's
このように稼動系であるクラスタソフト12(#A)は、コミット権管理テーブル170aを、自サーバマシン10(#A)のみにコミット権が付与されるように設定し、上位側である自サーバマシン10(#A)側からマスター領域30が見える状態にし、自サーバマシン10(#A)に備えられたアプリケーション11(#A)を起動させる。
In this way, the cluster software 12 (#A) that is the active system sets the commit right management table 170a so that the commit right is given only to the own server machine 10 (#A), and the own server that is the upper side The
サーバマシン10(#A)に備えられたフィルタドライバ21(#A)は、上位からのI/O入力を待ち、I/O入力がマスター領域30へのreadだった場合には、readデータの一部または全部がサーバマシン10(#A)用のキャッシュ領域171aにあればキャッシュ領域171aから読み取り、readデータが他にもあればマスター領域30から読み取り、読み取ったデータを、read要求をしたI/O入力側にまとめて返す。
The filter driver 21 (#A) provided in the server machine 10 (#A) waits for I / O input from the host, and if the I / O input is read to the
また、I/O入力がマスター領域30へのwriteだった場合であり、自サーバマシン10(#A)用のキャッシュ領域171aに書き込むための空き容量がなく、自サーバマシン10(#A)にコミット権が付与されているのであれば、キャッシュ領域171aのデータをマスター領域30にコピーしてキャッシュ領域171aをクリアする。一方、自サーバマシン10(#A)にコミット権が付与されていないのであれば、write要求をしたI/O入力側にエラーを返し、しかる後に、図2のデータテーブル171cに示すように、マスター領域30における書き込み位置情報(開始位置、長さ)と書き込んだデータとを自サーバマシン10(#A)用のキャッシュ領域171aに書き込み、書き込み結果を、write要求をしたI/O入力側に返す。
Further, this is a case where the I / O input is a write to the
一方、I/O入力が、マスター領域30へのreadでもwriteでもない場合には、自サーバマシン10(#A)に備えられたフィルタドライバ21(#A)の下位側にあるディスクドライバ22(#A)にI/O入力によるデータをそのまま受け渡し、返り値をそのままI/O入力側へ返す。
On the other hand, when the I / O input is neither read nor write to the
次に、待機系のクラスタソフト12(#B)およびフィルタドライバ21(#B)について説明する。 Next, standby cluster software 12 (#B) and filter driver 21 (#B) will be described.
待機系のクラスタソフト12(#B)は、稼動系のクラスタソフト12(#A)が生存していない、すなわち動作していないと判定した場合には、コミット権管理テーブル170aを変更して自サーバマシン10(#B)にのみコミット権が付与されるようにする。そして、サーバマシン10(#A)用のキャッシュ領域171aのデータを自サーバマシン10(#B)用のパッチ領域172bにコピーし、パッチ領域172bをマスター領域30の一部として代用し、自サーバマシン10(#B)側からマスター領域30が見えるようにし、自サーバマシン10(#B)に備えられたアプリケーション11(#B)を起動する。
If the standby cluster software 12 (#B) determines that the active cluster software 12 (#A) is not alive, that is, is not operating, it changes the commit right management table 170a to The commit right is given only to the server machine 10 (#B). Then, the data in the
自サーバマシン10(#B)上に備えられたフィルタドライバ21(#B)は、サーバマシン10(#B)に備えられたクラスタソフト12(#B)が稼動系になった後、上位からのI/O入力を待つ。そして、このI/O入力がマスター領域30へのreadだった場合には、readデータの一部または全部が自サーバマシン10(#B)用のパッチ領域172bにあればパッチ領域172bから読み取り、readデータの一部または全部がキャッシュ領域172aにあれば読み取り、readデータが他にもあればマスター領域30から読み取り、読み取ったデータを、read要求したI/O入力側にまとめて返す。
The filter driver 21 (#B) provided on the own server machine 10 (#B) starts from the upper level after the cluster software 12 (#B) provided on the server machine 10 (#B) becomes an active system. Wait for I / O input. If this I / O input is read to the
そして、I/O入力がマスター領域30へのwriteだった場合には、write先の全部が自サーバマシン10(#B)用のパッチ領域172bにあればパッチ領域172bに書き込んでI/O入力側に返す。そうでない場合にはパッチ領域172bに該当するデータのみをパッチ領域172bに書き込み、自サーバマシン10(#B)用のキャッシュ領域172aにデータを書き込むための空き容量が無ければコミット権管理テーブル170aを参照して自サーバマシン10(#B)にコミット権が付与されているか否かを確認する。
If the I / O input is a write to the
確認の結果、コミット権が付与されていればマスター領域30に自サーバマシン10(#B)用のキャッシュ領域172aのデータをコピーしてキャッシュ領域172aをクリアする。一方、コミット権が付与されていないならばI/O入力側にエラーを返し、しかる後にマスター領域30における書き込み位置情報(開始位置、長さ)と書き込んだデータとを、図2のデータテーブル171cに示すように自サーバマシン10(#B)用のキャッシュ領域172aに書き込み、I/O入力側に返す。
As a result of the confirmation, if the commit right is given, the data in the
一方、I/O入力がマスター領域30へのreadでもwriteでもない場合には、自サーバマシン10(#B)に備えられたフィルタドライバ21(#B)の下位層であるディスクドライバ22(#B)にI/O入力によるデータをそのまま受け渡し、返り値をそのままI/O入力側へ返す。
On the other hand, when the I / O input is neither read nor write to the
また、各サーバマシン10は、マスター領域30にコピーすべきパッチ領域(171b又は172b)を各サーバマシン10が持っているか否かを管理する。更に、クラスタソフト12は、稼動系になった場合、この管理結果に基づいて、マスター領域30にコピーすべきパッチ領域(171b又は172b)を全てマスター領域30にコピーするようにしても良い。
Each
次に、以上のように構成した本実施の形態に係るクラスタシステムの動作について説明する。ただし、初期状態として、サーバマシン10(#A)とサーバマシン10(#B)との間ではクラスタソフト12(#A,#B)同士がハートビートを交換し、互いの生存が確認できており、サーバマシン10(#A,#B)ともに、QUORUM用領域107とマスター領域30は上位層から見えない(フィルタドライバがフェンスオフ)状態になっており、サーバマシン10(#A,#B)ともにアプリケーション11(#A,#B)は起動していないものとする。
Next, the operation of the cluster system according to this embodiment configured as described above will be described. However, as an initial state, the cluster software 12 (#A, #B) exchanges heartbeats between the server machine 10 (#A) and the server machine 10 (#B), and the existence of each other can be confirmed. Both the server machine 10 (#A, #B) and the QUIORUM area 107 and the
まず、図3に示すフローチャートと、図4に示す概念図とを用いて、サーバマシン10(#A)を稼動系に設定する場合におけるクラスタソフト12(#A)による処理の流れを説明する。 First, the flow of processing by the cluster software 12 (#A) when the server machine 10 (#A) is set as an active system will be described using the flowchart shown in FIG. 3 and the conceptual diagram shown in FIG.
まず、ユーザ操作により、サーバマシン10(#A)を稼動系にせよとの通知が、サーバマシン10(#A)のクラスタソフト12(#A)に届く(S1)。次に、クラスタソフト12(#A)によって、サーバマシン10(#A)にコミット権が付与されるようにコミット権管理テーブル170aが設定される(S2)。すると、クラスタソフト12(#A)によって、フィルタドライバ21(#A)に稼動系となったことが通知される(S3)。その後、サーバマシン10(#A)のフィルタドライバ21(#A)によって、上位層からマスター領域30が見える状態にされる(S4)。そして、サーバマシン10(#A)のクラスタソフト12(#A)によって、アプリケーション11(#A)が起動される(S5)。
First, a notification that the server machine 10 (#A) should be an active system is sent to the cluster software 12 (#A) of the server machine 10 (#A) (S1). Next, the commit right management table 170a is set by the cluster software 12 (#A) so that the commit right is given to the server machine 10 (#A) (S2). Then, the cluster software 12 (#A) notifies the filter driver 21 (#A) that it has become an active system (S3). Thereafter, the
次に、図5のフローチャートと、図4に示す概念図とを用いて、サーバマシン10(#A)を稼動系に設定した後のフィルタドライバ21(#A)による処理の流れを説明する。 Next, the flow of processing by the filter driver 21 (#A) after setting the server machine 10 (#A) to the active system will be described using the flowchart of FIG. 5 and the conceptual diagram shown in FIG.
まず、サーバマシン10(#A)のフィルタドライバ21(#A)が上位からのI/O入力を待つ(S11)。そして、I/O入力がなされると、なされたI/O入力の種別が判定される(S12)。なされたI/O入力がマスター領域30へのreadであればステップS13へ、writeであればステップS19へ、それ以外であればステップS26へそれぞれ進む。
First, the filter driver 21 (#A) of the server machine 10 (#A) waits for an I / O input from the host (S11). When an I / O input is made, the type of the made I / O input is determined (S12). If the I / O input made is read to the
ステップS13では、read先データの一部又は全部がキャッシュ領域171aにあれば、キャッシュ領域171a上の該当するデータがreadされ(S14)、ステップS15の処理に進む。read先データがキャッシュ領域171aに全く無いのであれば、ステップS14の処理をスキップしてステップS15の処理に進む。
In step S13, if part or all of the read destination data is in the
ステップS15では、read先データの一部又は全部がキャッシュ領域171aに無いのであれば、マスター領域30から、残りのデータのみがreadされ(S16)、ステップS17の処理に進む。そうでない場合には、ステップS16の処理をスキップしてステップS17の処理に進む。
In step S15, if some or all of the read destination data is not in the
ステップS17では、readされたデータが一つにマージされてread要求元の上位へ返され(S17)、ステップS18の処理に進む。 In step S17, the read data is merged into one and returned to the upper level of the read request source (S17), and the process proceeds to step S18.
そして、ステップS18では、OSが終了するのであれば処理が終了し、そうでなければステップS11の処理に戻る(S18)。 In step S18, if the OS ends, the process ends. Otherwise, the process returns to step S11 (S18).
ステップS19では、キャッシュ領域171aに、writeできるだけの空き容量があるかが判定される(S19)。そして、writeできるだけの空き容量があると判定された場合には、ステップS20において、サーバマシン10(#A)のフィルタドライバ21(#A)によって、共有ディスク装置13上の書き込み開始アドレス、長さ、生データの3つがサーバマシン10(#A)のキャッシュ領域171aに書き込まれる(S20)とともに上位へ返される(S21)。その後、ステップS18の処理に進む。
In step S19, it is determined whether there is enough free space in the
一方、ステップS19において、キャッシュ領域171aに、writeできるだけの空き容量が無いと判定された場合には、ステップS22において、コミット権管理テーブル170aが参照され、サーバマシン10(#A)にコミット権が付与されているかが確認される(S22)。
On the other hand, if it is determined in step S19 that the
サーバマシン10(#A)にコミット権が付与されていれば、ステップS23に進み、サーバマシン10(#A)のフィルタドライバ21(#A)が、コミット(キャッシュ領域171aからマスター領域30への反映)を実施する(S23)。
If the commit right is given to the server machine 10 (#A), the process proceeds to step S23, and the filter driver 21 (#A) of the server machine 10 (#A) performs the commit (from the
次に、サーバマシン10(#A)のフィルタドライバ21(#A)が、キャッシュ領域171aからコミット済みのキャッシュを削除し(S24)、ステップS20の処理に進む。
Next, the filter driver 21 (#A) of the server machine 10 (#A) deletes the committed cache from the
一方、ステップS22において、サーバマシン10(#A)にコミット権が付与されていない場合には、ステップS25に進み、フィルタドライバ21(#A)は上位へエラーを返し(S25)、しかる後にステップS18の処理に進む。 On the other hand, if the commit right is not given to the server machine 10 (#A) in step S22, the process proceeds to step S25, and the filter driver 21 (#A) returns an error to the upper level (S25), and then the step is performed. The process proceeds to S18.
ステップS26では、ディスクドライバ22(#A)に処理がそのまま渡され、その後ステップS27において返り値がそのまま上位に返され、ステップS18の処理に進む。 In step S26, the process is transferred to the disk driver 22 (#A) as it is, and then in step S27, the return value is returned to the upper level as it is, and the process proceeds to step S18.
次に、図6に示すフローチャートと、図7に示す概念図とを用いて、サーバマシン10(#B)がハートビート切れを検出し、フェールオーバするときのサーバマシン10(#B)のクラスタソフト12(#B)による処理の流れを説明する。 Next, using the flowchart shown in FIG. 6 and the conceptual diagram shown in FIG. 7, the cluster software of the server machine 10 (#B) when the server machine 10 (#B) detects a heartbeat break and fails over. 12 (#B) will be described.
まず、サーバマシン10(#B)のクラスタソフト12(#B)は、サーバマシン10(#A)のクラスタソフト12(#A)が、図7中のXに示すようにwrite中にスローダウンしたり、図7中のYに示すようにコミット中にスローダウンすることによってハードビート切れを検出する(S31)と、サーバマシン10(#B)にコミット権が付与されるようにコミット権管理テーブル170aが設定される(S32)。なお、スローダウンしたクラスタソフト12(#A)は、何れの場合であっても、しばらくした後に復帰するものとする。 First, the cluster software 12 (#B) of the server machine 10 (#B) is slowed down during the write by the cluster software 12 (#A) of the server machine 10 (#A) as indicated by X in FIG. Or when the hard beat is detected by slowing down during commit as shown by Y in FIG. 7 (S31), the commit right management is performed so that the commit right is given to the server machine 10 (#B). The table 170a is set (S32). In any case, the slow-down cluster software 12 (#A) is assumed to return after a while.
次に、クラスタソフト12(#B)が、サーバマシン10(#A)用のキャッシュ領域171aの全データ(コミット前又はコミット中のものを含む)を、サーバマシン10(#B)のパッチ領域172bにコピーする(S33)。
Next, the cluster software 12 (#B) stores all data in the
すると、クラスタソフト12(#B)によって、フィルタドライバ21(#B)にサーバマシン10(#B)が稼動系になったことが通知される(S34)。その後、サーバマシン10(#B)のフィルタドライバ21(#B)によって、上位層からマスター領域30が見える状態にされる(S35)。そして、サーバマシン10(#B)のクラスタソフト12(#B)によって、アプリケーション11(#B)が起動される(S36)。
Then, the cluster software 12 (#B) notifies the filter driver 21 (#B) that the server machine 10 (#B) has become an active system (S34). Thereafter, the
次に、図8のフローチャートと、図7に示す概念図とを用いて、サーバマシン10(#B)へのフェールオーバ後のフィルタドライバ21(#B)による処理の流れを説明する。 Next, the flow of processing by the filter driver 21 (#B) after failover to the server machine 10 (#B) will be described using the flowchart of FIG. 8 and the conceptual diagram shown in FIG.
まず、サーバマシン10(#B)のフィルタドライバ21(#B)が上位からのI/O入力を待つ(S41)。そして、I/O入力がなされると、なされたI/O入力の種別が判定される(S42)。なされたI/O入力がマスター領域30へのreadであればステップS43へ、writeであればステップS51へ、それ以外であればステップS61へそれぞれ進む。
First, the filter driver 21 (#B) of the server machine 10 (#B) waits for an I / O input from the host (S41). When an I / O input is made, the type of the made I / O input is determined (S42). If the I / O input made is read to the
ステップS43では、read先データの一部又は全部がパッチ領域172bにあれば、パッチ領域172b上の該当するデータがreadされ(S44)、ステップS45の処理に進む。read先データがパッチ領域172bに全く無いのであれば、ステップS44の処理をスキップしてステップS45の処理に進む。
In step S43, if part or all of the read destination data is in the
ステップS45では、read先データの一部又は全部がキャッシュ領域172aにあるのであれば、キャッシュ領域172a上の該当データがreadされ(S46)、ステップS47の処理に進む。そうでない場合には、ステップS46の処理をスキップしてステップS47の処理に進む。
In step S45, if part or all of the read destination data is in the
ステップS47では、read先データの一部又は全部がパッチ領域172bにもキャッシュ領域172aにも無いのであれば、マスター領域30から、残りのデータのみがreadされ(S48)、ステップS49の処理に進む。そうでない場合には、ステップS48の処理をスキップしてステップS49の処理に進む。
In step S47, if part or all of the read destination data is not in the
ステップS49では、readされたデータが一つにマージされてread要求元の上位へ返され(S49)、ステップS50の処理に進む。 In step S49, the read data is merged into one and returned to the upper level of the read request source (S49), and the process proceeds to step S50.
そして、ステップS50では、OSが終了するのであれば処理が終了し、そうでなければステップS41の処理に戻る(S18)。 In step S50, if the OS ends, the process ends. If not, the process returns to step S41 (S18).
ステップS51では、write先の一部又は全部がパッチ領域172b上にあれば、ステップS52に進み、該当するデータがパッチ領域172bにwriteされ(S52)、ステップS53の処理に進む。
In step S51, if part or all of the write destination is on the
ステップS53では、write先の全部がパッチ領域172bであった場合には、ステップS56の処理に進み、上位へ結果が返された後にステップS50の処理に進む。一方、write先の全部がパッチ領域172bである訳ではない場合には、ステップS54の処理に進む。
In step S53, if all of the write destinations are the
ステップS54では、キャッシュ領域172aに、writeできるだけの空き容量があるかが判定される(S54)。そして、writeできるだけの空き容量があると判定された場合には、ステップS55において、サーバマシン10(#B)のフィルタドライバ21(#B)によって、共有ディスク装置13上の書き込み開始アドレス、長さ、生データの3つがサーバマシン10(#B)のキャッシュ領域172aに書き込まれる(S55)とともに上位へ返される(S56)。その後、ステップS50の処理に進む。
In step S54, it is determined whether there is enough free space in the
一方、ステップS54において、キャッシュ領域172aに、writeできるだけの空き容量が無いと判定された場合には、ステップS57において、コミット権管理テーブル170aが参照され、サーバマシン10(#B)にコミット権が付与されているかが確認される(S57)。
On the other hand, if it is determined in step S54 that the
サーバマシン10(#B)にコミット権が付与されていれば、ステップS58に進み、サーバマシン10(#B)のフィルタドライバ21(#B)が、コミット(キャッシュ領域172aからマスター領域30への反映)を実施する(S58)。
If the commit right is given to the server machine 10 (#B), the process proceeds to step S58, and the filter driver 21 (#B) of the server machine 10 (#B) commits (transfers from the
次に、サーバマシン10(#B)のフィルタドライバ21(#B)が、キャッシュ領域172aからコミット済みのキャッシュを削除し(S59)、ステップS55の処理に進む。
Next, the filter driver 21 (#B) of the server machine 10 (#B) deletes the committed cache from the
一方、ステップS57において、サーバマシン10(#B)にコミット権が付与されていない場合には、ステップS60に進み、フィルタドライバ21(#B)は上位へエラーを返し(S60)、しかる後にステップS50の処理に進む。 On the other hand, if the commit right is not given to the server machine 10 (#B) in step S57, the process proceeds to step S60, and the filter driver 21 (#B) returns an error to the upper level (S60), and then the step is performed. The process proceeds to S50.
ステップS61では、ディスクドライバ22(#B)に処理がそのまま渡され、その後ステップS62において返り値がそのまま上位に返され、ステップS50の処理に進む。 In step S61, the process is transferred to the disk driver 22 (#B) as it is, and then in step S62, the return value is returned as it is to the upper level, and the process proceeds to step S50.
上述したように、本実施の形態に係るクラスタシステムにおいては、上記のような作用により、複数のサーバマシン10(#A,#B)と共有ディスク装置13とから構成されたクラスタシステムにおいて、共有ディスク装置13やそのマルチパスドライバの実装に依存せずにリザーブ排他が可能となる。
As described above, in the cluster system according to the present embodiment, sharing is performed in the cluster system configured by the plurality of server machines 10 (#A, #B) and the shared
また、稼動系のサーバマシン10(#A)のダウン、スローダウン、あるいは通信路14の障害のようないかなる理由でフェールオーバが発生した場合であっても、複数のサーバマシン10(#A,#B)の重複書き込みによるデータ破損が発生することなく、共有ディスク装置13内のデータの整合を図ることが可能となる。しかも、アプリケーションデータのためのサーバA用領域171及びサーバB用領域172を通常と比較してほとんど増やさずに済むのみならず、フェールオーバ時にコピーするデータ量も少なくて済むために迅速なフェールオーバが可能となる。
In addition, even when a failover occurs for any reason such as a down or slowdown of the active server machine 10 (#A) or a failure of the
また、各サーバマシン10は、マスター領域30にコピーすべきパッチ領域(171b又は172b)を各サーバマシン10が持っているか否かを管理する。更に、クラスタソフト12は、稼動系になった場合、この管理結果に基づいて、マスター領域30にコピーすべきパッチ領域(171b又は172b)のデータを全てマスター領域30にコピーすることもできるので、元稼動系のサーバマシン10(#A)の状態が確認できない状態(ダウン/スローダウン/生存)で、パッチ領域172bを持つ新たな稼動系のサーバマシン10(#B)を停止させた場合でも、アプリケーションデータの整合性を崩す危険を回避することが可能となる。
Each
(第2の実施の形態)
図9は、第2の実施の形態に係るクラスタシステムの構成例を示す機能ブロック図である。本実施の形態に係るクラスタシステムは、第1の実施の形態に係るクラスタシステムの変形例であるので、第1の実施の形態と同一部位については同一符番で示して重複説明を省略し、異なる点について説明する。
(Second Embodiment)
FIG. 9 is a functional block diagram illustrating a configuration example of the cluster system according to the second embodiment. Since the cluster system according to the present embodiment is a modification of the cluster system according to the first embodiment, the same parts as those in the first embodiment are denoted by the same reference numerals, and redundant description is omitted. Different points will be described.
すなわち、本実施の形態に係るクラスタシステムは、図1に示す構成に加えて、各サーバマシン10(#A,#B)が更にコミットスレッド24(#A,#B)とメモリキャッシュ領域25(#A,#B)とを備えている。コミットスレッド24及びメモリキャッシュ領域25はともにフィルタドライバ21に備えられている。
That is, in the cluster system according to the present embodiment, each server machine 10 (#A, #B) further includes a commit thread 24 (#A, #B) and a memory cache area 25 ( #A, #B). Both the commit thread 24 and the
また、共有ディスク装置13においては、図1に示すQUORUM用領域17を無くした代わりに、マスター領域30の中にQUORUM用ファイル31を備えている。更に、QUORUM用ファイル31は、図10に示すように、コミット権管理テーブル170a及びパッチ領域保持状態管理テーブル170bを含む共通領域170と、キャッシュ領域171a及びパッチ領域171bを含むサーバA用領域171と、キャッシュ領域172a及びパッチ領域172bを含むサーバB用領域172とを含んでいる。
In addition, the shared
パッチ領域保持状態管理テーブル170bは、マスター領域30に反映すべきデータを各サーバマシン10(#A,#B)がパッチ領域171b,172bに保持しているか否かの情報を管理している。
The patch area holding state management table 170b manages information indicating whether or not each server machine 10 (#A, #B) holds data to be reflected in the
メモリキャッシュ領域25(#A)には、サーバマシン10(#A)のアプリケーション11(#A)からフィルタドライバ21(#A)を経由してwriteされるデータが書き込まれる。同じデータは、FCケーブル23(#A)を経由してサーバA用領域171内のキャッシュ領域171aにも書き込まれる。
Data written from the application 11 (#A) of the server machine 10 (#A) via the filter driver 21 (#A) is written in the memory cache area 25 (#A). The same data is also written to the
同様に、メモリキャッシュ領域25(#B)には、サーバマシン10(#B)のアプリケーション11(#B)からフィルタドライバ21(#B)を経由してwriteされるデータが書き込まれる。同じデータは、FCケーブル23(#B)を経由してサーバB用領域172内のキャッシュ領域172aにも書き込まれる。
Similarly, data written from the application 11 (#B) of the server machine 10 (#B) via the filter driver 21 (#B) is written in the memory cache area 25 (#B). The same data is also written to the
これにより、各フィルタドライバ21(#A,#B)は、各サーバマシン10(#A,#B)のキャッシュ領域171a,172aと同じデータを持つメモリキャッシュ領域25(#A,#B)をそれぞれ備えることになる。
As a result, each filter driver 21 (#A, #B) creates a memory cache area 25 (#A, #B) having the same data as the
コミットスレッド24は、自サーバマシン10にコミット権が付与されている場合、直接もしくはフィルタドライバ21を経由して、自サーバマシン10用のキャッシュ領域(171a又は172a)のデータを、マスター領域30に定期的にコピーさせる。
When the commit right is given to the
このような本実施の形態に係るクラスタシステムでは、第1の実施の形態に係るクラスタシステムのフィルタドライバ21が、自サーバマシン10用のキャッシュ領域(171a又は172a)を参照する代わりに、自サーバマシン10用のメモリキャッシュ領域25を参照する。また、マスター領域30における書き込み位置情報と書き込んだデータとを自サーバマシン10用のキャッシュ領域(171a又は172a)内のデータテーブル(171c又は172c)に書き込む代わりに、自サーバマシン10用のメモリキャッシュ領域25およびキャッシュ領域(171a又は172a)に書き込む。また、キャッシュ領域(171a又は172a)のデータをマスター領域30にコピーする代わりに、メモリキャッシュ領域25のデータをマスター領域30にコピーする。
In such a cluster system according to the present embodiment, the
次に、以上のように構成した本実施の形態に係るクラスタシステムの動作について説明する。 Next, the operation of the cluster system according to this embodiment configured as described above will be described.
まず、図11に示すフローチャートを用いて、サーバマシン10(#A)を稼動系に設定する場合におけるクラスタソフト12(#A)による処理の流れを説明する。 First, the flow of processing by the cluster software 12 (#A) when the server machine 10 (#A) is set as an active system will be described using the flowchart shown in FIG.
まず、ユーザ操作により、サーバマシン10(#A)を稼動系にせよとの通知が、サーバマシン10(#A)のクラスタソフト12(#A)に届く(S71)。次に、クラスタソフト12(#A)によって、サーバマシン10(#A)にコミット権が付与されるようにコミット権管理テーブル170aが設定される(S72)。すると、クラスタソフト12(#A)によって、フィルタドライバ21(#A)に稼動系となったことが通知される(S73)。そして、フィルタドライバ21(#A)は、パッチ領域保持状態管理テーブル170bを参照し、指定されているサーバマシン10のパッチ領域(171b又は172b)の内容がマスター領域30に反映される(S74)。
First, a notification that the server machine 10 (#A) should be an active system is received by the user operation to the cluster software 12 (#A) of the server machine 10 (#A) (S71). Next, the commit right management table 170a is set by the cluster software 12 (#A) so that the commit right is given to the server machine 10 (#A) (S72). Then, the cluster software 12 (#A) notifies the filter driver 21 (#A) that it has become an active system (S73). Then, the filter driver 21 (#A) refers to the patch area holding state management table 170b, and the contents of the designated patch area (171b or 172b) of the
その後、サーバマシン10(#A)のフィルタドライバ21(#A)によって、上位層からマスター領域30が見える状態にされる(S75)。そして、サーバマシン10(#A)のフィルタドライバ21(#A)によって、コミットスレッド24(#A)が起動され(S76)、サーバマシン10(#A)のクラスタソフト12(#A)によって、アプリケーション11(#A)が起動される(S77)。
Thereafter, the
次に、図12のフローチャートを用いて、サーバマシン10(#A)を稼動系に設定した後のコミットスレッド24(#A)による処理の流れを説明する。 Next, the flow of processing by the commit thread 24 (#A) after setting the server machine 10 (#A) to the active system will be described using the flowchart of FIG.
サーバマシン10(#A)が稼動系に設定された後、コミットスレッド24(#A)がフィルタドライバ21(#A)に対してコミット実行命令を発行する(S81)。コミットを連続的に続けていると、サーバマシン10(#A)の負荷が常に100%になって、他の処理をする余裕がなくなる恐れがある。これを回避するために、ステップS81の後、例えば10秒間スリープする(S82)。これによって、キャッシュ領域171aが満杯にならない程度である例えば10秒間スリープし、コミットを継続する(S83)。
After the server machine 10 (#A) is set to the active system, the commit thread 24 (#A) issues a commit execution command to the filter driver 21 (#A) (S81). If the commit is continued continuously, the load of the server machine 10 (#A) is always 100%, and there is a possibility that there is no room for other processing. In order to avoid this, after step S81, for example, sleep is performed for 10 seconds (S82). As a result, the
次に、図13のフローチャートを用いて、サーバマシン10(#A)を稼動系に設定した後のフィルタドライバ21(#A)による処理の流れを説明する。 Next, the flow of processing by the filter driver 21 (#A) after setting the server machine 10 (#A) to the active system will be described using the flowchart of FIG.
まず、サーバマシン10(#A)のフィルタドライバ21(#A)が上位からのI/O入力を待つ(S91)。そして、なされたI/O入力がコミット実行命令である場合にはステップS93の処理に進み、コミット実行命令ではない場合にはステップS100の処理に進む。 First, the filter driver 21 (#A) of the server machine 10 (#A) waits for an I / O input from the host (S91). If the I / O input made is a commit execution instruction, the process proceeds to step S93. If the input is not a commit execution instruction, the process proceeds to step S100.
ステップS93では、コミット権管理テーブル170aが参照され、サーバマシン10(#A)にコミット権が付与されているか否かが確認される。そして、サーバマシン10(#A)にコミット権が付与されている場合には、ステップS94で、コミット時に、read/write命令を出さないようにアプリケーション11(#A)をブロックする処理であるロックが、コミットスレッド24(#A)によって獲得される。 In step S93, the commit right management table 170a is referred to and it is confirmed whether or not the commit right is given to the server machine 10 (#A). If the commit right is given to the server machine 10 (#A), in step S94, lock is a process that blocks the application 11 (#A) so that a read / write command is not issued at the time of commit. Is acquired by the commit thread 24 (#A).
そして、フィルタドライバ21(#A)によって、メモリキャッシュ領域25(#A)が参照され、コミットする範囲が確定され(S95)た後に、コミット、すなわちメモリキャッシュ領域25(#A)からマスター領域30への反映が実施される(S96)。そして、メモリキャッシュ領域25(#A)及びキャッシュ領域171aからコミット済みのキャッシュが削除され(S97)た後に、ステップS93で獲得されたロックが解放される(S98)。その後、ステップS120の処理に進む。
Then, the memory cache area 25 (#A) is referred to by the filter driver 21 (#A), and after committing the range to be committed (S95), the commit, that is, from the memory cache area 25 (#A) to the
そして、ステップS120では、OSが終了するのであれば処理が終了し、そうでなければステップS91の処理に戻る(S120)。 In step S120, if the OS ends, the process ends. If not, the process returns to step S91 (S120).
一方、ステップS93において、サーバマシン10(#A)にコミット権が付与されていない場合には、フィルタドライバ21(#A)によって上位へエラーが戻され(S99)た後に、ステップS120の処理に進む。 On the other hand, if the commit right is not granted to the server machine 10 (#A) in step S93, an error is returned to the upper level by the filter driver 21 (#A) (S99), and then the process of step S120 is performed. move on.
ステップS100では、ステップS91でなされたI/O入力の種別が判定される(S100)。なされたI/O入力がマスター領域30へのreadであればステップS101へ、writeであればステップS109へ、それ以外であればステップS118へそれぞれ進む。
In step S100, the type of I / O input made in step S91 is determined (S100). If the I / O input made is read to the
ステップS101では、read中にコミット命令を出さないようにコミットスレッド24(#A)をブロックする処理であるロックが、アプリケーション11(#A)によって獲得される(S101)。そして、read先データの一部又は全部がメモリキャッシュ領域25(#A)にあれば(S102)、メモリキャッシュ領域25(#A)の該当するデータがreadされ(S103)、ステップS104の処理に進む。read先データがメモリキャッシュ領域25(#A)に全く無いのであれば、ステップS103の処理をスキップしてステップS104の処理に進む。 In step S101, the application 11 (#A) acquires a lock, which is a process for blocking the commit thread 24 (#A) so as not to issue a commit command during read (S101). If part or all of the read destination data is in the memory cache area 25 (#A) (S102), the corresponding data in the memory cache area 25 (#A) is read (S103), and the process of step S104 is performed. move on. If there is no read destination data in the memory cache area 25 (#A), the process of step S103 is skipped and the process proceeds to step S104.
ステップS104では、read先データの一部又は全部がキャッシュ領域171aに無いのであれば、マスター領域30から、残りのデータのみがreadされ(S105)、ステップS106の処理に進む。そうでない場合には、ステップS105の処理をスキップしてステップS106の処理に進む。
In step S104, if some or all of the read destination data is not in the
ステップS106では、ステップS101で獲得されたロックが解放され、その後、readされたデータが一つにマージされてread要求元の上位へ返され(S107)、ステップS120の処理に進む。 In step S106, the lock acquired in step S101 is released, and then the read data is merged into one and returned to the upper level of the read request source (S107), and the process proceeds to step S120.
ステップS109では、write中にコミット命令を出さないようにコミットスレッド24(#A)をブロックする処理であるロックが、アプリケーション11(#A)によって獲得される。そして、メモリキャッシュ領域25(#A)に、writeできるだけの空き容量があるかが判定される(S110)。そして、writeできるだけの空き容量があると判定された場合には、ステップS111において、サーバマシン10(#A)のフィルタドライバ21(#A)によって、共有ディスク装置13上の書き込み開始アドレス、長さ、生データの3つがサーバマシン10(#A)のメモリキャッシュ領域25(#A)及びキャッシュ領域171aのデータテーブル171cに書き込まれ(S111)、ステップS109で獲得されたロックが解放された(S112)後に、ステップS111で書き込まれたデータが上位へ返される(S113)。その後、ステップS120の処理に進む。
In step S109, the application 11 (#A) acquires a lock that is a process for blocking the commit thread 24 (#A) so as not to issue a commit instruction during write. Then, it is determined whether the memory cache area 25 (#A) has enough free space for writing (S110). If it is determined that there is enough free space to write, in step S111, the filter driver 21 (#A) of the server machine 10 (#A) writes the write start address and length on the shared
一方、ステップS110において、キャッシュ領域171aに、writeできるだけの空き容量が無いと判定された場合には、ステップS109で獲得されたロックが解放され(S114)、ステップS115において、フィルタドライバ21(#A)によってコミットの実行命令が発行される(S115)。そして、コミットの実行命令が成功するとステップS109の処理に戻り、成功しなかった場合には、フィルタドライバ21(#A)によって上位へエラーが戻され(S117)、ステップS120の処理に進む。
On the other hand, if it is determined in step S110 that the
ステップS118では、ディスクドライバ22(#A)に処理がそのまま渡され、その後ステップS119において返り値がそのまま上位に返され、ステップS120の処理に進む。 In step S118, the process is transferred to the disk driver 22 (#A) as it is, and then in step S119, the return value is returned to the upper level as it is, and the process proceeds to step S120.
次に、図14に示すフローチャートを用いて、サーバマシン10(#B)がハートビート切れを検出し、フェールオーバするときのサーバマシン10(#B)のクラスタソフト12(#B)による処理の流れを説明する。 Next, the flow of processing by the cluster software 12 (#B) of the server machine 10 (#B) when the server machine 10 (#B) detects a heartbeat break and fails over using the flowchart shown in FIG. Will be explained.
まず、サーバマシン10(#B)のクラスタソフト12(#B)は、サーバマシン10(#A)のクラスタソフト12(#A)が、図7中のXに示すようにwrite中にスローダウンしたり、図7中のYに示すようにコミット中にスローダウンすることによってハードビート切れを検出する(S131)と、クラスタソフト12(#B)によって、サーバマシン10(#B)にコミット権が付与されるようにコミット権管理テーブル170aが設定される(S132)。なお、スローダウンしたクラスタソフト12(#A)は、何れの場合であっても、しばらくした後に復帰するものとする。 First, the cluster software 12 (#B) of the server machine 10 (#B) is slowed down during the write by the cluster software 12 (#A) of the server machine 10 (#A) as indicated by X in FIG. If the hard beat is detected by slowing down during commit as shown by Y in FIG. 7 (S131), the cluster software 12 (#B) gives the commit right to the server machine 10 (#B). Is set such that the commit right management table 170a is assigned (S132). In any case, the slow-down cluster software 12 (#A) is assumed to return after a while.
次に、クラスタソフト12(#B)が、サーバマシン10(#A)用のキャッシュ領域171aの全データ(コミット前又はコミット中のものを含む)を、サーバマシン10(#B)のパッチ領域172bにコピーする(S133)。
Next, the cluster software 12 (#B) stores all data in the
すると、クラスタソフト12(#B)によって、パッチ領域保持状態管理テーブル170bが、サーバマシン10(#B)のパッチ領域保持状態が指定されるように変更される(S134)。 Then, the cluster software 12 (#B) changes the patch area holding state management table 170b so that the patch area holding state of the server machine 10 (#B) is designated (S134).
次に、クラスタソフト12(#B)によって、フィルタドライバ21(#B)にサーバマシン10(#B)が稼動系になったことが通知される(S135)。その後、サーバマシン10(#B)のフィルタドライバ21(#B)によって、上位層からマスター領域30が見える状態にされる(S136)。そして、サーバマシン10(#B)のクラスタソフト12(#B)によって、コミットスレッド24(#B)が起動され(S137)、次にアプリケーション11(#B)が起動される(S138)。
Next, the cluster software 12 (#B) notifies the filter driver 21 (#B) that the server machine 10 (#B) has become an active system (S135). Thereafter, the
次に、図15のフローチャートを用いて、サーバマシン10(#B)にフェールオーバ後のフィルタドライバ21(#B)による処理の流れを説明する。 Next, the flow of processing by the filter driver 21 (#B) after failover to the server machine 10 (#B) will be described using the flowchart of FIG.
まず、サーバマシン10(#B)のフィルタドライバ21(#B)が上位からのI/O入力を待つ(S141)。このI/O入力がコミット実行命令である場合には、ステップS143の処理に進み、コミット実行命令でない場合には、ステップS150の処理に進む(S142)。 First, the filter driver 21 (#B) of the server machine 10 (#B) waits for an I / O input from the host (S141). If this I / O input is a commit execution instruction, the process proceeds to step S143. If not, the process proceeds to step S150 (S142).
ステップS143では、コミット権管理テーブル170aが参照され、サーバマシン10(#B)にコミット権が付与されているか否かが確認される。そして、サーバマシン10(#B)にコミット権が付与されている場合には、ステップS144で、コミット時に、read/write命令を出さないようにアプリケーション11(#B)をブロックする処理であるロックが、コミットスレッド24(#B)によって獲得される。 In step S143, the commit right management table 170a is referred to, and it is confirmed whether the commit right is given to the server machine 10 (#B). If the commit right is given to the server machine 10 (#B), in step S144, lock is a process that blocks the application 11 (#B) so as not to issue a read / write command at the time of commit. Is acquired by the commit thread 24 (#B).
そして、フィルタドライバ21(#B)によって、メモリキャッシュ領域25(#B)が参照され、コミットする範囲が確定され(S145)た後に、コミット、すなわちメモリキャッシュ領域25(#B)からマスター領域30への反映が実施される(S146)。そして、メモリキャッシュ領域25(#B)及びキャッシュ領域172aからコミット済みのキャッシュが削除され(S147)た後に、ステップS143で獲得されたロックが解放される(S148)。その後、ステップS174の処理に進む。
Then, the memory cache area 25 (#B) is referred to by the filter driver 21 (#B), and after the range to be committed is determined (S145), the commit, that is, from the memory cache area 25 (#B) to the
そして、ステップS174では、OSが終了するのであれば処理が終了し、そうでなければステップS141の処理に戻る(S174)。 In step S174, if the OS ends, the process ends. If not, the process returns to step S141 (S174).
一方、ステップS143において、サーバマシン10(#B)にコミット権が付与されていない場合には、フィルタドライバ21(#B)によって上位へエラーが戻され(S149)た後に、ステップS174の処理に進む。 On the other hand, if the commit right is not granted to the server machine 10 (#B) in step S143, an error is returned to the upper level by the filter driver 21 (#B) (S149), and then the process of step S174 is performed. move on.
ステップS150では、ステップS141でなされたI/O入力の種別が判定される(S50)。なされたI/O入力がマスター領域30へのreadであればステップS151へ、writeであればステップS160へ、それ以外であればステップS172へそれぞれ進む。
In step S150, the type of I / O input made in step S141 is determined (S50). If the I / O input made is read to the
ステップS151では、read先データの一部又は全部がパッチ領域172bにあれば、パッチ領域172b上の該当するデータがreadされ(S152)、ステップS153の処理に進む。read先データがパッチ領域172bに全く無いのであれば、ステップS152の処理をスキップしてステップS153の処理に進む。
In step S151, if part or all of the read destination data is in the
ステップS153では、read中にコミット命令を出さないようにコミットスレッド24(#B)をブロックする処理であるロックが、アプリケーション11(#B)によって獲得される(S153)。そして、read先データの一部又は全部がメモリキャッシュ領域25(#B)にあれば(S154)、メモリキャッシュ領域25(#B)の該当するデータがreadされ(S155)、ステップS156の処理に進む。read先データがメモリキャッシュ領域25(#B)に全く無いのであれば、ステップS155の処理をスキップしてステップS156の処理に進む。 In step S153, the application 11 (#B) acquires a lock that is a process for blocking the commit thread 24 (#B) so as not to issue a commit command during read (S153). If part or all of the read destination data is in the memory cache area 25 (#B) (S154), the corresponding data in the memory cache area 25 (#B) is read (S155), and the process of step S156 is performed. move on. If there is no read destination data in the memory cache area 25 (#B), the process of step S155 is skipped and the process proceeds to step S156.
ステップS156では、read先データの一部又は全部がキャッシュ領域172aにもパッチ領域172bにも無いのであれば、マスター領域30から、残りのデータのみがreadされ(S157)、ステップS158の処理に進む。そうでない場合には、ステップS157の処理をスキップしてステップS158の処理に進む。
In step S156, if part or all of the read destination data is not in the
ステップS158では、ステップS153で獲得されたロックが解放され、その後、readされたデータが一つにマージされてread要求元の上位へ返され(S159)、ステップS174の処理に進む。 In step S158, the lock acquired in step S153 is released, and then the read data is merged into one and returned to the upper level of the read request source (S159), and the process proceeds to step S174.
ステップS160では、write先の一部又は全部がパッチ領域172b上にあれば、ステップS161に進み、該当するデータがパッチ領域172bにwriteされ(S161)、ステップS162の処理に進む。
In step S160, if part or all of the write destination is on the
ステップS162では、write先の全てがパッチ領域172bであった場合には、ステップS167の処理に進み、上位へ結果が返された後にステップS174の処理に進む。一方、write先の全てがパッチ領域172bである訳ではない場合には、ステップS163の処理に進む。
In step S162, if all of the write destinations are the
ステップS163では、write中にコミット命令を出さないようにコミットスレッド24(#B)をブロックする処理であるロックが、アプリケーション11(#B)によって獲得される。そして、メモリキャッシュ領域25(#B)に、writeできるだけの空き容量があるかが判定される(S164)。そして、writeできるだけの空き容量があると判定された場合には、ステップS165において、サーバマシン10(#B)のフィルタドライバ21(#B)によって、共有ディスク装置13上の書き込み開始アドレス、長さ、生データの3つがサーバマシン10(#B)のメモリキャッシュ領域25(#B)及びキャッシュ領域172aに書き込まれ(S165)、ステップS163で獲得されたロックが解放された(S166)後に、ステップS165で書き込まれたデータが上位へ返される(S167)。その後、ステップS174の処理に進む。
In step S163, the application 11 (#B) acquires a lock that is a process for blocking the commit thread 24 (#B) so as not to issue a commit instruction during write. Then, it is determined whether the memory cache area 25 (#B) has enough free capacity to write (S164). If it is determined that there is enough free space to write, in step S165, the filter driver 21 (#B) of the server machine 10 (#B) writes the write start address and length on the shared
一方、ステップS164において、キャッシュ領域172aに、writeできるだけの空き容量が無いと判定された場合には、ステップS163で獲得されたロックが解放され(S168)、ステップS169において、フィルタドライバ21(#B)によってコミットの実行命令が発行される(S169)。そして、コミットの実行命令が成功するとステップS163の処理に戻り、成功しなかった場合には、フィルタドライバ21(#B)によって上位へエラーが戻され(S171)、ステップS174の処理に進む。
On the other hand, if it is determined in step S164 that there is not enough free space in the
ステップS172では、ディスクドライバ22(#B)に処理がそのまま渡され、その後ステップS173において返り値がそのまま上位に返され、ステップS174の処理に進む。 In step S172, the process is passed to the disk driver 22 (#B) as it is, and then in step S173, the return value is returned as it is to the upper level, and the process proceeds to step S174.
なお、サーバマシン10(#B)にフェールオーバした後のコミットスレッド24(#B)による処理の流れは、図12のフローチャートの説明に示すサーバマシン10(#A)、フィルタドライバ21(#A)、コミットスレッド24(#A)、及びキャッシュ領域171aを、サーバマシン10(#B)、フィルタドライバ21(#B)、コミットスレッド24(#B)、及びキャッシュ領域172aに読み替えたものと同じである。
The processing flow by the commit thread 24 (#B) after failing over to the server machine 10 (#B) is the server machine 10 (#A) and the filter driver 21 (#A) shown in the flowchart of FIG. The commit thread 24 (#A) and the
上述したように、本実施の形態に係るクラスタシステムにおいては、共通領域170、サーバA用領域171、及びサーバB用領域172をマスター領域30内に設けているので、新たに特別なLUやパーティションを用意することが無くなるため、例えば、既に稼動しているクラスタシステムへの適用を容易に行うことが可能となる。
As described above, in the cluster system according to the present embodiment, the
また、フィルタドライバ21がコミットする際、例えば、第1の実施の形態のような構成では、キャッシュ領域(171a又は172a)からのデータのreadと、マスター領域30へのデータのwriteとのために2回のディスクアクセスが必要であったが、本実施の形態によれば、ディスクアクセスの回数が減るため、共有ディスク装置13に対する負荷が減り、上位アプリケーションからのI/Oに対しより高速な処理が可能となる。
When the
更に、本実施の形態に係るクラスタシステムでは、コミットスレッド24は、自サーバマシン10にコミット権が付与されている場合、直接もしくはフィルタドライバ21を経由して、自サーバマシン10用のキャッシュ領域(171a又は172a)のデータを、マスター領域30に定期的にコピーさせるので、マスター領域30にキャッシュ領域(171a又は172a)のデータをコピーする処理を、通常のI/O入力に対する処理と並行して行うことが可能となり、上位アプリケーションからのI/Oの遅延を防ぎ、高速化を図ることが可能となる。
Furthermore, in the cluster system according to the present embodiment, the commit thread 24, when the commit right is given to the
更にまた、本実施の形態に係るクラスタシステムでは、パッチ領域保持状態を管理するパッチ領域保持状態管理テーブル170bを備えているので、パッチ領域保持状態管理テーブル170bを参照することにより、マスター領域30に反映すべきパッチ領域(171b又は172b)を各サーバマシン10(#A,#B)が持っているか否かを把握できる。従って、例えば、サーバマシン10(#B)を停止させたい場合でも、サーバマシン10(#A)の状態を確認することができ、パッチ領域171bからマスター領域30への必要な反映のし忘れや、サーバマシン10(#A)とサーバマシン10(#B)との両系による重複書き込みを回避し、パッチ領域(171b又は172b)をマスター領域30の該当箇所に確実に反映することが可能となる。
Furthermore, since the cluster system according to the present embodiment includes the patch area holding state management table 170b for managing the patch area holding state, the
以上、本発明を実施するための最良の形態について、添付図面を参照しながら説明したが、本発明はかかる構成に限定されない。特許請求の範囲の発明された技術的思想の範疇において、当業者であれば、各種の変更例及び修正例に想到し得るものであり、それら変更例及び修正例についても本発明の技術的範囲に属するものと了解される。 The best mode for carrying out the present invention has been described above with reference to the accompanying drawings, but the present invention is not limited to such a configuration. Within the scope of the invented technical idea of the scope of claims, a person skilled in the art can conceive of various changes and modifications. The technical scope of the present invention is also applicable to these changes and modifications. It is understood that it belongs to.
a…ハートビート、b…フェールオーバ、10…サーバマシン、11…アプリケーション、12…クラスタソフト、13…共有ディスク装置、14…通信路、15…データ領域、17…QUORUM用領域、18…アプリケーションデータ用領域、21…フィルタドライバ、22…ディスクドライバ、23…FCケーブル、24…コミットスレッド、25…メモリキャッシュ領域、30…マスター領域、31…QUORUM用ファイル、107…QUORUM用領域、170…共通領域、170a…コミット権管理テーブル、170b…パッチ領域保持状態管理テーブル、171…サーバA用領域、171a,172a…キャッシュ領域、171b,172b…パッチ領域、171c…データテーブル、172…サーバB用領域 a ... heartbeat, b ... failover, 10 ... server machine, 11 ... application, 12 ... cluster software, 13 ... shared disk device, 14 ... communication path, 15 ... data area, 17 ... QUIORUM area, 18 ... application data Area, 21 ... filter driver, 22 ... disk driver, 23 ... FC cable, 24 ... commit thread, 25 ... memory cache area, 30 ... master area, 31 ... QUIORUM file, 107 ... QUARUUM area, 170 ... common area, 170a ... Commit right management table, 170b ... Patch area holding state management table, 171 ... Server A area, 171a, 172a ... Cache area, 171b, 172b ... Patch area, 171c ... Data table, 172 ... Server B area
Claims (3)
前記複数のサーバマシンは、前記複数のサーバマシン上でそれぞれ動作するアプリケーションと、前記複数のサーバマシン上でそれぞれ動作するクラスタソフトと、前記複数のサーバマシン上でそれぞれ動作するフィルタドライバとを備え、
前記共有ディスク装置は、前記アプリケーションのデータを格納するマスター領域と、前記各サーバマシンのデータを格納する各サーバ用領域と、前記各サーバマシンで共有する共通領域とを備え、
各サーバ用領域は、それぞれデータを格納するためのキャッシュ領域及びパッチ領域を備え、
前記共通領域は、前記キャッシュ領域に格納されたデータの、前記マスター領域へのコピー許可であるコミット権が付与されたサーバマシンを規定したコミット権管理部を備え、
前記複数のサーバマシンに備えられた各クラスタソフトは、互いに定期的に通信して互いの生存状態を確認し合うと共に、それぞれ稼動系と待機系との2種類の状態を持ち、
前記クラスタソフトが稼動系の場合には、
前記クラスタソフトは、前記コミット権管理部を変更して自サーバマシンのみに前記コミット権が付与されるようにし、前記自サーバマシン側から前記マスター領域が見える状態にし、前記自サーバマシンに備えられたアプリケーションを起動させ、
前記自サーバマシンに備えられたフィルタドライバは、I/O入力を待ち、前記I/O入力が前記マスター領域への読取要求だった場合には、読取要求データの一部または全部が自サーバマシン用のキャッシュ領域にあれば前記キャッシュ領域から読み取り、前記読取要求データが他にもあれば前記マスター領域から読み取り、読み取ったデータを、前記読取要求をした前記I/O入力側に返し、前記I/O入力が前記マスター領域への書込要求だった場合であり、自サーバマシン用のキャッシュ領域に書き込むための空き容量がなく、自サーバマシンにコミット権が付与されているのであれば、前記キャッシュ領域のデータを前記マスター領域にコピーして前記キャッシュ領域をクリアし、自サーバマシンにコミット権が付与されていないのであれば前記書込要求をしたI/O入力側にエラーを返し、しかる後に前記マスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込み、この書き込み結果を前記書込要求をしたI/O入力側に返し、前記I/O入力が前記マスター領域への読取要求でも書込要求でもない場合には、前記自サーバマシンに備えられたフィルタドライバの下位側に前記I/O入力によるデータを受け渡し、返り値を前記I/O入力側へ返し、
前記クラスタソフトが待機系の場合であって、前記待機系のクラスタソフトが、稼動系のクラスタソフトが生存していないと判定した場合には、
前記判定したクラスタソフトは、前記コミット権管理部を変更して自サーバマシンにのみコミット権が付与されるようにし、前記稼動系のクラスタソフトが備えられているサーバマシン用のキャッシュ領域のデータを自サーバマシン用の前記パッチ領域にコピーして前記パッチ領域を前記マスター領域の一部として代用し、自サーバマシン側から前記マスター領域が見えるようにし、自サーバマシンに備えられたアプリケーションを起動し、
前記自サーバマシン上に備えられたフィルタドライバは、前記自サーバマシンに備えられたクラスタソフトが稼動系になった後、I/O入力を待ち、前記I/O入力が前記マスター領域への読取要求だった場合には、読取要求データの一部または全部が自サーバマシン用のパッチ領域にあれば前記パッチ領域から読み取り、読取要求データの一部または全部が自サーバマシン用のキャッシュ領域にあれば前記キャッシュ領域から読み取り、読取要求データが他にもあれば前記マスター領域から読み取り、読み取ったデータを、前記読取要求したI/O入力側に返し、前記I/O入力が前記マスター領域への書込要求だった場合には、書込要求先の全部が自サーバマシン用のパッチ領域にあれば前記パッチ領域に書き込んで前記I/O入力側に返し、そうでない場合には前記パッチ領域に該当するデータのみを前記パッチ領域に書き込み、自サーバマシン用のキャッシュ領域に書き込むための空き容量が無ければ前記コミット権管理部を参照して自サーバマシンにコミット権が付与されているか否かを確認し、付与されているなら前記マスター領域に自サーバマシン用のキャッシュ領域のデータをコピーして前記キャッシュ領域をクリアし、付与されていないなら前記I/O入力側にエラーを返し、しかる後に前記マスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込み、前記I/O入力側に返し、前記I/O入力が前記マスター領域への読取要求でも書込要求でもない場合には、前記自サーバマシンに備えられたフィルタドライバの下位層に前記I/O入力によるデータを受け渡し、返り値を前記I/O入力側へ返す
ようにしたクラスタシステム。 A cluster system composed of a plurality of server machines and a shared disk device connected to the plurality of server machines,
The plurality of server machines include an application that runs on each of the plurality of server machines, cluster software that runs on each of the plurality of server machines, and a filter driver that runs on each of the plurality of server machines,
The shared disk device includes a master area for storing data of the application, an area for each server for storing data of each server machine, and a common area shared by each server machine,
Each server area includes a cache area and a patch area for storing data, respectively.
The common area includes a commit right management unit that defines a server machine to which a commit right that is permission to copy data stored in the cache area to the master area is provided,
Each cluster software provided in the plurality of server machines communicates with each other periodically to check each other's survival state, and each has two types of states, an active system and a standby system,
If the cluster software is active,
The cluster software changes the commit right management unit so that only the own server machine is given the commit right, makes the master area visible from the own server machine side, and is provided in the own server machine. Start the application
The filter driver provided in the own server machine waits for I / O input, and when the I / O input is a read request to the master area, part or all of the read request data is the own server machine. If there is another read request data, it reads from the cache area, and if there is any other read request data, it reads from the master area, and returns the read data to the I / O input side that has made the read request. If / O input is a write request to the master area, if there is no free space to write to the cache area for the own server machine and the commit right is granted to the own server machine, The cache area is copied to the master area, the cache area is cleared, and the commit right is not granted to the local server machine If this is the case, an error is returned to the I / O input side that made the write request, and then the write position information in the master area and the written data are written into the cache area for the local server machine, and the write result is written to the write area. If the I / O input is neither a read request nor a write request for the master area, the I / O input is sent to the lower side of the filter driver provided in the server machine. Pass data by I / O input, and return the return value to the I / O input side,
When the cluster software is a standby system and the standby cluster software determines that the active cluster software is not alive,
The determined cluster software changes the commit right management unit so that the commit right is given only to the own server machine, and the cache area data for the server machine provided with the active cluster software is stored. Copy to the patch area for the local server machine, substitute the patch area as a part of the master area, make the master area visible from the local server machine side, and start the application provided on the local server machine ,
The filter driver provided on the local server machine waits for I / O input after the cluster software provided on the local server machine becomes active, and the I / O input is read into the master area. If it is a request, if part or all of the read request data is in the patch area for the local server machine, it is read from the patch area, and part or all of the read request data is in the cache area for the local server machine. Read from the cache area, if there is any other read request data, read from the master area, return the read data to the I / O input side that requested the read, and the I / O input to the master area If it is a write request, if all of the write request destinations are in the patch area for the local server machine, the write request is written in the patch area and the I / O input side If not, only the data corresponding to the patch area is written to the patch area, and if there is no free space to write to the cache area for the own server machine, refer to the commit right management unit and refer to the own server machine. Whether or not the commit right is granted to the master area, the cache area data for the local server machine is copied to the master area to clear the cache area, and if not granted, the I An error is returned to the / O input side, and then the write position information and the written data in the master area are written to the cache area for the own server machine, returned to the I / O input side, and the I / O input is If the request is neither a read request nor a write request to the master area, the filter driver provided in the local server machine is used. Cluster system adapted delivers the data by the I / O input to the lower layer of the server, and returns the return value to the I / O input.
前記複数のサーバマシンは、前記複数のサーバマシン上でそれぞれ動作するアプリケーションと、前記複数のサーバマシン上でそれぞれ動作するクラスタソフトと、前記複数のサーバマシン上でそれぞれ動作するフィルタドライバとを備え、
前記共有ディスク装置は、前記アプリケーションのデータを格納するマスター領域と、前記各サーバマシンのデータを格納する各サーバ用領域と、前記各サーバマシンで共有する共通領域とを備え、
各サーバ用領域は、それぞれデータを格納するためのキャッシュ領域及びパッチ領域を備え、
前記共通領域は、前記キャッシュ領域に格納されたデータの、前記マスター領域へのコピー許可であるコミット権が付与されたサーバマシンを規定したコミット権管理部を備え、
前記複数のサーバマシンに備えられた各クラスタソフトは、互いに定期的に通信して互いの生存状態を確認し合うと共に、それぞれ稼動系と待機系との2種類の状態を持ち、
前記プログラムは、前記クラスタソフトが稼動系の場合には、
前記クラスタソフトが、前記コミット権管理部を変更して自サーバマシンのみに前記コミット権が付与されるようにし、前記自サーバマシン側から前記マスター領域が見える状態にし、前記自サーバマシンに備えられたアプリケーションを起動させる機能、
前記自サーバマシンに備えられたフィルタドライバが、I/O入力を待ち、前記I/O入力が前記マスター領域への読取要求だった場合には、前記自サーバマシン用のキャッシュ領域を参照し、読取要求データの一部または全部が自サーバマシン用のキャッシュ領域にあれば前記キャッシュ領域から読み取り、前記読取要求データが他にもあれば前記マスター領域から読み取り、読み取ったデータを、前記読取要求をした前記I/O入力側に返し、前記I/O入力が前記マスター領域への書込要求だった場合であり、自サーバマシン用のキャッシュ領域に書き込むための空き容量がなく、自サーバマシンにコミット権が付与されているのであれば、前記キャッシュ領域のデータを前記マスター領域にコピーして前記キャッシュ領域をクリアし、自サーバマシンにコミット権が付与されていないのであれば前記書込要求をしたI/O入力側にエラーを返し、しかる後に前記マスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込み、この書き込み結果を前記書込要求をしたI/O入力側に返し、前記I/O入力が前記マスター領域への読取要求でも書込要求でもない場合には、前記自サーバマシンに備えられたフィルタドライバの下位側に前記I/O入力によるデータを受け渡し、返り値を前記I/O入力側へ返す機能を前記自サーバマシンに実現させ、
前記プログラムは更に、前記クラスタソフトが待機系の場合には、
前記待機系のクラスタソフトが、稼動系のクラスタソフトが生存しているか否かを判定し、生存していないと判定した場合、前記待機系のクラスタソフトが、前記コミット権管理部を変更して自サーバマシンにのみコミット権が付与されるようにし、前記稼動系のクラスタソフトが備えられているサーバマシン用のキャッシュ領域のデータを自サーバマシン用の前記パッチ領域にコピーして前記パッチ領域を前記マスター領域の一部として代用し、自サーバマシン側から前記マスター領域が見えるようにし、自サーバマシンに備えられたアプリケーションを起動する機能、
前記自サーバマシン上に備えられたフィルタドライバが、前記自サーバマシンに備えられたクラスタソフトが稼動系になった後、I/O入力を待ち、前記I/O入力が前記マスター領域への読取要求だった場合には、読取要求データの一部または全部が自サーバマシン用のパッチ領域にあれば前記パッチ領域から読み取り、前記自サーバマシン用のキャッシュ領域を参照し、読取要求データの一部または全部が自サーバマシン用のキャッシュ領域にあれば前記キャッシュ領域から読み取り、読取要求データが他にもあれば前記マスター領域から読み取り、読み取ったデータを、前記読取要求したI/O入力側に返し、前記I/O入力が前記マスター領域への書込要求だった場合には、書込要求先の全部が自サーバマシン用のパッチ領域にあれば前記パッチ領域に書き込んで前記I/O入力側に返し、そうでない場合には前記パッチ領域に該当するデータのみを前記パッチ領域に書き込み、自サーバマシン用のキャッシュ領域に書き込むための空き容量が無ければ前記コミット権管理部を参照して自サーバマシンにコミット権が付与されているか否かを確認し、付与されているなら自サーバマシン用のキャッシュ領域のデータを前記マスター領域にコピーして前記キャッシュ領域をクリアし、付与されていないなら前記I/O入力側にエラーを返し、しかる後に前記マスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込み、前記I/O入力側に返し、前記I/O入力が前記マスター領域への読取要求でも書込要求でもない場合には、前記自サーバマシンに備えられたフィルタドライバの下位層に前記I/O入力によるデータを受け渡し、返り値を前記I/O入力側へ返す機能
を前記自サーバマシンに実現させるためのプログラム。 A program applied to a cluster system composed of a plurality of server machines and a shared disk device connected to the plurality of server machines,
The plurality of server machines include an application that runs on each of the plurality of server machines, cluster software that runs on each of the plurality of server machines, and a filter driver that runs on each of the plurality of server machines,
The shared disk device includes a master area for storing data of the application, an area for each server for storing data of each server machine, and a common area shared by each server machine,
Each server area includes a cache area and a patch area for storing data, respectively.
The common area includes a commit right management unit that defines a server machine to which a commit right that is permission to copy data stored in the cache area to the master area is provided,
Each cluster software provided in the plurality of server machines communicates with each other periodically to check each other's survival state, and each has two types of states, an active system and a standby system,
When the cluster software is active, the program is
The cluster software changes the commit right management unit so that only the own server machine is granted the commit right, makes the master area visible from the own server machine side, and is provided in the own server machine. A function to start
The filter driver provided in the own server machine waits for I / O input, and when the I / O input is a read request to the master area, the cache area for the own server machine is referred to, If some or all of the read request data is in the cache area for its own server machine, it is read from the cache area, and if there is any other read request data, it is read from the master area. The I / O input is returned to the I / O input side, and the I / O input is a write request to the master area, and there is no free space for writing to the cache area for the own server machine. If the commit right is granted, the cache area is cleared by copying the data in the cache area to the master area. If the commit right is not given to the own server machine, an error is returned to the I / O input side that made the write request, and then the write position information in the master area and the written data are returned for the own server machine. When writing to the cache area and returning the write result to the I / O input side that has made the write request, and the I / O input is neither a read request nor a write request to the master area, the local server machine A function of passing the data by the I / O input to the lower side of the filter driver provided in the server and returning a return value to the I / O input side in the local server machine ,
The program is further provided when the cluster software is a standby system.
When the standby cluster software determines whether the active cluster software is alive, and determines that the active cluster software is not alive, the standby cluster software changes the commit right management unit. The commit right is granted only to the local server machine, and the cache area data for the server machine provided with the active cluster software is copied to the patch area for the local server machine to copy the patch area. Substituting as a part of the master area, making the master area visible from the own server machine side, and starting an application provided in the own server machine,
The filter driver provided on the local server machine waits for I / O input after the cluster software provided on the local server machine becomes active, and the I / O input is read into the master area. If it is a request, if a part or all of the read request data is in the patch area for the own server machine, read from the patch area, refer to the cache area for the own server machine, and Or, if all are in the cache area for the server machine, read from the cache area, if there is other read request data, read from the master area, and return the read data to the I / O input side that requested the read When the I / O input is a write request to the master area, all the write request destinations must be in the patch area for the own server machine. Write to the patch area and return to the I / O input side; otherwise, only the data corresponding to the patch area is written to the patch area and there is no free space to write to the cache area for the local server machine. For example, the commit right management unit is referred to confirm whether or not the commit right is granted to the own server machine. If granted, the cache area data for the own server machine is copied to the master area and The cache area is cleared, and if it is not granted, an error is returned to the I / O input side. Thereafter, the write position information in the master area and the written data are written into the cache area for the own server machine, and the I / O When the I / O input is neither a read request nor a write request to the master area. The I / O input passes the data by, the return value the program for a function that returns the I / O input side to realize the local server machine to the lower layer of the filter driver that the provided in the own server machine.
前記各フィルタドライバは、前記自サーバマシンのキャッシュ領域と同じデータを持つメモリキャッシュ領域をそれぞれ備え、
前記自サーバマシン用のキャッシュ領域を参照する代わりに、前記自サーバマシン用のメモリキャッシュ領域を参照し、前記マスター領域における書き込み位置情報と書き込んだデータとを自サーバマシン用のキャッシュ領域に書き込む代わりに、前記自サーバマシン用のメモリキャッシュ領域およびキャッシュ領域に書き込み、前記キャッシュ領域のデータを前記マスター領域にコピーする代わりに、前記メモリキャッシュ領域のデータを前記マスター領域にコピーするプログラム。 The program according to claim 2,
Each filter driver, each comprise a memory cache area having the same data as the cache area of the local server machine,
Instead of referring to the cache area for the own server machine, instead of referring to the memory cache area for the own server machine, the write position information in the master area and the written data are written to the cache area for the own server machine. In addition, a program for copying data in the memory cache area to the master area instead of writing to the memory cache area and the cache area for the server machine and copying the data in the cache area to the master area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007081623A JP5002296B2 (en) | 2007-03-27 | 2007-03-27 | Cluster system and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007081623A JP5002296B2 (en) | 2007-03-27 | 2007-03-27 | Cluster system and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008242741A JP2008242741A (en) | 2008-10-09 |
JP5002296B2 true JP5002296B2 (en) | 2012-08-15 |
Family
ID=39914022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007081623A Active JP5002296B2 (en) | 2007-03-27 | 2007-03-27 | Cluster system and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5002296B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5532687B2 (en) * | 2009-06-03 | 2014-06-25 | 日本電気株式会社 | Information processing system, failure handling mechanism of information processing system, and failure handling method of information processing system |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2830857B2 (en) * | 1996-09-09 | 1998-12-02 | 三菱電機株式会社 | Data storage system and data storage management method |
JP2001109642A (en) * | 1999-10-08 | 2001-04-20 | Toshiba Corp | Cluster system and data copying method therefor |
JP2001331467A (en) * | 2000-05-23 | 2001-11-30 | Mitsubishi Electric Corp | Computer system |
JP4257053B2 (en) * | 2001-09-14 | 2009-04-22 | 日本電気株式会社 | Shared resource exclusion control method and method |
JP2005122453A (en) * | 2003-10-16 | 2005-05-12 | Hitachi Ltd | Disk controller control system for storage device, and the storage device |
JP2005128781A (en) * | 2003-10-23 | 2005-05-19 | Hitachi Ltd | System changeover method and information processing system |
JP4420275B2 (en) * | 2003-11-12 | 2010-02-24 | 株式会社日立製作所 | Failover cluster system and program installation method using failover cluster system |
JP4671738B2 (en) * | 2005-04-01 | 2011-04-20 | 株式会社日立製作所 | Storage system and storage area allocation method |
-
2007
- 2007-03-27 JP JP2007081623A patent/JP5002296B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2008242741A (en) | 2008-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9430484B2 (en) | Data redundancy in a cluster system | |
US6996672B2 (en) | System and method for active-active data replication | |
US9983962B2 (en) | Storage system and data management method of journaling and storing remote copies | |
US7542987B2 (en) | Automatic site failover | |
US20180074924A1 (en) | Third vote consensus in a cluster using shared storage devices | |
EP2953026B1 (en) | Target-driven independent data integrity and redundancy recovery in a shared-nothing distributed storage system | |
JP5102826B2 (en) | Using volume containers for replication and provisioning management | |
JP2021012476A (en) | Dispersion storage system, control method of dispersion storage system, and storage medium | |
US20150012699A1 (en) | System and method of versioning cache for a clustering topology | |
CN110515557B (en) | Cluster management method, device and equipment and readable storage medium | |
US10152270B2 (en) | Storage system | |
JP5002296B2 (en) | Cluster system and program | |
JP2009265973A (en) | Data synchronization system, failure recovery method, and program | |
JP3955453B2 (en) | Control method of external storage device | |
US10656867B2 (en) | Computer system, data management method, and data management program | |
JP4693867B2 (en) | Computer system | |
JP2021033782A (en) | Remote copy system | |
JP4808793B2 (en) | Fault management apparatus and program | |
JP4028833B2 (en) | Apparatus, method and computer program for controlling I / O operations of storage area in network of storage area controller node | |
JP2008242742A (en) | Cluster system | |
JP5490067B2 (en) | Fault management apparatus and program | |
JP5425146B2 (en) | Fault management apparatus and program | |
McKenney | Kernel Korner Storage Improvements in 2.6 and for |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20091016 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110427 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110517 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120313 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120404 |
|
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: 20120424 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120521 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5002296 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150525 Year of fee payment: 3 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20120529 |
|
A072 | Dismissal of procedure |
Free format text: JAPANESE INTERMEDIATE CODE: A072 Effective date: 20121030 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |