Data processing method, device, equipment, storage medium and program product

By creating and updating metadata copies in the source storage pool, the cross-pool problem of metadata records in cloning operations is solved, the reliability of metadata records and the atomicity of cloning operations are achieved, and the continuity of data processing is guaranteed.

CN119376627BActive Publication Date: 2025-09-26DAWNING INFORMATION IND (BEIJING) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411450562.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-09-26
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

In a storage system, when a cloning operation involves different storage pools, the cross-pool problem of metadata records makes it impossible to guarantee the atomicity of the cloning operation, reducing the reliability of the metadata records.

Method used

Create a metadata copy in the source storage pool and update the metadata copy during the reverse synchronization operation to complete the metadata modification and synchronization operations in the source storage pool and avoid cross-pool processing.

Benefits of technology

The reliability of metadata records is improved, ensuring the atomicity of cloning operations and the continuity of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376627B_ABST
    Figure CN119376627B_ABST
Patent Text Reader

Abstract

The present application relates to a data processing method, apparatus, device, storage medium and program product. The method comprises: after obtaining a reverse synchronization request for a first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located, wherein the metadata copy is obtained by copying the target metadata associated with the first target volume in the target storage pool where the first target volume is located; if so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation; after the reverse synchronization operation is completed, updating the target metadata based on the updated metadata copy. The use of this method can improve the reliability of metadata recording during data reverse synchronization operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, storage medium, and program product. Background Art

[0002] In storage systems, to ensure data processing continuity in the event of a storage failure, metadata such as data attributes and relationships involved in the data processing process must be recorded. If all the data involved in the data processing process is stored in a single storage pool, it is easier to ensure the atomicity of operations.

[0003] However, standard cloning is an important advanced function of storage systems. The source and target volumes of the clone pair generally belong to different storage pools. Therefore, when performing cloning operations involving two storage pools, such as reverse synchronization operations, the metadata generated by the cloning operation may have cross-pool issues. In this case, the atomicity of the cloning operation cannot be guaranteed, which in turn reduces the reliability of the metadata recording. Summary of the Invention

[0004] Based on this, it is necessary to provide a data processing method, device, equipment, storage medium and program product that can improve the reliability of metadata recording in response to the above technical problems.

[0005] In a first aspect, the present application provides a data processing method, comprising:

[0006] After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume is located;

[0007] If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation;

[0008] After the reverse synchronization operation is completed, the target metadata is updated based on the updated metadata copy.

[0009] In an embodiment of the present application, by creating a metadata copy in the source storage pool, when performing a reverse synchronization operation from the first target volume to the first source volume, the reverse synchronization operation and the metadata recording operation can be simultaneously implemented in the source storage pool, thereby effectively avoiding the cross-pool processing problem during the reverse synchronization operation, and thereby improving the reliability of metadata recording.

[0010] In one embodiment, performing a reverse synchronization operation from a first target volume to a first source volume includes:

[0011] If the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, the target metadata currently stored in the target storage pool is used to update the metadata copy; after completing the update of the metadata copy, a reverse synchronization operation is performed from the first target volume to the first source volume.

[0012] In an embodiment of the present application, by determining whether the metadata copy needs to be updated based on the version information of the target metadata and the metadata copy before performing the reverse synchronization operation, the reliability of the metadata copy can be guaranteed, thereby ensuring the reliability of the reverse synchronization operation.

[0013] In one embodiment, the first source volume and the first target volume form a first clone pair, and the index identifiers of the first source volume, the first target volume, and the target metadata are all first identifiers of the first clone pair; the method further includes:

[0014] In response to a data deletion instruction for the first clone pair, the first source volume and the first target volume are deleted according to the first identifier of the first clone pair; the target metadata is located according to the first identifier, and a data association relationship is obtained from the target metadata; wherein the data association relationship is an association relationship between the target metadata and the metadata copy; according to the data association relationship, the metadata copy is deleted; after the metadata copy deletion operation is completed, the target metadata is deleted.

[0015] In an embodiment of the present application, by deleting the first source volume, the first target volume, the metadata copy and the target metadata in sequence based on the first identifier of the first clone pair and the data association relationship, the reliability of the clone pair data deletion can be ensured.

[0016] In one embodiment, after deleting the target metadata, the method further includes:

[0017] In response to a creation instruction for a second clone pair, second identification information of the second clone pair is obtained; when the second identification information is the same as the first identification information, whether there is residual data of the metadata copy in the source storage pool is detected; if so, the residual data is deleted, and after the residual data is deleted, the creation operation of the second clone pair is executed.

[0018] In the implementation of the present application, by detecting whether there is residual data of the metadata copy in the source storage pool when constructing the second clone pair with the same identification information as the first clone pair, the reliability of data processing for the second clone pair can be guaranteed.

[0019] In one embodiment, the method further comprises:

[0020] If no metadata copy exists in the source storage pool, the target metadata associated with the first target volume in the target storage pool is copied to the source storage pool to create a metadata copy in the source storage pool, and the reverse synchronization operation from the first target volume to the first source volume is performed again.

[0021] In the implementation of the present application, by creating a metadata copy in the source storage pool when no metadata copy exists in the source storage pool, the reliability of the reverse synchronization operation can be guaranteed.

[0022] In one embodiment, updating the target metadata according to the updated metadata copy includes:

[0023] If a forward synchronization request for the first source volume is received, or if a reverse synchronization request for the first source volume is not received within the waiting time, the target metadata is updated according to the updated metadata copy.

[0024] In the embodiment of the present application, the target metadata is updated in two ways, which can improve the update efficiency of the target metadata while ensuring the reliability of the target metadata.

[0025] In a second aspect, the present application further provides a data processing device, comprising:

[0026] a copy determination module configured to, upon receiving a reverse synchronization request for the first source volume, determine whether a metadata copy exists in the source storage pool where the first source volume resides; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume resides;

[0027] a first updating module, configured to, if yes, perform a reverse synchronization operation from the first target volume to the first source volume, and update the metadata copy during the reverse synchronization operation;

[0028] The second updating module is configured to update the target metadata according to the updated metadata copy after the reverse synchronization operation is completed.

[0029] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0030] After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume is located;

[0031] If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation;

[0032] After the reverse synchronization operation is completed, the target metadata is updated based on the updated metadata copy.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0034] After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume is located;

[0035] If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation;

[0036] After the reverse synchronization operation is completed, the target metadata is updated based on the updated metadata copy.

[0037] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0038] After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume is located;

[0039] If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation;

[0040] After the reverse synchronization operation is completed, the target metadata is updated based on the updated metadata copy.

[0041] The above-mentioned data processing method, apparatus, device, storage medium and program product, after obtaining a reverse synchronization request for the first source volume, determines whether there is a metadata copy obtained by copying the target metadata associated with the first target volume in the source storage pool where the first source volume is located; then, if the metadata copy exists, performs a reverse synchronization operation from the first target volume to the first source volume, and updates the metadata copy during the reverse synchronization operation, and then after the reverse synchronization operation is completed, updates the target metadata according to the updated metadata copy. Compared with the related art, which directly performs cross-pool processing for the reverse synchronization operation, the above-mentioned method, by creating a metadata copy in the source storage pool, can simultaneously implement the reverse synchronization operation and the metadata recording operation in the source storage pool when performing the reverse synchronization operation from the first target volume to the first source volume, effectively avoiding the cross-pool processing problem during the reverse synchronization operation, thereby improving the reliability of the metadata recording. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1A 1 is a flow chart of a data processing method in one embodiment;

[0044] Figure 1B is a schematic diagram of a storage pool in one embodiment;

[0045] Figure 2A A schematic diagram of a process for performing a reverse synchronization operation in one embodiment;

[0046] Figure 2B is a schematic diagram of a storage pool in another embodiment;

[0047] Figure 3 A schematic diagram of a process for creating a clone pair in one embodiment;

[0048] Figure 4 is a flow chart of a data processing method in another embodiment;

[0049] Figure 5 is a structural block diagram of a data processing device in one embodiment;

[0050] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0052] In storage systems, to ensure data processing continuity in the event of a storage failure, metadata such as data attributes and relationships involved in the data processing process must be recorded. If all the data involved in the data processing process is stored in a single storage pool, it is easier to ensure the atomicity of operations.

[0053] However, standard cloning is an important advanced function of storage systems. The source and target volumes of the clone pair generally belong to different storage pools. Therefore, when performing cloning operations involving two storage pools, such as reverse synchronization operations, the metadata generated by the cloning operation may have cross-pool issues. In this case, the atomicity of the cloning operation cannot be guaranteed, which in turn reduces the reliability of the metadata recording.

[0054] Based on this, in an exemplary embodiment, as Figure 1A As shown, a data processing method is provided, which is described by taking the method applied to a data processing device in a server as an example, and specifically includes the following steps:

[0055] S101: After obtaining a reverse synchronization request for a first source volume, it is determined whether there is a metadata copy in the source storage pool where the first source volume is located.

[0056] Among them, the reverse synchronization request is used to indicate a request for reverse synchronization to the first source volume; the first source volume refers to the cloned data volume, and accordingly, the first target volume is the data volume cloned based on the first source volume; the source storage pool is the storage pool where the first source volume is located; the metadata copy is obtained by copying the target metadata associated with the first target volume in the target storage pool where the first target volume is located.

[0057] Metadata is information that describes data attributes and is used to support functions such as indicating storage location, historical data, resource search, and file records. Target metadata is used to represent metadata associated with the first source volume and the first target volume. For example, it includes but is not limited to metadata corresponding to the first source volume and the first target volume, as well as metadata generated by processing the first source volume and the first target volume.

[0058] refer to Figure 1BAs shown, after receiving a clone instruction for the first source volume, the target storage pool is determined based on the clone path contained in the clone instruction, and the first target volume is created in the target storage pool; then, the target metadata associated with the first source volume and the first target volume is stored in a fixed location associated with the first target volume in the target storage pool.

[0059] It is understandable that when performing a reverse synchronization operation from the first target volume to the first source volume, metadata modification is involved. If modifications are made directly in the target metadata, the target metadata modification needs to be performed in the target storage pool, while the reverse synchronization operation is performed on the source storage pool, that is, there is a cross-pool operation problem. In this case, the target metadata associated with the first target volume in the target storage pool can be copied to create a metadata replica in the source storage pool. This allows both the metadata modification operation and the reverse synchronization operation to be completed in the source storage pool, thereby avoiding the above-mentioned cross-pool operation problem.

[0060] Based on this, after obtaining the reverse synchronization request for the first source volume, it is necessary to determine whether there is a metadata copy corresponding to the target metadata in the source storage pool based on the file information in the source storage pool.

[0061] S102: If yes, perform a reverse synchronization operation from the first target volume to the first source volume, and update the metadata copy during the reverse synchronization operation.

[0062] Optionally, if there is a metadata copy in the source storage pool that corresponds to the target metadata, a reverse synchronization operation can be directly performed from the first target volume to the first source volume based on the data information in the first target volume and the association relationship between the first source volume and various types of data in the first target volume. During the reverse synchronization operation, the metadata in the metadata copy is updated according to the data synchronization status of the first source volume.

[0063] Exemplarily, if no metadata copy exists in the source storage pool, the target metadata associated with the first target volume in the target storage pool is copied to the source storage pool to create a metadata copy in the source storage pool, and a reverse synchronization operation is performed from the first target volume to the first source volume.

[0064] Optionally, when no metadata copy exists in the source storage pool, the target metadata can be copied and the copy result can be stored in the source storage pool to create a metadata copy in the source storage pool; then, after the metadata copy is built, a reverse synchronization operation can be performed from the first target volume to the first source volume, and the metadata copy can be updated during the reverse synchronization operation.

[0065] S103: After the reverse synchronization operation is completed, the target metadata is updated according to the updated metadata copy.

[0066] Optionally, after the reverse synchronization operation is complete, the target metadata in the target storage pool can be updated based on the metadata information in the updated metadata replica, so that the target metadata matches the first source volume and the first target volume after the reverse synchronization. Although the synchronization operation from the metadata replica to the target metadata occurs across pools, it does not require atomicity and can therefore be performed normally.

[0067] It is understandable that the introduction of the metadata copy will increase the memory and storage space overhead. Therefore, after the target metadata is updated using the metadata copy, the metadata copy can be directly deleted.

[0068] In the above data processing method, after obtaining a reverse synchronization request for the first source volume, it is determined whether there is a metadata copy obtained by copying the target metadata associated with the first target volume in the source storage pool where the first source volume is located; then, if the metadata copy exists, a reverse synchronization operation is performed from the first target volume to the first source volume, and the metadata copy is updated during the reverse synchronization operation, and then after the reverse synchronization operation is completed, the target metadata is updated according to the updated metadata copy. Compared with the related art, which directly performs cross-pool processing for the reverse synchronization operation, the above method creates a metadata copy in the source storage pool, so that when performing the reverse synchronization operation from the first target volume to the first source volume, the reverse synchronization operation and the metadata recording operation can be simultaneously implemented in the source storage pool, effectively avoiding the cross-pool processing problem during the reverse synchronization operation, thereby improving the reliability of metadata recording.

[0069] In actual applications, there may be a problem that the content in the metadata copy is not updated in time, which will lead to the problem that the recorded content in the metadata copy is inconsistent with the actual content during the reverse synchronization process. Based on this, on the basis of the above embodiment, this embodiment provides an optional method for performing reverse synchronization operations, such as Figure 2A As shown, the specific steps include:

[0070] S201: If the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, the metadata copy is updated using the target metadata currently stored in the target storage pool.

[0071] The version information is used to represent the updated version of the target metadata and the metadata copy. The larger the version information, the newer the information content. Figure 2B, the target metadata's version information can be initially set to 1 (Version=1). Subsequently, when creating a metadata replica after copying the target metadata, 1 can be added to the target metadata's version information, resulting in the metadata replica's version information being 2 (Version=2). Furthermore, based on this, if a synchronization operation is performed from the first source volume to the first target volume, the target metadata's version information will be updated to 3 after the synchronization operation.

[0072] Optionally, when determining that a metadata copy exists in the source storage pool, in order to determine whether the metadata copy stores the latest metadata information, the version information of the target metadata currently stored in the target storage pool and the version information of the metadata copy can be obtained respectively.

[0073] Furthermore, if the version information of the target metadata currently stored in the target storage pool is smaller than the version information of the metadata copy, it proves that the latest metadata information exists in the metadata copy at this time, and the reverse synchronization operation can be directly performed at this time.

[0074] If the target metadata currently stored in the target storage pool has a version greater than the version of the metadata replica, the metadata in the metadata replica is not the latest version. Therefore, the metadata replica must be updated using the target metadata currently stored in the target storage pool. For example, a data synchronization operation can be performed from the target metadata to the metadata replica.

[0075] In addition, to ensure the reliability of the metadata copy, it is also possible to determine whether the metadata copy needs to be updated based on the latest update time of the target metadata and the metadata copy. For example, the latest update time of the target metadata can be compared with the latest update time of the metadata copy. If the latest update time of the metadata copy is closer to the current time, then the metadata copy does not need to be updated; if the latest update time of the target metadata is closer to the current time, then the metadata copy needs to be updated.

[0076] S202: After completing the update of the metadata copy, perform a reverse synchronization operation from the first target volume to the first source volume.

[0077] Optionally, after completing the update of the metadata copy, a reverse synchronization operation from the first target volume to the first source volume may be performed based on the data information in the first target volume and the association relationship between various types of data in the first source volume and the first target volume.

[0078] In an embodiment of the present application, by determining whether the metadata copy needs to be updated based on the version information of the target metadata and the metadata copy before performing the reverse synchronization operation, the reliability of the metadata copy can be guaranteed, thereby ensuring the reliability of the reverse synchronization operation.

[0079] In actual applications, to ensure available space in the storage system, unnecessary clone pair data is deleted. Therefore, based on the above embodiment, in this embodiment, the first source volume and the first target volume form a first clone pair, and the index identifiers of the first source volume, the first target volume, and the target metadata are all the first identifiers of the first clone pair. Furthermore, an optional method for deleting the clone pair is provided, specifically including the following:

[0080] In response to a data deletion instruction for the first clone pair, the first source volume and the first target volume are deleted according to the first identifier of the first clone pair; the target metadata is located according to the first identifier, and the data association relationship is obtained from the target metadata; the metadata copy is deleted according to the data association relationship; after the metadata copy deletion operation is completed, the target metadata is deleted.

[0081] The data deletion instruction refers to a deletion instruction for the first clone pair; the first identifier refers to the unique identifier information of the first clone pair; and the data association relationship refers to the association relationship between the target metadata and the metadata copy.

