WO2018058944A1 - 一种删除级联快照的方法及装置 - Google Patents

一种删除级联快照的方法及装置 Download PDF

Info

Publication number
WO2018058944A1
WO2018058944A1 PCT/CN2017/081345 CN2017081345W WO2018058944A1 WO 2018058944 A1 WO2018058944 A1 WO 2018058944A1 CN 2017081345 W CN2017081345 W CN 2017081345W WO 2018058944 A1 WO2018058944 A1 WO 2018058944A1
Authority
WO
WIPO (PCT)
Prior art keywords
snapshot
data
copy
write
target data
Prior art date
Application number
PCT/CN2017/081345
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP17854402.9A priority Critical patent/EP3499358B1/en
Publication of WO2018058944A1 publication Critical patent/WO2018058944A1/zh
Priority to US16/370,959 priority patent/US11093162B2/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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/84Using snapshots, i.e. a logical point-in-time copy of the data
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0623Securing storage systems in relation to content
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms

Definitions

  • the present invention relates to a computer application technology neighborhood, and in particular, to a method and apparatus for deleting a cascaded snapshot.
  • the traditional method of data backup is to use data replication, backup, recovery and other technologies to protect important data information.
  • the cost and cost of this backup method is relatively high, and it consumes a lot of time and system resources, and the data recovery time is also longer. Because the data backup process affects system performance, the system may stop outbound services and not meet the needs of businesses that require uninterrupted operation.
  • Snapshot technology can better solve the above technical problems.
  • a snapshot is a mirror of a data set at a particular moment, also known as an instant copy, which is a fully available copy of the data set.
  • a snapshot can be used as a virtual machine carrier. In this case, the snapshot is also read and written.
  • the cascading snapshot can be as shown in Figure 1.
  • Snapshot 1 is a snapshot of the source logical volume (LUN)
  • snapshot 2 is a snapshot of snapshot 1.
  • snapshot 2 retains the contents of snapshot 1.
  • the user can modify the snapshot 1 without worrying about the original snapshot content being lost.
  • the snapshot 3 is a snapshot of the snapshot 2.
  • the user can also modify the snapshot 2, and the modified content may be different from the modified content of the snapshot 1.
  • the snapshot 2 is a sub-snapshot of the snapshot 1 and is the parent snapshot of the snapshot 3.
  • the parent snapshot of the child snapshot is not allowed to be deleted. For example, if the snapshot 2 in FIG. 1 is directly deleted, when the snapshot 3 is read, since the data in the snapshot 2 cannot be read, This will result in data read failure or error. Therefore, to delete snapshot 2, you need to delete snapshot 3 before you can delete snapshot 2. However, in some cases, the data in the parent snapshot may no longer be needed, but the data of its sub-snap is still needed, because the sub-snap cannot be deleted, which causes waste of resources.
  • the embodiment of the invention provides a method and a device for deleting a cascaded snapshot, which are used to delete a snapshot with a sub-snapshot in a cascaded snapshot, and ensure that the data image in the sub-snap is not changed by deleting the snapshot.
  • the method for deleting a cascading snapshot is applicable to a storage device, where the storage device includes a logical volume, where the logical volume corresponds to multiple cascaded snapshots, and the multiple cascaded snapshots Include at least a first snapshot, a second snapshot, and a third snapshot, the first snapshot includes target data, the second snapshot is a parent snapshot of the first snapshot, and the parent snapshot of the first snapshot may be independent
  • the snapshot may also be the logical volume, and the third snapshot is a sub-snap of the first snapshot.
  • the method specifically includes:
  • the information of the target data in the first snapshot is migrated to the second snapshot, where the information of the target data includes a time stamp of the first snapshot,
  • the time stamp of the first snapshot is set when the first snapshot is created;
  • the identifier of the parent snapshot corresponding to the third snapshot is set to the identifier of the second snapshot, so that the parent snapshot corresponding to the third snapshot after the setting is configured.
  • the identifier indicates that the parent snapshot of the third snapshot is the second snapshot; Delete the first snapshot.
  • the target data in the first snapshot is migrated to the second snapshot of the first snapshot, so that the deletion is performed.
  • the target data in the original first snapshot can still be read from the second snapshot without causing data read failure or data read. Take the error.
  • each of the cascaded snapshots corresponding to the logical volume has a time stamp, and the time stamp of each cascaded snapshot is unique.
  • a cascading snapshot you may have multiple snapshots of the logical volume. Each snapshot contains multiple sub-snapshots. In this case, the snapshot data is numerous and complex.
  • the target data of the first snapshot includes copy-on-write data and/or private data, where copy-on-write data refers to performing the first snapshot.
  • the data copied at the time of copy-on-write, the private data refers to the data written when the first snapshot is written.
  • the target data includes copy-on-write data
  • the information of the target data is migrated into the second snapshot
  • the information of the copy-on-write data is migrated to the copy-time copy data of the second snapshot. in.
  • the third snapshot of the sub-snap of the first snapshot is created, if the content in the first snapshot is written, the source data in the first snapshot is first copied to the copy-on-write data, and then the write is performed. The data is written to the private data. Therefore, if the first snapshot contains copy-on-write data, the data in the first snapshot is written after the third snapshot is created, and the third snapshot is read when the third snapshot is read.
  • the data in the first snapshot when the third snapshot is created that is, the data in the copy data at the time of writing, so that the information of the copy-on-write data in the first snapshot is migrated to the copy-on-write data of the second snapshot.
  • the target data of the first snapshot includes copy-on-write data and/or private data, where copy-on-write data refers to performing the first snapshot.
  • the data copied at the time of copy-on-write, the private data refers to the data written when the first snapshot is written.
  • the target data does not include copy-on-write data
  • the information of the target data is migrated into the second snapshot
  • the information of the private data is migrated into the copy-on-write data of the second snapshot.
  • the data in the private data is the data in the first snapshot when the third snapshot is created.
  • the information of the private data in the first snapshot is migrated to the copy-on-write data of the second snapshot.
  • the information of the target data further includes an address of the target data. Since the migration is the address of the target data, the migration process can be implemented quickly, thereby improving system efficiency.
  • the unique time stamp can be obtained by: acquiring a time stamp of the logical volume when creating a snapshot; The time stamp of the snapshot is set to the sum of the current time stamp of the logical volume and the preset threshold; the parent snapshot of the created snapshot, the parent snapshot of the parent snapshot, and the time stamp of the source logical volume are set to The increments are sequentially incremented, and the time stamp of the parent snapshot of the created snapshot is greater than the time stamp of the created snapshot.
  • the deleted cascade snapshot provided by the embodiment of the present invention is applied to a storage device, where the storage device package is used.
  • a logical volume the logical volume corresponding to a plurality of cascaded snapshots, the plurality of cascaded snapshots including at least a first snapshot, a second snapshot, and a third snapshot, the second snapshot being a parent snapshot of the first snapshot
  • the parent snapshot of the first snapshot may be an independent snapshot, or may be the logical volume
  • the third snapshot is a sub-snap of the first snapshot
  • the device includes:
  • a receiving module configured to receive an instruction to delete the first snapshot, where the first snapshot includes target data
  • a migration module configured to migrate information of the target data to the second snapshot, where information of the target data includes a time stamp of the first snapshot, and a time stamp of the first snapshot is in the first Set when a snapshot is created;
  • a first setting module configured to set an identifier of the parent snapshot corresponding to the third snapshot to an identifier of the second snapshot, where the identifier of the parent snapshot corresponding to the third snapshot indicates the third snapshot
  • the parent snapshot is the second snapshot
  • each of the cascaded snapshots corresponding to the logical volume has a time stamp, and the time stamp of each cascaded snapshot is unique.
  • the target data includes copy-on-write data and/or private data, where copy-on-write data refers to writing the first snapshot
  • copy-on-write data refers to writing the first snapshot
  • the private data refers to data written when the first snapshot is written
  • the migration module is specifically configured to: The information of the copy-on-write data is migrated to the copy-on-write data of the second snapshot.
  • the target data includes copy-on-write data and/or private data, where copy-on-write data refers to writing the first snapshot
  • copy-on-write data refers to writing the first snapshot
  • the data copied when copying, the private data refers to data written when the first snapshot is written; when the target data does not include copy-on-write data, the migration module has: The information of the private data is migrated into the copy-on-write data of the second snapshot.
  • the information of the target data further includes: an address of the target data.
  • FIG. 1 is a schematic diagram of a cascaded snapshot provided by an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a data processing system according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a controller applicable to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a method for deleting a cascaded snapshot according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of setting a time stamp according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of creating a cascaded snapshot according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of deleting a cascaded snapshot according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an apparatus for deleting a cascaded snapshot according to an embodiment of the present invention.
  • the embodiment of the present invention provides a method for deleting a cascading snapshot, which is applicable to a storage device.
  • the method for deleting a cascaded snapshot provided by the embodiment of the present invention can be applied to a data processing system as shown in FIG. 2, and the system includes at least a host 100 and a storage device 200.
  • the data processing system may be a storage area network (SAN) or a network attached storage (NAS).
  • SAN storage area network
  • NAS network attached storage
  • the host 100 is configured to execute an application, and send a control instruction to the storage device 200 to read and write data, wherein the control instruction includes an input/output instruction.
  • the storage device 200 may be a device such as a disk array for storing data and operating instructions. As shown, the storage device 200 can include a controller 210 and a storage medium 220.
  • the controller 210 may further include a processor 211, a memory 212, a communication interface 213, and a bus 214, as shown in FIG.
  • the processor 211 may be a central processing unit (CPU), a network processor (NP), or the like; or may be a digital signal processor (DSP) or an application specific integrated circuit (Applica tion Specific). Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic devices.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processor
  • ASIC Application Specific integrated circuit
  • FPGA Field Programmable Gate Array
  • the memory 212 can be used to store programs and data when the processor 211 performs operations.
  • the storage medium 220 may include a plurality of disks, which are physical storage spaces.
  • a logical volume is a logical partition that is divided by the software layer on the basis of physical storage space.
  • the logical volume can be expanded or reduced as needed.
  • a cascading snapshot related to the embodiment of the present invention that is, after a sub-snap is created for the source logical volume, a sub-snap can also be created for the sub-snap, and even more hierarchical sub-snapshots can be created. Therefore, the cascading snapshot includes at least a first snapshot, a second snapshot, and a third snapshot, where the second snapshot is a parent snapshot of the first snapshot, and the parent snapshot of the first snapshot may be an independent snapshot or a source logic. Volume, the third snapshot is a sub-snap of the first snapshot.
  • FIG. 4 is a schematic flowchart of a method for deleting a cascaded snapshot according to an embodiment of the present invention.
  • the execution entity may be a processor 211 as shown in FIG. 3, and the following steps are performed by reading a program in the memory 212:
  • Step 401 Receive an instruction to delete the first snapshot.
  • Step 402 Migrate information of the target data in the first snapshot into the second snapshot.
  • the information of the target data includes a time stamp of the first snapshot, the time stamp of the first snapshot is set when the first snapshot is created; and each cascaded snapshot of the source logical volume has a time stamp, each level The time stamp of the linked snapshot is unique.
  • the target data of the first snapshot can be distinguished from the data in the second snapshot.
  • the data required for the third snapshot can be determined according to the time stamp when the third snapshot is subsequently read.
  • the global unique time stamp setting method can be as shown in Figure 4: when creating a new sub-snap, first Obtain the current time stamp of the source LUN. Set the current time of the source LUN to A. Set the time stamp of the newly created sub-snap to A+1, and set the time stamp of the parent snapshot to A+2. The time stamp is set to A+3, so that in the cascaded snapshot, the time stamp is decremented from the source LUN to the subsnoop.
  • the time stamping method shown in Figure 5 is only a specific embodiment. If the newly created snapshot is a snapshot of the source LUN, the source LUN is directly set after the time stamp of the newly created snapshot is set to A+1. The time stamp is set to A+2; if the parent snapshot of the newly created child snapshot has a parent snapshot, after setting the time stamp of the parent snapshot to A+2, continue to set the time stamp of the parent snapshot of the parent snapshot until Set the time stamp of the source LUN so that the time stamp is successively decremented from the source LUN to the lowermost sub-snap; in addition, the time stamp is set as an example, and the time stamp difference is taken as an example, but the present invention is not limited to this.
  • the target data in the snapshot includes copy-on-write (COW) data and private data.
  • COW copy-on-write
  • private data that is, when new data is first written to a storage location, the original content is first read out, written to another location (ie, COW data), and then new data is written to the storage. In the device (ie private data), the next write to this location will no longer perform a copy-on-write operation.
  • the COW data is generated after the sub-snap is created.
  • the COW data is generated because the third snapshot is associated with the data in the first snapshot when the third snapshot is created.
  • it only cares about the data in the first snapshot when the third snapshot is created, and does not care about writing the first snapshot data after creating the third snapshot.
  • step 402 when the information of the target data in the first snapshot is migrated to the second snapshot, for the data on each data address, whether the COW data is included in the target data of the first snapshot may be detected first.
  • the first snapshot is written after the third snapshot is created, and the data in the first snapshot before the write operation is saved in the COW data, that is, the third snapshot. Associated data. Therefore, when the information of the target data in the first snapshot is migrated into the second snapshot, only the information of the COW data in the first snapshot may be migrated into the second snapshot.
  • the target data of the first snapshot does not contain the COW data
  • the first snapshot is not written after the third snapshot is created, and the private data is the data in the first snapshot when the third snapshot is created, that is, the third snapshot.
  • the associated data Therefore, when the information of the target data in the first snapshot is migrated into the second snapshot, the information of the private data in the first snapshot is migrated into the second snapshot.
  • the metadata of the target data in the first snapshot may be migrated into the second snapshot, that is, the address of the target data in the first snapshot is migrated into the second snapshot. Since the information of the migrated target data includes the address of the target data and the time stamp of the first snapshot when the first snapshot is created, the migration process can be quickly implemented, thereby improving system efficiency.
  • Step 403 Set the identifier of the parent snapshot corresponding to the third snapshot as the identifier of the second snapshot.
  • the identifier of the parent snapshot corresponding to the third snapshot after the setting indicates that the parent snapshot of the third snapshot is the second snapshot.
  • Step 404 Delete the first snapshot.
  • CurTP indicating the time stamp of the source LUN (snapshot).
  • BindTP indicates the point in time before the parent snapshot associated with the snapshot is created.
  • the CurTP of the source LUN is 1, and in its private data (PriData), the time point (TP) of the data with the address (Addr) is 1, indicating that the CurTP of the source LUN is written when the data is written. 1.
  • the source LUN does not have COW data because no snapshot is created for the source LUN.
  • snapshot 1 is created for the source LUN.
  • the PurTP 1 of the source LUN before the snapshot 1 is created. Therefore, the CurTP of the snapshot 1 is set to 2, and the CurTP of the source LUN is set to 3.
  • the original data needs to be written into the COW data (CowData) before the new data is written.
  • the original data is the private data with the TP being 1.
  • the snapshot 1 is associated with the data of the source LUN before the snapshot 1 is created. Therefore, the BindTP of the snapshot 1 is the CurTP of the source LUN before the snapshot 1 is created, that is, the BindTP of the snapshot 1 is 1.
  • the snapshot 1 is written and written. The entered data is saved to PriData. When snapshot 1 is written, the CurTP of snapshot 1 is 2. Therefore, the TP of PriData is 2.
  • a sub-snapshot, snapshot 2 is created for snapshot 1.
  • First, obtain the CurTP 3 of the source LUN before creating snapshot 2. Therefore, set the CurTP of snapshot 2 to 4, set the CurTP of snapshot 1 to 5, and set the CurTP of the source LUN to 6.
  • the original data is PriData with TP of 2. Therefore, the data in CowData
  • the TP is 2; the TP of CowData is ProTP. Therefore, the ProTP of snapshot 1 is 2; and the newly written data is stored in PriData.
  • the CurTP of snapshot 1 is 5, so the TP of PriData is 5.
  • a sub-snapshot, snapshot 3 is created for Snapshot 2.
  • Receive the CurTP 6 of the LUN before the snapshot 3 is created. Therefore, set the CurTP of snapshot 3 to 7, then set the CurTP of snapshot 2 to 8, set the CurTP of snapshot 1 to 9, and set the CurTP of the source LUN to 10. .
  • the original data is PriData with TP of 4. Therefore, the data in CowData
  • the TP is 4; the TP of CowData is ProTP. Therefore, the ProTP of snapshot 2 is 4; and the newly written data is stored in PriData.
  • the CurTP of snapshot 2 is 8, so the TP of PriData is 8.
  • FIG. 7 is a schematic diagram of deleting a snapshot 2 by using a deletion method provided by an embodiment of the present invention.
  • the TP of CowData can uniquely identify the data of snapshot 2, which can distinguish the CowData migrated into snapshot 1 from the CowData of snapshot 1. After migrating the CowData of Snapshot 2 to Snapshot 1, Snapshot 2 can be deleted.
  • CowData and PriData for data in all locations in the snapshot 2.
  • the embodiment of the present invention further provides an apparatus for deleting a cascaded snapshot, which is used to implement the foregoing method embodiment, and is applied to a storage device, where the storage device includes a logical volume, and the logical volume corresponds to multiple levels.
  • a plurality of cascading snapshots where the second snapshot is a parent snapshot of the first snapshot, and the parent snapshot of the first snapshot may be an independent snapshot. Is a logical volume, and the third snapshot is a sub-snap of the first snapshot.
  • FIG. 8 is a schematic structural diagram of an apparatus for deleting a cascaded snapshot according to an embodiment of the present invention. As shown in the figure, the apparatus includes:
  • the receiving module 801 is configured to receive an instruction to delete the first snapshot, where the first snapshot includes target data.
  • a migration module 802 configured to migrate information of the target data into the second snapshot
  • a setting module 803 configured to set an identifier of a parent snapshot corresponding to the third snapshot to an identifier of the second snapshot, where an identifier of the parent snapshot corresponding to the third snapshot is a parent of the third snapshot
  • the snapshot is the second snapshot
  • the deleting module 804 is configured to delete the first snapshot.
  • the information of the target data includes a time stamp of the first snapshot, and a time stamp of the first snapshot is set when the first snapshot is created; each cascade corresponding to the logical volume Snapshots are time stamped and the time stamp for each cascading snapshot is unique.
  • the target data includes copy-on-write data and/or private data, where the copy-on-write data refers to data copied when the first snapshot is copy-on-write, and the private data refers to the
  • the first snapshot performs data written during a write operation; for the data on each data address, when the target data includes copy-on-write data, the migration module 802 is specifically configured to: copy the data at the time of writing Information is migrated into the copy-on-write data of the second snapshot.
  • the target data includes copy-on-write data and/or private data, where the copy-on-write data refers to data copied when the first snapshot is copy-on-write, and the private data refers to the
  • the first snapshot performs data written during a write operation; for data on each data address, when the target data does not include copy-on-write data, the migration module 802 has: for: the private data Information is migrated into the copy-on-write data of the second snapshot.
  • the information of the target data further includes: an address of the target data.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种删除级联快照的方法及装置。该方法应用于存储设备中,存储设备包括逻辑卷,该逻辑卷对应多个级联快照,至少包括第一快照、第二快照和第三快照,其中,第二快照是第一快照的父快照,第三快照是第一快照的子快照,当接收删除第一快照的指令(401),第一快照包括目标数据;将目标数据的信息迁移至第二快照中(402),目标数据的信息包括第一快照的时间标记,第一快照的时间标记是在第一快照创建时设置的;将第三快照对应的父快照的标识设置为第二快照的标识(403),设置后的第三快照对应的父快照的标识表示第三快照的父快照是第二快照;删除第一快照(404)。

Description

一种删除级联快照的方法及装置 技术领域
本发明涉及计算机应用技术邻域,尤其涉及一种删除级联快照的方法及装置。
背景技术
随着计算机技术的发展,数据备份的重要性也逐渐凸显出来。传统的数据备份方式是采用数据复制、备份、恢复等技术来保护重要的数据信息。但是这种备份方式的代价和成本比较高,并且消耗大量时间和系统资源,数据恢复时间也较长。由于数据备份过程会影响系统性能,因此系统可能会停止对外服务,而无法满足一些需要不间断运行的业务的需求。
数据快照(Snapshot)技术能够较好的解决上述技术问题。快照是某个数据集在某一特定时刻的镜像,也称为即时拷贝,它是这个数据集的一个完整可用的副本。在虚拟机的应用场景中,可以将快照作为一个虚拟机载体,此时,快照也会被读写,为了保存快照中的数据,可以对快照再做快照,即级联快照。级联快照可如图1所示,快照1是对源逻辑卷(Logical Unit Number,LUN)做的快照,快照2是对快照1做的快照,这样快照2就保留了快照1中的内容,用户就可以对快照1进行修改,而不用担心原快照内容丢失,同理快照3是对快照2做的快照,用户也可以对快照2进行修改,其修改内容与对快照1修改的内容可以不同。其中,快照2为快照1的子快照,且为快照3的父快照。
在读取级联快照中的子快照时,需要逐级向上查询数据。例如,在读取图1中的快照3时,需要依次读取快照3、快照2、快照1以及源LUN中的数据,才能够得到快照3所想要保护的某一时刻的完整数据。
因此,在现有技术中,有子快照的父快照不允许被删除,例如,若直接删除图1中的快照2,则在读取快照3时,由于无法读取到快照2中的数据,将导致数据读取失败或错误,因此,若要删除快照2,需先删除快照3,才能删除快照2。然而,在一些情况下,父快照中的数据可能不再被需要,但仍需保留其子快照的数据,由于不能删除子快照,从而造成资源的浪费。
发明内容
本发明实施例提供一种删除级联快照的方法及装置,用以实现在级联快照中删除具有子快照的快照,并保证子快照中数据映像不因删除快照而发生变更。
第一方面,本发明实施例提供的删除级联快照的方法,可应用于存储设备中,该存储设备中包含有逻辑卷,该逻辑卷对应多个级联快照,所述多个级联快照至少包括第一快照、第二快照和第三快照,所述第一快照包括目标数据,所述第二快照是所述第一快照的父快照,所述第一快照的父快照可以是独立的快照,也可以是所述逻辑卷,所第三快照是所述第一快照的子快照。该方法具体包括:
在接收到删除所述第一快照的指令后,将所述第一快照中的目标数据的信息迁移至所述第二快照中,其中,目标数据的信息包括第一快照的时间标记,所述第一快照的时间标记是在所述第一快照创建时设置的;将第三快照对应的父快照的标识设置为所述第二快照的标识,以使设置后的第三快照对应的父快照的标识表示第三快照的父快照是第二快照; 删除第一快照。
在上述实施例中,在删除第一快照时,即删除级联快照中的中间层级的快照时,将第一快照中的目标数据迁移至第一快照的父快照即第二快照中,使得删除第一快照后,在读取第一快照的子快照即第三快照时,仍能够从第二快照中读取到原第一快照中的目标数据,而不会造成数据读取失败或数据读取错误。
结合第一方面,在第一方面的第一种可能的实现方式中,上述逻辑卷对应的每个级联快照均具有时间标记,并且每个级联快照的时间标记是唯一的。在级联快照中,可能对逻辑卷做了多个快照,每个快照又包含多个子快照,此时快照数据繁多,情况复杂,在删除第一快照后,读取第三快照时,可能会造成数据混乱;而通过为逻辑卷的每个级联快照设置唯一的时间标记,即该逻辑卷中的每个级联快照有了唯一的标识,使得在删除第一快照后读取第三快照时能够根据该唯一的时间标记成功读取正确的数据,而不会造成数据混乱。
结合第一方面,在第一方面的第二种可能的实现方式中,第一快照的目标数据中包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对第一快照进行写时拷贝时所拷贝的数据,私有数据是指对第一快照进行写操作时写入的数据。当所述目标数据包括写时拷贝数据时,在执行将所述目标数据的信息迁移至所述第二快照中时,将所述写时拷贝数据的信息迁移至第二快照的写时拷贝数据中。由于当创建第一快照的子快照第三快照后,若对第一快照中的内容进行写操作时,会先将第一快照中的源数据拷贝到写时拷贝数据中,然后将写入的数据写到私有数据中,因此,若第一快照中包含有写时拷贝数据,说明在创建第三快照后对第一快照中的数据进行过写操作,而读取第三快照时希望读取的是创建第三快照时第一快照中的数据,即写时拷贝数据中的数据,故将第一快照中的写时拷贝数据的信息迁移至第二快照的写时拷贝数据中。
结合第一方面,在第一方面的第三种可能的实现方法中,第一快照的目标数据中包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对第一快照进行写时拷贝时所拷贝的数据,私有数据是指对第一快照进行写操作时写入的数据。当所述目标数据不包括写时拷贝数据时,在执行将目标数据的信息迁移至所述第二快照中时,将所述私有数据的信息迁移至第二快照的写时拷贝数据中。若第一快照中没有写时拷贝数据,说明在创建第三快照后没有对第一快照进行过写操作,故私有数据中的数据即为创建第三快照时第一快照中的数据,故将第一快照中的私有数据的信息迁移至第二快照的写时拷贝数据中。
结合第一方面,在第一方面的第四种可能的实现方法中,所述目标数据的信息中还包括目标数据的地址。由于迁移的是目标数据的地址,使得迁移过程能够快速实现,进而提高系统效率。
结合第一方面,在第一方面的第五种可能的实现方法中,所述唯一的时间标记,可以通过下述方法获得:创建一个快照时,获取所述逻辑卷的时间标记;将所创建的快照的时间标记设置为所述逻辑卷的当前的时间标记与预设阈值之和;将所述创建的快照的父快照、所述父快照的父快照直至源逻辑卷的时间标记,设置为依次递增,且所述创建的快照的父快照的时间标记大于所述创建的快照的时间标记。通过上述方法,能够保证源逻辑卷所对应的每个快照的时间标记唯一,使得在删除第一快照后读取第三快照时,能够根据唯一的时间标记从第二快照中读取到正确的数据。
第二方面,本发明实施例提供的删除级联快照的应用于存储设备中,所述存储设备包 括逻辑卷,所述逻辑卷对应多个级联快照,所述多个级联快照至少包括第一快照、第二快照和第三快照,所述第二快照是所述第一快照的父快照,所述第一快照的父快照可以是独立的快照,也可以是所述逻辑卷,所述第三快照是所述第一快照的子快照,所述装置包括:
接收模块,用于接收删除所述第一快照的指令,所述第一快照包括目标数据;
迁移模块,用于将所述目标数据的信息迁移至所述第二快照中,所述目标数据的信息包括所述第一快照的时间标记,所述第一快照的时间标记是在所述第一快照创建时设置的;
第一设置模块,用于将所述第三快照对应的父快照的标识设置为所述第二快照的标识,所述设置后的第三快照对应的父快照的标识表示所述第三快照的父快照是所述第二快照;
删除模块,用于删除所述第一快照。
结合第二方面,在第二方面的第一种可能的实现方法中,所述逻辑卷对应的每个级联快照均具有时间标记,并且每个级联快照的时间标记是唯一的。
结合第二方面,在第二方面的第二种可能的实现方法中,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;当所述目标数据包括写时拷贝数据时,所述迁移模块具体用于:将所述写时拷贝数据的信息迁移至所述第二快照的写时拷贝数据中。
结合第二方面,在第二方面的第三种可能的实现方法中,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;当所述目标数据不包括写时拷贝数据时,所述迁移模块,具有用于:将所述私有数据的信息迁移至所述第二快照的写时拷贝数据中。
结合第二方面,在第二方面的第四种可能的实现方法中,所述目标数据的信息中还包括:目标数据的地址。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的级联快照的示意图;
图2为适用于本发明实施例提供的数据处理系统结构示意图;
图3为适用于本发明实施例的控制器的结构示意图;
图4为本发明实施例提供的删除级联快照的方法的流程示意图;
图5为本发明实施例提供的设置时间标记的示意图;
图6为本发明实施例提供的创建级联快照的示意图;
图7为本发明实施例提供的删除级联快照的示意图;
图8为本发明实施例提供的删除级联快照的装置的结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
为了实现能够在级联快照中删除具有子快照的快照,本发明实施例提供了一种删除级联快照的方法,该方法可应用于存储设备中。
本发明实施例提供的删除级联快照的方法可以应用于如图2所示的数据处理系统,该系统至少包括主机100和存储设备200。该数据处理系统可以是存储区域网(Storage Area Networks,SAN),也可以是网络附加存储设备(Network Attached Storage,NAS)。
主机100,用于执行应用程序,向存储设备200发送控制指令,以读写数据,其中控制指令包括输入/输出指令。
存储设备200,可以是磁盘阵列等设备,用于存储数据以及操作指令。如图所示,存储设备200可以包括控制器210和存储介质220。
其中,控制器210可以进一步包括处理器211、存储器212、通讯接口213以及总线214,如图3所示。
处理器211可以是中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;也可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Applica tion Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件等。
存储器212可用于存储处理器211执行操作时的程序以及数据。
存储介质220可以包括多个磁盘,所述磁盘即为物理存储空间。
逻辑卷是软件层在物理存储空间的基础上划分的逻辑分区,逻辑卷可以根据需要扩展或缩减其大小。在需要对数据进行备份时,可以使用快照保存源逻辑卷上某一时刻的数据状态,而快照也可以被视为一个逻辑卷。
本发明实施例涉及的级联快照,即对源逻辑卷创建了子快照后,还可以对子快照创建子快照,甚至创建更多层级的子快照。因此,级联快照中至少包括第一快照、第二快照和第三快照,其中,第二快照是第一快照的父快照,第一快照的父快照可以是独立的快照,也可以指源逻辑卷,第三快照是第一快照的子快照。
参见图4,为本发明实施例提供的删除级联快照方法的流程示意图,其执行主体可以是如图3所示的处理器211,通过读取存储器212中的程序执行以下步骤:
步骤401、接收删除第一快照的指令。
步骤402、将第一快照中的目标数据的信息迁移至第二快照中。
可选地,目标数据的信息包括第一快照的时间标记,该第一快照的时间标记是创建第一快照时设置的;且源逻辑卷的每个级联快照均具有时间标记,每个级联快照的时间标记是唯一的。
将第一快照中的目标数据的信息迁移至第二快照中后,由于目标数据的信息中包括全局唯一的时间标记,能够使第一快照的目标数据与第二快照中的数据区分开来,使得在后续读取第三快照时,能够根据时间标记确定第三快照所需要的数据。
全局唯一的时间标记的设置方法,可以如图4所示:在创建一个新的子快照时,首先 获取源LUN当前的时间标记,设源LUN当前的时间标记为A,可以将新创建的子快照的时间标记设置为A+1,然后将父快照的时间标记设置为A+2,将源LUN的时间标记设置为A+3,使得在级联快照中,时间标记从源LUN到子快照依次递减。
图5所示的时间标记方法仅为一个具体的实施例,若新创建的快照是对源LUN做的快照,则在将新创建的快照的时间标记设置为A+1后,直接将源LUN的时间标记设置为A+2;若新创建的子快照的父快照还有父快照,则在将父快照的时间标记设置为A+2后,继续设置父快照的父快照的时间标记,直至设置源LUN的时间标记为止,以使时间标记从源LUN到最下层的子快照依次递减;此外,上述设置时间标记时以各层级间时间标记差值取1为例,但本发明并不限于此。
快照中的目标数据包括写时拷贝(Copy on Write,COW)数据和私有数据。COW技术,即在新数据第一次写入到某个存储位置时,首先将原有的内容读取出来,写到另一位置处(即COW数据),然后再将新数据写入到存储设备中(即私有数据),而下次针对这一位置的写操作将不再执行写时复制操作。COW数据是在创建子快照后才产生的。
在对第一快照创建子快照即第三快照后,再对第一快照进行写操作时,就会产生COW数据,因为第三快照关联的是创建第三快照时第一快照中的数据。在读取第三快照时,只关心创建第三快照时第一快照中的数据,对创建第三快照后写入第一快照数据并不关心。
在上述步骤402中,将第一快照中的目标数据的信息迁移至第二快照中时,对于每个数据地址上的数据,可先检测第一快照的目标数据中是否包含有COW数据。
若第一快照的目标数据中存在COW数据,说明在创建第三快照后对第一快照进行了写操作,则COW数据中保存的为写操作之前第一快照中的数据,即第三快照所关联的数据。因此,在将第一快照中的目标数据的信息迁移至第二快照中时,可以仅将第一快照中的COW数据的信息迁移至第二快照中。
若第一快照的目标数据中不包含COW数据,说明在创建第三快照后未对第一快照进行写操作,那么私有数据即为创建第三快照时第一快照中的数据,即第三快照所关联的数据。因此,在将第一快照中的目标数据的信息迁移至第二快照中时,将第一快照中的私有数据的信息迁移至第二快照中。
可选地,为了实现快速进行数据迁移,可以采用将第一快照中的目标数据的元数据迁移到第二快照中,即将第一快照中目标数据的地址迁移第二快照中。由于迁移的目标数据的信息中包括目标数据的地址和创建第一快照时第一快照的时间标记,使得迁移过程能够快速实现,进而提高系统效率。
步骤403、将第三快照对应的父快照的标识设置为第二快照的标识。
即设置后的第三快照对应的父快照的标识表示第三快照的父快照是第二快照。
步骤404、删除第一快照。
在本发明上述实施例中,若想要删除级联快照里中间层级的快照,即具有子快照的快照时,可以先将待删除的快照中的数据迁移至待删除快照的父快照中,以使删除待快照后,其子快照仍然能够从删除的快照的父快照中读取到子快照所关联的数据。
为了更清楚地理解本发明的上述实施例,下面以一个具体实施例,对本发明上述实施例的具体实现过程进行描述。
参见图6,为创建级联快照的示意图,其中:
CurTP,表示源LUN(快照)的时间标记;
ProTP,表示源LUN(快照)所保护的时间点;
BindTP,表示该快照所关联的父快照在创建该快照前的时间点。
在Time 0时刻,将源LUN的CurTP为1,在其私有数据(PriData)中,地址(Addr)为1的数据的时间点(TP)为1,表示写入该数据时源LUN的CurTP为1,由于没有对源LUN创建快照,此时源LUN没有COW数据。
在Time 1时刻,对源LUN创建了快照1,首先获取创建快照1之前源LUN的CurTP=1,因此将快照1的CurTP设置为2,再将源LUN的CurTP设置为3。对于源LUN,在创建快照1后,若再对源LUN进行写操作,在写入新数据前,需要将原始数据写入COW数据(CowData)中,原始数据即为TP为1的私有数据,因此,CowData中数据的TP为1;CowData的TP即为要保护的时间点(即ProTP),因此,源LUN的ProTP=1;而新写入的数据保存在PriData中,此时源LUN的CurTP为3,因此PriData的TP为3。对于快照1,快照1关联的是创建快照1前源LUN的数据,因此快照1的BindTP为创建快照1前源LUN的CurTP,即快照1的BindTP=1;对快照1进行了写操作,写入的数据保存到PriData中,写快照1时快照1的CurTP为2,因此,PriData的TP为2。
在Time 2时刻,对快照1创建了子快照,即快照2。首先获取创建快照2之前源LUN的CurTP=3,因此将快照2的CurTP设置为4,再将快照1的CurTP设置为5,将源LUN的CurTP设置为6。对于快照1,在创建快照2后,若再对快照1进行写操作,在写入新数据前,需要将原始数据写入CowData中,原始数据即为TP为2的PriData,因此,CowData中数据的TP为2;CowData的TP即为ProTP,因此,快照1的ProTP=2;而新写入的数据保存在PriData中,此时快照1的CurTP为5,因此PriData的TP为5。对于快照2,快照2关联的是创建快照2前快照1的数据,因此快照2的BindTP为创建快照2前快照1的CurTP,即快照2的BindTP=2;对快照2进行了写操作,写入的数据保存到PriData中,写快照2时快照2的CurTP为4,因此,PriData的TP为4。
在Time 3时刻,对快照2创建了子快照,即快照3。收下获取创建快照3之前LUN的CurTP=6,因此将快照3的CurTP设置为7,再将快照2的CurTP设置为8,将快照1的CurTP设置为9,将源LUN的CurTP设置为10。对于快照2,在创建快照3后,若再对快照2进行写操作,在写入新数据前,需要将原始数据写入CowData中,原始数据即为TP为4的PriData,因此,CowData中数据的TP为4;CowData的TP即为ProTP,因此,快照2的ProTP=4;而新写入的数据保存在PriData中,此时快照2的CurTP为8,因此PriData的TP为8。对于快照3,快照3关联的是创建快照3前快照2的数据,因此快照3的BindTP为创建快照3前快照2的CurTP,即快照3的BindTP=4。
在创建了级联快照后,若希望删除快照2,按照现有技术,不能直接删除快照2,需要先删除快照3才能删除快照2;而按照本发明实施例提供的方法,则可以直接删除快照2,而不必删除快照3,且删除快照2后,再读取快照3时也不会发生数据读取错误。参见图7,为应用本发明实施例提供的删除方法删除快照2的示意图。
在Time 4时刻,接收到删除快照2的指令后,先检测快照2中是否包含有CowData,检测到快照2中包含有CowData,因此将快照2中的CowData的信息迁移到快照1中。迁移的CowData的信息中包括CowData的Addr以及TP,其中TP即为创建快照2时快照的 CurTP,因为CurTP在源LUN的所有快照的CurTP中唯一,因此CowData的TP能够唯一标识快照2的数据,能够使得迁移到快照1中的CowData与快照1的CowData相区分。在将快照2的CowData迁移到快照1中后,即可删除快照2。
需要说明的是,在上述具体的实施例中,仅以Addr为1的数据为例。对于Addr1上的数据,因为存在CowData,所以将Addr1上的CowData信息迁移至快照1中。对于其他地址上的数据,也需要一一判断。
在另外一些实施例中,还可以先对需要快照2中所有位置上的数据进行CowData和PriData进行合并,合并时,对于每个位置上的数据,若存在CowData则保留CowData,否则保留PriData,然后将所有位置上经过合并后的数据迁移至快照1中。
基于相同的技术构思,本发明实施例还提供了一种删除级联快照的装置,用以实现上述方法实施例,应用于存储设备中,存储设备中包括逻辑卷,该逻辑卷对应多个级联快照,该多个级联快照至少包括第一快照、第二快照和第三快照,其中,第二快照是第一快照的父快照,第一快照的父快照可以是独立的快照,也可以是逻辑卷,第三快照是第一快照的子快照。
参见图8,为本发明实施例提供的删除级联快照的装置的结构示意图,如图所示,该装置包括:
接收模块801,用于接收删除所述第一快照的指令,所述第一快照包括目标数据;
迁移模块802,用于将所述目标数据的信息迁移至所述第二快照中;
设置模块803,用于将所述第三快照对应的父快照的标识设置为所述第二快照的标识,所述设置后的第三快照对应的父快照的标识表示所述第三快照的父快照是所述第二快照;
删除模块804,用于删除所述第一快照。
可选地,所述目标数据的信息包括所述第一快照的时间标记,所述第一快照的时间标记是在所述第一快照创建时设置的;所述逻辑卷对应的每个级联快照均具有时间标记,并且每个级联快照的时间标记是唯一的。
可选地,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;对于每个数据地址上的数据,当所述目标数据包括写时拷贝数据时,所述迁移模块802具体用于:将所述写时拷贝数据的信息迁移至所述第二快照的写时拷贝数据中。
可选地,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;对于每个数据地址上的数据,当所述目标数据不包括写时拷贝数据时,所述迁移模块802,具有用于:将所述私有数据的信息迁移至所述第二快照的写时拷贝数据中。
可选地,所述目标数据的信息中还包括:目标数据的地址。
在本发明上述实施例中,若想要删除级联快照里中间层级的快照,即具有子快照的快照时,可以先将待删除的快照中的数据迁移至待删除快照的父快照中,以使删除待快照后,其子快照仍然能够从删除的快照的父快照中读取到子快照所关联的数据。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程 和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (10)

  1. 一种删除级联快照的方法,其特征在于,所述方法应用于存储设备中,所述存储设备包括逻辑卷,所述逻辑卷对应多个级联快照,所述多个级联快照至少包括第一快照、第二快照和第三快照,所述第二快照是所述第一快照的父快照,所述第三快照是所述第一快照的子快照,所述方法包括:
    接收删除所述第一快照的指令,所述第一快照包括目标数据;
    将所述目标数据的信息迁移至所述第二快照中;
    将所述第三快照对应的父快照的标识设置为所述第二快照的标识,所述设置后的第三快照对应的父快照的标识表示所述第三快照的父快照是所述第二快照;
    删除所述第一快照。
  2. 根据权利要求1所述的方法,其特征在于,所述目标数据的信息包括所述第一快照的时间标记,所述第一快照的时间标记是在所述第一快照创建时设置的;
    所述逻辑卷对应的每个级联快照均具有时间标记,并且每个级联快照的时间标记是唯一的。
  3. 根据权利要求1所述的方法,其特征在于,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;
    对于每个数据地址上的数据,当所述目标数据包括写时拷贝数据时,所述将所述目标数据的信息迁移至所述第二快照中,包括:
    将所述写时拷贝数据的信息迁移至所述第二快照的写时拷贝数据中。
  4. 根据权利要求1所述的方法,其特征在于,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;
    对于每个数据地址上的数据,当所述目标数据不包括写时拷贝数据时,所述将所述目标数据的信息迁移至所述第二快照中,包括:
    将所述私有数据的信息迁移至所述第二快照的写时拷贝数据中。
  5. 根据权利要求1所述的方法,其特征在于,所述目标数据的信息中还包括:目标数据的地址。
  6. 一种删除级联快照的装置,其特征在于,所述装置应用于存储设备中,所述存储设备包括逻辑卷,所述逻辑卷对应多个级联快照,所述多个级联快照至少包括第一快照、第二快照和第三快照,所述第二快照是所述第一快照的父快照,所述第三快照是所述第一快照的子快照,所述装置包括:
    接收模块,用于接收删除所述第一快照的指令,所述第一快照包括目标数据;
    迁移模块,用于将所述目标数据的信息迁移至所述第二快照中;
    设置模块,用于将所述第三快照对应的父快照的标识设置为所述第二快照的标识,所述设置后的第三快照对应的父快照的标识表示所述第三快照的父快照是所述第二快照;
    删除模块,用于删除所述第一快照。
  7. 根据权利要求6所述的装置,其特征在于,所述目标数据的信息包括所述第一快照的时间标记,所述第一快照的时间标记是在所述第一快照创建时设置的;
    所述逻辑卷对应的每个级联快照均具有时间标记,并且每个级联快照的时间标记是唯一的。
  8. 根据权利要求6所述的装置,其特征在于,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;
    对于每个数据地址上的数据,当所述目标数据包括写时拷贝数据时,所述迁移模块具体用于:将所述写时拷贝数据的信息迁移至所述第二快照的写时拷贝数据中。
  9. 根据权利要求6所述的装置,其特征在于,所述目标数据包括写时拷贝数据和/或私有数据,其中,写时拷贝数据是指对所述第一快照进行写时拷贝时所拷贝的数据,私有数据是指对所述第一快照进行写操作时写入的数据;
    对于每个数据地址上的数据,当所述目标数据不包括写时拷贝数据时,所述迁移模块,具有用于:将所述私有数据的信息迁移至所述第二快照的写时拷贝数据中。
  10. 根据权利要求6所述的装置,其特征在于,所述目标数据的信息中还包括:目标数据的地址。
PCT/CN2017/081345 2016-09-30 2017-04-21 一种删除级联快照的方法及装置 WO2018058944A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP17854402.9A EP3499358B1 (en) 2016-09-30 2017-04-21 Method and device for deleting cascade snapshot
US16/370,959 US11093162B2 (en) 2016-09-30 2019-03-30 Method and apparatus for deleting cascaded snapshot

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610874664.XA CN106569738B (zh) 2016-09-30 2016-09-30 一种删除级联快照的方法及装置
CN201610874664.X 2016-09-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/370,959 Continuation US11093162B2 (en) 2016-09-30 2019-03-30 Method and apparatus for deleting cascaded snapshot

Publications (1)

Publication Number Publication Date
WO2018058944A1 true WO2018058944A1 (zh) 2018-04-05

Family

ID=58532560

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/081345 WO2018058944A1 (zh) 2016-09-30 2017-04-21 一种删除级联快照的方法及装置

Country Status (4)

Country Link
US (1) US11093162B2 (zh)
EP (1) EP3499358B1 (zh)
CN (1) CN106569738B (zh)
WO (1) WO2018058944A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981574A (zh) * 2023-03-10 2023-04-18 阿里巴巴(中国)有限公司 一种快照存储方法、系统、设备及存储介质

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569738B (zh) * 2016-09-30 2019-11-29 华为技术有限公司 一种删除级联快照的方法及装置
US10503602B2 (en) * 2018-01-12 2019-12-10 Vmware Inc. Deletion and restoration of archived data in cloud/object storage
CN110399333B (zh) * 2018-04-20 2023-07-18 伊姆西Ip控股有限责任公司 删除快照的方法、设备和计算机程序产品
CN109117308A (zh) * 2018-07-27 2019-01-01 华为技术有限公司 快照处理的方法和装置
CN109324870A (zh) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 一种用于删除虚拟机的快照盘的方法和装置
CN110515543B (zh) * 2019-08-02 2021-02-19 星辰天合(北京)数据科技有限公司 基于对象存储桶的快照方法、装置和系统
CN110990194A (zh) * 2019-11-22 2020-04-10 浪潮(北京)电子信息产业有限公司 一种快照停止时间的计算方法、计算系统及相关装置
CN111124756A (zh) * 2019-12-18 2020-05-08 浪潮(北京)电子信息产业有限公司 一种快照关系的展示方法、装置、设备及介质
CN112347037A (zh) * 2020-10-13 2021-02-09 北京天融信网络安全技术有限公司 存储卷的快照处理方法、装置、介质和电子设备
CN113448774B (zh) * 2021-06-04 2023-01-24 山东英信计算机技术有限公司 优化写时拷贝存储快照管理的方法、系统、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140536A (zh) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 一种支持级联快照的快照系统及其快照处理方法
CN103077099A (zh) * 2013-01-08 2013-05-01 中国科学院计算技术研究所 一种块级快照系统及基于该系统的用户读写方法
US20160231944A1 (en) * 2015-02-05 2016-08-11 Red Hat, Inc. Peer to peer volume merge and delete in a shared storage environment
CN106569738A (zh) * 2016-09-30 2017-04-19 华为技术有限公司 一种删除级联快照的方法及装置

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7165156B1 (en) * 2002-09-06 2007-01-16 3Pardata, Inc. Read-write snapshots
US7240172B2 (en) * 2003-02-07 2007-07-03 Sun Microsystems, Inc. Snapshot by deferred propagation
US20060047926A1 (en) * 2004-08-25 2006-03-02 Zheng Calvin G Managing multiple snapshot copies of data
US8723842B2 (en) 2005-03-01 2014-05-13 Wacom Co., Ltd Position pointing device and hand-held electronic appliance
JP4749112B2 (ja) * 2005-10-07 2011-08-17 株式会社日立製作所 記憶制御システム及び方法
US7915456B2 (en) * 2005-12-20 2011-03-29 Raug Ammotec Gmbh Salts of styphnic acid
US9098347B2 (en) * 2006-12-21 2015-08-04 Vmware Implementation of virtual machine operations using storage system functionality
US7882068B2 (en) * 2007-08-21 2011-02-01 Isilon Systems, Inc. Systems and methods for adaptive copy on write
CN100565530C (zh) * 2007-12-17 2009-12-02 中国科学院计算技术研究所 一种快照系统及其使用方法
US7991973B2 (en) * 2008-05-05 2011-08-02 Panasas, Inc. Data storage systems, methods and networks having a snapshot efficient block map
US8515911B1 (en) * 2009-01-06 2013-08-20 Emc Corporation Methods and apparatus for managing multiple point in time copies in a file system
US8892845B2 (en) * 2010-12-22 2014-11-18 Cleversafe, Inc. Segmenting data for storage in a dispersed storage network
US20120226667A1 (en) * 2011-03-02 2012-09-06 Cleversafe, Inc. Determining a staleness state of a dispersed storage network local directory
CN103473277B (zh) * 2013-08-27 2017-04-05 华为技术有限公司 文件系统的快照方法和装置
GB2520043A (en) * 2013-11-07 2015-05-13 Ibm Sharing of snapshots among multiple computing machines
CN104360914B (zh) * 2014-10-22 2017-10-13 浪潮(北京)电子信息产业有限公司 增量快照方法和装置
US9952767B2 (en) * 2016-04-29 2018-04-24 Netapp, Inc. Consistency group management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140536A (zh) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 一种支持级联快照的快照系统及其快照处理方法
CN103077099A (zh) * 2013-01-08 2013-05-01 中国科学院计算技术研究所 一种块级快照系统及基于该系统的用户读写方法
US20160231944A1 (en) * 2015-02-05 2016-08-11 Red Hat, Inc. Peer to peer volume merge and delete in a shared storage environment
CN106569738A (zh) * 2016-09-30 2017-04-19 华为技术有限公司 一种删除级联快照的方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3499358A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981574A (zh) * 2023-03-10 2023-04-18 阿里巴巴(中国)有限公司 一种快照存储方法、系统、设备及存储介质
CN115981574B (zh) * 2023-03-10 2023-08-04 阿里巴巴(中国)有限公司 一种快照存储方法、系统、设备及存储介质

