JP5061250B2 - Database management method and storage system - Google Patents

Database management method and storage system Download PDF

Info

Publication number
JP5061250B2
JP5061250B2 JP2011034292A JP2011034292A JP5061250B2 JP 5061250 B2 JP5061250 B2 JP 5061250B2 JP 2011034292 A JP2011034292 A JP 2011034292A JP 2011034292 A JP2011034292 A JP 2011034292A JP 5061250 B2 JP5061250 B2 JP 5061250B2
Authority
JP
Japan
Prior art keywords
log
storage
volume
copy
database
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
JP2011034292A
Other languages
Japanese (ja)
Other versions
JP2011165195A (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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2011034292A priority Critical patent/JP5061250B2/en
Publication of JP2011165195A publication Critical patent/JP2011165195A/en
Application granted granted Critical
Publication of JP5061250B2 publication Critical patent/JP5061250B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ログ転送によるディザスタリカバリ技術に関し、特に、ファイルより細かい粒度でログの読み込み・適用を行い、かつ、ログの読み込み・適用処理の中で、ログの再読み込み、あるいは、リモートコピーと連携した読み込みを行うディザスタリカバリ技術に適用して有効な技術に関する。   The present invention relates to disaster recovery technology by log transfer, and in particular, reads and applies logs at a finer granularity than files, and re-reads logs or links with remote copy during log reading and application processing The present invention relates to a technology that is effective when applied to a disaster recovery technology that performs read.

近年、ITはビジネスの基盤となっており、その重要性はますます高まっている。そのため、システムダウンが及ぼす影響は非常に大きく、例えば金融業の場合は、時間当たり数百万ドルの損失があると言われている。以上のような背景から、災害であってもビジネスを継続させることを目的にデータを遠隔地にバックアップするディザスタリカバリ(以下、DRと呼ぶ)が注目を集めている。   In recent years, IT has become the foundation of business and its importance is increasing. For this reason, the impact of system down is very large. For example, in the financial industry, it is said that there is a loss of several million dollars per hour. From the above background, disaster recovery (hereinafter referred to as DR), which backs up data to a remote location for the purpose of continuing business even in the event of a disaster, has attracted attention.

DRシステムで、サイト間の転送を実現する方式としては、リモートコピー機能を有する高機能ストレージを用いた方式が注目されている。リモートコピーを用いた方式の利点としては、サーバのリソースを消費することなくサイト間の転送を実現することが挙げられる。   As a method for realizing transfer between sites in the DR system, a method using a high-functional storage having a remote copy function has been attracting attention. As an advantage of the method using remote copy, transfer between sites can be realized without consuming server resources.

テロや広域災害を受けて法規制の動向もあり、リモートコピーを用いるDRシステムでも、(1)災害時にもデータ欠損なく、副サイトでビジネスを再開できること、(2)広域災害に対応し、副サイトを数百km以上離れた遠隔地に配置した場合であっても正サイトのオンライン性能を維持すること、の課題を同時に解決することが求められている。   In response to terrorism and wide-area disasters, there are trends in laws and regulations, and even with DR systems that use remote copy, (1) business can be resumed at the secondary site without data loss in the event of a disaster, and (2) There is a need to simultaneously solve the problem of maintaining the online performance of the primary site even when the site is located at a remote location several hundred kilometers away.

現状では、DRシステムは、金融業や大企業を中心に導入が進められている。しかし、今後は、リスク回避、格付け等の理由で、中小企業に対してもDRシステムの導入が求められると考えられる。中小企業に適用範囲を広げるためには、前述の2つの課題に加えて、DRシステムコストの削減が重要な課題となる。ここで、現在のDRシステムは、信頼性・セキュリティの観点から、専用線が用いられることが多い。広帯域幅の専用線の構築・維持は膨大な費用を要するため、DRシステムコストを削減するためには、回線コストの削減が必須となる。   At present, the DR system is being introduced mainly in the financial industry and large corporations. However, in the future, it is considered that the introduction of the DR system is also required for SMEs for reasons such as risk avoidance and rating. In order to expand the scope of application to small and medium enterprises, in addition to the above-mentioned two problems, reduction of DR system cost is an important problem. Here, in the current DR system, a dedicated line is often used from the viewpoint of reliability and security. Since the construction and maintenance of a dedicated line having a wide bandwidth requires enormous costs, it is essential to reduce the line cost in order to reduce the DR system cost.

以上の課題を解決する方式として、データベース処理システム(以下、DBMSと呼ぶ)のログファイルのみをリモートコピーで転送し、データベース(以下、DBと呼ぶ)ファイルは副サイトでログから回復するDR方式が注目されている。この方式では、DBファイルの転送が不要となるため、大幅な回線コストの削減が可能となる。近年は、ログを転送するDR方式においては、災害時の切り替えや計画的な切り替えの高速化、あるいは、運用容易性が求められている。   As a method for solving the above problems, there is a DR method in which only a log file of a database processing system (hereinafter referred to as DBMS) is transferred by remote copy, and a database (hereinafter referred to as DB) file is recovered from a log at a secondary site. Attention has been paid. In this method, transfer of the DB file is not required, so that the line cost can be greatly reduced. In recent years, the DR system for transferring logs has been required to speed up switching at the time of a disaster, systematic switching, or ease of operation.

例えば、ログファイルをリモートコピーで転送し、副サイトでDBファイル(DBボリューム:以下、ボリュームをVOLと呼ぶ)を回復する方式としては、従来方式1(非特許文献1)、従来方式2(特許文献1)の2つの方式が知られている。   For example, as a method of transferring a log file by remote copy and recovering a DB file (DB volume: hereinafter referred to as a VOL) at the secondary site, the conventional method 1 (Non-patent Document 1) and the conventional method 2 (patent) Two methods of literature 1) are known.

(従来方式1)
この従来方式1を図15に示す。図15は、従来方式1を適用したシステムの構成の一例を示す図である。図15において、101は正サイトのサーバ100内のDBMS、1400は副サイトのサーバ内のDBMS、120は正サイトのストレージ、130は副サイトのストレージ、128,138はログ用VOL、129,139はDB用VOL、1401,1411はアーカイブログ用VOL、1402はネットワークをそれぞれ示す。また、1403はリモートコピー、1404はサーバ間転送、1405はログ読み込み、1406はログ適用、1407はアーカイブをそれぞれ示す処理ルートである。
(Conventional method 1)
This conventional method 1 is shown in FIG. FIG. 15 is a diagram illustrating an example of the configuration of a system to which the conventional method 1 is applied. In FIG. 15, 101 is a DBMS in the primary site server 100, 1400 is a DBMS in the secondary site server, 120 is a primary site storage, 130 is a secondary site storage, 128 and 138 are log VOLs, 129 and 139. Denotes a DB VOL, 1401 and 1411 denote archive log VOLs, and 1402 denotes a network. Further, 1403 is a remote copy, 1404 is a server-to-server transfer, 1405 is a log read, 1406 is a log application, and 1407 is a processing route indicating an archive.

一般に、DBへの更新差分であるログが記録されるログファイル(ログ用VOL)は、複数のログファイルを世代管理する運用がとられ、容量超過などのイベント契機で切り替えながらログを追記していく。このとき、ログファイルは繰り返し上書きされていくため、切り替え元のログファイルの内容を保存しておくことを目的に、アーカイブログファイル(アーカイブログ用VOL)を作成する。   In general, a log file (log VOL) in which logs that are update differences to a DB are recorded is managed by generation management of multiple log files, and logs are added while switching at an event trigger such as exceeding capacity. Go. At this time, since the log file is repeatedly overwritten, an archive log file (archive log VOL) is created for the purpose of saving the contents of the switching source log file.

図15の方式は、ログをリモートコピーで転送すると共に、アーカイブログをサーバ間で転送する。副サイトの計算機では、スタンバイDBMSがアーカイブログを受信し、受信したアーカイブログを適用することでDB(DB用VOL)を回復する。   In the method of FIG. 15, the log is transferred by remote copy and the archive log is transferred between servers. In the computer at the secondary site, the standby DBMS receives the archive log and recovers the DB (DB VOL) by applying the received archive log.

(従来方式2)
この従来方式2を図16に示す。図16は、従来方式2を適用したシステムの構成の一例を示す図である。図16において、1600はアーカイブを示す処理ルートであり、図15と同一のものには同一の符号を付している。
(Conventional method 2)
This conventional method 2 is shown in FIG. FIG. 16 is a diagram illustrating an example of the configuration of a system to which the conventional method 2 is applied. In FIG. 16, reference numeral 1600 denotes a processing route indicating an archive, and the same components as those in FIG.

図16の方式では、ログのみをリモートコピーで転送する。副サイトでは、正サイトのアーカイブログファイル生成を監視しておき、アーカイブログファイル生成を検出すると、副サイトでも独立してアーカイブログファイルを生成する。アーカイブログファイルを生成したら、そのファイルを適用することで、DBを更新する。   In the method of FIG. 16, only the log is transferred by remote copy. At the secondary site, archive log file generation at the primary site is monitored, and when archive log file generation is detected, an archive log file is also generated independently at the secondary site. When the archive log file is generated, the DB is updated by applying the file.

米国特許第5640561号明細書US Pat. No. 5,640,561

SANRISE Solution Suite with Oracle(http://www.hitachi.co.jp/Prod/comp/storage/diskarray/tech/whitepaper/pdf/tech_disaster.pdf)SANRISE Solution Suite with Oracle (http://www.hitachi.co.jp/Prod/comp/storage/diskarray/tech/whitepaper/pdf/tech_disaster.pdf)

ところで、前記のような従来方式では、正サイトで書き込み中の最新のログファイルではなく、1世代以上前のログをファイル単位で適用している。これは、リモートコピーで書き込み中のVOLをそのまま読むと、読み込んだ内容の整合性が保障されないためである。これらの方式には、以下のような課題が考えられる。   By the way, in the conventional method as described above, a log of one generation or more before is applied for each file instead of the latest log file being written at the primary site. This is because if the VOL being written by remote copy is read as it is, the consistency of the read contents is not guaranteed. These methods have the following problems.

(課題1:迅速なFO(failover:サイト間切り替え)が困難)
一般に、運用を容易化する観点から、頻繁にログファイルのアーカイブを行う運用は好まれず、ログファイルのサイズは拡大する傾向がある。そのため、ファイル単位で回復を行う方式は、災害/計画FO時にも、サイズの大きいファイルの先頭からログ適用を開始しなければならず、FO完了までに多くの処理時間を要し、迅速なサービス再開が行えない。
(Issue 1: Rapid FO (Failover) is difficult)
In general, from the viewpoint of facilitating the operation, the operation of frequently archiving log files is not preferred, and the size of log files tends to increase. For this reason, the recovery method for each file must start log application from the beginning of a large file even during a disaster / planned FO, requiring a lot of processing time to complete the FO, and prompt service Cannot resume.

(課題2:正サイトのオンライン性能維持とDB整合性保証の両立)
FO時間を高速化するためには、ログファイル単位ではなく、正サイトが使用中のログファイルを読み込み対象として、ファイルより細かい粒度でログの読み込み・適用を実施すればよい。ここで、DBを正しく回復するには、ログが正しく読まれている事が保証されていなければならない。しかし、リモートコピーで書き込みが行われている最中に、そのログファイルを読むと、不正にログを読み込んでしまう場合がある。以下に、ログファイルの構造を説明した後、不正にログを読み込む場合について説明する。
(Issue 2: Maintaining online performance of the main site and guaranteeing DB consistency)
In order to speed up the FO time, it is only necessary to read and apply the log with a finer granularity than the file, with the log file being used by the primary site being the target of reading, not the log file unit. Here, in order to recover the DB correctly, it must be ensured that the log is read correctly. However, if the log file is read during writing by remote copy, the log may be read illegally. In the following, after explaining the structure of the log file, a case where the log is read illegally will be explained.

最初に、ログファイルの構造と読み込み/書き込み方式について説明する。ここで、行への更新差分情報そのものはログレコードと呼ぶものとする。正サイトのDBMSでは、更新を行う時には必ずログレコードを生成する。しかし、ログレコードを生成する度に、ストレージに出力するとオンライン性能への影響が大きいため、内部でバッファリングしておき、複数のレコードからなるログブロック単位で出力を行う。ログブロックには、ヘッダとトレイラが付加されており、両者とも正常に書かれていることにより、ブロックの整合性が保障できる。そのためには、副サイトでログを読み込む場合も、ブロック単位で読み込み、そのヘッダとトレイラにより整合性を検証することができる。   First, the structure of the log file and the read / write method will be described. Here, the update difference information for a row itself is called a log record. In the DBMS at the primary site, a log record is always generated when updating. However, every time a log record is generated, if it is output to the storage, the online performance is greatly affected. Therefore, buffering is performed internally and output is performed in units of log blocks composed of a plurality of records. A log block has a header and a trailer, and since both are written normally, consistency of the block can be guaranteed. For this purpose, even when the log is read at the secondary site, it can be read in block units, and the consistency can be verified by the header and trailer.

しかし、広域災害を考慮したDRシステムに適用する場合には、上記の処理だけでは整合性が検証できないケースが生じる。サイト間が長距離で転送遅延が大きい場合には、転送遅延の影響を最小限にするために、ブロックのサイズは大きく、転送回数を少なくすることが望ましい。しかし、このブロックサイズがストレージのキャッシュ管理単位(読み込み単位)より大きくなると、ログブロックの整合性検証が正しく行えないケースが生じる。このような不正な整合性検証は、ログ適用が正サイトのオンライン処理に完全に追いついており、正サイトでまさに書き込みを行っている領域を、副サイトのログ適用機能が読もうとしている場合に生じる。   However, when applied to a DR system that considers wide-area disasters, there are cases where consistency cannot be verified only by the above processing. When the distance between sites is long and the transfer delay is large, in order to minimize the influence of the transfer delay, it is desirable to increase the block size and reduce the number of transfers. However, when this block size is larger than the storage cache management unit (reading unit), there is a case in which log block consistency verification cannot be performed correctly. Such illegal integrity verification occurs when log application has completely caught up with online processing at the primary site, and the log application function at the secondary site is trying to read the area that is being written at the primary site. Arise.

図17に例を示す。図17は、ログ読み込みが正常に行えない場合の一例を説明する図である。図17において、1500はログブロック、1501は書き込み(1)領域、1502は読み込み(1)領域、1503は書き込み(2)領域、1504は読み込み(2)領域、1505はログ適用部に読み込まれたログブロックをそれぞれ示す。   An example is shown in FIG. FIG. 17 is a diagram for explaining an example when log reading cannot be performed normally. In FIG. 17, 1500 is a log block, 1501 is a write (1) area, 1502 is a read (1) area, 1503 is a write (2) area, 1504 is a read (2) area, and 1505 is read by the log application unit. Each log block is shown.

正サイトのDBMSはログブロック全体を書き込むが、OS層で複数のIOに分割される場合がある。図17では2個のIOに分割されており、それぞれがリモートコピーで転送される。副サイトでは、ログ適用機能を持つログ適用部が正サイトのIOとは独立に読み込み処理を行う。このとき、ストレージ内ではキャッシュ管理単位でデータ管理を行っており、読み込みもこのキャッシュ管理単位で行われる。   The DBMS at the primary site writes the entire log block, but may be divided into a plurality of IOs in the OS layer. In FIG. 17, it is divided into two IOs, and each is transferred by remote copy. At the secondary site, a log application unit having a log application function performs read processing independently of the IO at the primary site. At this time, in the storage, data management is performed in units of cache management, and reading is also performed in units of cache management.

図17では、正サイトのDBMSの1回の書き込みがOS層で2回の書き込みに分割されており、1回目の書き込みだけが完了している時に、ログ適用の1度目の読み込みが行われている(t→t+2)。続いて、2回目の書き込みが終わり、ブロック全体の書き込みが完了した後、ログ適用部が2回目の読み込みを行っている(t+3→t+4)。その結果、ログ適用部が読み込んだログブロック1505は図17のように、中抜けの状態となる。この場合、先頭/後尾(ヘッダ/トレイラ)は正しく読み込まれているため、ログブロックは正しいと判断され、ログ適用が行われる。その結果、副サイトのDBが破壊されてしまう。   In FIG. 17, one write of the primary site DBMS is divided into two writes in the OS layer, and when only the first write is completed, the first log application read is performed. (T → t + 2). Subsequently, after the second writing is completed and writing of the entire block is completed, the log application unit performs the second reading (t + 3 → t + 4). As a result, the log block 1505 read by the log application unit is in a hollow state as shown in FIG. In this case, since the head / tail (header / trailer) is correctly read, it is determined that the log block is correct, and log application is performed. As a result, the sub-site DB is destroyed.

以上のように、回線コスト削減のためにログをリモートコピーで転送し、DBはログ適用で回復するDR方式においては、(1)ログファイル単位で読み込み・適用を行う場合には迅速なFOが行えない、(2)迅速なFOを行うために、ファイルより細かい粒度で適用を行うと、不正なログを読み込み適用してしまうことでDBを破壊してしまうことがある、という問題が生じる。   As described above, in the DR method in which the log is transferred by remote copy to reduce the line cost and the DB is recovered by applying the log, (1) When the log file is read / applied, a quick FO is performed. (2) If application is performed with a finer granularity than a file in order to perform quick FO, there is a problem that the DB may be destroyed by reading and applying an invalid log.

そこで、本発明の目的は、ファイルより細かい粒度でログの読み込み・適用を行うことでFOの高速化を実現し、かつ、ログの読み込み・適用処理の中で、ログの再読み込み、あるいは、リモートコピーと連携した読み込みを行うことで、正サイトのログ書き込み単位が大きい場合でも正しくログ読み込みを行うことができるDR技術を提供することにある。   Accordingly, an object of the present invention is to realize a high-speed FO by reading and applying a log with a finer granularity than a file, and re-reading a log or performing remote reading in a log reading / applying process. An object of the present invention is to provide a DR technology that can perform log reading correctly even when the log writing unit of the primary site is large by performing reading linked with copying.

本発明の前記ならびにその他の目的と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、次のとおりである。   Of the inventions disclosed in the present application, the outline of typical ones will be briefly described as follows.

本発明は、FOの高速化のために、ファイルより細かい粒度でログの読み込み・適用を行い、かつ、正サイトのログ書き込み単位が大きい場合でも正しくログ読み込みを行うために、ログの読み込み・適用処理の中で、ログの再読み込み、あるいは、リモートコピーと連携した読み込みを行うものである。すなわち、本発明において、正サイトのDBMSのデータを遠隔地に配置された副サイトにコピーするDR方法およびDRシステム、第1のストレージ(正ストレージ)に加えられた更新を遠隔地に配置された第2のストレージ(副ストレージ)に反映するリモートコピー方法およびストレージシステムにおいては、以下のような特徴を有するものである。   The present invention reads and applies logs with a finer granularity than files to speed up FO, and reads and applies logs in order to correctly read logs even when the log writing unit at the main site is large. During the process, the log is re-read or read in conjunction with remote copy. That is, in the present invention, the DR method and DR system for copying the DBMS data of the primary site to the remote site located at the remote location, and the update applied to the first storage (primary storage) are located at the remote location. The remote copy method and storage system reflected in the second storage (secondary storage) have the following characteristics.

(1)正サイトでは正ストレージのリモートコピーでログを転送し、副サイトでは転送されるログを適用して副ストレージのDBを回復するログ適用処理において、正サイトで複数のログレコードからなるログブロック単位で書き込みを行い、副サイトでログ適用を行う際には、以下の処理を行う。副ストレージからログブロックを読み込み、整合性を検証する。ログブロックの読み込み時に、読み込み処理とリモートコピーによる書き込み処理とが競合していないかを判定する。判定により、競合がないと判定されたログブロックのみをDBに適用する。   (1) A log consisting of multiple log records at the primary site in a log application process where the log is transferred at the primary site by remote copy of the primary storage, and the transferred log is applied at the secondary site to recover the secondary storage DB When writing in block units and applying logs at the secondary site, the following processing is performed. Read log blocks from secondary storage and verify consistency. When reading the log block, it is determined whether or not the reading process and the writing process by the remote copy conflict. Only log blocks determined to have no contention by determination are applied to the DB.

(2)ログの再読み込みを行う方式において、副サイトでログ適用を行う際には、副ストレージからログブロックを読み込み、整合性を検証する。読み込んだログブロックの内、最後の1つを除いたログブロックについては読み込み処理とリモートコピーによる書き込み処理とが競合していないと判定する。最後のログブロックを除いたログブロックについては再読み込みを行った上で適用する。これにより、読み込みが正しく行えたかを確認しながらログ適用を行い、正サイトから読み込むべきログを指定するための通信や処理を行うことなく、副サイトで独立してログ適用してDBを回復することができる。   (2) In the method of rereading the log, when applying the log at the secondary site, the log block is read from the secondary storage and the consistency is verified. Regarding the log blocks other than the last one among the read log blocks, it is determined that the read processing and the write processing by remote copy do not conflict. The log block except the last log block is applied after reloading. This makes it possible to apply the log while confirming whether the reading has been performed correctly, and restore the DB by applying the log independently at the secondary site without performing communication or processing for specifying the log to be read from the primary site. be able to.

(3)リモートコピーと連携した読み込みを行う方式において、副サイトでログ適用を行う際には、第2のコピーを中断する。第2のボリュームからログブロックを読み込む。読み込んだログブロックを適用する。読み込めるログがなくなった場合にはログ適用処理を中断した後に第2のコピーを再開する。これにより、ログ読み込み時には第2のコピーを中断状態とすることで、ログ読み込みとリモートコピーによる書き込みが競合することを回避し、正サイトから読み込むべきログを指定するための通信や処理を行うことなく、副サイトで独立してログ適用してDBを回復することができる。   (3) In the method of reading linked with remote copy, the second copy is interrupted when log application is performed at the secondary site. Read a log block from the second volume. Apply the read log block. When there is no more log that can be read, the second copy is resumed after the log application process is interrupted. As a result, when the log is read, the second copy is suspended, thereby avoiding contention between log reading and remote copy writing, and performing communication and processing to specify the log to be read from the primary site. The DB can be recovered by applying the log independently at the secondary site.

本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば以下のとおりである。   Among the inventions disclosed in the present application, effects obtained by typical ones will be briefly described as follows.

(1)ログを同期転送する場合には欠損がないことが保証可能である。また、リモートコピー利用により、サーバリソースを消費することなく転送が可能なので、正サイトのオンライン性能への影響が小さい。   (1) When logs are transferred synchronously, it can be guaranteed that there is no loss. In addition, the use of remote copy allows transfer without consuming server resources, so the impact on the online performance of the primary site is small.

(2)更新量の多いDBファイルの転送が不要なため、狭帯域幅回線でも実現でき、回線コストの削減が可能となる。   (2) Since it is not necessary to transfer a DB file with a large update amount, it can be realized even with a narrow bandwidth line, and the line cost can be reduced.

(3)ファイルより細かい単位で適用を行うため、切り替え時にも迅速にサービスを再開することが可能となる。   (3) Since the application is performed in units smaller than the file, the service can be restarted quickly even at the time of switching.

(4)正サイトのオンライン性能維持のため、ログのIO単位が大きい場合であっても、再読み込み処理/リモートコピー連携処理により、不正読み込みによるDB破壊を防止することが可能となる。従って、広域災害を考慮して副サイトが数百km以上離れた構成にも対応可能となる。   (4) In order to maintain the online performance of the primary site, even if the log IO unit is large, it is possible to prevent the DB destruction due to unauthorized reading by the reread processing / remote copy cooperation processing. Therefore, it is possible to cope with a configuration in which the secondary site is several hundred km or more away in consideration of a wide area disaster.

(5)正サイトに、ログの読み込み位置を決定するための処理、あるいは、通信を新たに加えることなく、副サイトのログ適用部だけで独立してログ適用処理を行い、DBを回復することが可能となる。   (5) Processing for determining the log reading position at the primary site, or performing log application processing independently only at the log application unit at the secondary site without newly adding communication, and recovering the DB Is possible.

本発明の実施の形態1におけるDRシステムの構成の一例を示す図である。It is a figure which shows an example of a structure of DR system in Embodiment 1 of this invention. 本発明の実施の形態1において、ログファイルの構造の一例を示す図である。In Embodiment 1 of this invention, it is a figure which shows an example of the structure of a log file. 本発明の実施の形態1において、ログブロックの読み込み・適用スケジュールの一例を示す図である。In Embodiment 1 of this invention, it is a figure which shows an example of the read / application schedule of a log block. 本発明の実施の形態1において、ログ読み込み・適用処理(平常時)のフローの一例を示す図である。In Embodiment 1 of this invention, it is a figure which shows an example of the flow of a log reading and application process (normal time). 本発明の実施の形態1において、ログ読み込み・適用処理(切り替え時)のフローの一例を示す図である。In Embodiment 1 of this invention, it is a figure which shows an example of the flow of a log reading and application process (at the time of switching). 本発明の実施の形態1において、ログ読み込み・適用処理(平常時、SZ判定有り)のフローの一例を示す図である。In Embodiment 1 of this invention, it is a figure which shows an example of the flow of a log reading and application process (normal time, with SZ determination). 本発明の実施の形態2におけるDRシステムの構成の一例を示す図である。It is a figure which shows an example of a structure of DR system in Embodiment 2 of this invention. 本発明の実施の形態2において、JNL VOLと格納されるデータの構造の一例を示す図である。In Embodiment 2 of this invention, it is a figure which shows an example of the structure of the data stored with JNL VOL. 本発明の実施の形態2において、ログ読み込み・適用処理(平常時、一定時間経過)のフローの一例を示す図である。In Embodiment 2 of this invention, it is a figure which shows an example of the flow of a log reading and application process (normal time, fixed time passage). 本発明の実施の形態2において、ログ読み込み・適用処理(平常時、更新量超過)のフローの一例を示す図である。In Embodiment 2 of this invention, it is a figure which shows an example of the flow of a log reading and application process (normal time, update amount excess). 本発明の実施の形態2において、ログ読み込み・適用処理(切り替え時)のフローの一例を示す図である。In Embodiment 2 of this invention, it is a figure which shows an example of the flow of a log reading and application process (at the time of switching). 本発明の実施の形態2において、副ストレージのコピー処理(リモートコピー)のフローの一例を示す図である。FIG. 10 is a diagram showing an example of a flow of secondary storage copy processing (remote copy) in Embodiment 2 of the present invention. 本発明の実施の形態2において、副ストレージのコピー処理(JNL VOLからの反映処理)のフローの一例を示す図である。In Embodiment 2 of this invention, it is a figure which shows an example of the flow of a copy process (reflection process from JNL VOL) of a secondary storage. 本発明の実施の形態3におけるDRシステムの構成の一例を示す図である。It is a figure which shows an example of a structure of DR system in Embodiment 3 of this invention. 本発明に対して、従来方式1を適用したシステムの構成の一例を示す図である。It is a figure which shows an example of the structure of the system which applied the conventional system 1 with respect to this invention. 本発明に対して、従来方式2を適用したシステムの構成の一例を示す図である。It is a figure which shows an example of the structure of the system to which the conventional system 2 is applied with respect to this invention. 本発明に対して、従来方式1を適用したシステムにおいて、ログ読み込みが正常に行えない場合の一例を説明する図である。It is a figure explaining an example when the log reading cannot be normally performed in the system to which the conventional method 1 is applied to the present invention.

以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するための全図において、同一の構成要素には原則として同一の符号を付し、その繰り返しの説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same reference symbols throughout the drawings for describing the embodiment, and the repetitive description thereof will be omitted.

(実施の形態1)
本発明の実施の形態1におけるDRシステムを、図1〜図6を用いて説明する。
(Embodiment 1)
A DR system according to Embodiment 1 of the present invention will be described with reference to FIGS.

まず、図1により、本実施の形態におけるDRシステムの構成の一例を説明する。図1はDRシステムの構成の一例を示す図である。   First, an example of the configuration of the DR system in the present embodiment will be described with reference to FIG. FIG. 1 is a diagram illustrating an example of the configuration of a DR system.

本実施の形態のDRシステムは、ログの再読み込みを行う方式を適用し、正サイトと、副サイトから構成される。正サイトは、DBMSが稼動する計算機からなるサーバ100と、DBMSのログファイルとDBファイルが保存されるストレージ120から構成される。副サイトは、ログ適用処理を行う副DBMS、あるいは、ログ適用に特化された機能(ログ適用機能)が稼動する計算機からなるサーバ110と、ストレージ130から構成される。正サイトのストレージ120と副サイトのストレージ130とは、ネットワーク150を通じて接続されている。   The DR system according to the present embodiment applies a method of rereading a log, and includes a primary site and a secondary site. The primary site includes a server 100 that is a computer on which a DBMS operates, and a storage 120 that stores the DBMS log file and the DB file. The secondary site includes a server 110 and a storage 130, each of which includes a secondary DBMS that performs log application processing or a computer that operates a function specialized for log application (log application function). The primary site storage 120 and the secondary site storage 130 are connected through a network 150.

正サイトにおいて、サーバ100では、DBMS101が稼働し、このDBMS101には、DBバッファ102、ログバッファ103、DBアクセス制御部104、ログ管理部105が設けられている。正サイトのストレージ120には、ストレージ制御処理部121、キャッシュ126、ディスクアクセス制御部127、ログ用VOL(Log)128、DB用VOL(DB)129が設けられている。ストレージ制御処理部121には、コマンド処理部122、コピー処理制御部123、リモートコピー処理部124が設けられている。   At the primary site, the server 100 operates a DBMS 101, and the DBMS 101 is provided with a DB buffer 102, a log buffer 103, a DB access control unit 104, and a log management unit 105. The storage 120 at the primary site is provided with a storage control processing unit 121, a cache 126, a disk access control unit 127, a log VOL (Log) 128, and a DB VOL (DB) 129. The storage control processing unit 121 includes a command processing unit 122, a copy processing control unit 123, and a remote copy processing unit 124.

副サイトにおいて、サーバ110では、ログ適用部111が動作し、このログ適用部111には、DBバッファ112、ログバッファ113、ログ適用制御部114、ログ読み込み整合性検証部115、適用部116が設けられている。副サイトのストレージ130には、ストレージ制御処理部131、キャッシュ136、ディスクアクセス制御部137、ログ用VOL(Log)138、DB用VOL(DB)139が設けられている。ストレージ制御処理部131には、コマンド処理部132、コピー処理制御部133、リモートコピー処理部134が設けられている。   In the secondary site, the log application unit 111 operates in the server 110. The log application unit 111 includes a DB buffer 112, a log buffer 113, a log application control unit 114, a log reading consistency verification unit 115, and an application unit 116. Is provided. The storage 130 at the secondary site includes a storage control processing unit 131, a cache 136, a disk access control unit 137, a log VOL (Log) 138, and a DB VOL (DB) 139. The storage control processing unit 131 includes a command processing unit 132, a copy processing control unit 133, and a remote copy processing unit 134.

正サイトのサーバ100では、DBMS101が稼働する。DBMS101はUAP(ユーザアプリケーション)からの指示に従い、ストレージ120内のDB用VOL129に格納されるデータを参照、あるいは、更新する。DBMS101は、DB用VOL129に対して更新を行う場合には、まず、更新差分をログとして、ストレージ120内のログ用VOL128へ格納する。なお、DBMS101は、ログ管理部105とDBアクセス制御部104を有し、それぞれがDBバッファ102、ログバッファ103を介してストレージ120内のデータをアクセスする。   The DBMS 101 operates in the server 100 at the primary site. The DBMS 101 refers to or updates data stored in the DB VOL 129 in the storage 120 in accordance with an instruction from the UAP (user application). When updating the DB VOL 129, the DBMS 101 first stores the update difference as a log in the log VOL 128 in the storage 120. The DBMS 101 includes a log management unit 105 and a DB access control unit 104, and each accesses data in the storage 120 via the DB buffer 102 and the log buffer 103.

正サイトのストレージ120は、リモートコピー機能を有する。同様に、副サイトのストレージ130も、リモートコピー機能を有し、()内に併記して説明する。サーバ100(110)からのIO要求があった場合、コマンド処理部122(132)が要求を受け付ける。要求が書き込み要求であった場合は、キャッシュ126(136)上にデータがあれば、キャッシュ126(136)上でデータを更新する。キャッシュ126(136)にない場合は、ディスクアクセス制御部127(137)に該当データを依頼し、VOLを構成するディスクからキャッシュ126(136)にコピーしてから書き込みを行う。また、書き込んだデータは、ディスクアクセス制御部127(137)により非同期でディスクへ書き戻される。   The primary site storage 120 has a remote copy function. Similarly, the storage 130 at the secondary site also has a remote copy function and will be described in parentheses. When there is an IO request from the server 100 (110), the command processing unit 122 (132) accepts the request. If the request is a write request, if there is data on the cache 126 (136), the data is updated on the cache 126 (136). If the data is not in the cache 126 (136), the disk access control unit 127 (137) is requested for the corresponding data, and is copied from the disk constituting the VOL to the cache 126 (136). The written data is asynchronously written back to the disk by the disk access control unit 127 (137).

ここでは、リモートコピーの対象となっているVOLへの書き込みが行われた場合は、キャッシュ126(136)への書き込みに続いて、リモートコピー処理部124(134)が副サイトのストレージ120の対応する領域(キャッシュ136)にも書き込みを行うものとする。また、コピー処理制御部123(133)へ指示を行うことで、コピーの開始/停止(切断)/中断といったリモートコピーの状態制御が可能であるものとする。なお、本実施の形態では、正/副サイトのストレージ120(130)のログ用VOL128(138)がリモートコピーの対象になっているものとする。   Here, when writing to the VOL that is the target of remote copying is performed, following the writing to the cache 126 (136), the remote copy processing unit 124 (134) handles the storage 120 at the secondary site. It is assumed that data is also written to the area (cache 136). Further, it is assumed that remote copy status control such as copy start / stop (disconnect) / interruption can be performed by giving an instruction to the copy processing control unit 123 (133). In this embodiment, it is assumed that the log VOL 128 (138) of the storage 120 (130) at the primary / secondary site is the target of remote copy.

副サイトのサーバ110では、ログ適用部111が動作する。ログ適用部111は、リモートコピーで転送されるログ用VOL138を読み込み、DB用VOL139に含まれるデータを更新する。ログ読み込み整合性検証部115は、ログ用VOL138からログを読み込み、読み込んだログの整合性を検証する。ログ適用部111は、読み込んだログを適用し、DB用VOL139上のデータを更新する。ログ適用制御部114は、ログ読み込み整合性検証部115、適用部116を制御することでDBを回復する。なお、ログ適用部111も、DBMS101と同様に、DBバッファ112、ログバッファ113を介してVOL上のデータをアクセスする。   The log application unit 111 operates in the server 110 at the secondary site. The log application unit 111 reads the log VOL 138 transferred by remote copy, and updates the data included in the DB VOL 139. The log reading consistency verification unit 115 reads a log from the log VOL 138 and verifies the consistency of the read log. The log application unit 111 applies the read log and updates data on the DB VOL 139. The log application control unit 114 recovers the DB by controlling the log reading consistency verification unit 115 and the application unit 116. Note that the log application unit 111 also accesses data on the VOL via the DB buffer 112 and the log buffer 113 in the same manner as the DBMS 101.

本実施の形態のDRシステムにおいて、ログ適用を行うために副DBMSではなく、ログ適用機能を利用する場合は、切り替え後にサービスを継続する副DBMSは、この副サイトのサーバで動作してもよいし、別のサーバで動作してもよい。以下では、ログ適用機能を用いる場合について説明する。正サイトのストレージ120と副サイトのストレージ130は、ストレージ間ネットワーク150で結合されており、ログファイルのみがリモートコピーで転送される設定になっている。   In the DR system according to the present embodiment, when the log application function is used instead of the secondary DBMS to perform log application, the secondary DBMS that continues the service after switching may operate on the server at the secondary site. However, it may operate on another server. Hereinafter, a case where the log application function is used will be described. The storage 120 at the primary site and the storage 130 at the secondary site are connected by the inter-storage network 150, and only the log file is transferred by remote copy.

副サイトのログ適用機能は、図2に示すような、リモートコピーにより転送が行われるログ用VOL200上に存在するログファイル201を直接読んで適用する。図2は、ログファイルの構造の一例を示す図である。   The log application function of the secondary site directly reads and applies the log file 201 existing on the log VOL 200 transferred by remote copy as shown in FIG. FIG. 2 is a diagram illustrating an example of the structure of a log file.

このログファイル201は、ログレコード203を束ねたブロック単位で読み書きされる。すなわち、正サイトのDBMSは、ブロック単位でログファイルに書き込みを行い、一方、ログ適用機能はブロック単位で読み込みを行う。このログブロック202には、先頭にヘッダ204、後尾にトレイラ205が付加されており、それぞれに含まれるマジックワードにより、ブロック全体の整合性検証が行える。   The log file 201 is read and written in units of blocks in which log records 203 are bundled. That is, the primary site DBMS writes to the log file in block units, while the log application function reads in block units. The log block 202 is provided with a header 204 at the beginning and a trailer 205 at the end, and the consistency of the entire block can be verified by the magic word included in each.

ただし、前述のように、ログブロック202のサイズが大きく、かつ、ログ適用が正サイトのログ書き出しに追いついている場合、リモートコピーによる書き込みとログ適用機能の読み込みが競合する場合には、このヘッダ/トレイラによる整合性検証だけでは整合性が保証できないので、図3に示すようなスケジュールで読み込み・適用を行う。図3は、ログブロックの読み込み・適用スケジュールの一例を示す図である。   However, as described above, when the size of the log block 202 is large and the log application catches up with the log write of the primary site, this write header is used when the remote copy write and the log apply function read conflict. / Because consistency cannot be guaranteed only by consistency verification by a trailer, reading and application are performed according to a schedule as shown in FIG. FIG. 3 is a diagram illustrating an example of a log block reading / application schedule.

すなわち、あるログブロック(block(i))の読み込み・適用を行う際(300)には、そのブロック(block(i))に対して読み込みと書き込みが競合しないことを保証するために、次のログロック(block(i+1))が読めるかどうかを最初に確認する(301)。次のブロック(block(i+1))が読み込める場合には、先のログブロック(block(i))を再読み込みした上で、適用を行う(302)。ログはシーケンシャルに追記されるため、ログブロック(block(i+1))が書かれていれば、ログブロック(block(i))の書き込みは正常に完了していることが判断でき、ログブロックの整合性を保証することが可能となる。   That is, when reading / applying a certain log block (block (i)) (300), in order to ensure that reading and writing do not conflict with the block (block (i)), It is first checked whether the log lock (block (i + 1)) can be read (301). If the next block (block (i + 1)) can be read, the previous log block (block (i)) is re-read and applied (302). Since logs are added sequentially, if a log block (block (i + 1)) is written, it can be determined that the writing of the log block (block (i)) has been completed normally, and log block consistency It becomes possible to guarantee the sex.

次に、図4〜図6により、本実施の形態のDRシステムにおいて、ログ読み込み・適用処理のフローの一例を説明する。それぞれ、図4は平常時、図5は切り替え時、図6は平常時(SZ(サイズ)判定有り)のフローの一例を示す図である。   Next, an example of the flow of the log reading / applying process in the DR system of the present embodiment will be described with reference to FIGS. FIG. 4 is a diagram illustrating an example of a flow during normal operation, FIG. 5 is a diagram during switching, and FIG. 6 is a diagram illustrating an example of a flow during normal operation (with SZ (size) determination).

なお、本実施の形態においては、ブロックを1個ごとに読んでいるが、1度に複数のブロックを読み込んでもよい。複数のブロックを読み込んだ場合は、最後のブロック以前のブロックを適用対象とし、再読み込みを行った上で、適用を行う。   In this embodiment, the blocks are read one by one, but a plurality of blocks may be read at a time. When a plurality of blocks are read, the blocks before the last block are applied, applied after rereading.

図4において、ログ読み込み・適用処理(平常時)では、最初に、ログの読み込み位置を決定する(S401)。ここで、DBMSは、チェックポイント等のタイミングで、適用が完了しているログの通番(LSN)やその時に使用しているログファイルやDBファイルなどの内部情報をDBMS状態ファイルに出力する。   In FIG. 4, in the log reading / applying process (normal time), the log reading position is first determined (S401). Here, the DBMS outputs the serial number (LSN) of the log that has been applied and the internal information such as the log file and DB file used at that time to the DBMS status file at the timing of the checkpoint or the like.

ログの読み込み位置決定では、DBMS状態ファイルからLSNや使用しているログファイルを読み込み、最初に読み込むべきブロックを決定する(S402)。ここでは、ポインタ(ptr)が指すブロックから読み込みを開始する。   In the log reading position determination, the LSN and the log file being used are read from the DBMS status file, and the block to be read first is determined (S402). Here, reading is started from the block indicated by the pointer (ptr).

読み込み位置を決定したら、以降は、管理者やアプリケーションからのFO/停止指示があるか否かを判定し(S403)、FO/停止指示がある場合(Y)は停止/FO処理に移行し、FO/停止指示がない場合(N)には、FO/停止指示があるまで、ログ読み込み・適用処理を繰り返す。   After determining the reading position, it is determined whether or not there is a FO / stop instruction from the administrator or application (S403). If there is a FO / stop instruction (Y), the process proceeds to stop / FO processing. When there is no FO / stop instruction (N), the log reading / applying process is repeated until the FO / stop instruction is issued.

初めに、ptrが指すブロック(以降、ブロック(ptr)とする)を読み込み(S404)、続いて、ヘッダとトレイラによりブロック(ptr)の整合性検証を行う。ここでは、ブロック(ptr)は整合性があるか否かを判定し(S405)、整合性がない場合(N)はS1へ戻り、整合性がある場合(Y)、すなわち正しく読み込めた場合にはS2へ移行する。   First, a block indicated by ptr (hereinafter referred to as a block (ptr)) is read (S404), and then the consistency of the block (ptr) is verified by the header and trailer. Here, it is determined whether or not the block (ptr) is consistent (S405). If it is not consistent (N), the process returns to S1, and if it is consistent (Y), that is, if it is correctly read. Shifts to S2.

そして、再び、FO/停止指示があるか否かを判定し(S406)、FO/停止指示がある場合(Y)は停止/FO処理に移行し、FO/停止指示がない場合(N)には、次のブロック(ptr+1)の読み込みと整合性検証を行う。まず、次のブロック(ptr+1)を読み込み(S407)、続いて、ブロック(ptr+1)は整合性があるか否かを判定し(S408)、整合性がない場合(N)はS2へ戻り、整合性がある場合(Y)、すなわち整合性が検証されたら、ブロック(ptr)の再読み込みを行った上で適用を行い(S409,S410)、ptrを1つ進めて(S411)、S2へ戻る。   Then, it is determined again whether there is an FO / stop instruction (S406). If there is an FO / stop instruction (Y), the process proceeds to stop / FO processing, and if there is no FO / stop instruction (N). Reads the next block (ptr + 1) and performs consistency verification. First, the next block (ptr + 1) is read (S407), and then it is determined whether or not the block (ptr + 1) is consistent (S408). (Y), that is, if consistency is verified, the block (ptr) is re-read and applied (S409, S410), the ptr is advanced by 1 (S411), and the process returns to S2. .

以降、ptr+1が指すブロックの読み込み・検証を行い、問題がなければ、ptrが指すブロックの再読み込み・適用を実施する。   Thereafter, the block pointed to by ptr + 1 is read and verified. If there is no problem, the block pointed to by ptr is reread and applied.

図5において、管理者から、FO/停止指示を受けた場合の処理を説明する。   In FIG. 5, processing when an FO / stop instruction is received from the administrator will be described.

このログ読み込み・適用処理(切り替え時)では、最初に、停止指示かFO指示かを判定し(S501)、停止指示であった場合(停止)は、ログ適用の進捗情報としてptr情報をDB状態ファイルに書き出して処理を終了する(S502)。一方、FO指示であった場合(FO)には、最初にリモートコピーの状態制御を行う(S503)。例えば、災害時のFOであれば、リモートコピーを切断状態とし、以降に正サイトからの書き込みが行われる事を抑止する。一方、計画的なFOであれば、コピーの向きを逆向きに設定する。   In this log reading / applying process (at the time of switching), it is first determined whether it is a stop instruction or a FO instruction (S501). If it is a stop instruction (stop), ptr information is used as log application progress information in the DB state. Writing to the file ends the processing (S502). On the other hand, if it is an FO instruction (FO), remote copy status control is performed first (S503). For example, if it is a FO at the time of a disaster, the remote copy is set in a disconnected state, and subsequent writing from the primary site is suppressed. On the other hand, in the case of a planned FO, the copy direction is set in the reverse direction.

次に、ブロック(ptr)の読み込みと整合性検証を行い、以降は終端と判定されるまでログの読み込み、適用処理を繰り返す。すなわち、ブロック(ptf)の読み込みを行った上で適用を行い(S504,S505)、終端か否かを判定する(S506)。なお、ここではリモートコピーの状態制御実施後であり、リモートコピーと読み込みが競合することがないため、ログの再読み込み処理は不要となる。   Next, block (ptr) reading and consistency verification are performed, and thereafter, log reading and application processing are repeated until it is determined to be the end. That is, the application is performed after reading the block (ptf) (S504, S505), and it is determined whether it is the end (S506). Note that here, after remote copy status control is implemented, there is no conflict between remote copy and reading, so log re-reading processing is not necessary.

そして、終端でない場合(N)はptrを1つ進めて(S507)、S3へ戻り、終端と判定された場合(Y)、すなわち読み込むべきブロックがなくなったら、未決着トランザクションのキャンセル処理(undo処理)を実施する(S508)。ここで、ログ適用処理内で決着トランザクションだけを適用するような場合は、キャンセル処理は不要となる。続いて、状態ファイルにDBファイルが整合性のとれた状態になっていることを書き出し(S509)、副DBMSを起動して(S510)、処理を終了する。   If it is not the end (N), ptr is advanced by 1 (S507), and the process returns to S3. If it is determined that the end is reached (Y), that is, if there is no block to be read, an undecided transaction cancel process (undo process) ) Is carried out (S508). Here, when only the settlement transaction is applied in the log application process, the cancel process is not necessary. Subsequently, it is written in the state file that the DB file is in a consistent state (S509), the secondary DBMS is activated (S510), and the process is terminated.

