JP4874847B2 - Cluster system - Google Patents

Cluster system Download PDF

Info

Publication number
JP4874847B2
JP4874847B2 JP2007081624A JP2007081624A JP4874847B2 JP 4874847 B2 JP4874847 B2 JP 4874847B2 JP 2007081624 A JP2007081624 A JP 2007081624A JP 2007081624 A JP2007081624 A JP 2007081624A JP 4874847 B2 JP4874847 B2 JP 4874847B2
Authority
JP
Japan
Prior art keywords
server
server machine
cluster
access
machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2007081624A
Other languages
Japanese (ja)
Other versions
JP2008242742A (en
Inventor
孝治 村松
哲也 飯沼
茂夫 大道
雅 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions 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, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2007081624A priority Critical patent/JP4874847B2/en
Publication of JP2008242742A publication Critical patent/JP2008242742A/en
Application granted granted Critical
Publication of JP4874847B2 publication Critical patent/JP4874847B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Description

本発明は、複数のサーバマシンを備えてなるクラスタシステム及びプログラムに関し、特に、フェールオーバが発生した場合であっても、データの整合を図ることが可能なクラスタシステムに関する。   The present invention relates to a cluster system and a program including a plurality of server machines, and more particularly to a cluster system capable of matching data even when a failover occurs.

例えば、非特許文献1で開示されているシステムに代表されるクラスタシステムでは、図20に示すように、稼動系のサーバマシン10(#A)と待機系のサーバマシン10(#B)とが設けられ、稼動系のサーバマシン10(#A)がアプリケーション11(#A)を実行し、(101)に示すように、実行結果であるデータをミラーリングディスク装置20(#A)に書き込む。その間、(102)に示すように、稼動系のサーバマシン10(#A)のクラスタソフト12(#A)と待機系のサーバマシン10(#B)のクラスタソフト12(#B)とは、通信路50を経由して、ハートビートaと呼ばれる所定のパケット交換をし続け、互いの生存を通知し合う。   For example, in a cluster system represented by the system disclosed in Non-Patent Document 1, as shown in FIG. 20, there are an active server machine 10 (#A) and a standby server machine 10 (#B). The active server machine 10 (#A) is executed, and the application 11 (#A) is executed, and the execution result data is written to the mirroring disk device 20 (#A) as indicated by (101). Meanwhile, as shown in (102), the cluster software 12 (#A) of the active server machine 10 (#A) and the cluster software 12 (#B) of the standby server machine 10 (#B) are: A predetermined packet called heartbeat a is continuously exchanged via the communication path 50 to notify each other of their survival.

更に、(103)に示すように、ハートビート継続中は、常時ミラーリングを行うことによって、ミラーリングディスク装置20(#A)に格納されたデータが、ミラーリングディスク装置20(#B)にミラーリングされる。   Further, as shown in (103), the data stored in the mirroring disk device 20 (#A) is mirrored to the mirroring disk device 20 (#B) by always performing mirroring while the heartbeat continues. .

このような状態において、クラスタソフト12(#B)が、ハートビートaの断絶を検出すると、(104)に示すように、待機系のサーバマシン10(#B)で同一のアプリケーション11(#B)を起動させることでアプリケーション処理を継続させる、所謂フェールオーバbが一般に行われている。   In this state, when the cluster software 12 (#B) detects the disconnection of the heartbeat a, as shown in (104), the same application 11 (#B) is used 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]通信路50の障害。
[3]稼動系のサーバマシン10(#A)におけるCPU高負荷等による一時的なスローダウンの発生。
The main reasons for the heartbeat a breaking are as follows.
[1] Down of the active server machine 10 (#A).
[2] Communication path 50 failure.
[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 the above [1], it is sufficient to simply fail over to the standby server machine 10 (#B), but in the case of [2] and [3], the active server machine 10 (# Since A) continues the processing, the following inconvenience occurs when failover b occurs.

すなわち、図21に示すように、複数台のサーバマシン10(#A,#B)で通信回線52を経由してミラーリングディスク装置20(#A),20(#B)をミラーリングした状態で、データベースサーバアプリケーション(以降「DBサーバ」と称する)13(#A,#B)を対象にクラスタを構成する場合、上記[3]が原因のハートビートa断絶によりフェールオーバbが発生すると、ミラーリングディスク装置20(#A),20(#B)間のミラーリングは強制的に停止される。これは、待機系であったサーバマシン10(#B)で新たに実行するDBサーバ13(#B)からのwriteと、稼動系であったサーバマシン10(#A)のDBサーバ13(#A)からのwriteの混在によるデータ破壊を避けるためである。   That is, as shown in FIG. 21, in the state in which the mirroring disk devices 20 (#A) and 20 (#B) are mirrored via the communication line 52 in a plurality of server machines 10 (#A and #B), When a cluster is configured for a database server application (hereinafter referred to as “DB server”) 13 (#A, #B), if failover b occurs due to heartbeat a interruption caused by [3] above, a mirroring disk device Mirroring between 20 (#A) and 20 (#B) is forcibly stopped. This is because the write from the DB server 13 (#B) newly executed on the server machine 10 (#B) that is the standby system and the DB server 13 (# #) of the server machine 10 (#A) that is the active system. This is to avoid data destruction due to the mixed write from A).

しかしながら、待機系であったサーバマシン10(#B)が、稼動系であったサーバマシン10(#A)のIPアドレスやデータ等を全て引き継ぐために、データベースクライアント(以降、「DBクライアント」と称する)61は、DBサーバ13(#A)がDBサーバ13(#B)へフェールオーバしたことを意識せず、トランザクションの整合性が崩れる可能性がある。   However, in order for the server machine 10 (#B) that is the standby system to take over all of the IP address, data, and the like of the server machine 10 (#A) that is the active system, the database client (hereinafter referred to as “DB client”). 61) does not recognize that the DB server 13 (#A) has failed over to the DB server 13 (#B), and there is a possibility that transaction consistency may be lost.

例えば、図21に示すように、サーバマシン10(#A)のDBサーバ13(#A)が、クライアント60内のDBクライアント61からのコミット要求を受け(201)、そのままスローダウンした場合(202)、クラスタソフト12(#B)がハートビートa切れを検出する(203)ことにより、ミラーリングが中止される(204)とともに、サーバマシン10(#B)はフェールオーバを行う(205)。しかし、その後復帰したサーバマシン10(#A)のDBサーバ13(#A)は、自らのミラーリングディスク装置20(#A)にwriteし、正常終了する(206)。このとき、ミラーリングは既に停止されているので行われない(207)が、DBクライアント61にコミット成功を返す(208)。   For example, as shown in FIG. 21, when the DB server 13 (#A) of the server machine 10 (#A) receives a commit request from the DB client 61 in the client 60 (201) and slows down as it is (202 ) When the cluster software 12 (#B) detects that the heartbeat a is expired (203), the mirroring is stopped (204) and the server machine 10 (#B) performs failover (205). However, the DB server 13 (#A) of the restored server machine 10 (#A) writes to its mirroring disk device 20 (#A) and completes normally (206). At this time, since mirroring is already stopped, it is not performed (207), but a commit success is returned to the DB client 61 (208).

しかし、サーバマシン10(#B)にはこのコミットが反映されていないため、フェールオーバ後にサーバマシン10(#B)が、DBクライアント61からのロールバック要求を受けると(209)、サーバマシン10(#B)のDBサーバ13(#B)は、DBクライアント61が意図したチェックポイントよりも1つ前のチェックポイントまでロールバックされてしまう(210)。さらにその後、DBクライアント61からサーバマシン10(#B)に対してなされた要求(211)にしたがって、データベースBにてデータベースの更新やコミットが行われると(212)、サーバマシン10(#A)のDBサーバ13(#A)もサーバマシン10(#B)のDBサーバ13(#B)も、本来あるべき姿とは異なる状態になってしまう。   However, since this commit is not reflected in the server machine 10 (#B), when the server machine 10 (#B) receives a rollback request from the DB client 61 after failover (209), the server machine 10 (#B) The DB server 13 (#B) of #B) is rolled back to a checkpoint one before the checkpoint intended by the DB client 61 (210). After that, when the database is updated or committed in the database B according to the request (211) made from the DB client 61 to the server machine 10 (#B) (212), the server machine 10 (#A) The DB server 13 (#A) of the server and the DB server 13 (#B) of the server machine 10 (#B) will be in different states from what they should be.

同様の問題は、図22に示すように、ミラーリングディスク装置20(#A,#B)の代わりに、サーバマシン10(#A)によってなされたデータを書き込むためのサーバA用データ領域32(#A)と、サーバマシン10(#B)によってなされたデータを書き込むためのサーバB用データ領域32(#B)とを備えた共有ディスク装置31を用い、クラスタを組んだ場合においても発生する可能性がある。   As shown in FIG. 22, the same problem occurs in the server A data area 32 (# for writing data made by the server machine 10 (#A) instead of the mirroring disk device 20 (#A, #B). This can occur even when a cluster is formed by using the shared disk device 31 including A) and the server B data area 32 (#B) for writing data made by the server machine 10 (#B). There is sex.

すなわち、図22に示すように、サーバマシン10(#A)のDBサーバ13(#A)が、クライアント60内のDBクライアント61からのコミット要求を受け(301)、そのままスローダウンした場合(302)、クラスタソフト12(#B)がハートビートa切れを検出すると(303)、サーバA用データ領域32(#A)のデータがサーバB用データ領域32(#B)にコピーされる(304)とともに、サーバマシン10(#B)はフェールオーバを行う(305)。しかし、その後復帰したサーバマシン10(#A)のDBサーバ13(#A)は、サーバA用データ領域32(#A)にwriteし、正常終了し(306)、DBクライアント61にコミット成功を返す(307)。   That is, as shown in FIG. 22, when the DB server 13 (#A) of the server machine 10 (#A) receives a commit request from the DB client 61 in the client 60 (301) and slows down as it is (302) ) When the cluster software 12 (#B) detects that the heartbeat a is expired (303), the data in the server A data area 32 (#A) is copied to the server B data area 32 (#B) (304). ), The server machine 10 (#B) performs failover (305). However, the DB server 13 (#A) of the server machine 10 (#A) that has returned thereafter writes to the server A data area 32 (#A), ends normally (306), and commits successfully to the DB client 61. Return (307).

しかし、サーバマシン10(#B)にはこのコミットが反映されていないため、フェールオーバ後にサーバマシン10(#B)が、DBクライアント61からのロールバック要求を受けると(308)、サーバマシン10(#B)のDBサーバ13(#B)は、DBクライアント61が意図したチェックポイントよりも1つ前のチェックポイントまでロールバックされてしまう(309)。さらにその後、DBクライアント61からサーバマシン10(#B)に対してなされた要求(310)にしたがって、DBサーバ13(#B)にてデータベースの更新やコミットが行われると(311)、サーバマシン10(#A)のDBサーバ13(#A)もサーバマシン10(#B)のDBサーバ13(#B)も、本来あるべき姿とは異なる状態になってしまう。   However, since this commit is not reflected in the server machine 10 (#B), when the server machine 10 (#B) receives a rollback request from the DB client 61 after failover (308), the server machine 10 (#B) The DB server 13 (#B) of #B) is rolled back to a checkpoint one before the checkpoint intended by the DB client 61 (309). Thereafter, when the database server 13 (#B) updates or commits the database (311) according to the request (310) made from the DB client 61 to the server machine 10 (#B), the server machine The DB server 13 (#A) of the 10 (#A) and the DB server 13 (#B) of the server machine 10 (#B) will be in different states from what they should be.

以上のことから、従来のクラスタシステムでは、元稼動系であったサーバマシン10(#A)が復帰してハートビートaが復活した場合には、即座にサーバマシン10(#A)及びサーバマシン10(#B)を停止あるいは再起動したり、クラスタソフト12(#A),12(#B)間の通信路50を多重化することにより、通信路50の一つに障害が発生した場合であってもハートビートaの断絶が発生しないような対策が講じられている。
東芝レビュー Vol.54 No.12(1999)、18〜21ページ
From the above, in the conventional cluster system, when the server machine 10 (#A) that was the original active system is restored and the heartbeat a is restored, the server machine 10 (#A) and the server machine are immediately restored. 10 (#B) is stopped or restarted, or a failure occurs in one of the communication paths 50 by multiplexing the communication paths 50 between the cluster software 12 (#A) and 12 (#B) Even so, measures are taken to prevent the heartbeat a from being interrupted.
Toshiba Review Vol. 54 No. 12 (1999), pages 18-21

しかしながら、このような従来のクラスタシステムでは、以下のような問題がある。   However, such a conventional cluster system has the following problems.

すなわち、上述した対策を講じても、上記[3]稼動系のサーバマシン10におけるCPU高負荷等により一時的なスローダウンが発生した場合には、フェールオーバした直後にトランザクションの不整合が発生するという可能性を完全に回避できるものではないという問題がある。   That is, even if the above measures are taken, if a temporary slowdown occurs due to a high CPU load or the like in the [3] active server machine 10, transaction inconsistency occurs immediately after failover. There is a problem that the possibility is not completely avoided.

この不整合は、例えば図22に示すクラスタシステムを、図23に示すように、共有ディスク装置31に共有領域33を設け、共有領域33に格納されたディスクアクセス権管理テーブル33aによって共有ディスク装置31へのアクセス権を管理するとともに、サーバマシン10にフィルタドライバ14を設け、共有ディスク装置31へのデータの書き込み(Write)や読み出し(Read)(以下、I/Oと呼ぶ)が発生するたびにアクセス権の有無に応じて処理結果を上位であるクライアント60に戻す方式をとり、フェールオーバ時に、待機系であるサーバマシン10(#B)が、稼動系であるサーバマシン10(#A)のアクセス権を奪うように改良することによって回避することができる。   For example, in the cluster system shown in FIG. 22, a shared area 33 is provided in the shared disk apparatus 31 as shown in FIG. 23, and the shared disk apparatus 31 is managed by the disk access right management table 33a stored in the shared area 33. The server machine 10 is provided with a filter driver 14 every time data write (Write) or read (Read) (hereinafter referred to as I / O) occurs in the shared disk device 31. A method of returning the processing result to the upper client 60 according to the presence or absence of the access right is used, and at the time of failover, the server machine 10 (#B) as the standby system accesses the server machine 10 (#A) as the active system It can be avoided by improving to take away the right.

すなわち、この構成では、サーバマシン10(#A)のDBサーバ13(#A)が、クライアント60内のDBクライアント61からのコミット要求を受け(401)、そのままスローダウンした場合(402)、クラスタソフト12(#B)がハートビートa切れを検出すると(403)、クラスタソフト12(#B)は更に、ディスクアクセス権管理テーブル33aを、サーバマシン10(#A)ではなくサーバマシン10(#B)に共有ディスク装置31へのアクセス権が与えられるように書き換える(404)。   That is, in this configuration, when the DB server 13 (#A) of the server machine 10 (#A) receives a commit request from the DB client 61 in the client 60 (401) and slows down as it is (402), the cluster When the software 12 (#B) detects that the heartbeat a is expired (403), the cluster software 12 (#B) further sets the disk access right management table 33a in the server machine 10 (#A) instead of the server machine 10 (#A). B) is rewritten so that the access right to the shared disk device 31 is given (404).

その後、サーバA用データ領域32(#A)のデータがサーバB用データ領域32(#B)にコピーされる(405)とともに、サーバマシン10(#B)がフェールオーバする(406)。しかし、その後サーバマシン10(#A)のDBサーバ13(#A)が復帰すると、フィルタドライバ14(#A)は、DBサーバ13(#A)による処理結果をサーバA用データ領域32(#A)にwriteし(407)、更に、ディスクアクセス権管理テーブル33aを参照して、サーバマシン10(#A)にアクセス権が与えられているかを確認する(408)。   Thereafter, the data in the server A data area 32 (#A) is copied to the server B data area 32 (#B) (405), and the server machine 10 (#B) fails over (406). However, when the DB server 13 (#A) of the server machine 10 (#A) is subsequently restored, the filter driver 14 (#A) displays the processing result of the DB server 13 (#A) as the server A data area 32 (# A) is written to (A) (407), and further, referring to the disk access right management table 33a, it is confirmed whether or not the access right is given to the server machine 10 (#A) (408).

そして、アクセス権が与えられていれば正常リターンがフィルタドライバ14(#A)からDBサーバ13(#A)へ返され、アクセス権が与えられていなければエラーリターンが返される(409)。この場合、サーバマシン10(#B)にアクセス権が与えられているので、エラーが返される。更に、このエラーがDBサーバ13(#A)からDBクライアント61へ返される(410)。   If the access right is given, a normal return is returned from the filter driver 14 (#A) to the DB server 13 (#A). If the access right is not given, an error return is returned (409). In this case, since an access right is given to the server machine 10 (#B), an error is returned. Further, this error is returned from the DB server 13 (#A) to the DB client 61 (410).

これによりクライアント60は、(401)でサーバマシン10(#A)に行ったコミット要求に対する処理がエラーになったことを把握し、今度はサーバマシン10(#B)に要求することによりコミット要求のリトライを行う(411)。それに対しDBサーバ13(#B)がコミット要求完了をDBクライアント61に通知する(412)。さらにその後、DBクライアント61がサーバマシン10(#B)に対して行ったデータベース更新要求(413)にしたがって、DBサーバ13(#B)にてデータベースの更新が行われる(414)。   As a result, the client 60 grasps that the processing for the commit request made to the server machine 10 (#A) in (401) has an error, and this time requests the server machine 10 (#B) to make a commit request. Is retried (411). In response to this, the DB server 13 (#B) notifies the DB client 61 of the completion of the commit request (412). Thereafter, the database is updated in the DB server 13 (#B) in accordance with the database update request (413) made by the DB client 61 to the server machine 10 (#B) (414).

その後は、DBクライアント61からDBサーバ13(#B)に対してデータベースのロールバック要求がなされ(415)、それに対して、DBサーバ13(#B)からDBクライアント61へロールバック要求完了(成功)が通知される(416)。続いて、DBクライアント61からDBサーバ13(#B)に対してデータベースの更新要求がなされ(417)、それに対して、DBサーバ13(#B)からDBクライアント61へ更新要求完了(成功)が通知される(418)。更に、DBクライアント61からDBサーバ13(#B)に対してコミット要求がなされ(419)、それに対して、DBサーバ13(#B)からDBクライアント61へコミット要求完了(成功)が通知される(420)。   Thereafter, a database rollback request is made from the DB client 61 to the DB server 13 (#B) (415). In response to this, a rollback request is completed from the DB server 13 (#B) to the DB client 61 (success). ) Is notified (416). Subsequently, a database update request is made from the DB client 61 to the DB server 13 (#B) (417). In response to this, an update request completion (success) is sent from the DB server 13 (#B) to the DB client 61. Notification is made (418). Further, a commit request is made from the DB client 61 to the DB server 13 (#B) (419), and in response thereto, the commit request completion (success) is notified from the DB server 13 (#B) to the DB client 61. (420).

しかしながら、図23に示すような構成では、ディスクI/O(readやwrite)が1回発生するたびに共有ディスク装置31へのI/O(readやwrite)が1回発生するため、ディスクI/Oの性能劣化が大きくなってしまうという新たな問題が発生する。   However, in the configuration shown in FIG. 23, each time a disk I / O (read or write) occurs once, I / O (read or write) to the shared disk device 31 occurs once. A new problem arises that the performance degradation of / O becomes large.

一方、図24は、図23に示すような改良点を、図21に示すミラーリングディスク装置20を備えたクラスタシステムに適用した構成を示す。   On the other hand, FIG. 24 shows a configuration in which the improvement as shown in FIG. 23 is applied to the cluster system including the mirroring disk device 20 shown in FIG.

すなわち、この構成では、サーバマシン10(#A)のDBサーバ13(#A)が、クライアント60内のDBクライアント61からのコミット要求を受け(501)、これに基づいてフィルタドライバ14(#A)が、コミット要求に対応するwriteをミラーリングディスク装置20(#A)に発行する(502)。   That is, in this configuration, the DB server 13 (#A) of the server machine 10 (#A) receives a commit request from the DB client 61 in the client 60 (501), and based on this, the filter driver 14 (#A ) Issues a write corresponding to the commit request to the mirroring disk device 20 (#A) (502).

そして、その後、ミラーリングディスク装置20(#A)が、ミラーリングディスク装置20(#B)にデータをコピーしてミラーリングする際に、サーバマシン10(#A)がスローダウンし(503)、その後復帰するものとする。この場合、スローダウンが発生した時点でクラスタソフト12(#B)がハートビートa切れを検出する(504)。その後、サーバマシン10(#A)が復帰しても、通信タイムアウト等によりミラーリングディスク装置20(#A)からミラーリングディスク装置20(#B)へのミラーリングは失敗してしまう(505)。   After that, when the mirroring disk device 20 (#A) copies and mirrors data to the mirroring disk device 20 (#B), the server machine 10 (#A) slows down (503) and then returns. It shall be. In this case, when the slowdown occurs, the cluster software 12 (#B) detects that the heartbeat a has expired (504). Thereafter, even if the server machine 10 (#A) returns, mirroring from the mirroring disk device 20 (#A) to the mirroring disk device 20 (#B) fails due to a communication timeout or the like (505).

その後、フィルタドライバ14(#A)は、ディスクアクセス権管理テーブル33aを参照して、サーバマシン10(#A)にアクセス権が与えられているかを確認する(506)。この時点で、クラスタソフト12(#B)によって、ディスクアクセス権管理テーブル33aが、アクセス権がサーバマシン10(#B)に与えられるように書き換えられていなければ、すなわち、(506)のタイミングの後に、クラスタソフト12(#B)によって、ディスクアクセス権管理テーブル33aが、アクセス権がサーバマシン10(#B)に与えられるように書き換えられる(507)のであれば、フィルタドライバ14(#A)は、DBサーバ13(#A)に正常リターンを返す(508)。   Thereafter, the filter driver 14 (#A) refers to the disk access right management table 33a and confirms whether the access right is given to the server machine 10 (#A) (506). At this time, the disk access right management table 33a is not rewritten by the cluster software 12 (#B) so that the access right is given to the server machine 10 (#B), that is, at the timing of (506). Later, if the cluster software 12 (#B) rewrites the disk access right management table 33a so that the access right is given to the server machine 10 (#B) (507), the filter driver 14 (#A) Returns a normal return to the DB server 13 (#A) (508).

その後、サーバマシン10(#B)がフェールオーバする(509)。一方、DBサーバ13(#A)は、DBクライアント61へコミット処理結果(成功)を通知する(510)。   Thereafter, the server machine 10 (#B) fails over (509). On the other hand, the DB server 13 (#A) notifies the DB client 61 of the commit processing result (success) (510).

しかし、サーバマシン10(#B)にはこのコミットが反映されていないため、フェールオーバ後にサーバマシン10(#B)が、DBクライアント61からのロールバック要求を受けると(511)、サーバマシン10(#B)のDBサーバ13(#B)は、DBクライアント61が意図したチェックポイントよりも1つ前のチェックポイントまでロールバックされてしまう(512)。さらにその後、DBクライアント61からサーバマシン10(#B)に対してなされた要求(513)にしたがって、DBサーバ13(#B)にてデータベースの更新やコミットが行われると(514)、サーバマシン10(#A)のDBサーバ13(#A)もサーバマシン10(#B)のDBサーバ13(#B)も、本来あるべき姿とは異なる状態になってしまう。   However, since this commit is not reflected in the server machine 10 (#B), when the server machine 10 (#B) receives a rollback request from the DB client 61 after the failover (511), the server machine 10 (#B) The DB server 13 (#B) of #B) is rolled back to a checkpoint one before the checkpoint intended by the DB client 61 (512). Thereafter, when the database server 13 (#B) updates or commits the database (514) according to the request (513) made from the DB client 61 to the server machine 10 (#B), the server machine The DB server 13 (#A) of the 10 (#A) and the DB server 13 (#B) of the server machine 10 (#B) will be in different states from what they should be.

このように、図23に示すような改良点を、ミラーリングディスク装置20を備えたクラスタシステムに適用した場合には、フェールオーバした直後にトランザクションの不整合が発生するという可能性を完全に回避できるものではないという問題は依然として解決されない。   As described above, when the improvement as shown in FIG. 23 is applied to the cluster system including the mirroring disk device 20, the possibility that transaction inconsistency occurs immediately after failover can be completely avoided. The problem is not solved.

本発明はこのような事情に鑑みてなされたものであり、複数のサーバマシンを備えてなるクラスタシステムにおいて、フェールオーバが発生した場合であっても、ディスクI/Oの性能劣化を抑えながら、トランザクションの整合を図ることが可能なクラスタシステム及びプログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, and in a cluster system including a plurality of server machines, even if a failover occurs, a transaction can be performed while suppressing deterioration in disk I / O performance. It is an object of the present invention to provide a cluster system and a program capable of matching the above.

上記の目的を達成するために、本発明では、以下のような手段を講じる。   In order to achieve the above object, the present invention takes the following measures.

すなわち、請求項1の発明は、複数のサーバマシンと、複数のサーバマシンに共有して接続された共有ディスク装置とから構成されたクラスタシステムであって、複数のサーバマシンは、複数のサーバマシン上でそれぞれ動作するアプリケーションと、複数のサーバマシン上でそれぞれ動作するクラスタソフトと、複数のサーバマシン上でそれぞれ動作するフィルタドライバと、複数のサーバマシン上でそれぞれ動作する有効期限通知デーモンとを備えている。また、共有ディスク装置は、各サーバマシンのデータをそれぞれ格納する各サーバ用データ領域と、各サーバマシンで共有する共有領域とを備え、共有領域は、各サーバマシンのそれぞれについて、共有ディスク装置へのアクセスの許可又は不許可が設定されたアクセス情報を管理するアクセス管理部を備えている。   That is, the invention of claim 1 is a cluster system comprising a plurality of server machines and a shared disk device shared and connected to the plurality of server machines, wherein the plurality of server machines are a plurality of server machines. Each of the above applications, cluster software that runs on multiple server machines, filter drivers that run on multiple server machines, and expiration date notification daemons that run on multiple server machines ing. The shared disk device includes a server data area for storing data of each server machine, and a shared area shared by each server machine. The shared area is connected to the shared disk device for each server machine. An access management unit for managing access information in which permission or denial of access is set.

また、有効期限通知デーモンは、アクセス管理部によって管理されているアクセス情報を定期的に参照し、自サーバマシンによるアクセスが許可されているのであれば、現在時間に所定時間を加えた有効期限を設定し、この有効期限を自サーバマシンのフィルタドライバに通知し、複数のサーバマシンに備えられた各クラスタソフトは、互いに定期的に通信して互いのサーバマシンの生存状態を確認し合うと共に、それぞれ稼動系と待機系との2種類の状態を持つ。   The expiration notification daemon periodically refers to the access information managed by the access management unit, and if access by the local server machine is permitted, the expiration notification daemon adds a predetermined time to the current time. Set and notify the filter driver of this server machine of this expiration date, and each cluster software provided in multiple server machines communicate with each other periodically to check the survival status of each other's server machine, Each has two types of states, an active system and a standby system.

そして、クラスタソフトが稼動系になる際には、このクラスタソフトは、アクセス管理部に管理されたアクセス情報を、自サーバマシンのみがアクセスを許可されるように変更し、自サーバマシン側から自サーバマシンのサーバ用データ領域が見える状態にし、自サーバマシンに備えられたアプリケーションを起動させる。クラスタソフトが稼動系になった後は、稼動系のサーバマシンのフィルタドライバは、I/O入力を待ち、I/O入力の処理結果の一部あるいは全てが成功の場合、現在時間を確認し、現在時間が、有効期限通知デーモンから通知された有効期限内であれば処理結果をI/O入力側へ返し、有効期限内でなければI/O入力側へエラーを返す。待機系のサーバマシンのクラスタソフトが、稼動系のサーバマシンが生存していないと判定した場合には、待機系のサーバマシンのクラスタソフトは、アクセス管理部に管理されたアクセス情報を、自サーバマシンのみがアクセスを許可されるように変更し、所定時間待機した後に、自サーバマシン側から自サーバマシンのサーバ用データ領域が見える状態にするとともに、自サーバマシンに備えられたアプリケーションを起動させる。   When the cluster software becomes an active system, the cluster software changes the access information managed by the access management unit so that only the local server machine is allowed access, and the local server machine automatically changes the access information. Make the server data area of the server machine visible, and start the application provided on the server machine. After the cluster software becomes active, the filter driver of the active server machine waits for I / O input, and if some or all of the I / O input processing results are successful, confirms the current time. If the current time is within the expiration date notified from the expiration date notification daemon, the processing result is returned to the I / O input side, and if it is not within the expiration date, an error is returned to the I / O input side. If the cluster software on the standby server machine determines that the active server machine is not alive, the cluster software on the standby server machine sends the access information managed by the access management unit to its own server. Change so that only the machine is allowed access, wait for a certain period of time, and then make the server data area of the local server machine visible from the local server machine and start the application provided on the local server machine .

本発明によれば、複数のサーバマシンを備えてなるクラスタシステムにおいて、フェールオーバが発生した場合であっても、ディスクI/Oの性能劣化を抑えながら、トランザクションの整合を図ることが可能なクラスタシステムを実現することができる。   According to the present invention, in a cluster system including a plurality of server machines, even when failover occurs, a cluster system capable of achieving transaction matching while suppressing performance degradation of disk I / O. Can be realized.

以下に、本発明を実施するための最良の形態について図面を参照しながら説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

なお、以下の各実施の形態の説明に用いる図中の符号は、図20乃至図24と同一部分については同一符号を付して示し、重複説明を省略する。   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. 20 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)に接続された共有ディスク装置31とから構成されたクラスタシステムである。ここでは、仮に、初期状態として、サーバマシン10(#A)が稼動系、サーバマシン10(#B)が待機系であるとする。各サーバマシン10(#A,#B)はそれぞれ、各サーバマシン10(#A,#B)上でそれぞれ動作するアプリケーション11(#A,#B)、クラスタソフト12(#A,#B)、フィルタドライバ14(#A,#B)、ディスクドライバ15(#A,#B)、有効期限通知デーモン16(#A,#B)を備えている。フィルタドライバ14は、アプリケーション11とディスクドライバ15との間に介挿して設けられる。アプリケーション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 a shared disk device 31 connected to. Here, it is assumed that the server machine 10 (#A) is an active system and the server machine 10 (#B) is a standby system as an initial state. Each server machine 10 (#A, #B) has an application 11 (#A, #B) and cluster software 12 (#A, #B) respectively running on each server machine 10 (#A, #B). , Filter driver 14 (#A, #B), disk driver 15 (#A, #B), and expiration date notification daemon 16 (#A, #B). The filter driver 14 is provided between the application 11 and the disk driver 15. The application 11 mainly assumes a server application, and is assumed to be a proxy cache server in the present embodiment.

共有ディスク装置31は、各サーバマシン10(#A,#B)それぞれとFC(Fiber Channel)ケーブル51(#A,#B)で接続されており、更にサーバA用データ領域32(#A)、サーバB用データ領域32(#B)、及び共有領域33を持つ。これらは、それぞれを異なるLU(Logical Unit)でも、異なるパーティションでも、異なるファイルでも良い。   The shared disk device 31 is connected to each of the server machines 10 (#A, #B) via FC (Fiber Channel) cables 51 (#A, #B), and further to the server A data area 32 (#A). And a server B data area 32 (#B) and a shared area 33. These may be different LUs (Logical Units), different partitions, or different files.

図2は、共有ディスク装置31の詳細構成例を示す概念図である。   FIG. 2 is a conceptual diagram showing a detailed configuration example of the shared disk device 31.

図2に示すように共有領域33は、各サーバマシン10(#A,#B)のそれぞれについて、共有ディスク装置31へのアクセスの許可又は不許可が設定されたアクセス情報を管理するディスクアクセス権管理テーブル33aを保持している。図2に示すように、サーバAが「有」、サーバBが「無」と設定されている場合は、サーバマシン10(#A)のアクセスが許可され、サーバマシン10(#B)のアクセスが許可されていないことを示す。   As shown in FIG. 2, the shared area 33 is a disk access right for managing access information in which permission or non-permission of access to the shared disk device 31 is set for each of the server machines 10 (#A, #B). A management table 33a is held. As shown in FIG. 2, when the server A is set to “present” and the server B is set to “none”, the access of the server machine 10 (#A) is permitted and the access of the server machine 10 (#B) Indicates that is not allowed.

ディスクアクセス権管理テーブル33aは、有効期限通知デーモン16が、定期的(例えば30秒毎)に参照する。そして、有効期限通知デーモン16は、自サーバマシン10によるアクセスが許可されているのであれば、現在時間に予め定めた所定時間(例えば、60秒)を加えた有効期限を設定し、この有効期限を自サーバマシン10のフィルタドライバ14に通知する。なお、有効期限通知デーモン16は、例えば図3に示すように、時刻変更の影響を受けないもの(ブート後の起動時間等)から現在時間を把握する。   The expiration date notifying daemon 16 refers to the disk access right management table 33a periodically (for example, every 30 seconds). Then, if access by the server machine 10 is permitted, the expiration date notification daemon 16 sets an expiration date obtained by adding a predetermined time (for example, 60 seconds) to the current time, and this expiration date is set. Is sent to the filter driver 14 of the server machine 10. For example, as shown in FIG. 3, the expiration date notifying daemon 16 grasps the current time from the one that is not affected by the time change (such as the startup time after booting).

また、クラスタソフト12(#A,#B)は、互いに定期的に通信し、互いのサーバマシン10の生存状態を確認し合うと共に、それぞれ稼動系と待機系との2種類の状態を持つ。以下の説明では、サーバマシン10(#A)が稼動系であり、サーバマシン(#B)が待機系であるものとする。したがって、クラスタソフト12(#A)は稼動系の状態であり、クラスタソフト12(#B)は待機系の状態となっている。   Further, the cluster software 12 (#A, #B) communicates with each other periodically, confirms the survival state of each server machine 10, and has two types of states: an active system and a standby system. In the following description, it is assumed that the server machine 10 (#A) is an active system and the server machine (#B) is a standby system. Therefore, the cluster software 12 (#A) is in an active state, and the cluster software 12 (#B) is in a standby state.

クラスタソフト12(#A)が稼動系になる際には、クラスタソフト12(#A)は、ディスクアクセス権管理テーブル33aの情報を、自サーバマシン10(#A)のみがアクセス許可されるように設定し、自サーバマシン10(#A)側からサーバ用データ領域32(#A)が見える状態にし、自サーバマシン10(#A)に備えられたアプリケーション11(#A)を起動させる。   When the cluster software 12 (#A) becomes an active system, the cluster software 12 (#A) is permitted to access only the information of the disk access right management table 33a only to its own server machine 10 (#A). And the server data area 32 (#A) can be seen from the server machine 10 (#A) side, and the application 11 (#A) provided in the server machine 10 (#A) is started.

このようにしてクラスタソフト12(#A)が稼動系になった後は、フィルタドライバ14(#A)は、例えば図21に示すようなクライアント60からのI/O入力を待ち、このI/O入力の処理結果の一部あるいは全てが成功の場合、現在時刻を確認し、現在時刻が、有効期限通知デーモン16(#A)から通知された有効期限内であれば、処理結果を例えばクライアント60のようなI/O入力側へ返し、有効期限内でなければI/O入力側へエラーを返す。このような現在時刻の確認は、フィルタドライバ14(#A)が処理結果をI/O入力側に返すたびに行う。   After the cluster software 12 (#A) becomes active in this way, the filter driver 14 (#A) waits for an I / O input from the client 60 as shown in FIG. When a part or all of the processing results of the O input are successful, the current time is confirmed, and if the current time is within the expiration date notified from the expiration date notification daemon 16 (#A), the processing result is, for example, the client Returns to the I / O input side such as 60, and returns an error to the I / O input side if it is not within the validity period. Such confirmation of the current time is performed every time the filter driver 14 (#A) returns the processing result to the I / O input side.

一方、待機系のサーバマシン10(#B)のクラスタソフト12(#B)が、稼動系のサーバマシン10(#A)が生存していないと判定した場合には、クラスタソフト12(#B)は、ディスクアクセス権管理テーブル33aに設定されている情報を、サーバマシン10(#B)のみがアクセス許可されるように変更し、予め定めた所定時間(例えば30秒)待機し、しかる後に、サーバマシン10(#B)側からサーバ用データ領域32(#B)が見える状態にするとともに、アプリケーション11(#B)を起動させる。   On the other hand, if the cluster software 12 (#B) of the standby server machine 10 (#B) determines that the active server machine 10 (#A) is not alive, the cluster software 12 (#B ) Changes the information set in the disk access right management table 33a so that only the server machine 10 (#B) is permitted to access, waits for a predetermined time (for example, 30 seconds), and then The server data area 32 (#B) can be seen from the server machine 10 (#B) side, and the application 11 (#B) is activated.

このように待機することにより、サーバマシン10(#B)がアクセス権を取得してから、即座にフェールオーバするのではなく、安全な時間帯に入ってからフェールオーバするようにしている。待機のための所定時間としては、任意に設定可能であるが、長くするほどフェールオーバに要する時間が長くなる。一方、短くするほどフェールオーバに要する時間は短くなるが、共有領域33へのアクセス頻度も高くなるので、例えば30秒のように1分以内が現実的である。   By waiting in this way, the server machine 10 (#B) does not immediately fail over after acquiring the access right, but fails over after entering a safe time zone. The predetermined time for standby can be arbitrarily set, but the longer it takes, the longer the time required for failover. On the other hand, as the time is shorter, the time required for failover becomes shorter, but the access frequency to the shared area 33 becomes higher.

次に、以上のように構成した本実施の形態に係るクラスタシステムの動作について説明する。ただし、初期状態として、サーバマシン10(#A)とサーバマシン10(#B)との間ではクラスタソフト12(#A,#B)同士がハートビートを交換し、互いの生存が確認できており、サーバマシン10(#A,#B)ともに、共有領域33と各サーバ用データ領域32(#A,#B)は上位層から見えない(フィルタドライバ14がフェンスオフ)状態になっており、サーバマシン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. The server machine 10 (#A, #B) is in a state where the shared area 33 and the server data areas 32 (#A, #B) are not visible from the upper layer (the filter driver 14 is fence-off). In addition, it is assumed that the application 11 (#A, #B) is not activated in either the server machine 10 (#A, #B).

まず、図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.

まず、ユーザ操作により、サーバマシン10(#A)を稼動系にせよとの通知が、サーバマシン10(#A)のクラスタソフト12(#A)に届く(S1)。次に、クラスタソフト12(#A)によって、サーバマシン10(#A)にアクセス権が与えられるようにディスクアクセス権管理テーブル33aが設定される(S2)。すると、クラスタソフト12(#A)によって、フィルタドライバ14(#A)に稼動系となったことが通知される(S3)。その後、サーバマシン10(#A)のフィルタドライバ14(#A)によって、上位層からサーバA用データ領域32(#A)が見える状態にされる(S4)。そして、サーバマシン10(#A)のクラスタソフト12(#A)によって、有効期限通知デーモン16(#A)が起動され(S5)、更にアプリケーション11(#A)が起動される(S6)。   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 disk access right management table 33a is set so that the access right is given to the server machine 10 (#A) by the cluster software 12 (#A) (S2). Then, the cluster software 12 (#A) notifies the filter driver 14 (#A) that it has become an active system (S3). Thereafter, the server A data area 32 (#A) is made visible from the upper layer by the filter driver 14 (#A) of the server machine 10 (#A) (S4). Then, the expiration date notification daemon 16 (#A) is activated by the cluster software 12 (#A) of the server machine 10 (#A) (S5), and further the application 11 (#A) is activated (S6).

次に、図5のフローチャートと、図6に示す概念図とを用いて、サーバマシン10(#A)を稼動系に設定した後のフィルタドライバ14(#A)による処理の流れを説明する。   Next, the flow of processing by the filter driver 14 (#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)のフィルタドライバ14(#A)が、例えば図21に示すクライアント60のような上位からのI/O入力を待つ(S11)。そして、I/O入力がなされ、なされたI/O入力が有効期限の通知である場合(S12:Yes)には、ステップS13に進み、有効期限の通知でない場合(S12:No)には、ステップS14に進む。   First, the filter driver 14 (#A) of the server machine 10 (#A) waits for an I / O input from a host such as the client 60 shown in FIG. 21 (S11). If an I / O input is made and the I / O input made is a notification of an expiration date (S12: Yes), the process proceeds to step S13, and if it is not a notification of an expiration date (S12: No), Proceed to step S14.

ステップS13では、通知された有効期限に有効期間を更新した後に、ステップS24の処理に進む。   In step S13, the validity period is updated to the notified validity period, and then the process proceeds to step S24.

ステップS14では、ステップS11でなされたI/O入力がサーバA用データ領域32(#A)へのreadであればステップS15へ、writeであればステップS16へ、それ以外であればステップS22へそれぞれ進む。   In step S14, if the I / O input made in step S11 is read to the server A data area 32 (#A), go to step S15, if write, go to step S16, otherwise go to step S22. Proceed with each.

そして、ステップS15ではreadが、ステップS16ではwriteがそれぞれ実行され、ステップS17の処理に進む。   In step S15, read is executed, and in step S16, write is executed, and the process proceeds to step S17.

ステップS17では、I/Oが部分的に又は全部が成功した場合にはステップS18の処理に進み、そうでない場合にはステップS20の処理に進む。   In step S17, if the I / O is partially or wholly successful, the process proceeds to step S18. If not, the process proceeds to step S20.

ステップS18では、現在の時刻が取得される。そして、ステップS19では、有効期限通知デーモン16(#A)から有効期限が通知され、ステップS18で取得した現在の時刻が、有効期限内であるか否かが判定される。そして、有効期限内である場合には、I/Oの処理結果がそのまま上位へ返され(S20)た後に、ステップS24の処理に進む。   In step S18, the current time is acquired. In step S19, the expiration date is notified from the expiration date notification daemon 16 (#A), and it is determined whether or not the current time acquired in step S18 is within the expiration date. If it is within the expiration date, the I / O processing result is returned to the upper level as it is (S20), and then the process proceeds to step S24.

一方、ステップS19において有効期限を過ぎていると判定された場合には、I/O処理失敗のエラーが上位へ返され(S21)た後に、ステップS24の処理に進む。   On the other hand, if it is determined in step S19 that the expiration date has passed, an I / O processing failure error is returned to the upper level (S21), and then the process proceeds to step S24.

ステップS22では、フィルタドライバ14(#A)からディスクドライバ15(#A)に処理がそのまま渡され、ステップS23において、ディスクドライバ15(#A)からの返り値がそのまま上位に返された後に、ステップS24の処理に進む。   In step S22, the process is directly passed from the filter driver 14 (#A) to the disk driver 15 (#A). In step S23, the return value from the disk driver 15 (#A) is returned to the upper level as it is. The process proceeds to step S24.

そして、ステップS24では、OSが終了するのであれば処理が終了し、そうでなければステップS11の処理に戻る。   In step S24, if the OS ends, the process ends. Otherwise, the process returns to step S11.

次に、図7のフローチャートと、図6に示す概念図とを用いて、サーバマシン10(#A)を稼動系に設定した後の有効期限通知デーモン16(#A)による処理の流れを説明する。   Next, the flow of processing by the expiration date notification daemon 16 (#A) after the server machine 10 (#A) is set to the active system will be described using the flowchart of FIG. 7 and the conceptual diagram shown in FIG. To do.

有効期限通知デーモン16(#A)は、例えば30秒毎のように、ディスクアクセス権管理テーブル33aを定期的に参照する(S31)。そして、サーバマシン10(#A)にアクセス権が与えられていることを確認すると(S32)、現在時刻を取得し(S33)、現在時刻に予め定めた所定時間(例えば60秒)を加えることによって有効期限を設定し(S34)、この有効期限をフィルタドライバ14(#A)に通知し(S35)、ステップS36の処理に進む。また、ステップS32において、アクセス権が与えられていない場合もステップS36の処理に進む。なお、ステップS35の処理は、図5におけるステップS19に対応する。   The expiration date notification daemon 16 (#A) periodically refers to the disk access right management table 33a, for example, every 30 seconds (S31). When it is confirmed that the access right is given to the server machine 10 (#A) (S32), the current time is acquired (S33), and a predetermined time (for example, 60 seconds) is added to the current time. The expiration date is set (S34), the expiration date is notified to the filter driver 14 (#A) (S35), and the process proceeds to step S36. In step S32, if the access right is not given, the process proceeds to step S36. Note that the processing in step S35 corresponds to step S19 in FIG.

ステップS36では、例えば30秒間スリープした後、OSが終了しなければステップS31の処理に戻り、OSが終了するのであれば、この処理も終了する。   In step S36, for example, after sleeping for 30 seconds, if the OS does not end, the process returns to step S31. If the OS ends, this process also ends.

次に、図8に示すフローチャートと、図9に示す概念図とを用いて、サーバマシン10(#B)のクラスタソフト12(#B)がハートビート切れを検出し、フェールオーバするときのサーバマシン10(#B)の処理の流れを説明する。   Next, the server machine when the cluster software 12 (#B) of the server machine 10 (#B) detects a heartbeat break and fails over using the flowchart shown in FIG. 8 and the conceptual diagram shown in FIG. The flow of processing 10 (#B) will be described.

まず、サーバマシン10(#B)のクラスタソフト12(#B)がハートビートa切れを検出する(S41)と、クラスタソフト12(#B)によって、サーバマシン10(#B)にのみアクセス権が与えられるようにディスクアクセス権管理テーブル33aが設定される(S42)。   First, when the cluster software 12 (#B) of the server machine 10 (#B) detects that the heartbeat a has expired (S41), the cluster software 12 (#B) has access rights only to the server machine 10 (#B). Is set in the disk access right management table 33a (S42).

次に、クラスタソフト12(#B)は、予め定めた所定時間(例えば、60秒)スリープした(S43)後に、サーバA用データ領域32(#A)の全データをサーバB用データ領域32(#B)にコピーし(S44)、更に有効期限通知デーモン16(#B)を起動し(S45)、サーバマシン10(#B)が稼動系になったことをフィルタドライバ14(#B)に通知する(S46)。   Next, the cluster software 12 (#B) sleeps for a predetermined time (for example, 60 seconds) (S43), and then all the data in the server A data area 32 (#A) is transferred to the server B data area 32. (S44), the expiration date notification daemon 16 (#B) is started (S45), and the fact that the server machine 10 (#B) has become an active system is indicated by the filter driver 14 (#B). (S46).

その後、サーバマシン10(#B)のフィルタドライバ14(#B)によって、上位層からサーバB用データ領域32(#B)が見える状態にされる(S47)。そして、サーバマシン10(#B)のクラスタソフト12(#B)によってアプリケーション11(#B)が起動される(S48)。   Then, the server B data area 32 (#B) is made visible from the upper layer by the filter driver 14 (#B) of the server machine 10 (#B) (S47). Then, the application 11 (#B) is activated by the cluster software 12 (#B) of the server machine 10 (#B) (S48).

上述したように、本実施の形態に係るクラスタシステムにおいては、上記のような作用により、待機系のサーバマシン10(#B)のクラスタソフト12(#B)が、稼動系のサーバマシン10(#A)が生存していないと判定した場合には、サーバマシン10(#B)のみが共有ディスク装置31へのアクセスが許可されるようにすることができる。   As described above, in the cluster system according to the present embodiment, the cluster software 12 (#B) of the standby server machine 10 (#B) is operated by the active server machine 10 ( When it is determined that #A) is not alive, only the server machine 10 (#B) can be permitted to access the shared disk device 31.

これにより、フェールオーバが発生した場合であっても、複数のサーバマシン10(#A,#B)の重複書き込みを回避することができ、トランザクションの整合を図ることが可能となる。   As a result, even if a failover occurs, it is possible to avoid the redundant writing of the plurality of server machines 10 (#A, #B), and to achieve transaction matching.

また、フェールオーバは、サーバマシン10(#B)がアクセス権を取得した後に直ちに実行するのではなく、予め定めた所定時間(例えば30秒)待機し、安全な時間帯に入ってからフェールオーバするようにしている。   In addition, the failover is not executed immediately after the server machine 10 (#B) obtains the access right, but waits for a predetermined time (for example, 30 seconds), and fails over after entering a safe time zone. I have to.

以上のことから、本実施の形態に係るクラスタシステムは、複数のサーバマシンを備えてなるクラスタシステムにおいて、フェールオーバが発生した場合であっても、ディスクI/Oの性能劣化を抑えながら、かつトランザクションの整合を図ることが可能となる。   From the above, the cluster system according to the present embodiment is capable of performing transaction while suppressing deterioration of disk I / O performance even when failover occurs in a cluster system including a plurality of server machines. Can be matched.

(第2の実施の形態)
図10は、第2の実施の形態に係るクラスタシステムの構成例を示す機能ブロック図である。本実施の形態に係るクラスタシステムは、第1の実施の形態に係るクラスタシステムの変形例であるので、第1の実施の形態と同一部位については同一符番で示して重複説明を省略し、異なる点について説明する。
(Second Embodiment)
FIG. 10 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の実施の形態に係るクラスタシステムの概念を、ミラーリングディスク装置20を備えたクラスタシステムに適用したものである。   That is, the cluster system according to the present embodiment is an application of the concept of the cluster system according to the first embodiment to a cluster system including the mirroring disk device 20.

図10に示すような本実施の形態に係るクラスタシステムの、図1に示すような第1の実施の形態に係るクラスタシステムとの相違点を説明すると、図10に示すようなミラーリングディスク装置20を備えたクラスタシステムの場合、図1に示すようなクラスタシステムとは異なり、共有ディスク装置31を備えていない代わりに、サーバマシン10(#A)、及びサーバマシン10(#B)のにはそれぞれミラーリングディスク装置20(#A),20(#B)が接続されている。また、共有領域33を保持するための共通コンピュータ70を備えている。共有領域33は、第1の実施の形態に係るクラスタシステムと同様にディスクアクセス権管理テーブル33aを保持しているが、更にそれに加えて、各サーバマシン10(#A),10(#B)のそれぞれについて、各ミラーリングディスク装置20(#A),(#B)へのミラーリングエラーの発生の有無を示すミラーリングエラー情報を管理するミラーリングエラー発生有無管理テーブル33bをも保持している。また、各サーバマシン10(#A),10(#B)はそれぞれ、ミラーリングエラー発生有無管理テーブル33bの参照及び設定を行うミラーリングデーモン17(#A),17(#B)を備えている。   The difference between the cluster system according to the present embodiment as shown in FIG. 10 and the cluster system according to the first embodiment as shown in FIG. 1 will be described. The mirroring disk device 20 as shown in FIG. 1 is different from the cluster system shown in FIG. 1 in that the server machine 10 (#A) and the server machine 10 (#B) are not provided with the shared disk device 31. Mirroring disk devices 20 (#A) and 20 (#B) are connected to each other. A common computer 70 for holding the shared area 33 is also provided. The shared area 33 holds a disk access right management table 33a as in the cluster system according to the first embodiment. In addition to this, each server machine 10 (#A), 10 (#B) Are also stored in a mirroring error occurrence management table 33b for managing mirroring error information indicating whether or not a mirroring error has occurred in each mirroring disk device 20 (#A) and (#B). Each of the server machines 10 (#A) and 10 (#B) includes mirroring daemons 17 (#A) and 17 (#B) for referencing and setting the mirroring error occurrence presence / absence management table 33b.

クラスタソフト12(#A)が稼動系になった後は、第1の実施の形態と同様に、フィルタドライバ14(#A)が、例えばクライアント60からのI/O入力を待ち、このI/O入力の処理結果の一部あるいは全てが成功の場合、処理結果を、I/O入力側へ返すたびに現在時間を確認し、現在時間が、有効期限通知デーモン16(#A)から通知された有効期限内であれば処理結果をI/O入力側へ返し、有効期限内でなければI/O入力側へエラーを返す。   After the cluster software 12 (#A) becomes an active system, the filter driver 14 (#A) waits for an I / O input from the client 60, for example, as in the first embodiment. When a part or all of the processing results of the O input are successful, the current time is confirmed each time the processing results are returned to the I / O input side, and the current time is notified from the expiration notification daemon 16 (#A). If it is within the valid period, the processing result is returned to the I / O input side, and if it is not within the valid period, an error is returned to the I / O input side.

しかしながら、処理結果が同一では無い場合に、本実施の形態では、ミラーリングデーモン17(#A)が、ミラーリングエラー発生有無管理テーブル33bに管理されたミラーリングエラー情報を、サーバマシン10(#A)についてミラーリングエラーが発生しているように変更する。   However, if the processing results are not the same, in the present embodiment, the mirroring daemon 17 (#A) sends the mirroring error information managed in the mirroring error occurrence management table 33b to the server machine 10 (#A). Change so that a mirroring error has occurred.

そして、待機系のサーバマシン10(#B)のクラスタソフト12(#B)が、稼動系のサーバマシン10(#A)が生存していないと判定した場合には、クラスタソフト12(#B)は、ディスクアクセス権管理テーブル33aに設定されている情報を、サーバマシン10(#B)のみがアクセス許可されるように変更し、予め定めた所定時間(例えば30秒)待機した後に、ミラーリングエラー発生有無管理テーブル33bに管理されたミラーリングエラー情報が、サーバマシン10(#B)についてミラーリングエラーが発生しているように設定されていないのであれば、サーバマシン10(#B)側から、ミラーリングディスク装置20(#B)が見える状態にするとともに、アプリケーション11(#B)を起動させる。   If the cluster software 12 (#B) of the standby server machine 10 (#B) determines that the active server machine 10 (#A) is not alive, the cluster software 12 (#B) ) Changes the information set in the disk access right management table 33a so that only the server machine 10 (#B) is permitted to access, and waits for a predetermined time (for example, 30 seconds) before mirroring. If the mirroring error information managed in the error occurrence management table 33b is not set so that a mirroring error has occurred for the server machine 10 (#B), from the server machine 10 (#B) side, While making the mirroring disk device 20 (#B) visible, the application 11 (#B) is activated.

次に、以上のように構成した本実施の形態に係るクラスタシステムの動作について説明する。ただし、初期状態として、サーバマシン10(#A)とサーバマシン10(#B)との間ではクラスタソフト12(#A,#B)同士がハートビートを交換し、互いの生存が確認できており、サーバマシン10(#A,#B)ともに、共有領域33と各ミラーリングディスク装置20(#A,#B)は上位層から見えない(フィルタドライバ14がフェンスオフ。ただし、ミラーリングデーモン17のみアクセス可能)状態になっており、サーバマシン10(#A,#B)ともにアプリケーション11(#A,#B)は起動しておらず、ミラーリングデーモン17は起動しているものとする。   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) cannot see the shared area 33 and each mirroring disk device 20 (#A, #B) from the upper layer (the filter driver 14 is fence-off. However, the mirroring daemon 17 only. It is assumed that the application 11 (#A, #B) is not activated on the server machine 10 (#A, #B) and the mirroring daemon 17 is activated.

まず、図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)に届く(S51)。次に、クラスタソフト12(#A)によって、サーバマシン10(#A)にアクセス権が与えられるようにディスクアクセス権管理テーブル33aが設定される(S52)。更に、クラスタソフト12(#A)によって、ミラーリングエラー発生有無管理テーブル33bに管理されたミラーリングエラー情報が、サーバマシン10(#A)についてミラーリングエラーが発生していない(「ミラーリングエラー無」)ように設定される(S53)。   First, a notification that the server machine 10 (#A) is to be an active system is sent to the cluster software 12 (#A) of the server machine 10 (#A) by a user operation (S51). Next, the disk access right management table 33a is set so that the access right is given to the server machine 10 (#A) by the cluster software 12 (#A) (S52). Further, the mirroring error information managed in the mirroring error occurrence management table 33b by the cluster software 12 (#A) is such that no mirroring error has occurred in the server machine 10 (#A) (“no mirroring error”). (S53).

すると、クラスタソフト12(#A)がミラーリングデーモン17(#A)に稼動系となったことが通知する(S54)。そして、サーバマシン10(#A)のクラスタソフト12(#A)が有効期限通知デーモン16(#A)を起動し(S55)、クラスタソフト12(#A)によって、フィルタドライバ14(#A)に稼動系となったことを通知する(S56)。   Then, the cluster software 12 (#A) notifies the mirroring daemon 17 (#A) that it has become an active system (S54). Then, the cluster software 12 (#A) of the server machine 10 (#A) starts the expiration date notification daemon 16 (#A) (S55), and the filter driver 14 (#A) is executed by the cluster software 12 (#A). (S56).

その後、サーバマシン10(#A)のフィルタドライバ14(#A)が上位層からミラーリングディスク装置20(#A)が見える状態とする(S57)。次に、アプリケーション11(#A)が起動される(S58)。   Thereafter, the filter driver 14 (#A) of the server machine 10 (#A) makes the mirroring disk device 20 (#A) visible from the upper layer (S57). Next, the application 11 (#A) is activated (S58).

次に、図12のフローチャートと、図13に示す概念図とを用いて、サーバマシン10(#A)を稼動系に設定した後のフィルタドライバ14(#A)による処理の流れを説明する。   Next, the flow of processing by the filter driver 14 (#A) after setting the server machine 10 (#A) to the active system will be described using the flowchart of FIG. 12 and the conceptual diagram shown in FIG.

まず、サーバマシン10(#A)のフィルタドライバ14(#A)が、例えば図21に示すクライアント60のような上位からのI/O入力を待つ(S61)。そして、I/O入力が有効期限の通知である場合(S62:Yes)には、ステップS63に進み、有効期限の通知でない場合(S62:No)には、ステップS64に進む。   First, the filter driver 14 (#A) of the server machine 10 (#A) waits for an I / O input from a host such as the client 60 shown in FIG. 21 (S61). If the I / O input is a notification of an expiration date (S62: Yes), the process proceeds to step S63. If the I / O input is not a notification of the expiration date (S62: No), the process proceeds to step S64.

ステップS63では、有効期限を通知された有効期限に更新した後に、ステップS78の処理に進む。   In step S63, after the expiration date is updated to the notified expiration date, the process proceeds to step S78.

ステップS64では、ステップS61でなされたI/O入力がミラーリングディスク装置20(#A)へのreadであればステップS65へ、writeであればステップS66へ、それ以外であればステップS76へそれぞれ進む。   In step S64, if the I / O input made in step S61 is read to the mirroring disk device 20 (#A), the process proceeds to step S65. If write, the process proceeds to step S66. Otherwise, the process proceeds to step S76. .

そして、ステップS65ではreadが実行され、ステップS71の処理に進み、ステップS66ではwriteが実行され、ステップS67の処理に進む。   In step S65, read is executed, and the process proceeds to step S71. In step S66, write is executed, and the process proceeds to step S67.

ステップS67では、ミラーリングデーモン17(#A)にミラーリングを依頼して待機し、ステップS68でミラーリングが実行される。そして、ミラーリングが成功したならばステップS71の処理に進み、成功しなかったのならステップS70においてミラーリングデーモン17(#A)によって、ミラーリングエラー発生有無管理テーブル33bの設定が、サーバマシン10(#A)によるミラーリングエラー発生が有るように変更され、ステップS71の処理に進む。   In step S67, the mirroring daemon 17 (#A) is requested to perform mirroring and waits. In step S68, mirroring is executed. If the mirroring is successful, the process proceeds to step S71. If the mirroring is not successful, the mirroring daemon 17 (#A) sets the mirroring error occurrence management table 33b to the server machine 10 (#A) in step S70. ) So that a mirroring error has occurred, and the process proceeds to step S71.

ステップS71では、I/Oが部分的に又は全部が成功した場合にはステップS72の処理に進み、そうでない場合にはステップS74の処理に進む。   In step S71, if the I / O is partially or wholly successful, the process proceeds to step S72. If not, the process proceeds to step S74.

ステップS72では、現在時刻が取得される。そして、ステップS73では、有効期限通知デーモン16(#A)から有効期限が通知され、ステップS72で取得した現在の時刻が、有効期限内であるか否かが判定される。そして、有効期限内である場合には、I/Oの処理結果がそのまま上位へ返され(S74)た後に、ステップS78の処理に進む。   In step S72, the current time is acquired. In step S73, the expiration date is notified from the expiration date notification daemon 16 (#A), and it is determined whether or not the current time acquired in step S72 is within the expiration date. If it is within the validity period, the I / O processing result is returned to the upper level as it is (S74), and then the process proceeds to step S78.

一方、ステップS73において有効期限を過ぎていると判定された場合には、I/O処理失敗のエラーが上位へ返され(S75)た後に、ステップS78の処理に進む。   On the other hand, if it is determined in step S73 that the expiration date has passed, an I / O processing failure error is returned to the upper level (S75), and then the process proceeds to step S78.

ステップS76では、フィルタドライバ14(#A)からディスクドライバ15(#A)に処理がそのまま渡され、ステップS77において、ディスクドライバ15(#A)からの返り値がそのまま上位に返された後に、ステップS78の処理に進む。   In step S76, the process is directly passed from the filter driver 14 (#A) to the disk driver 15 (#A). In step S77, the return value from the disk driver 15 (#A) is returned to the upper level as it is. The process proceeds to step S78.

そして、ステップS78では、OSが終了するのであれば処理が終了し、そうでなければステップS61の処理に戻る。   In step S78, if the OS ends, the process ends. If not, the process returns to step S61.

また、サーバマシン10(#A)を稼動系に設定した後の有効期限通知デーモン16(#A)による処理の流れは、図7のフローチャートに示す通りであるので、説明を省略する。   Further, the flow of processing by the expiration date notification daemon 16 (#A) after setting the server machine 10 (#A) to the active system is as shown in the flowchart of FIG.

次に、図14に示すフローチャートと、図15に示す概念図とを用いて、サーバマシン10(#B)のクラスタソフト12(#B)がハートビート切れを検出し、フェールオーバするときのサーバマシン10(#B)の処理の流れを説明する。   Next, using the flowchart shown in FIG. 14 and the conceptual diagram shown in FIG. 15, the cluster machine 12 (#B) of the server machine 10 (#B) detects a heartbeat break and performs a failover. The flow of processing 10 (#B) will be described.

まず、サーバマシン10(#B)のクラスタソフト12(#B)がハートビートa切れを検出する(S81)と、クラスタソフト12(#B)によって、サーバマシン10(#B)にのみアクセス権が与えられるようにディスクアクセス権管理テーブル33aが設定される(S82)。   First, when the cluster software 12 (#B) of the server machine 10 (#B) detects that the heartbeat a has expired (S81), the cluster software 12 (#B) only accesses the server machine 10 (#B). Is set in the disk access right management table 33a (S82).

次に、クラスタソフト12(#B)は、予め定めた所定時間(例えば、60秒)スリープする(S83)。   Next, the cluster software 12 (#B) sleeps for a predetermined time (for example, 60 seconds) (S83).

一方、ステップS84において、ミラーリングエラー発生有無管理テーブル33bにおいて、サーバマシン10(#A)がミラーリングエラー発生有りと設定されている場合(S84:Yes)には、ステップS85の処理に進み、そうでない場合(S84:No)には、ステップS91の処理に進む。   On the other hand, if the server machine 10 (#A) is set to have a mirroring error occurrence in the mirroring error occurrence management table 33b in step S84 (S84: Yes), the process proceeds to step S85, otherwise. In the case (S84: No), the process proceeds to step S91.

ステップS85では、クラスタソフト12(#B)によって、ミラーリングエラー発生有無管理テーブル33bにおいて、サーバマシン10(#B)がミラーリングエラー発生無しと設定され、次に、ステップS86では、サーバマシン10(#B)のクラスタソフト12(#B)によって、ミラーリングデーモン17(#B)に、稼動系になったことが通知される。これによって、ミラーリングデータの受信が停止される。   In step S85, the cluster software 12 (#B) sets the server machine 10 (#B) to have no mirroring error in the mirroring error occurrence management table 33b. Next, in step S86, the server machine 10 (#B) The cluster software 12 (#B) of B) notifies the mirroring daemon 17 (#B) that it has become an active system. As a result, reception of the mirroring data is stopped.

更に有効期限通知デーモン16(#B)を起動し(S87)、サーバマシン10(#B)が稼動系になったことをフィルタドライバ14(#B)に通知する(S88)。   Furthermore, the expiration date notification daemon 16 (#B) is activated (S87), and the server driver 10 (#B) is notified to the filter driver 14 (#B) (S88).

その後、サーバマシン10(#B)のフィルタドライバ14(#B)によって、上位層からミラーリングディスク装置20(#B)が見える状態にされる(S89)。そして、サーバマシン10(#B)のクラスタソフト12(#B)によってアプリケーション11(#B)が起動され(S90)、処理を終了する。   Thereafter, the mirror driver 20 (#B) is made visible from the upper layer by the filter driver 14 (#B) of the server machine 10 (#B) (S89). Then, the application 11 (#B) is started by the cluster software 12 (#B) of the server machine 10 (#B) (S90), and the process is terminated.

ステップS91では、クラスタソフト12(#B)が、ディスクアクセス権管理テーブル33aにおいて、サーバマシン10(#B)のアクセス権が「有」から「無」に変更され(フェールオーバが断念され)、処理を終了する。   In step S91, the cluster software 12 (#B) changes the access right of the server machine 10 (#B) from “Yes” to “No” in the disk access right management table 33a (failover is abandoned). Exit.

上述したように、本実施の形態に係るクラスタシステムにおいては、上記のような作用により、ミラーリングに失敗している場合にはフェールオーバしないようにすることができる。また、フェールオーバした後には、元稼動系であるサーバマシン10(#A)側でI/Oが成功しないようにすることができる。これにより、トランザクションの不整合の発生を回避することが可能となる。   As described above, in the cluster system according to the present embodiment, it is possible to prevent failover from occurring when mirroring fails due to the above-described operation. Further, after a failover, it is possible to prevent I / O from succeeding on the server machine 10 (#A) side which is the original operating system. This makes it possible to avoid the occurrence of transaction inconsistencies.

また、ディスクI/O(readやwrite)のたびにミラーリングディスク装置20へのI/Oを発生させることがないので、ディスクI/Oの性能劣化を抑えることが可能となる。   Further, since I / O to the mirroring disk device 20 is not generated each time the disk I / O (read or write) is performed, it is possible to suppress the performance degradation of the disk I / O.

以上のことから、本実施の形態に係るクラスタシステムは、複数のサーバマシンを備えてなるクラスタシステムにおいて、フェールオーバが発生した場合であっても、ディスクI/Oの性能劣化を抑えながら、かつトランザクションの整合を図ることが可能となる。   From the above, the cluster system according to the present embodiment is capable of performing transaction while suppressing deterioration of disk I / O performance even when failover occurs in a cluster system including a plurality of server machines. Can be matched.

(第3の実施の形態)
本実施の形態に係るクラスタシステムは、第1及び第2の実施の形態に係るクラスタシステムの変形例であり、図16に示すように、フィルタドライバ14に代えて、ジャケットライブラリ(以降、「ジャケットDLL」と称する)18と、I/O処理用ライブラリ(以降、「I/0処理用DLL」と称する)19とを備えた構成としている点のみが異なる。したがって、ここでは、第1及び第2の実施の形態に係るクラスタシステムと異なる点について説明する。
(Third embodiment)
The cluster system according to the present embodiment is a modification of the cluster system according to the first and second embodiments. As shown in FIG. 16, instead of the filter driver 14, a jacket library (hereinafter referred to as "jacket") is used. The only difference is that it is configured to include an I / O processing library (hereinafter referred to as “I / 0 processing DLL”) 19 and a DLL 18. Therefore, here, differences from the cluster systems according to the first and second embodiments will be described.

すなわち、第1及び第2の実施の形態に係るクラスタシステムでは、フィルタドライバ14が有効期限を判定していたが、本実施の形態では、フィルタドライバ14ではなく、上位のライブラリが行うようにしている。この際、本来のI/O処理を行うためのI/O処理用DLL19と、アプリケーション11との間に、I/Oをフックして独自の処理を行うジャケットDLL18を備えている。ジャケットDLLの詳細については、特開平11−110194号公報を参照されたい。このジャケットDLL 18は、アプリケーション11から見ると、I/O処理用DLL19であるかのように見えるものであり、図17に示すように、アプリケーション11のプロセスハンドル管理テーブル18aを持ち、管理しているアプリケーション11(図17に示すプロセス1、プロセス2)に対してのみ有効期限による判定ルーチンを通す。   That is, in the cluster system according to the first and second embodiments, the filter driver 14 determines the expiration date. However, in this embodiment, the higher-level library is used instead of the filter driver 14. Yes. At this time, a jacket DLL 18 that hooks the I / O and performs its own processing is provided between the I / O processing DLL 19 for performing the original I / O processing and the application 11. For details of the jacket DLL, refer to JP-A-11-110194. The jacket DLL 18 looks as if it is an I / O processing DLL 19 when viewed from the application 11, and has a process handle management table 18a for the application 11 as shown in FIG. Only the application 11 (process 1 and process 2 shown in FIG. 17) passes the determination routine based on the expiration date.

なお、以下では、図16に示すように、代表的に、第1の実施の形態に示すような共有ディスク装置31を備えた構成に適用した場合について説明するが、本実施の形態のようにフィルタドライバ14の代わりにジャケットDLL18と、I/O処理用DLL19とを備えた構成は、第2の実施の形態に示すようなミラーリングディスク装置20を備えた構成に適用することも可能であり、第2の実施の形態に示すようなミラーリングディスク装置20を備えた構成に適用したものも本発明の一実施例として解される。   In the following, as shown in FIG. 16, a case where the present invention is representatively applied to a configuration including the shared disk device 31 as shown in the first embodiment will be described. The configuration provided with the jacket DLL 18 and the I / O processing DLL 19 instead of the filter driver 14 can also be applied to the configuration provided with the mirroring disk device 20 as shown in the second embodiment. What is applied to the configuration including the mirroring disk device 20 as shown in the second embodiment is also understood as an example of the present invention.

次に、図18のフローチャートと、図19に示す概念図とを用いて、サーバマシン10(#A)を稼動系に設定した後のフィルタドライバ14(#A)による処理の流れを説明する。なお、サーバマシン10(#A)を稼動系に設定する場合におけるクラスタソフト12(#A)による処理の流れ、サーバマシン10(#B)のクラスタソフト12(#B)がハートビート切れを検出し、フェールオーバするときのサーバマシン10(#B)の処理の流れは、第1及び第2の実施の形態と同様である。また、サーバマシン10(#A)を稼動系に設定した後の有効期限通知デーモン16(#A)による処理については、有効期限をフィルタドライバ14に通知する代わりに、ジャケットDLL18に通知する点のみが異なる。   Next, the flow of processing by the filter driver 14 (#A) after setting the server machine 10 (#A) to the active system will be described using the flowchart of FIG. 18 and the conceptual diagram shown in FIG. Note that the flow of processing by the cluster software 12 (#A) when the server machine 10 (#A) is set to the active system, the cluster software 12 (#B) of the server machine 10 (#B) detects a heartbeat break. The process flow of the server machine 10 (#B) at the time of failover is the same as in the first and second embodiments. In addition, regarding the processing by the expiration date notification daemon 16 (#A) after the server machine 10 (#A) is set to the active system, only the notification of the expiration date to the jacket DLL 18 is given instead of the notification to the filter driver 14. Is different.

すなわち、本実施の形態に係るクラスタシステムでは、まず、サーバマシン10(#A)のジャケットDLL19(#A)が、例えば図21に示すクライアント60のような上位からのI/O入力を待つ(S101)。I/O入力が有効期限の通知である場合(S102:Yes)には、ステップS103に進み、有効期限の通知でない場合(S102:No)には、ステップS104に進む。   That is, in the cluster system according to the present embodiment, first, the jacket DLL 19 (#A) of the server machine 10 (#A) waits for an I / O input from a host, such as the client 60 shown in FIG. S101). If the I / O input is an expiration date notification (S102: Yes), the process proceeds to step S103. If the I / O input is not an expiration date notification (S102: No), the process proceeds to step S104.

ステップS103では、通知された有効期限に更新された後に、ステップS115の処理に進む。   In step S103, after updating to the notified expiration date, the process proceeds to step S115.

ステップS104では、ステップS101でなされたI/O入力がサーバA用データ領域32(#A)へのreadであればステップS105へ、writeであればステップS106へ、それ以外であればステップS113へそれぞれ進む。   In step S104, if the I / O input made in step S101 is read to the server A data area 32 (#A), go to step S105, if write, go to step S106, otherwise go to step S113. Proceed with each.

そして、ステップS105ではreadが、ステップS106ではwriteがそれぞれ実行され、ステップS107の処理に進む。   In step S105, read is executed, and in step S106, write is executed, and the process proceeds to step S107.

ステップS107では、ジャケットDLL18が、プロセスハンドル管理テーブル18aを参照し、read又はwriteを実行するアプリケーションが、プロセスハンドル管理テーブル18aに書き込まれたアプリケーション(クラスタソフト12によって管理されたアプリケーション)である場合にはステップS108の処理に進み、そうでない場合にはステップS111の処理に進む。   In step S107, when the jacket DLL 18 refers to the process handle management table 18a and the application for executing read or write is an application written in the process handle management table 18a (an application managed by the cluster software 12). Advances to the process of step S108, and otherwise proceeds to the process of step S111.

ステップS108では、I/Oが部分的に又は全部が成功した場合にはステップS109の処理に進み、そうでない場合にはステップS111の処理に進む。   In step S108, if the I / O is partially or wholly successful, the process proceeds to step S109. If not, the process proceeds to step S111.

ステップS109では、現在の時間が取得される。そして、ステップS110では、有効期限通知デーモン16(#A)から有効期限が通知され、ステップS109で取得した現在の時間が、有効期限内であるか否かが判定される。そして、有効期限内である場合には、I/Oの処理結果がそのまま上位へ返され(S111)た後に、ステップS115の処理に進む。   In step S109, the current time is acquired. In step S110, the expiration date is notified from the expiration date notification daemon 16 (#A), and it is determined whether or not the current time acquired in step S109 is within the expiration date. If it is within the expiration date, the I / O processing result is returned to the upper level as it is (S111), and then the process proceeds to step S115.

一方、ステップS110において有効期限を過ぎていると判定された場合には、ジャケットDLL18が、I/O処理失敗のエラーを上位へ返した(S112)後に、ステップS115の処理に進む。   On the other hand, if it is determined in step S110 that the expiration date has passed, the jacket DLL 18 returns an I / O process failure error to the upper level (S112), and then proceeds to the process of step S115.

ステップS113では、I/O処理用DLL19(#A)からディスクドライバ15(#A)に処理がそのまま渡され、ステップS114において、ディスクドライバ15(#A)からの返り値がそのまま上位に返された後に、ステップS115の処理に進む。   In step S113, the process is passed from the I / O processing DLL 19 (#A) to the disk driver 15 (#A) as it is, and in step S114, the return value from the disk driver 15 (#A) is returned to the upper level as it is. Then, the process proceeds to step S115.

そして、ステップS115では、OSが終了するのであれば処理が終了し、そうでなければステップS101の処理に戻る。   In step S115, if the OS ends, the process ends. If not, the process returns to step S101.

上述したように、本実施の形態に係るクラスタシステムにおいては、上記のような作用により、I/O処理結果を上位へ返す場合、有効期限を使用した判定処理を無条件に行うのではなく、クラスタソフト12の管理下にあるアプリケーションのI/Oに限り行うことができ、クラスタソフト12の管理下にないアプリケーションとディスクデータとを共有することにより、フェールオーバが発生した場合であっても、ディスクI/Oの性能劣化を抑えながら、トランザクションの整合を図ることが可能となる。   As described above, in the cluster system according to the present embodiment, when the I / O processing result is returned to the upper layer by the above-described operation, the determination process using the expiration date is not performed unconditionally. This can be done only for application I / O under the management of the cluster software 12, and by sharing the disk data with the application not under the management of the cluster software 12, even if a failover occurs, the disk It is possible to achieve transaction matching while suppressing degradation of I / O performance.

以上、本発明を実施するための最良の形態について、添付図面を参照しながら説明したが、本発明はかかる構成に限定されない。特許請求の範囲の発明された技術的思想の範疇において、当業者であれば、各種の変更例及び修正例に想到し得るものであり、それら変更例及び修正例についても本発明の技術的範囲に属するものと了解される。   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.

第1の実施の形態に係るクラスタシステムの構成例を示す機能ブロック図。1 is a functional block diagram showing a configuration example of a cluster system according to a first embodiment. FIG. 共有ディスク装置の詳細構成例を示す概念図。The conceptual diagram which shows the detailed structural example of a shared disk apparatus. 現在時刻を取得する手段の例を示す図。The figure which shows the example of the means to acquire the present time. 第1の実施の形態に係るクラスタシステムにおいて、サーバマシンを稼動系に設定する場合におけるクラスタソフトによる処理の流れを示すフローチャート。6 is a flowchart showing a flow of processing by cluster software when a server machine is set as an active system in the cluster system according to the first embodiment. 第1の実施の形態に係るクラスタシステムにおいて、サーバマシンを稼動系に設定した後のフィルタドライバによる処理の流れを示すフローチャート。5 is a flowchart showing a flow of processing by a filter driver after setting a server machine to an active system in the cluster system according to the first embodiment. 第1の実施の形態に係るクラスタシステムにおいて、フィルタドライバによる処理の流れを示す概念図。The conceptual diagram which shows the flow of the process by a filter driver in the cluster system which concerns on 1st Embodiment. 第1の実施の形態に係るクラスタシステムにおいて、サーバマシンを稼動系に設定した後の有効期限通知デーモンによる処理の流れを示すフローチャート。5 is a flowchart showing a flow of processing by an expiration date notification daemon after setting a server machine to an active system in the cluster system according to the first embodiment. 第1の実施の形態に係るクラスタシステムにおいて、ハートビート切れを検出し、フェールオーバするときのサーバマシンの処理の流れを示すフローチャート。The flowchart which shows the flow of a process of the server machine at the time of detecting failover of a heartbeat and failing over in the cluster system which concerns on 1st Embodiment. 第1の実施の形態に係るクラスタシステムにおいて、フェールオーバ時におけるサーバマシンによる処理の流れを示す概念図。The conceptual diagram which shows the flow of the process by the server machine at the time of failover in the cluster system which concerns on 1st Embodiment. 第2の実施の形態に係るクラスタシステムの構成例を示す機能ブロック図。The functional block diagram which shows the structural example of the cluster system which concerns on 2nd Embodiment. 第2の実施の形態に係るクラスタシステムにおいて、サーバマシンを稼動系に設定する場合におけるクラスタソフトによる処理の流れを示すフローチャート。9 is a flowchart showing a flow of processing by cluster software when a server machine is set as an active system in the cluster system according to the second embodiment. 第2の実施の形態に係るクラスタシステムにおいて、サーバマシンを稼動系に設定した後のフィルタドライバによる処理の流れを示すフローチャート。The flowchart which shows the flow of a process by the filter driver after setting a server machine to an active system in the cluster system which concerns on 2nd Embodiment. 第2の実施の形態に係るクラスタシステムにおいて、フィルタドライバによる処理の流れを示す概念図。The conceptual diagram which shows the flow of the process by a filter driver in the cluster system which concerns on 2nd Embodiment. 第2の実施の形態に係るクラスタシステムにおいて、ハートビート切れを検出し、フェールオーバするときのサーバマシンの処理の流れを示すフローチャート。The flowchart which shows the flow of a process of the server machine at the time of detecting failover of a heartbeat and failing over in the cluster system which concerns on 2nd Embodiment. 第2の実施の形態に係るクラスタシステムにおいて、フェールオーバ時におけるサーバマシンによる処理の流れを示す概念図。The conceptual diagram which shows the flow of a process by the server machine at the time of failover in the cluster system which concerns on 2nd Embodiment. 第3の実施の形態に係るクラスタシステムの構成例を示す機能ブロック図。The functional block diagram which shows the structural example of the cluster system which concerns on 3rd Embodiment. プロセスハンドル管理テーブルの一例を示す図。The figure which shows an example of a process handle management table. 第3の実施の形態に係るクラスタシステムにおいて、サーバマシンを稼動系に設定する場合におけるジャケットDLLによる処理の流れを示すフローチャート。The flowchart which shows the flow of a process by the jacket DLL in the case of setting a server machine to an active system in the cluster system which concerns on 3rd Embodiment. 第3の実施の形態に係るクラスタシステムにおいて、ジャケットDLLによる処理の流れを示す概念図。The conceptual diagram which shows the flow of the process by jacket DLL in the cluster system which concerns on 3rd Embodiment. 従来技術のクラスタシステムによるフェールオーバを説明するための概念図。The conceptual diagram for demonstrating the failover by the cluster system of a prior art. 従来技術のクラスタシステムによるフェールオーバ時に生じるデータ破壊を説明するための概念図(ミラーリングディスク装置使用時)。The conceptual diagram for demonstrating the data destruction which arises at the time of failover by the cluster system of a prior art (at the time of mirroring disk apparatus use). 従来技術のクラスタシステムによるフェールオーバ時に生じるデータ破壊を説明するための概念図(共有ディスク装置使用時)。The conceptual diagram for demonstrating the data destruction which arises at the time of failover by the cluster system of a prior art (when using a shared disk apparatus). 従来技術のクラスタシステムの改良構成例とそれによる処理の流れを示す図(共有ディスク装置使用時)。The figure which shows the structural improvement example of the cluster system of a prior art, and the flow of a process by it (when using a shared disk apparatus). 従来技術のクラスタシステムの改良構成例とそれによる処理の流れを示す図(ミラーリングディスク装置)。The figure which shows the example of an improved structure of the cluster system of a prior art, and the flow of a process by it (mirroring disk apparatus).

符号の説明Explanation of symbols

a…ハートビート、b…フェールオーバ、10…サーバマシン、11…アプリケーション、12…クラスタソフト、13…データベースサーバ、14…フィルタドライバ、15…ディスクドライバ、16…有効期限通知デーモン、17…ミラーリングデーモン、18…ジャケットDLL、18a…プロセスハンドル管理テーブル、19…I/O処理用DLL、20…ミラーリングディスク装置、31…共有ディスク装置、32…サーバA用データ領域、32…サーバB用データ領域、33…共有領域、33a…ディスクアクセス権管理テーブル、33b…ミラーリングエラー発生有無管理テーブル、50,52…通信路、51…FCケーブル、60…クライアント、61…DBクライアント、70…共通コンピュータ   a ... heartbeat, b ... failover, 10 ... server machine, 11 ... application, 12 ... cluster software, 13 ... database server, 14 ... filter driver, 15 ... disk driver, 16 ... expiration date notification daemon, 17 ... mirroring daemon, 18 ... Jacket DLL, 18a ... Process handle management table, 19 ... I / O processing DLL, 20 ... Mirroring disk unit, 31 ... Shared disk unit, 32 ... Server A data area, 32 ... Server B data area, 33 ... Shared area, 33a ... Disk access right management table, 33b ... Mirroring error occurrence management table, 50, 52 ... Communication path, 51 ... FC cable, 60 ... Client, 61 ... DB client, 70 ... Common computer

Claims (1)

複数のサーバマシンと、前記複数のサーバマシンに共有して接続された共有ディスク装置とから構成されたクラスタシステムであって、
前記複数のサーバマシンは、前記複数のサーバマシン上でそれぞれ動作するアプリケーションと、前記複数のサーバマシン上でそれぞれ動作するクラスタソフトと、前記複数のサーバマシン上でそれぞれ動作するフィルタドライバと、前記複数のサーバマシン上でそれぞれ動作する有効期限通知デーモンとを備え、
前記共有ディスク装置は、前記各サーバマシンのデータをそれぞれ格納する各サーバ用データ領域と、前記各サーバマシンで共有する共有領域とを備え、
前記共有領域は、前記各サーバマシンのそれぞれについて、前記共有ディスク装置へのアクセスの許可又は不許可が設定されたアクセス情報を管理するアクセス管理部を備え、
前記有効期限通知デーモンは、前記アクセス管理部によって管理されているアクセス情報を定期的に参照し、自サーバマシンによるアクセスが許可されているのであれば、現在時間に所定時間を加えた有効期限を設定し、この有効期限を自サーバマシンのフィルタドライバに通知し、
前記複数のサーバマシンに備えられた各クラスタソフトは、互いに定期的に通信して互いのサーバマシンの生存状態を確認し合うと共に、それぞれ稼動系と待機系との2種類の状態を持ち、
前記クラスタソフトが稼動系になる際には、このクラスタソフトは、前記アクセス管理部に管理されたアクセス情報を、自サーバマシンのみがアクセスを許可されるように変更し、前記自サーバマシン側から前記自サーバマシンのサーバ用データ領域が見える状態にし、前記自サーバマシンに備えられたアプリケーションを起動させ、
前記クラスタソフトが稼動系になった後は、前記稼動系のサーバマシンのフィルタドライバは、I/O入力を待ち、前記I/O入力の処理結果の一部あるいは全てが成功の場合、現在時間を確認し、前記現在時間が、前記有効期限通知デーモンから通知された有効期限内であれば前記処理結果を前記I/O入力側へ返し、有効期限内でなければ前記I/O入力側へエラーを返し、
前記待機系のサーバマシンのクラスタソフトが、前記稼動系のサーバマシンが生存していないと判定した場合には、前記待機系のサーバマシンのクラスタソフトは、前記アクセス管理部に管理されたアクセス情報を、自サーバマシンのみがアクセスを許可されるように変更し、所定時間待機した後に、前記自サーバマシン側から前記自サーバマシンのサーバ用データ領域が見える状態にするとともに、前記自サーバマシンに備えられたアプリケーションを起動させる
ようにしたクラスタシステム。
A cluster system composed of a plurality of server machines and a shared disk device shared and 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, a filter driver that runs on each of the plurality of server machines, And an expiration notification daemon that runs on each server machine,
The shared disk device includes a server data area for storing data of the server machines, and a shared area shared by the server machines,
The shared area includes an access management unit that manages access information in which permission or non-permission of access to the shared disk device is set for each of the server machines,
The expiration date notification daemon periodically refers to the access information managed by the access management unit, and if access by the own server machine is permitted, the expiration date plus a predetermined time is added to the current time. Set and notify the filter driver of this server machine of this expiration date,
Each of the cluster software provided in the plurality of server machines communicates with each other periodically to check the survival state of each server machine, and has two types of states, an active system and a standby system,
When the cluster software becomes an active system, the cluster software changes the access information managed by the access management unit so that only the own server machine is permitted to access, and from the own server machine side. Make the server data area of the local server machine visible, start an application provided in the local server machine,
After the cluster software becomes active, the filter driver of the active server machine waits for I / O input, and if some or all of the processing results of the I / O input are successful, the current time If the current time is within the validity period notified from the validity period notification daemon, the processing result is returned to the I / O input side. If the current time is not within the validity period, the process result is returned to the I / O input side. Returns an error,
If the cluster software of the standby server machine determines that the active server machine is not alive, the cluster software of the standby server machine uses the access information managed by the access management unit. Is changed so that only the own server machine is allowed access, and after waiting for a predetermined time, the server data area of the own server machine is made visible from the own server machine side, and A cluster system in which the provided application is started.
JP2007081624A 2007-03-27 2007-03-27 Cluster system Active JP4874847B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007081624A JP4874847B2 (en) 2007-03-27 2007-03-27 Cluster system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007081624A JP4874847B2 (en) 2007-03-27 2007-03-27 Cluster system

Publications (2)

Publication Number Publication Date
JP2008242742A JP2008242742A (en) 2008-10-09
JP4874847B2 true JP4874847B2 (en) 2012-02-15

Family

ID=39914023

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007081624A Active JP4874847B2 (en) 2007-03-27 2007-03-27 Cluster system

Country Status (1)

Country Link
JP (1) JP4874847B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012063306A1 (en) * 2010-11-08 2012-05-18 三菱電機株式会社 Virtual machine control device, virtual machine control system, virtual machine control method of virtual machine control device, and virtual machine control program
WO2015052836A1 (en) 2013-10-11 2015-04-16 株式会社日立製作所 Storage device and failover method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02103619A (en) * 1988-10-12 1990-04-16 Mitsubishi Electric Corp Adapter device
JPH08329027A (en) * 1995-06-01 1996-12-13 Nec Corp Method and system for cross-call disk access for central processing dual system
JP2830857B2 (en) * 1996-09-09 1998-12-02 三菱電機株式会社 Data storage system and data storage management method
JP2002123406A (en) * 2000-10-17 2002-04-26 Pfu Ltd High reliability system
JP4257053B2 (en) * 2001-09-14 2009-04-22 日本電気株式会社 Shared resource exclusion control method and method
JP2005128781A (en) * 2003-10-23 2005-05-19 Hitachi Ltd System changeover method and information processing system

Also Published As

Publication number Publication date
JP2008242742A (en) 2008-10-09

Similar Documents

Publication Publication Date Title
US6360331B2 (en) Method and system for transparently failing over application configuration information in a server cluster
US6959331B1 (en) System and method for operating a client network computer in a disconnected mode by establishing a connection to a fallover server implemented on the client network computer
US7840662B1 (en) Dynamically managing a network cluster
US7437386B2 (en) System and method for a multi-node environment with shared storage
US8533171B2 (en) Method and system for restarting file lock services at an adoptive node during a network filesystem server migration or failover
US11650891B2 (en) Preventing non-detectable data loss during site switchover
JP4286786B2 (en) Distributed transaction processing apparatus, distributed transaction processing program, and distributed transaction processing method
US20070220323A1 (en) System and method for highly available data processing in cluster system
JP2004342079A (en) Method for operating computer cluster
JP2005196683A (en) Information processing system, information processor and control method of information processing system
JP5183542B2 (en) Computer system and setting management method
JP2002229837A (en) Method for controlling access to data in shared disc parallel data file
JP2012173996A (en) Cluster system, cluster management method and cluster management program
JP4874847B2 (en) Cluster system
JP5480046B2 (en) Distributed transaction processing system, apparatus, method and program
US11669516B2 (en) Fault tolerance for transaction mirroring
JP7104016B2 (en) Transparent database session recovery with client-side cache
JP2019082897A (en) Information processing device, information processing system, and program
JP4693867B2 (en) Computer system
US10656867B2 (en) Computer system, data management method, and data management program
JP2001350777A (en) Distributed database system
US6205510B1 (en) Method for fencing a member of a group of processes in a distributed processing environment
EP4332770A1 (en) Systems and methods for recovery with a distributed lock manager
CN117632525A (en) Systems and methods for recovery with a distributed lock manager
JP2021005148A (en) Update management device and update management program

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

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111012

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

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

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

Free format text: PAYMENT UNTIL: 20141202

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4874847

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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