A method and system for generation of a data volume

By electing and configuring controllers in a multi-controller cluster and coordinating generational synchronization based on their creation time, the performance degradation of high-density snapshot technology in a multi-controller cluster is resolved, achieving more efficient data protection.

CN121098873BActive Publication Date: 2026-02-06INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511631500.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-06
Estimated Expiration
2045-11-07

AI Technical Summary

Technical Problem

In a multi-controller cluster, the generational synchronization performance of high-density snapshot technology degrades, especially in high-frequency multi-controller communication scenarios such as disaster recovery services and cache mirroring, which affects the efficiency of data protection.

Method used

By dynamically electing a configuration controller from among multiple controllers and using the creation time of that controller as a benchmark, the generational synchronization of all controllers is coordinated, generational consistency is ensured, communication frequency and process waiting are reduced, and the collaborative efficiency of multiple controllers is optimized.

Benefits of technology

It improves generational synchronization performance, reduces the minimum snapshot creation interval, supports more granular snapshot protection scenarios, and enhances data protection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121098873B_ABST
    Figure CN121098873B_ABST
Patent Text Reader

Abstract

The application discloses a generation synchronization method and system of a data volume, relates to the technical field of computers, and is applied to a target cluster, wherein the target cluster comprises a management server for cluster management and a plurality of to-be-synchronized controllers for executing cluster services; through interaction between the management server and the plurality of controllers, generation synchronization of the plurality of controllers about the same data volume is realized, and meanwhile, the creation time of the configuration controller about the continuous data protection of the data volume is taken as a benchmark to ensure generation consistency of all the controllers, thereby solving the technical problem of generation synchronization performance decline of high-density snapshots and achieving the technical effect of improving generation synchronization performance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a generation synchronization method and system for a data volume. BACKGROUND

[0002] With the development of information technology, the demand for data protection is increasing. Although the traditional snapshot technology can realize data backup and recovery to a certain extent, it has problems such as large storage space occupation and low recovery efficiency, and it is difficult to meet the high requirements of key businesses on continuous data protection (CDP). In response to this problem, the industry has proposed high-density snapshot technology, which provides users with fine-grained and continuous data protection functions through intensive data protection periods and efficient storage space utilization.

[0003] Under a multi-controller cluster, the high-density snapshot technology can guarantee the orderliness of different controllers for the same data volume generation change, but for each CDP creation action, the time for all controllers to update the generation needs to be consistent. In high-frequency multi-control communication scenarios such as disaster recovery business and cache mirroring, the generation synchronization performance of high-density snapshots will be seriously affected. SUMMARY

[0004] The present application provides a generation synchronization method and system for a data volume to at least solve the problem of decreased generation synchronization performance of high-density snapshots in related technologies.

[0005] The present application provides a generation synchronization method for a data volume, applied to a target cluster, the target cluster including a management server and a plurality of to-be-synchronized controllers, the method comprising:

[0006] The management server generates a generation switching request about the target data volume in response to a creation instruction for performing current continuous data protection on the target data volume, and sends the generation switching request to the plurality of to-be-synchronized controllers;

[0007] The plurality of to-be-synchronized controllers perform a preparation operation for generation switching in response to the generation switching request, and return first response information indicating that the preparation for switching is complete to the management server;

[0008] The management server issues a generation switching instruction to the plurality of to-be-synchronized controllers in response to the first response information;

[0009] The plurality of to-be-synchronized controllers switch the target data volume to the next generation in response to the generation switching instruction, and return second response information indicating that the generation switching is complete to the management server, wherein the second response information further includes a creation time about the current continuous data protection determined by a configuration controller in the plurality of to-be-synchronized controllers;

[0010] The management server sends an attribute setting instruction carrying the creation time to the plurality of to-be-synchronized controllers in response to the second response information;

[0011] The plurality of to-be-synchronized controllers perform an attribute setting operation in response to the attribute setting instruction, and write the edited request about the target data volume sent by the next-generation write host into the edited request.

[0012] The application further provides a generation synchronization device of a data volume, which is applied to a target cluster, the target cluster comprising a management server and a plurality of to-be-synchronized controllers, and the device comprises:

[0013] The management server is configured to generate a generation switching request about the target data volume in response to a creation instruction of performing current continuous data protection on the target data volume, and send the generation switching request to the plurality of to-be-synchronized controllers;

[0014] The plurality of to-be-synchronized controllers are configured to perform a preparation operation of generation switching in response to the generation switching request, and return first response information indicating that the switching preparation is completed to the management server;

[0015] The management server is configured to issue a generation switching instruction to the plurality of to-be-synchronized controllers in response to the first response information;

[0016] The plurality of to-be-synchronized controllers are configured to switch the target data volume to a next generation in response to the generation switching instruction, and return second response information indicating that the generation switching is completed to the management server, wherein the second response information further comprises a creation time about the current continuous data protection determined by a configuration controller in the plurality of to-be-synchronized controllers;

[0017] The management server is configured to send an attribute setting instruction carrying the creation time to the plurality of to-be-synchronized controllers in response to the second response information;

[0018] The plurality of to-be-synchronized controllers are configured to perform an attribute setting operation in response to the attribute setting instruction, and write the edited request about the target data volume sent by the next-generation write host into the edited request.

[0019] The application further provides a generation synchronization system of a data volume, comprising a management server and a plurality of to-be-synchronized controllers, wherein:

[0020] The management server is configured to:

[0021] generate a generation switching request about the target data volume in response to a creation instruction of performing current continuous data protection on the target data volume, and send the generation switching request to the plurality of to-be-synchronized controllers;

[0022] issue a generation switching instruction to the plurality of to-be-synchronized controllers in response to the first response information;

[0023] In response to the second response information, attribute setting instructions carrying the creation time are sent to the plurality of to-be-synchronized controllers;

[0024] The plurality of to-be-synchronized controllers are used for:

[0025] In response to the generation switching request, a preparation operation of generation switching is performed, and first response information indicating that the switching preparation is completed is returned to the management server;

[0026] In response to the generation switching instruction, the target data volume is switched to the next generation, and second response information indicating that the generation switching is completed is returned to the management server, wherein the second response information further includes the creation time about the current continuous data protection determined by the configuration controller in the plurality of to-be-synchronized controllers;

[0027] In response to the attribute setting instruction, an attribute setting operation is performed, and the next generation is written into an editing request about the target data volume sent by the host.

[0028] The application also provides an electronic device, comprising a memory for storing a computer program, and a processor for executing the computer program to implement the steps of the generation synchronization method of the data volume.

[0029] The application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the generation synchronization method of the data volume.

[0030] The application also provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of the generation synchronization method of the data volume.

[0031] The generation synchronization method of the data volume provided by the application is applied to a target cluster, the target cluster comprises a management server for cluster management and a plurality of to-be-synchronized controllers for executing cluster services, and through the interaction between the management server and the plurality of controllers, the generation synchronization of the plurality of controllers about the same data volume is realized, and the creation time of the continuous data protection of the data volume by the configuration controller is taken as a reference to ensure the consistency of the generations of all the controllers, so that the technical problem of the performance decline of the generation synchronization of the high-density snapshot can be solved, and the technical effect of improving the generation synchronization performance is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0033] Figure 1 A flowchart of a data volume generation synchronization method provided by an embodiment of the present application is shown in FIG. 1.

[0034] Figure 2 A flowchart of generation switching preparation provided by an embodiment of the present application is shown in FIG. 2.

[0035] Figure 3 A flowchart of generation switching provided by an embodiment of the present application is shown in FIG. 3.

[0036] Figure 4 A flowchart of time synchronization creation provided by an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, any other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0038] It should be noted that, in the description of the present application, the terms “comprise”, “contain” or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0039] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0040] In combination with the specific application environment architecture or specific hardware architecture on which the data volume generation synchronization method is executed, the specific application environment architecture or specific hardware architecture is described here.

[0041] Before the present application is described in detail, the technical terms involved are described first.

[0042] Cluster: In the storage data backup function, it refers to one or more storage devices that provide storage services to users as a whole.

[0043] Central Management Server (CSM): A software system or server node that serves as the central point of management, coordination, and control in a distributed system, responsible for managing the entire cluster's operations.

[0044] Client Program (AGENT): An agent program in the controller.

[0045] Input-Output Group (IOGROUP): In the context of data backup functionality, an IOGROUP refers to a group of nodes. A cluster can have one or multiple IOGROUPs.

[0046] Virtual Disk: A virtual disk is a mapped disk for host use. Each data volume belongs to an IOGROUP.

[0047] Logical Unit (LUN): A logical unit is used for storing data and files.

[0048] Snapshot: A snapshot is a feature in data storage systems that creates a copy of data at a specific point in time. This copy can be used for data recovery, backup, or disaster recovery scenarios.

[0049] Copy-On-Write (COW): A technique for creating data copies where a copy of the original data is created only when the data is modified. Before modification, all read operations on the data directly access the original data.

[0050] Redirect-On-Write (ROW): Unlike COW, ROW redirects modification operations to a new location immediately when the data is modified, rather than creating a copy of the original data.

[0051] High-Density Snapshot: A new snapshot technology that provides continuous data protection functionality by using intensive data protection periods and efficient storage space utilization.

[0052] Continuous Data Protection (CDP): An advanced data backup and recovery technology that records every change in data at every point in time, rather than only at predetermined specific time points. This allows users to recover data to any point in time in the past, not just the snapshot time points created by backup periods.

[0053] GenerationId (GenID): refers to the version number of the high-density snapshot. Generation 0 is the source data volume itself. The source data volume can be rolled back to any snapshot state of a generation through a rollback operation.

[0054] Generation synchronization: the high-density snapshot keeps the generations consistent in a multi-controller environment.

[0055] Flying IO: the controller is also processing IO that has not been returned to the host.

[0056] Now, in a multi-controller cluster, all controllers can process host IO and perform management operations (such as creating a CDP snapshot) at the same time. After the cluster receives a create CDP operation performed by a user, it issues the create CDP and increase generation actions to each controller. According to technical requirements, the host IO received by the controller after the generation is increased is the latest generation version of the IO, and the previous IO is the last generation version of the IO. However, the event queue of different controllers may be different, which may cause the execution of the generation increase related operation to be fast or slow. If each controller independently executes the logic, it will cause two IOs (i.e., IOs that should belong to the same version) issued by the host at almost the same time to be assigned different generation numbers or even reversed in order on different controllers, resulting in data inconsistency when performing snapshot rollback to recover data. Therefore, as the core count of the high-density snapshot configuration flow, the generation synchronization technology needs to be concurrent creation, that is, two controllers almost simultaneously receive a request to create a snapshot for the same source data volume. It also needs to have a global view, that is, it must ensure that the current latest generation seen from any controller is the same. It also needs to have data consistency, that is, the data of the snapshot itself must be consistent, which can also be understood as the update time of the snapshot generation being consistent.