図6において、平常時にSZ判定有りの場合の処理を説明する。ブロックがキャッシュ管理サイズより小さく、かつ、一括して書かれる場合は、中抜け状態で読まれることはない。したがって、本処理では、ブロックのサイズがキャッシュ管理サイズより大きい場合にのみ、再読み込みを行う。このログ読み込み・適用処理(平常時、SZ判定有り)では、前記図4の処理にSZ判定処理を追加した例であり、ここでは追加部分を主に説明する。   In FIG. 6, processing when there is an SZ determination at normal times will be described. If a block is smaller than the cache management size and written in batches, it will not be read in a blank state. Therefore, in this process, rereading is performed only when the block size is larger than the cache management size. This log reading / applying process (normally, with SZ determination) is an example in which the SZ determination process is added to the process of FIG. 4, and the added portion will be mainly described here.

最初に、前記図4と同様に、ログの読み込み位置の決定処理(S601)、ブロック(ptr)のログ読み込み位置決定(S602)、FO/停止指示があるか否かの判定(S603)、ブロック(ptr)の読み込み(S604)、ブロック(ptr)は整合性があるか否かの判定(S605)、を行った後、整合性がある場合(Y)には、ブロック(ptr)のサイズがキャッシュ管理サイズSZより大きいか否かを判定する(S606)。ブロック(ptr)のサイズがSZより大きい場合(Y)はS2へ移行し、大きくない場合(N)には、ブロック(ptr)の適用を行い(S607)、ptrを1つ進めて(S608)、S1へ戻る。   First, as in FIG. 4, log reading position determination processing (S601), block (ptr) log reading position determination (S602), whether or not there is a FO / stop instruction (S603), block After reading (ptr) (S604) and determining whether the block (ptr) is consistent (S605), if there is consistency (Y), the size of the block (ptr) is It is determined whether or not it is larger than the cache management size SZ (S606). If the size of the block (ptr) is larger than SZ (Y), the process proceeds to S2, and if not (N), the block (ptr) is applied (S607), and ptr is advanced by 1 (S608). Return to S1.

S2へ移行したら、前記図4と同様に、FO/停止指示があるか否かの判定(S609)、ブロック(ptr+1)の読み込み(S610)、ブロック(ptr+1)は整合性があるか否かの判定(S611)、ブロック(ptr)の再読み込みと適用(S612,S613)、を行った後、次のブロック(ptr+1)のサイズがキャッシュ管理サイズSZより大きいか否かを判定する(S614)。ブロック(ptr+1)のサイズがSZより大きい場合(Y)はptrを1つ進めて(S615)、S2へ戻り、大きくない場合(N)には、ブロック(ptr+1)の適用を行い(S616)、ptrを2つ進めて(S617)、S1へ戻る。   When the process proceeds to S2, as in FIG. 4, it is determined whether there is an FO / stop instruction (S609), the reading of the block (ptr + 1) (S610), and whether the block (ptr + 1) is consistent or not. After performing the determination (S611) and rereading and applying the block (ptr) (S612, S613), it is determined whether or not the size of the next block (ptr + 1) is larger than the cache management size SZ (S614). When the size of the block (ptr + 1) is larger than SZ (Y), ptr is advanced by 1 (S615), and the process returns to S2, and when not larger (N), the block (ptr + 1) is applied (S616), Advance ptr by two (S617) and return to S1.

以上説明したように、本実施の形態のDRシステムによれば、以下のような効果を得ることができる。   As described above, according to the DR system of the present embodiment, the following effects can be obtained.

(1)ログの再読み込みを行う方式を適用し、ログを同期転送する場合には、欠損がないことを保証することが可能となる。また、リモートコピー利用により、サーバリソースを消費することなく転送を行うことができるので、正サイトのオンライン性能への影響を小さくすることが可能となる。   (1) When a method for rereading a log is applied and logs are transferred synchronously, it is possible to ensure that there is no loss. Further, by using remote copy, transfer can be performed without consuming server resources, so that the influence on the online performance of the primary site can be reduced.

(2)ログの再読み込みを行う方式を適用することで、更新量の多いDBファイルの転送が不要なため、狭帯域幅回線でも実現することができるので、回線コストの削減が可能となる。   (2) By applying a method of re-reading the log, it is not necessary to transfer a DB file with a large amount of update, so that it can be realized even with a narrow bandwidth line, so that the line cost can be reduced.

(3)ファイルより細かいブロック単位で適用を行うため、切り替え時にも迅速にサービスを再開することが可能となる。   (3) Since the application is performed in units of blocks smaller than the file, the service can be restarted quickly even at the time of switching.

(4)正サイトに、ログの読み込み位置を決定するための処理、あるいは、通信を新たに加えることなく、副サイトのログ適用部だけで独立してログ適用処理を行い、DBを回復することが可能となる。   (4) Restore the DB by performing log application processing independently at the secondary site's log application unit without newly adding communication to the primary site, or processing for determining the log reading position. Is possible.

(実施の形態2)
本発明の実施の形態2におけるDRシステムを、図7〜図13を用いて説明する。
(Embodiment 2)
A DR system according to the second embodiment of the present invention will be described with reference to FIGS.

まず、図7により、本実施の形態におけるDRシステムの構成の一例を説明する。図7はDRシステムの構成の一例を示す図である。   First, an example of the configuration of the DR system in the present embodiment will be described with reference to FIG. FIG. 7 is a diagram illustrating an example of the configuration of the DR system.

本実施の形態のDRシステムは、リモートコピーと連携した読み込みを行う方式を適用する。例えば、不正な読み込みが行われるのは、read/writeが競合する場合である。そのため、本実施の形態のように、リモートコピーと連携した読み込みを行う方式では、ログ適用機能が読み込みを行う時には、リモートコピーによるwriteが生じないようにすることで、read/write競合を回避する。   The DR system of the present embodiment applies a method for performing reading in cooperation with remote copy. For example, illegal reading is performed when read / write conflicts. Therefore, as in this embodiment, in the method of performing read in cooperation with remote copy, when the log application function performs read, write / write conflict is avoided by preventing the write by remote copy from occurring. .

本実施の形態のDRシステムは、前記実施の形態1に対して、正サイトのストレージ120にPull型コピー処理部125が追加され、副サイトのストレージ130にPull型コピー処理部135およびJNL VOL(JNL)140が追加されて構成される。   The DR system according to the present embodiment is different from the first embodiment in that a pull type copy processing unit 125 is added to the storage 120 at the primary site, and a pull type copy processing unit 135 and a JNL VOL ( JNL) 140 is added.

副サイトのストレージ130に、図8に示すようなJNL VOL140を配置する。図8は、JNL VOLと格納されるデータの構造の一例を示す図である。JNL VOL140には、データ800、シーケンスNO、反映先アドレスおよびサイズからなるメタデータ801、・・・、データ802、メタデータ803が格納され、ポインタ1(hptr)804がメタデータ801のシーケンスNOを指し、ポインタ2(tptr)805がメタデータ803のシーケンスNOを指す。   A JNL VOL 140 as shown in FIG. 8 is arranged in the storage 130 of the secondary site. FIG. 8 is a diagram illustrating an example of the structure of data stored in the JNL VOL. The JNL VOL 140 stores metadata 800 801,..., Data 802, metadata 803 including data 800, sequence No., reflection destination address and size, and pointer 1 (hptr) 804 stores the sequence No. of the metadata 801. Pointer 2 (tptr) 805 points to the sequence NO of metadata 803.

このJNL VOL140を副サイトのストレージ130に配置することで、正サイトのログ用VOL128の情報が副サイトのストレージ130のログ用VOL138に2段階のコピーで伝わるようにする。すなわち、1段目のコピーは、正サイトのログ用VOL128から、副サイトのJNL VOL140にコピーする。このとき、JNL VOL140には、データに通し番号やタイムスタンプなどの情報を付加した上で追記されていく。JNL VOL140からログ用VOL138へのコピー(Pull型コピー)は、非同期に行う。   By disposing the JNL VOL 140 in the secondary site storage 130, the information of the primary site log VOL 128 is transmitted to the log VOL 138 of the secondary site storage 130 in a two-stage copy. That is, the first copy is copied from the log VOL 128 at the primary site to the JNL VOL 140 at the secondary site. At this time, the JNL VOL 140 is appended with information such as a serial number and a time stamp added to the data. Copying from the JNL VOL 140 to the log VOL 138 (Pull type copying) is performed asynchronously.

また、本実施の形態においては、副サイトのストレージ130の制御プログラムが、このJNL VOL140からのコピーを制御(中断/再開)するインターフェースを有している。ログ適用機能は、ログを読み込もうとするときには、まず、Pull型コピーを停止状態とする。その結果、ログ用VOL138へのwriteを抑止することができるので、通常の手順で(再読み込みをすることなく)、ログの読み込み・適用を行うことができる。ブロックの読み込みに失敗した場合には、Pull型コピーを再開し、新たな情報をログ用VOL138に反映する。一定時間の経過後、あるいは、Pull型コピーのコピー量がある閾値を超えたら、再びPull型コピーを停止し、ログの読み込み・適用を再開する。   In the present embodiment, the control program for the storage 130 at the secondary site has an interface for controlling (suspending / resuming) copying from the JNL VOL 140. When the log application function attempts to read the log, it first places the Pull type copy in a stopped state. As a result, since writing to the log VOL 138 can be suppressed, the log can be read / applied by a normal procedure (without re-reading). When reading of the block fails, the Pull type copy is resumed and the new information is reflected in the log VOL 138. After a certain period of time or when the copy amount of the Pull type copy exceeds a certain threshold value, the Pull type copy is stopped again, and log reading / application is resumed.

次に、図9〜図11により、本実施の形態のDRシステムにおいて、ログ読み込み・適用処理のフローの一例を説明する。それぞれ、図9は平常時(一定時間経過)、図10は平常時(更新量超過)、図11は切り替え時のフローの一例を示す図である。   Next, an example of the flow of the log reading / applying process in the DR system of the present embodiment will be described with reference to FIGS. FIG. 9 is a diagram illustrating an example of a flow during normal switching (elapsed time), FIG. 10 is a diagram during normal operation (exceeding update amount), and FIG.

図9の説明においては、前記実施の形態1の図4に示したログ読み込み・適用処理と異なる部分を主に説明する。   In the description of FIG. 9, the difference from the log reading / applying process shown in FIG. 4 of the first embodiment will be mainly described.

このログ読み込み・適用処理(平常時、一定時間経過)では、最初に、Pull型コピーを開始する(S901)。そして、再読み込みを行う場合と同様に、ログの読み込み位置の決定処理(S902)、ブロック(ptr)のログ読み込み位置決定(S903)、を行った後、Pull型コピーを中断して(S904)、S11へ移行する。Pull型コピーの中断後は、ログの読み込みに成功する限り(ヘッダ/トレイラ検証に成功する限り)、繰り返し適用を行う。   In this log reading / applying process (normal time, a fixed time has elapsed), first, the Pull type copy is started (S901). Then, as in the case of performing re-reading, the log-reading position determination process (S902) and the block (ptr) log-reading position determination (S903) are performed, and then the Pull-type copy is interrupted (S904). To S11. After the pull-type copy is interrupted, it is repeatedly applied as long as the log is successfully read (as long as the header / trailer verification is successful).

S11へ移行したら、FO/停止指示があるか否かの判定(S905)、ブロック(ptr)の読み込み(S906)、ブロック(ptr)は整合性があるか否かの判定(S907)、を行い、整合性がない場合(N)、すなわち、読み込みに失敗し、これまでに反映済みの部分を読み込み・適用済みとなった場合はPull型コピーを再開状態に変更する(S908)。続いて、一定時間の経過、あるいは、Pull型コピーの反映量が一定量を超過したら、再び、Pull型リモートコピーを中断状態とし、ログ読み込み・適用処理を実施する。   When the process proceeds to S11, it is determined whether or not there is an FO / stop instruction (S905), the block (ptr) is read (S906), and whether or not the block (ptr) is consistent (S907). If there is no consistency (N), that is, if the reading has failed and the part that has been reflected so far has been read and applied, the Pull type copy is changed to the resumed state (S908). Subsequently, when a certain amount of time has passed or the amount of reflection of the Pull type copy exceeds a certain amount, the Pull type remote copy is again suspended, and the log reading / applying process is executed.

すなわち、Pull型コピーを再開後、時間Δtだけsleepして(S909)、S10へ戻り、整合性がある場合(Y)には、ブロック(ptr−1)は未適用か否かを判定する(S910)。この判定の結果、未適用でない場合(N)はptrを1つ進めて(S911)、S11へ戻り、未適用である場合(Y)には、ブロック(ptr−1)の適用を行い(S912)、ptrを1つ進めて(S913)、S11へ戻る。   That is, after restarting the Pull type copy, the sleep is performed for the time Δt (S909), and the process returns to S10. If there is consistency (Y), it is determined whether the block (ptr-1) is not applied ( S910). As a result of this determination, if not applied (N), ptr is advanced by 1 (S911), and the process returns to S11. If not applied (Y), the block (ptr-1) is applied (S912). ), Ptr is advanced by 1 (S913), and the process returns to S11.

図10において、ログ読み込み・適用処理(平常時、更新量超過)では、最初に、図9と同様の処理を行い(S1001〜S1007,S1013〜S1016)、S1007の判定の結果、ブロック(ptr)は整合性がない場合(N)には、時間Tを0にして(S1008)、S12へ移行する。S12へ移行したら、ストレージに更新量を問い合わせ(S1009)、更新量が予め定めた定数Pより多いか、あるいは、時間Tが一定時間T1を経過したか否かを判定する(S1010)。   In FIG. 10, in the log reading / applying process (normal, update amount exceeded), first, the same process as in FIG. 9 is performed (S1001 to S1007, S1013 to S1016). If there is no consistency (N), the time T is set to 0 (S1008), and the process proceeds to S12. When the process proceeds to S12, the storage is inquired about the update amount (S1009), and it is determined whether the update amount is larger than a predetermined constant P or whether the time T has passed the predetermined time T1 (S1010).

この判定の結果、更新量が定数超過、あるいは、時間が一定時間経過した場合(Y)はPull型コピーを再開して(S1011)、S10へ戻り、それ以外の場合(N)には、時間T2だけsleepして(S1012)、S12へ戻る。なお、時間T2に関しては、ストレージへの問い合わせ回数が多くなり過ぎることを防ぐために、2回目以降の問い合わせは、T2(<T1)時間経過した後に行う。   As a result of this determination, if the update amount exceeds a constant or the time has elapsed (Y), the Pull-type copy is resumed (S1011), the process returns to S10, and otherwise (N) Sleeps for T2 (S1012) and returns to S12. Regarding time T2, in order to prevent the number of inquiries to the storage from becoming excessive, the second and subsequent inquiries are made after T2 (<T1) time has elapsed.

図11において、管理者から、FO/停止指示を受けた場合の処理を説明する。   In FIG. 11, processing when an FO / stop instruction is received from the administrator will be described.

このログ読み込み・適用処理(切り替え時)では、最初に、停止指示かFO指示かを判定し(S1101)、停止指示であった場合(停止)は、ログ適用の進捗情報としてptr情報をDB状態ファイルに書き出して処理を終了する(S1102)。一方、FO指示であった場合(FO)には、災害FOであるならばリモートコピーの状態を切断状態とし、計画FOであるならば中断状態とする。すなわち、まずリモートコピーの状態制御(split時)を行う(S1103)。   In this log reading / applying process (at the time of switching), it is first determined whether it is a stop instruction or a FO instruction (S1101). If it is a stop instruction (stop), ptr information is used as the log application progress information in the DB state. Writing to a file ends the process (S1102). On the other hand, if it is a FO instruction (FO), the remote copy state is set to the disconnected state if it is a disaster FO, and the suspended state is set if it is a planned FO. That is, first, remote copy status control (during split) is performed (S1103).

続いて、ログ適用処理を行う。最初に、Pull型コピーを停止し(S1104)、ブロック(ptr))を読み込み(S1105)、整合性があるか否かを判定し(S1106)、整合性がある限りは適用処理を繰り返す。すなわち、ブロック(ptr−1)は未適用か否かを判定し(S1107)、未適用でない場合(N)はptrを1つ進めて(S1108)、S13へ戻り、未適用の場合(Y)には、ブロック(ptr−1)の適用を行い(S1109)、ptrを1つ進めて(S1110)、S13へ戻る。   Subsequently, log application processing is performed. First, the Pull type copy is stopped (S1104), the block (ptr)) is read (S1105), it is determined whether or not there is consistency (S1106), and the application process is repeated as long as there is consistency. That is, it is determined whether or not the block (ptr-1) is not applied (S1107). If it is not applied (N), ptr is advanced by 1 (S1108), and the process returns to S13. If not applied (Y) Is applied with the block (ptr-1) (S1109), advances ptr by one (S1110), and returns to S13.

一方、整合性がなかった場合(N)は、まずJNL VOLに反映すべきデータがあるか否かを判定する(S1111)。反映すべきデータが残っている場合(Y)には、Pull型コピーを再開状態にし(S1112)、Δtだけsleepして(S1113)、S12へ戻り、ログ適用処理を繰り返す。反映するデータがなくなった場合(N)には、終端までログ適用したことを確認する(S1114)。ここで、計画FOである場合には、逆向きのリモートコピーの設定を行う。   On the other hand, if there is no consistency (N), it is first determined whether there is data to be reflected in the JNL VOL (S1111). If data to be reflected still remains (Y), the Pull type copy is resumed (S1112), sleeps by Δt (S1113), returns to S12, and the log application process is repeated. If there is no more data to be reflected (N), it is confirmed that the log has been applied to the end (S1114). Here, in the case of the planned FO, the reverse remote copy setting is performed.

そして、リモートコピーの状態制御(takeover時)の実施後(S1115)、未決着なトランザクションのキャンセル処理を実施する(S1116)。なお、ログ適用処理で、決着トランザクションだけを適用している場合には、この処理は不要となる。全てのトランザクションが決着した状態になったら、DBMS状態ファイルに情報を書き出し(S1117)、続いて副DBMSを起動して(S1118)、処理を終了する。   Then, after execution of remote copy state control (at the time of takeover) (S1115), an undecided transaction cancellation process is executed (S1116). Note that this processing is not required when only the settlement transaction is applied in the log application processing. When all transactions are settled, information is written to the DBMS state file (S1117), then the secondary DBMS is activated (S1118), and the process is terminated.

なお、ここでは、ブロックを1個ごとに読み込んでいるが、1度に複数のブロックを読み込んでもよい。複数のブロックを読み込んだ場合は、最後のブロック以前のブロックを適用対象として適用を行う。   Here, the blocks are read one by one, but a plurality of blocks may be read at a time. When a plurality of blocks are read, the block before the last block is applied as an application target.

次に、図12,図13により、本実施の形態のDRシステムにおいて、副ストレージのコピー処理のフローの一例を説明する。それぞれ、図12はリモートコピー、図13はJNL VOLからの反映処理のフローの一例を示す図である。   Next, an example of the flow of the secondary storage copy process in the DR system of the present embodiment will be described with reference to FIGS. FIG. 12 is a diagram illustrating an example of a flow of reflection processing from the remote copy, and FIG. 13 is a diagram illustrating a flow of reflection processing from the JNL VOL.

図12において、副ストレージのコピー処理(リモートコピー)では、最初に、ポインタ1(hptr)、ポインタ2(tptr)を初期化し(S1201)、反映処理を開始して(S1202)、S1に移行する。そして、正ストレージから転送があるか否かを判定し(S1203)、転送がない場合(N)はS1へ戻り、転送がある場合(Y)には、追記可能か否かを判定する(S1204)。この判定の結果、不可能な場合(N)はエラー処理/警告処理を行い(S1205)、可能な場合には、メタデータとデータを登録し(S1206)、tptrを更新して(S1207)、S1へ戻る。   In FIG. 12, in the secondary storage copy process (remote copy), first, pointer 1 (hptr) and pointer 2 (tptr) are initialized (S1201), reflection process is started (S1202), and the process proceeds to S1. . Then, it is determined whether there is a transfer from the primary storage (S1203). If there is no transfer (N), the process returns to S1, and if there is a transfer (Y), it is determined whether additional writing is possible (S1204). ). If the result of this determination is that it is not possible (N), error processing / warning processing is performed (S1205). If possible, metadata and data are registered (S1206), tptr is updated (S1207), Return to S1.

図13において、副ストレージのコピー処理(JNL VOLからの反映処理)では、最初に、S1を経て、中断指示があるか否かを判定し(S1301)、中断指示がない場合(N)はS2へ移行し、ある場合(Y)は続いて再開指示があるか否かを判定する(S1302)。この判定の結果、再開指示がない場合(N)はS1へ戻り、ある場合(Y)にはS2へ移行する。S2へ移行したら、JNL VOLからポインタ1(hptr)が指すデータを被更新VOLへ反映し(S1303)、hptrを更新して(S1304)、S1へ戻る。   In FIG. 13, in the secondary storage copy process (reflection process from the JNL VOL), first, it is determined whether there is an interruption instruction through S1 (S1301), and if there is no interruption instruction (N), S2 If there is (Y), it is subsequently determined whether or not there is a restart instruction (S1302). As a result of this determination, if there is no restart instruction (N), the process returns to S1, and if there is (Y), the process proceeds to S2. After shifting to S2, the data pointed to by the pointer 1 (hptr) from the JNL VOL is reflected in the updated VOL (S1303), hptr is updated (S1304), and the process returns to S1.

