CN111552437B - Snapshot method and snapshot device applied to distributed storage system - Google Patents
Snapshot method and snapshot device applied to distributed storage system Download PDFInfo
- Publication number
- CN111552437B CN111552437B CN202010319937.0A CN202010319937A CN111552437B CN 111552437 B CN111552437 B CN 111552437B CN 202010319937 A CN202010319937 A CN 202010319937A CN 111552437 B CN111552437 B CN 111552437B
- Authority
- CN
- China
- Prior art keywords
- snapshot
- data
- write
- volume
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 230000002085 persistent effect Effects 0.000 claims abstract description 4
- 238000012545 processing Methods 0.000 claims description 20
- 238000012217 deletion Methods 0.000 claims description 6
- 230000037430 deletion Effects 0.000 claims description 6
- 230000001419 dependent effect Effects 0.000 claims description 4
- 238000011084 recovery Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 6
- 208000024191 minimally invasive lung adenocarcinoma Diseases 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000005856 abnormality Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000007717 exclusion Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/065—Replication mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0665—Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
Abstract
The invention relates to a snapshot method and a snapshot device applied to a distributed storage system, wherein the distributed storage system comprises a data access client, an IO routing layer, a storage node data read-write layer and a metadata service cluster, and the snapshot method comprises the following steps: obtaining a snapshot request, wherein the snapshot request comprises a snapshot type parameter, a snapshot TAG and a logical volume UUID; the data access client side loaded with the logical volume suspends a subsequent write request; distributing the snapshot ID of the logical volume and persisting the metadata of the logical volume to create a snapshot; restoring the write request, and realizing snapshot logic of the corresponding logical volume based on the snapshot type parameter; and the IO routing layer realizes chained clone volume read-write access logic for the snapshot volume, and the snapshot logic of the corresponding logic volume is executed in the storage node data read-write layer. Compared with the prior art, the method has the advantages of low influence on performance, flexible application scene and the like.
Description
Technical Field
The present invention relates to the field of data protection and the field of distributed storage, and in particular, to a snapshot method and a snapshot device applied to a distributed storage system.
Background
With the explosive growth of data and the development of storage technology, a storage architecture gradually evolves from a traditional NAS (network attached storage) and a SAN (storage area network) to a distributed storage architecture, and a snapshot technology which is mature in traditional storage cannot be fully applied to a distributed environment and a new snapshot system must be designed and realized under the distributed storage architecture.
Snapshot technology keeps the data of a certain time point of a storage volume in a storage system completely, and there are two modes, namely Copy-On-Write (COW) and Redirect-On-Write (ROW). Copy-on-write refers to that after a snapshot is created, a write request to a logical volume is made, data on the logical volume is backed up, and then write operation to the logical volume is executed; the redirection at writing refers to allocating a new storage unit for the logical volume writing request after the snapshot is created, and writing the new storage unit in the subsequent writing operation. Both snapshot implementations require additional storage space to store the snapshot data and index metadata, and the data is stored and restored at a fixed size, e.g., 64 KiB. The snapshot logic during the read-write operation of the front-end application is processed to relate to the update of the snapshot metadata, and the mutual exclusion update of the metadata is generally realized through the lock logic. In a distributed environment, data is stored in multiple copies or erasure codes, and the data is scattered and stored on multiple physical storage devices in units of data blocks with fixed sizes. The front-end write request may be translated into write operations to multiple copies of data or multiple blocks of data or parity blocks for multiple nodes. An existing snapshot implementation manner such as a disk snapshot recovery method of a distributed storage system disclosed in patent application CN109408291a is easy to limit shared access of multiple machine heads of a logical volume in a distributed environment, and the adoption of a distributed lock mechanism to realize shared data service of multiple machine heads can bring about great reduction in performance. Therefore, snapshot techniques in distributed storage systems need to be implemented in new ways.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a snapshot method and a snapshot device applied to a distributed storage system, which can minimize the influence of snapshot logic on the performance of a logic volume.
The aim of the invention can be achieved by the following technical scheme:
a snapshot method applied to a distributed storage system including a data access client (BAC), an IO routing layer (IO Router), a storage node data read-write layer (OSD), and a metadata service Cluster (MDS Cluster), the snapshot method comprising the steps of:
obtaining a snapshot request, wherein the snapshot request comprises a snapshot type parameter, a snapshot TAG and a logical volume UUID;
the data access client side loaded with the logical volume suspends a subsequent write request;
distributing the snapshot ID of the logical volume and persisting the metadata of the logical volume to create a snapshot;
restoring the write request, and realizing snapshot logic of the corresponding logical volume based on the snapshot type parameter;
and the IO routing layer realizes chained clone volume read-write access logic for the snapshot volume, and the snapshot logic of the corresponding logic volume is executed in the storage node data read-write layer.
The snapshot request may be obtained through a snapshot management toolset or API.
Further, the types of the snapshot requests include snapshot creation, deletion, rollback, inquiry, or consistent snapshot group creation, etc., and the creation of the snapshot group may be performed.
Further, snapshot data of the data objects of the logical volume is stored on the same physical storage device as the data object data.
Further, the snapshot information of the logical volume is stored in the metadata object of the logical volume in a bitmap form, the association information of the chained clone volume and the upper logical volume is stored in the metadata object of the chained clone volume, the auxiliary information of the snapshot is stored in the metadata service cluster, and the snapshot metadata information of the data object is stored in the metadata area of the data object of the storage device.
Further, the logical volume that creates the snapshot supports IO reads and writes for multiple data access clients simultaneously.
Further, the snapshot types include copy-on-write and redirect-on-write,
when the snapshot type is copy-on-write, recording the snapshot ID of the copy-on-write operation executed last time in a metadata space of the data object, obtaining the snapshot data object according to the snapshot ID, forming a snapshot read-write chain access structure,
when the snapshot type is redirection at writing, the metadata of the logical volume data object comprises a snapshot ID of the redirection operation at writing executed last time and bitmap information containing valid data, the snapshot data object contains the bitmap information of the valid data, if the bitmap information of the valid data in the snapshot data object can not cover all data of the reading request, the front snapshot object is read until all the valid data are read,
the snapshot object data is read-only.
Further, when the snapshot type is redirection during writing, front-end data access pressure is dynamically monitored, when the front-end data access pressure is lower than a set value, effective data of a front-end snapshot object is automatically read, effective data of a rear-end snapshot object and effective data of a logic volume data object are supplemented, and access delay of a writing request is reduced.
Further, when the data access client suspends the subsequent write request, if the instruction of recovering the write request is not received within the set time, the write request is automatically recovered, and the snapshot is set as an invalid snapshot.
Further, when deleting the snapshot, judging whether the snapshot to be deleted has a dependent chain clone volume, if so, deleting the snapshot to be deleted fails.
Further, when deleting the snapshot, if the snapshot type is redirection at writing, checking metadata bitmaps of subsequent snapshot objects before the snapshot object is recovered, if not covering all valid data, completing the valid data to the subsequent snapshot object before the snapshot object is recovered, and executing the snapshot object deleting operation after the dependency relationship is released.
Further, when the distributed storage abnormality causes that a copy fault exists for data recovery, the snapshot data object of the logical volume data object is recovered preferentially, and then the logical volume data object is recovered, so that the chained access request of the snapshot data is ensured.
The invention also provides a snapshot device applied to the distributed storage system, the distributed storage system comprises a data access client, an IO routing layer, a storage node data read-write layer and a metadata service cluster, the snapshot device comprises a chained clone volume IO processing module arranged in the IO routing layer and a snapshot IO processing module arranged in the storage node data read-write layer,
the chain clone volume IO processing module is used for realizing read-write logic of the chain clone volume created based on the snapshot point of the logic volume, and the snapshot IO processing module is used for executing snapshot read-write operation of front-end application IO based on the snapshot type after creating the snapshot and supporting two modes of COW and ROW.
Compared with the prior art, the invention has the following beneficial effects:
1. the method is suitable for a distributed storage environment, supports copy-on-write and redirect-on-write snapshot technologies to adapt to different application scenes, and can minimize the influence of snapshot logic on the performance of a logic volume.
2. The invention provides a storage snapshot function based on the logic volume for the distributed storage system by realizing the snapshot in the IO routing layer and the OSD layer.
3. The snapshot data and the data object data of the data object of the logical volume are stored in the same physical storage device, the copy-on-write and the redirect-on-write of all the logical volumes are generated in the OSD, so that snapshot logic cross-physical devices and cross-physical nodes are avoided, performance loss caused by cross-device cross-node snapshot operation is avoided, and meanwhile, complexity of abnormal scene snapshot logic processing such as node abnormality which possibly occurs in distributed storage is reduced.
4. The logical volume for creating the snapshot supports a plurality of data access clients to simultaneously perform IO read-write, lock logic is not needed to be adopted among the plurality of data access clients to realize concurrent control of copy-on-write of the snapshot, and performance loss of the logical volume after the snapshot is started is reduced.
5. For the redirection snapshot type during writing, the invention dynamically monitors the front-end data access pressure, automatically reads the effective data of the front-end snapshot object when the front-end data access pressure is low, supplements the effective data of the subsequent snapshot object and the logic volume data object, and reduces the access delay of the writing request.
6. When the snapshot is deleted, the invention firstly judges that the dependent chain clone volume exists in the snapshot, releases the storage space when the snapshot and all the snapshots in the preamble are deleted, and effectively improves the reliability when the data is deleted.
Drawings
FIG. 1 is a schematic diagram of a distributed storage system to which the present invention is applied;
FIG. 2 is a schematic diagram of a distributed snapshot creation process according to the present invention;
FIG. 3 is a schematic diagram of a distributed COW snapshot implementation of the present invention;
FIG. 4 is a schematic diagram of a distributed ROW snapshot implementation of the present invention.
Detailed Description
The invention will now be described in detail with reference to the drawings and specific examples. The present embodiment is implemented on the premise of the technical scheme of the present invention, and a detailed implementation manner and a specific operation process are given, but the protection scope of the present invention is not limited to the following examples.
Example 1
The embodiment provides a snapshot device applied to a distributed storage system, which is used for realizing storage snapshot based on a logical volume and providing historical data protection and backup functions for data of the distributed storage system, and can effectively reduce the limitation on shared access and the influence on the service performance of shared data.
As shown in fig. 1, the distributed storage system of the snapshot device application of the present invention includes a data (block storage) access client (BAC), an IO routing layer (IO Router), a storage node data read-write layer (OSD) and a metadata service Cluster (MDS Cluster), where a read-write request of a front-end application is forwarded to the IO routing layer for processing via the BAC, and the IO routing layer constructs multiple copies of the read-write request and sends the read-write request to the OSD via an IO link to complete real IO read-write operation. An IO routing layer (IO Router) and a storage node data read-write layer (OSD) form a storage service node, and a plurality of storage service nodes form a storage service cluster. The snapshot device comprises a chained clone volume IO processing module and a snapshot realization module which are arranged in the IO routing layer, and a snapshot IO processing module which is arranged in the storage node data reading and writing layer, wherein the chained clone volume IO processing module realizes the reading and writing logic of the chained clone volume created based on the logical volume snapshot point, and realizes the reading and writing access support of the snapshot volume; the snapshot IO processing module is used for receiving the logical volume snapshot information of the metadata service cluster after the snapshot is created, and executing snapshot read-write operation of the front-end application IO according to the snapshot type, so as to realize specific snapshot data processing logic and support two modes of COW and ROW.
Related operations may be performed on the snapshot, including creation of the snapshot, deletion, creation of a snapshot clone volume, etc., as desired by a storage system administrator.
The snapshot creation process of the snapshot device applied to the distributed storage system comprises the following steps:
1) The metadata service cluster receives a snapshot creation request, wherein the creation request comprises a logical volume UUID, a snapshot type and a snapshot TAG;
2) The metadata service cluster informs all data access clients to suspend all subsequent write requests;
after informing all data access clients (interface layers) to suspend all subsequent write requests of corresponding logical volumes, the metadata service cluster waits for all current write requests to finish, and if the snapshot is executed on the consistent snapshot group, all subsequent write requests of the logical volumes in the group are suspended;
3) The metadata service cluster distributes new snapshot IDs for the snapshots, and updates and persists the metadata objects of the logical volumes;
the metadata service cluster generates a snapshot (group) ID, synchronizes the latest snapshot (group) ID to all distributed storage service nodes, updates the metadata of the logical volume, and increases the snapshot (group) ID atom without repeated use; 4) The metadata service cluster synchronizes the latest logical volume snapshot ID to all storage service nodes, and all storage service nodes inform the metadata cluster that the latest logical volume snapshot ID is received;
5) The metadata service cluster notifies all data access clients to resume write request processing and synchronizes the latest snapshot ID.
In fig. 2, the metadata service cluster receives a snapshot request of CLI/API for creating a logical volume, searches for all BACs mounted on the logical volume, and notifies all BACs mounted on the logical volume to suspend subsequent write requests; after the logical volume snapshot ID is allocated and persisted, notifying all storage service nodes, returning to a request end after completion, completing snapshot creation, and notifying all BACs to resume subsequent write request processing. All subsequent snapshot read-write logic processes according to the latest snapshot ID.
The COW snapshot processing logic is as follows:
1) The read-write request of the data access client to the logical volume comprises the snapshot type and the snapshot ID of the logical volume;
2) The OSD checks the snapshot ID of the copy data object for executing the COW for the last time, if the snapshot ID is consistent with the latest snapshot ID of the write request, the write operation is directly executed, and if the snapshot ID is inconsistent with the latest snapshot ID of the write request, the COW operation is executed;
3) The OSD executes the COW operation, firstly acquires the data object write lock, and avoids triggering the COW operation for a plurality of times by the write request of the same data object; distributing a snapshot object storage space, copying data object data to a snapshot object, and updating snapshot object metadata;
4) The OSD performs a write operation on the data object and returns the processing result to the IO routing layer.
Fig. 3 is a logic diagram of a distributed COW snapshot implementation in this embodiment. Taking a logical volume with a volume ID of 0x8641 as an example, at time T0, the data object and the object ID are 0x0864100000000001, and a snapshot point is created at each of times T1, T2, T3 and T4. A write request to the data object is made once after time T3 and once after time T4.
At time T0, volume 0x8641 does not create any snapshot, and directly translates to a write request for a data object with ID 0x0864100000000001 according to the write offset and length of the write request;
after the time T3, a write request for the same data object is received again, metadata of the data object is queried, lastSnapid is 0, any COW operation is not executed, the COW operation is executed, data of the data object 0x0864100000000001 is read and stored in a data area of a newly created snapshot object 0x0864100030000001, metadata SnapRange of the snapshot object is updated to be 1-3, and the data of the snapshot data object is indicated to be shared by snapshots 1,2 and 3; updating metadata LastSnapID of data object 0x0864100000000001 to 3, indicating snapshot ID of last execution of COW operation; the COW operation is complete and the write request is written in data object 0x0864100000000001.
After the time T4, the write request is received again, at this time, the snapshot ID is updated to 4, the LastSnapID in the data object 0x0864100000000001 is still 3, the SnapID is inconsistent with the LastSnapID, the COW operation is executed, after the completion, the new snapshot data is stored in the snapshot object 0x0864100040000001, the new snapshot object metadata SnapRange is 4-4, and the updated logical volume data object 0x0864100000000001 metadata LastSnapID is 4.
If the snapshot data at a certain snapshot time is required to be read, the data corresponding to the snapshot ID is found out through chained access of the data object and metadata of the snapshot data object to be read. The data of the snapshot data object is read-only.
ROW snapshot processing flow:
1) The read-write request of the data access client to the logical volume comprises the snapshot type and the snapshot ID of the logical volume;
2) For the write request, the OSD checks the snapshot ID of the copy original data object for the last time to execute the ROW, if the snapshot ID is consistent with the latest snapshot ID of the write request, the write operation is redirected to the latest storage position to be executed, and the effective data bitmap of the original data object b is updated after the completion; if the data objects are inconsistent, a new storage data object is distributed, the writing operation is redirected to the new storage data object, the original data object metadata is updated, and the latest storage position index is updated;
3) For a read request, the OSD looks up a valid data bitmap of the latest original data object, redirects the read request to the latest storage location if valid data covers all data blocks required by the read request, and reads the latest storage if only part of valid data is covered or no valid data is covered.
Fig. 4 is a logic diagram of a distributed ROW snapshot implementation of the present embodiment.
At time T0, the logical volume is to create any snapshot and the volume write request writes data object 0x0864100000000001 according to the write offset and data length.
After time T3, a write request is received, metadata of a data object 0x0864100000000001 is queried, lastSnapID is 0, ROW is triggered, a new data object 0x0864100040000001 is created, write request data is written to the latest data object, metadata SnapRange is set as [4-0xFFFF ], the data belongs to all subsequent snapshots with snapshot ID of 3, bitmap records the data position and length of real writing, original data object 0x0864100000000001 becomes read-only, updated metadata lastsnapid=3, snapRange is [1-3], the data representing the data object is shared by snapshots 1,2,3, and the write request returns writing success.
At time T4, the write request is received again, the data object 0x0864100000000001 metadata is queried, lastsnap ID is 3, the calculated data object is 0x0864100040000001, snap range of the data object is 4-0xFFFF, the current logical volume snapshot ID is 4, no match exists, a new data object 0x0864100050000001 is created again, the write request data is written into the data object, and snap range (5-0 xFFFF) and valid data bitmap (0 xFFFF 0000) of the corresponding metadata are updated. Metadata snaplange update for data object 0x0864100040000001 is [4-4], data object becomes read-only, write request returns write success.
Performing snapshot deletion includes the steps of:
4-1) the metadata service cluster receives a snapshot deletion request, updates the metadata of the logical volume, marks snapshot deletion, informs all storage service nodes, and if the snapshot has a dependent chained clone volume, fails to delete the snapshot;
4-2) the OSD layer snapshot logic receives the snapshot deleting information, if the snapshot and the preamble all snapshots are deleted, all deleted snapshot objects are recovered in all physical storage devices, and the storage space occupied by the snapshot data is released.
Example 2
The embodiment provides a snapshot method applied to a distributed storage system, which comprises the following steps: obtaining a snapshot request, wherein the snapshot request comprises a snapshot type parameter, a snapshot TAG and a logical volume UUID; the data access client side loaded with the logical volume suspends a subsequent write request; distributing the snapshot ID of the logical volume and persisting the metadata of the logical volume to create a snapshot; restoring the write request, and realizing the snapshot logic of the corresponding logic volume based on the snapshot type parameter. The IO routing layer realizes chained clone volume read-write access logic of the snapshot volume, and the snapshot logic of the corresponding logic volume is executed in the storage node data read-write layer.
The foregoing describes in detail preferred embodiments of the present invention. It should be understood that numerous modifications and variations can be made in accordance with the concepts of the invention by one of ordinary skill in the art without undue burden. Therefore, all technical solutions which can be obtained by logic analysis, reasoning or limited experiments based on the prior art by the technical personnel in the field according to the inventive concept are within the protection scope determined by the present invention.
Claims (9)
1. A snapshot method applied to a distributed storage system, wherein the distributed storage system comprises a data access client, an IO routing layer, a storage node data read-write layer and a metadata service cluster, the snapshot method comprising the following steps:
obtaining a snapshot request, wherein the snapshot request comprises a snapshot type parameter, a snapshot TAG and a logical volume UUID;
the data access client side loaded with the logical volume suspends a subsequent write request;
distributing the snapshot ID of the logical volume and persisting the metadata of the logical volume to create a snapshot;
restoring a write request, synchronizing the latest snapshot ID, and realizing snapshot logic of a corresponding logic volume based on the snapshot type parameter;
the IO routing layer realizes chained clone volume read-write access logic for the snapshot volume, and the snapshot logic of the corresponding logic volume is executed in the storage node data read-write layer;
the snapshot types include copy-on-write and redirect-on-write,
when the snapshot type is copy-on-write, recording the snapshot ID of the copy-on-write operation executed last time in a metadata space of the data object, obtaining the snapshot data object according to the snapshot ID, forming a snapshot read-write chain access structure,
when the snapshot type is redirection at writing, the metadata of the logical volume data object comprises a snapshot ID and valid data bitmap information of the redirection operation at writing executed last time, the snapshot data object comprises the valid data bitmap information, and if the valid data bitmap information in the snapshot data object cannot cover all data of a reading request, the front snapshot object is read until all the valid data are read.
2. The snapshot method of claim 1, wherein snapshot data of data objects of the logical volume is stored on a same physical storage device as data object data.
3. The snapshot method according to claim 1, wherein the snapshot information of the logical volume is stored in a bitmap form in a metadata object of the logical volume, the association information of the chain clone volume and the upper logical volume is stored in a metadata object of the chain clone volume, the attached information of the snapshot is stored in a metadata service cluster, and the snapshot metadata information of the data object is stored in a metadata area of the storage device data object.
4. The snapshot method applied to the distributed storage system according to claim 1, wherein the logical volume for creating the snapshot supports the simultaneous IO reading and writing of a plurality of data access clients.
5. The snapshot method applied to a distributed storage system according to claim 1, wherein when the snapshot type is redirection at writing, front-end data access pressure is dynamically monitored, and when the front-end data access pressure is lower than a set value, front-end snapshot object valid data is automatically read, and subsequent snapshot objects and logical volume data object valid data are filled.
6. The snapshot method according to claim 1, wherein when the data access client suspends a subsequent write request, if a command for recovering the write request is not received within a set time, the write request is automatically recovered, and the snapshot is set as an invalid snapshot.
7. The snapshot method applied to a distributed storage system according to claim 1, wherein when a snapshot is deleted, it is determined whether a dependent chain clone volume exists in the snapshot to be deleted, and if so, deletion fails.
8. The snapshot method according to claim 1, wherein when a failure of the distributed storage results in a copy failure for data recovery, the snapshot data objects of the logical volume data objects are preferentially recovered, and the logical volume data objects are recovered again.
9. A snapshot device applied to a distributed storage system for implementing the method according to any one of claims 1 to 8, wherein the distributed storage system comprises a data access client, an IO routing layer, a storage node data read-write layer and a metadata service cluster, the snapshot device comprises a chained clone volume IO processing module arranged in the IO routing layer and a snapshot IO processing module arranged in the storage node data read-write layer, wherein,
the chained clone volume IO processing module realizes the read-write logic of the chained clone volume created based on the snapshot point of the logic volume,
the snapshot IO processing module is used for executing snapshot read-write operation of the front-end application IO based on the snapshot type after the snapshot is created.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010319937.0A CN111552437B (en) | 2020-04-22 | 2020-04-22 | Snapshot method and snapshot device applied to distributed storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010319937.0A CN111552437B (en) | 2020-04-22 | 2020-04-22 | Snapshot method and snapshot device applied to distributed storage system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111552437A CN111552437A (en) | 2020-08-18 |
CN111552437B true CN111552437B (en) | 2024-03-15 |
Family
ID=72002492
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010319937.0A Active CN111552437B (en) | 2020-04-22 | 2020-04-22 | Snapshot method and snapshot device applied to distributed storage system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111552437B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113721849B (en) * | 2021-08-23 | 2024-04-12 | 深圳市杉岩数据技术有限公司 | Data copying and unloading method based on distributed storage and terminal equipment |
CN113568788B (en) * | 2021-09-26 | 2021-11-30 | 成都云祺科技有限公司 | Snapshot method, system and storage medium for Linux non-logical volume block device |
CN113721861B (en) * | 2021-11-01 | 2022-02-08 | 深圳市杉岩数据技术有限公司 | Fixed-length block-based data storage implementation method and computer-readable storage medium |
CN114116312B (en) * | 2021-11-25 | 2022-08-09 | 北京大道云行科技有限公司 | ROW snapshot design method and system based on distributed block storage |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1896960A (en) * | 2005-07-12 | 2007-01-17 | 中国科学院计算技术研究所 | Fast photographic system and method |
CN102868727A (en) * | 2012-08-23 | 2013-01-09 | 广东电子工业研究院有限公司 | Method for realizing high availability of logical volume |
TW201318382A (en) * | 2011-06-10 | 2013-05-01 | Interdigital Patent Holdings | Method and apparatus for performing neighbor discovery |
CN103942011A (en) * | 2014-03-04 | 2014-07-23 | 中国科学院计算技术研究所 | Differential snapshot system and use method thereof |
CN105843704A (en) * | 2016-03-15 | 2016-08-10 | 上海爱数信息技术股份有限公司 | Data protection method and system capable of combining with snapshot function based on distributed block storage |
CN106055431A (en) * | 2016-05-30 | 2016-10-26 | 河海大学 | Data backup and recovery method and data backup and recovery device based on snapshot online rollback |
CN107291391A (en) * | 2017-06-21 | 2017-10-24 | 郑州云海信息技术有限公司 | A kind of data processing method and system for distributed memory system |
CN107798130A (en) * | 2017-11-17 | 2018-03-13 | 广西广播电视信息网络股份有限公司 | A kind of Snapshot Method of distributed storage |
WO2018119998A1 (en) * | 2016-12-30 | 2018-07-05 | 华为技术有限公司 | Snapshot rollback method, apparatus, storage controller, and system |
CN109327539A (en) * | 2018-11-15 | 2019-02-12 | 上海天玑数据技术有限公司 | A kind of distributed block storage system and its data routing method |
CN109408291A (en) * | 2018-10-31 | 2019-03-01 | 郑州云海信息技术有限公司 | A kind of distributed memory system disk snapshot restoration methods, device and electronic equipment |
CN110032474A (en) * | 2019-04-12 | 2019-07-19 | 苏州浪潮智能科技有限公司 | A kind of snapshot, which occupies, holds method for determination of amount, system and associated component |
CN110058822A (en) * | 2019-04-26 | 2019-07-26 | 北京计算机技术及应用研究所 | A kind of disk array transverse direction expanding method |
CN110502187A (en) * | 2019-07-09 | 2019-11-26 | 华为技术有限公司 | A kind of snapshot rollback method and device |
CN110554834A (en) * | 2018-06-01 | 2019-12-10 | 阿里巴巴集团控股有限公司 | File system data access method and file system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10540165B2 (en) * | 2016-02-12 | 2020-01-21 | Nutanix, Inc. | Virtualized file server rolling upgrade |
US20190073270A1 (en) * | 2017-09-05 | 2019-03-07 | Robin Systems, Inc. | Creating Snapshots Of A Storage Volume In A Distributed Storage System |
-
2020
- 2020-04-22 CN CN202010319937.0A patent/CN111552437B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1896960A (en) * | 2005-07-12 | 2007-01-17 | 中国科学院计算技术研究所 | Fast photographic system and method |
TW201318382A (en) * | 2011-06-10 | 2013-05-01 | Interdigital Patent Holdings | Method and apparatus for performing neighbor discovery |
CN102868727A (en) * | 2012-08-23 | 2013-01-09 | 广东电子工业研究院有限公司 | Method for realizing high availability of logical volume |
CN103942011A (en) * | 2014-03-04 | 2014-07-23 | 中国科学院计算技术研究所 | Differential snapshot system and use method thereof |
CN105843704A (en) * | 2016-03-15 | 2016-08-10 | 上海爱数信息技术股份有限公司 | Data protection method and system capable of combining with snapshot function based on distributed block storage |
CN106055431A (en) * | 2016-05-30 | 2016-10-26 | 河海大学 | Data backup and recovery method and data backup and recovery device based on snapshot online rollback |
WO2018119998A1 (en) * | 2016-12-30 | 2018-07-05 | 华为技术有限公司 | Snapshot rollback method, apparatus, storage controller, and system |
CN107291391A (en) * | 2017-06-21 | 2017-10-24 | 郑州云海信息技术有限公司 | A kind of data processing method and system for distributed memory system |
CN107798130A (en) * | 2017-11-17 | 2018-03-13 | 广西广播电视信息网络股份有限公司 | A kind of Snapshot Method of distributed storage |
CN110554834A (en) * | 2018-06-01 | 2019-12-10 | 阿里巴巴集团控股有限公司 | File system data access method and file system |
CN109408291A (en) * | 2018-10-31 | 2019-03-01 | 郑州云海信息技术有限公司 | A kind of distributed memory system disk snapshot restoration methods, device and electronic equipment |
CN109327539A (en) * | 2018-11-15 | 2019-02-12 | 上海天玑数据技术有限公司 | A kind of distributed block storage system and its data routing method |
CN110032474A (en) * | 2019-04-12 | 2019-07-19 | 苏州浪潮智能科技有限公司 | A kind of snapshot, which occupies, holds method for determination of amount, system and associated component |
CN110058822A (en) * | 2019-04-26 | 2019-07-26 | 北京计算机技术及应用研究所 | A kind of disk array transverse direction expanding method |
CN110502187A (en) * | 2019-07-09 | 2019-11-26 | 华为技术有限公司 | A kind of snapshot rollback method and device |
Non-Patent Citations (2)
Title |
---|
Maysam Yabandeh等.A critique of snapshot isolation.《EuroSys '12: Proceedings of the 7th ACM european conference on Computer SystemsApril 2012 》.2012,第155-168页. * |
张权 ; 胡晓勤 ; .一种基于Linux标准分区的快照方法.现代计算机(专业版).2017,(07),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111552437A (en) | 2020-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111552437B (en) | Snapshot method and snapshot device applied to distributed storage system | |
US11550675B2 (en) | Remote data replication method and system | |
KR100983300B1 (en) | Recovery from failures within data processing systems | |
US7412578B2 (en) | Snapshot creating method and apparatus | |
US8639731B2 (en) | Apparatus for managing plural versions of a root node for an object of a file system | |
US9442664B2 (en) | Efficient flashcopy backup target volume allocation from a shared resource pool | |
US8051044B1 (en) | Method and system for continuous data protection | |
US7865772B2 (en) | Management device and management method | |
US6678809B1 (en) | Write-ahead log in directory management for concurrent I/O access for block storage | |
US9747046B2 (en) | Collision avoidance using dynamic target volume allocation in a single repository | |
US9817724B2 (en) | Efficient FlashCopy backup target volume allocation with reuse and a shared resource pool | |
US20090216976A1 (en) | Computer system allowing any computer to copy any storage area within a storage system | |
GB2534956A (en) | Storage system and storage control method | |
US20070033361A1 (en) | Apparatus, system, and method for fastcopy target creation | |
US9454315B2 (en) | Efficient flashcopy backup target volume allocation from a shared resource pool while ingesting a flashcopy backup in a repository | |
US9600188B2 (en) | Collision avoidance using dynamic target volume allocation from a shared resource pool | |
US9710339B2 (en) | Collision avoidance using dynamic volume allocation with reuse | |
US9672118B2 (en) | Collision avoidance using dynamic target volume allocation | |
US9690500B2 (en) | Efficient flashcopy backup target volume allocation | |
US20090094426A1 (en) | Storage system | |
US20240134575A1 (en) | Storage system and storage control method | |
US9632710B2 (en) | Efficient use of Flashcopy resources and target volumes for dynamic target volume allocation | |
CN117917647A (en) | Recording system and recording control method | |
CN116126826A (en) | WAL batch management method, system, device and storage medium |
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 | ||
CB03 | Change of inventor or designer information |
Inventor after: Tong Feiwen Inventor after: Kang Liang Inventor after: Su Yujun Inventor after: Ye Lei Inventor after: Sun Hongbiao Inventor before: Tong Wenfei Inventor before: Kang Liang Inventor before: Su Yujun Inventor before: Ye Lei Inventor before: Sun Hongbiao |
|
CB03 | Change of inventor or designer information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |