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

By creating metadata copy and update in the source storage pool, the problem of reduced reliability of metadata recorded caused by cross -pool processing in standard cloning operations was solved, and the atomicity and data processing of cloned operations were realized.

CN119376627AActive Publication Date: 2025-01-28DAWNING INFORMATION IND (BEIJING) CO LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In storage systems, standard cloning operations involve cross-pooling processing of different storage pools, resulting in reduced reliability of metadata records and the atomicity of cloning operations cannot be guaranteed.

Method used

By creating meta -data copies in the source storage pool, and updating the meta -data copy when performing reverse synchronization operations to ensure that metadata records and reverse synchronization operations are performed in the same storage pool to avoid cross -pool processing problems.

Benefits of technology

Improve the reliability of metadata records, ensure the atomicity of cloning operations and the continuity of data processing, and enhance the stability of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376627A_ABST
    Figure CN119376627A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, equipment, a storage medium and a program product. The method comprises the steps that after a reverse synchronization request for a first source volume is obtained, whether a metadata copy exists in a source storage pool where the first source volume is located or not is judged, the metadata copy is obtained by copying target metadata associated with a first target volume in a target storage pool where the first target volume is located, and if yes, the first source volume and the second source volume are synchronized; if yes, executing a reverse synchronization operation from the first target volume to the first source volume, updating the metadata copy in the process of executing the reverse synchronization operation, and updating the target metadata according to the updated metadata copy after the reverse synchronization operation is completed. By adopting the method, the reliability of metadata recording during data reverse synchronization operation can be improved.
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 the storage system, in order to ensure the continuity of data processing in the event of a storage failure, it is necessary to record metadata such as data attributes and relationships involved in the data processing process. When the data involved in the data processing process is in a storage pool, it is easy to ensure the atomicity of the operation.

[0003] However, as an important advanced function of the storage system, standard cloning generally requires that the source volume and target volume of the clone pair belong to different storage pools. Therefore, when performing cloning operations involving two storage pools, such as reverse synchronization operations, there may be cross-pool problems in recording the metadata generated by the cloning operation. At this time, the atomicity of the cloning operation cannot be guaranteed, thereby reducing the reliability of 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 obtaining the reverse synchronization request for the first source volume, determining whether there is a metadata copy 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;

[0007] If yes, 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 according to 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 the data association relationship is obtained from the target metadata; wherein the data association relationship is the 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 of the embodiments, 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 ensured.