[0057] Currently, the industry mainly uses two ways to ensure generation synchronization: using a distributed lock to execute an atomic transaction or using a global clock. The former immediately applies for a lock on data volume 0 to the cluster after controller A receives a create CDP command for data volume 0, limiting other controllers from performing snapshot operations on data volume 0. Controller A executes the command, and before releasing the lock, other controllers update the latest state of data volume 0 synchronously, thereby achieving generation synchronization. The latter uses a global sequencer to assign a monotonically increasing sequence number or timestamp. A newly created CDP is assigned a globally unique, increasing ID or timestamp, which directly defines the generation order.

[0058] However, the above solution can ensure that the order of the different controllers for the same data volume is changed during the execution of the CDP creation action, but for each creation of the CDP action, the time for all controllers to update the order is consistent. In the scene of configuring disaster recovery services and cache mirroring, which requires high-frequency message transmission between multiple controllers, whether it is a global lock or a global sequencer, it will affect the order synchronization performance of the high-density snapshot, and increase the minimum creation interval of the CDP.

[0059] To solve the above technical problems, the embodiments of the present application provide a data volume order synchronization method, which realizes fast order synchronization in the scene of frequent mirror interaction between multiple controllers. The following embodiments describe the method in detail in combination with the execution process of the data volume order synchronization method.

[0060] Figure 1 A flowchart of a data volume order synchronization method provided by an embodiment of the present application is shown in the figure. The data volume order synchronization method is applied to a target cluster, and the target cluster includes a management server and multiple synchronization controllers. Specifically, as shown in the figure, the following steps are included: Figure 1

[0061] S101, the management server generates an order switching request about the target data volume in response to an instruction for executing the current continuous data protection of the target data volume, and sends the order switching request to the multiple synchronization controllers.

[0062] It can be understood that the management server refers to the cluster CSM. The management server receives the creation instruction of the target data volume continuous data protection, that is, receives the creation CDP command of the target data volume, and responds to the creation instruction to issue an order switching request to the multiple synchronization controllers (hereinafter referred to as controllers) in all controllers of the cluster. The order switching request is used to notify the controller to prepare for order switching. In fact, the order synchronization is realized through the interaction between the controller AGENT and the cluster CSM.

[0063] S102, the multiple synchronization controllers execute the preparation operation of order switching in response to the order switching request, and return the first response information indicating that the switching preparation is completed to the management server.

[0064] It can be understood that based on the above S101, the controller responds to the order switching request, executes the preparation operation related to the order switching, and generates the first response information after the order switching preparation is completed, for example, returns acked completion, to notify the management server that the order switching preparation is completed and the order switching can be executed.

[0065] The order switching request includes the next order of the target data volume and the first identifier for identifying that the current order of the target data volume is in an invalid state. ​

[0066] It can be understood that the generation switching request includes a next generation of the target data volume and a first identifier, and the first identifier is used to identify that the current generation of the data volume is in an invalid state, that is, to inform the controller that the current generation of the target data volume recorded therein is invalid and the next generation. For example, the first identifier is inactive.

[0067] Optionally, the plurality of to-be-synchronized controllers perform a preparation operation of the generation switching in response to the generation switching request, and return first response information indicating that the switching preparation is completed to the management server. The first response information can be returned to the management server by the following steps:

[0068] The generation state parameter of the target data volume is set to the first identifier; the first generation parameter of the target data volume is set to the next generation, wherein the first generation parameter is used to identify the generation after the creation of the continuous data protection; and the first response information indicating that the switching preparation is completed is returned to the management server in the case that there is no unprocessed edit request in the plurality of to-be-synchronized controllers.

[0069] It can be understood that the generation switching preparation performed by the controller includes: setting the generation state parameter of the target data volume to the first identifier, wherein the generation state parameter refers to whether the current generation of the data volume recorded in the controller is valid, that is, setting the current generation recorded in the controller to be invalid, for example, the generation state parameter is recorded as gen_id_state, that is, gen_id_state is set to inactive. If the current generation is invalid, the controller needs to be configured to obtain the latest generation (i.e. the next generation). At the same time, the first generation parameter of the target data volume is set to the next generation, and the first generation parameter is used to identify the value of the generation after the creation of the CDP action, that is, the value of the next generation (the generation to be switched later) obtained by increasing the current generation, for example, the generation increase rule is GenId + 1. The first generation parameter is recorded as next_gen_id, next_gen_id is set to last_gen_id1+1, last_gen_id1+1 refers to the next generation carried in the generation switching request, that is, the controller sets the next generation to be switched in the generation switching preparation stage, and last_gen_id1 refers to the current generation recorded in the management server. Subsequently, the IO (i.e. the edit request sent by the host) of the previous generation of the target data volume is cleared and returns acked, or the controller does not exist unprocessed IO and returns acked.

[0070] The generation switching request further includes a special resource identifier allocated to the target data volume by the management server.

[0071] It can be understood that the generation switching request also includes the exclusive resource identifier assigned to the target data volume by the management server in response to the creation instruction, denoted as cdpid (i.e. snapshot id). For example, the management server obtains the idle cdpid from small to large as the exclusive resource identifier of the target data volume for performing the continuous data protection action.

[0072] Optionally, before the first response information indicating that the switching preparation is completed is returned to the management server in the case that there is no unprocessed editing request in the plurality of to-be-synchronized controllers, the method further comprises:

[0073] The home controller of the target data volume in the plurality of to-be-synchronized controllers applies for a resource according to the exclusive resource identifier, for use by the controller for processing the target data volume; and in the case that the home controller completes the resource application and there is no unprocessed editing request in the plurality of to-be-synchronized controllers, the first response information indicating that the switching preparation is completed is returned to the management server.

[0074] It can be understood that the plurality of controllers are divided into exclusive controllers of the target data volume and non-exclusive controllers, and the exclusive controller refers to a controller that is exclusively used for processing the target data volume. In a cluster of a plurality of IO groups, each data volume is only attributed to one IO group, and the data volume and the cdp are shared between the plurality of IO groups, but the host IO accessing the data volume is only issued from the home IO group, and the non-home IO group receives the mirror IO of the home IO group. The generation switching preparation performed by the controller of the non-home IO group includes: setting the gen_id_state of the controller to inactive; setting the next_gen_id to last_gen_id1+1; and returning acked after the IO of the previous generation of the target data volume is cleared. The generation switching preparation performed by the controller of the home IO group includes: setting the gen_id_state of the controller to inactive; setting the next_gen_id to last_gen_id1+1; and after the IO of the previous generation of the target data volume is cleared, applying for a resource according to the cdpid (i.e. idle cdp resource) for use by all controllers for processing the target data volume, so as to reduce resource grabbing and occupation.

[0075] Optionally, after the home controller applies for the resource according to the exclusive resource identifier, the method further comprises:

[0076] The home controller writes the exclusive resource identifier into the configuration information of the current continuous data protection; wherein the configuration information includes the state, the creation time, the exclusive resource identifier and the latest generation of the target data volume of the current continuous data protection.

[0077] It can be understood that the exclusive controller writes the exclusive resource identifier into the configuration information of the current continuous data protection, that is, CDP information, after applying for the resource according to the exclusive resource identifier. The configuration information includes the state of the CDP, the creation time of the CDP, the cdpid, the latest generation (genid) and the like.

[0078] For example, referring to Figure 2 , Figure 2 A flowchart of a generation switching preparation provided by the embodiment of the application, that is, an inactive gen stage, is shown. The target cluster includes a management server, a configuration controller, an exclusive controller and a non-exclusive controller. The management server sends a generation switching request to the configuration controller, the exclusive controller and the non-exclusive controller in response to a CDP creation instruction, to inform the configuration controller, the exclusive controller and the non-exclusive controller to prepare for generation switching. The generation switching request includes inactive, next_gen_id = last_gen_id + 1 and cdpid = idleid. The configuration controller, the exclusive controller and the non-exclusive controller perform the following operations in response to the generation switching request: gen_id_state = inactive, next_gen_id = last_gen_id + 1. In addition, the exclusive controller applies for a resource according to idleid, and returns acked after the execution.

[0079] S103, the management server sends a generation switching instruction to the plurality of to-be-synchronized controllers in response to the first response information.

[0080] It can be understood that, on the basis of the above S102, the management server sends a generation switching instruction to the plurality of controllers after all the controllers return the first response information (that is, acked), to inform the plurality of controllers to perform generation switching, and enter a generation switching (update_gen) stage. The generation switching instruction is used to instruct the controller to switch to the next generation, and the generation switching request is used to instruct the controller to perform preparation work before generation switching.

[0081] S104, the plurality of to-be-synchronized controllers switch the target data volume to the next generation in response to the generation switching instruction, and return second response information indicating that the generation switching is completed to the management server.

[0082] The second response information further includes the creation time of the current continuous data protection determined by the configuration controller in the plurality of to-be-synchronized controllers.

[0083] It can be understood that, on the basis of S103, the plurality of controllers switch the target data volume from the current generation to the next generation in response to the generation switching instruction, and all IOs subsequently received by the host are recorded as the next generation. It can be understood that the host may send multiple IOs at a time, and all the multiple IOs are recorded as the next generation. In addition, the configuration controller in the plurality of controllers generates the creation time of the current continuous data protection (i.e. CDP), and uses it as a reference to synchronize the time of the next generation between the plurality of controllers. After execution, the configuration node returns the second response information carrying the creation time to the management controller, and the other controllers except the configuration controller directly return the second response information to the management controller. The specific operation of generation switching is described in the following embodiments.

[0084] Optionally, the plurality of to-be-synchronized controllers include a configuration controller and other controllers, and the plurality of to-be-synchronized controllers switch the target data volume to the next generation in response to the generation switching instruction. The specific implementation can be achieved by the following steps:

[0085] The configuration controller determines the creation time of the current continuous data protection in response to the generation switching instruction, and updates the second generation parameter of the target data volume based on the first generation parameter to switch the target data volume to the next generation, wherein the second generation parameter is used to identify the current generation of the data volume; and the other controllers set the second generation parameter based on the first generation parameter to switch the target data volume to the next generation.

