This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2009-85980 filed on Mar. 31, 2009, the entire contents of which are incorporated herein by reference.
This application relates to a storage control device, a storage system, and a copying method.
The One Point Copy (OPC) function is known as a method of generating a backup copy of data of a copy source volume in a storage system and/or a computer. The OPC function is provided to generate a snapshot of data to be backed up, where the snapshot is data that is generated at specified time and that does not reflect updating or the like performed after the specified time. The OPC function, which is performed to generate a backup copy, is provided to back up the entire data of a target copy source volume at the backup-copy generation time.
For example, upon receiving an instruction to perform the OPC function, the instruction being transmitted from a user, a storage system configured to perform the OPC function makes a copy of the entire data of a copy source volume obtained at the OPC instruction-reception time.
The storage system stores data which is the copy of the data of the copy source volume, that is, backup copy data in the copy source volume as a snapshot obtained at the OPC instruction-reception time.
In one specific example, the storage system stores backup copy data which is a copy of the entire data of the copy source volume in association with data of the OPC instruction-reception time and/or the file generation, that is, session information.
Further, as one of expanded functions of the above-described OPC function, the SnapOPC function is known. The SnapOPC function, which is performed to make a backup copy, is a method provided to make a backup copy of only un-updated data of data of the copy source volume, where the un-updated data had been obtained at a location where updating was performed.
For example, upon receiving a SnapOPC instruction to perform the SnapOPC function, the storage system configured to perform the SnapOPC function allocates a specified storage area in association with the SnapOPC instruction-reception time and/or the file generation.
Then, when the copy source volume is updated after the SnapOPC instruction is transmitted to the storage system, a copy of un-updated data that was obtained at a location where the updating is performed, that is, only difference data which is lost from the copy source volume due to the updating is made and stored in the above-described storage area.
Here, one of methods of storing the difference data is disclosed in Japanese Laid-open Patent Publication No. 2005-292865.
According to an aspect of the disclosed embodiments, a storage control device that copies copy source data stored in a copy source volume to a copy destination volume includes a copy source data-comparison section configured to compare data transmitted from a host computer to data written into an area specified in the copy source volume storing the transmitted data, and a copy function-execution section configured to avoid writing the transmitted data into the copy source volume based on a determination that the data transmitted from the host computer and the data written into the area of the copy destination volume storing the transmitted data that are compared to each other through the copy source data-comparison section agree with each other.
The object and advantages of the disclosed embodiments will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the disclosed embodiments, as claimed.
According to the above-described known technologies, an inefficient copy operation is performed as described below.
For performing the SnapOPC function, when the data of a copy source volume is updated after an instruction to perform the SnapOPC function is received, for example, a copy of only data stored in a position where the updating is performed is made and stored in an allocated and specified storage area and the details of the data itself are not checked.
Therefore, if the same data as that of the copy source volume is written into the copy source volume to update the copy source volume (for example, when a host computer performs overwrite copying for file data of the copy source volume), a copy of redundant data is unnecessarily made.
Hereinafter, a storage control device, a storage system, and a copying method according to each of embodiments of the present invention will be described in detail with reference to the attached drawings.
An exemplary hardware configuration of the above-described system will be described with reference to
The storage control device is connected to the host computer 1 used by an operator and/or a user, the channel adapter 4 functioning as an interface control device provided between the host computer 1 and the storage system 2, and the data storage device storing data transmitted from the host computer 1. In the data storage device, a copy source volume functioning as a volume storing data to be copied when performing copying and/or making backup copies, and a copy destination volume functioning as a volume provided at the copy destination to store data to be copied are generated.
The copy control section 101 includes a copy function-execution section 105, a copy volume association-control section 106, a bitmap control section 107, a logical block addressing (LBA) conversion table-control section 108, a data comparison-control section 109, and a temporary buffer allocation-control section 110. The copy volume association-control section 106 controls association of the copy source volume with the copy destination volume at the SnapOPC execution time.
The bitmap control section 107 updates and refers to bitmap data which is management table data provided to associate the storage area of the copy source volume with that of the copy destination volume. The bitmap control section 107 confirms whether or not data is written into an area of the copy destination volume provided to store data transmitted from the host computer 1. The bitmap control section 107 updates and refers to a logical bitmap data illustrating how the data of a target area of the copy source volume is copied to the copy destination volume and a physical bitmap data illustrating how the physical area of the copy destination volume is used. LBA conversion table data is conversion table data provided to associate logical LBA data illustrating a position where the data of a logical area exists with physical LBA data illustrating a position where the data of the physical area exists. The management table data will be described later with reference to the attached drawing.
The data comparison-control section 109 includes a copy source data-comparison section 111 and a copy destination data-comparison section 112. The copy source data-comparison section 111 compares the data transmitted from the host computer 1 to data that had already been written into the area of the copy destination volume storing the data transmitted from the host computer 1, where the data transmitted from the host computer 1 is written into the area. The copy destination data-comparison section 112 compares the above-described data to the data transmitted from the host computer 1 based on a determination that there is data written into a target area of the copy destination volume, the determination being made by the bitmap control section 107.
Upon receiving data of a request for a buffer, the temporary buffer allocation-control section 110 allocates a temporary buffer onto the cache memory 9. An area of the cache memory 9 and/or the volatile memory 8 provided in the controller module 5 is used as the buffer area.
Hereinafter, a SnapOPC operation and a method of copying data after a SnapOPC instruction is transmitted, where the SnapOPC operation and the copying method are performed in the above-described system, will be described. The term “SnapOPC” denotes a method of making a backup copy of only un-updated data that had been obtained in an area that was subjected to updating through data writing or the like of data of the copy source volume at the backup execution time.
Here, when a SnapOPC instruction to perform the SnapOPC is transmitted from the user to the storage control device configured to execute the SnapOPC, the copy volume-association control section 106 associates data of the time when the SnapOPC instruction is received and/or the file generation (the session information) with a storage area storing data of a snapshot of the copy source volume, the snapshot being obtained at the time when the SnapOPC instruction is received, and generates the management table data. At that time, no data is stored in the copy destination volume. The term “snapshot” denotes a set of files and directories that existed in storage at a certain moment in the past and recorded data of the set.
Next, a copying method performed during data write processing will be described.
In the following example, the host computer 1 transmits a write request 18 to the storage control device 5 to write data X17 in the storage area 13A storing data A16 of the copy source volume 13. When the above-described write request 18 is transmitted from the host computer 1 to the storage control device 5, the bitmap control section 107 refers to the management table data 15 to confirm whether or not data had already been written into the storage area 14A of the copy destination volume 14, where the storage area 14A corresponds to the storage area 13A. When the bitmap control section (copy destination data-confirmation section) 107 refers to the bitmap data and confirms that no data had been written into the corresponding area 14A of the copy destination volume 14, the temporary buffer allocation-control section 110 allocates a temporary buffer onto the cache memory 9 and the copy function-execution section 105 stores data X18 transmitted from the host computer 1 in the temporary buffer.
If the data comparison-control section 109 determines that the data A 16 agrees with the data X17, the data is not saved from the copy source volume 13 to the copy destination volume 14 and the temporary buffer 19 is released.
An example where data is stored in the copy destination volume 14 will be described in relation to a copying method performed during write processing.
The state where data is stored in the copy destination volume 14 is the state where data is written in the target area 13A of the copy source volume 13 on at least one occasion after the Snap OPC instruction is issued. More specifically, the data C25 is transmitted from the host computer 1 and is written into the copy source volume 13 and the data A16 stored in the target area 13A of the copy source volume 13 is copied to the copy destination volume 14.
Accordingly, it becomes possible to make a backup copy by making a data content comparison during the SnapOPC to reduce redundancy of data items that are equivalent to each other and stored in the copy source volume and an allocated storage area respectively.
Next, the management table data shown in the above-described conceptual diagrams will be clarified. The following management table data is used in the storage control device of the above-described application.
Upon receiving a request to write data into the copy source volume 13, the request being transmitted from the host computer 1 (step S101), the storage control device confirms whether or not data is written into the corresponding logical storage area of the copy destination volume 14 through the bitmap control section 107 (step S102), as shown in
It is confirmed whether or not the data is written into a storage area of the copy destination volume 14, the storage area corresponding to the write request, based on the logical bitmap data which is the management table data. If data indicated by the sign “0” is stored in the corresponding position specified on the logical bitmap data, the data of a target logical area is written into the copy destination volume 14. If data indicated by the sign “1” is stored in the corresponding position specified on the logical bitmap data, the data of the target logical area is not written into the copy destination volume 14, but the copy source volume 13.
If it is determined that the data is not written into the logical storage area of the copy destination volume 14, the logical storage area corresponding to the write request, through the copy destination data-confirmation section 107 (when the answer is NO at step S102), the temporary buffer allocation-control section 110 allocates a temporary buffer onto the cache memory 9 (step S103). Then, data transmitted from the host computer 1 is stored in the allocated temporary buffer (step S104).
After the data transmitted from the host computer 1 is stored in the temporary buffer, the data comparison-control section 109 compares the data of the copy destination volume, the data being stored in the corresponding area, to the data for which the write request is issued, the data being stored in the temporary buffer. First, the data of the copy source volume 13 is read and stored in the cache memory 9, and the data comparison-control section 109 compares the data stored in the cache memory 9 to the data stored in the temporary buffer (step S105). If it is determined that the data stored in the cache memory 9 agrees with the data stored in the temporary buffer at that time (when the answer is YES at step S105), the data is not saved from the copy source volume 13 to the copy destination volume 14 and the temporary buffer storing the data is released (step S108), and the processing is terminated.
If it is determined that the data stored in the cache memory 9 does not agree with the data stored in the temporary buffer at that time (when the answer is NO at step S105), the data stored in the cache memory 9 is written into the copy destination volume 14 (step S106).
The data stored in the temporary buffer is written into the corresponding storage area of the copy source volume 13 (step S107). The temporary buffer storing the data is released (step S108) and the processing is terminated.
If it is determined that the data is written into the logical storage area of the copy destination volume 14, the logical storage area corresponding to the write request, through the copy destination data-confirmation section 107 (when the answer is YES at step S102), the data item transmitted from the host computer 1 is stored in the cache memory 9 and the corresponding area of the copy source volume 13 is overwritten with the data item (step S109). The data item stored in the corresponding storage area of the copy destination volume 14 is read and stored in the cache memory 9, and the data comparison-control section 109 compares the data items that are stored in the cache memory 9 to each other (step S110).
If the data items that are compared to each other agree with each other (when the answer is YES at step S110), the bitmap control section 107 updates the management table data and determines the area where the data of the copy destination volume 14 is stored to be an unallocated area (step S111), and the processing is terminated. If the data items that are compared to each other do not agree with each other (when the answer is NO at step S110), the processing is terminated as it is.
Accordingly, the storage control device disclosed in this application allows for omitting an unnecessary data copying operation. The physical capacity of the SDV provided as the copy destination volume 14 is smaller than the logical capacity. Therefore, when data of which capacity is larger than the physical capacity of the SDV is updated for the copy source volume 13, it becomes difficult to save the data and the snapshot is lost. However, it becomes possible to reduce the frequency of occurrence of the above-described phenomenon through the disclosed methods. Since the storage area can be used with efficiency, the reliability of the storage system is increased.
An example case where a copy operation is controlled through an internal data comparison section will be described as a second embodiment of the present invention.
The above-described configuration will be described with reference to a flowchart of
The internal data comparison section 113 controls the copy operation so that a pointer configured to indicate an appropriate location during a search is set to the head of logical bitmap data (step S201). The logical bitmap data for pointing is checked to determine whether or not a bit is 0 (step 5202). If the bit is 1 (when the answer is NO at step S202), the pointer is forwarded to the next cell of the logical bitmap data (step S207). If the bit of the next cell is 0 (when the answer is YES at step S202), the temporary buffer allocation-control section 110 allocates buffers 1 and 2 onto the cache memory 9. The device control section 103 reads and stores the data of the copy source volume into the buffer 1 (step S203).
The above-described data is converted into the physical LBA of the corresponding copy destination volume based on the LBA conversion table data and the data of the copy destination volume is read and stored in the buffer 2 (step S204). It is determined whether or not the data of the buffer 1 agrees with that of the buffer 2 (step S205).
When the data of the buffer 1 agrees with that of the buffer 2 (when the answer is YES at step S205), the management table data is updated at step S206 and the data of the copy destination volume is set to the unallocated state (step S206).
When the data of the buffer 1 does not agree with that of the buffer 2 (when the answer is NO at step S205), the pointer is forwarded to the next cell of the logical bitmap data (step S207). It is determined whether or not the data is stored in the last position of the volume at step S208. If the data is stored in the last position of the volume (when the answer is YES at step S208), and if the data is not stored in the last position of the volume (when the answer is NO at step S208), the internal data comparison section 113 enters a sleep state for a predetermined time period. After the predetermined time period elapses, the pointer is set to the head of the logical bitmap data through schedule processing and the above-described flow is performed again.
During each copy operation, the internal data comparison section 113 checks the internal data instead of checking redundant data so that the storage area can be used with efficiency.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a illustrating of the superiority and inferiority of the invention. Although the embodiments have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2009-85980 | Mar 2009 | JP | national |