[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 a reverse synchronization operation is performed from the first target volume to the first source volume.

[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 judgment module is used to determine whether there is a metadata copy in the source storage pool where the first source volume is located after obtaining a reverse synchronization request for the first source volume; 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;

[0027] A first update 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 used 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, including 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 obtaining the reverse synchronization request for the first source volume, determining whether there is a metadata copy 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;

[0031] If yes, 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 according to 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 obtaining the reverse synchronization request for the first source volume, determining whether there is a metadata copy 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;

[0035] If yes, 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 according to the updated metadata copy.

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

[0038] After obtaining the reverse synchronization request for the first source volume, determining whether there is a metadata copy 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;

[0039] If yes, 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 according to the updated metadata copy.

[0041] The above-mentioned data processing method, device, equipment, 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 there is a metadata copy, 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, in which cross-pool processing is directly performed for the reverse synchronization operation, the above-mentioned method is adopted to create a metadata copy in the source storage pool, so that 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, which effectively avoids the cross-pool processing problem during the reverse synchronization operation, thereby improving the reliability of 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 drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. 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 creative work.

[0043] Figure 1A 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 flow chart of 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. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] In the storage system, in order to ensure the continuity of data processing in the event of a storage failure, it is necessary to record metadata such as data attributes and relationships involved in the data processing process. When the data involved in the data processing process is in a storage pool, it is easy to ensure the atomicity of the operation.

[0053] However, as an important advanced function of the storage system, standard cloning generally requires that the source volume and target volume of the clone pair belong to different storage pools. Therefore, when performing cloning operations involving two storage pools, such as reverse synchronization operations, there may be cross-pool problems in recording the metadata generated by the cloning operation. At this time, the atomicity of the cloning operation cannot be guaranteed, thereby reducing the reliability of metadata recording.

[0054] Based on this, in an exemplary embodiment, 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, determining whether there is a metadata copy in a 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 characterize metadata associated with the first source volume and the first target volume, including but not limited to metadata corresponding to the first source volume and the first target volume, and 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; subsequently, 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 the reverse synchronization operation of data from the first target volume to the first source volume, metadata modification is involved. If the modification is performed directly in the target metadata at this time, the modification of the target metadata needs to be performed in the target storage pool, while the reverse synchronization operation is an operation for the source storage pool, that is, there is a problem of cross-pool operation. At this time, the target metadata associated with the first target volume in the target storage pool can be copied to build a metadata copy in the source storage pool, so that the metadata modification operation and the reverse synchronization operation are 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 in the source storage pool that corresponds to the target metadata 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 exists 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 between the first source volume and various types of data in the first target volume. In the process of executing the reverse synchronization operation, the metadata in the metadata copy can be 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 completed, 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 reverse synchronization. Among them, although the operation of synchronizing the metadata replica to the target metadata crosses the pool, there is no atomicity requirement, so it can be executed 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 there is a metadata copy, 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, in which cross-pool processing is directly performed for the reverse synchronization operation, the above method is adopted to create a metadata copy in the source storage pool, so that 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, which effectively avoids 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 cause the problem that the content recorded 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, in this embodiment, an optional method for performing a reverse synchronization operation is provided, 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 target metadata currently stored in the target storage pool is used to update the metadata copy.

[0071] The version information is used to indicate the updated version of the target metadata and the metadata copy. The larger the version information, the newer the information content. Figure 2B, the version information of the target metadata in the initial state can be set to 1 (Version=1), and then, when creating a metadata copy after copying the target metadata, 1 can be added to the version information of the target metadata, and the version information of the metadata copy can be 2 (Version=2). Further, on this basis, if there is a synchronization operation from the first source volume to the first target volume, the version information of the target metadata will be updated to 3 after the synchronization operation.

[0072] Optionally, when it is determined that there is a metadata copy in the source storage pool, in order to determine whether the metadata copy stores the latest metadata information, version information of the target metadata currently stored in the target storage pool and version information of the metadata copy may 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 version information of the target metadata currently stored in the target storage pool is greater than the version information of the metadata copy, it proves that the metadata information in the metadata copy is not the latest metadata information. Therefore, it is necessary to use the target metadata currently stored in the target storage pool to update the metadata copy. For example, a data synchronization operation from the target metadata to the metadata copy can be performed.

[0075] In addition, in order 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. Exemplarily, 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, the metadata copy does not need to be updated; if the latest update time of the target metadata is closer to the current time, 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 practical applications, in order to ensure the available space of the storage system, unnecessary clone pair data will be deleted. Based on this, on the basis of 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 first identifiers of the first clone pair; further, an optional method for deleting the clone pair is provided, which specifically includes the following contents:

[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. The data association relationship is 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 is 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 are 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 are still left. Since the metadata copy does not have the first identification information, the efficiency of directly locating the metadata copy is low. Therefore, the target metadata can be located first according to the first identification, 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 the first clone pair is deleted, there may be residual metadata copies. At this time, if the identification information of the newly created clone pair is the same as that of 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, in this embodiment, an optional method for creating a clone pair is provided, 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 may occur during metadata synchronization 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, it can be determined whether there is residual data of the metadata copy in the source storage pool based on the storage information corresponding to the source storage pool and the first identification information.

[0094] S303: If it exists, delete the residual data, and after the residual data is deleted, perform a creation operation of 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, a 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 ensured.

[0097] In order to ensure the efficiency of updating the metadata copy, based on the above embodiment, 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 are stopped. Therefore, in order to ensure the reliability of the operations of the first source volume and the first target volume, the update of the target metadata needs to be reduced 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 for the first source volume is received, 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] In addition, after the metadata copy is updated, if the reverse synchronization operation from the first target volume to the first source volume is performed again within a short period of time, the target metadata does not need to be updated immediately, but the target metadata is updated uniformly after the metadata copy is updated again. Based on this, timing can be performed after the metadata copy is updated, and if no reverse synchronization request for the first source volume is received within a preset waiting time, the metadata copy can be used to update the target metadata.

[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 4FIG. 1 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 yes, 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 a 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, deleting the metadata copy according to the data association relationship, and after the metadata copy deletion operation is completed, deleting the target metadata.

[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, perform a creation operation of a second clone pair.

[0117] The specific process of S401-S412 can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0118] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed 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 part of the steps or stages in other steps.

[0119] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, 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 used to determine whether there is a metadata copy in the source storage pool where the first source volume is located after obtaining the reverse synchronization request for the first source volume; 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;

[0122] A first update module 20, 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 used 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, 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; further, the data processing device 1 further includes a deletion module, wherein the deletion module is specifically used 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 the data association relationship is obtained from the target metadata; wherein the data association relationship is the 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 used 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 used 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 a reverse synchronization operation is performed from the first target volume to the first source volume.

[0132] In an exemplary embodiment, the second updating 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 data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to 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, referred to as I / O) and a communication interface. The processor, the memory and the 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 the 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[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 obtaining the reverse synchronization request for the first source volume, determining whether there is a metadata copy 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;

[0139] If yes, 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 according to 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 the data association relationship is obtained from the target metadata; wherein the data association relationship is the 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 a reverse synchronization operation is performed from the first target volume to the first source volume.

[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, and when the computer program is executed by a processor, the following steps are implemented:

[0152] After obtaining the reverse synchronization request for the first source volume, determining whether there is a metadata copy 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;

[0153] If yes, 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 according to the updated metadata copy.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also 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 also 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 the data association relationship is obtained from the target metadata; wherein the data association relationship is the 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 also 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 also 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 a reverse synchronization operation is performed from the first target volume to the first source volume.

[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also 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 obtaining the reverse synchronization request for the first source volume, determining whether there is a metadata copy 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;

[0167] If yes, 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 according to the updated metadata copy.

[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also 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 also 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 the data association relationship is obtained from the target metadata; wherein the data association relationship is the 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 also 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 also 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 a reverse synchronization operation is performed from the first target volume to the first source volume.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also 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] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0181] The technical features of the above embodiments may be combined arbitrarily. 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data processing method, characterized in that: The method comprises: After obtaining a reverse synchronization request for the first source volume, determining whether there is a metadata copy 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 yes, 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, 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 a first identifier of the first clone pair; According to the first identifier, the target metadata is located, 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; 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, acquiring 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, characterized in that 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, characterized in that 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 judgment module, configured to, after obtaining a reverse synchronization request for a first source volume, judge whether there is a metadata copy in a 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 a target storage pool where the first target volume is located; 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 used 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

  • Simplified volume metadata processing method, device and system based on multi-control storage system

    CN109857588A

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

    CN112579704A

  • Ensuring the integrity of data storage volumes used in block-level live synchronization operations in a data storage management system

    US20210382633A1