[0082] Optionally, when a data deletion instruction for the first clone pair is detected, the first identifier of the first clone pair can be obtained from the data deletion instruction, and then based on the first identifier of the first clone pair, the storage location information corresponding to the source storage pool and the target storage pool can be indexed to locate the first source volume from the source storage pool and the first target volume from the target storage pool; then, the first source volume and the first target volume can be directly deleted.

[0083] It is understandable that after deleting the first source volume and the first target volume, the target metadata and the metadata copy remain. Since the metadata copy does not have the first identification information, directly locating the metadata copy is inefficient. Therefore, the target metadata can be located first based on the first identification information, and then the data association relationship between the target metadata and the metadata copy can be obtained from the target metadata.

[0084] Furthermore, based on the data association relationship between the target metadata and the metadata copy, the location of the metadata copy can be determined, and then the metadata copy can be deleted; then, after the metadata copy deletion operation is completed, since the location of the target metadata has been located, the target metadata can be directly deleted.

[0085] In an embodiment of the present application, by deleting the first source volume, the first target volume, the metadata copy and the target metadata in sequence based on the first identifier of the first clone pair and the data association relationship, the reliability of the clone pair data deletion can be ensured.

[0086] In actual applications, after deleting the first clone pair, there may be residual metadata copies. At this time, if the newly created clone pair has the same identification information as the deleted first clone pair, the residual metadata copies are likely to have a certain impact on the newly created clone pair. Based on this, on the basis of the above embodiment, this embodiment provides an optional method for creating clone pairs, such as Figure 3 As shown, the specific steps include:

[0087] S301 : In response to a creation instruction for a second clone pair, obtain second identification information of the second clone pair.

[0088] The second clone pair refers to a newly created clone pair; and the second identification information refers to unique identification information of the second clone pair.

[0089] Optionally, after detecting a creation instruction for the second clone pair in the source storage pool and the target storage pool, the second identification information of the second clone pair may be obtained from the creation instruction.

[0090] S302: When the second identification information is the same as the first identification information, detect whether there is residual data of the metadata copy in the source storage pool.

[0091] The residual data is the data remaining when the metadata copy under the first identification information is deleted.

[0092] It is understandable that when constructing a new clone pair with the same first identification information, if there is residual data under the first identification information, a synchronization position error problem will occur during the metadata synchronization process to the metadata copy corresponding to the new clone pair.

[0093] Based on this, the second identification information can be compared with the first identification information for consistency. If the consistency comparison result is consistent, it is necessary to detect whether there is residual data of the metadata copy in the source storage pool. For example, based on the storage information corresponding to the source storage pool and the first identification information, it can be determined whether there is residual data of the metadata copy in the source storage pool.

[0094] S303: If the data exists, delete the residual data, and after the residual data is deleted, create a second clone pair.

[0095] Optionally, if there is residual data of the metadata copy in the source storage pool, the residual data needs to be deleted first; then, after detecting that the deletion operation of the residual data is successful, the creation operation of the second clone pair for the source storage pool is performed.

[0096] In the implementation of the present application, by detecting whether there is residual data of the metadata copy in the source storage pool when constructing the second clone pair with the same identification information as the first clone pair, the reliability of data processing for the second clone pair can be guaranteed.

[0097] In order to ensure the efficiency of metadata copy updates, based on the above embodiments, in this embodiment, an optional method for updating the metadata copy is provided. Specifically, if a forward synchronization request for the first source volume is received, or if a reverse synchronization request for the first source volume is not received within the waiting time, the target metadata is updated according to the updated metadata copy.

[0098] The waiting time is the preset update waiting time.

[0099] It is understandable that when the target metadata is updated, a thread is required and the operations of the first source volume and the first target volume will be stopped. Therefore, in order to ensure the reliability of the operations of the first source volume and the first target volume, it is necessary to reduce the update of the target metadata as much as possible.

[0100] When executing a forward synchronization request for the first source volume, the metadata generated by the forward synchronization operation needs to be recorded in the target metadata. Therefore, before executing the forward synchronization request for the first source volume, the target metadata needs to be updated. Based on this, in this embodiment, if a forward synchronization request is received for the first source volume, the target metadata needs to be updated first, and then the synchronization operation from the first source volume to the first target volume is executed.

[0101] Furthermore, if a reverse synchronization operation is performed again from the first target volume to the first source volume within a short period of time after the metadata replica is updated, the target metadata does not need to be updated immediately. Instead, the target metadata is updated uniformly after the metadata replica is updated again. Based on this, a timer can be set after the metadata replica is updated. If no reverse synchronization request is received for the first source volume within a preset waiting time, the target metadata can be updated using the metadata replica.

[0102] In the embodiment of the present application, the target metadata is updated in two ways, which can improve the update efficiency of the target metadata while ensuring the reliability of the target metadata.

[0103] Figure 4FIG1 is a flow chart of a data processing method in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a data processing method. Figure 4 The specific implementation process is as follows:

[0104] S401: Obtain a reverse synchronization request for a first source volume.

[0105] S401, determining whether there is a metadata copy in the source storage pool where the first source volume is located. If not, executing S403; if so, executing S404.

[0106] The metadata copy is obtained by copying the target metadata associated with the first target volume in the target storage pool where the first target volume is located.

[0107] S403: Copy the target metadata associated with the first target volume in the target storage pool to the source storage pool to create a metadata copy in the source storage pool.

[0108] S404: When the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, the metadata copy is updated using the target metadata currently stored in the target storage pool.

[0109] S405: Execute a reverse synchronization operation from the first target volume to the first source volume, and update the metadata copy during the reverse synchronization operation.

[0110] S406: After the reverse synchronization operation is completed, if a forward synchronization request for the first source volume is received, or if no reverse synchronization request for the first source volume is received within the waiting time, the target metadata is updated according to the updated metadata copy.

[0111] S407 : In response to a data deletion instruction for a first clone pair consisting of a first source volume and a first target volume, delete the first source volume and the first target volume according to the first identifier of the first clone pair.

[0112] S408: Locate the target metadata according to the first identifier, and obtain a data association relationship between the target metadata and the metadata copy from the target metadata.

[0113] S409: Delete the metadata copy according to the data association relationship, and delete the target metadata after the metadata copy deletion operation is completed.

[0114] S410 : In response to a creation instruction for a second clone pair, obtain second identification information of the second clone pair.

[0115] S411: When the second identification information is the same as the first identification information, detect whether there is residual data of the metadata copy in the source storage pool.

[0116] S412: If there is residual data, delete the residual data, and after the residual data is deleted, create a second clone pair.

[0117] The specific process of S401-S412 can be found in the description of the above method embodiment. The implementation principle and technical effects are similar and will not be repeated here.

[0118] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0119] Based on the same inventive concept, the present application also provides a data processing device for implementing the aforementioned data processing method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more data processing device embodiments provided below can be found in the above-mentioned limitations on the data processing method and will not be repeated here.

[0120] In an exemplary embodiment, Figure 5 As shown, a data processing device 1 is provided, comprising: a copy determination module 10, a first update module 20 and a second update module 30, wherein:

[0121] The copy determination module 10 is configured to, upon receiving a reverse synchronization request for the first source volume, determine whether a metadata copy exists in the source storage pool where the first source volume resides; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume resides;

[0122] A first update module 20 is configured to, if yes, perform a reverse synchronization operation from the first target volume to the first source volume, and update the metadata copy during the reverse synchronization operation;

[0123] The second updating module 30 is configured to update the target metadata according to the updated metadata copy after the reverse synchronization operation is completed.

[0124] In an exemplary embodiment, the first update module 20 specifically includes:

[0125] If the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, the target metadata currently stored in the target storage pool is used to update the metadata copy; after completing the update of the metadata copy, a reverse synchronization operation is performed from the first target volume to the first source volume.

[0126] In an exemplary embodiment, a first source volume and a first target volume form a first clone pair, and index identifiers of the first source volume, the first target volume, and the target metadata are all first identifiers of the first clone pair. Furthermore, the data processing device 1 further includes a deletion module, wherein the deletion module is specifically configured to:

[0127] In response to a data deletion instruction for the first clone pair, the first source volume and the first target volume are deleted according to the first identifier of the first clone pair; the target metadata is located according to the first identifier, and a data association relationship is obtained from the target metadata; wherein the data association relationship is an association relationship between the target metadata and the metadata copy; according to the data association relationship, the metadata copy is deleted; after the metadata copy deletion operation is completed, the target metadata is deleted.

[0128] In an exemplary embodiment, the data processing device 1 further includes a clone pair creation module, wherein the clone pair creation module is specifically configured to:

[0129] In response to a creation instruction for a second clone pair, second identification information of the second clone pair is obtained; when the second identification information is the same as the first identification information, whether there is residual data of the metadata copy in the source storage pool is detected; if so, the residual data is deleted, and after the residual data is deleted, the creation operation of the second clone pair is executed.

[0130] In an exemplary embodiment, the data processing device 1 further includes a replica creation module, wherein the replica creation module is specifically configured to:

[0131] If no metadata copy exists in the source storage pool, the target metadata associated with the first target volume in the target storage pool is copied to the source storage pool to create a metadata copy in the source storage pool, and the reverse synchronization operation from the first target volume to the first source volume is performed again.

[0132] In an exemplary embodiment, the second update module 30 specifically includes:

[0133] If a forward synchronization request for the first source volume is received, or if a reverse synchronization request for the first source volume is not received within the waiting time, the target metadata is updated according to the updated metadata copy.

[0134] Each module in the above-mentioned data processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0135] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store clone pair data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.

[0136] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0137] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0138] After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume is located;

[0139] If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation;

[0140] After the reverse synchronization operation is completed, the target metadata is updated based on the updated metadata copy.

[0141] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0142] If the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, the target metadata currently stored in the target storage pool is used to update the metadata copy; after completing the update of the metadata copy, a reverse synchronization operation is performed from the first target volume to the first source volume.

[0143] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0144] In response to a data deletion instruction for the first clone pair, the first source volume and the first target volume are deleted according to the first identifier of the first clone pair; the target metadata is located according to the first identifier, and a data association relationship is obtained from the target metadata; wherein the data association relationship is an association relationship between the target metadata and the metadata copy; according to the data association relationship, the metadata copy is deleted; after the metadata copy deletion operation is completed, the target metadata is deleted.

[0145] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0146] In response to a creation instruction for a second clone pair, second identification information of the second clone pair is obtained; when the second identification information is the same as the first identification information, whether there is residual data of the metadata copy in the source storage pool is detected; if so, the residual data is deleted, and after the residual data is deleted, the creation operation of the second clone pair is executed.

[0147] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0148] If no metadata copy exists in the source storage pool, the target metadata associated with the first target volume in the target storage pool is copied to the source storage pool to create a metadata copy in the source storage pool, and the reverse synchronization operation from the first target volume to the first source volume is performed again.

[0149] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0150] If a forward synchronization request for the first source volume is received, or if a reverse synchronization request for the first source volume is not received within the waiting time, the target metadata is updated according to the updated metadata copy.

[0151] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0152] After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume is located;

[0153] If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation;

[0154] After the reverse synchronization operation is completed, the target metadata is updated based on the updated metadata copy.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0156] If the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, the target metadata currently stored in the target storage pool is used to update the metadata copy; after completing the update of the metadata copy, a reverse synchronization operation is performed from the first target volume to the first source volume.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0158] In response to a data deletion instruction for the first clone pair, the first source volume and the first target volume are deleted according to the first identifier of the first clone pair; the target metadata is located according to the first identifier, and a data association relationship is obtained from the target metadata; wherein the data association relationship is an association relationship between the target metadata and the metadata copy; according to the data association relationship, the metadata copy is deleted; after the metadata copy deletion operation is completed, the target metadata is deleted.

[0159] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0160] In response to a creation instruction for a second clone pair, second identification information of the second clone pair is obtained; when the second identification information is the same as the first identification information, whether there is residual data of the metadata copy in the source storage pool is detected; if so, the residual data is deleted, and after the residual data is deleted, the creation operation of the second clone pair is executed.

[0161] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0162] If no metadata copy exists in the source storage pool, the target metadata associated with the first target volume in the target storage pool is copied to the source storage pool to create a metadata copy in the source storage pool, and the reverse synchronization operation from the first target volume to the first source volume is performed again.

[0163] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0164] If a forward synchronization request for the first source volume is received, or if a reverse synchronization request for the first source volume is not received within the waiting time, the target metadata is updated according to the updated metadata copy.

[0165] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0166] After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume is located; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume is located;

[0167] If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation;

[0168] After the reverse synchronization operation is completed, the target metadata is updated based on the updated metadata copy.

[0169] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0170] If the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, the target metadata currently stored in the target storage pool is used to update the metadata copy; after completing the update of the metadata copy, a reverse synchronization operation is performed from the first target volume to the first source volume.

