WO2016127658A1 - Snapshot processing method and apparatus - Google Patents

Snapshot processing method and apparatus Download PDF

Info

Publication number
WO2016127658A1
WO2016127658A1 PCT/CN2015/092327 CN2015092327W WO2016127658A1 WO 2016127658 A1 WO2016127658 A1 WO 2016127658A1 CN 2015092327 W CN2015092327 W CN 2015092327W WO 2016127658 A1 WO2016127658 A1 WO 2016127658A1
Authority
WO
WIPO (PCT)
Prior art keywords
volume
snapshot
address
mapping table
modified
Prior art date
Application number
PCT/CN2015/092327
Other languages
French (fr)
Chinese (zh)
Inventor
牛克强
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016127658A1 publication Critical patent/WO2016127658A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the present invention relates to a disk array technology, and in particular, to a snapshot processing method and apparatus.
  • the logical volume to be read and written is called the source volume.
  • the auxiliary logical volume that is added to the snapshot is called the resource volume.
  • Differential replication is a convenient and quick way to create snapshots. Differential replication includes two methods. (Copy-on-Write) and Redirect-on-Write.
  • the pre-write copy method is to copy the overwritten data in the source volume to the resource volume and then write the data to the source volume each time a write operation is received; the redirect write method is to directly input the data each time a write operation is received.
  • the unit of processing data is stripe-sized data, called a chunk of data chunk.
  • the data block When reading snapshot data in a snapshot created using the pre-write copy method, if the data block is not modified, it is read directly from the source volume, otherwise it is read from the snapshot volume; in a snapshot created using redirected writes When the source data is read, it is read directly from the source volume if the data has not been modified, otherwise it is read from the snapshot volume. Each time a block of data is read, it is necessary to judge whether the block is modified once, which affects the performance of reading the snapshot volume data. When using these two methods to create a snapshot, the write data operation is similar to the method of reading the data in the snapshot volume. The following describes the pre-write copy method as an example.
  • the active volume V1 the resource volume R1 creates a snapshot S0, and generates an address mapping table F0 of S0, which is empty at time T0.
  • the write IO updates A0 on the LBA (Logical Block Address) address corresponding to the source volume chunk 0 to A1.
  • the system first checks that all existing address mapping tables do not have the LBA address for the source volume. Map entry, find that F0 does not, so copy A0 to resource volume R1 before writing, and then update the mapping item (0,0) in F0, meaning that the data of chunk 0 at the time of source volume T0 is currently saved in the chunk 0 position of the resource volume. . Finally, A1 is normally written to the source volume chunk 0.
  • LBA Logical Block Address
  • snapshot S2 is created, and an empty address mapping table F2 is created.
  • Delete the snapshot S0 After receiving the request, the system first scans the F0 address mapping table corresponding to the S0 snapshot, and scans the mapping table of all other snapshots to find out that only the F0 exists and the other snapshot mapping table does not exist in the resource volume. The bitmap is marked as free, and after all entries of F0 are scanned and processed, the entire F0 is deleted.
  • the existing method deletes a snapshot and traverses the snapshot bitmap. For a bit of 1, the resource volume bitmap of the block is set to 0 (indicating that the block resource is recycled). All existing snapshot bitmaps must be traversed. If other snapshot bitmaps are valid, they cannot be reclaimed. All read bitmap mapping read requests will be generated, which will affect system performance and occupy cache space.
  • the host when it writes IO, it determines whether a pre-write copy is needed. It is necessary to first check all existing address mapping tables. This requires reading the metadata of all snapshots, which is equivalent to Writing a IO to the host adds a read latency. The second is to delete the mapping table of the deleted snapshot and all other snapshots when deleting the snapshot, which increases the delay of the deletion process and resource volume recovery. The third is when the host is newly written. When there is no entry in the mapping table in all snapshots, the IO needs to modify the mapping table of all snapshots. First, read all the snapshot mapping tables and update them before writing them, adding additional delay to the host IO.
  • the embodiment of the invention provides a snapshot processing method and device to solve at least the problems in the related art that seriously affect the snapshot efficiency and system performance.
  • a snapshot processing method including the following steps:
  • the corresponding data in the source volume is written into the resource volume by using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume;
  • the modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established;
  • the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume;
  • the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
  • the method further comprises:
  • the corresponding data is read from the resource volume and the source volume using the snapshot mapping table and the modified record bitmap in the snapshot volume.
  • the method further comprises:
  • the modified address mapping table is deleted by using the snapshot mapping table in the snapshot volume.
  • the step of writing the corresponding data in the source volume to the resource volume by using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume includes:
  • the data to be overwritten in the source volume has been modified, the new data is written into the area corresponding to the data volume to be overwritten by the source volume, and the area address and the area address are recorded in the modified address mapping table.
  • the old data of the area is saved in a mapping relationship of addresses in the resource volume, and the mapping relationship between the area address and the old data of the area is stored in the resource volume and the global index of the resource volume data modification is recorded in the snapshot mapping table.
  • the record in the data volume to be overwritten in the source volume is not modified, and the data in the to-be-covered data block is The old data is copied to the corresponding location of the resource volume, and the to-be-covered data block is recorded as having been modified in the modified record bitmap.
  • the step of using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume to write corresponding data in the source volume to the resource volume further includes:
  • the record of the to-be-covered data block in the source volume is not modified, and the data block to be overwritten is The old data is copied to the corresponding location of the resource volume, and the record of the data block to be overwritten in the modified record bitmap is replaced with the record of the old data copied to the corresponding position of the resource volume.
  • the step of reading the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume comprises:
  • the corresponding data is read from the resource volume and the source volume according to the determined address in the source volume and the source volume old data is saved in the resource volume address.
  • the step of reading the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume further includes:
  • the corresponding data is read from the resource volume
  • the corresponding data is read from the source volume.
  • the step of deleting the modified address mapping table by using the snapshot mapping table in the snapshot volume includes:
  • mapping relationship between the source volume and the resource volume by using the mapping relationship between the source volume address and the source volume old data recorded in the snapshot mapping table in the resource volume;
  • the snapshot volume is deleted according to the mapping relationship between the deleted source volume and the resource volume, and the resource space of the deleted snapshot volume is reclaimed.
  • the step of using the source volume address and the source volume old data recorded in the snapshot mapping table to be saved in an address in the resource volume, and deleting the mapping relationship between the source volume and the resource volume includes:
  • the source volume address and the source volume old data recorded in the snapshot mapping table are saved in a mapping relationship of addresses in the resource volume, and the source volume and the resource volume are deleted. Mapping relationship.
  • a snapshot processing apparatus including:
  • Create a snapshot volume module set to create a snapshot volume that contains the resource volume, modify the record bitmap, modify the address mapping table, and the snapshot mapping table;
  • Writing a snapshot module configured to write a corresponding data in the source volume to the resource volume by using a modified record bitmap, a modified address mapping table, and a snapshot mapping table in the snapshot volume during a write snapshot;
  • the modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established;
  • the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume;
  • the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
  • the invention improves the system of snapshot processing, reduces the impact of the snapshot process on the host write IO, and improves the efficiency of resource volume recovery.
  • FIG. 1 is a schematic diagram of creating a snapshot and generating a snapshot provided by the prior art
  • FIG. 2 is a flowchart of a snapshot processing method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a snapshot processing apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a composition of a snapshot time point snapshot data block according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a logical structure of a snapshot volume according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a write snapshot provided by an embodiment of the present invention.
  • FIG. 7 is a first schematic diagram of a write snapshot provided by an embodiment of the present invention.
  • FIG. 8 is a second schematic diagram of a write snapshot provided by an embodiment of the present invention.
  • FIG. 9 is a flowchart of a read snapshot provided by an embodiment of the present invention.
  • FIG. 10 is a flowchart of deleting a snapshot provided by an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of deleting a snapshot provided by an embodiment of the present invention.
  • FIG. 2 is a flowchart of a snapshot processing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • Step S201 Create a snapshot volume that includes a resource volume, a modified record bitmap, a modified address mapping table, and a snapshot mapping table.
  • Step S202 During the writing of the source volume, using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume, the corresponding data in the source volume is written into the resource volume;
  • the modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established;
  • the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume;
  • the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
  • the present invention also includes reading corresponding data from the resource volume and the source volume by using a snapshot mapping table and a modified recording bitmap in the snapshot volume during a read snapshot.
  • the present invention also includes deleting the modified address mapping table by using a snapshot mapping table in the snapshot volume during deletion of the snapshot.
  • the step of writing the corresponding data in the source volume to the resource volume by using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume includes:
  • the bitmap is related to the record of the data volume to be overwritten in the source volume, and the new data is written in the area corresponding to the data volume to be overwritten by the source volume, and the area address and the old area are recorded in the modified address mapping table.
  • Data is stored in a mapping relationship of addresses in the resource volume, and the mapping relationship between the area address and the old data of the area in the resource volume and the global index of the resource volume data modification are recorded in the snapshot mapping table;
  • the mapping entry of the data block address to be overwritten in the source volume exists in the modified address mapping table, according to the modified recording bitmap, the old data in the data block to be overwritten is recorded on the unmodified data block in the source volume. Copying to the corresponding location of the resource volume, and recording the to-be-covered data block as having been modified in the modified record bitmap.
  • the mapping entry of the data block address to be overwritten in the source volume does not exist in the modified address mapping table, according to the modified record bitmap, the source volume is to be overwritten.
  • stamping the unmodified record of the data block copying the old data in the data block to be overwritten into the corresponding position of the resource volume, and replacing the record in the modified record bitmap with the record of the old data copied to the corresponding position of the resource volume The record of the data block to be overwritten.
  • the step of reading corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume includes: determining, according to the snapshot mapping table, that the read is performed.
  • the data in the source volume and the source volume old data are saved in the resource volume address; according to the determined address in the source volume and the source volume old data is saved in the resource volume address from the resource volume
  • the corresponding data is read from the source volume. Determining whether the read data has been pre-write copy according to the mark of the modified record bitmap; when determining that the read data has been pre-write copy, reading corresponding data from the resource volume; If the read data has not been pre-write copied, the corresponding data is read from the source volume.
  • the step of deleting the modified address mapping table by using the snapshot mapping table in the snapshot volume includes: using the source volume address and the source volume old data recorded in the snapshot mapping table to be saved The mapping relationship between the source volume and the resource volume is deleted.
  • the snapshot volume is deleted according to the mapping relationship between the deleted source volume and the resource volume, and the resource space of the deleted snapshot volume is reclaimed.
  • the step of deleting the mapping relationship between the source volume and the resource volume by using the source volume address and the source volume old data recorded in the snapshot mapping table is as follows:
  • the global index of the resource volume data modification recorded in the snapshot mapping table is determined whether it is necessary to traverse the other modified address mapping table; when it is determined that the other modified address mapping table needs to be traversed, by scanning other modified address mappings An entry existing in the table, marking an entry in the resource volume different from the entry in the snapshot mapping table, and using the source volume address and the source volume old data recorded in the snapshot mapping table to be saved in the resource volume
  • the mapping relationship between the source volume and the resource volume is deleted; when it is determined that the other modified address mapping table does not need to be traversed, the source volume address and the source volume old data recorded in the snapshot mapping table are used
  • the mapping between addresses in the resource volume is saved, and the mapping relationship between the source volume and the resource volume is deleted.
  • FIG. 3 is a schematic diagram of a snapshot processing apparatus according to an embodiment of the present invention.
  • the method includes: creating a snapshot volume module 301 and a write snapshot module 302.
  • the snapshot volume module 301 is configured to create a snapshot volume that includes a resource volume, a modified record bitmap, a modified address mapping table, and a snapshot mapping table.
  • the write snapshot module 302 is configured to use the snapshot during the write snapshot.
  • the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume, and the corresponding data in the source volume is written into the resource volume; wherein the modified record bitmap is used to record the snapshot volume Modifying the modification of each data block in the source volume; the modified address mapping table is used Recording the address of the modified area in the source volume and the address in the resource volume where the old data of the area is saved; the snapshot mapping table is used to record the source volume address and the address of each data block of the time point snapshot, and the record write The data that is produced when the snapshot is taken.
  • the present invention also includes a read snapshot module configured to read the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified record bitmap in the snapshot volume during the read snapshot; deleting the snapshot module, setting the During the deletion of the snapshot, the modified address mapping table is deleted by using the snapshot mapping table in the snapshot volume.
  • the write snapshot module 302 includes: a first write snapshot unit, configured to write new data to the source volume to be overwritten according to the modified record bitmap with respect to the record that the data block to be overwritten in the source volume has been modified. Recording, in the corresponding area, the mapping relationship between the area address and the old data of the area in the resource volume in the modified address mapping table, and recording the area address and the area in the snapshot mapping table The old data is saved in the mapping relationship of the addresses in the resource volume and the global index of the resource volume data modification; the second write snapshot unit is set to be when there is a mapping entry of the data block address to be overwritten in the source volume in the modified address mapping table.
  • a third write snapshot unit configured to: when the map entry of the data block address to be overwritten in the source volume does not exist in the modified address mapping table, according to the modified record bitmap, the record of the data block to be overwritten in the source volume is not modified, Copying the old data in the data block to be overwritten into a corresponding position of the resource volume, and replacing the record of the data block to be covered in the modified record bitmap with the record in which the old data is copied to the corresponding position of the resource volume.
  • FIG. 4 is a schematic diagram showing the composition of a snapshot time point snapshot data block according to an embodiment of the present invention.
  • each data block content in the snapshot is the first modified data or metadata after the snapshot creation time point.
  • the host When the host reads the data (S, 1), (S, 2), (S, 3), (S, 4) of the snapshot volume, it will query the snapshot mapping table and find that the data block (S, 2) has been written. Pre-copy, the data is saved in the location of the resource volume (R, 1), other data blocks are not pre-write, and the data is saved in the source volume. Therefore, it becomes a read request for the data blocks (B, 1), (R, 1), (B, 3), (B, 4).
  • FIG. 5 is a schematic diagram showing the logical structure of a snapshot volume according to an embodiment of the present invention.
  • the snapshot volume logical structure includes a data area 51, a modified record bitmap 52, a modified address mapping table 53, and a snapshot mapping table 54.
  • the data area 51 is used to store old data of the modified area in the snapshot.
  • the modified record bitmap 52 is used to record whether each data block in the source volume is modified after the snapshot is started at the moment. Initialize to 0, if the data is modified, the new data can be written directly to the source volume; if the data has not been modified, the old data needs to be copied to The resource volume is written to the source volume and the bitmap corresponding to the data block is modified.
  • the modified address mapping table 53 is configured to save an address of the modified area in the source volume and an address in which the old data of the area is saved in the resource volume.
  • the snapshot mapping table 54 is configured to save the source volume address and the address where each data block of the time point snapshot is stored. When the snapshot is read, the snapshot content can be directly obtained by reading the data block according to the snapshot data block storage address.
  • the user reads and writes data, which is affected by the snapshot.
  • the user reads and writes data, including writing data to the source volume, reading the old data of the source volume, and reading the snapshot data.
  • the source volume it can be directly and not affected by the snapshot. Writing data to the source volume and reading the snapshot are affected by the snapshot.
  • the present invention provides a snapshot processing method and apparatus, including a source volume and a snapshot volume, specifically, the following steps performed by a source volume and a snapshot volume:
  • Step 1 Create a snapshot and create a snapshot for a source volume.
  • Step 2 Write a snapshot and write data to the source volume during the snapshot process.
  • Step 3 Read the snapshot and read the snapshot data from the snapshot volume after the snapshot is established.
  • Step 4 Delete the snapshot, reclaim the storage resources occupied by the snapshot, and maintain the source volume as the normal data state.
  • the snapshot volume includes a data area, a modified record bitmap, and an address mapping table and a snapshot mapping table.
  • the data area is used to store the old data of the modified area in the snapshot;
  • the modified record bitmap is used to record whether each data block in the source volume is modified after the snapshot is started at the moment; and the modified address mapping table is used to save the source volume.
  • the address of the modified area and the old data of the area are saved in the address of the resource volume;
  • the snapshot mapping table is used to save the source volume address and the address of each data block of the time point snapshot. And record the data generated when the snapshot volume is written.
  • the establishing a snapshot includes the following steps:
  • Step 1 Assign a new resource volume to the snapshot, allocate the data area, modify the record bitmap, and modify the address mapping table.
  • Step 2 Initialize the modified record bitmap, and mark all the bits in the bitmap as 0;
  • Step 3 Initialize the modified address mapping table to create an empty table.
  • FIG. 6 is a flowchart of a write snapshot provided by an embodiment of the present invention. As shown in FIG. 6, the method includes the following steps:
  • Step 61 The received IO is divided into data blocks
  • the received data of the write IO is divided into manageable blocks, that is, the data is divided according to the smallest unit processed.
  • Step 62 Determine whether the part of the data is modified
  • step 63 viewing the data block in the source volume in the modified record bitmap will overwrite the modification flag of the data block, determining whether the source volume data has been modified, and if the data block is modified, proceeding to step 66; if the data block is not If it is modified, the process proceeds to step 63.
  • Step 63 Copy old data in the source volume to the resource volume.
  • Step 64 Modify an address mapping table.
  • An address mapping table is created for the copied old data, including the address of the old data block in the source volume and the address of the old data block in the resource volume. That is, the relationship between the source volume block address and the resource volume block is established in the modified address mapping table.
  • Step 65 Update the modified record bitmap
  • the source volume data block has been modified in the modified record bitmap. That is, in the modified record bitmap, the modification of the corresponding data block is marked as 1.
  • Step 66 Write new data to the source volume.
  • step 63 when the host writes IO, it is determined whether a pre-write copy is needed.
  • the present invention can directly determine whether the source volume has been pre-write copy at various times, as shown in FIG. 7, modifying the record bit.
  • the horizontal view shows the time point of each moment of the source volume, and the vertical direction represents the source volume minimum processing unit.
  • step 63 when the newly written IO of the host is not mapped in all the snapshots, the present invention solves the problem by modifying the record bitmap and the location of the resource volume.
  • the host writes C1 at time T4.
  • C1 mapping table modify the mapping table of all times T0, T1, T2, T3, T4.
  • the present invention firstly uses the pre-write copy mechanism to copy the source volume data into the resource volume.
  • FIG. 9 is a flowchart of a read snapshot provided by an embodiment of the present invention. As shown in FIG. 9, the method includes the following steps:
  • Step 91 Receive a read request sent by the host.
  • Step 92 Read a snapshot mapping table at a time point of the read snapshot
  • the data in the snapshot mapping table is checked to determine the storage location of the data in the snapshot volume. If there is data in the snapshot volume, the data of the snapshot volume is directly returned to the host; if there is no data in the snapshot volume, step S93 is performed. That is, the storage location of the data in the snapshot volume is determined from the snapshot mapping table. If the data has a storage location in the snapshot volume, the data of the snapshot volume is directly returned to the host. If the data does not have a storage location in the snapshot volume, Then step S93 is performed.
  • Step 93 Check the modified record bitmap to determine the location of the data in the resource space and the source volume. If the value of the modified record bitmap is 0, it indicates that no pre-write copy has been made, and the corresponding data is read from the source volume; The record bitmap value is 1, and the corresponding data is read from the resource volume.
  • the resource volume block number is modified when the snapshot is written, as described in the previous procedure.
  • FIG. 10 is a flowchart of deleting a snapshot provided by an embodiment of the present invention. As shown in FIG. 10, when a user does not need a snapshot, the created snapshot may be deleted, and the following steps are included:
  • Step 101 Delete a logical relationship between the source volume and the resource volume.
  • Step 102 Delete a snapshot volume.
  • Step 103 Reclaim resource space.
  • the invention redesigns the structure of the snapshot mapping table, and increases the global index index of the snapshot creation and resource volume block data modification. For example, when S0 is created, the index is 0, and the index of the chunk 0 modified by S0 is 1.
  • Table 1 Relationship between snapshot creation and resource volume block data modification and index.
  • Table 1 Relationship between snapshot creation and resource volume block data modification and index
  • S1 when S1 is deleted, when the two mappings of S1 are deleted, it is necessary to scan in S1 but not in all other snapshot mapping tables.
  • Existing entries for example, look for chunk 0, chunk 2 entries in the S0 and S2 mapping tables.
  • the invention passes Index entries are added to the snapshot mapping table. You can compare the size of the index when deleting. For example, delete S1 and compare the index value. The index value 6 for the entry chunk 0 is greater than the creation index 5 of S2. Therefore, you need to traverse S0 and S2 for chunk 0.
  • the source volume chunk 2 entry since the index value 4 is larger than the index value 0 of S0 and smaller than the creation index value 5 of S2, it means that S2 does not share the data of the resource volume chunk 1, so the source volume chunk 2 entry only checks S0, does not check. S2, which saves the request to read the S2 mapping entry, and saves system resources, including CPU, cache, and scheduling, when the mapping entry cannot be fully memory.
  • the present invention has the following technical effects:
  • the invention reduces the impact of the snapshot process on the host write IO, and improves the efficiency of the snapshot processing system and the resource volume recovery.
  • the disclosed technical contents may be implemented in other manners.
  • the device embodiments described above are only schematic.
  • the division of the unit may be a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a computer device which may be a personal computer, server or network device, etc.
  • the foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .
  • the snapshot processing method and apparatus provided by the embodiments of the present invention have the following beneficial effects: reducing the impact of the snapshot process on the host write IO, and improving the efficiency of the snapshot processing system and resource volume recovery.

