CN110658993A - Snapshot rollback method, device, equipment and storage medium - Google Patents

Snapshot rollback method, device, equipment and storage medium Download PDF

Info

Publication number
CN110658993A
CN110658993A CN201910809489.XA CN201910809489A CN110658993A CN 110658993 A CN110658993 A CN 110658993A CN 201910809489 A CN201910809489 A CN 201910809489A CN 110658993 A CN110658993 A CN 110658993A
Authority
CN
China
Prior art keywords
rollback
state table
object state
snapshot
logical volume
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.)
Pending
Application number
CN201910809489.XA
Other languages
Chinese (zh)
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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology 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 Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201910809489.XA priority Critical patent/CN110658993A/en
Publication of CN110658993A publication Critical patent/CN110658993A/en
Pending legal-status Critical Current

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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • 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
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes

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)
  • Retry When Errors Occur (AREA)

Abstract

The application discloses a snapshot rollback method, which comprises the steps of recovering a current object state table of a logic volume according to a rollback instruction when the rollback instruction is received, and obtaining an original object state table; comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume; initiating a rollback request about the variant object to a storage layer to cause the storage layer to rollback data in the variant object according to the rollback request; the snapshot rollback method greatly improves the snapshot rollback efficiency. The application also discloses a snapshot rollback device, equipment and a computer readable storage medium, which have the beneficial effects.

Description

Snapshot rollback method, device, equipment and storage medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a snapshot rollback method, and further, to a snapshot rollback apparatus, device, and computer-readable storage medium.
Background
In the distributed block storage service, a logical volume is composed of a plurality of objects with fixed sizes, and service data is stored in each object. The logical volume dynamically manages each object state using an object map (object state table), wherein the object states are mainly divided into non-existing and existing states.
Generally, the process of rolling back data of a logical volume by using a snapshot includes recovering an object map corresponding to an original logical volume at the snapshot time and recovering each object data in the original logical volume at the snapshot time. However, in the prior art, the object data recovery part sends all object recovery requests to the storage bottom layer to implement snapshot rollback by using the storage layer, but when the logical volume is large, the number of objects therein is also large, which results in many requests sent to the storage layer, and most of the requests are invalid requests, for example, when the number of objects in the logical volume is in the order of ten million, the original logical volume has no data change or small amount of change (i.e., only a few object data changes) after the snapshot is created, and logically only the objects of the changed part need to be rolled back, but the existing process needs to roll back all ten million objects, which results in a phenomenon of long rollback time.
Therefore, how to effectively improve the snapshot rollback efficiency is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The method aims to provide a snapshot rollback method, and the snapshot rollback method effectively improves the snapshot rollback efficiency; another object of the present application is to provide a snapshot rollback apparatus, device, and computer-readable storage medium, which also have the above-mentioned advantages.
In order to solve the above technical problem, the present application provides a snapshot rollback method, where the snapshot rollback method includes:
when a rollback instruction is received, restoring a current object state table of the logical volume according to the rollback instruction to obtain an original object state table;
comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume;
and initiating a rollback request about the variant object to a storage layer so that the storage layer rolls back the data in the variant object according to the rollback request.
Preferably, the snapshot rollback method further includes:
creating a snapshot for each object in the logical volume and creating an object state table corresponding to the logical volume at the same time;
initializing the object state table to set the object state of each object in the object state table to be an absent state, and obtaining the original object state table.
Preferably, the snapshot rollback method further includes:
and when data updating is carried out on each object in the logical volume, updating the object state of the updated object in the original object state table.
Preferably, when performing data update on each object in the logical volume, updating the object state of the updated object in the original object state table includes:
when data writing is carried out on each object in the logical volume, updating the object state of the written object in the original object state table to be an existing state;
and when the data of each object in the logical volume is deleted, deleting the object state information of the deleted object in the original object state table.
Preferably, after initiating a rollback request regarding the variant object to the storage layer to cause the storage layer to rollback data in the variant object according to the rollback request, the method further includes:
and deleting the current object state table.
In order to solve the above technical problem, the present application further provides a snapshot rollback apparatus, including:
the object state table recovery module is used for recovering the current object state table of the logical volume according to the rollback instruction when the rollback instruction is received, and obtaining an original object state table;
the change object determining module is used for comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume;
and the data rollback module is used for initiating a rollback request about the changed object to the storage layer so that the storage layer performs rollback on the data in the changed object according to the rollback request.
Preferably, the snapshot rollback apparatus further includes:
the object state table creating module is used for creating a snapshot for each object in the logical volume and creating an object state table corresponding to the logical volume at the same time;
and the object state table initialization module is used for initializing the object state table so as to set the object state of each object in the object state table to be an absent state and obtain the original object state table.
Preferably, the snapshot rollback apparatus further includes:
and the object state table updating module is used for updating the object state of the updated object in the original object state table when data updating is carried out on each object in the logical volume.
In order to solve the above technical problem, the present application further provides a snapshot rollback apparatus, including:
a memory for storing a computer program;
a processor for implementing the steps of any of the above snapshot rollback methods when executing the computer program.
To solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of any one of the snapshot rollback methods.
The snapshot rollback method comprises the steps that when a rollback instruction is received, a current object state table of a logic volume is restored according to the rollback instruction, and an original object state table is obtained; comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume; and initiating a rollback request about the variant object to a storage layer so that the storage layer rolls back the data in the variant object according to the rollback request.
It can be seen that, according to the snapshot rollback method provided by the application, after a rollback instruction is received, the object state table is restored, and then the object data in the logical volume is restored, wherein before the object data is restored, an object with data change in the logical volume, namely, the changed object, is screened out based on the object state table before and after restoration, so that only a rollback request corresponding to the changed object needs to be sent to the storage layer, and only the data in the changed object is restored by the storage layer, thereby completing the snapshot rollback, avoiding the object data which is not changed by meaningless rollback, greatly shortening the snapshot rollback time, and effectively improving the snapshot rollback efficiency; furthermore, for a scene with a small data change amount after a large-capacity logical volume is snapshot, the method enables the rollback speed to be optimized to the maximum extent, and effectively improves the user experience of the storage service.
The snapshot rollback apparatus, the device, and the computer-readable storage medium provided by the present application all have the above beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a snapshot rollback method provided in the present application;
fig. 2 is a schematic structural diagram of a snapshot rollback apparatus provided in the present application;
fig. 3 is a schematic structural diagram of a snapshot rollback apparatus provided in the present application.
Detailed Description
The core of the application is to provide a snapshot rollback method, which effectively improves the snapshot rollback efficiency; another core of the present application is to provide a snapshot rollback apparatus, a server, and a computer-readable storage medium, which also have the above-mentioned advantages.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, in the process of snapshot rollback on a logical volume, an object data recovery part needs to send all object recovery requests to a storage bottom layer to implement snapshot rollback by using a storage layer, but when the logical volume is large, the number of objects therein is also large, so that many requests sent to the storage layer are caused, and most of the requests are invalid requests, for example, when the number of objects in the logical volume is in the order of ten million, after a snapshot is created, there is no data change or a small amount of change in the original logical volume, it is only necessary to logically rollback objects of a changed part, but an existing process needs to completely rollback tens of millions of objects, so that a phenomenon that rollback time is long occurs, and snapshot rollback efficiency is extremely low.
Therefore, in order to solve the above problems, the present application provides a snapshot rollback method, after receiving a rollback instruction, restoring an object state table, and then restoring object data in a logical volume, wherein before restoring the object data, an object having data change in the logical volume, that is, the changed object, is screened out based on the object state tables before and after restoration, so that only a rollback request corresponding to the changed object needs to be sent to a storage layer, and only the data in the changed object is restored by the storage layer, thereby completing snapshot rollback, avoiding object data that has not changed due to meaningless rollback, greatly shortening snapshot rollback time, and effectively improving snapshot rollback efficiency; furthermore, for a scene with a small data change amount after a large-capacity logical volume is snapshot, the method enables the rollback speed to be optimized to the maximum extent, and effectively improves the user experience of the storage service.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a snapshot rollback method provided in the present application, where the snapshot rollback method may include:
s101: when a rollback instruction is received, restoring the current object state table of the logical volume according to the rollback instruction to obtain an original object state table;
generally, the process of performing data rollback on logical volume data by using a snapshot includes two processes of restoring an object map corresponding to an original logical volume at the snapshot time and restoring each object data in the original logical volume at the snapshot time. Since the logical volume dynamically manages the object states using the object map, the object state of each object of the logical volume is recorded in the object map. It is understood that the snapshot time is a time for creating a snapshot for each object data (data stored in an object) in the logical volume, i.e., an original time.
Specifically, when a rollback instruction is received, the current object state table corresponding to the logical volume may be restored according to the rollback instruction to obtain an original object state table, where the current object state table is the object state table at the time when the rollback instruction is currently received, and the original object state table is the object state table at the time of the snapshot. In addition, the specific implementation process of the recovery object state table may refer to the prior art, and is not described herein again.
It should be noted that the rollback instruction may be input by a user based on a user terminal, or may be automatically triggered based on a response condition preset by the user, such as a timing condition, and a specific obtaining method thereof does not affect implementation of the present technical solution.
S102: comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume;
this step is intended to realize the determination of a changed object, that is, an object in which data change has occurred in the logical volume, and it can be understood that data change specifically means that data update has occurred in the process from the snapshot time to the current time. Specifically, after the original object state table is obtained based on S101, the original object state table and the current object state table may be compared and analyzed to determine a change object in the logical volume.
S103: and initiating a rollback request about the variant object to the storage layer so that the storage layer rolls back the data in the variant object according to the rollback request.
Specifically, after determining the changed object in the logical volume, a rollback request about the changed object may be initiated to the storage layer, that is, the storage layer is requested to rollback data in the changed object, and for an object that has not changed data, rollback is not required, so that when the data amount of an object in the logical volume is large and the data amount of an object that has changed data is low, meaningless rollback of data in an object that has not changed data is effectively avoided, and time waste is avoided.
Correspondingly, the process of snapshotting and rolling back data in the changed object can be implemented by referring to the prior art, compared with the prior art, the snapshotting and rolling back method provided by the application effectively reduces the data volume needing to be rolled back, and the specific rolling back process can adopt any one of the prior art, which is not limited by the application.
As a preferred embodiment, after initiating a rollback request regarding the variant object to the storage layer so that the storage layer performs rollback on data in the variant object according to the rollback request, the method may further include: the current object state table is deleted.
Specifically, after the snapshot rollback is completed for each object in the logical volume, the current object state table is deleted to avoid space occupation.
According to the snapshot rollback method provided by the embodiment of the application, after a rollback instruction is received, the object state table is restored, and then the object data in the logical volume is restored, wherein before the object data is restored, an object with data change in the logical volume, namely the changed object, is screened out based on the object state table before and after restoration, so that only a rollback request corresponding to the changed object needs to be sent to the storage layer, and only the data in the changed object is restored by the storage layer, so that snapshot rollback is completed, the object data which is not changed by meaningless rollback is avoided, snapshot rollback time is greatly shortened, and snapshot rollback efficiency is effectively improved; furthermore, for a scene with a small data change amount after a large-capacity logical volume is snapshot, the method enables the rollback speed to be optimized to the maximum extent, and effectively improves the user experience of the storage service.
On the basis of the above embodiments:
as a preferred embodiment, the snapshot rollback method may further include: creating a snapshot for each object in the logical volume and creating an object state table corresponding to the logical volume at the same time; and initializing the object state table to set the object state of each object in the object state table to be an absent state, and obtaining an original object state table.
The step aims at realizing the creation and initialization of the object state table, and particularly, because the logical volume is subjected to data rollback based on the snapshot, the snapshot needs to be created before the data rollback is carried out; further, when a snapshot is created for each object in the logical volume, a corresponding object state table may be created to record the object state of each object in real time. Of course, after the creation of the object state table is completed and before the object state is recorded based on the object state table, the object state may be initialized, that is, the object state of each object in the object state table is set to be the non-existing state, and after the initialization is completed, the original object state table may be obtained.
As a preferred embodiment, the snapshot rollback method may further include: when data updating is carried out on each object in the logical volume, the object state of the updated object in the original object state table is updated.
This step is intended to realize the update of the object state table, that is, when data in each object of the logical volume is updated, the corresponding object state in the original object state table can be updated in real time, that is, the object state is updated along with the update of the object data. It is to be understood that the update of the object data may be specifically, but not exclusively, write data, delete data, and the like. Further, after the update of the object data and the update of the object state are completed, the obtained object state table is the current object state table until the rollback instruction is currently received.
Preferably, when updating data of each object in the logical volume, the updating the object state of the updated object in the original object state table may include: when data writing is carried out on each object in the logical volume, the object state of the written object in the original object state table is updated to be an existing state; when data deletion is carried out on each object in the logical volume, the object state information of the deleted object in the original object state table is deleted.
Specifically, when data is written to a certain object or some objects in the logical volume, that is, new data information is written to the object, the object state of the written object in the original object state table may be updated to an existing state, where the written object is an object to which data is to be written; when data in one or some objects in the logical volume is deleted, the corresponding object state information of the deleted object in the original state table is deleted, wherein the deleted object is the object of the data to be deleted.
On the basis of the above embodiments, the present application provides a more specific snapshot rollback method.
Specifically, the snapshot rollback method provided in the embodiment of the present application mainly includes a snapshot object map creation and update process and a rollback acceleration process based on the snapshot object map, where the snapshot object map creation and update process includes creating an object tmap process for recording a subsequent object state for this snapshot at the time of creating the snapshot and an update process of the object map in a logical volume data update process; the object map-based rollback acceleration process refers to that in the snapshot rollback process, objects needing to be rolled back are screened according to the object map, so that only operation requests corresponding to the objects needing to be rolled back are sent to a storage bottom layer. Further, the specific implementation flow of the snapshot rollback is as follows:
(1) in the process of creating the snapshot, simultaneously creating an object map of the logical volume by taking the snapshot as a key word, and initializing an object state in the object map to be an 'nonexistent' state;
(2) after the snapshot is created, when data is written into the logical volume, the corresponding object state in the snapshot object map is modified to be a 'present' state;
(3) when the data of the logical volume is deleted, synchronously deleting the corresponding object state information in the snapshot object map;
(4) when the snapshot is used for rolling back the logical volume, the object map of the logical volume at the snapshot time is restored first, then the objects (changed objects) with data change after snapshot is taken are screened out according to the snapshot object map, and finally the rolling back request of the part of objects is sent to the storage bottom layer so as to roll back the data of the storage bottom layer.
According to the snapshot rollback method provided by the embodiment of the application, after a rollback instruction is received, the object state table is restored, and then the object data in the logical volume is restored, wherein before the object data is restored, an object with data change in the logical volume, namely the changed object, is screened out based on the object state table before and after restoration, so that only a rollback request corresponding to the changed object needs to be sent to the storage layer, and only the data in the changed object is restored by the storage layer, so that snapshot rollback is completed, the object data which is not changed by meaningless rollback is avoided, snapshot rollback time is greatly shortened, and snapshot rollback efficiency is effectively improved; furthermore, for a scene with a small data change amount after a large-capacity logical volume is snapshot, the method enables the rollback speed to be optimized to the maximum extent, and effectively improves the user experience of the storage service.
To solve the above problem, please refer to fig. 2, fig. 2 is a schematic structural diagram of a snapshot rollback apparatus provided in the present application, where the snapshot rollback apparatus may include:
an object state table recovery module 100, configured to, when a rollback instruction is received, recover a current object state table of the logical volume according to the rollback instruction, to obtain an original object state table;
a change object determining module 200, configured to compare and analyze the current object state table and the original object state table, and determine a change object in the logical volume;
the data rollback module 300 is configured to initiate a rollback request regarding the variant object to the storage layer, so that the storage layer rolls back the data in the variant object according to the rollback request.
It can be seen that, the snapshot rollback apparatus provided in the embodiment of the present application recovers the object state table and then recovers the object data in the logical volume after receiving the rollback instruction, wherein before recovering the object data, an object that has data change in the logical volume, that is, the changed object, is first screened out based on the object state table before and after recovery, so that only a rollback request corresponding to the changed object needs to be sent to the storage layer, and the storage layer only recovers the data in the changed object, thereby completing the snapshot rollback, avoiding meaningless rollback of unchanged object data, greatly shortening the snapshot rollback time, and effectively improving the snapshot rollback efficiency; furthermore, for a scene with a small data change amount after a large-capacity logical volume is snapshot, the method enables the rollback speed to be optimized to the maximum extent, and effectively improves the user experience of the storage service.
As a preferred embodiment, the snapshot rollback apparatus may further include:
the object state table creating module is used for creating a snapshot for each object in the logical volume and creating an object state table corresponding to the logical volume at the same time;
and the object state table initialization module is used for initializing the object state table so as to set the object state of each object in the object state table to be an absent state and obtain an original object state table.
As a preferred embodiment, the snapshot rollback apparatus may further include:
and the object state table updating module is used for updating the object state of the updated object in the original object state table when data updating is carried out on each object in the logical volume.
As a preferred embodiment, the above-mentioned exclusive status table updating module may include:
the writing updating unit is used for updating the object state of the written object in the original object state table to be an existing state when data writing is carried out on each object in the logical volume;
and the deletion updating unit is used for deleting the object state information of the deleted object in the original object state table when the data of each object in the logical volume is deleted.
As a preferred embodiment, the snapshot rollback apparatus may further include:
and the object state table deleting module is used for initiating a rollback request about the changed object to the storage layer so that the storage layer deletes the current object state table after rolling back the data in the changed object according to the rollback request.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
To solve the above problem, please refer to fig. 3, where fig. 3 is a schematic structural diagram of a snapshot rollback apparatus provided in the present application, where the snapshot rollback apparatus may include:
a memory 10 for storing a computer program;
a processor 20, configured to implement the following steps when executing the computer program:
when a rollback instruction is received, restoring the current object state table of the logical volume according to the rollback instruction to obtain an original object state table; comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume; and initiating a rollback request about the variant object to the storage layer so that the storage layer rolls back the data in the variant object according to the rollback request.
For the introduction of the device provided in the present application, please refer to the above method embodiment, which is not described herein again.
To solve the above problem, the present application further provides a computer-readable storage medium having a computer program stored thereon, where the computer program when executed by a processor can implement the following steps:
when a rollback instruction is received, restoring the current object state table of the logical volume according to the rollback instruction to obtain an original object state table; comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume; and initiating a rollback request about the variant object to the storage layer so that the storage layer rolls back the data in the variant object according to the rollback request.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The snapshot rollback method, apparatus, device, and computer-readable storage medium provided in the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and these improvements and modifications also fall into the elements of the protection scope of the claims of the present application.

