JP2012173752A - Cluster system, data recording method, and program - Google Patents

Cluster system, data recording method, and program Download PDF

Info

Publication number
JP2012173752A
JP2012173752A JP2011031747A JP2011031747A JP2012173752A JP 2012173752 A JP2012173752 A JP 2012173752A JP 2011031747 A JP2011031747 A JP 2011031747A JP 2011031747 A JP2011031747 A JP 2011031747A JP 2012173752 A JP2012173752 A JP 2012173752A
Authority
JP
Japan
Prior art keywords
log
log file
cluster system
server
shared disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2011031747A
Other languages
Japanese (ja)
Inventor
Shunichi Tanaka
駿一 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2011031747A priority Critical patent/JP2012173752A/en
Publication of JP2012173752A publication Critical patent/JP2012173752A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To prevent an error from occurring at the time of a switch from an active server to a standby server, by correctly recording data in a log file on a common disk.SOLUTION: A cluster system is so configured that a server device 10a in an active system and a server device 10b in a standby system perform with the use of a common disk 30. When a log message of an application 21 in a cluster service 20 is temporarily stored to a named pipe 13a on a local disk by a syslogd 11a having a data transfer function in the server device 10a, the log message stored in the named pipe 13a is recorded in a log file 31 on the common disk 30 by the log application 14a. In this process, while a log message of an application 21 is stored to the named pipe 13a, the log application 14a performs open/write/close processing on the log file 31.

Description

本発明は、運用系のサーバと待機系のサーバを連携構成して共有ディスクを利用するクラスタシステム、クラスタシステムにおける共有ディスク上のログファイルへデータ記録方法、及びプログラムに関する。   The present invention relates to a cluster system that uses a shared disk by cooperatively configuring an active server and a standby server, a method for recording data in a log file on a shared disk in the cluster system, and a program.

一般的に、共有ディスクを使用したActive−Standby型(運用系と待機系)のクラスタシステムにおいては、ログメッセージの転送を行う機能を有するsyslogdがログファイルへログメッセージを記録するときは次のような手順で行っている。すなわち、あるサーバがクラスタシステムのActive側(運用系)として稼動している場合、そのサーバにおけるクラスタサービス上のアプリケーションがsyslogdに対してメッセージを出力すると、そのsyslogdはメッセージを読み込んでログファイルを書き込みモードでファイルオープンする。そして、syslogdは読み込んだメッセージをそのログファイルへ出力し、そのメッセージの出力が完了するとログファイルをクローズにする。   In general, in an active-standby type (active system and standby system) cluster system using a shared disk, when syslogd having a function of transferring a log message records a log message in a log file, the following is performed. It is done in a simple procedure. That is, when a server is operating as the active side (active system) of a cluster system, when an application on the cluster service in that server outputs a message to syslogd, that syslogd reads the message and writes the log file. Open a file in mode. Syslogd outputs the read message to the log file, and closes the log file when the output of the message is completed.

図6は、一般的なActive−Standby型のクラスタシステムの構成を示すブロック図である。図6において、サーバ装置110aがクラスタサービス120の機能を実現するアプリケーション121を起動した場合、アプリケーション121が転送機能を有するsyslogd111aに対してメッセージを送信すると、syslogd111aはそのメッセージをローカルディスク上のログファイル112a、113aへ出力する。   FIG. 6 is a block diagram showing a configuration of a general Active-Standby type cluster system. In FIG. 6, when the server apparatus 110a activates the application 121 that implements the function of the cluster service 120, when the application 121 sends a message to the syslogd 111a having the transfer function, the syslogd 111a sends the message to a log file on the local disk. To 112a and 113a.

次に、クラスタサービス120を実行する装置がサーバ装置110aからサーバ装置110b側に切り替わった場合は、クラスタサービス120の機能を実現するアプリケーション121は、サーバ装置110b上のsyslogd111bを経由してログファイル112b、113bに対してメッセージを出力する。このようにして、クラスタサービス120の機能を実現するアプリケーション121の動作に関するメッセージが、複数のサーバ(図6ではサーバ装置110aとサーバ装置110bの2つのサーバ)で管理されるため、ログファイルの集計や障害調査などの場面において、複数のログファイル(例えば、ログファイル112aとログファイル112b)をマージ(統合)したり比較したりする必要がある。   Next, when the device that executes the cluster service 120 is switched from the server device 110a to the server device 110b, the application 121 that implements the function of the cluster service 120 is transferred to the log file 112b via the syslogd 111b on the server device 110b. , 113b. In this way, since messages related to the operation of the application 121 that implements the functions of the cluster service 120 are managed by a plurality of servers (two servers, the server device 110a and the server device 110b in FIG. 6), the log files are aggregated. It is necessary to merge (integrate) or compare a plurality of log files (for example, the log file 112a and the log file 112b) in a scene such as a trouble investigation.

なお、関連技術として、現用サーバと予備サーバとを備えたシステムにおいて、現用サーバに障害が発生したときは、共有ディスクに記録されたステータス情報に基づいて予備サーバへ迅速に切替えて継続運転を行うホットスタンバイシステムの技術が開示されている(例えば、特許文献1参照)。この技術によれば、現用サーバで障害が発生した時点までの情報を予備サーバにおいて自動的に再現することができる。また、障害の発生時において交互に現用サーバと予備サーバとを切替えることができる。   As a related technology, when a failure occurs in the active server in a system including the active server and the spare server, the operation is continuously switched to the spare server based on the status information recorded on the shared disk. A technology of a hot standby system is disclosed (for example, see Patent Document 1). According to this technique, information up to the time when a failure occurs in the active server can be automatically reproduced in the spare server. In addition, when a failure occurs, the active server and the spare server can be switched alternately.

さらに、他の関連技術として、アプリケーションから出力されるログデータを、ファイル名を用いて確認されるメモリー・ベースのキュー(すなわち、FIFO:First In First Out)に相当する名前付きパイプに保存することにより、アプリケーションプログラムの出力データをリモート監視する技術が開示されている(例えば、特許文献2参照)。この技術によれば、名前付きパイプをオープンにしてキューの読出しを行うことにより、出力データを検索してアプリケーションプログラムの出力データをリモートで監視することができる。   As another related technique, log data output from an application is stored in a named pipe corresponding to a memory-based queue (that is, FIFO: First In First Out) that is confirmed using a file name. Discloses a technique for remotely monitoring output data of an application program (see, for example, Patent Document 2). According to this technique, by reading the queue by opening the named pipe, the output data can be searched and the output data of the application program can be monitored remotely.

特開平11−259326号公報JP 11-259326 A 特表2009−519509号公報Special table 2009-519509 gazette

一般的に、UNIX(登録商標)やLinux(登録商標)においてログ出力デーモン(メモリに常駐して様々なサービスを提供するソフトウエア)として使用されているログメッセージ転送用のsyslogdは、ログメッセージを出力する転送先において共有ディスク上のログファイルを指定した場合は、図7で説明するような問題が発生する。   Generally, the log message transfer syslogd used as a log output daemon (software that provides various services resident in memory) in UNIX (registered trademark) or Linux (registered trademark) When a log file on the shared disk is specified at the transfer destination to be output, the problem described with reference to FIG. 7 occurs.

図7は、一般的なActive−Standby型のクラスタシステムが共有ディスク上にログファイルを指定するときの構成を示すブロック図である。図7において、Active−Standby型のクラスタシステムを構成する2台のサーバ(すなわち、運用系のサーバ装置210aと待機系のサーバ装置210b)が起動すると、それぞれのサーバ装置に所属するログメッセージ転送用のsyslogd211aとsyslogd211bが起動し、共有ディスク230上のログファイル231をオープンしようとする。しかし、サーバ装置210aとサーバ装置210bは、何れも、共有ディスク231上のログファイル231が保存されている領域をマウント(認識)していない。そのため、共有ディスク230上のログファイル231のオープン処理はエラーとなってしまう。   FIG. 7 is a block diagram showing a configuration when a general Active-Standby type cluster system designates a log file on a shared disk. In FIG. 7, when two servers constituting the Active-Standby type cluster system (that is, the active server device 210a and the standby server device 210b) are activated, log messages belonging to the respective server devices are transferred. Syslogd 211a and Syslogd 211b start up and attempt to open the log file 231 on the shared disk 230. However, neither the server apparatus 210a nor the server apparatus 210b mounts (recognizes) an area where the log file 231 on the shared disk 231 is stored. For this reason, the open process of the log file 231 on the shared disk 230 results in an error.

この後、Active側のサーバ装置(サーバ装置210a)から共有ディスク230の領域がマウントされて、サーバ装置210aのクラスタサービス220の機能を実現するアプリケーション221が起動するが、サーバ装置210aのsyslogd211aは、共有ディスク230のログファイル231をオープンしていないため、アプリケーション221が出力したメッセージは共有ディスク230のログファイル231には出力されない。アプリケーション221が出力したメッセージを共有ディスク230のログファイル231にログ出力するためには、Active側のサーバ装置(サーバ装置210a)が共有ディスク230の領域をマウント(認識)した後にサーバ装置210aのsyslogd211aを再起動する必要がある。   Thereafter, the area of the shared disk 230 is mounted from the server device on the active side (server device 210a), and the application 221 that implements the function of the cluster service 220 of the server device 210a is started. The syslogd 211a of the server device 210a is Since the log file 231 of the shared disk 230 is not opened, the message output by the application 221 is not output to the log file 231 of the shared disk 230. In order to log the message output by the application 221 to the log file 231 of the shared disk 230, the active-side server apparatus (server apparatus 210a) mounts (recognizes) the area of the shared disk 230 and then the syslogd 211a of the server apparatus 210a. Need to restart.

また、図7において、サーバ装置210a上のsyslogd211aから共有ディスク230のログファイル231に対してログ出力が行われている状態で、クラスタサービス220がActive側のサーバ(サーバ装置210a)からStandby側のサーバ(サーバ装置210b)へ切替えられると、サーバ装置210aは共有ディスク230の領域に対するアンマウント処理(切り離し)を行おうとする。しかし、サーバ装置210a側のsyslogd211aから共有ディスク230のログファイル231aに対するファイルオープンが継続しているため、このアンマウント処理はエラーとなり、クラスタサービス220の切替え処理は失敗となる。あるいは、クラスタリングソフト(連携構成するためのソフト)によりActive側(サーバ装置210a)のsyslogd211a自体が停止させられる。   Further, in FIG. 7, the log service 211 is executed from the syslogd 211a on the server device 210a to the log file 231 of the shared disk 230, and the cluster service 220 is changed from the server on the active side (server device 210a) to the standby side. When switched to the server (server apparatus 210b), the server apparatus 210a tries to unmount (detach) the shared disk 230 area. However, since the file open for the log file 231a of the shared disk 230 continues from the syslogd 211a on the server device 210a side, this unmount process results in an error, and the cluster service 220 switching process fails. Alternatively, the syslogd 211a itself on the active side (server apparatus 210a) is stopped by clustering software (software for cooperative configuration).

なお、前述の特許文献1の技術は、共有ディスクを利用した現用サーバと予備サーバによるクラスタシステムにおいて、一時保存されたログメッセージを共有ディスク上のログファイルに記録することができるが、この技術では、共有ディスク上のログファイルのオープン処理においてエラーが発生する問題は依然として解消されない。   Note that the technique of Patent Document 1 described above can record a temporarily stored log message in a log file on a shared disk in a cluster system using an active server and a spare server using a shared disk. The problem that an error occurs in the process of opening the log file on the shared disk is still not solved.

