This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2015-208728, filed on Oct. 23, 2015, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is related to a storage control device.
With an increase in data amount handled in business and the spread of virtual environments, storage devices required to be used is being increased significantly. Therefore, a storage system may use a data deduplication function of a storage control device in order to reduce the data amount. When the data deduplication function is used, only one physical data area is allocated to plural data having identical contents. The storage is a drive such as a hard disk drive (HDD), a solid state drive (SSD), or the like.
The storage system may use a snapshot creation function to gather and create, as a snapshot, an image of a copy source volume on a storage at a specific time point. In the creation of the snapshot, a management area (snapshot area) is secured, and no copy of real data of the copy source volume is performed. When a data update is performed to the copy source volume by a server, corresponding pre-update data is copied to the management area in the case where the pre-update data is not copied yet.
Related technologies are disclosed in, for example, Japanese Laid-Open Patent Publication No. 2013-47933 and Japanese Laid-Open Patent Publication No. 11-134117.
According to an aspect of the present invention, provided is a storage control device including a memory and a processor coupled with the memory. The processor is configured to: perform a deduplication process for avoiding duplication of first unit data among unit data of a deduplication volume in a storage device on basis of map information for the deduplication volume upon receiving a write request for writing write data to a write destination in the first unit data. Each unit data of the deduplication volume is allocated with a logical area. The map information includes an entry corresponding to each unit data of the deduplication volume. The entry indicates a physical area allocated to the logical area of each unit data. The processor is configured to: create, upon receiving a request for creating a snapshot of the deduplication volume, the snapshot by copying the map information into a snapshot area.
The object and advantages of the invention 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 invention, as claimed.
The above-described data deduplication process and snapshot creation process have a similar idea in that different physical areas are not allocated to plural data having identical contents, although these processes are different from each other in situations used. In the present situation, the above-described data deduplication process and snapshot creation process are not cooperative with each other but are controlled independently as illustrated in, for example,
As illustrated in
In the data deduplication process (S3) performed thereafter, when the received I/O request is a data update request for the copy source volume, a duplication check is performed as to whether or not post-update data overlaps with existing data. Then, after the data deduplication process is performed in accordance with a result of the duplication check, an I/O process (S4) is performed in accordance with the I/O request. When the post-update data overlaps with existing data, a logical area of the object data of the I/O request is associated with a physical area of the existing data. When the post-update data does not overlap with existing data, the logical area of the object data of the I/O request is associated with a newly allocated physical area. The above-described duplication check process is an overhead in the data deduplication process.
As described above with reference to
Hereinafter, an embodiment of the storage control device of the present disclosure will be described with reference to the drawings. However, the following embodiment is merely illustrative only and is not intended to exclude application of various modifications and techniques which are not specified in the embodiment. In other words, the embodiment may be variously modified within a scope that does not depart from the gist of the embodiment. Each of the drawings is not intended to include only components illustrated therein, and may include other functions.
First, a storage system 1 including a storage control device 100 according to the embodiment will be described with reference to
The storage system 1 forms a virtual storage environment by virtualizing a storage device 31 mounted in a drive enclosure (DE) 30. The storage system 1 provides a virtual volume to a host device 2 (server) as an upper level device.
The storage system 1 is communicably coupled with one or more (one in the example illustrated in
The host device 2 is, for example, an information processing device having a server function and transmits/receives commands of the network attached storage (NAS) or the storage area network (SAN) to/from the storage system 1. The host device 2 writes/reads data into/from a volume provided by the storage system 1 by transmitting a storage access command such as write/read of NAS to the storage system 1.
Then, in accordance with an input/output request (e.g., a write request or a read request) performed for the volume by the host device 2, the storage system 1 performs a process such as data writing or reading for the storage device 31 corresponding to the volume. The input/output request from the host device 2 may be referred to as an I/O request.
Although one host device 2 is illustrated in the example of
In addition, a management terminal 3 is communicably coupled with the storage system 1. The management terminal 3 is an information processing apparatus including an input device such as a keyboard or a mouse and a display, and allows a user such as a system administrator to input a variety of information. For example, the user inputs information on a variety of settings via the management terminal 3. The input information is transmitted to the host device 2 or the storage system 1.
As illustrated in
Each drive enclosure 30 may accommodate one or more (four in the example of
For example, the drive enclosure 30 includes a plurality of slots (not illustrated). By inserting the storage devices 31 in these slots, the real volume capacity may be changed appropriately. The plurality of storage devices 31 may be used to construct a redundant array of inexpensive disks (RAID).
The storage device 31 is a storage device such as an HDD or an SSD, which has a larger capacity than a memory 106 to be described later and stores therein a variety of data. In the following descriptions, a storage device may be referred to as a drive or a disk.
Each drive enclosure 30 is coupled with each of device adapters (DAs) 103 of the CM 100a and each of DAs 103 of the CM 100b. Thus, both the CMs 100a and 100b may access each drive enclosure 30 to perform a data writing or reading operation. That is, by coupling the CMs 100a and 100b with each storage device 31 in each drive enclosure 30, an access path to the storage device 31 is made redundant.
A controller enclosure 40 includes one or more (two in the example of
Each of the CMs 100a and 100b is a controller (storage control device) for controlling operations in the storage system 1 and performs a variety of controls such as a control of data access to the storage devices 31 in the drive enclosures 30, in accordance with an I/O command transmitted from the host device 2. The CMs 100a and 100b have a similar configuration. Hereinafter, the CMs are referred to as the CM 100a and the CM 100b to specify one of the plural CMs, and referred to as a CM 100 to refer to any of the CMs. In addition, the CMs 100a and 100b may be denoted by CM#1 and CM#2, respectively.
The CMs 100a and 100b are duplexed, and the CM 100a (CM#1) is typically a primary CM to perform a variety of controls. However, when the primary CM 100a is out of order, the secondary CM 100b (CM#2) acts as a primary CM and takes over the operations of the CM 100a.
The CMs 100a and 100b are coupled with the host device 2 via the CAs 101 and 102. Each of the CMs 100a and 100b receives an I/O request such as a write/read request, which is transmitted from the host device 2, and performs a control of the storage device 31 via the DA 103 or the like. In addition, the CMs 100a and 100b are communicably interconnected via an interface (not illustrated) such as the peripheral component interconnect express (PCIe).
As illustrated in
Each of the CAs 101 and 102 receives data transmitted from, for example, the host device 2 or the management terminal 3 or transmits data output from the CM 100 to, for example, the host device 2 or the management terminal 3. That is, each of the CAs 101 and 102 controls data input/output with an external device such as the host device 2.
The CA 101 is a network adapter, such as a local area network (LAN) interface, communicably coupled with the host device 2 and the management terminal 3 via the NAS. The CA 101 of each CM 100 is coupled with, for example, the host device 2 by the NAS via a communication line (not illustrated) and performs reception of I/O requests, transmission/reception of data, and the like. In the example illustrated in
The CA 102 is a network adapter, such as an international small computer system interface (iSCSI) interface or a fibre channel (FC) interface, communicably coupled with the host device 2 via the SAN. The CA 102 of Each CM 100 is coupled with, for example, the host device 2 by the SAN via a communication line (not illustrated) and performs reception of I/O requests, transmission/reception of data, and the like. In the example illustrated in
The DA 103 is an interface for communicably coupled with, for example, the drive enclosure 30 or the storage devices 31. The DA 103 is coupled with the storage devices 31 of the drive enclosure 30, and each CM 100 performs a control of access to the storage devices 31 in accordance with an I/O request received from the host device 2.
Each CM 100 performs writing or reading of data in or from the storage devices 31 via the DA 103. In the example illustrated in
Thus, the storage devices 31 in the drive enclosure 30 may perform writing or reading of data in or from both the CMs 100a and 100b.
The flash memory 107 is a storage device for storing therein a program to be executed by the CPU 105, a variety of data, and the like.
The memory 106 is a storage device for temporarily storing a variety of data and programs and includes a cache area 161 and a memory area 162 for application (see
The IOC 108 is a controller for controlling data transmission within each CM 100 and implements direct memory access (DMA) transmission for transmitting data stored in the memory 106 with no intervention of the CPU 105.
The CPU 105 is a processor to perform a variety of controls and calculations, such as a multicore processor (multi-CPU). The CPU 105 implements a variety of functions by executing an operating system (OS) and programs stored in the memory 106, the flash memory 107, or the like.
Subsequently, a functional configuration of the storage control device 100 (CM) according to the present embodiment will be described with reference to
In the CM 100 according to the present embodiment, the CPU 105 functions as a deduplication unit 151, a snapshot creation unit 152, a restoration unit 153, and an I/O processing unit 154, as illustrated in
The storage control program 160 is provided in the form of being recorded in a portable non-transitory computer-readable recording medium such as a magnetic disk, an optical disk, a magneto-optic disk, or the like. Examples of the optical disk may include a compact disk (CD), a digital versatile disk (DVD), a blu-ray disk, or the like. Examples of the CD may include a CD read-only memory (CD-ROM), a CD-recordable/rewritable (CD-R/RW), or the like. Examples of the DVD may include a DVD-RAM, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, high definition DVD (HD DVD), or the like.
The CPU 105 reads the storage control program 160 from the above-described recording medium and stores the program in an internal storage device (e.g., the memory 106 or the flash memory 107) or an external storage device for later use. The CPU 105 may receive the storage control program 160 via a network (not illustrated) and stores the program in an internal storage device or an external storage device for later use.
The CM 100 according to the present embodiment is to control the storage devices 31 in the drive enclosures 30 and has both a data deduplication function by the deduplication unit 151 (deduplication engine) and a snapshot creation function by the snapshot creation unit 152 (snapshot creation engine).
The deduplication unit 151 implements the data deduplication function to prevent each unit data stored in each storage device 31 from being duplicated. The deduplication unit 151 uses a block map 51 (mapping table) (see, e.g.,
In the example illustrated in
In the storage pool#1, the block map 51 is created for each of volume#1 to volume#3. The block maps 51 are used to prevent data of volume#1 to volume#3 and data in the corresponding storage pool#1 from being duplicated. Similarly, in the storage pool#2, the block map 51 is created for each of volume#4 to volume#6. The block maps 51 are used to prevent data of volume#4 to volume#6 and data in the corresponding storage pool#2 from being duplicated.
Upon receiving a write request (data update request) for a deduplication volume from the host device 2, the deduplication unit 151 performs a duplication check to check whether or not the unit data (post-update data) to be written received from the host device 2 overlaps with existing data within the same storage pool (deduplication pool). When the post-update data overlaps with existing data, the deduplication unit 151 associates, in the block map 51 for the deduplication volume, a logical area of the object data of the write request with a physical area of the existing data. When the post-update data does not overlap with existing data, the deduplication unit 151 associates, in the block map 51 for the deduplication volume, the logical area of the object data of the write request with a newly allocated physical area and writes the to-be-written unit data in the newly allocated physical area.
In the present embodiment, the unit data (to-be-written unit data) on which the duplication check is performed may be a data block having the size of the unit (physical block unit: e.g., 512 B (bytes)) of writing in an HDD, SSD, or the like or may be a data block group (e.g., 4 kilobytes) including a plurality of data blocks.
Upon receiving a snapshot creation request for a deduplication volume from the host device 2, the snapshot creation unit 152 determines whether or not the deduplication volume (copy source) and a snapshot area (copy destination) belong to the same deduplication pool.
When the copy source and the copy destination do not belong to the same deduplication pool, that is, belong to different deduplication pools, the snapshot creation unit 152 performs a similar process to the snapshot creation process described above with reference to
When the copy source and the copy destination belong to the same deduplication pool, the snapshot creation unit 152 performs the following process. That is, the snapshot creation unit 152 copies the block map 51 for the deduplication volume, for which a snapshot is to be created, into a snapshot area in the deduplication pool to which the deduplication volume belongs, sequentially for each entry. Thus, the snapshot of the deduplication volume is created. Each entry of the block map 51 includes information related to one set of a logical area and a physical area which corresponds to each unit data.
At this time, the snapshot creation unit 152 creates a bit map 52 (see
As will be described below, the snapshot creation unit 152 copies the block map 51 for the deduplication volume into the snapshot area for each entry in accordance with the created bit map 52. At that time, the snapshot creation unit 152 determines whether or not the to-be-written unit data, which is received from the host device 2, is included in the deduplication volume under snapshot creation. When it is determined that the to-be-written unit data is not included in the deduplication volume under snapshot creation, the I/O processing unit 154 performs a normal write I/O process for the to-be-written unit data.
When it is determined that the to-be-written unit data is included in the deduplication volume under snapshot creation, the snapshot creation unit 152 determines whether or not the deduplication volume (copy source) and the snapshot area (copy destination) belong to the same deduplication pool.
When it is determined that the copy source and the copy destination do not belong to the same deduplication pool, that is, belong to different deduplication pools, the snapshot creation unit 152 performs a similar process to the process described above with reference to
When it is determined that the copy source and the copy destination belong to the same deduplication pool, the snapshot creation unit 152 refers to the bit map 52 for the deduplication volume of the copy source. When “1” indicating “copy is not completed yet” is set in a bit corresponding to the to-be-written unit data in the bit map 52, the snapshot creation unit 152 copies an entry of the block map 51, which corresponds to the to-be-written unit data, into the snapshot area. Then, the snapshot creation unit 152 sets, in the bit map 52, the bit corresponding to the to-be-written unit data as “0” indicating “copy is already completed”. Thereafter, the I/O processing unit 154 performs the normal write I/O process for the to-be-written unit data.
When “0” indicating “copy is already completed” is set in the bit corresponding to the to-be-written unit data in the bit map 52, the snapshot creation unit 152 skips the process of copying the entry of the block map 51 corresponding to the to-be-written unit data and the process of updating the bit map 52. Thereafter, the I/O processing unit 154 performs the normal write I/O process for the to-be-written unit data.
Upon receiving a restoration request for a deduplication volume, the restoration unit 153 restores the deduplication volume by copying the block map 51 (information in each entry) in the snapshot area into a restoration destination. A restoration process performed by the restoration unit 153 will be described later with reference to
Next, operations of the storage control device 100 according to the present embodiment having the above-described functional configuration will be described with reference to
First, a difference in operations between the above-described existing storage system and the storage system 1 according to the present embodiment will be described.
The copy source (deduplication volume) and the copy destination (snapshot area) may belong to the same storage pool or different storage pools in the above-described existing storage system. In contrast, in the present embodiment, the copy source and the copy destination belong to the same storage pool (deduplication pool).
In the storage system 1 according to the present embodiment, the creation of the snapshot of the deduplication volume is performed by copying the block map 51 for the deduplication volume of the copy source into the snapshot area of the snapshot destination volume.
In the above-described existing storage system, when creating the snapshot, the copy completion/incompletion of each unit data of the copy source is managed by the bit map having bits corresponding to the respective unit data. In contrast, in the storage control device 100 according to the present embodiment, when creating the snapshot of the deduplication volume, the copy completion/incompletion of each entry of the block map 51 is managed using the bit map 52 (see
After the entire entries of the block map 51 are copied, the storage control device 100 manages an access to the copy source volume (deduplication volume) and an access to the snapshot volume (snapshot area) independently.
In the existing storage system, a process of restoration from the snapshot to the copy source is performed by physically copying differential data. In contrast, in the present embodiment, a process of restoration from the snapshot to the copy source volume is performed by the restoration unit 153 of the storage control device 100 to copy the block map 51 in the snapshot area into the copy source volume. At this time, in the storage system 1 according to the present embodiment, no physical copy of data is performed.
In the deduplication function, as described above, there exists a block map 51 indicating to which physical area a logical area for unit data of a predetermined size (e.g., 4 KB) is allocated. In the storage system 1 according to the present embodiment, when a snapshot of the deduplication volume is created, the deduplication unit 151 is requested to create the block map 51 having bits corresponding to the respective unit data in the deduplication volume. Accordingly, an overhead is reduced in data writing after the snapshot is created.
Now, a specific example of a structure of the block map 51 for the deduplication volume will be described with reference to
Subsequently, a snapshot creation operation performed by the snapshot creation unit 152 according to the present embodiment will be described with reference to
Here, for example, as illustrated in
Since data of LUN=0x0100 is exactly identical to data of LUN=0x0000 of the copy source at the point of time when the creation of the snapshot is completed, a block map 51 identical to the block map 51 illustrated in
Once the snapshot (copy of the block map 51) is created, the copy source and the copy destination are accessed independently. This assumes that a physical area separated from the physical area of the pre-update unit data is allocated and writing in deduplication is controlled to be performed for the separated physical area. This ensures that pre-write unit data (pre-update unit data) is prevented from being erased by overwriting.
For example, when writing to the logical area (LBA) 0x00000018 of LUN=0x0000 is performed in a state of the block map 51 illustrated in
When the normal snapshot is created in the existing storage system, only the above-described bit map having bits corresponding to the respective unit data is created, and the management of the copy completion/incompletion is performed for each unit data. Since the creation of the bit map having bits corresponding to respective unit data is performed at a high speed, the latency in host access is substantially zero.
When the block map is created in the deduplication (block map is created in a snapshot destination volume), since a mapping table (block map 51) has to be copied, it takes a time to make the copy. For example, when a snapshot of LUN of 400 GB is created, since a mapping table (block map 51) of 800 MB has to be copied, it takes a time of several seconds to several ten seconds to make the copy and the host device 2 suffers from an access delay.
Therefore, according to the present embodiment, bit map management is performed for the copy completion/incompletion of each entry of the block map 51 in the snapshot destination. Copy of the block map 51 is performed in sequence from the head entry. At that time, if a write request is received for an area (entry) for which copy is not completed yet, the copy-incomplete area (entry) is copied in preference, and a bit corresponding to the copy-incomplete area (entry) is updated in the bit map 52 from On (1) to Off (0). An area corresponding to an Off bit in the bit map 52 is skipped in the copy performed in sequence from the head entry since the copy of the corresponding entry is already completed.
For example, as illustrated in
That is, as illustrated in
Subsequently, a restoration operation performed by the restoration unit 153 according to the present embodiment will be described with reference to
A snapshot restoration process is a reverse process to the snapshot creation process. That is, in the snapshot restoration process, the block map 51 is simply copied from the snapshot destination volume to the deduplication volume of the copy source, but no physical copy of data is performed.
It is assumed that a state before the restoration is, for example, the state illustrated in
That is, when performing the restoration process for the block map 51 illustrated in
Next, a flow of operations for storage control according to the present embodiment will be described with reference to a flowchart illustrated in
The CM 100 (CPU 105) according to the present embodiment waits for receiving a request from the host device 2 (server) (“NO” in S101). Upon receiving any request (“YES” in S101), the CPU 105 determines whether or not the received request is a snapshot creation request (S102).
When it is determined that the received request is a snapshot creation request (“YES” in S102), the CPU 105 performs a snapshot creation process (S103). A sequence of the snapshot creation process will be described later with reference to
When it is determined that the received request is not a snapshot creation request (“NO” in S102), the CPU 105 determines whether or not the received request is a write request (S104).
When it is determined that the received request is a write request (“YES” in S104), the CPU 105 performs a write I/O process (S105). A sequence of the write I/O process will be described later with reference to
When it is determined that the received request is not a write request (“NO” in S104), the CPU 105 determines whether or not the received request is a read request (S106).
When it is determined that the received request is a read request (“YES” in S106), the CPU 105 performs a read I/O process (S107). A sequence of the read I/O process will be described later with reference to
When it is determined that the received request is not a read request (“NO” in S106), the CPU 105 determines whether or not the received request is a restoration request (S108).
When it is determined that the received request is a restoration request (“YES” in S108), the CPU 105 performs the restoration process described above with reference to
When it is determined that the received request is not a restoration request (“NO” in S108), the CPU 105 performs a process in accordance with the received request (S110) and returns to S101.
Next, a flow of a process (snapshot creation process: S103 in
Upon receiving the snapshot creation request for a deduplication volume from the host device 2 (server), the snapshot creation unit 152 of the CPU 105 determines whether or not the deduplication volume (copy source) and a snapshot area (copy destination) belong to the same deduplication pool (S201).
When it is determined that the copy source and the copy destination do not belong to the same deduplication pool (“NO” in S201), the snapshot creation unit 152 performs a similar process to the snapshot creation process described above with reference to
When it is determined that the copy source and the copy destination belong to the same deduplication pool (“YES” in S201), the snapshot creation unit 152 creates the bit map 52 (see
In addition, the snapshot creation unit 152 sets a bit pointer pointing a bit of the bit map 52, which corresponds to an entry of interest, to point a bit corresponding to the head (LBA=0) of the block map 51 for the deduplication volume (S204).
At this point, the CPU 105 notifies a user (the host device 2) of the creation completion of the snapshot of the deduplication volume in advance (S205), and starts a process of copying the block map 51 for the deduplication volume (S206).
Upon starting the copy process, first, the snapshot creation unit 152 determines whether or not a value of a bit pointed by the bit pointer in the bit map 52 is “0”, that is, whether or not copying of an entry corresponding to the bit pointer is completed (S207).
When it is determined that the value of a bit pointed by the bit pointer is “1”, that is, when the copying of the entry corresponding to the bit pointer is not completed yet (“NO” in S207), the snapshot creation unit 152 copies the entry of the block map 51 corresponding to the bit pointer into the copy destination (S208). Here, the copy destination is a snapshot area in the deduplication pool to which the deduplication volume belongs.
Then, the snapshot creation unit 152 updates the value of the bit pointed by the bit pointer from “1” (copy is not competed yet) to “0” (copy is competed) (S209).
When the value of a bit pointed by the bit pointer is “0”, that is, when the copying of the entry corresponding to the bit pointer is completed (“YES” in S207), or after the process of S209, the snapshot creation unit 152 performs a process of S210. That is, at S210, the snapshot creation unit 152 determines whether or not the bit pointer points a final bit corresponding to a final entry of the block map 51 for the deduplication volume (S210).
When it is determined that the bit pointer does not point a final bit corresponding to a final entry of the block map 51 for the deduplication volume (“NO” in S210), the snapshot creation unit 152 advances the bit pointer for the bit map 52, which points a bit corresponding to an entry of interest in the block map, to the next (S211). Thereafter, the snapshot creation unit 152 returns to S207.
When it is determined that the bit pointer points a final bit corresponding to a final entry of the block map 51 for the deduplication volume (“YES” in S210), the snapshot creation unit 152 determines that the creation of the snapshot of the deduplication volume is completed. That is, the snapshot creation unit 152 determines that copying of all entries of the block map 51 for the deduplication volume is completed, and releases the area of the bit map 52 (S212).
Next, a flow of a process performed by the existing storage system upon receiving a write request (a write I/O process) will be described with reference to a flowchart illustrated in
In the above-described existing storage system, upon receiving a write request from a server (S500), it is determined whether or not the write request is for a volume (copy source volume) of which a snapshot has been created (S501).
When it is determined that the write request is not for a volume of which a snapshot has been created (“NO” in S501), a normal write I/O process in response to the write request is performed (S502).
When it is determined that the write request is for a volume of which a snapshot has been created (“YES” in S501), a bit map for the snapshot, which has bits corresponding to respective unit data, is checked, and it is determined whether or not a bit corresponding to unit data of the write destination, to which data is written in response to the write request, is “1” (S503).
When it is determined that the corresponding bit is not “1”, that is, when the corresponding bit is “0” (“NO” in S503), it is determined that the unit data (pre-update unit data) of the write destination is already copied into a snapshot area (snapshot volume). Then, a normal write I/O process in response to the write request is performed (S504).
When it is determined that the corresponding bit is “1” (“YES” in S503), it is determined that the unit data (pre-update unit data) of the write destination is not copied yet into the snapshot area. In this case, a duplication check is performed, that is, it is determined whether or not the pre-update unit data to be copied from the copy source volume into the snapshot area is duplicate data which overlaps with existing data (S505).
As a result of the duplication check, when the pre-update unit data is duplicate data (“YES” in S506), in the block map in the snapshot volume, a physical area corresponding to a write position (LBA) is updated to a physical area (physical address) of the existing duplicate data (S507).
Then, the corresponding bit in the bit map for the snapshot, which has bits corresponding to respective unit data, is changed from “1” (not yet copied) to “0” (already copied) (S508). Thereafter, to-be-written unit data which is to be written in response to the write request is received from the server, and a normal write I/O process is performed (S509).
As a result of the duplication check, when the pre-update unit data is not duplicate data (“NO” in S506), a new area (physical address) is allocated, and the pre-update unit data is copied and written in the allocated new area. Thereafter, the block map in the snapshot volume is updated (S510), and then, the process proceeds to S508.
S501 and S503 correspond to the snapshot determination process (S2) in the existing storage system described above with reference to
Next, a flow of a process (write I/O process: S105 in
Upon receiving a write request for a deduplication volume from the host device 2 (server), the I/O processing unit 154 of the CPU 105 determines whether or not the write request is for a volume of which a snapshot has been created (S301).
When it is determined that the write request is not for a volume of which a snapshot has been created (“NO” in S301), the I/O processing unit 154 performs a normal write I/O process in response to the write request (S302) with the deduplication process by the deduplication unit 151.
When it is determined that the write request is for a volume of which a snapshot has been created (“YES” in S301), the CPU 105 determines whether or not the deduplication volume (copy source) and a snapshot area (copy destination) belong to the same deduplication pool (S303).
When it is determined that the copy source and the copy destination do not belong to the same deduplication pool (“NO” in S303), the CPU 105 performs a normal write I/O process for a snapshot in a different deduplication pool (S304).
When it is determined that the copy source and the copy destination belong to the same deduplication pool (“YES” in S303), the snapshot creation unit 152 calculates a bit position in the bit map 52 (an entry position in the block map 51), which corresponds to a write position at which data is to be written in response to the write request (S305).
The snapshot creation unit 152 determines whether or not a value of the corresponding bit is “0” (copy is completed) by referring to a value of a bit at the calculated bit position (a value of the corresponding bit) in the bit map 52 (S306).
When it is determined that the value of the corresponding bit is “0” (copy is completed) (“YES” in S306), the I/O processing unit 154 performs a normal write I/O process in response to the write request (S307) with the deduplication process by the deduplication unit 151.
When it is determined that the value of the corresponding bit is “1” (copy is not completed yet) (“NO” in S306), the snapshot creation unit 152 copies an entry of the block map 51 for the copy source volume corresponding to the corresponding bit position into the block map 51 in the copy destination volume (snapshot area) (S308).
Then, the snapshot creation unit 152 sets a value of the bit at the corresponding bit position in the bit map 52 from “1” (copy is not completed yet) to “0” (copy is completed) (S309).
Thereafter, the I/O processing unit 154 performs a normal write I/O process in response to the write request (S310) with the deduplication process by the deduplication unit 151.
Next, a flow of a process (read I/O process: S107 in
Upon receiving a read request from the host device 2 (server), the I/O processing unit 154 of the CPU 105 determines whether or not the read request is for a snapshot volume (copy destination volume) (S401).
When it is determined that the read request is not for a snapshot volume (“NO” in S401), the I/O processing unit 154 performs a normal write I/O process in response to the read request (S402).
When it is determined that the read request is for a snapshot volume (“YES” in S401), the CPU 105 determines whether or not the deduplication volume (copy source) and a snapshot area (copy destination) belong to the same deduplication pool (S403).
When it is determined that the copy source and the copy destination do not belong to the same deduplication pool (“NO” in S403), the CPU 105 performs a normal read I/O process for a snapshot in a different deduplication pool (S404).
When it is determined that the copy source and the copy destination belong to the same deduplication pool (“YES” in S403), the snapshot creation unit 152 calculates a bit position in the bit map 52 (an entry position in the block map 51), which corresponds to a read position from which data is to be read in response to the read request (S405).
The snapshot creation unit 152 determines whether or not a value of the corresponding bit is “0” (copy is completed) by referring to a value of a bit at the calculated bit position (a value of the corresponding bit) in the bit map 52 (S406).
When it is determined that the value of the corresponding bit is “0” (copy is completed) (“YES” in S406), the I/O processing unit 154 performs a normal read I/O process in response to the read request (S407).
When it is determined that the value of the corresponding bit is “1” (copy is not completed yet) (“NO” in S406), the I/O processing unit 154 reads an entry of the block map 51 for the copy source volume, which corresponds to the corresponding bit position, and acquires a logical area (LBA) at the corresponding bit position (S408).
Then, the I/O processing unit 154 reads data in the acquired LBA, transmits the read data to the host device 2, and terminates the I/O process (S409).
As described above, according to the present embodiment, the snapshot creation process for the deduplication volume is implemented by a process of copying a block map 51 (a mapping table held for each deduplication volume and indicating physical areas). Therefore, the snapshot creation process is completed when the block map 51 is copied.
According to the present embodiment, to allow an access to a copy source volume during the copying of the block map 51, a bit map 52 indicating the copy completion/incompletion for each entry of the block map 51 is created. At this time, although the block map 51 is copied sequentially from the head (head entry) of the volume, when an access to an area into which an entry of the block map 51 is not copied yet is conducted, a corresponding entry of the block map 51 is copied in preference by using the bit map 52.
Thus, it is possible to implement optimized functions by combining the deduplication function and the snapshot creation function, without causing deterioration of the performance of the storage device 31.
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 an illustrating of the superiority and inferiority of the invention. Although the embodiments of the present invention 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 |
---|---|---|---|
2015-208728 | Oct 2015 | JP | national |