Claims (10)

1. A snapshot rollback method, comprising:
when a rollback instruction is received, restoring a current object state table of the logical volume according to the rollback instruction to obtain an original object state table;
comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume;
and initiating a rollback request about the variant object to a storage layer so that the storage layer rolls back the data in the variant object according to the rollback request.
2. The snapshot rollback method of claim 1, further comprising:
creating a snapshot for each object in the logical volume and creating an object state table corresponding to the logical volume at the same time;
initializing the object state table to set the object state of each object in the object state table to be an absent state, and obtaining the original object state table.
3. A snapshot rollback method as claimed in claim 2, further comprising:
and when data updating is carried out on each object in the logical volume, updating the object state of the updated object in the original object state table.
4. A snapshot rollback method according to claim 3, wherein said updating the object state of the updated object in said original object state table when updating data of each of said objects in said logical volume comprises:
when data writing is carried out on each object in the logical volume, updating the object state of the written object in the original object state table to be an existing state;
and when the data of each object in the logical volume is deleted, deleting the object state information of the deleted object in the original object state table.
5. A snapshot rollback method according to any one of claims 1-4, wherein after initiating a rollback request with respect to the variant object to the storage layer to cause the storage layer to rollback data in the variant object in accordance with the rollback request, further comprising:
and deleting the current object state table.
6. A snapshot rollback apparatus, comprising:
the object state table recovery module is used for recovering the current object state table of the logical volume according to the rollback instruction when the rollback instruction is received, and obtaining an original object state table;
the change object determining module is used for comparing and analyzing the current object state table and the original object state table to determine a change object in the logical volume;
and the data rollback module is used for initiating a rollback request about the changed object to the storage layer so that the storage layer performs rollback on the data in the changed object according to the rollback request.
7. The snapshot rollback apparatus of claim 6, further comprising:
the object state table creating module is used for creating a snapshot for each object in the logical volume and creating an object state table corresponding to the logical volume at the same time;
and the object state table initialization module is used for initializing the object state table so as to set the object state of each object in the object state table to be an absent state and obtain the original object state table.
8. The snapshot rollback apparatus of claim 7, further comprising:
and the object state table updating module is used for updating the object state of the updated object in the original object state table when data updating is carried out on each object in the logical volume.
9. A snapshot rollback apparatus, further comprising:
a memory for storing a computer program;
a processor for implementing the steps of the snapshot rollback method of any of claims 1-5 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the snapshot rollback method according to any one of the claims 1 to 5.
CN201910809489.XA 2019-08-29 2019-08-29 Snapshot rollback method, device, equipment and storage medium Pending CN110658993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910809489.XA CN110658993A (en) 2019-08-29 2019-08-29 Snapshot rollback method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910809489.XA CN110658993A (en) 2019-08-29 2019-08-29 Snapshot rollback method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110658993A true CN110658993A (en) 2020-01-07

Family

ID=69037942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910809489.XA Pending CN110658993A (en) 2019-08-29 2019-08-29 Snapshot rollback method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110658993A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625499A (en) * 2020-05-28 2020-09-04 浪潮电子信息产业股份有限公司 Snapshot rollback tool, method and equipment
CN111984472A (en) * 2020-08-27 2020-11-24 苏州浪潮智能科技有限公司 Data snapshot method, device and related equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614055A (en) * 2018-12-21 2019-04-12 杭州宏杉科技股份有限公司 Snapshot creation method, device, electronic equipment and machine readable storage medium
CN110018996A (en) * 2018-07-23 2019-07-16 郑州云海信息技术有限公司 A kind of the snapshot rollback method and relevant apparatus of distributed memory system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018996A (en) * 2018-07-23 2019-07-16 郑州云海信息技术有限公司 A kind of the snapshot rollback method and relevant apparatus of distributed memory system
CN109614055A (en) * 2018-12-21 2019-04-12 杭州宏杉科技股份有限公司 Snapshot creation method, device, electronic equipment and machine readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625499A (en) * 2020-05-28 2020-09-04 浪潮电子信息产业股份有限公司 Snapshot rollback tool, method and equipment
CN111984472A (en) * 2020-08-27 2020-11-24 苏州浪潮智能科技有限公司 Data snapshot method, device and related equipment
CN111984472B (en) * 2020-08-27 2022-08-02 苏州浪潮智能科技有限公司 Data snapshot method, device and related equipment