また、前述の特許文献2の技術は、アプリケーションから出力されたログデータを名前付きパイプに一時保存することにより、アプリケーションプログラムの出力データを監視することはできるが、この名前付きパイプの技術を利用してもクラスタシステムにおけるクラスタサービスの切替え処理に応用することは不可能である。さらに、前記の特許文献1の技術と前述の特許文献2の技術を組み合わせても、共有ディスク上のログファイルのファイルオープン/ファイルクローズのタイミングを考慮していないので、現用サーバと予備サーバの切替え時にエラーが発生してしまう問題は依然として解消されない。   The technique of the above-mentioned patent document 2 can monitor the output data of the application program by temporarily storing the log data output from the application in the named pipe, but this named pipe technique is used. Even so, it cannot be applied to cluster service switching processing in a cluster system. Further, even if the technique of Patent Document 1 and the technique of Patent Document 2 described above are combined, the timing of file open / file close of the log file on the shared disk is not taken into consideration. The problem that sometimes causes errors still remains.

本発明は、上述のような事情に鑑みてなされたものであり、共有ディスク上のログファイルへのデータ記録を適正に行うことにより現用サーバと予備サーバの切替え時にエラーが発生しないようなActive−Standby型のクラスタシステム、クラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法、及びプログラムを提供することを目的とする。   The present invention has been made in view of the above-described circumstances, and is an Active- that prevents an error from occurring when switching between the active server and the spare server by appropriately recording data in a log file on a shared disk. It is an object of the present invention to provide a stand-by type cluster system, a method for recording data in a log file on a shared disk in the cluster system, and a program.

本発明は上記の課題を解決するためになされたものであり、運用系サーバと待機系サーバとが共有ディスクを利用して動作を行うクラスタシステムであって、アプリケーションのログメッセージをローカルディスク上の名前付きパイプへ一時的に保存する保存手段と、前記名前付きパイプへ一時的に保存された前記ログメッセージを前記共有ディスク上のログファイルへ記録する記録手段と、前記記録手段がログメッセージを前記ログファイルへ記録するタイミングを設定するタイミング設定手段とを備えたことを特徴とするクラスタシステムを提供する。   The present invention has been made to solve the above problem, and is a cluster system in which an active server and a standby server operate using a shared disk, and log messages of an application are stored on a local disk. Storage means for temporarily storing in a named pipe, recording means for recording the log message temporarily stored in the named pipe in a log file on the shared disk, and the recording means storing the log message in the log file There is provided a cluster system comprising timing setting means for setting timing for recording in a log file.

また、本発明は、運用系サーバと待機系サーバとで構成されるクラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法であって、アプリケーションのログメッセージをローカルディスク上の名前付きパイプへ一時的に保存する第1のステップと、前記名前付きパイプへ一時的に保存された前記ログメッセージを前記ログファイルへ記録するタイミングを設定する第2のステップと、前記第2のステップで設定されたタイミングに基づいて、前記名前付きパイプへ一時的に保存された前記ログメッセージを前記共有ディスク上のログファイルへ記録する第3のステップとを含むことを特徴とするクラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法を提供する。   The present invention also relates to a method for recording data in a log file on a shared disk in a cluster system composed of an active server and a standby server, and temporarily logs an application log message to a named pipe on the local disk. Set in the first step, the second step for setting the timing to record the log message temporarily stored in the named pipe to the log file, and the second step And a third step of recording the log message temporarily stored in the named pipe to a log file on the shared disk based on timing. A method for recording data in a file is provided.

また、本発明は、運用系サーバと待機系サーバとで構成されるクラスタシステムが共有ディスク上のログファイルへデータを記録するプログラムであって、コンピュータを、アプリケーションのログメッセージをローカルディスク上の名前付きパイプへ一時的に保存する保存手段、前記名前付きパイプへ一時的に保存された前記ログメッセージを前記共有ディスク上のログファイルへ記録する記録手段、前記記録手段がログメッセージを前記ログファイルへ記録するタイミングを設定するタイミング設定手段、として機能させるためのプログラムを提供する。   The present invention also relates to a program in which a cluster system composed of an active server and a standby server records data in a log file on a shared disk, and the computer logs the application log message to the name on the local disk. Storage means for temporarily storing in the attached pipe, recording means for recording the log message temporarily stored in the named pipe in the log file on the shared disk, and the recording means storing the log message in the log file Provided is a program for functioning as timing setting means for setting a recording timing.

本発明によれば、Active−Standby型のクラスタシステムにおいて、名前付きパイプ(FIFO)を読み込むプログラムによって、ログメッセージ転送用のsyslogd経由で処理されるログメッセージを共有ディスク上のログファイルに保存することにより、syslogdで処理されるメッセージを共有ディスク上のファイルへ適正に記録することが可能となる。これによって、Active側のサーバ(運用系の現用サーバ)に障害が発生してStandby側のサーバ(待機系の予備サーバ)へ切替えるためのフェイルオーバが発生した際でも、Standby側のサーバから共有ディスク上の同一のログファイルに対して継続してログを追記することができる。   According to the present invention, in an Active-Standby type cluster system, a log message processed via syslogd for log message transfer is stored in a log file on a shared disk by a program that reads a named pipe (FIFO). Thus, the message processed by the syslogd can be properly recorded in the file on the shared disk. As a result, even if a failure occurs on the active server (active active server) and a failover occurs to switch to the standby server (standby spare server), the standby server can transfer to the shared disk. You can continue to add logs to the same log file.