以上説明したように、本実施の形態のDRシステムによれば、前記実施の形態1と同様の効果(1)〜(4)が得られると共に、リモートコピーと連携した読み込みを行う方式を適用することで、ログのIO単位が大きい場合であっても、再読み込み処理/リモートコピー連携処理により、不正読み込みによるDB破壊を防止することが可能となる。従って、広域災害を考慮して副サイトが数百km以上離れた構成にも対応することが可能となる。   As described above, according to the DR system of the present embodiment, the same effects (1) to (4) as in the first embodiment can be obtained, and a method of reading in cooperation with remote copy is applied. Thus, even when the log IO unit is large, it is possible to prevent DB destruction due to unauthorized reading by the reread processing / remote copy cooperation processing. Therefore, it is possible to cope with a configuration in which the secondary site is several hundred km or more away in consideration of a wide area disaster.

(実施の形態3)
本発明の実施の形態3におけるDRシステムを、図14を用いて説明する。
(Embodiment 3)
A DR system according to Embodiment 3 of the present invention will be described with reference to FIG.

図14により、本実施の形態におけるDRシステムの構成の一例を説明する。図14はDRシステムの構成の一例を示す図である。   An example of the configuration of the DR system in the present embodiment will be described with reference to FIG. FIG. 14 is a diagram illustrating an example of the configuration of the DR system.

本実施の形態のDRシステムは、正サイトと、副サイトと、正サイトと副サイトの間を中継する中継サイトから構成される。正サイトのサーバ100およびストレージ120、副サイトのサーバ110およびストレージ130は、前記実施の形態1の図1、あるいは、前記実施の形態2の図7と同様である。中継サイトは、ストレージ1300から構成され、ストレージ制御処理部1301、ログ用VOL1302、JNL VOL1303が設けられている。   The DR system of the present embodiment includes a primary site, a secondary site, and a relay site that relays between the primary site and the secondary site. The primary site server 100 and storage 120 and the secondary site server 110 and storage 130 are the same as those in FIG. 1 of the first embodiment or FIG. 7 of the second embodiment. The relay site includes a storage 1300, and is provided with a storage control processing unit 1301, a log VOL 1302, and a JNL VOL 1303.

正サイトのストレージ120と中継サイトのストレージ1300との間、中継サイトのストレージ1300と副サイトのストレージ130との間は、ネットワーク1304を通じて接続されている。正サイトのストレージ120内のログ用VOL128から中継サイトのストレージ1300内のログ用VOL1302へは第1のコピーであるリモートコピー1305が行われ、副サイトのストレージ130内のログ用VOL138と中継サイトのストレージ1300内のJNL VOL1303との間では第2のコピーであるリモートコピー1306が行われる。   A network 1304 is connected between the storage 120 at the primary site and the storage 1300 at the relay site, and between the storage 1300 at the relay site and the storage 130 at the secondary site. A remote copy 1305 as the first copy is performed from the log VOL 128 in the storage 120 at the primary site to the log VOL 1302 in the storage 1300 at the relay site, and the log VOL 138 in the storage 130 at the secondary site and the relay VOL A remote copy 1306 that is a second copy is performed with the JNL VOL 1303 in the storage 1300.

本実施の形態のDRシステムにおいても、前記実施の形態1,2と同様の効果を得ることができる。   Also in the DR system of the present embodiment, the same effects as those of the first and second embodiments can be obtained.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say.

本発明は、ログ転送によるDR技術に関し、特に、ファイルより細かい粒度でログの読み込み・適用を行い、かつ、ログの読み込み・適用処理の中で、ログの再読み込み、あるいは、リモートコピーと連携した読み込みを行うDR技術に適用して有効である。   The present invention relates to DR technology based on log transfer, and in particular, reads and applies logs with a finer granularity than files, and cooperates with log re-reading or remote copying during log reading and application processing. It is effective when applied to DR technology for reading.

100…サーバ、101…DBMS、102…DBバッファ、103…ログバッファ、104…DBアクセス制御部、105…ログ管理部、110…サーバ、111…ログ適用部、112…DBバッファ、113…ログバッファ、114…ログ適用制御部、115…ログ読み込み整合性検証部、116…適用部、120…ストレージ、121…ストレージ制御処理部、122…コマンド処理部、123…コピー処理制御部、124…リモートコピー処理部、125…Pull型コピー処理部、126…キャッシュ、127…ディスクアクセス制御部、128…ログ用VOL、129…DB用VOL、130…ストレージ、131…ストレージ制御処理部、132…コマンド処理部、133…コピー処理制御部、134…リモートコピー処理部、135…Pull型コピー処理部、136…キャッシュ、137…ディスクアクセス制御部、138…ログ用VOL、139…DB用VOL、140…JNL VOL、150…ネットワーク、200…ログ用VOL、201…ログファイル、202…ログブロック、203…ログレコード、204…ヘッダ、205…トレイラ、800…データ、801…メタデータ、802…データ、803…メタデータ、804…ポインタ1(hptr)、805…ポインタ2(tptr)、1300…ストレージ、1301…ストレージ制御処理部、1302…ログ用VOL、1303…JNL VOL、1304…ネットワーク、1305…リモートコピー、1306…リモートコピー、1400…DBMS、1401…アーカイブログ用VOL、1402…ネットワーク、1403…リモートコピー、1404…サーバ間転送、1405…ログ読み込み、1406…ログ適用、1407…アーカイブ、1411…アーカイブログ用VOL、1500…ログブロック、1501…書き込み(1)領域、1502…読み込み(1)領域、1503…書き込み(2)領域、1504…読み込み(2)領域、1505…ログ適用部に読み込まれたログブロック、1600…アーカイブ。   DESCRIPTION OF SYMBOLS 100 ... Server, 101 ... DBMS, 102 ... DB buffer, 103 ... Log buffer, 104 ... DB access control part, 105 ... Log management part, 110 ... Server, 111 ... Log application part, 112 ... DB buffer, 113 ... Log buffer , 114 ... log application control unit, 115 ... log read consistency verification unit, 116 ... application unit, 120 ... storage, 121 ... storage control processing unit, 122 ... command processing unit, 123 ... copy processing control unit, 124 ... remote copy Processing unit 125... Pull-type copy processing unit 126... Cache 127 Reference disk access control unit 128 Log VOL 129 DB VOL 130 Storage 131 131 Storage control unit 132 Command processing unit 133: Copy processing control unit, 134: Remote copy processing unit 135 ... Pull type copy processing unit, 136 ... Cache, 137 ... Disk access control unit, 138 ... Log VOL, 139 ... DB VOL, 140 ... JNL VOL, 150 ... Network, 200 ... Log VOL, 201 ... Log file 202 ... log block, 203 ... log record, 204 ... header, 205 ... trailer, 800 ... data, 801 ... metadata, 802 ... data, 803 ... metadata, 804 ... pointer 1 (hptr), 805 ... pointer 2 ( tptr), 1300 ... storage, 1301 ... storage control processing unit, 1302 ... log VOL, 1303 ... JNL VOL, 1304 ... network, 1305 ... remote copy, 1306 ... remote copy, 1400 ... DBMS, 1401 ... VOL for archive log, 402: Network, 1403 ... Remote copy, 1404 ... Transfer between servers, 1405 ... Read log, 1406 ... Log application, 1407 ... Archive, 1411 ... VOL for archive log, 1500 ... Log block, 1501 ... Write (1) area, 1502 Read (1) area, 1503 ... Write (2) area, 1504 ... Read (2) area, 1505 ... Log block read by the log application unit, 1600 ... Archive.

Claims (9)