Abstract

The present invention relates to the technical field of disk arrays. Disclosed are a snapshot processing method and apparatus. The method comprises the following steps: creating snapshot volumes comprising a resource volume, a modification record bitmap, a modification address mapping table and a snapshot mapping table; and during a process of writing a source volume, writing corresponding data in the source volume into the resource volume by using the modification record bitmap, the modification address mapping table and the snapshot mapping table in the snapshot volumes, wherein the modification record bitmap is used for recording modification condition of data blocks in the source volume after the snapshot volumes are established, the modification address mapping table is used for recording an address of a modified region in the source volume and an address in which old data in the region is stored in the resource volume, and the snapshot mapping table is used for recording an address of the source volume and an address in which each data block of the snapshot is stored at the time point, and is used for recording data generated when the snapshot volumes are written. The present invention reduces the influence of a snapshot flow on write IO of a host machine, and improves the efficiency of system and resource volume recovery in snapshot processing.

Description

一种快照处理方法及装置Snapshot processing method and device 技术领域Technical field
本发明涉及磁盘阵列技术,特别涉及一种快照处理方法及装置。The present invention relates to a disk array technology, and in particular, to a snapshot processing method and apparatus.
背景技术Background technique
在快照系统中,将进行读写的逻辑卷称为源卷,实现快照增加的辅助逻辑卷称为资源卷,差异复制是建立快照中方便快捷的方式,差异复制包括两种方法,写前拷贝(Copy-on-Write)和重定向写(Redirect-on-Write)。写前拷贝方法是每次接收到写操作时,先将源卷中被覆盖的数据拷贝到资源卷,然后将数据写到源卷;重定向写方法是每次接收写操作时,直接将数据写到资源卷中。在该快照系统,处理数据的单位一个为条带大小的数据,称为一个数据块chunk。In the snapshot system, the logical volume to be read and written is called the source volume. The auxiliary logical volume that is added to the snapshot is called the resource volume. Differential replication is a convenient and quick way to create snapshots. Differential replication includes two methods. (Copy-on-Write) and Redirect-on-Write. The pre-write copy method is to copy the overwritten data in the source volume to the resource volume and then write the data to the source volume each time a write operation is received; the redirect write method is to directly input the data each time a write operation is received. Write to the resource volume. In the snapshot system, the unit of processing data is stripe-sized data, called a chunk of data chunk.
在使用写前拷贝方法建立的快照中读取快照数据时,如果数据块未被修改,直接从源卷中读取,否则从快照卷中读取;在使用重定向写建立的快照中读取源数据时,如果数据未被修改时,直接从源卷中读取,否则从快照卷中读取。每读取一个数据块就需要判断一次该数据块是否被修改,影响到读取快照卷数据的性能。使用这两种方法建立快照时,写数据操作和读取快照卷中数据的方法相似,下面以写前拷贝方法为例进行说明。When reading snapshot data in a snapshot created using the pre-write copy method, if the data block is not modified, it is read directly from the source volume, otherwise it is read from the snapshot volume; in a snapshot created using redirected writes When the source data is read, it is read directly from the source volume if the data has not been modified, otherwise it is read from the snapshot volume. Each time a block of data is read, it is necessary to judge whether the block is modified once, which affects the performance of reading the snapshot volume data. When using these two methods to create a snapshot, the write data operation is similar to the method of reading the data in the snapshot volume. The following describes the pre-write copy method as an example.
创建快照及生成快照如图1所示,创建快照及生成快照之后的动作流程如下:Create a snapshot and generate a snapshot. As shown in Figure 1, the process of creating a snapshot and generating a snapshot is as follows:
T0时刻,有源卷V1,资源卷R1,创建快照S0,产生S0的地址映射表F0,这份表在T0时刻为空。At time T0, the active volume V1, the resource volume R1, creates a snapshot S0, and generates an address mapping table F0 of S0, which is empty at time T0.
T1时刻,有写IO将源卷chunk 0对应的LBA(Logical Block Address,逻辑区块地址)地址上的A0更新为A1,系统首先检查所有已经存在的地址映射表中没有针对源卷该LBA地址的映射条目,发现F0没有,所以写前拷贝A0到资源卷R1,然后在F0更新映射项(0,0),意思是源卷T0时刻的chunk 0的数据目前保存在资源卷的chunk 0位置。最后将A1正常写入源卷chunk 0。At time T1, the write IO updates A0 on the LBA (Logical Block Address) address corresponding to the source volume chunk 0 to A1. The system first checks that all existing address mapping tables do not have the LBA address for the source volume. Map entry, find that F0 does not, so copy A0 to resource volume R1 before writing, and then update the mapping item (0,0) in F0, meaning that the data of chunk 0 at the time of source volume T0 is currently saved in the chunk 0 position of the resource volume. . Finally, A1 is normally written to the source volume chunk 0.
T2时刻创建快照S2,创建空地址映射表F2。At time T2, snapshot S2 is created, and an empty address mapping table F2 is created.
T3时刻有写IO将源卷chunk 0地址上的A1更新为A3,系统首先检查所有已经存 在的地址映射表中没有针对源卷chunk 0地址的映射条目,发现F2没有,所以写前拷贝A1到资源卷R1,在F2写新条目(0,1),意思是源卷T2时刻的chunk 0的数据目前保存在资源卷的chunk 1位置。最后将A3写入源卷。At time T3, there is a write IO to update A1 on the source volume chunk 0 address to A3. The system first checks all existing ones. There is no mapping entry for the source volume chunk 0 address in the address mapping table. It is found that F2 is not, so copy A1 to resource volume R1 before writing and a new entry (0, 1) in F2, meaning chunk at source T2 time. The data of 0 is currently stored in the chunk 1 location of the resource volume. Finally, write A3 to the source volume.
T4时刻,有写IO将源卷chunk 3地址上的D0更新为D4,系统首先检查所有已经存在的地址映射表中没有针对源卷chunk 3地址的映射条目,发现F0和F2都没有,所以写前拷贝D0到资源卷R1,然后在F0和F2中同时更新映射项(3,2),将D4写入源卷。At time T4, there is a write IO to update D0 on the source volume chunk 3 address to D4. The system first checks that there are no mapping entries for the source volume chunk 3 address in all existing address mapping tables, and finds that neither F0 nor F2 is written, so write The D0 is copied to the resource volume R1 before, and then the mapping entries (3, 2) are simultaneously updated in F0 and F2, and D4 is written to the source volume.
T5时刻,有写IO将源卷chunk 3地址上的D4更新为D5,系统首先检查所有已经存在的地址映射表中没有针对源卷chunk 3地址的映射条目,发现F0和F2都有,所以不进行写前拷贝,直接将D5写入源卷。At time T5, there is a write IO to update D4 on the source volume chunk 3 address to D5. The system first checks that there are no mapping entries for the source volume chunk 3 address in all existing address mapping tables, and finds that both F0 and F2 have, so no Make a pre-write copy and write D5 directly to the source volume.
综上所述,传统做法当主机写IO时,判断是否需要写前拷贝,需要首先检查所有已经存在的地址映射表,这个要求读取所有快照的元数据,相当于给主机写IO增加了一次读延迟。当新写入的IO在所有快照中都没有映射,需要修改所有的快照映射表,先读取所有快照映射表再写所有映射表,给主机IO增加额外的时延;In summary, the traditional practice when the host writes IO, to determine whether a pre-write copy is required, you need to first check all existing address mapping tables. This requires reading the metadata of all snapshots, which is equivalent to adding IO to the host. Read delay. When the newly written IO is not mapped in all the snapshots, all the snapshot mapping tables need to be modified. First, all the snapshot mapping tables are read and then all the mapping tables are written, and an additional delay is added to the host IO.
删除快照的动作流程。The action flow for deleting a snapshot.
删除快照S0,系统接受到请求之后,首先扫描对应S0快照的F0地址映射表,并扫描其它所有快照的映射表,找出只有F0存在而其它快照映射表中都不存在的条目,在资源卷位图上标记为空闲,当F0所有条目都扫描并处理完成之后,删除整个F0。Delete the snapshot S0. After receiving the request, the system first scans the F0 address mapping table corresponding to the S0 snapshot, and scans the mapping table of all other snapshots to find out that only the F0 exists and the other snapshot mapping table does not exist in the resource volume. The bitmap is marked as free, and after all entries of F0 are scanned and processed, the entire F0 is deleted.
现有方法在删除快照时,需要扫描被删除快照和其它所有快照的映射表,找出被删除快照独占资源卷的块,即只有被删除快照映射了资源卷的块,其它所有快照没有占用该块,满足这个条件的块才能被回收,这个过程需要读取所有快照的映射表,增加了删除流程和资源卷回收的时延。In the existing method, when you delete a snapshot, you need to scan the deleted snapshot and all other snapshot mapping tables to find out the block of the deleted snapshot exclusive resource volume. That is, only the deleted snapshot maps the resource volume, and all other snapshots do not occupy the snapshot. Block, the block that meets this condition can be recycled. This process needs to read the mapping table of all snapshots, which increases the delay of the deletion process and resource volume recovery.
现有方法删除某个快照,遍历快照位图,对于为1的位,要设置该块的资源卷位图为0(表示该块资源回收)。必须遍历现有所有快照位图,有其它快照位图有效则不能回收,会产生所有快照位映射的读请求,影响系统性能并占用缓存空间。The existing method deletes a snapshot and traverses the snapshot bitmap. For a bit of 1, the resource volume bitmap of the block is set to 0 (indicating that the block resource is recycled). All existing snapshot bitmaps must be traversed. If other snapshot bitmaps are valid, they cannot be reclaimed. All read bitmap mapping read requests will be generated, which will affect system performance and occupy cache space.
上述方法有几处严重影响快照效率和系统性能,一是主机写IO时,判断是否需要写前拷贝,需要首先检查所有已经存在的地址映射表,这个要求读取所有快照的元数据,相当于给主机写IO增加了一次读延迟。二是删除快照时,需要扫描被删除快照和其它所有快照的映射表,增加了删除流程和资源卷回收的时延。三是当主机新写入的 IO在所有快照中映射表中都没有条目时,需要修改所有快照的映射表,首先读取所有快照映射表并更新之后再写,给主机IO增加额外的时延。There are several methods in the above method that seriously affect the snapshot efficiency and system performance. First, when the host writes IO, it determines whether a pre-write copy is needed. It is necessary to first check all existing address mapping tables. This requires reading the metadata of all snapshots, which is equivalent to Writing a IO to the host adds a read latency. The second is to delete the mapping table of the deleted snapshot and all other snapshots when deleting the snapshot, which increases the delay of the deletion process and resource volume recovery. The third is when the host is newly written. When there is no entry in the mapping table in all snapshots, the IO needs to modify the mapping table of all snapshots. First, read all the snapshot mapping tables and update them before writing them, adding additional delay to the host IO.
发明内容Summary of the invention
本发明实施例提供了一种快照处理方法及装置,以至少解决相关技术中严重影响快照效率和系统性能的问题。The embodiment of the invention provides a snapshot processing method and device to solve at least the problems in the related art that seriously affect the snapshot efficiency and system performance.
根据本发明实施例的一个方面,提供了一种快照处理方法,包括以下步骤:According to an aspect of an embodiment of the present invention, a snapshot processing method is provided, including the following steps:
创建包含资源卷、修改记录位图、修改地址映射表和快照映射表的快照卷;Create a snapshot volume that contains a resource volume, a modified record bitmap, a modified address map, and a snapshot map;
在写源卷期间,利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中;During the writing of the source volume, the corresponding data in the source volume is written into the resource volume by using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume;
其中,所述修改记录位图用于记录所述快照卷建立后源卷中各个数据块的修改情况;所述修改地址映射表用于记录源卷中被修改区域的地址和该区域旧数据被保存在资源卷中的地址;所述快照映射表用于记录源卷地址和该时间点快照每个数据块存放的地址,以及记录写快照卷时产生的数据。The modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established; the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume; the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
优选地,还包括:Preferably, the method further comprises:
在读快照期间,利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据。During the read snapshot, the corresponding data is read from the resource volume and the source volume using the snapshot mapping table and the modified record bitmap in the snapshot volume.
优选地,还包括:Preferably, the method further comprises:
在删除快照期间,利用所述快照卷中的快照映射表,删除所述修改地址映射表。During the deletion of the snapshot, the modified address mapping table is deleted by using the snapshot mapping table in the snapshot volume.
优选地,所述的利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中的步骤包括:Preferably, the step of writing the corresponding data in the source volume to the resource volume by using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume includes:
根据修改记录位图关于源卷中待覆盖数据块已经被修改的记录,将新数据写入源卷待覆盖数据块对应的区域中,并在所述修改地址映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系,在所述快照映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系以及资源卷数据修改的全局索引;And according to the record of the modified record bitmap, the data to be overwritten in the source volume has been modified, the new data is written into the area corresponding to the data volume to be overwritten by the source volume, and the area address and the area address are recorded in the modified address mapping table. The old data of the area is saved in a mapping relationship of addresses in the resource volume, and the mapping relationship between the area address and the old data of the area is stored in the resource volume and the global index of the resource volume data modification is recorded in the snapshot mapping table. ;
当所述修改地址映射表中存在源卷中待覆盖数据块地址的映射条目时,根据修改记录位图关于源卷中待覆盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并在所述修改记录位图中将所述待覆盖数据块记录为已经被修改。 When there is a mapping entry of the data block address to be overwritten in the source volume in the modified address mapping table, according to the modified recording bitmap, the record in the data volume to be overwritten in the source volume is not modified, and the data in the to-be-covered data block is The old data is copied to the corresponding location of the resource volume, and the to-be-covered data block is recorded as having been modified in the modified record bitmap.
优选地,所述的利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中的步骤还包括:Preferably, the step of using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume to write corresponding data in the source volume to the resource volume further includes:
当所述修改地址映射表中不存在源卷中待覆盖数据块地址的映射条目时,根据修改记录位图关于源卷中待覆盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并且用所述旧数据拷贝到资源卷相应位置的记录替代所述修改记录位图中所述待覆盖数据块的记录。When there is no mapping entry of the data block address to be overwritten in the source volume in the modified address mapping table, according to the modified recording bitmap, the record of the to-be-covered data block in the source volume is not modified, and the data block to be overwritten is The old data is copied to the corresponding location of the resource volume, and the record of the data block to be overwritten in the modified record bitmap is replaced with the record of the old data copied to the corresponding position of the resource volume.
优选地,所述的利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据的步骤包括:Preferably, the step of reading the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume comprises:
根据所述快照映射表,确定所读取的数据在源卷中地址和该源卷旧数据被保存在资源卷中地址;Determining, according to the snapshot mapping table, that the address of the read data in the source volume and the old data of the source volume are saved in an address in the resource volume;
根据所确定的在源卷中地址和该源卷旧数据被保存在资源卷中地址,从所述资源卷和源卷中读取相应数据。The corresponding data is read from the resource volume and the source volume according to the determined address in the source volume and the source volume old data is saved in the resource volume address.
优选地,所述的利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据的步骤还包括:Preferably, the step of reading the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume further includes:
根据所述修改记录位图的标记,确定所读取的数据是否做过写前拷贝;Determining whether the read data has been pre-write copy according to the mark of the modified record bitmap;
当确定所读取的数据做过写前拷贝,则从所述资源卷中读取相应数据;When it is determined that the read data has been pre-write copy, the corresponding data is read from the resource volume;
当确定所读取的数据未做过写前拷贝,则从所述源卷中读取相应数据。When it is determined that the read data has not been subjected to a pre-write copy, the corresponding data is read from the source volume.
优选地,所述的利用所述快照卷中的快照映射表,删除所述修改地址映射表的步骤包括:Preferably, the step of deleting the modified address mapping table by using the snapshot mapping table in the snapshot volume includes:
利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系;Deleting the mapping relationship between the source volume and the resource volume by using the mapping relationship between the source volume address and the source volume old data recorded in the snapshot mapping table in the resource volume;
根据所删除的源卷与资源卷的映射关系,删除快照卷,并回收所删除快照卷的资源空间。The snapshot volume is deleted according to the mapping relationship between the deleted source volume and the resource volume, and the resource space of the deleted snapshot volume is reclaimed.
优选地,所述的利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系的步骤包括:Preferably, the step of using the source volume address and the source volume old data recorded in the snapshot mapping table to be saved in an address in the resource volume, and deleting the mapping relationship between the source volume and the resource volume includes:
利用所述快照映射表中记录的所述资源卷数据修改的全局索引,判断是否需要遍历其它所述修改地址映射表;Determining whether it is necessary to traverse the other modified address mapping table by using the global index modified by the resource volume data recorded in the snapshot mapping table;
当判断需要遍历其它所述修改地址映射表时,通过扫描其它所述修改地址映射表中存在的条目,在所述资源卷中标记与所述快照映射表中条目不同的条目,并利用所 述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系;When it is determined that the other modified address mapping table needs to be traversed, by scanning an entry existing in the other modified address mapping table, an entry different from the entry in the snapshot mapping table is marked in the resource volume, and the The source volume address and the source volume old data recorded in the snapshot mapping table are saved in the mapping relationship of the addresses in the resource volume, and the mapping relationship between the source volume and the resource volume is deleted;
当判断不需要遍历其它所述修改地址映射表时,利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系。When it is determined that it is not necessary to traverse the other modified address mapping table, the source volume address and the source volume old data recorded in the snapshot mapping table are saved in a mapping relationship of addresses in the resource volume, and the source volume and the resource volume are deleted. Mapping relationship.
根据本发明实施例的另一方面,提供了一种快照处理装置,包括:According to another aspect of the embodiments of the present invention, a snapshot processing apparatus is provided, including:
创建快照卷模块,设置为创建包含资源卷、修改记录位图、修改地址映射表和快照映射表的快照卷;Create a snapshot volume module, set to create a snapshot volume that contains the resource volume, modify the record bitmap, modify the address mapping table, and the snapshot mapping table;
写快照模块,设置为在写快照期间,利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中;Writing a snapshot module, configured to write a corresponding data in the source volume to the resource volume by using a modified record bitmap, a modified address mapping table, and a snapshot mapping table in the snapshot volume during a write snapshot;
其中,所述修改记录位图用于记录所述快照卷建立后源卷中各个数据块的修改情况;所述修改地址映射表用于记录源卷中被修改区域的地址和该区域旧数据被保存在资源卷中的地址;所述快照映射表用于记录源卷地址和该时间点快照每个数据块存放的地址,以及记录写快照卷时产生的数据。The modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established; the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume; the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
与现有技术相比较,本发明的有益效果在于:Compared with the prior art, the beneficial effects of the present invention are:
本发明提高了快照处理的系统,减小了快照流程对主机写IO的影响,并提高了资源卷回收的效率。The invention improves the system of snapshot processing, reduces the impact of the snapshot process on the host write IO, and improves the efficiency of resource volume recovery.
附图说明DRAWINGS
图1是现有技术提供的创建快照及生成快照的示意图;FIG. 1 is a schematic diagram of creating a snapshot and generating a snapshot provided by the prior art;
图2是本发明实施例提供的一种快照处理方法流程图;2 is a flowchart of a snapshot processing method according to an embodiment of the present invention;
图3是本发明实施例提供的一种快照处理装置示意图;3 is a schematic diagram of a snapshot processing apparatus according to an embodiment of the present invention;
图4是本发明实施例提供的快照时刻点快照数据块的组成示意图;4 is a schematic diagram of a composition of a snapshot time point snapshot data block according to an embodiment of the present invention;
图5是本发明实施例提供的快照卷逻辑结构示意图;FIG. 5 is a schematic diagram of a logical structure of a snapshot volume according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的写快照流程图;FIG. 6 is a flowchart of a write snapshot provided by an embodiment of the present invention;
图7是本发明实施例提供的写快照的第一示意图;FIG. 7 is a first schematic diagram of a write snapshot provided by an embodiment of the present invention; FIG.
图8是本发明实施例提供的写快照的第二示意图;FIG. 8 is a second schematic diagram of a write snapshot provided by an embodiment of the present invention; FIG.
图9是本发明实施例提供的读快照流程图;FIG. 9 is a flowchart of a read snapshot provided by an embodiment of the present invention;
图10是本发明实施例提供的删除快照流程图; FIG. 10 is a flowchart of deleting a snapshot provided by an embodiment of the present invention;
图11是本发明实施例提供的删除快照的示意图。FIG. 11 is a schematic diagram of deleting a snapshot provided by an embodiment of the present invention.
具体实施方式detailed description
以下结合附图对本发明的优选实施例进行详细说明,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
图2显示了本发明实施例提供的一种快照处理方法流程图,如图2所示,包括以下步骤:FIG. 2 is a flowchart of a snapshot processing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
步骤S201:创建包含资源卷、修改记录位图、修改地址映射表和快照映射表的快照卷;Step S201: Create a snapshot volume that includes a resource volume, a modified record bitmap, a modified address mapping table, and a snapshot mapping table.
步骤S202:在写源卷期间,利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中;Step S202: During the writing of the source volume, using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume, the corresponding data in the source volume is written into the resource volume;
其中,所述修改记录位图用于记录所述快照卷建立后源卷中各个数据块的修改情况;所述修改地址映射表用于记录源卷中被修改区域的地址和该区域旧数据被保存在资源卷中的地址;所述快照映射表用于记录源卷地址和该时间点快照每个数据块存放的地址,以及记录写快照卷时产生的数据。The modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established; the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume; the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
本发明还包括:在读快照期间,利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据。The present invention also includes reading corresponding data from the resource volume and the source volume by using a snapshot mapping table and a modified recording bitmap in the snapshot volume during a read snapshot.
本发明还包括:在删除快照期间,利用所述快照卷中的快照映射表,删除所述修改地址映射表。The present invention also includes deleting the modified address mapping table by using a snapshot mapping table in the snapshot volume during deletion of the snapshot.
具体地说,所述的利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中的步骤包括:根据修改记录位图关于源卷中待覆盖数据块已经被修改的记录,将新数据写入源卷待覆盖数据块对应的区域中,并在所述修改地址映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系,在所述快照映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系以及资源卷数据修改的全局索引;当所述修改地址映射表中存在源卷中待覆盖数据块地址的映射条目时,根据修改记录位图关于源卷中待覆盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并在所述修改记录位图中将所述待覆盖数据块记录为已经被修改。当所述修改地址映射表中不存在源卷中待覆盖数据块地址的映射条目时,根据修改记录位图关于源卷中待覆 盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并且用所述旧数据拷贝到资源卷相应位置的记录替代所述修改记录位图中所述待覆盖数据块的记录。Specifically, the step of writing the corresponding data in the source volume to the resource volume by using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume includes: The bitmap is related to the record of the data volume to be overwritten in the source volume, and the new data is written in the area corresponding to the data volume to be overwritten by the source volume, and the area address and the old area are recorded in the modified address mapping table. Data is stored in a mapping relationship of addresses in the resource volume, and the mapping relationship between the area address and the old data of the area in the resource volume and the global index of the resource volume data modification are recorded in the snapshot mapping table; When the mapping entry of the data block address to be overwritten in the source volume exists in the modified address mapping table, according to the modified recording bitmap, the old data in the data block to be overwritten is recorded on the unmodified data block in the source volume. Copying to the corresponding location of the resource volume, and recording the to-be-covered data block as having been modified in the modified record bitmap. When the mapping entry of the data block address to be overwritten in the source volume does not exist in the modified address mapping table, according to the modified record bitmap, the source volume is to be overwritten. Stamping the unmodified record of the data block, copying the old data in the data block to be overwritten into the corresponding position of the resource volume, and replacing the record in the modified record bitmap with the record of the old data copied to the corresponding position of the resource volume The record of the data block to be overwritten.
具体地说,所述的利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据的步骤包括:根据所述快照映射表,确定所读取的数据在源卷中地址和该源卷旧数据被保存在资源卷中地址;根据所确定的在源卷中地址和该源卷旧数据被保存在资源卷中地址,从所述资源卷和源卷中读取相应数据。根据所述修改记录位图的标记,确定所读取的数据是否做过写前拷贝;当确定所读取的数据做过写前拷贝,则从所述资源卷中读取相应数据;当确定所读取的数据未做过写前拷贝,则从所述源卷中读取相应数据。Specifically, the step of reading corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume includes: determining, according to the snapshot mapping table, that the read is performed. The data in the source volume and the source volume old data are saved in the resource volume address; according to the determined address in the source volume and the source volume old data is saved in the resource volume address from the resource volume The corresponding data is read from the source volume. Determining whether the read data has been pre-write copy according to the mark of the modified record bitmap; when determining that the read data has been pre-write copy, reading corresponding data from the resource volume; If the read data has not been pre-write copied, the corresponding data is read from the source volume.
具体地说,所述的利用所述快照卷中的快照映射表,删除所述修改地址映射表的步骤包括:利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系;根据所删除的源卷与资源卷的映射关系,删除快照卷,并回收所删除快照卷的资源空间。其中,所述的利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系的步骤包括:利用所述快照映射表中记录的所述资源卷数据修改的全局索引,判断是否需要遍历其它所述修改地址映射表;当判断需要遍历其它所述修改地址映射表时,通过扫描其它所述修改地址映射表中存在的条目,在所述资源卷中标记与所述快照映射表中条目不同的条目,并利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系;当判断不需要遍历其它所述修改地址映射表时,利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系。Specifically, the step of deleting the modified address mapping table by using the snapshot mapping table in the snapshot volume includes: using the source volume address and the source volume old data recorded in the snapshot mapping table to be saved The mapping relationship between the source volume and the resource volume is deleted. The snapshot volume is deleted according to the mapping relationship between the deleted source volume and the resource volume, and the resource space of the deleted snapshot volume is reclaimed. The step of deleting the mapping relationship between the source volume and the resource volume by using the source volume address and the source volume old data recorded in the snapshot mapping table is as follows: The global index of the resource volume data modification recorded in the snapshot mapping table is determined whether it is necessary to traverse the other modified address mapping table; when it is determined that the other modified address mapping table needs to be traversed, by scanning other modified address mappings An entry existing in the table, marking an entry in the resource volume different from the entry in the snapshot mapping table, and using the source volume address and the source volume old data recorded in the snapshot mapping table to be saved in the resource volume The mapping relationship between the source volume and the resource volume is deleted; when it is determined that the other modified address mapping table does not need to be traversed, the source volume address and the source volume old data recorded in the snapshot mapping table are used The mapping between addresses in the resource volume is saved, and the mapping relationship between the source volume and the resource volume is deleted.
图3显示了本发明实施例提供的一种快照处理装置示意图,如图3所示,包括:创建快照卷模块301和写快照模块302。其中,所述创建快照卷模块301,设置为创建包含资源卷、修改记录位图、修改地址映射表和快照映射表的快照卷;所述写快照模块302,设置为在写快照期间,利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中;其中,所述修改记录位图用于记录所述快照卷建立后源卷中各个数据块的修改情况;所述修改地址映射表用于 记录源卷中被修改区域的地址和该区域旧数据被保存在资源卷中的地址;所述快照映射表用于记录源卷地址和该时间点快照每个数据块存放的地址,以及记录写快照卷时产生的数据。FIG. 3 is a schematic diagram of a snapshot processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the method includes: creating a snapshot volume module 301 and a write snapshot module 302. The snapshot volume module 301 is configured to create a snapshot volume that includes a resource volume, a modified record bitmap, a modified address mapping table, and a snapshot mapping table. The write snapshot module 302 is configured to use the snapshot during the write snapshot. The modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume, and the corresponding data in the source volume is written into the resource volume; wherein the modified record bitmap is used to record the snapshot volume Modifying the modification of each data block in the source volume; the modified address mapping table is used Recording the address of the modified area in the source volume and the address in the resource volume where the old data of the area is saved; the snapshot mapping table is used to record the source volume address and the address of each data block of the time point snapshot, and the record write The data that is produced when the snapshot is taken.
本发明还包括读快照模块,设置为在读快照期间,利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据;删除快照模块,设置为在删除快照期间,利用所述快照卷中的快照映射表,删除所述修改地址映射表。The present invention also includes a read snapshot module configured to read the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified record bitmap in the snapshot volume during the read snapshot; deleting the snapshot module, setting the During the deletion of the snapshot, the modified address mapping table is deleted by using the snapshot mapping table in the snapshot volume.
进一步地,所述的写快照模块302包括:第一写快照单元,设置为根据修改记录位图关于源卷中待覆盖数据块已经被修改的记录,将新数据写入源卷待覆盖数据块对应的区域中,并在所述修改地址映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系,在所述快照映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系以及资源卷数据修改的全局索引;第二写快照单元,设置为当所述修改地址映射表中存在源卷中待覆盖数据块地址的映射条目时,根据修改记录位图关于源卷中待覆盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并在所述修改记录位图中将所述待覆盖数据块记录为已经被修改。第三写快照单元,设置为当所述修改地址映射表中不存在源卷中待覆盖数据块地址的映射条目时,根据修改记录位图关于源卷中待覆盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并且用所述旧数据拷贝到资源卷相应位置的记录替代所述修改记录位图中所述待覆盖数据块的记录。Further, the write snapshot module 302 includes: a first write snapshot unit, configured to write new data to the source volume to be overwritten according to the modified record bitmap with respect to the record that the data block to be overwritten in the source volume has been modified. Recording, in the corresponding area, the mapping relationship between the area address and the old data of the area in the resource volume in the modified address mapping table, and recording the area address and the area in the snapshot mapping table The old data is saved in the mapping relationship of the addresses in the resource volume and the global index of the resource volume data modification; the second write snapshot unit is set to be when there is a mapping entry of the data block address to be overwritten in the source volume in the modified address mapping table. And copying, according to the modified record bitmap, the old data in the data block to be overwritten into the corresponding position of the resource volume, and in the modified record bitmap, The coverage data block record is reported as having been modified. a third write snapshot unit, configured to: when the map entry of the data block address to be overwritten in the source volume does not exist in the modified address mapping table, according to the modified record bitmap, the record of the data block to be overwritten in the source volume is not modified, Copying the old data in the data block to be overwritten into a corresponding position of the resource volume, and replacing the record of the data block to be covered in the modified record bitmap with the record in which the old data is copied to the corresponding position of the resource volume.
图4显示了本发明实施例提供的快照时刻点快照数据块的组成示意图,如图4所示,快照中每个数据块内容为快照创建时间点后第一次修改保存的数据或元数据,当主机读快照卷的数据(S,1),(S,2),(S,3),(S,4)时,会查询快照映射表,发现数据块(S,2)已经做了写前拷贝,数据保存在资源卷(R,1)的位置,其它数据块没有做写前拷贝,数据还保存在源卷中。所以会变成对数据块(B,1),(R,1),(B,3),(B,4)的读请求。FIG. 4 is a schematic diagram showing the composition of a snapshot time point snapshot data block according to an embodiment of the present invention. As shown in FIG. 4, each data block content in the snapshot is the first modified data or metadata after the snapshot creation time point. When the host reads the data (S, 1), (S, 2), (S, 3), (S, 4) of the snapshot volume, it will query the snapshot mapping table and find that the data block (S, 2) has been written. Pre-copy, the data is saved in the location of the resource volume (R, 1), other data blocks are not pre-write, and the data is saved in the source volume. Therefore, it becomes a read request for the data blocks (B, 1), (R, 1), (B, 3), (B, 4).
图5显示了本发明实施例提供的快照卷逻辑结构示意图,如图5所示,所述快照卷逻辑结构包括数据区51、修改记录位图52、修改地址映射表53以及快照映射表54。具体地说,所述数据区51,用于存放快照中被修改区域的旧数据。所述修改记录位图52,用于记录该时刻开始建立快照后源卷中各个数据块是否被修改。初始化为0,如果数据被修改,新数据可以直接写到源卷;如果数据未被修改,需要将旧数据拷贝到 资源卷,再将新数据写入到源卷中,并修改该数据块对应的位图。所述修改地址映射表53,用于保存源卷中被修改区域的地址和该区域旧数据被保存在资源卷中的地址。所述快照映射表54,用于保存源卷地址和该时间点快照每个数据块被存放的地址,读取快照时,根据快照数据块存放地址读取数据块可以直接得到快照内容。FIG. 5 is a schematic diagram showing the logical structure of a snapshot volume according to an embodiment of the present invention. As shown in FIG. 5, the snapshot volume logical structure includes a data area 51, a modified record bitmap 52, a modified address mapping table 53, and a snapshot mapping table 54. Specifically, the data area 51 is used to store old data of the modified area in the snapshot. The modified record bitmap 52 is used to record whether each data block in the source volume is modified after the snapshot is started at the moment. Initialize to 0, if the data is modified, the new data can be written directly to the source volume; if the data has not been modified, the old data needs to be copied to The resource volume is written to the source volume and the bitmap corresponding to the data block is modified. The modified address mapping table 53 is configured to save an address of the modified area in the source volume and an address in which the old data of the area is saved in the resource volume. The snapshot mapping table 54 is configured to save the source volume address and the address where each data block of the time point snapshot is stored. When the snapshot is read, the snapshot content can be directly obtained by reading the data block according to the snapshot data block storage address.
创建快照后,用户读写数据会受到快照的影响,用户读写数据包括向源卷写数据、读取源卷旧数据以及读取快照数据。其中读取源卷时,可以直接,不受快照影响。向源卷写数据和读取快照受到快照影响。After the snapshot is created, the user reads and writes data, which is affected by the snapshot. The user reads and writes data, including writing data to the source volume, reading the old data of the source volume, and reading the snapshot data. When reading the source volume, it can be directly and not affected by the snapshot. Writing data to the source volume and reading the snapshot are affected by the snapshot.
本发明提供了一种快照处理方法及装置,包括源卷和快照卷,具体地说,包括源卷和快照卷执行的以下步骤:The present invention provides a snapshot processing method and apparatus, including a source volume and a snapshot volume, specifically, the following steps performed by a source volume and a snapshot volume:
步骤一:建立快照,为一个源卷创建快照;Step 1: Create a snapshot and create a snapshot for a source volume.
步骤二:写快照,在快照过程中向源卷写数据;Step 2: Write a snapshot and write data to the source volume during the snapshot process.
步骤三:读快照,在快照建立完成后从快照卷中读取快照数据;Step 3: Read the snapshot and read the snapshot data from the snapshot volume after the snapshot is established.
步骤四:删除快照,回收快照所占的存储资源并维护源卷为正常数据状态。Step 4: Delete the snapshot, reclaim the storage resources occupied by the snapshot, and maintain the source volume as the normal data state.
其中,所述快照卷包括数据区,修改记录位图,修改地址映射表和快照映射表。所述数据区用于存放快照中被修改区域的旧数据;修改记录位图用于记录该时刻开始建立快照后源卷中各个数据块是否被修改;修改地址映射表用于保存源卷中被修改区域的地址和该区域旧数据被保存在资源卷中地址;快照映射表用于保存源卷地址和该时间点快照每个数据块存放的地址。以及记录写快照卷时产生的数据。The snapshot volume includes a data area, a modified record bitmap, and an address mapping table and a snapshot mapping table. The data area is used to store the old data of the modified area in the snapshot; the modified record bitmap is used to record whether each data block in the source volume is modified after the snapshot is started at the moment; and the modified address mapping table is used to save the source volume. The address of the modified area and the old data of the area are saved in the address of the resource volume; the snapshot mapping table is used to save the source volume address and the address of each data block of the time point snapshot. And record the data generated when the snapshot volume is written.
下面具体说明建立快照、写快照、读快照以及删除快照的过程:The following describes the process of creating a snapshot, writing a snapshot, reading a snapshot, and deleting a snapshot:
所述建立快照包括以下步骤:The establishing a snapshot includes the following steps:
步骤一:为建立快照分配一个新的资源卷,并分配数据区、修改记录位图以及修改地址映射表;Step 1: Assign a new resource volume to the snapshot, allocate the data area, modify the record bitmap, and modify the address mapping table.
步骤二:初始化修改记录位图,将位图中所有位标记为0;Step 2: Initialize the modified record bitmap, and mark all the bits in the bitmap as 0;
步骤三:初始化修改地址映射表,建立一个空表。Step 3: Initialize the modified address mapping table to create an empty table.
图6显示了本发明实施例提供的写快照流程图,如图6所示,包括以下步骤:FIG. 6 is a flowchart of a write snapshot provided by an embodiment of the present invention. As shown in FIG. 6, the method includes the following steps:
步骤61、接收到的IO分成数据块;Step 61: The received IO is divided into data blocks;
将接收到的写IO的数据分成可处理的块,也就是说,根据处理的最小单元将数据分块。The received data of the write IO is divided into manageable blocks, that is, the data is divided according to the smallest unit processed.
步骤62、判断该部分数据是否被修改; Step 62: Determine whether the part of the data is modified;
取需要处理的一个数据块,查看修改记录位图中标记该数据块的值,判断源卷数据块是否要做写前拷贝,如果源卷数据已经被修改,则进入步骤66;如果源卷数据未被修改,则进入步骤63。也就是说,在修改记录位图中查看源卷中该数据块将覆盖数据块的修改标记,判断源卷数据是否已经被修改,如果数据块被修改,则进入步骤66;如果数据块未被修改,则进入步骤63。Take a data block to be processed, check the value of the data block marked in the modified record bitmap, determine whether the source volume data block is to be pre-write, if the source volume data has been modified, proceed to step 66; if the source volume data If it has not been modified, it proceeds to step 63. That is, viewing the data block in the source volume in the modified record bitmap will overwrite the modification flag of the data block, determining whether the source volume data has been modified, and if the data block is modified, proceeding to step 66; if the data block is not If it is modified, the process proceeds to step 63.
步骤63、将源卷中旧数据拷贝到资源卷;Step 63: Copy old data in the source volume to the resource volume.
将源卷上的要被覆盖的旧数据拷贝到资源卷。Copy the old data on the source volume to be overwritten to the resource volume.
步骤64、修改地址映射表;Step 64: Modify an address mapping table.
为拷贝的旧数据建立地址映射表,包括源卷中旧数据块的地址与资源卷中旧数据块存放的地址。也就是说,在修改地址映射表中建立源卷数据块地址与资源卷数据块的关系。An address mapping table is created for the copied old data, including the address of the old data block in the source volume and the address of the old data block in the resource volume. That is, the relationship between the source volume block address and the resource volume block is established in the modified address mapping table.
步骤65、更新修改记录位图;Step 65: Update the modified record bitmap;
在修改记录位图中标记源卷数据块已经被修改。也就是说,在修改记录位图中,将对应数据块的修改标记为1。The source volume data block has been modified in the modified record bitmap. That is, in the modified record bitmap, the modification of the corresponding data block is marked as 1.
步骤66、将新数据写入源卷。Step 66: Write new data to the source volume.
其中在步骤63,当主机写IO时,判断是否需要写前拷贝,本发明通过修改记录位图,可以直接判断源卷在各个时刻是否做过写前拷贝,如图7所示,修改记录位图横向表示该源卷各个时刻的时间点,纵向表示源卷最小处理单元。In step 63, when the host writes IO, it is determined whether a pre-write copy is needed. By modifying the record bitmap, the present invention can directly determine whether the source volume has been pre-write copy at various times, as shown in FIG. 7, modifying the record bit. The horizontal view shows the time point of each moment of the source volume, and the vertical direction represents the source volume minimum processing unit.
特别的,当在步骤63中,当主机新写入的IO在所有快照中都没有映射时,本发明通过修改记录位图和资源卷位置来解决该问题,如下场景,T4时刻主机写C1,通过修改记录位图发现所有快照都不存在针对C1的映射,说明C1需要写前拷贝,并且需要修改所有快照针对C1的映射表(修改T0、T1、T2、T3、T4所有时刻的映射表),如图8所示,本发明首先利用写前拷贝机制将源卷数据拷贝到资源卷中,不需要修改所有快照映射表中的映射项,只需要将源卷数据的存放位置变更为资源卷中的R0,并且用所述旧数据拷贝到资源卷相应位置的记录替代所述修改记录位图中所述待覆盖数据块的记录。Specifically, in step 63, when the newly written IO of the host is not mapped in all the snapshots, the present invention solves the problem by modifying the record bitmap and the location of the resource volume. In the following scenario, the host writes C1 at time T4. By modifying the record bitmap, it is found that there is no mapping for C1 for all snapshots, indicating that C1 needs to be pre-write, and all mappings need to be modified for C1 mapping table (modify the mapping table of all times T0, T1, T2, T3, T4) As shown in FIG. 8, the present invention firstly uses the pre-write copy mechanism to copy the source volume data into the resource volume. It is not necessary to modify the mapping entries in all the snapshot mapping tables, and only needs to change the storage location of the source volume data to the resource volume. R0 in the middle, and the record of the data block to be overwritten in the modified record bitmap is replaced with the record in which the old data is copied to the corresponding position of the resource volume.
图9显示了本发明实施例提供的读快照流程图,如图9所示,包括以下步骤:FIG. 9 is a flowchart of a read snapshot provided by an embodiment of the present invention. As shown in FIG. 9, the method includes the following steps:
步骤91、接收到主机下发的读请求;Step 91: Receive a read request sent by the host.
步骤92、读取被读快照时间点的快照映射表; Step 92: Read a snapshot mapping table at a time point of the read snapshot;
首先检查快照映射表中数据,确定数据在快照卷中的存放位置,如果快照卷中有数据,则直接将快照卷的数据返回给主机;如果快照卷中没有数据,则执行步骤S93。也就是说,从快照映射表中确定数据在快照卷中的存放位置,如果数据在快照卷中有存放位置,则直接将快照卷的数据返回给主机,如果数据在快照卷中没有存放位置,则执行步骤S93。First, the data in the snapshot mapping table is checked to determine the storage location of the data in the snapshot volume. If there is data in the snapshot volume, the data of the snapshot volume is directly returned to the host; if there is no data in the snapshot volume, step S93 is performed. That is, the storage location of the data in the snapshot volume is determined from the snapshot mapping table. If the data has a storage location in the snapshot volume, the data of the snapshot volume is directly returned to the host. If the data does not have a storage location in the snapshot volume, Then step S93 is performed.
步骤93、检查修改记录位图,确定数据在资源空间和源卷中的位置,如果修改记录位图的值为0,说明没有做过写前拷贝,从源卷读取相应的数据;如果修改记录位图值为1,从资源卷读取相应的数据。资源卷位图块编号在写快照时修改,具体见前面过程描述。Step 93: Check the modified record bitmap to determine the location of the data in the resource space and the source volume. If the value of the modified record bitmap is 0, it indicates that no pre-write copy has been made, and the corresponding data is read from the source volume; The record bitmap value is 1, and the corresponding data is read from the resource volume. The resource volume block number is modified when the snapshot is written, as described in the previous procedure.
图10显示了本发明实施例提供的删除快照流程图,如图10所示,当用户不需要快照时,可以删除创建的快照,其包括以下步骤:FIG. 10 is a flowchart of deleting a snapshot provided by an embodiment of the present invention. As shown in FIG. 10, when a user does not need a snapshot, the created snapshot may be deleted, and the following steps are included:
步骤101、删除源卷与资源卷的逻辑关系;Step 101: Delete a logical relationship between the source volume and the resource volume.
步骤102、删除快照卷;Step 102: Delete a snapshot volume.
步骤103、回收资源空间。Step 103: Reclaim resource space.
本发明重新设计快照映射表的结构,增加快照创建和资源卷块数据修改的全局索引index。比如S0创建时索引为0,S0的chunk 0修改的索引是1,列表说明如下表1:快照创建和资源卷块数据修改与索引的关系表。The invention redesigns the structure of the snapshot mapping table, and increases the global index index of the snapshot creation and resource volume block data modification. For example, when S0 is created, the index is 0, and the index of the chunk 0 modified by S0 is 1. The list is as follows: Table 1: Relationship between snapshot creation and resource volume block data modification and index.
表1:快照创建和资源卷块数据修改与索引的关系表Table 1: Relationship between snapshot creation and resource volume block data modification and index
索引 index 事件event
00 创建快照S0 Create snapshot S0
11 将源卷chunk 0修改为A1Modify the source volume chunk 0 to A1
22 将源卷chunk 7修改为E2Modify the source volume chunk 7 to E2
33 创建快照S1 Create snapshot S1
44 将源卷chunk 2修改为B2Modify source volume chunk 2 to B2
55 创建快照S2 Create snapshot S2
66 将源卷chunk 0修改为A2Modify the source volume chunk 0 to A2
优化快照的映射表,增加索引项,如图11所示,按照原来的方法,当删除S1时,对于S1的2项映射分别删除时,需要扫描S1中存在而其它所有快照映射表中都不存在的条目,比如,查找S0和S2映射表中chunk 0,chunk 2条目。本发明通过在 快照的映射表中增加索引项,在删除时可以比较索引的大小,比如删除S1,比较索引值,对于条目chunk 0的索引值6大于S2的创建索引5,所以对于chunk 0需要遍历S0和S2,但是对于chunk 2条目,由于索引值4大于S0的索引值0而小于S2的创建索引值5,说明S2不会共享资源卷chunk 1的数据,所以源卷chunk 2条目只检查S0,不检查S2,这样节省了读取S2映射表项的请求,当映射表项无法全内存时可以节省系统资源,包括CPU,缓存,调度。Optimize the mapping table of the snapshot and add the index entries. As shown in Figure 11, according to the original method, when S1 is deleted, when the two mappings of S1 are deleted, it is necessary to scan in S1 but not in all other snapshot mapping tables. Existing entries, for example, look for chunk 0, chunk 2 entries in the S0 and S2 mapping tables. The invention passes Index entries are added to the snapshot mapping table. You can compare the size of the index when deleting. For example, delete S1 and compare the index value. The index value 6 for the entry chunk 0 is greater than the creation index 5 of S2. Therefore, you need to traverse S0 and S2 for chunk 0. However, for the chunk 2 entry, since the index value 4 is larger than the index value 0 of S0 and smaller than the creation index value 5 of S2, it means that S2 does not share the data of the resource volume chunk 1, so the source volume chunk 2 entry only checks S0, does not check. S2, which saves the request to read the S2 mapping entry, and saves system resources, including CPU, cache, and scheduling, when the mapping entry cannot be fully memory.
综上所述,本发明具有以下技术效果:In summary, the present invention has the following technical effects:
本发明减小了快照流程对主机写IO的影响,提高了快照处理的系统和资源卷回收的效率。The invention reduces the impact of the snapshot process on the host write IO, and improves the efficiency of the snapshot processing system and the resource volume recovery.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, the descriptions of the various embodiments are different, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed technical contents may be implemented in other manners. The device embodiments described above are only schematic. For example, the division of the unit may be a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使 得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. Including several instructions to make A computer device (which may be a personal computer, server or network device, etc.) may be used to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.
工业实用性Industrial applicability
如上所述,本发明实施例提供的一种快照处理方法及装置具有以下有益效果:减小了快照流程对主机写IO的影响,提高了快照处理的系统和资源卷回收的效率。 As described above, the snapshot processing method and apparatus provided by the embodiments of the present invention have the following beneficial effects: reducing the impact of the snapshot process on the host write IO, and improving the efficiency of the snapshot processing system and resource volume recovery.