[0086] It can be understood that one of the plurality of controllers in each IOGROUP is selected as a CDP configuration node (i.e., a configuration controller), and when the CDP is created, the IO sent by the host needs to be sent to the configuration controller to obtain the next generation, and the CDP-related information query also needs to be sent to the configuration controller for query. It can be understood that the configuration controller is different from the dedicated controller, and the plurality of controllers at least includes the configuration controller and the dedicated controller, and can also include a non-dedicated controller. Specifically, after receiving the generation switching instruction, the configuration controller obtains the current time as the CDP creation time, or obtains the current time as the creation time after executing the generation switching, and the determination manner of the creation time is not limited, which can be determined by the configuration controller. In one embodiment, after the configuration controller determines the creation time, the configuration controller uploads the creation time to the management controller separately, sets the latest generation of the target data volume as the next generation, and returns the second response information. In another embodiment, the configuration controller determines the creation time, sets the latest generation of the target data volume as the next generation, and returns the second response information carrying the creation time. The manner in which the configuration controller sets the latest generation of the target data volume is: setting the second generation parameter as the first generation parameter, the second generation parameter refers to the current / latest generation of the data volume recorded in the controller, and the first generation parameter refers to the generation to be switched (i.e., the next generation) of the data volume recorded in the controller. In the preparation stage, the first generation parameter is assigned as the next generation, and in the generation switching stage, the second generation parameter is assigned as the first generation parameter, that is, as the next generation, that is, last_gen_id2=next_gen_id, from the current generation to the next generation, the latest generation is the next generation, and after the execution is completed, the acked is returned. Wherein, last_gen_id2 refers to the current generation of the target data volume recorded in the controller, and last_gen_id1 refers to the current generation of the target data volume recorded in the management server, and before the generation switching instruction is executed, the current generations recorded in the management server and the controller can be the same.

[0087] Exemplarily, Figure 3 A flowchart of generation switching provided by the embodiment of the application is shown in Figure 2 On the basis of the embodiment shown in the figure, the management controller sends the generation switching instruction to the configuration controller, the dedicated controller and the non-dedicated controller, the configuration management controller determines the creation time (i.e., cdp_create_time), and executes last_gen_id2=next_gen_id, and after the execution is completed, the acked carrying the creation time is returned. The dedicated controller and the non-dedicated controller execute last_gen_id2=next_gen_id, and after the execution is completed, the acked is returned.

[0088] Optionally, the method further comprises:

[0089] The management server re-determines the configuration controller from the plurality of to-be-synchronized controllers in the working state in case that the configuration controller is in the fault state, wherein the configuration controller is used for other to-be-synchronized controllers and the host to query configuration information of the current continuous data protection.

[0090] It can be understood that the configuration controller is selected from the plurality of controllers, and a specific selection manner is not limited. If the configuration controller fails, a configuration controller can be redefined to realize automatic switching.

[0091] In S105, the management server sends an attribute setting instruction carrying a creation time to the plurality of to-be-synchronized controllers in response to the second response information.

[0092] It can be understood that, on the basis of S104, the management server sends an attribute setting instruction carrying a creation time to the plurality of to-be-synchronized controllers in response to the second response information, that is, the CDP creation time transmitted by the configuration controller is notified to all non-configuration controllers to instruct the plurality of to-be-synchronized controllers to enter a time synchronization stage (that is, a get_create_time stage), so as to ensure that the time of all to-be-synchronized controllers in the next generation is consistent.

[0093] In S106, the plurality of to-be-synchronized controllers execute an attribute setting operation in response to the attribute setting instruction, and write the next generation into an edit request about the target data volume sent by the host.

[0094] It can be understood that, on the basis of S105, the plurality of to-be-synchronized controllers execute an attribute setting operation in response to the attribute setting instruction, and write the next generation into an edit request about the target data volume sent by the host. The specific operation is shown in the following embodiment. After all the to-be-synchronized controllers return get_create_time and acked, the to-be-synchronized controllers are synchronized, and the CDP creation action is completed. Subsequently, all the edit requests (that is, IOs) received after the generation is switched are set as the next generation, for example, the next generation is written into a context of the IO.

[0095] Optionally, the plurality of to-be-synchronized controllers execute an attribute setting operation in response to the attribute setting instruction, and write the next generation into an edit request about the target data volume sent by the host. The specific operation can be implemented through the following steps:

[0096] In response to the attribute setting instruction, a time parameter corresponding to the continuous data protection is set as the creation time to establish an association between the creation time and the next generation. A generation state parameter of the target data volume is set as a second identifier, wherein the second identifier is used to identify that the next generation is in a valid state. The next generation is written into an edit request about the target data volume sent by the host.

[0097] It can be understood that the attribute setting operation performed by the controller includes: setting the time parameter corresponding to the current continuous data protection as the creation time, the time parameter being used to identify the creation time of the current continuous data protection, so as to establish the association between the creation time and the next generation, that is, for different controllers, all IOs received after the creation time are set as the next generation, so as to keep the time consistency while realizing the generation synchronization. The generation state parameter of the target data volume is set as the second identifier, the generation state parameter being used to identify whether the current generation is in an effective state, and the second identifier being the identifier of the effective state, for example, active, that is, gen_id_state is set as active, at this time, the "current generation" recorded in the controller has been switched, and it is the next generation.

[0098] Optionally, after the plurality of to-be-synchronized controllers write the next generation into the edit request about the target data volume sent by the host, the method further includes:

[0099] The plurality of to-be-synchronized controllers update the number of edit requests processed by the target data volume in different generations, and after processing the edit request in the next generation, return third response information indicating that the generation synchronization is completed to the management server, wherein the third response information further includes the creation time.

[0100] It can be understood that the attribute setting operation further includes refreshing the IO count of different generations, for details, refer to the following embodiments, and return get_create_time and acked (that is, the third response information) after the count parameter is set.

[0101] Optionally, the plurality of to-be-synchronized controllers update the number of edit requests processed by the target data volume in different generations, which can be realized by the following steps:

[0102] Update the first flight parameter according to the second flight parameter, wherein the first flight parameter is used to represent the number of edit requests that have not been processed in the previous continuous data protection, and the second flight parameter is used to represent the number of edit requests that have not been processed in the latest generation; update the second flight parameter according to the third flight parameter, wherein the third flight parameter is used to represent the number of edit requests that have not been processed in the creation process of the current continuous data protection; and set the third flight parameter as 0.

[0103] It can be understood that the IO counting mode of the plurality of to-be-synchronized controllers includes: assigning a value of a second flight parameter to a first flight parameter, wherein the first flight parameter is denoted as cdp_io_count, and is used to identify a number of edit requests of the target data volume that are not processed in the last continuous data protection, that is, a number of flight IOs of the target data volume in the last CDP of the controller, and the value is 0 when a new CDP is created; the second flight parameter is denoted as gen_io_count, and is used to identify a number of edit requests of the target data volume that are not processed in the latest generation, that is, a number of flight IOs (IOs not returned to the host) of the target data volume in the latest generation of the controller, that is, cdp_io_count = gen_io_count. Assigning a value of a third flight parameter to a second flight parameter, wherein the third flight parameter is denoted as next_gen_io_count, and is used to identify a number of edit requests of the target data volume that are not processed in the current continuous data protection creation process, that is, a number of flight IOs of the new generation in the CDP creation process, that is, gen_io_count = next_gen_io_count. The third flight parameter is set to 0, that is, the value is not 0 only in the process of creating the CDP, and is 0 at other times, that is, next_gen_io_gount = 0. For example, the number of IOs in the last continuous data protection is 10, and the number of IOs in the current continuous data protection is 20, when cdp_io_count = 10, gen_io_count = 20, and next_gen_io_gount = 0, that is, the setting is completed, and acked is returned.

[0104] Exemplary, Figure 4 A flowchart for creating time synchronization provided by an embodiment of the present application is shown in Figure 3 On the basis of the embodiment shown, the management controller sends an attribute setting instruction to the configuration controller, the dedicated controller and the non-dedicated controller, the configuration controller, the dedicated controller and the non-dedicated controller respond to the attribute setting instruction, perform attribute setting of cdp_create_time, set the gen_id_state of the target data volume to active, and refresh the IO count of different generations, which will not be repeated here.

[0105] The application aims at the performance bottleneck problem caused by the related generation synchronization method of the high-density snapshot technology in the multi-controller scene, and proposes a generation synchronization method for multi-controller device data volumes. By dynamically electing a key controller as a configuration controller in multiple controllers, and taking the controller (creation time) as a reference to coordinate and ensure the cognitive consistency of all controllers on the snapshot generation, the process waiting caused by the related generation synchronization method is reduced, and the cooperation efficiency of the multi-controller device is significantly optimized. In addition, for the scene with intensive communication between multiple controllers, the number of communication between controllers is reduced, the efficiency of generation synchronization in the CDP creation process is increased, the minimum snapshot creation interval is reduced without affecting the host IO issuance, and a more fine-grained snapshot protection scene is supported.

[0106] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.

[0107] The embodiment of the application also provides a generation synchronization device of a data volume, which is applied to a target cluster including a management server and multiple to-be-synchronized controllers, and includes:

[0108] The management server is configured to generate a generation switching request about the target data volume in response to a creation instruction of the current continuous data protection performed on the target data volume, and send the generation switching request to the multiple to-be-synchronized controllers;

[0109] The multiple to-be-synchronized controllers are configured to perform a preparation operation of generation switching in response to the generation switching request, and return first response information indicating that the switching preparation is completed to the management server;

[0110] The management server is configured to issue a generation switching instruction to the multiple to-be-synchronized controllers in response to the first response information;

[0111] The multiple to-be-synchronized controllers are configured to switch the target data volume to the next generation in response to the generation switching instruction, and return second response information indicating that the generation switching is completed to the management server, wherein the second response information further includes a creation time about the current continuous data protection determined by a configuration controller in the multiple to-be-synchronized controllers;

[0112] The management server is configured to send an attribute setting instruction carrying the creation time to the multiple to-be-synchronized controllers in response to the second response information;

[0113] The multiple to-be-synchronized controllers are configured to perform an attribute setting operation in response to the attribute setting instruction, and write the next generation into an editing request about the target data volume sent by a host.

[0114] The generation switching request comprises a next generation of the target data volume and a first identifier for identifying that the current generation of the target data volume is in an invalid state.

[0115] Optionally, the plurality of to-be-synchronized controllers are configured to:

[0116] set the generation state parameter of the target data volume as the first identifier;

[0117] set the first generation parameter of the target data volume as the next generation, wherein the first generation parameter is used to identify the generation after the continuous data protection is created.

[0118] In a case where there is no unprocessed edit request in the plurality of to-be-synchronized controllers, return the first response information indicating that the switching preparation is completed to the management server.

[0119] The generation switching request further comprises a special resource identifier assigned to the target data volume by the management server.

[0120] Optionally, the plurality of to-be-synchronized controllers are configured to:

[0121] The home controller of the target data volume in the plurality of to-be-synchronized controllers applies for resources according to the special resource identifier, for use by the controller processing the target data volume;

[0122] In a case where the home controller completes the resource application and there is no unprocessed edit request in the plurality of to-be-synchronized controllers, return the first response information indicating that the switching preparation is completed to the management server.

[0123] The plurality of to-be-synchronized controllers comprise a configuration controller and other controllers.

[0124] Optionally, the plurality of to-be-synchronized controllers are configured to:

[0125] The configuration controller determines the creation time of the current continuous data protection in response to the generation switching instruction, and updates the second generation parameter of the target data volume based on the first generation parameter, to switch the target data volume to the next generation, wherein the second generation parameter is used to identify the current generation of the data volume.

[0126] The other controllers set the second generation parameter based on the first generation parameter, to switch the target data volume to the next generation.

[0127] Optionally, the plurality of to-be-synchronized controllers are configured to:

[0128] In response to the attribute setting instruction, set the time parameter corresponding to the current continuous data protection as the creation time, to establish an association between the creation time and the next generation.

[0129] Set the generation status parameter of the target data volume to the second identifier, where the second identifier is used to indicate that the next generation is in a valid state;

[0130] The next generation is written into the edit request sent by the host regarding the target data volume.

[0131] Optionally, multiple controllers to be synchronized are also used for:

[0132] Update the number of edit requests processed by the target data volume at different generations;

[0133] After processing the editing request of the next generation, a third response message indicating the completion of generation synchronization is returned to the management server. This third response message also includes the creation time.

[0134] Optionally, multiple controllers to be synchronized are used for:

[0135] The first flight parameter is updated according to the second flight parameter, wherein the first flight parameter is used to characterize the number of unprocessed edit requests of the data volume in the previous continuous data protection, and the second flight parameter is used to characterize the number of unprocessed edit requests of the data volume in the latest generation.

[0136] The second flight parameter is updated based on the third flight parameter, wherein the third flight parameter is used to characterize the number of edit requests that have not been processed during the current continuous data protection creation process of the data volume;

[0137] Set the third flight parameter to 0.

[0138] Optionally, multiple controllers to be synchronized are also used for:

[0139] Write the dedicated resource identifier into the current continuous data protection configuration information; the configuration information includes the current continuous data protection status, creation time, dedicated resource identifier, and the latest generation of the target data volume.

[0140] Optionally, the management server is also used for:

[0141] If a fault is detected in the configuration controller, a new configuration controller is determined from among multiple controllers that are in operation and awaiting synchronization. The configuration controller is used by other controllers awaiting synchronization and the host to query the current configuration information for continuous data protection.

[0142] For a description of the features in the embodiment corresponding to the generational synchronization device of the data volume, please refer to the relevant description of the embodiment corresponding to the generational synchronization method of the data volume, which will not be repeated here.

[0143] Embodiments of this application also provide a generational synchronization system for data volumes, including a management server and multiple controllers to be synchronized, wherein:

[0144] The management server is configured to:

[0145] in response to a creation instruction of the current continuous data protection performed on the target data volume, generating a generation switching request about the target data volume, and sending the generation switching request to the plurality of to-be-synchronized controllers;

[0146] in response to the first response information, issuing a generation switching instruction to the plurality of to-be-synchronized controllers;

[0147] in response to the second response information, sending an attribute setting instruction carrying a creation time to the plurality of to-be-synchronized controllers;

[0148] The plurality of to-be-synchronized controllers are configured to:

[0149] in response to the generation switching request, performing a preparation operation of the generation switching, and returning first response information indicating that the preparation of the switching is completed to the management server;

[0150] in response to the generation switching instruction, switching the target data volume to a next generation, and returning second response information indicating that the generation switching is completed to the management server, wherein the second response information further includes a creation time about the current continuous data protection determined by the configuration controller in the plurality of to-be-synchronized controllers;

[0151] in response to the attribute setting instruction, performing an attribute setting operation, and writing the next generation into an edit request about the target data volume sent by the host.

[0152] It can be understood that the specific implementation steps of the management server and the plurality of to-be-synchronized controllers refer to the steps in any one of the above-mentioned data volume generation synchronization method embodiments.

[0153] Embodiments of the present application also provide an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above-mentioned data volume generation synchronization method embodiments.

[0154] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to perform the steps in any one of the above-mentioned data volume generation synchronization method embodiments when running.

[0155] In one exemplary embodiment, the above-mentioned computer readable storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0156] Embodiments of the present application further provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the above-mentioned data volume epoch synchronization method embodiments.

[0157] Embodiments of the present application further provide another computer program product comprising a non-transitory computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the above-mentioned data volume epoch synchronization method embodiments.

[0158] Those skilled in the art will further appreciate that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or both. In order to clearly illustrate the interchangeability of hardware and software, the above description has been generally described in terms of exemplary components and steps that can be implemented in hardware and software. Whether such functionality is implemented in hardware or software depends on the particular application and design constraints imposed on the overall system. Those skilled in the art can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

[0159] The above has carried out the detailed introduction to the data volume epoch synchronization method provided by the present application. The principle and implementation mode of the present application are described by applying specific examples in the present text, and the above-mentioned example description is only applicable to help understand the method of the present application and its core idea. It should be pointed out that, for the ordinary skilled in the art, under the premise of not departing from the principle of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for synchronizing generations of a data volume, the method comprising: The method is applied to a target cluster including a management server and a plurality of to-be-synchronized controllers, and comprises the following steps: The management server generates a generation switching request about the target data volume in response to a creation instruction of the current continuous data protection performed on the target data volume, and sends the generation switching request to the plurality of to-be-synchronized controllers; The plurality of to-be-synchronized controllers perform a preparation operation of generation switching in response to the generation switching request, and return first response information indicating that the switching preparation is completed to the management server; The management server issues a generation switching instruction to the plurality of to-be-synchronized controllers in response to the first response information; The plurality of to-be-synchronized controllers switch the target data volume to the next generation in response to the generation switching instruction, and return second response information indicating that the generation switching is completed to the management server, wherein the second response information further comprises a creation time of the current continuous data protection determined by a configuration controller in the plurality of to-be-synchronized controllers; The management server sends an attribute setting instruction carrying the creation time to the plurality of to-be-synchronized controllers in response to the second response information; The plurality of to-be-synchronized controllers perform an attribute setting operation in response to the attribute setting instruction, and write the next generation into an edit request about the target data volume sent by a host.

