This application relates to and claims priority from Japanese Patent Application No. 2006-020367, filed on Jan. 30, 2006, the entire disclosure of which is incorporated herein by reference.
The present invention generally relates to a storage apparatus and storage system, and in particular relates to a storage apparatus and storage system storing differential information on a data volume in a journal volume.
As technology for preventing the loss of information to be stored in a database in a database system, journaling is generally used. Journaling is technology of recording contents of updating operations performed to a database as journal information in an area separate from the database and, when a failure occurs in the database, committing the journal information after the acquisition of backup to the previously acquired backup of the database to enable the restoration of the database. In other words, journal information is differential information.
As technology for performing high-speed backup and restoration processing in a data storage system, differential backup is used. In differential backup, the overall data is initially backed up, and then the differential information is backed up. When a failure occurs in the database, high-speed restoration is enabled by committing the differential information to the overall backup data. Differential backup is an application of journaling to the data storage system.
For example, Japanese Patent Laid-Open Publication No. 2005-18738 discloses technology for preventing the loss of data stored in a storage apparatus by applying journaling to a data storage system.
Further, Japanese Patent Laid-Open Publication No. 2005-222110 discloses technology for alleviating the load of a storage apparatus by using differential information upon restoring data to be stored in a storage apparatus in a separate storage apparatus installed in a remote location in preparation for the occurrence of a failure in the data storage system caused by disaster or the like.
Moreover, Japanese Patent Laid-Open Publication No. 2002-132561 discloses technology enabling restoration processing in a short period of time by reducing journal information as a result of reducing past differential information in a case where new differential information negating operations by past differential information is to be added to a data storage system.
As described in the foregoing conventional technologies, it was necessary for the new differential information to negate the previous differential information in order to reduce differential information. Therefore, in a storage apparatus recording the writing operations of data as journal information, data to be newly written must be overwritten on the previously written data in order to reduce journal information. If the data is not completely overwritten; in other words, even if a part of data is not overwritten, it is not possible to reduce journal information. Nevertheless, since the past differential information would be reduced as a result of performing the processing for reducing the differential information, when attempting to restore data at an arbitrary time in the past where differential information was recorded by selectively committing the differential information, with conventional technology, it is not possible to restore the data image from the deleted past differential information to the differential information at a new arbitrary time. Therefore, when aiming to perform recovery in incremental steps of sequentially committing the journal information from [past data] to the data stored in the storage device in accordance with the designation or the like of the administrator for recovering from a software failure, with conventional technology, it was not possible to restore, in incremental steps, the status of the stored data during the period the journal information is deleted until such journal information is overwritten.
In order to overcome the foregoing problems, an object of the present invention is to provide a storage apparatus capable of recovering the status of stored data at an arbitrary time after the recording of journal log information has been commenced while reducing differential data information. Moreover, another object of the present invention is to provide a remote copy system including a plurality of storage apparatuses capable of reducing the amount of information to be transmitted during the remote copy by eliminating the redundant data blocks from the journal information transmitted between the storage apparatuses.
In order to achieve the foregoing objects, the present invention separates journal information into journal log information and journal data information, and distinctively manages such information. In other words, one aspect of the present invention provides a storage apparatus having a storage device, and a controller for controlling a data write request from a computer device to the storage device, wherein the storage device includes a primary data storage area, and a journal storage area storing differential information of the primary data storage area as journal information; and wherein the journal storage area is configured by including a storage area of journal log information of the journal information, and a storage area of journal data information of the journal information.
Another aspect of the present invention provides a storage apparatus having a storage device, and a controller for controlling a data write request from a computer device to the storage device, wherein the controller manages journal information, which is differential information of a primary data storage area, by separating it into journal log information and journal data information, and shares the same journal data information between a plurality of journal logs.
Moreover, a further aspect of the present invention provides a storage apparatus connected to a host system, having: a data volume; a control unit; and a journal volume including an area storing a log of the data volume, and a block list prescribing the correspondence of a block number of an area storing differential data of the data volume and an area storing the differential data and the log information, wherein, upon receiving a write request from the host system, the control unit writes the write request in the journal volume, and, when the logs of the written write request become a plurality of logs, examines the status of the new differential data containing a portion coinciding with the contents of the oldest differential data based on differential data corresponding to the oldest log among the logs, changes the correspondence of a redundant block number to a block number corresponding to the oldest log, and releases a block of the area storing the differential data corresponding to the redundant block number.
Moreover, yet another aspect of the present invention provides a storage system-having the foregoing storage apparatus as a first storage apparatus, and a second storage apparatus connected to the first storage apparatus via a communication path, and which seeks the synchronization of the data content stored in both storage apparatuses by transmitting journal information from the first storage apparatus to the second storage apparatus via the communication path, wherein the first storage apparatus omits the data block containing redundant contents from the journal data information sequence by not including a block number overlapping with information of the block number upon transmitting the journal information to the second storage apparatus as the journal log information sequence, block number information sequence referred to with the foregoing map, and the journal data information sequence.
According to the present invention, journal information, which is differential information of a primary data storage area, is separated into journal log information and journal data information and the same journal data information is shared between a plurality of journal logs, and it is thereby possible to compress the journal information.
As explained above, according to the present invention, it is possible to provide a storage apparatus capable of recovering (step recovery) the status of stored data at an arbitrary time after the recording of journal log information has been commenced while reducing differential data information. Moreover, according to the present invention, it is possible to provide a remote copy system including a plurality of storage apparatuses capable of reducing the amount of information to be transmitted during the remote copy by eliminating the redundant data blocks from the journal information transmitted between the storage apparatuses.
Embodiments of the present invention are now explained with reference to the drawings.
The journal information stored in the journal storage area 105 is committed to the primary data storage area 104 by the controller 103 according to instructions of the administrator. Data read by the computer device 102 during the execution of journaling is configured by the controller 103 based on data stored in the primary data storage area 104 and journal storage area 105.
The journal data storage area 302 is an area for storing the journal data information described later in block units such as disk sector units, and is managed by the journal data management information 304. The journal data management information 304 has information of sequences storing the reference count corresponding one-on-one to each block regarding the journal data area 302, and the controller 103 manages the in-use and unused blocks of the journal data storage area with this management information. The reference count is a nonnegative integer, and an in-use block is defined as a block having a reference count that is not zero, and an unused block is defined as a block having a reference count of zero, respectively.
Among the information contained in the journal information 401, a data block is divided into blocks in sector units, and the divided data block is stored as the journal data information 402 by being separated into a plurality of unused blocks of the journal storage area 302. Here, the journal data information 402 does not necessarily have to be stored in consecutive blocks of the journal storage area 302. The address in which the journal data information 402 is stored in the journal storage area 302 is stored in the journal log storage area 301 as a block list (map information 403) formed from the alignment of the block numbers of the journal storage area 302. The map information 403 is stored in the journal log storage area 301 as a part of the variable journal log information 404 together with information (ID, offset, length) excluding the data block from the journal information 401.
When the journal storage area 105 does not have an unused area capable of storing the journal information 401, the [controller 103] returns a reply indicating the failure of the write request to the computer device 102 (step 503), and ends the processing. When the [journal storage area 105] has an unused area capable of storing the journal information 401, the [controller 103] refers to the journal data management information 304, and divides the journal data information 402 into block units and stores these in a block of the journal data storage area 302 corresponding to an unused block; that is, a block having a reference count of zero (step 504).
Next, the [controller 103] updates the journal data management information 304, and increments the reference count by 1; that is, changes zero to 1 regarding the reference count corresponding to the block newly storing the data (step 505). Next, the [controller 103] creates map information 403 as the arrangement of the block number of the block newly storing the data and the address of the journal data storage area (step 506). The map information configures the journal log information 404 together with information excluding the data block of the journal information 401, and the controller 103 refers to the journal log management information 303, and stores the new journal log information in an unused area of the journal log storage area 301; that is, at a position indicated by a value obtained by adding the length showing the size of in-use area to the pointer showing the top of the in-use area of the journal log management information 303 (step 507).
Next, the controller 103 updates the journal log management information 303, and changes the length showing the size of in-use area to a length added with the size of the current journal log information 404 (step 508). Finally, the [controller 103] returns a reply indicating the success of the write request to the computer device 102 (step 509), and ends the processing.
When there are no blocks having coinciding contents, the controller 103 repeats the foregoing comparison processing regarding the next new block to be referred to by the map information 403. When there are blocks having coinciding contents, the [controller 103] updates the map information 403, and replaces the block number to refer to the block of the old journal data information (step 602). Next, the [controller 103] updates the journal data management information 304, reduces the reference count of the block referred to before the change of the map information 403 by 1, and increments the reference-count of the block to be referred to after the change of the [map information 403] by 1 (step 603). Here, the block having a reference count of zero can be used as an unused capacity, and-the area in the journal storage area 105 occupied by the journal information 401 can be reduced in an amount of the block that became an unused capacity.
The controller 103 may update the block list (map information) at a designated time, when a transaction is not sent from the computer device to the controller, or when journal information is accumulated in an arbitrary amount, and there is no particular limitation.
The foregoing routine is repeated regarding the new block to be referred to by the map information 403 (step 604), and the processing is ended once the comparison of all new blocks is complete.
Commitment of the journal information 401 to the primary data storage area 104 is conducted by the controller 103 writing the contents of the journal data information 402 referred to by the map information 403 in a position of the primary data storage area 104 shown with the journal log information 404 (step 701). Next, the controller 103 updates the journal data management information 304; in other words, reduces the reference count of each block that was referred to by the map information 403 by 1 (step 702). Here, a block having a reference count of zero will become unused and released, but a block having a reference count that is not zero; that is, a block being referred to by the map information of the journal log information will not be released since it is still an in-use block.
Next, the [controller 103] updates the journal log management information 302; in other words, changes the pointer showing the top of the in-use area in the journal log storage area 301 to a pointer added with the size of the journal log information 404, and changes the length showing the size of the in-use area to a length in which the size of the journal log information 404 is deducted (step 703). Thereby, the area in the journal log storage area 301 occupied by the journal log information 404 will become unused and released. The foregoing routine is repeated regarding newer journal information (step 704), and the processing is ended when there is no more journal information that is older than the designated time.
Next, the [controller 103] updates the journal log management information 302, and changes the length showing the size of the in-use area to a length in which the size of the journal log information 404 is deducted (step 802). The foregoing routine is repeated regarding new journal information (step 803), and the processing is ended when there is no more journal information that is new at the designated time.
As explained above, with this storage apparatus, in addition to a case of completely overwriting data by dividing the data block contained in the journal information into blocks in sector units and comparing the contents in block units, even in cases of partially overwriting data, it is possible to reduce journal information. Further, information to be reduced upon the reduction of journal information is a redundant data block, and information contained in the journal information will remain in a fully reproducible state. Thus, even when the journal information is reduced, it is possible to recover, in incremental steps, the journal information to a status at an arbitrary time after the start of recording of such journal information.
The block number information sequence 1002 is a result of adding its number; that is, the number of blocks to be transferred to the block number sequence of the journal data storage area 302 storing the journal data information 402 to be referred to by the map information of the transferred journal log information. The journal data information sequence 1003 is a result of arranging the contents of the block of the journal data storage area 302 shown with the block number information sequence 1002 in the order of the block number information sequence 1002, and the number thereof coincides with the number of blocks of the block number information sequence 1002.
Here, the journal data information to be referred to by the map information of the transmitted plurality of types of journal log information only needs to be transmitted once, and, by not including the redundant block number upon creating the block number information sequence 1002, it is possible to prevent over-transmitting blocks with redundant data content. Therefore, the number of blocks of the block number information sequence 1002 is less in the amount of redundant blocks in comparison to the total size of map information of the journal log information contained in the journal log information sequence 1001. Incidentally, when the configuration of the journal storage area is different among the storage apparatuses, the map information of the journal log information sequence 1001 and block number contained in the block number information sequence 1002 on the receiving side do not show the absolute position in the journal data storage area, and these may be handled as tags for differentiating the individual blocks.
As explained above, the storage apparatus of the present embodiment is able to reduce the amount of information to be transmitted to a network when performing remote copying by removing redundant data blocks from the journal information to be transmitted to the network.
The embodiments described above are merely examples, and the present invention shall not be limited in any way by such embodiments.
Number | Date | Country | Kind |
---|---|---|---|
2006-020367 | Jan 2006 | JP | national |