Claims (10)

  1. 一种快照处理方法,包括以下步骤:A snapshot processing method includes the following steps:
    创建包含资源卷、修改记录位图、修改地址映射表和快照映射表的快照卷;Create a snapshot volume that contains a resource volume, a modified record bitmap, a modified address map, and a snapshot map;
    在写源卷期间,利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中;During the writing of the source volume, the corresponding data in the source volume is written into the resource volume by using the modified record bitmap, the modified address mapping table, and the snapshot mapping table in the snapshot volume;
    其中,所述修改记录位图用于记录所述快照卷建立后源卷中各个数据块的修改情况;所述修改地址映射表用于记录源卷中被修改区域的地址和该区域旧数据被保存在资源卷中的地址;所述快照映射表用于记录源卷地址和该时间点快照每个数据块存放的地址,以及记录写快照卷时产生的数据。The modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established; the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume; the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
  2. 根据权利要求1所述的方法,其中,还包括:The method of claim 1 further comprising:
    在读快照期间,利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据。During the read snapshot, the corresponding data is read from the resource volume and the source volume using the snapshot mapping table and the modified record bitmap in the snapshot volume.
  3. 根据权利要求1或2所述的方法,其中,还包括:The method of claim 1 or 2, further comprising:
    在删除快照期间,利用所述快照卷中的快照映射表,删除所述修改地址映射表。During the deletion of the snapshot, the modified address mapping table is deleted by using the snapshot mapping table in the snapshot volume.
  4. 根据权利要求1所述的方法,其中,所述的利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中的步骤包括:The method according to claim 1, wherein said utilizing said modified record bitmap, said modified address mapping table and said snapshot mapping table in said snapshot volume, said corresponding data in said source volume is written into said resource volume The steps include:
    根据修改记录位图关于源卷中待覆盖数据块已经被修改的记录,将新数据写入源卷待覆盖数据块对应的区域中,并在所述修改地址映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系,在所述快照映射表中记录所述区域地址和该区域旧数据被保存在资源卷中地址的映射关系以及资源卷数据修改的全局索引;And according to the record of the modified record bitmap, the data to be overwritten in the source volume has been modified, the new data is written into the area corresponding to the data volume to be overwritten by the source volume, and the area address and the area address are recorded in the modified address mapping table. The old data of the area is saved in a mapping relationship of addresses in the resource volume, and the mapping relationship between the area address and the old data of the area is stored in the resource volume and the global index of the resource volume data modification is recorded in the snapshot mapping table. ;
    当所述修改地址映射表中存在源卷中待覆盖数据块地址的映射条目时,根据修改记录位图关于源卷中待覆盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并在所述修改记录位图中将所述待覆盖数据块记录为已经被修改。When there is a mapping entry of the data block address to be overwritten in the source volume in the modified address mapping table, according to the modified recording bitmap, the record in the data volume to be overwritten in the source volume is not modified, and the data in the to-be-covered data block is The old data is copied to the corresponding location of the resource volume, and the to-be-covered data block is recorded as having been modified in the modified record bitmap.
  5. 根据权利要求4所述的方法,其中,所述的利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中的步骤还包括:The method according to claim 4, wherein said utilizing said modified record bitmap, said modified address mapping table and said snapshot mapping table in said snapshot volume, said corresponding data in said source volume is written into said resource volume The steps also include:
    当所述修改地址映射表中不存在源卷中待覆盖数据块地址的映射条目时,根据修 改记录位图关于源卷中待覆盖数据块未被修改的记录,将所述待覆盖数据块中的旧数据拷贝到资源卷相应位置中,并且用所述旧数据拷贝到资源卷相应位置的记录替代所述修改记录位图中所述待覆盖数据块的记录。When the mapping entry of the data block address to be overwritten in the source volume does not exist in the modified address mapping table, according to the repair Changing the record bitmap with respect to the record in the source volume that the data block to be overwritten is not modified, copying the old data in the data block to be overwritten into the corresponding location of the resource volume, and copying the old data to the corresponding position of the resource volume Recording a record replacing the block of data to be covered in the modified record bitmap.
  6. 根据权利要求2所述的方法,其中,所述的利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据的步骤包括:The method of claim 2, wherein the step of reading the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume comprises:
    根据所述快照映射表,确定所读取的数据在源卷中地址和该源卷旧数据被保存在资源卷中地址;Determining, according to the snapshot mapping table, that the address of the read data in the source volume and the old data of the source volume are saved in an address in the resource volume;
    根据所确定的在源卷中地址和该源卷旧数据被保存在资源卷中地址,从所述资源卷和源卷中读取相应数据。The corresponding data is read from the resource volume and the source volume according to the determined address in the source volume and the source volume old data is saved in the resource volume address.
  7. 根据权利要求6所述的方法,其中,所述的利用所述快照卷中的快照映射表和修改记录位图,从所述资源卷和源卷中读取相应数据的步骤还包括:The method of claim 6, wherein the step of reading the corresponding data from the resource volume and the source volume by using the snapshot mapping table and the modified recording bitmap in the snapshot volume further comprises:
    根据所述修改记录位图的标记,确定所读取的数据是否做过写前拷贝;Determining whether the read data has been pre-write copy according to the mark of the modified record bitmap;
    当确定所读取的数据做过写前拷贝,则从所述资源卷中读取相应数据;When it is determined that the read data has been pre-write copy, the corresponding data is read from the resource volume;
    当确定所读取的数据未做过写前拷贝,则从所述源卷中读取相应数据。When it is determined that the read data has not been subjected to a pre-write copy, the corresponding data is read from the source volume.
  8. 根据权利要求3所述的方法,其中,所述的利用所述快照卷中的快照映射表,删除所述修改地址映射表的步骤包括:The method of claim 3, wherein the step of deleting the modified address mapping table by using the snapshot mapping table in the snapshot volume comprises:
    利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系;Deleting the mapping relationship between the source volume and the resource volume by using the mapping relationship between the source volume address and the source volume old data recorded in the snapshot mapping table in the resource volume;
    根据所删除的源卷与资源卷的映射关系,删除快照卷,并回收所删除快照卷的资源空间。The snapshot volume is deleted according to the mapping relationship between the deleted source volume and the resource volume, and the resource space of the deleted snapshot volume is reclaimed.
  9. 根据权利要求8所述的方法,其中,所述的利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系的步骤包括:The method according to claim 8, wherein said utilizing said source volume address and source volume old data recorded in said snapshot mapping table are stored in a mapping relationship of addresses in a resource volume, and deleting source volume and resource volume The steps of the mapping relationship include:
    利用所述快照映射表中记录的所述资源卷数据修改的全局索引,判断是否需要遍历其它所述修改地址映射表;Determining whether it is necessary to traverse the other modified address mapping table by using the global index modified by the resource volume data recorded in the snapshot mapping table;
    当判断需要遍历其它所述修改地址映射表时,通过扫描其它所述修改地址映射表中存在的条目,在所述资源卷中标记与所述快照映射表中条目不同的条目,并利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系; When it is determined that the other modified address mapping table needs to be traversed, by scanning an entry existing in the other modified address mapping table, an entry different from the entry in the snapshot mapping table is marked in the resource volume, and the The source volume address and the source volume old data recorded in the snapshot mapping table are saved in the mapping relationship of the addresses in the resource volume, and the mapping relationship between the source volume and the resource volume is deleted;
    当判断不需要遍历其它所述修改地址映射表时,利用所述快照映射表中记录的所述源卷地址和源卷旧数据被保存在资源卷中地址的映射关系,删除源卷与资源卷的映射关系。When it is determined that it is not necessary to traverse the other modified address mapping table, the source volume address and the source volume old data recorded in the snapshot mapping table are saved in a mapping relationship of addresses in the resource volume, and the source volume and the resource volume are deleted. Mapping relationship.
  10. 一种快照处理装置,包括:A snapshot processing device includes:
    创建快照卷模块,设置为创建包含资源卷、修改记录位图、修改地址映射表和快照映射表的快照卷;Create a snapshot volume module, set to create a snapshot volume that contains the resource volume, modify the record bitmap, modify the address mapping table, and the snapshot mapping table;
    写源卷模块,设置为在写源卷期间,利用所述快照卷中的修改记录位图、修改地址映射表和快照映射表,将源卷中的相应数据写入到所述资源卷中;Writing a source volume module, configured to write corresponding data in the source volume to the resource volume by using a modified record bitmap, a modified address mapping table, and a snapshot mapping table in the snapshot volume during writing of the source volume;
    其中,所述修改记录位图用于记录所述快照卷建立后源卷中各个数据块的修改情况;所述修改地址映射表用于记录源卷中被修改区域的地址和该区域旧数据被保存在资源卷中的地址;所述快照映射表用于记录源卷地址和该时间点快照每个数据块存放的地址,以及记录写快照卷时产生的数据。 The modified record bitmap is used to record the modification of each data block in the source volume after the snapshot volume is established; the modified address mapping table is used to record the address of the modified area in the source volume and the old data of the area is The address stored in the resource volume; the snapshot mapping table is used to record the source volume address and the address of each data block of the point-in-time snapshot, and record the data generated when the snapshot volume is written.