Similar Documents

Publication Publication Date Title
CN104808952B (en) data cache method and device
CN107643880B (en) File data migration method and device based on distributed file system
US20170286150A1 (en) Transaction Processing Method and Apparatus, and Computer System
CN106354884B (en) Data object deleting method and device based on distributed file system
CN112714359B (en) Video recommendation method and device, computer equipment and storage medium
CN107665098B (en) Information processing method, storage device, and computer storage medium
CN109614045B (en) Metadata dropping method and device and related equipment
CN105677236B (en) A kind of storage device and its method for storing data
CN111881135A (en) Data aggregation method, device, equipment and computer readable storage medium
CN112182010B (en) Dirty page refreshing method and device, storage medium and electronic equipment
CN110658993A (en) Snapshot rollback method, device, equipment and storage medium
CN111651239A (en) Virtual machine cloning method, device, equipment and medium
CN110879764B (en) Bitmap setting method, device and equipment and readable storage medium
CN108205559B (en) Data management method and equipment thereof
CN103729301B (en) Data processing method and device
CN115827322A (en) Cloud storage data full-scale disaster recovery method and system
KR101643278B1 (en) Method, apparatus, and computer program stored in computer readable medium for managing storage server in database system
CN111984600B (en) File aggregation method, device, equipment and readable storage medium
CN111984472B (en) Data snapshot method, device and related equipment
CN113625952A (en) Object storage method, device, equipment and storage medium
CN113467997A (en) Data recovery method and device, mobile device and storage medium
CN109992213B (en) Data deleting method, system, device and computer readable storage medium
CN111090396A (en) File processing method and device and electronic equipment
CN111125012A (en) Snapshot generation method, device and equipment and readable storage medium
CN111190549A (en) Method, device, equipment and medium for acquiring available capacity of shared volume

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200107