CN108604201B - Snapshot rollback method, device, storage controller and system - Google Patents

Snapshot rollback method, device, storage controller and system Download PDF

Info

Publication number
CN108604201B
CN108604201B CN201680003118.7A CN201680003118A CN108604201B CN 108604201 B CN108604201 B CN 108604201B CN 201680003118 A CN201680003118 A CN 201680003118A CN 108604201 B CN108604201 B CN 108604201B
Authority
CN
China
Prior art keywords
snapshot
version number
source data
data
target
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201680003118.7A
Other languages
Chinese (zh)
Other versions
CN108604201A (en
Inventor
陆丞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN108604201A publication Critical patent/CN108604201A/en
Application granted granted Critical
Publication of CN108604201B publication Critical patent/CN108604201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Retry When Errors Occur (AREA)

Abstract

A snapshot rollback method, apparatus, storage controller and system are disclosed, in which the storage controller receives a rollback request including a target snapshot ID; obtaining a version number of source data of the target snapshot and obtaining a version number of the target snapshot identified by the target snapshot ID, wherein the target snapshot is a snapshot of the source data; and establishing a pointing relationship between the version number of the source data and the version number of the target snapshot. Fast rollback of snapshots may be achieved using this technique.

Description

Snapshot rollback method, device, storage controller and system
Technical Field
The present invention relates to the field of storage, and more particularly, to the field of snapshot technology.
Background
In recent years, with the continuous development of information science and technology and the wide application of the internet, the amount of generated data has rapidly increased at an incredible speed, and the progress of business has made higher demands on data processing technology in terms of availability, reliability, expandability, and the like. On one hand, the requirements of data protection, data backup and data parallel utilization (such as testing, report generation, data analysis and the like) are more and more important; on the other hand, the online business model requires the system to run continuously, and the shutdown means the stoppage of business and the loss of business opportunities. Thus, data snapshot techniques have been developed to improve the reliability of data.
Using data snapshot techniques, a point-in-time consistent image (i.e., snapshot) of fully available volume data can be obtained almost instantaneously and occupy less storage space. When the application failure or file damage occurs to the storage device, the data can be quickly restored, and the data is restored to the state (namely, snapshot rollback) at a certain available time point, so that online data backup and restoration are realized.
Using snapshot backup, data can be restored quickly in the following scenarios:
(1) and (4) viral infection.
(2) And (4) manual misoperation.
(3) And (4) malicious tampering.
(4) Data corruption due to system downtime.
(5) Data corruption by the application BUG.
(6) Data corruption due to the storage system BUG.
(7) Storage media is corrupted (only snapshots based on split mirror technology can recover data).
Fig. 1 illustrates the whole process of data backup and recovery by using snapshot, taking virus infection as an example: (1) a snapshot is generated on the service data periodically every hour, and only the difference data is additionally stored during snapshot, so that the data volume is small; (2) after the problem that the data at 5 pm is infected by the virus is found, the data is rolled back (roll back) by using the latest snapshot (the snapshot of the version number 3) to restore the data to the state before the data is infected by the virus, so that the damage caused by the virus infection is avoided.
In the example of FIG. 1, assuming that the current time is 6 PM, then the current version of the file system is the 6 PM data. If the host requests to roll back the file system to the 4 pm state, i.e., to snapshot 3, the specific operation is to copy the data of snapshot 3 to the current file system and then delete the contents of snapshot 3. This rollback process involves a large amount of data replication and therefore a large amount of consumption of system computational resources.
Disclosure of Invention
In a first aspect, the present invention provides an embodiment of a snapshot rollback method, executable by a controller, the method including: the method comprises the steps that a storage controller receives a rollback request, wherein the rollback request comprises a target snapshot ID; the storage controller obtains a version number of source data of the target snapshot and obtains a version number of the target snapshot identified by the target snapshot ID, wherein the target snapshot is a snapshot of the source data; and establishing a pointing relationship between the version number of the source data and the version number of the target snapshot. This directional relationship may also be referred to as a "redirect" relationship. By using the scheme, the rapid rollback can be realized, and data copy does not exist in the rollback process, so that system resources are saved.
In a possible design, the rollback request further carries a data ID, and the obtaining of the version number of the source data of the target snapshot specifically includes: and obtaining the version number of the source data of the target snapshot according to the data ID. The target snapshot can be found using the data ID. In some cases, for example, where the source data is a file system and there is only one file system in the storage system, the data ID may not be carried. Therefore, carrying the data ID is optional.
In one possible design, the method further includes: the memory controller receiving a first read request, the first read request including a first target address; acquiring data requested by a first read request from the source data according to the first target address; and when the source data does not contain the requested data, acquiring from the target snapshot according to the direction relationship. The scheme describes how data is read by address.
In one possible design, the method further includes: the storage controller receives a write request, wherein the write request comprises a write address and data needing to be updated; finding a target block according to the write address; and writing the data needing to be updated into the target block according to the write address. The scheme describes how data is written by address.
In one possible design, the method further includes: the obtaining, by the storage controller, the version number of the source data specifically includes: the storage controller searches the source data according to the target snapshot ID; and the storage controller obtains the version number of the source data according to the searched source data.
In one possible design, before initiating the rollback operation, the method further includes: the storage controller updates a version number of the source data. An update of the version number may show that the source data is subject to a rollback operation. The version number update operation may also be performed after rollback.
In one possible design, prior to receiving the rollback request, establishing: the version number of the source data points to the pointing relationship of the version number of the snapshot generated recently; among the snapshots, the version number of each snapshot points to the relationship of the version number of the snapshot generated last time. The embodiment of the invention establishes the pointing relationship between the file system and the snapshots and between the snapshots. Using version numbers to describe this pointing relationship is an alternative approach.
In one possible design, the source data is a file system or logical unit number, LUN.
In a second aspect, the present invention provides an embodiment of a snapshot rollback apparatus. The first aspect or each of the possible devised methods of the first aspect may be performed with corresponding technical effects. And will not be described further herein.
In a third aspect, the present invention provides a storage controller comprising a processor and an interface, the interface being arranged to receive a rollback request and to forward the rollback request to the processor, and the processor being arranged to perform (e.g. by running a program) the method of the first aspect or each of the possible designs of the first aspect, with the corresponding technical effect. And will not be described further herein.
In a fourth aspect, the present invention provides a snapshot rollback system, including the second aspect or a snapshot rollback apparatus possibly designed in each of the second aspects, and further including a storage medium, where the storage medium is used to store the target snapshot and the file system. Having the technical effect of the second aspect or of each possible design of the second aspect. And will not be described further herein.
In a fifth aspect, the present invention provides a snapshot rollback system, including the second aspect or a snapshot rollback apparatus as possibly designed in each of the second aspects, and further including a storage medium, where the storage medium is used to store the target snapshot and the file system. Having the technical effect of the second aspect or of each possible design of the second aspect. And will not be described further herein.
Drawings
FIG. 1 is a diagram illustrating a prior art process for data backup and recovery using snapshots;
FIG. 2 is a schematic diagram of an embodiment of a redirection relationship of the present invention;
FIG. 3 is a schematic diagram of another redirection relationship embodiment of the present invention;
FIG. 4 is a schematic diagram of another redirection relationship embodiment of the present invention;
FIG. 5 is a schematic diagram of another redirection relationship embodiment of the present invention;
FIG. 6 is a flow chart of an embodiment of a snapshot rollback method of the present invention;
FIG. 7 is a topology diagram of an embodiment of a snapshot mechanism of the present invention;
FIG. 8 is a schematic structural diagram of a memory controller according to an embodiment of the present invention.
Detailed Description
The snapshot technology is a common technology in the field of storage, a snapshot is an image of data at a certain moment, and the data can be protected by using the snapshot, so that the reliability of the data can be improved.
The data from which the snapshot is created is referred to as the source data. There are various types of source data, for example: for brevity, a file system will be described as an example hereinafter, and part or all of data and the like stored in a Logical Unit Number (LUN). For a write request received by a storage system, if the write request carries new data, the new data can be written into source data; if the data carried in the write request has no changed content compared with the data of the snapshot record, the data may not be written. After the snapshot is created, the newly generated snapshot may save the difference data between the current source data and the previous snapshot. The contents of the file system at the point of the snapshot can be restored by taking the snapshot, and the process of restoring data using the snapshot is called rollback.
Each snapshot of the file system has a version number, as does the file system itself. The version number may reflect the order of snapshot generation. Using version numbers allows for distinguishing between different versions of snapshots and the file system. One common version number rule is: the version number includes a numerical value, and the numerical value in the version number of the snapshot is larger as the time of generation is later, and the numerical value of the version number of the file system is largest. In addition, the version number may also be a letter or other symbols, so long as it is within the protection scope of the present embodiment to distinguish different snapshots. The snapshots of the file system described in the embodiments of the present invention are based on the same file system, and for simplicity and convenience of description, the snapshots of the file system are hereinafter referred to as snapshots for short. Since the snapshot is generated by performing a "snapshot operation" on the file system, in other words, the file system is the data source of the snapshot, the file system is also referred to as the source file system.
In the embodiment of the invention, the pointing relationship between the file system and the snapshots of different versions is established. The pointing relationship comprises a pointing relationship between the version number of the file system and the version number of the snapshot, and a pointing relationship between the version number of the snapshot at a certain moment and the version number of the previous snapshot. If the pointing relationship is that the file system points to the snapshot, content that is not read from the file system may be read from its redirected snapshot. If the pointing relationship is that the snapshot points to the snapshot, according to the pointing relationship, the content which cannot be read from one snapshot can be read from the snapshot to which the pointing relationship points. In other words, using the pointing relationship, an access request for data that is unavailable in the file system can be jumped to the targeted snapshot for acquisition.
By setting the pointing relationship, the file system can be pointed to the target snapshot, and for the access of the file system, if the requested data is not found in the file system, the data can be acquired from the target snapshot instead, so that the effect of rolling back the file system to the target snapshot is realized. After the rollback, the contents of the file system at the time of the rollback may be accessed. For example, at 11:00, the file system is rolled back to time 10:00, and the content of the file system at time 10:00 can be accessed. Since the pointing relationship is only established, no data copying occurs. Therefore, the embodiment of the invention can realize snapshot rollback without data copying. The data of the other snapshots is not affected by rollback, and no snapshot is deleted or modified, and the other snapshots can still be accessed normally.
Before rolling back, the embodiment may establish the pointing relationship between the snapshots and the pointing relationship between the file system and the snapshots in advance. The pointing relationship between snapshots may be determined by the time of generation of the snapshots. In one embodiment, the snapshot is generated at a time determined by the numerical size of the version number, and then the pointing relationship includes that the file system represented by the larger-numerical version number points to the snapshot represented by the adjacent smaller-numerical version number, and the snapshot represented by the smaller-numerical version number points to the snapshot represented by the adjacent smaller-numerical version number.
A series of consecutive pointers, we call the version number path. Referring to FIG. 2, there is a version number path, referred to as version number path 0. In the version number path, according to the descending of the version number, the direction relationship is as follows: version number 3 filesystem > version number 2 snapshot > version number 1 snapshot. This series of pointers is described by version number path 0. Where version number 3 is the version number of the file system and version number 2 and version number 1 are both the version numbers of the snapshots.
If a rollback operation is performed, a pointing relationship between the file system and the snapshot being rolled back is established. Moreover, the version number of the file system can be updated, for example, the version number of the original file system is added with 1. Referring to fig. 3, based on fig. 2, rolling back the current file system to snapshot 1, establishes a pointing relationship between the current version file system and snapshot 1. And, a new version number is given to the file system. For example, the original file system version number is 3, 1 is added to the original current version number, and the current file system version number is updated to 4.
After the rollback operation, snapshot 2 is still preserved in the storage system. In the re-pointing relationship, snapshot 2 and the file system both point to snapshot 1. Thus forming two version number paths, version number path 0 and version number path 1.
If new snapshots continue to be created, the version number of the file system is updated each time a new snapshot is created. For example, adding 1 to the version number of the file system; the version number of the file system before the update serves as the version number of the newly created snapshot. Referring to fig. 4, if on the basis of fig. 3, snapshot 3 and snapshot 4 are created again. There are a total of 5 version numbers, of which 4 are used to mark snapshots; the 1 version number is obtained by updating on the basis of the original file system version number and is used for marking the file system.
Each rollback operation generates a pointing relationship from the file system to the snapshot; thus, each rollback operation results in a new version number path. The version number path formed between existing snapshots remains unchanged. Referring to FIG. 5, and so on, when the file system is rolled back to snapshot 3, according to the rules described above. A version number path is again generated in which the file system points to snapshot 3. The pointing relationship between the snapshots in the original version number path 0 and version number path 1 remains unchanged. Thus, there are a total of 3 version number paths: version number path 0 (snapshot 2- > snapshot 1), version number path 1 (snapshot 4- > snapshot 3), and version number path 2 (file system- > snapshot 3).
Referring to fig. 6, a topology diagram of an embodiment of the storage system of the present invention is shown. The storage controller 11 and the hard disk 12 are connected to form a storage system together, and provide data storage service for the host 13. The storage controller 11 manages the hard disk 12 and provides a storage interface 112 for the host 13, and the storage controller 11 further includes a processor 111 and a memory 113. The hard disk 12 provides a storage space that can be used for storing snapshots and a file system, and in other embodiments, the hard disk 12 can be other storage media, such as a solid state disk.
In fig. 6, the controller 11 and the hard disk 12 are two devices independent of each other. In other embodiments, the storage controller 11 may also integrate a hard disk therein, so that the storage controller 11 forms a complete storage system. In other words, the storage medium may be provided inside or outside the storage controller as long as a storage space can be provided.
A flowchart of a snapshot rollback method embodiment of the present invention, the steps of which may be performed by a controller. Specifically, the method comprises the following steps.
The controller establishes 21 a pointing relationship between the snapshots, and a pointing relationship between the file system and the snapshots.
The pointing relationship between snapshots may be determined by the chronological order in which the snapshots are generated, each pointing to the previous generated snapshot. It will be appreciated that the earliest generated snapshot does not point to other snapshots. The file system points to the latest snapshot generated. Forming a chain structure. The pointed-to snapshot is the next-level snapshot of the file system/snapshot to which it is pointed.
The orientation describes the direction of acquisition of the content in the file system. According to the pointing relationship, the contents which cannot be read from the file system/snapshot can be tried to be obtained from the snapshot pointed to by the contents; if the data still cannot be read, attempting to obtain the data from the next snapshot; until the content needing to be read is acquired. The contents to be read may be read in units of blocks (blocks).
The above-mentioned pointing relationships may be described by version numbers. The specific method comprises the following steps: and establishing a pointing relationship between the version numbers of the snapshots and a pointing relationship between the version numbers of the file systems and the version numbers of the snapshots.
This step 21 is a preset step and is performed before the rollback operation. Therefore, this step is not necessary for the rollback flow.
22, the storage controller receives a rollback request sent by the host, wherein the rollback request carries the data ID of the file system and the target snapshot ID. The rollback request is used to request that the file system be rolled back to the data at the snapshot version generation time represented by the target snapshot ID.
The data ID is used to uniquely identify the source data, for example, when the source data is a LUN, the data ID is a LUN ID; or, when the source data is a file system, the data ID is an ID of the file system, and is used to uniquely identify the file system. Snapshots generated by the same file system have different snapshot IDs, but share the same data ID as the file system. Thus, both the data ID and snapshot ID in combination can be located to a unique snapshot.
The data ID is optional, and in some cases, such as when there is only one file system in the system, the data ID is not needed to find the file system and a snapshot of that file system. Each snapshot corresponds to a snapshot ID. The target snapshot ID is the ID of the snapshot that needs to be rolled back to.
In other embodiments, the rollback request may not be issued by the host, such as being generated internally by the storage controller.
23, the storage controller obtains the version number of the file system and the version number of the target snapshot corresponding to the target snapshot ID.
From the data ID, the file system and the version number of the file system can be obtained. From the data ID, snapshots of the respective versions and version numbers of the snapshots of the respective versions can also be obtained.
And obtaining the version number of the target snapshot corresponding to the target snapshot ID according to the target snapshot ID.
The two version numbers are not acquired sequentially in time order. Can be obtained simultaneously, or can be obtained firstly and then after the other.
And 24, updating the version number of the file system by the storage controller.
Both the version number of the file system and the version number of the snapshot may be numbers. One update method is to add 1 to the version number of the current version object as the version number of the new current version object.
One of the effects of version number updates is that it can be shown that the file system is subject to a rollback operation.
In other embodiments, the version number may not be updated, and the original version number of the file system may be kept unchanged. In other words, this step is optional.
25, the storage controller initiating a rollback operation, the rollback operation comprising: and establishing a pointing relation pointing to the target snapshot from the file system.
This pointing relationship may be described by a pointing relationship between the version number of the file system and the version number of the target snapshot.
In addition, the file system's point relationships to other snapshots can be cancelled.
The above steps 22-25 are rollback procedures, and the following step 26 describes the rollback procedure. How to read data in a file system.
26, the storage controller receives a first read request sent by a host, where the first read request carries a data ID of a file system and a first target address. The first read request is for requesting reading of first target data in the file system. And the storage controller acquires the first target data according to the pointing relationship and returns the first target data to the host.
The first target address may be described by a Logical Block Address (LBA) and a data length. Wherein the logical block address describes a starting location of the first target data in the storage device and the data length describes a size of the first target data.
Furthermore, the first target address may also be described by a first address and an end address together. The memory controller obtains the ID of the block (for example, the address of the block) where the first target data is located, based on the first target address. And reading and writing the content by taking the block as granularity. The first target data is in one block or in a plurality of blocks in succession. And finding the file system by using the file system ID, and searching the block needing to be read from the file system by using the block ID.
After the rollback operation is started, if new data is written, the new data is written into the file system subjected to the rollback operation. Thus, first a block is looked up from the file system.
For any block, firstly searching from the file system; if the block is not found in the file system, searching from the next-level snapshot in sequence according to the pointing relationship; if not, looking up from the next level snapshot until the block position needing to be read is obtained. First target data is obtained from the found block and returned to the host.
It should be noted that when storing a file system or a snapshot in a storage medium, for a block storing valid data, the LBA of the block is recorded, and the LBA may be stored in the memory 113 for the controller to read. The LBAs are recorded, for example, in the manner that the LBA and physical address (PBA) mapping of the blocks is recorded in the controller. Therefore, when reading the data in the block, it can find out whether there is a corresponding block in the file system or a snapshot according to the LBA of the block carried in the read request.
Optionally, if the file system ID is not carried in the access request for the file system content, the default is to access the file system.
As previously mentioned, the pointing relationship describes the direction of acquisition of content in the file system. It is therefore possible to try to obtain the requested block level by level starting from the file system according to the pointing relationship described by the pointing relationship. We describe one of the blocks as an example, and name this block as the first target block. Then: if the first target block is obtained from the file system, directly returning to the host; if the first target block is not obtained in the file system, finding the first target block from the snapshot pointed by the file system, and if the first target block is found, returning the first target block to the host; otherwise, searching the target block from the snapshot pointed by the file system, and returning to the host if the target block is searched; otherwise, continuing to try to obtain the target block in the next-level snapshot; and circulating the steps until the target block is found. And reading the first target block, and returning the content belonging to the first target data in the first target block to the host. The blocks are constituent units of the snapshot and file system.
Step 26 may be performed at any time after step 21 as long as there is a pointing relationship between the file system and any snapshot in the storage system.
In one embodiment, step 26 may be performed after step 25. In this case, the storage controller obtains the data requested by the first read request from the source data according to the first target address, and obtains the part which cannot be obtained from the source data from the target snapshot according to the direction relationship. And for the part which cannot be acquired in the target snapshot, acquiring the part from the snapshot pointed by the target snapshot according to the pointing relationship. And searching step by step according to the snapshot pointing relationship until all the data requested by the first target address is obtained.
In step 26, how the storage controller handles read requests issued by the host is described. For a write request from the host, the storage controller processes the write request in a manner similar to step 26, for example, the write request carries a file system ID and a write address for writing data. The only difference is that: the write request additionally carries system data that needs to be updated to the file system. The storage controller uses the write request to carry the write address to find the location of the target block in the file system, and then writes the target content to the target block.
27, the storage controller receives a second read request sent by the host, where the second read request carries the snapshot ID and the second target address. And the storage controller acquires second target data according to the pointing relation and returns the second target data to the host.
Step 27 is based on the pointing relationship between the snapshots established in step 21 and may be performed at any time after step 21. The difference from step 26 is that the first target data requested to be read by the first read request in step 26 is data of the file system, and the second target data requested to be read by the second read request in step 27 is data in the snapshot.
The controller obtains the ID of the block (e.g., the address of the block) where the second target data is located, based on the first target address. The second target data may be in one block or may be distributed in a plurality of blocks. The snapshot ID is used to find the snapshot represented by the snapshot ID. One block referred to by the second target data is named as a second block, and the reading process is similar to the step 26: finding a second target block from the snapshot using the block ID; if the second target block is not found, sequentially finding the second target block from the next-stage snapshot according to the pointing relation; until the second target block is obtained. And returning the part of the second target block belonging to the second target data to the host.
Since the specific process is similar to step 26, except that the target to be read is changed from the file system to a snapshot, reference is made to step 26, which is not described in detail here.
Step 27 illustrates how the snapshot data is read, and may be performed alone, during the execution of steps 22-26, or after step 26.
Referring to fig. 8, the present invention further provides an embodiment of a snapshot rollback apparatus, to which the snapshot rollback method described above may be applied. The snapshot rollback apparatus 3 includes: a receiving module 31, a version number processing module 32, a rollback module 33, and a reading module 34. The snapshot rollback apparatus may be hardware, such as a storage controller. Or software, such as a program running on a memory controller, or a combination of software and hardware. Since the snapshot rollback method embodiment corresponding to the snapshot rollback apparatus embodiment has been described in more detail, the functions of the modules are only briefly described below.
The receiving module 31 is configured to receive a rollback request, where the rollback request includes a target snapshot ID. The version number processing module 32 is in communication with the receiving module 31, and is configured to obtain a version number of source data of the target snapshot and obtain a version number of the target snapshot corresponding to the target snapshot ID, where the target snapshot is a snapshot of the source data. The rollback module 33, in communication with the version number processing module 32, is configured to establish a relationship that the version number of the source data points to the version number of the target snapshot. The source data is a file system or logical unit number LUN.
Optionally, the rollback request further carries a data ID, and the obtaining, by the version number processing module, the version number of the source data of the target snapshot specifically includes: and the version number processing module obtains the version number of the source data of the target snapshot according to the data ID.
Optionally, the present invention further provides an embodiment of the degree data: the receiving module is further configured to receive a first read request, where the first read request includes a first target address; the rollback apparatus further includes a reading module 34, configured to obtain, according to the first target address, data requested by the first read request from the source data, and obtain, according to a pointing relationship, a portion that cannot be obtained from the source data from the target snapshot.
Optionally, the version number processing module obtains the version number of the source data specifically as follows: the version number processing module searches the source data according to the target snapshot ID; and the version number processing module acquires the version number of the source data according to the searched source data. In other embodiments, there may be other schemes to obtain the version number of the source data, for example, directly carry the version number of the source data in the rollback request.
The pointing relationship between the version number of the source data and the version number of the target snapshot is as follows: and jumping to the access request which can not obtain data in the file system to obtain from the pointed target snapshot.
The optional version number processing module is further configured to: the version number of the source data is updated before the rollback operation is initiated. For example, adding 1 to the version number of the source data as the new source data version number.
The version number processing module is further configured to: establishing a pointing relationship upon initialization of the rollback apparatus, the pointing relationship comprising: the version number of the source data points to the pointing relationship of the version number of the snapshot generated recently; and between the snapshots, the version number of each snapshot points to the last generated snapshot's version number.

Claims (16)

1. A snapshot rollback method, comprising:
the storage controller establishes a pointing relationship between the version number of the source data and the version number of the snapshot generated recently;
the storage controller receives a rollback request, wherein the rollback request comprises a target snapshot ID;
the storage controller obtains a version number of source data of the target snapshot and obtains a version number of the target snapshot identified by the target snapshot ID, wherein the target snapshot is a snapshot of the source data;
the storage controller executes rollback operation and establishes the direction relation between the version number of the source data and the version number of the target snapshot;
the storage controller receives a first read request, and when the source data does not contain the data requested by the first read request, the storage controller acquires the data requested by the first read request from the target snapshot according to the orientation relation between the version number of the source data and the version number of the target snapshot.
2. The method according to claim 1, wherein the rollback request further carries a data ID, and the obtaining of the version number of the source data of the target snapshot specifically includes:
and obtaining the version number of the source data of the target snapshot according to the data ID.
3. The method of claim 1, wherein the method further comprises:
the storage controller receives a write request, wherein the write request comprises a write address and data needing to be updated;
finding a target block according to the write address;
and writing the data needing to be updated into the target block according to the write address.
4. The method according to claim 1, wherein the obtaining, by the storage controller, the version number of the source data of the target snapshot specifically includes:
the storage controller searches the source data according to the target snapshot ID;
and the storage controller obtains the version number of the source data according to the searched source data.
5. The method of claim 1, prior to initiating a rollback operation, further comprising:
the storage controller updates a version number of the source data.
6. The method of claim 1, wherein the method is preceded by:
establishing a directional relationship, wherein the directional relationship comprises:
among the snapshots, the version number of each snapshot points to the relationship of the version number of the snapshot generated last time.
7. The method according to any one of claims 1-6, wherein:
the source data is a file system or logical unit number LUN.
8. A snapshot rollback apparatus, comprising:
the version number processing module is used for establishing the direction relation between the version number of the source data and the version number of the snapshot generated recently;
a receiving module, configured to receive a rollback request, where the rollback request includes a target snapshot ID;
the version number processing module is configured to obtain a version number of source data of the target snapshot and obtain a version number of the target snapshot corresponding to the target snapshot ID, where the target snapshot is a snapshot of the source data;
the rollback module is used for executing rollback operation and establishing a pointing relation that the version number of the source data points to the version number of the target snapshot;
the receiving module is further configured to receive a first read request;
and the reading module is used for acquiring the data requested by the first read request from the target snapshot according to the direction relationship between the version number of the source data and the version number of the target snapshot when the source data does not contain the data requested by the first read request.
9. The snapshot rollback apparatus according to claim 8, wherein the rollback request further carries a data ID, and the obtaining, by the version number processing module, the version number of the source data of the target snapshot specifically includes:
and the version number processing module obtains the version number of the source data of the target snapshot according to the data ID.
10. The snapshot rollback apparatus according to claim 8, wherein the version number processing module obtains a version number of the source data, specifically comprising:
the version number processing module searches the source data according to the target snapshot ID;
and the version number processing module acquires the version number of the source data according to the searched source data.
11. The snapshot rollback apparatus of claim 8, wherein the versioning number processing module is further configured to:
the version number of the source data is updated before the rollback operation is initiated.
12. The snapshot rollback apparatus of claim 8, wherein the version number processing module is further configured to:
establishing a pointing relationship upon initialization of the rollback apparatus, the pointing relationship comprising:
among the snapshots, the version number of each snapshot points to the last generated snapshot's version number.
13. Snapshot rollback apparatus according to any one of claims 8-12, wherein:
the source data is a file system or logical unit number LUN.
14. A storage system comprising the snapshot rollback apparatus of any of claims 8-12, further comprising a storage medium for storing the target snapshot and a file system.
15. A storage controller comprising a processor and an interface to receive a rollback request and forward the rollback request to the processor, the processor to:
establishing a pointing relationship between the version number of the source data and the version number of the snapshot generated recently;
receiving the rollback request, wherein the rollback request comprises a target snapshot ID;
obtaining a version number of source data of the target snapshot and a version number of the target snapshot identified according to a target snapshot ID carried in the rollback request, wherein the target snapshot is a snapshot of the source data;
establishing a pointing relation that the version number of the source data points to the version number of the target snapshot;
receiving a first read request, and when the source data does not contain the data requested by the first read request, acquiring the data requested by the first read request from the target snapshot according to the direction relationship between the version number of the source data and the version number of the target snapshot.
16. A storage system comprising the storage controller of claim 15, further comprising a storage medium to store the target snapshot and file system.
CN201680003118.7A 2016-12-30 2016-12-30 Snapshot rollback method, device, storage controller and system Active CN108604201B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/113421 WO2018119998A1 (en) 2016-12-30 2016-12-30 Snapshot rollback method, apparatus, storage controller, and system

Publications (2)

Publication Number Publication Date
CN108604201A CN108604201A (en) 2018-09-28
CN108604201B true CN108604201B (en) 2022-02-25

Family

ID=62706584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201680003118.7A Active CN108604201B (en) 2016-12-30 2016-12-30 Snapshot rollback method, device, storage controller and system

Country Status (2)

Country Link
CN (1) CN108604201B (en)
WO (1) WO2018119998A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408294A (en) * 2018-11-13 2019-03-01 郑州云海信息技术有限公司 A kind of snapshot rollback method, device, equipment and storage medium
CN110515543B (en) * 2019-08-02 2021-02-19 星辰天合(北京)数据科技有限公司 Object bucket-based snapshot method, device and system
CN111552437B (en) * 2020-04-22 2024-03-15 上海天玑科技股份有限公司 Snapshot method and snapshot device applied to distributed storage system
CN111625262B (en) * 2020-05-28 2023-08-22 广东浪潮大数据研究有限公司 Rollback method, system, equipment and storage medium of workload resource
CN117873958A (en) * 2023-12-15 2024-04-12 天翼云科技有限公司 Snapshot capacity calculation method and device based on multi-version data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023863A (en) * 2010-12-13 2011-04-20 中兴通讯股份有限公司 Method and device for switching editions
CN104407935A (en) * 2014-11-07 2015-03-11 华为数字技术(成都)有限公司 Snapshot rollback method and storage equipment
CN105095016A (en) * 2014-05-16 2015-11-25 北京云巢动脉科技有限公司 Disk snapshot roll-back method and device
CN105528464A (en) * 2016-01-28 2016-04-27 北京宇航系统工程研究所 Version management system capable of automatically judging technical condition consistency of associated data
WO2016101283A1 (en) * 2014-12-27 2016-06-30 华为技术有限公司 Data processing method, apparatus and system
CN105808449A (en) * 2014-12-31 2016-07-27 中国电信股份有限公司 Virtual storage image version management method and system for virtual machine
CN105938457A (en) * 2016-03-31 2016-09-14 华为技术有限公司 Data filtering method, and device and data reading system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060143412A1 (en) * 2004-12-28 2006-06-29 Philippe Armangau Snapshot copy facility maintaining read performance and write performance
CN102012853B (en) * 2011-01-14 2012-05-23 南开大学 Zero-copy snapshot method
CN104268036A (en) * 2014-10-13 2015-01-07 浪潮电子信息产业股份有限公司 Snapshot volume reading method based on zero copy
US10185637B2 (en) * 2015-02-16 2019-01-22 International Business Machines Corporation Preserving management services with distributed metadata through the disaster recovery life cycle

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023863A (en) * 2010-12-13 2011-04-20 中兴通讯股份有限公司 Method and device for switching editions
CN105095016A (en) * 2014-05-16 2015-11-25 北京云巢动脉科技有限公司 Disk snapshot roll-back method and device
CN104407935A (en) * 2014-11-07 2015-03-11 华为数字技术(成都)有限公司 Snapshot rollback method and storage equipment
WO2016101283A1 (en) * 2014-12-27 2016-06-30 华为技术有限公司 Data processing method, apparatus and system
CN105808449A (en) * 2014-12-31 2016-07-27 中国电信股份有限公司 Virtual storage image version management method and system for virtual machine
CN105528464A (en) * 2016-01-28 2016-04-27 北京宇航系统工程研究所 Version management system capable of automatically judging technical condition consistency of associated data
CN105938457A (en) * 2016-03-31 2016-09-14 华为技术有限公司 Data filtering method, and device and data reading system

Also Published As

Publication number Publication date
WO2018119998A1 (en) 2018-07-05
CN108604201A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
US20230117542A1 (en) Remote Data Replication Method and System
CN108604201B (en) Snapshot rollback method, device, storage controller and system
US8627012B1 (en) System and method for improving cache performance
US9235524B1 (en) System and method for improving cache performance
US10599337B2 (en) Method and device for writing data and acquiring data in a distributed storage system
US8930947B1 (en) System and method for live migration of a virtual machine with dedicated cache
JP4839091B2 (en) Database recovery method and computer system
US9104529B1 (en) System and method for copying a cache system
US9690666B1 (en) Incremental backup operations in a transactional file system
US9372743B1 (en) System and method for storage management
US9081792B1 (en) Optimizing backup of whitelisted files
JP2007226347A (en) Computer system, management device for computer system, and data recovery management method
JP6133396B2 (en) Computer system, server, and data management method
CN106528338B (en) Remote data copying method, storage device and storage system
US8914325B2 (en) Change tracking for multiphase deduplication
US9053033B1 (en) System and method for cache content sharing
US11003543B2 (en) Generic metadata tags with namespace-specific semantics in a storage appliance
US20190332685A1 (en) Set-based mutual exclusion using object metadata tags in a storage appliance
US9009416B1 (en) System and method for managing cache system content directories
US11514002B2 (en) Indexing splitter for any pit replication
US20200097173A1 (en) Leveraging temporal locality to link files together and bypass accessing a central inode list
CN109325005A (en) A kind of data processing method and electronic equipment
US10423494B2 (en) Trimming unused blocks from a versioned image backup of a source storage that is stored in a sparse storage
US10372683B1 (en) Method to determine a base file relationship between a current generation of files and a last replicated generation of files
US9864661B2 (en) Cache-accelerated replication of snapshots between storage devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant