CN110658992A - Method, device and equipment for realizing writable snapshot and readable storage medium - Google Patents

Method, device and equipment for realizing writable snapshot and readable storage medium Download PDF

Info

Publication number
CN110658992A
CN110658992A CN201910802786.1A CN201910802786A CN110658992A CN 110658992 A CN110658992 A CN 110658992A CN 201910802786 A CN201910802786 A CN 201910802786A CN 110658992 A CN110658992 A CN 110658992A
Authority
CN
China
Prior art keywords
snapshot
writable
read
writable snapshot
data
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.)
Withdrawn
Application number
CN201910802786.1A
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 CN201910802786.1A priority Critical patent/CN110658992A/en
Publication of CN110658992A publication Critical patent/CN110658992A/en
Withdrawn 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/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

Abstract

The application discloses a method, a device, equipment and a computer readable storage medium for realizing writable snapshot, wherein the method is applied to a distributed storage system and comprises the following steps: receiving a writable snapshot obtaining instruction sent by a user; analyzing the writable snapshot obtaining instruction, and if the writable snapshot creating instruction is the writable snapshot, creating a read-only snapshot and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system and taking the read-only snapshot as a target read-only snapshot; creating a hidden volume invisible to a user according to the writable snapshot obtaining instruction; and performing association binding on the hidden volume and the target read-only snapshot to obtain the writable snapshot. According to the technical scheme disclosed by the application, the read-write operation of the snapshot is finally implemented on the hidden volume by performing associated binding on the read-only snapshot and the hidden volume invisible to the user, so that the writable snapshot has editable attributes, the application flexibility of the snapshot data is improved, and the application scene of the snapshot data is conveniently expanded.

Description

Method, device and equipment for realizing writable snapshot and readable storage medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for implementing a writable snapshot.
Background
The definition of snapshots by SNIA (storage network industry association) is: with respect to a fully available copy of a given data set, the copy includes an image of the corresponding data at some point in time (the point in time at which the copy begins). The snapshot may be a copy of the data it represents or may be a replica of the data. Since the snapshot technique can realize storage backup of data in an extremely short time, it is often used as a technique for enhancing a data backup system, and can significantly shorten two indexes, i.e., RTO (recovery time target) and RPO (recovery point target).
At present, a common snapshot belongs to a read-only snapshot, that is, snapshot data is a copy of a read-only snapshot attribute, and operations such as adding, deleting, and changing internal data can be executed only after snapshot rollback, mapping, and mounting are performed, that is, the existing read-only snapshot has a problem that it is inconvenient to directly edit the established snapshot data, so that flexibility of snapshot data application can be reduced, and an application scene of the snapshot data can be narrowed down.
In summary, how to implement editable snapshot data after a snapshot is established to improve flexibility of snapshot data application and expand application scenarios of snapshot data is a technical problem to be urgently solved by those skilled in the art at present.
Disclosure of Invention
In view of this, an object of the present application is to provide a method for implementing writable snapshots, so as to implement editable snapshot data after a snapshot is established, thereby improving flexibility of snapshot data application and expanding application scenarios of snapshot data.
In order to achieve the above purpose, the present application provides the following technical solutions:
a method for implementing writable snapshots is applied to a distributed storage system and comprises the following steps:
receiving a writable snapshot obtaining instruction sent by a user;
analyzing the writable snapshot obtaining instruction, if the writable snapshot creating instruction is a writable snapshot creating instruction, creating a read-only snapshot, and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot;
creating a hidden volume invisible to the user according to the writable snapshot obtaining instruction;
and performing association binding on the hidden volume and the target read-only snapshot to obtain a writable snapshot.
Preferably, before the associating and binding the hidden volume and the target read-only snapshot, the method further includes:
and setting a locking mark in the attribute information of the target read-only snapshot.
Preferably, after the hidden volume is associated and bound with the target read-only snapshot to obtain the writable snapshot, the method further includes:
and if the IO operation is not carried out on the writable snapshot, carrying out reverse conversion on the writable snapshot so as to obtain the target read-only snapshot.
Preferably, after the associating and binding the hidden volume and the read-only snapshot to obtain the writable snapshot, the method further includes:
and if the IO operation is carried out on the writable snapshot, the step of carrying out reverse conversion on the writable snapshot is not executed.
Preferably, after the hidden volume is associated and bound with the target read-only snapshot to obtain the writable snapshot, the method further includes:
cloning the writable snapshot and reading data to obtain a clone volume containing all data in the current writable snapshot;
wherein the reading of data comprises:
and reading data from the hidden volume, if the hidden volume has a data-free area, reading the data from the corresponding position of the target read-only snapshot, and if the corresponding position of the target read-only snapshot has no data, reading the data from the corresponding position of the source volume of the writable snapshot.
An apparatus for implementing writable snapshots, applied to a distributed storage system, includes:
the receiving module is used for receiving a writable snapshot obtaining instruction sent by a user;
the analysis module is used for analyzing the writable snapshot acquisition instruction, creating a read-only snapshot if the writable snapshot creation instruction is the writable snapshot, and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot;
the creating module is used for creating a hidden volume invisible to the user according to the writable snapshot obtaining instruction;
and the association binding module is used for performing association binding on the hidden volume and the target read-only snapshot to obtain a writable snapshot.
Preferably, the method further comprises the following steps:
and the locking flag setting module is used for setting a locking flag in the attribute information of the read-only snapshot before the hidden volume is associated and bound with the target read-only snapshot.
Preferably, the method further comprises the following steps:
and the reverse conversion module is used for performing association binding on the hidden volume and the target read-only snapshot to obtain a writable snapshot, and performing reverse conversion on the writable snapshot to obtain the target read-only snapshot if IO (input/output) operation is not performed on the writable snapshot.
An apparatus for implementing a writable snapshot, comprising:
a memory for storing a computer program;
a processor configured to implement the steps of the method for implementing a writable snapshot as described in any one of the above when the computer program is executed.
A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the steps of a method of implementing a writable snapshot as described in any one of the above.
The application provides a method, a device, equipment and a computer readable storage medium for realizing writable snapshot, wherein the method is applied to a distributed storage system and comprises the following steps: receiving a writable snapshot obtaining instruction sent by a user; analyzing the writable snapshot obtaining instruction, if the writable snapshot creating instruction is the writable snapshot, creating a read-only snapshot, and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot; creating a hidden volume invisible to a user according to the writable snapshot obtaining instruction; and performing association binding on the hidden volume and the target read-only snapshot to obtain the writable snapshot. According to the technical scheme disclosed by the application, the read-write operation of the snapshot is finally implemented on the hidden volume by performing associated binding on the read-only snapshot and the hidden volume invisible to the user, so that the writable snapshot has editable attributes, the application flexibility of the snapshot data is improved, and the application scene of the snapshot data is conveniently expanded.
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 flowchart of a method for implementing a writable snapshot according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a relationship among a source volume, a read-only snapshot, and a writable snapshot according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus for implementing a writable snapshot according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an implementation device for writable snapshots according to an embodiment of the present application.
Detailed Description
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 only a part of the embodiments of the present application, and not all of the 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.
Referring to fig. 1, which shows a flowchart of an implementation method of a writable snapshot provided in an embodiment of the present application, applied to a distributed storage system, and including:
s11: and receiving a writable snapshot obtaining instruction sent by a user.
When a user initiates a writable snapshot obtaining instruction, the bottom server receives the writable snapshot obtaining instruction sent by the user.
S12: and analyzing the writable snapshot obtaining instruction.
S13: and if the command is created for the writable snapshot, creating a read-only snapshot, and taking the read-only snapshot as a target read-only snapshot.
S14: and if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot.
Analyzing a writable snapshot obtaining instruction sent by a user, if the writable snapshot obtaining instruction obtained through analysis is specifically a writable snapshot creating instruction, creating a read-only snapshot, and taking the created read-only snapshot as a target read-only snapshot, wherein in order to enable the writable snapshot obtaining process to be normally carried out, the name of the read-only snapshot created according to the writable snapshot creating instruction (namely the target read-only snapshot) is different from the name of the read-only snapshot existing in the distributed storage system; and if the writable snapshot obtaining instruction obtained by analyzing is specifically a read-only to writable instruction, obtaining the read-only snapshot from the distributed storage system, and taking the obtained read-only snapshot as a target read-only snapshot.
S15: and creating a hidden volume which is invisible to a user according to the writable snapshot obtaining instruction.
And after receiving a writable snapshot obtaining instruction sent by a user, creating a corresponding hidden volume according to the writable snapshot obtaining instruction.
The hidden volume is invisible to a user, that is, the user cannot inquire the hidden volume through a client interface, so that only one writable snapshot capable of performing read-write operation is seen from a user layer.
S16: and performing association binding on the hidden volume and the target read-only snapshot to obtain the writable snapshot.
And after the target read-only snapshot is obtained, performing association binding on the created hidden volume and the acquired target read-only snapshot to obtain the writable snapshot. Specifically, combining the above steps, after analyzing a writable snapshot obtaining instruction sent by a user, if the writable snapshot is a writable snapshot creating instruction, creating a read-only snapshot, creating a hidden volume invisible to the user, and then, performing association binding on the read-only snapshot and the hidden volume to obtain a writable snapshot; and if the command is a read-only to writable command, creating a hidden volume which is invisible to a user, acquiring a read-only snapshot from the distributed storage system, and then performing associated binding on the acquired read-only snapshot and the hidden volume to obtain a writable snapshot.
After the writable snapshot is obtained, the subsequent read-write operations on the writable snapshot are finally implemented on the operations on the hidden volume (including the mapping of the subsequent write operations to the hidden volume), so that the writable snapshot has editable attributes from the user plane, and the read-write of the snapshot is indirectly realized.
As can be seen from the above implementation process, compared with the current mainstream read-only snapshot, the writable snapshot obtained by the present application has the basic characteristics of implementing disaster recovery backup, and the like, and also has the editable characteristic.
It should be noted that, the present application may be implemented by using C + + language, and of course, other languages may also be used, and the present application is not limited to this.
According to the technical scheme disclosed by the application, the read-write operation of the snapshot is finally implemented on the hidden volume by performing associated binding on the read-only snapshot and the hidden volume invisible to the user, so that the writable snapshot has editable attributes, the application flexibility of the snapshot data is improved, and the application scene of the snapshot data is conveniently expanded.
Before the method for implementing writable snapshot, which is provided in the embodiment of the present application, performs association binding between a hidden volume and a target read-only snapshot, the method may further include:
and setting a locking flag in the attribute information of the target read-only snapshot.
Before the hidden volume is associated and bound with the target read-only snapshot, a locking mark can be added in the attribute information of the target read-only snapshot (namely, the writable snapshot is locked through the locking mark), wherein the added locking mark can play a role in distinguishing snapshot categories on one hand, and can play a role in warning and prompting when a user prepares to delete the writable snapshot on the other hand, so that the user is prevented from deleting the writable snapshot when the user performs read-write operation, and the writable snapshot is protected.
The method for implementing the writable snapshot, provided by the embodiment of the present application, may further include, after the hidden volume is associated and bound with the target read-only snapshot to obtain the writable snapshot:
and if the IO operation is not carried out on the writable snapshot, carrying out reverse conversion on the writable snapshot so as to obtain the target read-only snapshot.
After the hidden volume and the target read-only snapshot are subjected to associated binding to obtain the writable snapshot, if IO operation is not performed on the writable snapshot, reverse conversion can be performed on the writable snapshot, that is, the associated binding between the target read-only snapshot and the hidden volume in the writable snapshot is released to obtain the target read-only snapshot. That is, the writable snapshot obtained by the present application also has a function of reverse conversion to obtain a read-only snapshot.
It should be noted that, because the IO operation is not performed on the writable snapshot, the data loss is not caused when the writable snapshot is reversely converted in the above case.
The method for implementing the writable snapshot, provided by the embodiment of the present application, may further include, after the hidden volume is associated and bound with the target read-only snapshot to obtain the writable snapshot:
and if the IO operation is carried out on the writable snapshot, the step of carrying out reverse conversion on the writable snapshot is not executed.
After the hidden volume and the target read-only snapshot are associated and bound to obtain the writable snapshot, if IO operation is performed on the writable snapshot, since data of the IO operation is not actually mapped to the target read-only snapshot, in order to avoid data loss, a step of performing reverse conversion on the writable snapshot is not performed, that is, the writable snapshots do not all have a function of performing reverse conversion to obtain the read-only snapshot under the condition.
That is, in order to prevent loss of data, the writable snapshot in the present application can only implement one-way conversion.
The method for implementing the writable snapshot, provided by the embodiment of the present application, may further include, after the hidden volume is associated and bound with the target read-only snapshot to obtain the writable snapshot:
cloning the writable snapshot and reading data to obtain a clone volume containing all data of the current writable snapshot;
wherein, performing data reading may include:
and reading data from the hidden volume, if the hidden volume has a data-free area, reading the data from the corresponding position of the target read-only snapshot, and if the corresponding position of the target read-only snapshot has no data, reading the data from the corresponding position of the source volume capable of writing the snapshot.
For the writable snapshot, when the snapshot is rolled back, because only data information when the snapshot is created is reserved in the read-only snapshot and data of subsequent IO operations is not synchronized into the read-only snapshot, the rolled-back volume information does not include IO data after the writable snapshot is created, based on which, the writable snapshot in the writable snapshot can be cloned and read for data, so as to obtain a clone volume including all data in the current writable snapshot, that is, hidden volume information of the writable snapshot is mounted in the clone volume, so as to obtain complete data of the current writable snapshot.
The process of reading data specifically includes: reading data from the hidden volume, if the hidden volume has a data-free area, reading the data from the corresponding position in the target read-only snapshot (i.e. the position corresponding to the data-free area in the hidden volume), if the positions in the target read-only snapshot also have no data, reading the data from the corresponding position of the source volume of the writable snapshot (i.e. the position corresponding to the data-free position in the target read-only snapshot, or the position corresponding to the data-free area in the hidden volume), and if the corresponding position of the source volume of the writable snapshot also has no data, it indicates that the position does not have data, at this time, no data exists at the position corresponding to the above position in the clone volume.
Mapping and mounting of snapshot data are achieved through a volume cloning mode, and a hidden volume in the writable snapshot is made visible, so that the characteristics of the writable snapshot are enriched, and the application scene of the writable snapshot is expanded.
It should be noted that the hidden volume, the clone volume, and the read-only snapshot are not limited to the same storage pool.
Referring to fig. 2, which shows a schematic diagram of a relationship among a source volume, a read-only snapshot, and a writable snapshot provided in the embodiment of the present application, a read-only snapshot may be obtained on the basis of the source volume, the read-only snapshot may be converted into a writable snapshot, both the read-only snapshot and the writable snapshot may be cloned to obtain a clone volume, or the writable snapshot may be obtained on the basis of the source volume, and both the writable snapshot and the read-only snapshot may be restored to obtain the source volume. Moreover, the writable snapshot in the present application may support management operations that include: (1) creating: directly creating a writable snapshot; (2) and (3) deleting: deleting the writable snapshot; (3) and (4) displaying a list: displaying current snapshot information, wherein the writable snapshot has an exclusive identifier; (4) and (3) restoring the source volume: the snapshot rollback operation does not contain the information after snapshot reading and writing; (5) cloning volume: mounting the writable snapshot, wherein the writable snapshot comprises information after the snapshot is read and written; (6) clearing: deleting the snapshot; (7) read-only to writable: converting the read-only snapshot into a writable snapshot; (8) and (3) snapshot attribute query: the command line queries for snapshot attributes.
An embodiment of the present application further provides an implementation apparatus for writable snapshots, which is applied to a distributed storage system, and specifically refer to fig. 3, which shows a schematic structural diagram of the implementation apparatus for writable snapshots, where the implementation apparatus for writable snapshots provided in an embodiment of the present application may include:
a receiving module 31, configured to receive a writable snapshot obtaining instruction sent by a user;
the analysis module 32 is configured to analyze the writable snapshot obtaining instruction, create a read-only snapshot if the writable snapshot creating instruction is a writable snapshot, and take the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot;
a creating module 33, configured to create a hidden volume invisible to a user according to the writable snapshot obtaining instruction;
and the association binding module 34 is configured to perform association binding on the hidden volume and the target read-only snapshot to obtain the writable snapshot.
The apparatus for implementing writable snapshots provided in an embodiment of the present application may further include:
and the locking flag setting module is used for setting a locking flag in the attribute information of the read-only snapshot before the hidden volume is associated and bound with the target read-only snapshot.
The apparatus for implementing writable snapshots provided in an embodiment of the present application may further include:
and the reverse conversion module is used for performing the reverse conversion on the writable snapshot to obtain the target read-only snapshot if the IO operation is not performed on the writable snapshot after the hidden volume and the read-only snapshot are associated and bound to obtain the writable snapshot.
The apparatus for implementing writable snapshots provided in an embodiment of the present application may further include:
and the non-execution reverse conversion module is used for performing association binding on the hidden volume and the target read-only snapshot to obtain the writable snapshot, and performing non-execution reverse conversion on the writable snapshot if IO operation is performed on the writable snapshot.
The apparatus for implementing writable snapshots provided in an embodiment of the present application may further include:
the system comprises a cloning module, a writing module and a reading module, wherein the cloning module is used for cloning a writable snapshot after the hidden volume and a target read-only snapshot are associated and bound to obtain the writable snapshot, and reading data to obtain a cloned volume containing all data in the current writable snapshot;
wherein, the cloning module may comprise:
and the reading unit is used for reading data from the hidden volume, reading the data from the corresponding position of the target read-only snapshot if the hidden volume has a data-free area, and reading the data from the corresponding position of the snapshot-writable source volume if the corresponding position of the target read-only snapshot has no data.
An embodiment of the present application further provides a device for implementing a writable snapshot, refer to fig. 4, which shows a schematic structural diagram of the device for implementing a writable snapshot provided in the embodiment of the present application, and the device may include:
a memory 41 for storing a computer program;
the processor 42, configured to execute the computer program stored in the memory 41, performs the following steps:
receiving a writable snapshot obtaining instruction sent by a user; analyzing the writable snapshot obtaining instruction, if the writable snapshot creating instruction is the writable snapshot, creating a read-only snapshot, and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot; creating a hidden volume invisible to a user according to the writable snapshot obtaining instruction; and performing association binding on the hidden volume and the target read-only snapshot to obtain the writable snapshot.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program includes the following steps:
receiving a writable snapshot obtaining instruction sent by a user; analyzing the writable snapshot obtaining instruction, if the writable snapshot creating instruction is the writable snapshot, creating a read-only snapshot, and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot; creating a hidden volume invisible to a user according to the writable snapshot obtaining instruction; performing association binding on the hidden volume and the target read-only snapshot to obtain a writable snapshot; the read-only snapshot is a read-only snapshot created according to the writable snapshot obtaining instruction or a read-only snapshot existing in the distributed storage system before the writable snapshot obtaining instruction is received.
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.
It should be noted that for the description of the relevant parts in the apparatus, the device, and the computer-readable storage medium for implementing the writable snapshot provided in the embodiments of the present application, reference is made to the detailed description of the corresponding parts in the method for implementing the writable snapshot provided in the embodiments of the present application, and details are not described here again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for implementing writable snapshots, applied to a distributed storage system, includes:
receiving a writable snapshot obtaining instruction sent by a user;
analyzing the writable snapshot obtaining instruction, if the writable snapshot creating instruction is a writable snapshot creating instruction, creating a read-only snapshot, and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot;
creating a hidden volume invisible to the user according to the writable snapshot obtaining instruction;
and performing association binding on the hidden volume and the target read-only snapshot to obtain a writable snapshot.
2. The method for implementing a writable snapshot of claim 1, prior to the associatively binding the hidden volume to the target read-only snapshot, further comprising:
and setting a locking mark in the attribute information of the target read-only snapshot.
3. The method for implementing the writable snapshot according to claim 1, after the associating and binding the hidden volume and the target read-only snapshot to obtain the writable snapshot, further comprising:
and if the IO operation is not carried out on the writable snapshot, carrying out reverse conversion on the writable snapshot so as to obtain the target read-only snapshot.
4. The method for implementing the writable snapshot of claim 3, after the associating and binding the hidden volume and the target read-only snapshot to obtain the writable snapshot, further comprising:
and if the IO operation is carried out on the writable snapshot, the step of carrying out reverse conversion on the writable snapshot is not executed.
5. The method for implementing the writable snapshot according to claim 1, after the associating and binding the hidden volume and the target read-only snapshot to obtain the writable snapshot, further comprising:
cloning the writable snapshot and reading data to obtain a clone volume containing all data in the current writable snapshot;
wherein the reading of data comprises:
and reading data from the hidden volume, if the hidden volume has a data-free area, reading the data from the corresponding position of the target read-only snapshot, and if the corresponding position of the target read-only snapshot has no data, reading the data from the corresponding position of the source volume of the writable snapshot.
6. An apparatus for implementing writable snapshots, applied to a distributed storage system, includes:
the receiving module is used for receiving a writable snapshot obtaining instruction sent by a user;
the analysis module is used for analyzing the writable snapshot acquisition instruction, creating a read-only snapshot if the writable snapshot creation instruction is the writable snapshot, and taking the read-only snapshot as a target read-only snapshot; if the command is a read-only to writable command, acquiring a read-only snapshot from the distributed storage system, and taking the read-only snapshot as a target read-only snapshot;
the creating module is used for creating a hidden volume invisible to the user according to the writable snapshot obtaining instruction;
and the association binding module is used for performing association binding on the hidden volume and the target read-only snapshot to obtain a writable snapshot.
7. The apparatus for implementing a writable snapshot of claim 6, further comprising:
and the locking flag setting module is used for setting a locking flag in the attribute information of the read-only snapshot before the hidden volume is associated and bound with the target read-only snapshot.
8. The apparatus for implementing a writable snapshot of claim 6, further comprising:
and the reverse conversion module is used for performing association binding on the hidden volume and the target read-only snapshot to obtain a writable snapshot, and performing reverse conversion on the writable snapshot to obtain the target read-only snapshot if IO (input/output) operation is not performed on the writable snapshot.
9. An apparatus for implementing a writable snapshot, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of implementing a writable snapshot as claimed in any one of claims 1 to 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, implements the steps of the method for implementing a writable snapshot as claimed in any one of claims 1 to 5.
CN201910802786.1A 2019-08-28 2019-08-28 Method, device and equipment for realizing writable snapshot and readable storage medium Withdrawn CN110658992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910802786.1A CN110658992A (en) 2019-08-28 2019-08-28 Method, device and equipment for realizing writable snapshot and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910802786.1A CN110658992A (en) 2019-08-28 2019-08-28 Method, device and equipment for realizing writable snapshot and readable storage medium