PCT/CN2015/092327 2015-02-12 2015-10-20 Snapshot processing method and apparatus WO2016127658A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510075327.X 2015-02-12
CN201510075327.XA CN105988723A (en) 2015-02-12 2015-02-12 Snapshot processing method and device

Publications (1)

Publication Number Publication Date
WO2016127658A1 true WO2016127658A1 (en) 2016-08-18

Family

ID=56614169

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/092327 WO2016127658A1 (en) 2015-02-12 2015-10-20 Snapshot processing method and apparatus

Country Status (2)

Country Link
CN (1) CN105988723A (en)
WO (1) WO2016127658A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990194A (en) * 2019-11-22 2020-04-10 浪潮(北京)电子信息产业有限公司 Calculation method, calculation system and related device for snapshot stop time
CN111338850A (en) * 2020-02-25 2020-06-26 上海英方软件股份有限公司 Method and system for improving backup efficiency based on COW mode multi-snapshot

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909514B (en) * 2017-03-01 2021-04-30 郑州云海信息技术有限公司 Method and device for positioning snapshot disk address
CN107391391B (en) * 2017-07-19 2019-05-14 深圳大普微电子科技有限公司 Method, system and the solid state hard disk of data copy are realized in the FTL of solid state hard disk
CN107423637B (en) * 2017-07-31 2020-07-31 南京理工大学 Integrity auditing method supporting traceability of electronic medical record data on cloud
CN107423165A (en) * 2017-08-01 2017-12-01 郑州云海信息技术有限公司 A kind of data snapshot head writes copy method and device
CN107491363A (en) * 2017-08-24 2017-12-19 郑州云海信息技术有限公司 A kind of Snapshot Method and device of the storage volume based on linux kernel
US10282099B1 (en) * 2017-10-27 2019-05-07 Netapp, Inc. Intelligent snapshot tiering
CN107888689B (en) * 2017-11-16 2019-04-30 无锡地铁集团有限公司 Locking resource allocation method based on shared storage
CN109598156B (en) * 2018-11-19 2023-04-11 杭州信核数据科技股份有限公司 Method for redirecting engine snapshot stream during writing
CN109902034B (en) * 2019-02-25 2021-09-10 杭州宏杉科技股份有限公司 Snapshot creating method and device, electronic equipment and machine-readable storage medium
CN110032475A (en) * 2019-04-15 2019-07-19 苏州浪潮智能科技有限公司 A kind of cloning process of logical volume, device and equipment
CN111007990B (en) * 2019-12-24 2023-09-19 曙光信息产业(北京)有限公司 Positioning method for quickly positioning data block references in snapshot system
CN111563006B (en) * 2020-04-17 2023-07-28 深圳震有科技股份有限公司 Data processing method, intelligent terminal and storage medium
CN113721861B (en) * 2021-11-01 2022-02-08 深圳市杉岩数据技术有限公司 Fixed-length block-based data storage implementation method and computer-readable storage medium
CN114116312B (en) * 2021-11-25 2022-08-09 北京大道云行科技有限公司 ROW snapshot design method and system based on distributed block storage
CN114942863A (en) * 2022-04-29 2022-08-26 苏州浪潮智能科技有限公司 Cascade snapshot processing method, device and equipment and storage medium
CN115826878B (en) * 2023-02-14 2023-05-16 浪潮电子信息产业股份有限公司 Copy-on-write method, device, equipment and computer readable storage medium
CN117311911B (en) * 2023-11-29 2024-02-23 苏州元脑智能科技有限公司 Virtual machine snapshot method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060047926A1 (en) * 2004-08-25 2006-03-02 Zheng Calvin G Managing multiple snapshot copies of data
CN101140536A (en) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 Snapshot system supporting cascades snapshot and snapshot processing method thereof
CN101174231A (en) * 2006-11-03 2008-05-07 英业达股份有限公司 Snap backup method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012852B (en) * 2010-12-27 2013-05-08 创新科存储技术有限公司 Method for implementing incremental snapshots-on-write
CN102012853B (en) * 2011-01-14 2012-05-23 南开大学 Zero-copy snapshot method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060047926A1 (en) * 2004-08-25 2006-03-02 Zheng Calvin G Managing multiple snapshot copies of data
CN101174231A (en) * 2006-11-03 2008-05-07 英业达股份有限公司 Snap backup method
CN101140536A (en) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 Snapshot system supporting cascades snapshot and snapshot processing method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990194A (en) * 2019-11-22 2020-04-10 浪潮(北京)电子信息产业有限公司 Calculation method, calculation system and related device for snapshot stop time
CN111338850A (en) * 2020-02-25 2020-06-26 上海英方软件股份有限公司 Method and system for improving backup efficiency based on COW mode multi-snapshot