本発明の実施形態に係るActive−Standby型のクラスタシステムが共有ディスク上にログファイルを指定するときの構成を示すブロック図である。It is a block diagram which shows a structure when the Active-Standby type cluster system which concerns on embodiment of this invention designates a log file on a shared disk. 図1に示すクラスタシステムにおける起動処理の動作の流れを示すフローチャートである。It is a flowchart which shows the flow of operation | movement of the starting process in the cluster system shown in FIG. 図1に示すクラスタシステムが起動した後に、共有ディスク上のログファイルに対してログメッセージを出力する処理の流れを示すフローチャートである。2 is a flowchart showing a flow of processing for outputting a log message to a log file on a shared disk after the cluster system shown in FIG. 1 is activated. 図1に示すクラスタシステムにおける停止処理の動作の流れを示すフローチャートである。3 is a flowchart showing a flow of stop processing in the cluster system shown in FIG. 1. 図1に示すクラスタシステムのクラスタサービスをフェイルオーバするときの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process when failing over the cluster service of the cluster system shown in FIG. 一般的なActive−Standby型のクラスタシステムの構成を示すブロック図である。It is a block diagram which shows the structure of a general Active-Standby type cluster system. 一般的なActive−Standby型のクラスタシステムが共有ディスク上にログファイルを指定するときの構成を示すブロック図である。It is a block diagram which shows a structure when a general Active-Standby type cluster system designates a log file on a shared disk.