[0171] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0172] In response to a data deletion instruction for the first clone pair, the first source volume and the first target volume are deleted according to the first identifier of the first clone pair; the target metadata is located according to the first identifier, and a data association relationship is obtained from the target metadata; wherein the data association relationship is an association relationship between the target metadata and the metadata copy; according to the data association relationship, the metadata copy is deleted; after the metadata copy deletion operation is completed, the target metadata is deleted.

[0173] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0174] In response to a creation instruction for a second clone pair, second identification information of the second clone pair is obtained; when the second identification information is the same as the first identification information, whether there is residual data of the metadata copy in the source storage pool is detected; if so, the residual data is deleted, and after the residual data is deleted, the creation operation of the second clone pair is executed.

[0175] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0176] If no metadata copy exists in the source storage pool, the target metadata associated with the first target volume in the target storage pool is copied to the source storage pool to create a metadata copy in the source storage pool, and the reverse synchronization operation from the first target volume to the first source volume is performed again.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0178] If a forward synchronization request for the first source volume is received, or if a reverse synchronization request for the first source volume is not received within the waiting time, the target metadata is updated according to the updated metadata copy.

[0179] It should be noted that the data involved in this application (including but not limited to clone pair data, etc.) are all data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0180] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0181] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0182] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A data processing method, characterized in that: The method comprises: After receiving a reverse synchronization request for the first source volume, determining whether a metadata copy exists in the source storage pool where the first source volume resides; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in the target storage pool where the first target volume resides; If so, performing a reverse synchronization operation from the first target volume to the first source volume, and updating the metadata copy during the reverse synchronization operation; After the reverse synchronization operation is completed, the target metadata is updated according to the updated metadata copy.

2. The method according to claim 1, characterized in that The performing a reverse synchronization operation from the first target volume to the first source volume includes: If the version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, then the target metadata currently stored in the target storage pool is used to update the metadata copy; After completing the update of the metadata copy, a reverse synchronization operation is performed from the first target volume to the first source volume.

3. The method according to claim 1, characterized in that The first source volume and the first target volume form a first clone pair, and index identifiers of the first source volume, the first target volume, and the target metadata are all first identifiers of the first clone pair; The method further comprises: In response to a data deletion instruction for the first clone pair, deleting the first source volume and the first target volume according to the first identifier of the first clone pair; Locating the target metadata according to the first identifier, and acquiring a data association relationship from the target metadata; wherein the data association relationship is an association relationship between the target metadata and the metadata copy; Deleting the metadata copy according to the data association relationship; After the metadata copy deletion operation is completed, the target metadata is deleted.

4. The method according to claim 3, characterized in that After deleting the target metadata, the method further includes: In response to a creation instruction for a second clone pair, obtaining second identification information of the second clone pair; In a case where the second identification information is the same as the first identification information, detecting whether there is residual data of the metadata copy in the source storage pool; If it exists, the residual data is deleted, and after the residual data is deleted, the creation operation of the second clone pair is performed.

5. The method according to claim 1, wherein The method further comprises: If the metadata copy does not exist in the source storage pool, the target metadata associated with the first target volume in the target storage pool is copied to the source storage pool to create the metadata copy in the source storage pool, and the reverse synchronization operation from the first target volume to the first source volume is performed again.

6. The method according to claim 1, wherein The updating of the target metadata according to the updated metadata copy includes: If a forward synchronization request for the first source volume is received, or if a reverse synchronization request for the first source volume is not received within the waiting time, the target metadata is updated according to the updated metadata copy.

7. A data processing device, characterized in that: The device comprises: a copy determination module configured to, upon receiving a reverse synchronization request for a first source volume, determine whether a metadata copy exists in a source storage pool where the first source volume resides; wherein the metadata copy is obtained by copying target metadata associated with the first target volume in a target storage pool where the first target volume resides; a first updating module, configured to, if yes, perform a reverse synchronization operation from the first target volume to the first source volume, and update the metadata copy during the reverse synchronization operation; The second updating module is configured to update the target metadata according to the updated metadata copy after the reverse synchronization operation is completed.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Metadata processing method and system

    CN104268097A

  • Data reverse synchronization method, device and system, mirror image server and storage medium

    CN112579704A