Also Published As

Publication number Publication date
EP3499358B1 (en) 2023-03-01
CN106569738B (zh) 2019-11-29
EP3499358A4 (en) 2019-07-31
EP3499358A1 (en) 2019-06-19
US11093162B2 (en) 2021-08-17
US20190227733A1 (en) 2019-07-25
CN106569738A (zh) 2017-04-19

Similar Documents

Publication Publication Date Title
WO2018058944A1 (zh) 一种删除级联快照的方法及装置
AU2012347883B2 (en) System and method for restoring application data
US9348827B1 (en) File-based snapshots for block-based backups
US9514004B2 (en) Restore in cascaded copy environment
US9411821B1 (en) Block-based backups for sub-file modifications
US8473462B1 (en) Change tracking for shared disks
US8117168B1 (en) Methods and systems for creating and managing backups using virtual disks
RU2665307C2 (ru) Восстановление приложения из моментального снимка
WO2017132872A1 (zh) 虚拟机备份方法、备份装置及宿主机
US9524215B1 (en) Systems and methods for managing virtual machine backups
US11210177B2 (en) System and method for crash-consistent incremental backup of cluster storage
CN105593829A (zh) 从原始映像备份中排除文件系统对象
WO2013170702A1 (zh) 基于快照的文件处理方法及具有快照功能的固态硬盘
US8972351B1 (en) Systems and methods for creating selective snapshots
JP2017531892A (ja) ブロックレベル記憶デバイスのスナップショットを実行するための改善された装置および方法
US20240045770A1 (en) Techniques for using data backup and disaster recovery configurations for application management
US11175999B2 (en) Management of backup volume extents via a tiered storage mechanism
US9830471B1 (en) Outcome-based data protection using multiple data protection systems
WO2014111773A1 (en) Data backup recovery
WO2019080717A1 (zh) 一种磁盘快照的数据处理方法及装置
US10048890B1 (en) Synchronizing catalogs of virtual machine copies
US9563633B1 (en) Trimming unused blocks from a versioned image backup of a source storage that is stored in a sparse storage
US9372638B1 (en) Systems and methods for backing up virtual machine data
US10146467B1 (en) Method and system for archival load balancing
CN111158858B (zh) 一种虚拟机的克隆方法和装置,及计算机可读存储介质

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017854402

Country of ref document: EP

Effective date: 20190314

NENP Non-entry into the national phase

Ref country code: DE