本発明の実施形態に係るクラスタシステムは、共有ディスクを利用したActive−Standby型のクラスタシステムであって、名前付きパイプ(FIFO)を読み込むプログラムによって、転送機能を有するsyslogd経由で処理されるメッセージを共有ディスク上のログファイルへ保存することを特徴としている。すなわち、本実施形態のActive−Standby型のクラスタシステムでは、syslogdによって処理されるメッセージを共有ディスク上のログファイルに記録する場合、そのsyslogd側のログファイル出力先としてローカルディスク上の名前付きパイプ(FIFO)を指定する。これにより、syslogdがオープンするログファイルはローカルディスク上に存在するため、共有ディスクがマウントされていない状態でもファイルオープンの処理は行われる。また、syslogdを起動した状態でも共有ディスクのアンマウントが可能となる。   The cluster system according to the embodiment of the present invention is an Active-Standby type cluster system that uses a shared disk, and a message that is processed via a syslogd having a transfer function by a program that reads a named pipe (FIFO). It is characterized by saving to a log file on a shared disk. That is, in the Active-Standby type cluster system of this embodiment, when a message processed by the syslogd is recorded in a log file on the shared disk, a named pipe on the local disk (as a log file output destination on the syslogd side ( FIFO). As a result, since the log file opened by syslogd exists on the local disk, the file opening process is performed even when the shared disk is not mounted. In addition, the shared disk can be unmounted even when syslogd is activated.

また、プログラム(ログアプリケーション)によって、syslogdから名前付きパイプ(FIFO)に出力されたメッセージを読み込み、このメッセージを共有ディスク上のログファイルへ記録する。このプログラムは、syslogdから名前付きパイプへメッセージが出力されるたびに、共有ディスク上のログファイルに対してオープン/書き込み/クローズの処理を行うため、共有ディスク上のログファイルが常にオープンされる状態にはならない。   Further, a message output from the syslogd to a named pipe (FIFO) is read by a program (log application), and this message is recorded in a log file on the shared disk. This program always opens / writes / closes the log file on the shared disk every time a message is output from syslogd to the named pipe, so the log file on the shared disk is always opened. It will not be.

以下、本発明に係るクラスタシステムにおける共有ディスク上のログファイルへの記録方法について、図面を参照しながら好適な実施形態について詳細に説明する。   Hereinafter, a preferred embodiment of a recording method for a log file on a shared disk in a cluster system according to the present invention will be described in detail with reference to the drawings.

《実施形態》
図1は、本発明の実施形態に係るActive−Standby型のクラスタシステムが共有ディスク上にログファイルを指定するときの構成を示すブロック図である。先ず、図1に示すクラスタシステムの構成について説明する。このクラスタシステムは、サーバ装置10a、10b(以下、サーバ装置10a、10bを総称する場合、サーバ装置10と呼ぶ)と共有ディスク30とを備える。なお、本実施形態では、サーバ装置10aがActive側(運用系)として機能し、サーバ装置10bがStandby側(待機系)として機能する。したがって、クラスタサービス20の提供は、Active側であるサーバ装置10aによって行われる。
<Embodiment>
FIG. 1 is a block diagram showing a configuration when an Active-Standby type cluster system according to an embodiment of the present invention specifies a log file on a shared disk. First, the configuration of the cluster system shown in FIG. 1 will be described. This cluster system includes server devices 10a and 10b (hereinafter, when the server devices 10a and 10b are collectively referred to as the server device 10) and a shared disk 30. In the present embodiment, the server device 10a functions as the active side (active system), and the server device 10b functions as the standby side (standby system). Therefore, the provision of the cluster service 20 is performed by the server device 10a on the active side.

共有ディスク30は、クラスタサービス20を提供するために必要なデータなどを含んでおり、Active側のサーバ装置10、すなわちサーバ装置10aからのみ使用される。また、データの転送機能を有するsyslogd11(syslogd11a、11b)はサーバ装置10上で稼動し、ログファイル12(ログファイル12a、12b)及び名前付きパイプ13(名前付きパイプ13a、13b)に対してメッセージを送信する。   The shared disk 30 includes data necessary for providing the cluster service 20, and is used only from the server device 10 on the active side, that is, the server device 10a. The syslogd 11 (syslogd 11a, 11b) having a data transfer function operates on the server device 10, and sends a message to the log file 12 (log files 12a, 12b) and the named pipe 13 (named pipes 13a, 13b). Send.

サーバ装置10のログアプリケーション14(ログアプリケーション14a、14b)は、名前付きパイプ13に対してsyslogd11からの入力を待ち受け、syslogd11から名前付きパイプ13へ入力があったときには、共有ディスク30上のログファイル31に対して出力を行う。   The log application 14 (log applications 14a and 14b) of the server apparatus 10 waits for an input from the syslogd 11 to the named pipe 13, and when there is an input from the syslog 11 to the named pipe 13, the log file on the shared disk 30 31 is output.

なお、アプリケーション21のログメッセージをローカルディスク上の名前付きパイプ13へ一時的に保存する保存手段は、サーバ装置10のsyslogd11によって実現され、また、名前付きパイプ13へ一時的に保存されたログメッセージを共有ディスク30上のログファイル31へ記録する記録手段、及びこの記録手段がログメッセージをログファイル31へ記録するタイミングを設定するタイミング設定手段は、サーバ装置10のログアプリケーション14によって実現される。   Note that the storage means for temporarily storing the log message of the application 21 in the named pipe 13 on the local disk is realized by the syslog 11 of the server device 10, and the log message temporarily stored in the named pipe 13. Is recorded in the log file 31 on the shared disk 30, and the timing setting means for setting the timing at which the recording unit records the log message in the log file 31 is realized by the log application 14 of the server device 10.

次に、図1に示すクラスタシステムの基本的な動作の流れについてフローチャートを参照しながら説明する。最初に、クラスタシステムにおける起動処理の動作の流れについて説明する。図2は、図1に示すクラスタシステムにおける起動処理の動作の流れを示すフローチャートである。   Next, the basic operation flow of the cluster system shown in FIG. 1 will be described with reference to a flowchart. First, the operation flow of the startup process in the cluster system will be described. FIG. 2 is a flowchart showing the operation flow of the startup process in the cluster system shown in FIG.

先ず、サーバ装置10のOS(Operating System)が起動すると(ステップS1)、サーバ装置10上でsyslogd11が起動する(ステップS2)。このとき、サーバ装置10は、syslogd11が設定された名前付きパイプ13を書き込みモードでオープンにする。次に、サーバ装置10上でログアプリケーション14が起動し、名前付きパイプ13を読み取って専用モードでファイルオープンしてsyslogd11からの入力を待ち受ける(ステップS3)。   First, when the OS (Operating System) of the server apparatus 10 is activated (step S1), the syslogd 11 is activated on the server apparatus 10 (step S2). At this time, the server apparatus 10 opens the named pipe 13 set with the syslogd 11 in the write mode. Next, the log application 14 is activated on the server device 10, reads the named pipe 13, opens a file in a dedicated mode, and waits for input from the syslog 11 (step S3).

そして、サーバ装置10上で、それぞれのクラスタソフトが起動して通信が行われると(ステップS4)、サーバ装置10aとサーバ装置10bのうち何れのサーバがActive側(運用系)であるかが判定される。すなわち、サーバ装置10は、自装置がActive側であるか否かを判定する(ステップS5)。ここで、自装置がクラスタシステムのActive側であると判定した場合(ステップS5でYes)、サーバ装置10は、共有ディスク30の領域をマウント(認識)し(ステップS6)、その後にクラスタサービス20の機能を実現するアプリケーション21を起動して(ステップS7)、起動処理の動作を完了する(ステップS8)。図1の例においては、サーバ装置10aが該動作を実行することとなる。
他方、ステップS5において、自装置がActive側でないと判定した場合(ステップS5でNo)、サーバ装置10は、アプリケーション21の起動及び共有ディスク30の領域のマウントを実行せずに、起動処理の動作を完了する(ステップS8)。図1の例においては、サーバ装置10bが該動作を実行することとなる。
Then, when the respective cluster software is activated and communication is performed on the server device 10 (step S4), it is determined which of the server device 10a and the server device 10b is the active side (active system). Is done. That is, the server device 10 determines whether or not the own device is on the active side (step S5). If it is determined that the own device is the active side of the cluster system (Yes in step S5), the server device 10 mounts (recognizes) the area of the shared disk 30 (step S6), and then the cluster service 20 The application 21 that realizes the above function is activated (step S7), and the activation process is completed (step S8). In the example of FIG. 1, the server apparatus 10a performs this operation.
On the other hand, if it is determined in step S5 that the own apparatus is not the active side (No in step S5), the server apparatus 10 performs the activation process operation without starting the application 21 and mounting the area of the shared disk 30. Is completed (step S8). In the example of FIG. 1, the server device 10b executes the operation.

次に、クラスタシステムの起動後に共有ディスク上のログファイルに対してメッセージを出力する処理の流れを説明する。図3は、図1に示すクラスタシステムが起動した後に、共有ディスク上のログファイルに対してログメッセージを出力する処理の流れを示すフローチャートである。ここでは、図1に示すようにサーバ装置10aがクラスタシステムのActive側として稼動している場合について説明する。   Next, the flow of processing for outputting a message to the log file on the shared disk after starting the cluster system will be described. FIG. 3 is a flowchart showing a flow of processing for outputting a log message to the log file on the shared disk after the cluster system shown in FIG. 1 is started. Here, the case where the server apparatus 10a is operating as the active side of the cluster system as shown in FIG. 1 will be described.

図3において、ログ出力の動作が開始されると(ステップS11)、先ず、Active側のサーバ装置10a上において、クラスタサービス20を実現するためのアプリケーション21がsyslogd11aに対してメッセージを出力する(ステップS12)。次に、サーバ装置10aのログアプリケーション14aは、名前付きパイプ13a経由で該メッセージを読み込み、共有ディスク30のログファイル31を書き込みモードでファイルオープンする(ステップS13)。   In FIG. 3, when the log output operation is started (step S11), first, the application 21 for realizing the cluster service 20 outputs a message to the syslogd 11a on the server device 10a on the active side (step S11). S12). Next, the log application 14a of the server device 10a reads the message via the named pipe 13a, and opens the log file 31 of the shared disk 30 in the write mode (step S13).

次に、サーバ装置10aのログアプリケーション14aは、読み込んだメッセージを共有ディスク30のログファイル31に出力し(ステップS14)、読み込んだメッセージの出力が完了すると共有ディスク30のログファイル31をファイルクローズにして(ステップS15)、共有ディスク30上のログファイル31に対するメッセージの出力を完了する(ステップS16)。   Next, the log application 14a of the server device 10a outputs the read message to the log file 31 of the shared disk 30 (step S14), and when the output of the read message is completed, the log file 31 of the shared disk 30 is closed. (Step S15), the message output to the log file 31 on the shared disk 30 is completed (Step S16).

次に、クラスタシステムにける停止処理の動作の流れについて説明する。図4は、図1に示すクラスタシステムにおける停止処理の動作の流れを示すフローチャートである。図4において、クラスタシステムに対して停止命令が発行されて、停止処理が開始されると(ステップS21)、サーバ装置10は、自装置がActive側のサーバであるか否かを判定する(ステップS22)。自装置がActive側のサーバである場合(ステップS22でYes)、サーバ装置10のクラスタサービス20の停止が開始されてアプリケーション21が停止する(ステップS23)。   Next, the flow of the stop process operation in the cluster system will be described. FIG. 4 is a flowchart showing the flow of the stop process in the cluster system shown in FIG. In FIG. 4, when a stop command is issued to the cluster system and stop processing is started (step S21), the server device 10 determines whether or not the own device is an active server (step S21). S22). When the own device is an active server (Yes in step S22), the stop of the cluster service 20 of the server device 10 is started and the application 21 is stopped (step S23).

そして、アプリケーション21の停止後に共有ディスク30の領域がアンマウント(切り離し)される(ステップS24)。さらに、共有ディスク30の領域がアンマウントされた後、サーバ装置10はOSの停止処理としてクラスタソフトを停止する(ステップS25)。
さらに、サーバ装置10は、ログアプリケーション14を停止させ(ステップS26)、続いて、syslogd11を停止させ(ステップS27)、サーバ装置10の停止処理を完了する(ステップS28)。
Then, after the application 21 is stopped, the area of the shared disk 30 is unmounted (separated) (step S24). Furthermore, after the area of the shared disk 30 is unmounted, the server apparatus 10 stops the cluster software as an OS stop process (step S25).
Further, the server device 10 stops the log application 14 (step S26), then stops the syslogd 11 (step S27), and completes the stop processing of the server device 10 (step S28).

なお、ステップS22で、自装置がActive側のサーバでない場合(ステップS22でNo)、サーバ装置10は、ステップS23とステップS24をパスし、上記ステップS25の処理を実行する。   If it is determined in step S22 that the own apparatus is not the server on the active side (No in step S22), the server apparatus 10 passes step S23 and step S24 and executes the process of step S25.

次に、クラスタシステムのクラスタサービスを代替サーバにフェイルオーバ(切替処理)するときの動作の流れについて説明する。図5は、図1に示すクラスタシステムのクラスタサービスをフェイルオーバするときの処理の流れを示すフローチャートである。   Next, an operation flow when failover (switching processing) of the cluster service of the cluster system to an alternative server will be described. FIG. 5 is a flowchart showing a processing flow when failing over the cluster service of the cluster system shown in FIG.

先ず、クラスタシステムに対してクラスタサービスの切替命令が発行されてフェイルオーバが開始されると(ステップS31)、サーバ装置10は、自装置がActive側のサーバであるか否かを判定する(ステップS32)。自装置がActive側のサーバである場合(ステップS32でYes)、自装置のクラスタサービス20の停止が開始されてアプリケーション21が停止する(ステップS33)。   First, when a cluster service switching command is issued to the cluster system and failover is started (step S31), the server apparatus 10 determines whether or not the own apparatus is an active server (step S32). ). When the own device is an active server (Yes in step S32), the stop of the cluster service 20 of the own device is started and the application 21 is stopped (step S33).

そして、アプリケーション21の停止後に、共有ディスク30の領域がアンマウント(切り離し)され(ステップS34)、クラスタサービスのフェイルオーバ(切替処理)を完了する(ステップS38)。   After the application 21 is stopped, the area of the shared disk 30 is unmounted (separated) (step S34), and the failover (switching process) of the cluster service is completed (step S38).

一方、ステップS32において、自装置がActive側のサーバでない場合(ステップS32でNo)、サーバ装置10は、相手装置(自装置がサーバ装置10である場合はサーバ装置10a)の切替処理が完了しているか否かを判定し、切替処理が完了するのを待ち合わせる(ステップS35)。   On the other hand, in step S32, when the own device is not the server on the active side (No in step S32), the server device 10 completes the switching process of the partner device (or the server device 10a when the own device is the server device 10). And waits for the completion of the switching process (step S35).

相手装置から自装置への切替えが完了した場合(ステップS35でYes)、Standbyのサーバ装置は、共有ディスク30の領域をマウントし(ステップS36)、その後にクラスタサービス20としてアプリケーション21を起動し(ステップS37)、クラスタサービスのフェイルオーバ(切替処理)を完了する(ステップS38)。   When the switching from the partner device to the own device is completed (Yes in step S35), the standby server device mounts the area of the shared disk 30 (step S36), and then starts the application 21 as the cluster service 20 ( In step S37), the failover (switching process) of the cluster service is completed (step S38).

以上、本発明に係るクラスタシステムの実施形態について図面を参照して詳述してきたが、この発明の具体的に構成はこれらの実施形態に限られるものではなく、この発明の趣旨を逸脱しない範囲の設計の変更等があってもそれらは本発明に含まれる。   The embodiments of the cluster system according to the present invention have been described in detail with reference to the drawings. However, the specific configuration of the present invention is not limited to these embodiments, and the scope of the present invention is not deviated from. Even if there are changes in the design, etc., they are included in the present invention.

なお、上述したサーバ装置10の動作は、プログラムの形式でコンピュータ読み取り可能な記録媒体に記憶されており、このプログラムをコンピュータが読み出して実行することによって上記の各処理が行われる。ここでコンピュータ読み取り可能な記録媒体とは、磁気ディスク、光磁気ディスク、CD−ROM、DVD−ROM、半導体メモリ等をいう。また、このコンピュータプログラムを通信回線によってコンピュータに配信し、この配信を受けたコンピュータが当該プログラムを実行するようにしてもよい。   The operation of the server device 10 described above is stored in a computer-readable recording medium in the form of a program, and the above-described processes are performed by the computer reading and executing this program. Here, the computer-readable recording medium means a magnetic disk, a magneto-optical disk, a CD-ROM, a DVD-ROM, a semiconductor memory, or the like. Alternatively, the computer program may be distributed to the computer via a communication line, and the computer that has received the distribution may execute the program.