Also Published As

Publication number Publication date
CN105988723A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
WO2016127658A1 (en) Snapshot processing method and apparatus
US9146877B2 (en) Storage system capable of managing a plurality of snapshot families and method of snapshot family based read
JP6629407B2 (en) Method and system for accessing updated files and software products
US11782632B2 (en) Selective erasure of data in a SSD
KR101813786B1 (en) System and method for copy on write on an ssd
EP2631916A1 (en) Data deletion method and device
US20080201544A1 (en) Storage system
KR101779174B1 (en) Data discard method for journaling filesystem and memory management apparatus thereof
US9778860B2 (en) Re-TRIM of free space within VHDX
US10891074B2 (en) Key-value storage device supporting snapshot function and operating method thereof
CN107423233B (en) Writable snapshot implementation method and device
US11144202B2 (en) Volume management apparatus, volume management method, and volume management program
US11030092B2 (en) Access request processing method and apparatus, and computer system
US8019953B2 (en) Method for providing atomicity for host write input/outputs (I/Os) in a continuous data protection (CDP)-enabled volume using intent log
JP7376488B2 (en) Deduplication as an infrastructure to avoid snapshot copy-on-write data movement
TWI826236B (en) Memory system and control method
US8880820B2 (en) Techniques for using sparse files during snapshots
WO2016127807A1 (en) Method for writing multiple copies into storage device, and storage device
US20120324186A1 (en) Method, apparatus and computer for data operation
US20230113507A1 (en) Storage system and data restoration method
TWI750116B (en) Swat command and api for atomic swap and trim of logical pages
CN105912277A (en) Method for realizing single-writing log of file system in virtual machine mirror image
US11531474B1 (en) Storage system and data replication method in storage system
WO2018051446A1 (en) Computer system including storage system having optional data processing function, and storage control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15881808

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15881808

Country of ref document: EP

Kind code of ref document: A1