Publications (1)

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

Family

ID=69036480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910802786.1A Withdrawn CN110658992A (en) 2019-08-28 2019-08-28 Method, device and equipment for realizing writable snapshot and readable storage medium

Country Status (1)

Country Link
CN (1) CN110658992A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984472A (en) * 2020-08-27 2020-11-24 苏州浪潮智能科技有限公司 Data snapshot method, device and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291883A (en) * 2017-06-20 2017-10-24 郑州云海信息技术有限公司 The Snapshot Method and device of a kind of distributed memory system
CN107291391A (en) * 2017-06-21 2017-10-24 郑州云海信息技术有限公司 A kind of data processing method and system for distributed memory system
CN109460319A (en) * 2018-11-01 2019-03-12 郑州云海信息技术有限公司 A kind of creation method, device, system, equipment and the storage medium of writeable snapshot
CN110008067A (en) * 2019-04-15 2019-07-12 苏州浪潮智能科技有限公司 A kind of method, apparatus and distributed memory system of writeable snapshot chain type clone

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291883A (en) * 2017-06-20 2017-10-24 郑州云海信息技术有限公司 The Snapshot Method and device of a kind of distributed memory system
CN107291391A (en) * 2017-06-21 2017-10-24 郑州云海信息技术有限公司 A kind of data processing method and system for distributed memory system
CN109460319A (en) * 2018-11-01 2019-03-12 郑州云海信息技术有限公司 A kind of creation method, device, system, equipment and the storage medium of writeable snapshot
CN110008067A (en) * 2019-04-15 2019-07-12 苏州浪潮智能科技有限公司 A kind of method, apparatus and distributed memory system of writeable snapshot chain type clone

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
US8799232B2 (en) Method for generating copy of database
US20170344433A1 (en) Apparatus and method for data migration
US20090049108A1 (en) Method and apparatus for workflow versioning
US10108501B2 (en) Terminal backup and recovery method
CN108255638B (en) Snapshot rollback method and device
US20110145201A1 (en) Database mirroring
US20060259461A1 (en) Method and system for preserving access to deleted and overwritten documents by means of a system recycle bin
CN106155832B (en) A kind of method, apparatus and Android device that data are restored
US7739464B1 (en) Consistent backups of data using a roll-back log
US20160026536A1 (en) Recovery path selection during database restore
CN110658992A (en) Method, device and equipment for realizing writable snapshot and readable storage medium
CN111176901B (en) HDFS deleted file recovery method, terminal device and storage medium
CN115905114B (en) Batch updating method and system of metadata, electronic equipment and readable storage medium
CN110032474B (en) Method, system and related components for determining snapshot occupied capacity
CN103440179B (en) The continuous store method of storage device configurations information
CN111753141A (en) Data management method and related equipment
CN109254874A (en) Method for transformation, device and the equipment of a kind of piece of storing data snapshot type
KR101780236B1 (en) Apparatus and method for file management of recovered file
US11269739B2 (en) Method and system for managing backup data
CN103645967A (en) Read-only snapshot rollback method and device
CN106126555A (en) A kind of file management method and file system
CN108958968B (en) File processing method and device
CN108038028B (en) File backup method and device and file restoration method and device
EP1713008B1 (en) Method and system for preserving access to deleted and overwritten documents by means of a system recycle bin
TWI809704B (en) Devices and methods for safe storage of media containing personal data and erasure of stored personal data

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200107