また、上記のプログラムは、前述した機能の一部を実現するためのものであってもよい。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。   Further, the above program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, what is called a difference file (difference program) may be sufficient.

1、1a、1b サーバ装置
11、11a、11b syslogd(保存手段)
12、12a、12b、31 log(ログファイル)
13、13a、13b 名前付きパイプ
14、14a、14b ログアプリケーション(記録手段、タイミング設定手段)
20 クラスタサービス
21 アプリケーション
30 共有ディスク
1, 1a, 1b server device 11, 11a, 11b syslogd (storage means)
12, 12a, 12b, 31 log (log file)
13, 13a, 13b Named pipes 14, 14a, 14b Log application (recording means, timing setting means)
20 Cluster service 21 Application 30 Shared disk

Claims (9)

運用系サーバと待機系サーバとが共有ディスクを利用して動作を行うクラスタシステムであって、
アプリケーションのログメッセージをローカルディスク上の名前付きパイプへ一時的に保存する保存手段と、
前記名前付きパイプへ一時的に保存された前記ログメッセージを前記共有ディスク上のログファイルへ記録する記録手段と、
前記記録手段がログメッセージを前記ログファイルへ記録するタイミングを設定するタイミング設定手段と、
を備えたことを特徴とするクラスタシステム。
A cluster system in which the active server and standby server operate using a shared disk,
A storage means to temporarily store application log messages in a named pipe on the local disk;
Recording means for recording the log message temporarily stored in the named pipe to a log file on the shared disk;
Timing setting means for setting a timing at which the recording means records a log message in the log file;
A cluster system characterized by comprising:
前記記録手段は、前記名前付きパイプを読み込むプログラムによって前記ログメッセージを前記ログファイルへ記録することを特徴とする請求項1に記載のクラスタシステム。   The cluster system according to claim 1, wherein the recording unit records the log message in the log file by a program that reads the named pipe. 前記記録手段は、前記運用系サーバ又は前記待機系サーバのローカルディスク上に存在する前記名前付きパイプを指定して、前記ログメッセージを前記ログファイルへ記録することを特徴とする請求項1又は2に記載のクラスタシステム。   3. The recording unit according to claim 1, wherein the recording unit specifies the named pipe existing on a local disk of the active server or the standby server, and records the log message in the log file. The cluster system described in 1. 前記タイミング設定手段は、前記保存手段から前記名前付きパイプへ前記ログメッセージが出力されるタイミングで、前記ログファイルのオープン/書き込み/クローズの処理を行うことを特徴とする請求項1乃至3の何れかに記載のクラスタシステム。   4. The timing setting unit performs open / write / close processing of the log file at a timing when the log message is output from the storage unit to the named pipe. The cluster system described in 運用系サーバと待機系サーバとで構成されるクラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法であって、
アプリケーションのログメッセージをローカルディスク上の名前付きパイプへ一時的に保存する第1のステップと、
前記名前付きパイプへ一時的に保存された前記ログメッセージを前記ログファイルへ記録するタイミングを設定する第2のステップと、
前記第2のステップで設定されたタイミングに基づいて、前記名前付きパイプへ一時的に保存された前記ログメッセージを前記共有ディスク上のログファイルへ記録する第3のステップと、
を含むことを特徴とするクラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法。
A method of recording data in a log file on a shared disk in a cluster system composed of an active server and a standby server,
A first step of temporarily saving an application log message to a named pipe on the local disk;
A second step of setting a timing for recording the log message temporarily stored in the named pipe to the log file;
A third step of recording the log message temporarily stored in the named pipe in a log file on the shared disk based on the timing set in the second step;
A method for recording data in a log file on a shared disk in a cluster system, comprising:
前記ログメッセージの前記ログファイルへの記録は、前記名前付きパイプを読み込むプログラムによって行われることを特徴とする請求項5に記載のクラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法。   6. The method for recording data in a log file on a shared disk in a cluster system according to claim 5, wherein the log message is recorded in the log file by a program that reads the named pipe. 前記ログメッセージの前記ログファイルへの記録は、前記運用系サーバ又は前記待機系サーバのローカルディスク上に存在する前記名前付きパイプを指定することによって行われることを特徴とする請求項5又は6に記載のクラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法。   7. The log message is recorded in the log file by designating the named pipe existing on a local disk of the active server or the standby server. A method of recording data in a log file on a shared disk in the described cluster system. 前記アプリケーションのログメッセージが前記名前付きパイプへ保存されるタイミングで、前記ログファイルのオープン/書き込み/クローズの処理が行われることを特徴とする請求項5乃至7の何れかに記載のクラスタシステムにおける共有ディスク上のログファイルへのデータ記録方法。   8. The cluster system according to claim 5, wherein the log file is opened / written / closed at a timing when the log message of the application is stored in the named pipe. Data recording method to log file on shared disk. 運用系サーバと待機系サーバとで構成されるクラスタシステムが共有ディスク上のログファイルへデータを記録するプログラムであって、
コンピュータを、
アプリケーションのログメッセージをローカルディスク上の名前付きパイプへ一時的に保存する保存手段、
前記名前付きパイプへ一時的に保存された前記ログメッセージを前記共有ディスク上のログファイルへ記録する記録手段、
前記記録手段がログメッセージを前記ログファイルへ記録するタイミングを設定するタイミング設定手段、
として機能させるためのプログラム。
A cluster system consisting of an active server and a standby server is a program that records data in a log file on a shared disk,
Computer
A storage means to temporarily store application log messages in a named pipe on the local disk,
Recording means for recording the log message temporarily stored in the named pipe to a log file on the shared disk;
Timing setting means for setting a timing at which the recording means records a log message in the log file;
Program to function as.
JP2011031747A 2011-02-17 2011-02-17 Cluster system, data recording method, and program Pending JP2012173752A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011031747A JP2012173752A (en) 2011-02-17 2011-02-17 Cluster system, data recording method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011031747A JP2012173752A (en) 2011-02-17 2011-02-17 Cluster system, data recording method, and program

Publications (1)

Publication Number Publication Date
JP2012173752A true JP2012173752A (en) 2012-09-10

Family

ID=46976641

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011031747A Pending JP2012173752A (en) 2011-02-17 2011-02-17 Cluster system, data recording method, and program

Country Status (1)

Country Link
JP (1) JP2012173752A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014081811A (en) * 2012-10-17 2014-05-08 Hitachi Solutions Ltd Log management system and log management method
CN104050074A (en) * 2013-03-12 2014-09-17 中国银联股份有限公司 Method and device for asynchronously recording log in system
JP2014170394A (en) * 2013-03-04 2014-09-18 Nec Corp Cluster system
US9501372B2 (en) 2013-09-12 2016-11-22 Nec Corporation Cluster system including closing a bus using an uncorrectable fault upon a fault detection in an active server
CN110245059A (en) * 2019-05-20 2019-09-17 平安普惠企业管理有限公司 A kind of data processing method, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11259326A (en) * 1998-03-13 1999-09-24 Ntt Communication Ware Kk Hot standby system, automatic re-execution method for the same and storage medium therefor
JP2000112706A (en) * 1998-09-30 2000-04-21 Canon Inc System and method for printing log totalling management, and storage medium
JP2002521765A (en) * 1998-07-29 2002-07-16 ユニシス コーポレイシヨン Method and apparatus for processing a request for management of a distributed network application executing in a clustered computing environment
JP2005078285A (en) * 2003-08-29 2005-03-24 Fujitsu Ltd File processing method
JP2007066216A (en) * 2005-09-02 2007-03-15 Hitachi Ltd Boot reconfiguration method
JP2009519509A (en) * 2005-12-03 2009-05-14 インターナショナル・ビジネス・マシーンズ・コーポレーション Remote monitoring method and apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11259326A (en) * 1998-03-13 1999-09-24 Ntt Communication Ware Kk Hot standby system, automatic re-execution method for the same and storage medium therefor
JP2002521765A (en) * 1998-07-29 2002-07-16 ユニシス コーポレイシヨン Method and apparatus for processing a request for management of a distributed network application executing in a clustered computing environment
JP2000112706A (en) * 1998-09-30 2000-04-21 Canon Inc System and method for printing log totalling management, and storage medium
JP2005078285A (en) * 2003-08-29 2005-03-24 Fujitsu Ltd File processing method
JP2007066216A (en) * 2005-09-02 2007-03-15 Hitachi Ltd Boot reconfiguration method
JP2009519509A (en) * 2005-12-03 2009-05-14 インターナショナル・ビジネス・マシーンズ・コーポレーション Remote monitoring method and apparatus

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014081811A (en) * 2012-10-17 2014-05-08 Hitachi Solutions Ltd Log management system and log management method
JP2014170394A (en) * 2013-03-04 2014-09-18 Nec Corp Cluster system
US9235484B2 (en) 2013-03-04 2016-01-12 Nec Corporation Cluster system
CN104050074A (en) * 2013-03-12 2014-09-17 中国银联股份有限公司 Method and device for asynchronously recording log in system
US9501372B2 (en) 2013-09-12 2016-11-22 Nec Corporation Cluster system including closing a bus using an uncorrectable fault upon a fault detection in an active server
CN110245059A (en) * 2019-05-20 2019-09-17 平安普惠企业管理有限公司 A kind of data processing method, equipment and storage medium
CN110245059B (en) * 2019-05-20 2022-11-08 平安普惠企业管理有限公司 Data processing method, device and storage medium

Similar Documents

Publication Publication Date Title
KR20110044858A (en) Maintain data indetermination in data servers across data centers
JP2012173752A (en) Cluster system, data recording method, and program
JPWO2010140222A1 (en) Information processing system, management apparatus, and information processing method
JP2007249776A (en) Database replication program, database replicator, and database replication method
WO2017215502A1 (en) Cloud-desktop disaster recovery method, client, server, cloud-desktop disaster recovery system, and storage medium
WO2018054079A1 (en) Method for storing file, first virtual machine and namenode
JP5521595B2 (en) Storage system and storage control method
US20170139698A1 (en) Information processing apparatus and program update control method
WO2016095372A1 (en) Method and apparatus for realizing image backup of transaction logs
JP3617437B2 (en) Data copy method and program recording medium recording data copy program
WO2017097233A1 (en) Fault tolerance method for data storage load and iptv system
US20190387053A1 (en) Message Transmission Method and Apparatus In Cluster File System
JP2009026091A (en) Connection management program, connection management method, and information processing device
CN111158955A (en) High-availability system based on volume replication and multi-server data synchronization method
US10409504B2 (en) Soft-switch in storage system
JP2008225567A (en) Information processing system
JP2009245391A (en) Information processor, error processing method, and program
JP5016696B2 (en) High availability system, server, high availability maintenance method and program
JP6012479B2 (en) Information processing system, control method, and control program
JP2018116477A (en) Information processing apparatus and information processing system
JP5947974B2 (en) Information processing apparatus, information processing apparatus exchange support system, and exchange support method
JP2016143248A (en) Storage control device and storage control program
JP4721057B2 (en) Data management system, data management method, and data management program
JP3636163B2 (en) Recovery method and exclusive control device in loosely coupled system
JP2004094608A (en) Data backup method and data backup device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141015

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141021

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141210

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150317