正サイトのデータベース処理システムのデータを副サイトにコピーするストレージシステムにおけるデータベース管理方法であって、
前記正サイトは、データベース処理システムが稼動する第1の計算機と、データベースを記録するボリューム及び前記データベースへの更新履歴であるログを記録するボリュームを含む正ストレージとを有し、
前記副サイトは、ログ適用処理を行うプログラムと、前記プログラムが稼動する第2の計算機と、データベース記録するボリューム及びログを記録するボリュームを含む副ストレージとを有し、
前記正サイトと前記副サイトとはネットワークで結合され、
前記正ストレージ及び前記副ストレージはリモートコピー機能を有し、
前記正サイトでは前記正ストレージのリモートコピーでログを転送し、前記副サイトでは転送されるログを前記副ストレージのデータベースに適用するログ適用処理において、
前記正サイトで複数のログレコードからなるログブロック単位で書き込みを行い、前記副サイトでログ適用を行う際には、
前記副ストレージは、前記正ストレージの1つの転送元ボリュームに対して第1のボリュームと第2のボリュームとを有し、
前記正ストレージに書き込まれたログはリモートコピーを表す第1のコピーにより前記副ストレージの前記第1のボリュームに更新順で追記され、前記第2のボリュームへのコピーは前記第1のボリュームへの書き込みとは別のタイミングで第2のコピーで反映され、
前記副サイトでログ適用を行う際には、
前記第2のコピーを中断するステップと、
前記第2のボリュームからログブロックを読み込むステップと、
前記読み込んだログブロックを適用するステップと、
読み込めるログがなくなった場合には前記ログ適用処理を中断した後に前記第2のコピーを再開するステップとを有することを特徴とするデータベース管理方法。
A database management method in a storage system for copying data from a primary site database processing system to a secondary site,
The primary site includes a first computer on which a database processing system operates, a primary storage including a volume for recording a database and a volume for recording a log that is an update history of the database,
The secondary site includes a program for performing log application processing, a second computer on which the program operates, a secondary storage including a volume for recording a database and a volume for recording a log,
The primary site and the secondary site are connected by a network,
The primary storage and the secondary storage have a remote copy function,
In the log application process of transferring the log by remote copy of the primary storage at the primary site and applying the transferred log to the database of the secondary storage at the secondary site,
When writing in log block units consisting of a plurality of log records at the primary site and applying logs at the secondary site,
The secondary storage has a first volume and a second volume with respect to one transfer source volume of the primary storage,
The log written in the primary storage is appended to the first volume in the secondary storage in the update order by the first copy representing the remote copy, and the copy to the second volume is added to the first volume. Reflected in the second copy at a different timing from writing,
When applying logs at the secondary site,
Interrupting the second copy;
Reading a log block from the second volume;
Applying the read log block;
And a step of resuming the second copy after the log application process is interrupted when there is no log that can be read.
請求項1記載のデータベース管理方法において、
前記中断した第2のコピーを再開する際には、一定時間が経過した後に前記第2のコピーを再開することを特徴とするデータベース管理方法。
The database management method according to claim 1,
When resuming the suspended second copy, the second copy is resumed after a predetermined time has elapsed.
請求項1記載のデータベース管理方法において、
前記中断した第2のコピーを再開する際には、前記第1のボリュームに前記第2のコピーの中断後に加えられた書き込みに関する情報を問い合わせ、書き込み量が事前に定めた定数値を超えていた場合に前記第2のコピーを再開することを特徴とするデータベース管理方法。
The database management method according to claim 1,
When resuming the interrupted second copy, the first volume is queried for information about writing added after the interruption of the second copy, and the amount of writing exceeds a predetermined constant value. A database management method, wherein the second copy is resumed.
請求項1記載のデータベース管理方法において、
管理者やアプリケーションからの切り替え指示を受けた場合には、最初にリモートコピーを表す第1のコピーの状態を変更し、新たな書き込みが生じないようにするステップを有し、
前記第1のコピーの状態変更後は、前記第2のコピーを中断するステップと、前記ログを読み込み、適用するステップと、前記第1のボリュームに反映すべき更新があるかを問い合わせるステップとを有し、
前記反映すべき更新がある場合には、前記第2のコピーを再開させてログ読み込み、適用を行うステップを有し、
前記反映すべき更新がない場合には、読み込み可能なログを全て適用した後に未決着なトランザクションをキャンセルするステップを有し、
前記データベースをトランザクション整合性のとれた状態とすることを特徴とするデータベース管理方法。
The database management method according to claim 1,
When receiving a switching instruction from an administrator or an application, the method includes first changing the state of the first copy representing the remote copy so that no new writing occurs,
After changing the state of the first copy, there are a step of interrupting the second copy, a step of reading and applying the log, and a step of inquiring whether there is an update to be reflected in the first volume. Have
If there is an update to be reflected, resuming the second copy, reading the log and applying,
If there is no update to be reflected, the method includes a step of canceling an undecided transaction after applying all readable logs,
A database management method, wherein the database is brought into a transaction consistent state.
正サイトのデータベース処理システムのデータを副サイトにコピーするストレージシステムであって、
前記正サイトは、データベース処理システムが稼動する第1の計算機と、データベースを記録するボリューム及び前記データベースへの更新履歴であるログを記録するボリュームを含む第1のストレージとを有し、
前記副サイトは、ログ適用処理を行うプログラムと、前記プログラムが稼動する第2の計算機と、データベースを記録するボリューム及びログを記録するボリュームを含む第2のストレージとを有し、
前記正サイトと前記副サイトとはネットワークで結合され、
前記第1及び第2のストレージはリモートコピー機能を有し、前記第1のストレージに記録されるログはリモートコピー機能により前記第2のストレージに転送され、
転送先の前記第2のストレージは、前記第1のストレージで転送対象となっているボリュームの1つに対して第1のボリュームと第2のボリュームとを有し、前記第1のストレージからの転送は前記第1のボリュームに追記され、前記第1のボリュームから前記第2のボリュームへの第2のコピーは第1のコピーであるリモートコピーとは別のタイミングで実施され、
前記副サイトのログ適用処理においては、前記第2のボリュームからログを読み込み、ログを読み込む時には前記第2のコピーを中断状態としてからログの読み込み・適用を実施し、読み込んだログの適用が終了したら前記第2のコピーを再開状態とすることを特徴とするストレージシステム。
A storage system for copying data from a primary site database processing system to a secondary site,
The primary site has a first computer in which a database processing system operates, a first storage including a volume for recording a database and a volume for recording a log that is an update history of the database,
The secondary site includes a program that performs log application processing, a second computer that operates the program, a volume that records a database, and a second storage that includes a volume that records a log,
The primary site and the secondary site are connected by a network,
The first and second storages have a remote copy function, and a log recorded in the first storage is transferred to the second storage by a remote copy function,
The second storage at the transfer destination has a first volume and a second volume with respect to one of the volumes to be transferred in the first storage, and the second storage from the first storage The transfer is appended to the first volume, and the second copy from the first volume to the second volume is performed at a timing different from the remote copy that is the first copy,
In the log application process at the secondary site, the log is read from the second volume, and when the log is read, the second copy is suspended and then the log is read and applied, and the application of the read log is completed. Then, the storage system is set to resume the second copy.
正サイトのデータベース処理システムのデータを副サイトにコピーするストレージシステムにおけるデータベース管理方法であって、
前記正サイトは、データベース処理システムが稼動する第1の計算機と、データベースを記録するボリューム及び前記データベースへの更新履歴であるログを記録するボリュームを含む第1のストレージとを有し、
前記副サイトは、ログ適用処理を行うプログラムと、前記プログラムが稼動する第2の計算機と、データベースを記録するボリューム及びログを記録するボリュームを含む第2のストレージとを有し、
前記正サイトと前記副サイトとはネットワークで結合され、
前記第1のストレージに加えられた更新を前記第2のストレージに反映する処理において、
転送先の前記第2のストレージは、前記第1のストレージで転送対象となっているボリュームの1つに対して第1のボリュームと第2のボリュームとを有し、前記第1のストレージからの転送は前記第1のボリュームに追記され、前記第1のボリュームから前記第2のボリュームへの第2のコピーはリモートコピーとは別のタイミングで実施され、
前記第2のコピーの実行状態をユーザやアプリケーションから制御可能とし、前記ユーザやアプリケーションから前記第2のコピーを中断/再開することを特徴とするデータベース管理方法。
A database management method in a storage system for copying data from a primary site database processing system to a secondary site,
The primary site has a first computer in which a database processing system operates, a first storage including a volume for recording a database and a volume for recording a log that is an update history of the database,
The secondary site includes a program that performs log application processing, a second computer that operates the program, a volume that records a database, and a second storage that includes a volume that records a log,
The primary site and the secondary site are connected by a network,
In the process of reflecting the update applied to the first storage in the second storage,
The second storage at the transfer destination has a first volume and a second volume with respect to one of the volumes to be transferred in the first storage, and the second storage from the first storage The transfer is appended to the first volume, and the second copy from the first volume to the second volume is performed at a timing different from the remote copy,
A database management method, wherein an execution state of the second copy can be controlled from a user or an application, and the second copy is suspended / resumed from the user or an application.
請求項6記載のデータベース管理方法において、
前記第2のコピーを中断状態とした場合には、前記第2のコピーを中断状態としてから前記第1のボリュームに転送された更新量を問い合わせることを特徴とするデータベース管理方法。
The database management method according to claim 6, wherein
A database management method comprising: inquiring an update amount transferred to the first volume after placing the second copy in a suspended state when the second copy is in a suspended state.
正サイトのデータベース処理システムのデータを副サイトにコピーするストレージシステムであって、
前記正サイトは、データベース処理システムが稼動する第1の計算機と、データベースを記録するボリューム及び前記データベースへの更新履歴であるログを記録するボリュームを含む第1のストレージとを有し、
前記副サイトは、ログ適用処理を行うプログラムと、前記プログラムが稼動する第2の計算機と、データベースを記録するボリューム及びログを記録するボリュームを含む第2のストレージとを有し、
前記正サイトと前記副サイトとはネットワークで結合され、
前記第1のストレージに加えられた更新を前記第2のストレージに反映する処理において、
転送先の前記第2のストレージは、前記第1のストレージで転送対象となっているボリュームの1つに対して第1のボリュームと第2のボリュームとを有し、前記第1のストレージからの転送は前記第1のボリュームに追記され、前記第1のボリュームから前記第2のボリュームへの第2のコピーはリモートコピーとは別のタイミングで実施され、
前記第2のコピーの実行状態をユーザやアプリケーションから制御可能とするためのインターフェースを有し、前記ユーザやアプリケーションから前記第2のコピーを中断/再開することを特徴とするストレージシステム。
A storage system for copying data from a primary site database processing system to a secondary site,
The primary site has a first computer in which a database processing system operates, a first storage including a volume for recording a database and a volume for recording a log that is an update history of the database,
The secondary site includes a program that performs log application processing, a second computer that operates the program, a volume that records a database, and a second storage that includes a volume that records a log,
The primary site and the secondary site are connected by a network,
In the process of reflecting the update applied to the first storage in the second storage,
The second storage at the transfer destination has a first volume and a second volume with respect to one of the volumes to be transferred in the first storage, and the second storage from the first storage The transfer is appended to the first volume, and the second copy from the first volume to the second volume is performed at a timing different from the remote copy,
A storage system comprising an interface for enabling the execution status of the second copy to be controlled by a user or application, and suspending / resuming the second copy from the user or application.
請求項8記載のストレージシステムにおいて、
前記第2のコピーを中断状態とした場合には、前記第2のコピーを中断状態としてから前記第1のボリュームに転送された更新量を問い合わせるインターフェースを有することを特徴とするストレージシステム。
The storage system according to claim 8, wherein
When the second copy is suspended, the storage system has an interface for inquiring about an update amount transferred to the first volume after the second copy is suspended.
JP2011034292A 2011-02-21 2011-02-21 Database management method and storage system Active JP5061250B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011034292A JP5061250B2 (en) 2011-02-21 2011-02-21 Database management method and storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011034292A JP5061250B2 (en) 2011-02-21 2011-02-21 Database management method and storage system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005121805A Division JP4731975B2 (en) 2005-04-20 2005-04-20 Database management method and storage system

Publications (2)

Publication Number Publication Date
JP2011165195A JP2011165195A (en) 2011-08-25
JP5061250B2 true JP5061250B2 (en) 2012-10-31

Family

ID=44595731

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011034292A Active JP5061250B2 (en) 2011-02-21 2011-02-21 Database management method and storage system

Country Status (1)

Country Link
JP (1) JP5061250B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527759B (en) * 2021-02-09 2021-06-11 腾讯科技(深圳)有限公司 Log execution method and device, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0485635A (en) * 1990-07-30 1992-03-18 Nec Software Ltd Forward recover/restoration system for data base file
JP4689137B2 (en) * 2001-08-08 2011-05-25 株式会社日立製作所 Remote copy control method and storage system
JP4135855B2 (en) * 2001-02-28 2008-08-20 株式会社日立製作所 Storage device system and backup method
US7152078B2 (en) * 2001-12-27 2006-12-19 Hitachi, Ltd. Systems, methods and computer program products for backup and restoring storage volumes in a storage area network
JP4290975B2 (en) * 2002-12-19 2009-07-08 株式会社日立製作所 Database processing method and apparatus, processing program therefor, disaster recovery method and system
JP4289056B2 (en) * 2003-03-27 2009-07-01 株式会社日立製作所 Data duplication control method between computer systems

Also Published As

Publication number Publication date
JP2011165195A (en) 2011-08-25

Similar Documents

Publication Publication Date Title
JP4731975B2 (en) Database management method and storage system
JP4489455B2 (en) Disk control device and control method of disk control device
US10437509B1 (en) Creating consistent snapshots on synchronously replicated storage resources
JP4727437B2 (en) Storage control method for storage system having database
JP4267421B2 (en) Remote site and / or local site storage system and remote site storage system file reference method
US7434093B2 (en) Dual channel restoration of data between primary and backup servers
JP4376750B2 (en) Computer system
US7254685B1 (en) Method for maintaining high performance while preserving relative write I/O ordering for a semi-synchronous remote replication solution
JP4835249B2 (en) Storage system, remote copy, and management method
JP2006268829A (en) Method and apparatus for mirroring object between storage systems
US7979651B1 (en) Method, system, and computer readable medium for asynchronously processing write operations for a data storage volume having a copy-on-write snapshot
JP4508798B2 (en) Storage remote copy method
US20050210320A1 (en) Data consistency for mirroring updatable source data storage
JP2007272648A (en) Database system operating method, database system, database device and backup program
JP2005309793A (en) Data processing system
JP6931081B2 (en) Data backup system, relay site storage, data backup method, and relay site storage control program
JP4412722B2 (en) Remote copy system
JP4429763B2 (en) Information processing apparatus control method, information processing apparatus, and storage apparatus control method
CN103970620B (en) Quasi continuity data replication method and device
JP5061250B2 (en) Database management method and storage system
JP2006285336A (en) Storage, storage system, and control method thereof
JP2006235698A (en) Inter-storage data migration method
JP4452494B2 (en) Data synchronization method after stopping remote copy on multiple remote storages
JP5939053B2 (en) Remote backup device, remote backup system, method and program
JP2006235737A (en) Storage subsystem and storage system

Legal Events

Date Code Title Description
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: 20120710

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

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

Free format text: PAYMENT UNTIL: 20150810

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5061250

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150