2. The method of claim 1, wherein, The generation switching request comprises a next generation of the target data volume and a first identifier for identifying that the current generation of the target data volume is in an invalid state; The plurality of to-be-synchronized controllers perform a preparation operation of generation switching in response to the generation switching request, and return first response information indicating that the switching preparation is completed to the management server, comprising: setting a generation state parameter of the target data volume as the first identifier; setting a first generation parameter of the target data volume as the next generation, wherein the first generation parameter is used to identify the generation after the continuous data protection is created; returning the first response information indicating that the switching preparation is completed to the management server in a case where there is no unprocessed edit request in the plurality of to-be-synchronized controllers.

3. The method of claim 2, wherein, The generation switching request further comprises a special resource identifier allocated to the target data volume by the management server, and the method further comprises the following steps before returning the first response information indicating that the switching preparation is completed to the management server in a case where there is no unprocessed edit request in the plurality of to-be-synchronized controllers: A home controller of the target data volume in the plurality of to-be-synchronized controllers applies resources according to the special resource identifier for use by a controller processing the target data volume; In a case where the home controller completes the resource application and there is no unprocessed edit request in the plurality of to-be-synchronized controllers, the first response information indicating that the switching preparation is completed is returned to the management server.

4. The method of claim 1, wherein, The plurality of to-be-synchronized controllers comprise a configuration controller and other controllers, and the plurality of to-be-synchronized controllers switch the target data volume to the next generation in response to the generation switching instruction, comprising: The configuration controller determines a creation time of the current continuous data protection in response to the generation switching instruction, and updates a second generation parameter of the target data volume based on a first generation parameter to switch the target data volume to a next generation, where the second generation parameter is used to identify a current generation of a data volume; The other controller sets the second generation parameter based on the first generation parameter to switch the target data volume to the next generation.

5. The method of claim 1, wherein, The multiple to-be-synchronized controllers execute an attribute setting operation in response to the attribute setting instruction, and write the next generation into an edit request about the target data volume sent by the host, including: In response to the attribute setting instruction, set a time parameter corresponding to the current continuous data protection as the creation time to establish an association between the creation time and the next generation; Set a generation state parameter of the target data volume as a second identifier, where the second identifier is used to identify that the next generation is in an effective state; Write the next generation into the edit request about the target data volume sent by the host.

6. The method of any of claims 1 or 5, wherein, After the next generation is written into the edit request about the target data volume sent by the host, the method further includes: The multiple to-be-synchronized controllers update a number of edit requests processed by the target data volume at different generations; After the multiple to-be-synchronized controllers process the edit request at the next generation, return third response information indicating that the generation synchronization is completed to the management server, where the third response information further includes the creation time.

7. The method of claim 6, wherein, The updating of the number of edit requests processed by the target data volume at different generations includes: Update a first flight parameter according to a second flight parameter, where the first flight parameter is used to represent a number of edit requests that are not processed by a data volume in a previous continuous data protection, and the second flight parameter is used to represent a number of edit requests that are not processed by the data volume at a latest generation; Update the second flight parameter according to a third flight parameter, where the third flight parameter is used to represent a number of edit requests that are not processed by the data volume in a creation process of a current continuous data protection; Set the third flight parameter as 0.

8. The method of claim 3, wherein, After the home controller applies for a resource according to the exclusive resource identifier, the method further includes: Write the exclusive resource identifier into configuration information of the current continuous data protection; where the configuration information includes a state of the current continuous data protection, the creation time, the exclusive resource identifier, and a latest generation of the target data volume.

9. The method of claim 1, wherein, The method further includes: The management server re-determines a configuration controller from the multiple to-be-synchronized controllers in a working state in a case where the configuration controller is in a fault state, where the configuration controller is used for other to-be-synchronized controllers and a host to query configuration information of the current continuous data protection.

10. A generation synchronization system for data volumes, the system comprising: The management server and the multiple to-be-synchronized controllers, where: The management server is used for: In response to a creation instruction of the current continuous data protection performed on a target data volume, a generation switching request about the target data volume is generated and sent to the plurality of to-be-synchronized controllers; In response to the first response information, a generation switching instruction is issued to the plurality of to-be-synchronized controllers; In response to the second response information, an attribute setting instruction carrying a creation time is sent to the plurality of to-be-synchronized controllers; The plurality of to-be-synchronized controllers are configured to: In response to the generation switching request, a preparation operation of generation switching is performed, and first response information indicating that the switching preparation is completed is returned to the management server; In response to the generation switching instruction, the target data volume is switched to a next generation, and second response information indicating that the generation switching is completed is returned to the management server, wherein the second response information further includes a creation time of the current continuous data protection determined by a configuration controller in the plurality of to-be-synchronized controllers; In response to the attribute setting instruction, an attribute setting operation is performed, and the next generation is written into an edit request about the target data volume sent by a host.

Citation Information

Patent Citations

  • Business disaster recovery switching method and device, equipment and storage medium

    CN117112313A

  • Complete machine backup method, host machine and readable storage medium

    CN117493077A