Cloning volume splitting method, device and equipment
By introducing features, metadata, and a data engine into the distributed storage system, cloned volumes can be split in seconds and original volumes can be deleted in seconds. This solves the problem of long splitting times for cloned volumes, reduces the difficulty and cost of operation and maintenance, and optimizes the user experience.
Patent Information
- Application Number
- CN202511367517.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-01-09
AI Technical Summary
In existing technologies, cloning and splitting volumes takes a long time, causing users to wait for extended periods and preventing them from directly deleting the original volume, thus increasing the difficulty and cost of operation and maintenance.
By introducing a feature engine, a metadata engine, and a data engine into the distributed storage system, cloned volumes can be split in seconds and original volumes can be deleted in seconds. The metadata engine and the data engine perform data copying and recycling tasks in the background, and the user interface displays the results of the operations completed in seconds.
It enables second-level splitting of cloned volumes and second-level deletion of original volumes, reducing the difficulty and cost of operation and maintenance for users, optimizing the user experience, and avoiding long waiting times for data copying.
Smart Images

Figure CN121301080A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method, apparatus and device for splitting cloned volumes. Background Technology
[0002] With the development of information technology, data volume is growing exponentially, making fast and efficient data storage and backup increasingly important. In distributed storage systems, volume cloning is an efficient data backup and replication method. The principle of volume cloning is to create a new copy based on an existing original volume; this new copy is called a clone volume. When creating a clone volume based on the original volume, a full copy method can be used to achieve volume cloning, that is, a full copy of the original volume is performed to obtain the clone volume. When performing a full copy of the original volume, either the current data of the original volume can be copied, or a snapshot of the original volume can be copied. The snapshot of the original volume records the complete data state of the original volume at a certain point in time.
[0003] However, the above cloning method requires a full copy of the original volume, that is, copying all the data of the original volume to the new volume. This results in problems such as a large amount of data copying and serious waste of space. Summary of the Invention
[0004] This application provides a method for splitting a cloned volume, the method comprising:
[0005] If a split request is received for the volume to be split and cloned, then the second volume identifier of the original volume corresponding to the first volume identifier of the volume to be split and cloned, and K first data nodes are determined; wherein, the K first data nodes are used to copy the data objects of the original volume to the volume to be split and cloned.
[0006] Split task information is sent to the K first data nodes. The split task information includes a first volume identifier and a second volume identifier, so that each first data node stores the split task information in a specified storage medium. The split task information is used to trigger each first data node to copy the data object corresponding to the second volume identifier to the clone volume to be split corresponding to the first volume identifier.
[0007] If a split task response message is received from the K first data nodes, indicating that the first data nodes have successfully stored the split task information in the specified storage medium, then the user is prompted that the clone volume splitting operation of the clone volume to be split has been completed.
[0008] This application provides a clone volume splitting apparatus, the apparatus comprising:
[0009] The acquisition module is used to acquire split requests for the cloned volume to be split;
[0010] The determination module is configured to, upon receiving the split request, determine the second volume identifier of the original volume corresponding to the first volume identifier of the volume to be split and cloned, and K first data nodes; wherein, the K first data nodes are used to copy the data objects of the original volume to the volume to be split and cloned;
[0011] The sending module is used to send split task information to the K first data nodes. The split task information includes a first volume identifier and a second volume identifier, so that each first data node stores the split task information in a specified storage medium. The split task information is used to trigger each first data node to copy the data object corresponding to the second volume identifier to the clone volume to be split corresponding to the first volume identifier.
[0012] The processing module is configured to, upon receiving a split task response message from the K first data nodes, indicating that the first data nodes have successfully stored the split task information in the specified storage medium, prompt the user that the cloning operation of the cloned volume to be split has been completed.
[0013] This application provides an electronic device, including: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is configured to execute the machine-executable instructions to implement the clone volume splitting method of the above example of this application.
[0014] This application provides a computer program product, which includes a computer program that, when executed by a processor, implements the cloned volume splitting method of the above example of this application.
[0015] This application provides a machine-readable storage medium storing machine-executable instructions that can be executed by a processor; wherein the processor is configured to execute the machine-executable instructions to implement the clone volume splitting method of the above example of this application when the machine-executable instructions are executed.
[0016] As can be seen from the above technical solutions, in this embodiment, when both the original volume and the cloned volume exist simultaneously, the cloned volume can rely on the original volume for read and write operations. During data read and write operations, data objects from the original volume are copied to the cloned volume, eliminating the need for a full copy of the original volume and avoiding problems such as large data copy volumes and significant space waste. When the cloned volume does not need to rely on the original volume for read and write operations, the user is directly notified that the cloned volume splitting operation is complete. This achieves second-level cloned volume splitting in the distributed storage system, solving the problem of long cloned volume splitting times. It enables second-level operations at the user configuration level, reducing the user's operational difficulty and costs. Users do not need to wait for long periods for cloned volume splitting or be aware of the data copying process during cloned volume splitting, thus optimizing the user's cloned volume splitting operation experience and the cloned volume configuration operation experience. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a cloned volume splitting method according to one embodiment of this application;
[0018] Figure 2 This is a schematic diagram of a cloned volume read / write request in one embodiment of this application;
[0019] Figure 3 This is a schematic diagram of the structure of a distributed storage system according to one embodiment of this application;
[0020] Figure 4 This is a flowchart illustrating a cloned volume splitting method according to one embodiment of this application;
[0021] Figure 5 This is a flowchart illustrating the original volume deletion method in one embodiment of this application;
[0022] Figure 6 This is a schematic diagram of deleting an intermediate clone volume in a cascaded clone volume according to one embodiment of this application;
[0023] Figure 7 This is a schematic diagram of the structure of a cloned volume splitting device in one embodiment of this application;
[0024] Figure 8 This is a hardware structure diagram of an electronic device according to one embodiment of this application. Detailed Implementation
[0025] This application proposes a method for splitting cloned volumes, which is applied to electronic devices. (See [link to relevant documentation]). Figure 1 The diagram shown is a flowchart of the cloned volume splitting method, which may include:
[0026] Step 101: If a split request is obtained for the cloned volume to be split, determine the second volume identifier of the original volume corresponding to the first volume identifier of the cloned volume to be split and K first data nodes; wherein, the K first data nodes are used to copy the data objects of the original volume to the cloned volume to be split.
[0027] Step 102: Send split task information to K first data nodes. The split task information may include the first volume identifier and the second volume identifier, so that each first data node stores the split task information in the specified storage medium. The split task information is used to trigger each first data node to copy the data object corresponding to the second volume identifier to the clone volume to be split corresponding to the first volume identifier.
[0028] Step 103: If a split task response message is received from K first data nodes, indicating that the first data nodes have successfully stored the split task information in the specified storage medium, then the user is prompted that the clone volume splitting operation of the clone volume to be split has been completed.
[0029] In one example, after informing the user that the cloning operation of the volume to be spun out is complete, the clone marker corresponding to the volume to be spun out can be set to a first marker value. The first marker value indicates that the volume to be spun out depends on the original volume for read and write operations. Based on this, if a read / write operation request for the volume to be spun out is received, the clone marker corresponding to the volume to be spun out is queried. If the clone marker is the first marker value, the second volume identifier corresponding to the first volume identifier of the volume to be spun out is determined, and the read / write operation request is processed based on the volume to be spun out and the original volume corresponding to the second volume identifier.
[0030] In one example, after informing the user that the cloning operation of the volume to be spun out is complete, if K first data nodes return a spun task completion message, the cloning flag corresponding to the volume to be spun out can be set to a second flag value. The second flag value indicates that the volume to be spun out has ended its read / write operations dependent on the original volume. For each first data node, based on the spun task information, the data object corresponding to the second volume identifier is copied to the volume to be spun out, and a spun task completion message is sent after the data object copy is complete. Furthermore, if a read / write operation request for the volume to be spun out is received, the cloning flag corresponding to the volume to be spun out can be queried. If the cloning flag is the second flag value, the read / write operation request is processed based on the volume to be spun out.
[0031] In one example, if a deletion request for the original volume to be deleted is received, the fourth volume identifier of the associated clone volume corresponding to the third volume identifier of the original volume to be deleted can be determined, and the M second data nodes corresponding to the fourth volume identifier can be identified. Split task information, including the third volume identifier and the fourth volume identifier, is sent to the M second data nodes so that each second data node stores the split task information in the specified storage medium. If a split task response message is received from the M second data nodes, indicating that the second data nodes have successfully stored the split task information in the specified storage medium, the user is prompted that the original volume deletion operation of the original volume to be deleted has been completed.
[0032] In one example, after notifying the user that the original volume deletion operation has been completed, the clone flag corresponding to the associated clone volume can be set to the first flag value; the first flag value indicates that the associated clone volume depends on the original volume to be deleted for read and write operations; the deletion flag corresponding to the original volume to be deleted can be set to the third flag value; the third flag value indicates that the associated clone volume corresponding to the original volume to be deleted has not been released from its dependency. The deletion flag corresponding to the original volume to be deleted can also be queried periodically; if the deletion flag is the third flag value, the volume deletion task corresponding to the original volume to be deleted is prohibited. Specifically, when a deletion request for the original volume to be deleted is received, a volume deletion task is generated for the original volume to be deleted and stored.
[0033] In one example, after notifying the user that the original volume deletion operation has been completed, if a split task completion message is received from M second data nodes, the clone flag corresponding to the associated clone volume is set to the second flag value. The second flag value indicates that the associated clone volume no longer depends on the original volume to be deleted for read / write operations. If the clone flags of all associated clone volumes corresponding to the original volume to be deleted are the second flag value, the deletion flag corresponding to the original volume to be deleted is set to the fourth flag value. The fourth flag value indicates that the associated clone volumes corresponding to the original volume to be deleted have been released from dependency. Based on this, if the deletion flag corresponding to the original volume to be deleted is the fourth flag value, N third data nodes corresponding to the third volume identifier are identified, and a volume deletion task corresponding to the original volume to be deleted is sent to these N third data nodes. The volume deletion task includes the third volume identifier, so that each third data node deletes the data object corresponding to the third volume identifier.
[0034] As can be seen from the above technical solutions, in this embodiment, when both the original volume and the cloned volume exist simultaneously, the cloned volume can rely on the original volume for read and write operations. During data read and write operations, data objects from the original volume are copied to the cloned volume, eliminating the need for a full copy of the original volume and avoiding problems such as large data copy volumes and significant space waste. When the cloned volume does not need to rely on the original volume for read and write operations, the user is directly notified that the cloned volume splitting operation is complete. This achieves second-level cloned volume splitting in the distributed storage system, solving the problem of long cloned volume splitting times. It enables second-level operations at the user configuration level, reducing the user's operational difficulty and costs. Users do not need to wait for long periods for cloned volume splitting or be aware of the data copying process during cloned volume splitting, thus optimizing the user's cloned volume splitting operation experience and the cloned volume configuration operation experience.
[0035] The technical solutions described above in the embodiments of this application will be explained below in conjunction with specific application scenarios.
[0036] In distributed storage systems, data backup and replication can be achieved through volume cloning, which involves performing a full copy of the original volume to obtain a cloned volume. When performing a full copy of the original volume, either the current data of the original volume can be copied entirely, or a snapshot of the original volume can be copied entirely. A snapshot of the original volume records its complete data state at a specific point in time. For example, the original volume is the source volume being cloned, also known as the parent volume or base volume, and can be a snapshot at a particular point in time. A cloned volume is a new volume cloned from the original volume, initially sharing data with the original volume and preserving the original volume's data state at a specific point in time.
[0037] For example, cloned volume technology can be implemented based on snapshot technology. A cloned volume is similar to a writable snapshot of an original volume, which records the complete data state of the original volume at a certain moment and can be read and written without affecting the data of the original volume. The subsequent original volume can be the current data or a snapshot of the original volume.
[0038] However, the above cloning method requires a full copy of the original volume, that is, copying all the data of the original volume to the new volume. This results in problems such as a large amount of data copying and serious waste of space.
[0039] To avoid a full copy of the original volume, when cloning volumes using snapshot technology, no data copy is performed at the initial creation of the cloned volume; instead, the data is shared with the original volume. See also... Figure 2The diagram illustrates read / write requests for a cloned volume. When a client reads data from a cloned volume, if the data exists on the cloned volume, the data is read from the cloned volume; otherwise, the read request is redirected to the original volume for data reading. When a client writes data to a cloned volume, it can first copy the data from the original volume to the cloned volume. Only after the data copy is complete will the new data be written to the cloned volume, i.e., overwriting the cloned volume.
[0040] Based on the cloning method described above, no data copying is required when creating a cloned volume, saving storage space and allowing for rapid creation. However, the cloned volume has a strong dependency on the original volume. If the original volume is directly deleted, the data in the cloned volume will become incomplete, meaning the cloned volume will not store all the data.
[0041] To address the aforementioned issues, cloned volumes need to have a splitting capability. Once split, the cloned volume becomes an independent, usable volume, no longer dependent on the original volume. Cloned volume splitting refers to the process of detaching the cloned volume from the original volume, making it an independent volume. To ensure the integrity of the cloned volume, the core operation of cloned volume splitting is copying the data from the original volume to the cloned volume, thereby eliminating the cloned volume's data dependency on the original volume.
[0042] When splitting a cloned volume, a large amount of data copying is triggered, writing the data from the original volume to the cloned volume. Although the split operation does not copy data already written to the cloned volume, for terabyte-level or even petabyte-level cloned volumes, even if data copying of uncloned data is performed, the splitting time can still be several hours. In other words, splitting a cloned volume is time-consuming, and users need to wait a long time to know that the cloned volume splitting operation is complete before proceeding with subsequent processing of the cloned volume.
[0043] Furthermore, when deleting an original volume, if cloned volumes (one or more cloned volumes) have been created based on that original volume, then all cloned volumes must be split first before the deletion operation on the original volume can be issued. Obviously, splitting all cloned volumes triggers a large amount of data copying, writing data from the original volume to the clones. Splitting cloned volumes is time-consuming, resulting in a long deletion time for the original volume. Users need to wait a considerable amount of time before they are notified that the deletion operation has been completed and can then proceed with subsequent processing.
[0044] In summary, during the cloned volume splitting process, the splitting time is lengthy, with user-issued splitting operations potentially taking several hours to complete. During this process, the user interface remains in a splitting state, affecting subsequent operations. During the original volume deletion process, when cloned volumes exist, the original volume cannot be deleted directly; it must wait for all cloned volumes to split before it can be deleted, increasing operational complexity and costs.
[0045] In response to the above findings, this application proposes a method for second-level splitting of cloned volumes and second-level deletion of original volumes. In a distributed storage system, this method enables second-level splitting of cloned volumes and second-level deletion of original volumes, solving the problems of long splitting time for cloned volumes and the inability to directly delete original volumes. It achieves second-level operations at the user configuration level without additional overhead or mutual exclusion restrictions, reducing the user's operational difficulty and cost.
[0046] This application proposes a cloned volume splitting method and an original volume deletion method. This method can be applied to a distributed storage system, which may include a control node (also called a management node) and multiple data nodes. For example, the control node manages multiple data nodes. Data nodes are used to read or write data; for instance, a data node is a node used to store data, and data can be read from or written to this data node.
[0047] See Figure 3 The diagram illustrates the structure of a distributed storage system. The control node can include a feature engine and a metadata engine. The feature engine controls and maintains the value-added features of storage volumes. Storage volumes can be original volumes or cloned volumes, etc. Specifically, the feature engine controls and maintains the value-added features of original volumes, and the feature engine controls and maintains the value-added features of cloned volumes. The value-added features maintained by the feature engine can include snapshots, cloned volume states, etc., and these value-added features are visible to the user. For example, the feature engine can be implemented through a process or other functional modules; there are no restrictions on this.
[0048] The metadata engine is used for the control and maintenance of volume metadata. Specifically, it controls and maintains the metadata of the original volume (i.e., internal volume attributes) and the metadata of cloned volumes. The metadata maintained by the metadata engine is not visible to the user. For example, the metadata engine can be implemented through a process or other functional modules; there are no restrictions on this.
[0049] See Figure 3 As shown, a data node can include a data engine, and a data node can include multiple data engines. Data engines are used for the control and maintenance of volume data; that is, data engines are used for the control and maintenance of data in the original volume, and data engines are used for the control and maintenance of data in cloned volumes. For example, data engines can be implemented through processes or other functional modules; there are no restrictions on this.
[0050] In summary, a storage volume (such as a raw volume or a cloned volume) is jointly controlled and maintained by a feature engine, a metadata engine, and a data engine. For a cloned volume (or raw volume), it can include multiple data objects (each data object stores K bytes of data). In a distributed storage system, these data objects can be distributed across multiple data nodes. For each data node, the data objects are controlled and maintained by multiple data engines.
[0051] For example, multiple data objects of a cloned volume are distributed across data nodes 1, 2, and 3. Data engine 11 of data node 1 controls and maintains data objects 1-10, data engine 12 of data node 1 controls and maintains data objects 11-20, data engine 21 of data node 2 controls and maintains data objects 21-30, data engine 22 of data node 2 controls and maintains data objects 31-40, and so on.
[0052] In this embodiment, in a network scenario involving a feature engine, a metadata engine, and a data engine, the foreground configuration operations for clone volume splitting and original volume deletion can be controlled and maintained by the feature engine, while the background data copying and recycling tasks for clone volume splitting and original volume deletion can be controlled and maintained in the background by the metadata engine and the data engine. Based on this, for users, clone volume splitting and original volume deletion operations are completed within seconds, resolving the issues of long waiting times for clone volume splitting and the inability to directly delete original volumes.
[0053] In a distributed storage system, a feature engine, metadata engine, and data engine are configured to achieve second-level splitting of cloned volumes and second-level deletion of original volumes. For example, information maintained by the feature engine is displayed through a user interface, and interface operations require deployment through the feature engine. The feature engine deploys cloned volume splitting task configuration operations, and the metadata engine and data engine maintain the background splitting task execution operations, achieving second-level splitting of cloned volumes at the feature level that is perceptible to the user. Furthermore, based on second-level splitting of cloned volumes, the feature engine deploys original volume deletion task configuration operations. The metadata engine maintains the background cloned volume dependencies and triggers the data engine's volume deletion task execution, achieving second-level deletion of original volumes at the feature level that is perceptible to the user.
[0054] This application proposes a cloned volume splitting method for achieving second-level cloned volume splitting in a distributed storage system. This method can be applied to a control node (also called a control device or management device). The control node may include a feature engine and a metadata engine. The control node can implement the cloned volume splitting method through the feature engine and metadata engine. Alternatively, the control node can implement the cloned volume splitting method through other functional modules; there are no restrictions, as long as the control node can implement the cloned volume splitting method. See also... Figure 4 The diagram shown is a flowchart of the cloned volume splitting method, which may include:
[0055] Step 401: The control node receives a split request for the clone volume to be split.
[0056] In one example, a user can issue a split operation to the control node for a specific cloned volume. For ease of distinction, this cloned volume is referred to as the cloned volume to be split (i.e., the cloned volume that needs to be split). The control node can then receive the split operation for the cloned volume to be split. For instance, the feature engine receives the split operation for the cloned volume to be split. After receiving the split operation from the user, the feature engine can also issue a split request for the cloned volume to be split to the metadata engine, allowing the metadata engine to obtain the split request.
[0057] For example, when the feature engine receives a split operation for a cloned volume to be split, it can obtain the first volume identifier of the cloned volume (if the first volume identifier is issued along with the split operation), indicating that a split operation needs to be performed on the cloned volume corresponding to the first volume identifier. Thus, when the feature engine sends a split request to the metadata engine, the split request carries the first volume identifier of the cloned volume to be split.
[0058] For example, when the feature engine receives a split operation for a cloned volume to be split, it can check various attributes and parameters of the cloned volume. For instance, it can check if the cloned volume has already been split. If it has, the split operation is unnecessary, and no split request will be sent to the metadata engine. If the split is incomplete, the split operation needs to be executed, and a split request will be sent to the metadata engine. Another example is checking if a split operation for the cloned volume already exists. If so, it indicates that the current split operation is a duplicate, and the split operation for the cloned volume is already being executed; no split request will be sent to the metadata engine. If not, it indicates that the current split operation is not a duplicate, and a split request will be sent to the metadata engine. Of course, these are just two examples and are not intended to be restrictive.
[0059] In one example, a user issues a split operation to the control node (such as a feature engine) for a cloned volume to be split. This can include, but is not limited to: the user issuing the split operation to the control node through a visual operation interface; the user issuing a RESTful request to the control node through a device (i.e., the user device), indicating the split operation for the cloned volume to be split, such as the RESTful request including the first volume identifier and split flag of the cloned volume to be split, indicating that the split operation is performed on the cloned volume corresponding to the first volume identifier; or the user issuing a maintenance command line to the control node through a device (i.e., the user device), indicating the split operation for the cloned volume to be split.
[0060] Step 402: After the control node obtains the split request for the cloned volume to be split, it determines the second volume identifier of the original volume corresponding to the first volume identifier of the cloned volume to be split and K first data nodes; wherein, the K first data nodes are used to copy the data objects of the original volume to the cloned volume to be split.
[0061] In one example, the metadata engine can pre-maintain a mapping between the volume identifiers of cloned volumes and the volume identifiers of the original volumes, indicating that the cloned volume depends on the original volume. Based on this, after receiving a split request for a cloned volume to be split, the metadata engine can obtain the first volume identifier of the cloned volume to be split from the split request, and query the mapping relationship through the first volume identifier to obtain the second volume identifier corresponding to the first volume identifier. This second volume identifier is the volume identifier of the original volume that the cloned volume to be split depends on.
[0062] In one example, the metadata engine can pre-maintain a mapping between the cloned volume's volume identifier and multiple data nodes, indicating that all data objects of the cloned volume are distributed across these data nodes. Based on this, the metadata engine can query this mapping using the first volume identifier to obtain the K data nodes corresponding to that first volume identifier, where K is a positive integer. These data nodes are designated as the first data nodes. These K first data nodes are used to copy data objects from the original volume to the cloned volume to be split. For instance, if the K first data nodes include data node 1, data node 2, and data node 3, all data objects of the cloned volume to be split are distributed across data nodes 1, 2, and 3. Data nodes 1, 2, and 3 are used to copy data objects from the original volume to the cloned volume to be split.
[0063] Step 403: The control node sends split task information to K first data nodes. The split task information may include the first volume identifier of the cloned volume to be split and the second volume identifier of the original volume.
[0064] In one example, the metadata engine can send split task information to K first data nodes via broadcast or via unicast.
[0065] After sending the split task information to the K first data nodes, the metadata engine can also generate first metadata and second metadata. The first metadata may include the split task response flag of each first data node, and the second metadata may include the split task completion flag of each first data node.
[0066] When generating the first metadata, each split task response is marked with a first value, indicating that the first data node has not returned a split task response message. Upon receiving a split task response message from a first data node, the metadata engine modifies the split task response mark of that first data node to a second value, indicating that the first data node has returned a split task response message. The first metadata is used to reflect the progress of the split task responses, i.e., how many first data nodes have returned split task response messages.
[0067] When generating the second metadata, each split task completion flag is marked with a third value, indicating that the first data node has not returned a split task completion message. Upon receiving a split task completion message from a first data node, the metadata engine modifies the split task completion flag of that first data node to a fourth value, indicating that the first data node has returned a split task completion message. The second metadata reflects the progress of split task completion, i.e., how many first data nodes have returned split task completion messages.
[0068] In one example, for each first data node, after receiving the split task information, the first data node can store the split task information in a specified storage medium (such as persistently recording the split task information in the database to which the first data node belongs). After the split task information is stored, the first data node can return a split task response message to the control node (such as the metadata engine).
[0069] When the metadata engine receives a split task response message from the first data node, it modifies the first data node's split task response flag to the second value to indicate that the first data node has returned a split task response message. Clearly, if all split task response flags in the first metadata are of the second value, it means the metadata engine has received split task response messages from K first data nodes (i.e., all first data nodes). If some split task response flags in the first metadata are not of the second value, it means the metadata engine has not received split task response messages from K first data nodes.
[0070] Step 404: If the control node receives split task response messages from K first data nodes, the control node will notify the user that the clone volume splitting operation of the clone volume to be split has been completed.
[0071] In one example, a split task response message indicates that the first data node has successfully stored the split task information in the specified storage medium. If all split task response flags in the first metadata are of the second value, it means that K split task response messages from the first data nodes have been received, and the user can be notified that the cloning operation of the volume to be split is complete. Alternatively, if some split task response flags in the first metadata are not of the second value, it means that K split task response messages from the first data nodes have not been received, and the user needs to continue waiting until K split task response messages from the first data nodes are received, at which point the user can be notified that the cloning operation of the volume to be split is complete.
[0072] In one example, after the data node stores the split task information in the specified storage medium, the split task information serves as a background task. The data node executes the background task, and the user is unaware of the background task execution process. The task execution process is described in subsequent embodiments. After storing the split task information in the specified storage medium, the data node can also return the foreground split operation result; that is, the data node replies to the metadata engine with the result of the foreground cloned volume split operation, such as returning a split task response message to the metadata engine.
[0073] After receiving the split task response messages from the K first data nodes, the metadata engine sends a split task completion message to the feature engine, indicating that the split task has been completed. Upon receiving this message, the feature engine notifies the user that the cloning operation of the volume to be split has been completed. Thus, the volume to be split in the feature engine is marked as split complete, and its dependencies are removed. Based on this, the user interface can display that the split of the volume to be split is complete. It's important to note that here, only the cloned volume in the feature engine is marked as split complete, and the user interface notifies the user that the cloning operation of the volume to be split is complete. However, the actual split task is completed in the background by the metadata engine and the data engine; the metadata engine and the data engine do not mark the cloned volume as split complete.
[0074] In summary, upon receiving the split task response messages from the K first data nodes, the feature engine can remove the dependency between the volume to be split and the original volume, modify the volume to be split as a normal volume, and notify the user that the split operation of the volume to be split is complete. In this way, the user is aware that the split operation of the volume to be split is complete and can proceed with subsequent processing of the volume. During subsequent processing, the user treats the volume to be split as a normal volume, not as a cloned volume.
[0075] In the above process, since the first data node does not involve data copying when returning the split task response message, it can return the split task response message within milliseconds. Therefore, the time to receive the split task response messages returned by K first data nodes is short, and the time to notify the user that the cloned volume splitting operation has been completed is also short, thus achieving second-level splitting of the cloned volume. For the user, the cloned volume has been split within seconds, and subsequent configuration operations can be performed. In addition, the actual dependencies of the cloned volume to be split are still recorded in the metadata engine. These dependencies will only be released after the actual background splitting operation of the cloned volume to be split is completed (i.e., data copying is complete). This part of the relationship is not visible to the user.
[0076] Step 405: The control node sets the clone tag corresponding to the volume to be split and cloned to the first tag value; wherein, the first tag value can indicate that the volume to be split and cloned depends on the original volume for read and write operations.
[0077] Step 406: If the control node receives a split task completion message from K first data nodes, the control node sets the clone flag corresponding to the clone volume to be split to the second flag value; wherein, the second flag value can indicate that the clone volume to be split has ended its read and write operations dependent on the original volume.
[0078] In one example, after receiving the split task response messages from the K first data nodes, the metadata engine, in addition to sending a split task completion message to the feature engine so that the feature engine can notify the user that the cloning operation of the volume to be split has been completed, can also set the clone tag corresponding to the volume to be split to the first tag value. The first tag value can be true or 1, etc.
[0079] For example, if the metadata engine does not maintain a clone tag corresponding to the volume to be split, the metadata engine can generate a clone tag (i.e., this clone tag corresponds to the first volume identifier) and set this clone tag to the first tag value. Alternatively, if the metadata engine has maintained a clone tag corresponding to the volume to be split, and this clone tag is not the first tag value, the metadata engine can modify this clone tag to the first tag value. Or, if the metadata engine has maintained a clone tag corresponding to the volume to be split, and this clone tag is the first tag value, then the first tag value of the clone tag remains unchanged.
[0080] For example, when the clone marker corresponding to the volume to be split is the first marker value, the first marker value can indicate that the volume to be split depends on the original volume for read and write operations. In other words, read and write operations on the volume to be split need to be based on the original volume corresponding to the volume to be split.
[0081] In one example, for each first data node, after storing the split task information in the specified storage medium, it can also start a background task to perform the clone volume splitting operation. That is, it reads the split task information from the specified storage medium and performs the clone volume splitting operation based on the split task information. For example, the first data node obtains the first volume identifier and the second volume identifier from the split task information. The first volume identifier corresponds to the volume to be split and cloned, and the second volume identifier corresponds to the original volume. Then, the data object of the original volume (the data object corresponding to the second volume identifier) is copied to the clone volume to be split and cloned corresponding to the first volume identifier.
[0082] For example, during the data object copying process, the first data node will not copy data objects that have already been written to the volume to be split and cloned; it will only copy data objects that have not yet been written to the volume. Furthermore, during the data object copying process, the first data node can copy the current data objects of the original volume, or it can copy data objects from a snapshot of the original volume at a specific point in time.
[0083] For example, the first data node may include multiple data engines, each of which is used to copy a portion of the data objects. For instance, data engine 11 copies data objects 1-10 from the original volume to the volume to be split and cloned, data engine 12 copies data objects 11-20 from the original volume to the volume to be split and cloned, and so on. Each data engine is responsible for copying a portion of the data objects to the volume to be split and cloned.
[0084] For example, when the data engine of the first data node copies the data objects of the original volume to the volume to be split and cloned, it can use QoS technology to copy the data objects to the volume to be split and cloned. QoS technology reduces the impact of background tasks on front-end business. The data copying process reduces system usage through QoS technology, ensuring that the background splitting task does not affect the IO of the front-end business. The scheduling and execution of this background task are imperceptible to the user.
[0085] In one example, for each first data node, the first data node copies the data objects of the original volume to the cloned volume to be split based on the split task information. After the data object copying is completed (i.e., all data objects under the responsibility of the first data node have been copied), the first data node sends a split task completion message to the control node (metadata engine), which indicates that the data object copying has been completed.
[0086] When the metadata engine receives a split task completion message from the first data node, it modifies the first data node's split task completion flag to the fourth value to indicate that the first data node has returned a split task completion message. Clearly, if all split task completion flags in the second metadata are the fourth value, it means the metadata engine has received split task completion messages from K first data nodes (i.e., all first data nodes). If some split task completion flags in the second metadata are not the fourth value, it means the metadata engine has not received split task completion messages from K first data nodes.
[0087] In summary, if all split task completion flags in the second metadata are of the fourth value, it indicates that split task completion messages have been received from K first data nodes, and the metadata engine sets the clone flag corresponding to the volume to be split to the second flag value. Alternatively, if some split task completion flags in the second metadata are not of the fourth value, it indicates that split task completion messages have not been received from K first data nodes, and the engine needs to continue waiting until all K first data nodes have received split task completion messages, at which point the metadata engine sets the clone flag corresponding to the volume to be split to the second flag value.
[0088] When the metadata engine sets the clone tag corresponding to the volume to be spun to the second tag value, the second tag value can be false or 0. If the metadata engine does not maintain the clone tag corresponding to the volume to be spun, it generates the clone tag and sets it to the second tag value. If the metadata engine has maintained the clone tag corresponding to the volume to be spun, and the clone tag is not the second tag value, it modifies the clone tag to the second tag value. If the metadata engine has maintained the clone tag corresponding to the volume to be spun, and the clone tag is the second tag value, it keeps the second tag value unchanged.
[0089] For example, when the clone marker corresponding to the volume to be split is the second marker value, the second marker value can indicate that the volume to be split no longer depends on the original volume for read and write operations. In other words, read and write operations on the volume to be split need to be performed based on the volume to be split.
[0090] In one example, after the control node notifies the user that the clone volume splitting operation has been completed, if it receives a read / write operation request for the clone volume to be split, it queries the clone tag corresponding to the clone volume to be split. The clone tag can be a first tag value or a second tag value.
[0091] If the clone marker is the first marker value, then the second volume identifier (i.e., the second volume identifier of the original volume) corresponding to the first volume identifier of the volume to be split and cloned is determined. Based on the volume to be split and the original volume corresponding to the second volume identifier, read and write operation requests are processed. For example, see... Figure 2 As shown, when a client reads data from the volume to be split and cloned, if the data exists on the volume, the data is read from the volume; otherwise, the read request is redirected to the original volume for data reading. When a client writes data to the volume to be split and cloned, the data is first copied from the original volume to the volume. Only after the data copy is complete is the new data written to the volume to be split and cloned, i.e., overwriting the cloned volume.
[0092] If the clone marker is the second marker value, then read and write operation requests are processed based on the clone volume to be split. For example, when a client reads data from the clone volume to be split, the data is read from the clone volume. When a client writes data to the clone volume to be split, the data is written to the clone volume.
[0093] In one example, after the background splitting task of the volume to be split and cloned is completed on the first data node (i.e., after the splitting task within the first data node is completed), the first data node actively notifies the metadata engine that the splitting is complete. When the metadata engine detects that the volume to be split and cloned has been successfully split on all first data nodes, it sets the clone tag corresponding to the volume to be split and cloned to the second tag value, cleans up the relevant metadata of the volume to be split and cloned, removes the dependency between the volume to be split and cloned and the original volume, and deletes the mapping between the first volume identifier of the volume to be split and cloned and the second volume identifier of the original volume. At this point, the background splitting process of the cloned volume ends.
[0094] This application proposes a raw volume deletion method for achieving second-level deletion of raw volumes in a distributed storage system. This method can be applied to a control node (also called a control device or management device). The control node may include a feature engine and a metadata engine. The control node can implement the raw volume deletion method through the feature engine and metadata engine. Alternatively, the control node can implement the raw volume deletion method through other functional modules; there are no restrictions, as long as the control node can implement the raw volume deletion method. See also... Figure 5 The diagram shown illustrates the flowchart of the original volume deletion method, which may include:
[0095] Step 501: The control node receives a deletion request for the original volume to be deleted.
[0096] In one example, a user can issue a delete operation to the control node for a specific raw volume. For ease of distinction, this raw volume can be referred to as the raw volume to be deleted (i.e., the raw volume that needs to be deleted). The control node can then receive the delete operation for the raw volume to be deleted. For instance, the feature engine might receive the delete operation for the raw volume to be deleted. After receiving the delete operation from the user, the feature engine can also issue a delete request for the raw volume to be deleted to the metadata engine, allowing the metadata engine to obtain the delete request.
[0097] For example, when the feature engine receives a delete operation for a raw volume to be deleted, it can obtain the third-volume identifier of the raw volume to be deleted (if the third-volume identifier is sent along with the delete operation), indicating that the raw volume corresponding to the third-volume identifier needs to be deleted. Thus, when the feature engine sends a delete request to the metadata engine, the delete request carries the third-volume identifier of the raw volume to be deleted.
[0098] In one example, a user issues a deletion operation to the control node (such as a feature engine) for the original volume to be deleted. This can include, but is not limited to: the user issuing the deletion operation to the control node through a visual operation interface; the user issuing a RESTful request to the control node through a device (i.e., the user device), indicating the deletion operation for the original volume to be deleted, such as the RESTful request including the third volume identifier and deletion flag of the original volume to be deleted, indicating that the deletion operation is performed on the original volume to be deleted corresponding to the third volume identifier; or the user issuing a maintenance command line to the control node through a device (i.e., the user device), indicating the deletion operation for the original volume to be deleted.
[0099] Step 502: After receiving the deletion request for the original volume to be deleted, the control node determines the fourth volume identifier of the associated clone volume corresponding to the third volume identifier of the original volume to be deleted.
[0100] In one example, the metadata engine can pre-maintain a mapping between the volume identifiers of cloned volumes and the volume identifiers of the original volumes. Based on this, after receiving a deletion request for the original volume to be deleted, the metadata engine can obtain the third volume identifier of the original volume to be deleted from the deletion request, and query the mapping relationship through the third volume identifier to obtain the fourth volume identifier corresponding to the third volume identifier. This fourth volume identifier is the volume identifier of the associated cloned volume, and this associated cloned volume depends on the original volume to be deleted for data read and write.
[0101] In one example, when the metadata engine receives a deletion request for a raw volume to be deleted, it can also generate a volume deletion task for that raw volume and store this task. For instance, if the raw volume to be deleted corresponds to one or more associated clone volumes, the metadata engine executes the volume deletion task after all associated clone volumes have completed their splitting tasks. The execution process of the volume deletion task is described in subsequent embodiments. If the raw volume to be deleted does not correspond to any associated clone volumes, the metadata engine directly executes the volume deletion task.
[0102] Alternatively, when the feature engine receives a delete operation for the original volume to be deleted, it can generate a volume delete task for the original volume and store this volume delete task. After all associated clone volumes have completed their splitting within seconds (i.e., after receiving the split task response message), the feature engine sends the volume delete task to the metadata engine, which stores this volume delete task. After all associated clone volumes have completed their splitting tasks (i.e., after receiving the split task completion message), the metadata engine executes this volume delete task.
[0103] If the original volume to be deleted corresponds to one or more associated clone volumes, a split operation will be issued for each associated clone volume, automatically triggering the clone volume split. See the following steps for details on the split operation.
[0104] Step 503: The control node determines M second data nodes corresponding to the fourth volume identifier. These M second data nodes are used to copy the data objects of the original volume to be deleted to the associated clone volume.
[0105] In one example, the metadata engine can pre-maintain a mapping between the cloned volume's volume identifier and multiple data nodes, indicating that all data objects of the cloned volume are distributed across these data nodes. Based on this, the metadata engine can query this mapping using the fourth volume identifier to obtain the M data nodes corresponding to that fourth volume identifier, where M can be a positive integer. These data nodes are designated as second data nodes. The M second data nodes are used to copy the data objects from the original volume to be deleted to the associated cloned volume.
[0106] Step 504: The control node sends split task information to M second data nodes. The split task information may include the third volume identifier of the original volume to be deleted and the fourth volume identifier of the associated cloned volume.
[0107] In one example, after sending split task information to M second data nodes, the metadata engine generates first metadata and second metadata. The first metadata may include the split task response flag of each second data node, and the second metadata may include the split task completion flag of each second data node.
[0108] When generating the first metadata, each split task response is marked with a first value, indicating that the second data node has not returned a split task response message. When a split task response message is received from a second data node, the metadata engine modifies the split task response mark of that second data node to a second value, indicating that the second data node has returned a split task response message.
[0109] When generating the second metadata, each split task completion flag is marked with a third value, indicating that the second data node has not returned a split task completion message. When a split task completion message is received from a second data node, the metadata engine modifies the split task completion flag of that second data node to a fourth value, indicating that the second data node has returned a split task completion message.
[0110] In one example, for each second data node, after receiving the split task information, the second data node can store the split task information in a specified storage medium (such as persistently recording the split task information in the database to which the second data node belongs). After the split task information is stored, the second data node can return a split task response message to the control node (such as the metadata engine).
[0111] When the metadata engine receives a split task response message from a second data node, it modifies the split task response flag of the second data node to the second value to indicate that the second data node has returned a split task response message. Clearly, if all split task response flags in the first metadata are the second value, it means that M split task response messages from second data nodes have been received.
[0112] Step 505: If the control node receives split task response messages from M second data nodes, the control node will notify the user that the original volume deletion operation has been completed.
[0113] In one example, a split task response message indicates that the second data node has successfully stored the split task information in the specified storage medium. If all the split task response flags of the first metadata are the second value, it means that the metadata engine has received split task response messages returned by M second data nodes, that is, the split of the associated clone volume of the original volume to be deleted is completed in seconds (i.e., the split task response message has been received).
[0114] After receiving split task response messages from M second data nodes, the metadata engine sends a split task completion message to the feature engine, indicating that the split task for the associated clone volume has been completed. Upon receiving this message, the feature engine can notify the user that the split operation for the associated clone volume is complete. In this way, the associated clone volume in the feature engine is marked as split complete, and its dependency is removed. The user interface can then display that the split of the associated clone volume is complete. However, this only involves the feature engine marking the associated clone volume as split complete and notifying the user through the user interface. The actual split task is performed in the background by the metadata engine and the data engine; neither the metadata engine nor the data engine marks the associated clone volume as split complete.
[0115] After receiving split task response messages from M second data nodes, the metadata engine indicates that the split task of an associated clone volume has been completed. If the split tasks of all associated clone volumes corresponding to the original volume to be deleted have been completed, the metadata engine sends a deletion task completion message to the feature engine, indicating that the deletion task of the original volume to be deleted has been completed. After receiving the deletion task completion message, the feature engine prompts the user that the deletion operation of the original volume to be deleted has been completed. In this way, in the feature engine, the original volume to be deleted is completely deleted (i.e., all information of the original volume to be deleted is deleted), achieving the deletion of the original volume to be deleted within seconds. At this time, the interface may not display the information of the original volume to be deleted and instead display that the clone volume split is complete. All clone volumes under the original volume to be deleted have been split and become ordinary volumes within seconds.
[0116] In summary, upon receiving split task response messages from M second data nodes, the feature engine can remove the dependency between the original volume to be deleted and the associated clone volume, modify the associated clone volume to a normal volume, delete the original volume to be deleted, and notify the user that the split operation of the associated clone volume and the deletion operation of the original volume to be deleted are complete. In this way, the user is informed that the clone volume split operation and the original volume deletion operation are complete, allowing them to proceed with subsequent processing of the clone volume.
[0117] In the above process, since the second data node does not involve data copying when returning the split task response message, it can return the split task response message within milliseconds. Therefore, the time to receive the split task response messages from M second data nodes is short, the time to notify the user that the split operation of the associated cloned volume has been completed is short, and the time to notify the user that the deletion operation of the original volume has been completed is short. This achieves second-level splitting of cloned volumes and second-level deletion of original volumes, without requiring the user to wait for the data copying of all cloned volumes to be completed. For the user, the cloned volume has been split and the original volume has been deleted within seconds, allowing for subsequent configuration operations. Furthermore, the actual dependencies of the cloned volumes are still recorded in the metadata engine, and these dependencies will only be resolved after the actual background splitting operation of the cloned volumes is completed.
[0118] In one example, a volume deletion task can be generated for the original volume to be deleted, and the metadata engine can store this task. This means that although the user is notified that the deletion operation of the original volume is complete, the metadata engine has already persisted the record of the volume deletion task; for example, the metadata engine will add a new metadata entry to record the volume deletion task. The volume deletion task is only triggered after all background split tasks of associated clone volumes are completed. This ensures that before the background split tasks of associated clone volumes are completed, the dependency relationship between the original volume to be deleted and the associated clone volumes is still recorded in the metadata engine, the dependency relationship between the original volume to be deleted and the associated clone volumes is not truly broken, and the data in the original volume to be deleted will not be deleted.
[0119] Step 506: The control node sets the clone flag corresponding to the associated clone volume to the first flag value; the first flag value indicates that the associated clone volume depends on the original volume to be deleted for read and write operations. The control node sets the deletion flag corresponding to the original volume to be deleted to the third flag value; the third flag value indicates that the associated clone volume corresponding to the original volume to be deleted has not been released from its dependency, that is, it still depends on the original volume to be deleted for read and write operations.
[0120] Step 507: If the control node receives split task completion messages from M second data nodes, the control node sets the clone flag corresponding to the associated clone volume to the second flag value; where the second flag value indicates that the associated clone volume no longer depends on the original volume to be deleted for read and write operations. If the clone flags of all associated clone volumes corresponding to the original volume to be deleted are the second flag value, the control node sets the deletion flag corresponding to the original volume to be deleted to the fourth flag value; where the fourth flag value indicates that the associated clone volumes corresponding to the original volume to be deleted have been released from dependency, i.e., they no longer depend on the original volume to be deleted for read and write operations.
[0121] In one example, after receiving split task response messages from M second data nodes, the metadata engine can set the clone flag corresponding to the associated cloned volume to a first flag value, such as true or 1. The metadata engine can also set the deletion flag corresponding to the original volume to be deleted to a third flag value, such as true or 1. For instance, if the metadata engine does not maintain a deletion flag for the original volume to be deleted, it generates one and sets it to the third flag value. Alternatively, if the metadata engine has maintained a deletion flag for the original volume to be deleted, and that flag is not a third flag value, it modifies it to the third flag value. Or, if the metadata engine has maintained a deletion flag for the original volume to be deleted, and that flag is a third flag value, it keeps the third flag value unchanged.
[0122] In one example, for each second data node, after storing the split task information in the specified storage medium, the second data node obtains the third volume identifier and the fourth volume identifier from the split task information. The third volume identifier corresponds to the original volume to be deleted, and the fourth volume identifier corresponds to the associated clone volume. The data object of the original volume to be deleted (the data object corresponding to the third volume identifier) is copied to the associated clone volume corresponding to the fourth volume identifier.
[0123] For each second data node, after copying the data objects of the original volume to be deleted to the associated clone volume based on the split task information, the second data node sends a split task completion message to the control node (metadata engine), which indicates that the copying of the data objects has been completed.
[0124] When the metadata engine receives a split task completion message from the second data node, it modifies the split task completion flag of the second data node to the fourth value. Clearly, if all split task completion flags of the second metadata node are the fourth value, it means the metadata engine has received split task completion messages from M second data nodes. The metadata engine sets the clone flag corresponding to the associated clone volume to the second flag value. If the clone flags of all associated clone volumes corresponding to the original volume to be deleted are the second flag value, the metadata engine sets the deletion flag corresponding to the original volume to be deleted to the fourth flag value.
[0125] When the metadata engine sets the clone tag corresponding to the associated cloned volume to the second tag value, the second tag value can be false or 0, etc. When the metadata engine sets the deletion tag corresponding to the original volume to be deleted to the fourth tag value, the fourth tag value can be false or 0, etc. If the deletion tag corresponding to the original volume to be deleted is not maintained, a deletion tag corresponding to the original volume to be deleted is generated, and this deletion tag is set to the fourth tag value. Alternatively, if the deletion tag corresponding to the original volume to be deleted has been maintained, and this deletion tag is not the fourth tag value, then this deletion tag is modified to the fourth tag value. Alternatively, if the deletion tag corresponding to the original volume to be deleted has been maintained, and this deletion tag is the fourth tag value, then the fourth tag value remains unchanged.
[0126] In one example, if a read / write operation request for an associated cloned volume is received, the clone tag corresponding to the associated cloned volume is queried. This clone tag can be either a first tag value or a second tag value. If the clone tag is the first tag value, the third volume tag corresponding to the fourth volume tag of the associated cloned volume (i.e., the third volume tag of the original volume to be deleted) is determined, and the read / write operation request is processed based on the associated cloned volume and the original volume to be deleted corresponding to the third volume tag. If the clone tag is the second tag value, the read / write operation request is processed based on the associated cloned volume, without depending on the original volume to be deleted.
[0127] In one example, when the metadata engine detects that the associated clone volume has been split on all second data nodes, it sets the clone tag corresponding to the associated clone volume to the second tag value, cleans up the related metadata of the associated clone volume, removes the dependency between the associated clone volume and the original volume to be deleted, and deletes the correspondence between the fourth volume identifier of the associated clone volume and the third volume identifier of the original volume to be deleted.
[0128] Step 508: The control node periodically queries the deletion flag corresponding to the original volume to be deleted. If the deletion flag is a third flag value, the control node prohibits the execution of the volume deletion task corresponding to the original volume to be deleted. If the deletion flag is a fourth flag value, the control node determines N third data nodes corresponding to the third volume identifier and sends the volume deletion task corresponding to the original volume to be deleted to the N third data nodes. The volume deletion task includes the third volume identifier, so that each third data node deletes the data object corresponding to the third volume identifier.
[0129] In one example, after the metadata engine stores the volume deletion task corresponding to the original volume to be deleted, it periodically queries the deletion flag corresponding to the original volume to be deleted. If the deletion flag is the third flag value, it waits for the next query time and continues to query the deletion flag corresponding to the original volume to be deleted. If the deletion flag is the fourth flag value, the volume deletion task needs to be executed. That is, after all associated clone volumes have completed the split task (i.e., the deletion flag is the fourth flag value), the volume deletion task is triggered to delete the original volume to be deleted.
[0130] In step 502, when the metadata engine determines the fourth volume identifier of the associated clone volume corresponding to the third volume identifier of the original volume to be deleted, if there is no fourth volume identifier corresponding to the third volume identifier, that is, there is no associated clone volume corresponding to the original volume to be deleted (that is, all associated clone volumes corresponding to the original volume to be deleted have been split), the volume deletion task is directly triggered to delete the original volume to be deleted.
[0131] In one example, the metadata engine can pre-maintain a mapping between the volume identifier of the original volume and multiple data nodes, indicating that all data objects of the original volume are distributed across these data nodes. Based on this, the metadata engine can query this mapping through the third volume identifier to obtain the N data nodes corresponding to the third volume identifier, where N can be a positive integer, and these data nodes are denoted as the third data node.
[0132] When executing a volume deletion task, the metadata engine can send the task to N third-party data nodes. This task can include the third-party volume identifier of the original volume to be deleted. For example, the metadata engine can broadcast the task to all N third-party data nodes. Alternatively, it can unicast the task sequentially to each of the N third-party data nodes.
[0133] For each third data node, after receiving the volume deletion task, the third data node can obtain the third volume identifier from the volume deletion task and delete the data object corresponding to the third volume identifier.
[0134] Obviously, after deleting the data object corresponding to the third volume identifier on all third data nodes, all data objects of the original volume to be deleted can be deleted, thus completing the deletion operation of the original volume to be deleted.
[0135] In one example, building upon the second-level splitting of cloned volumes and second-level deletion of original volumes, a method for deleting intermediate cloned volumes within cascaded cloned volumes is also proposed. See [link to relevant documentation]. Figure 6 The diagram illustrates the deletion of an intermediate clone volume within a cascaded clone volume. The original volume A has one clone volume B, and clone volume B has two clone volumes, namely clone volume C and clone volume D. If a user deletes clone volume B, it triggers a second-level split in clone volume C and a second-level split in clone volume D. Then, the deletion operation for clone volume B is sent to the metadata engine.
[0136] During the second-level deletion of the original volume, the metadata engine broadcasts a stop split request to the data nodes before the deletion task, stopping the background split task of cloned volume B and reducing background data copying. Before triggering data deletion on cloned volume B during the second-level deletion of the original volume, the metadata engine notifies cloned volume B to remove its dependency from the original volume A, thus ensuring the correctness of volume cloning relationships in the system.
[0137] As can be seen from the above technical solutions, in this embodiment, second-level clone volume splitting and original volume deletion are achieved at the user configuration level, avoiding the problems of long waiting times for clone volume splitting and the inability to directly delete the original volume during user configuration operations, thus optimizing the user experience of clone volume configuration. Second-level splitting at the clone volume configuration level eliminates the need for users to wait for long periods or perceive the data copying process during clone volume splitting, optimizing the user experience of clone volume splitting. Second-level deletion at the original volume configuration level eliminates the need for users to wait for all clone volumes under the original volume to be split before issuing the original volume deletion, reducing the difficulty of user configuration operations and maintenance costs. Implementing second-level clone volume splitting and original volume deletion in a distributed storage system achieves user-perceptible second-level clone volume splitting at the configuration level, and second-level deletion of the original volume based on second-level clone volume splitting, allowing users to directly delete the original volume in seconds without waiting for all clone volume data to be copied. The actual data copying and deletion are performed in the background, eliminating the need for users to perceive or wait for data migration. Cloned volume splitting and original volume deletion are user-perceptible configuration-level operations, not actual background data copying and deletion operations. Background tasks utilize QoS technology for flow control, minimizing the performance impact on foreground I / O. The clone relationships displayed in the user interface are maintained by the feature engine, while the actual clone relationships between volumes, invisible to the user, are maintained by the metadata engine. Actual data reading, writing, copying, and deletion are performed by the data engine. In scenarios involving cascading cloned volumes deleting intermediate cloned volumes, in addition to the original volume's second-level deletion method, the background task currently splitting the volume is proactively stopped and its dependency on the original volume is removed, reducing background task overhead and maintaining the correctness of the clone relationships.
[0138] Based on the same concept as the methods described above, this application proposes a cloned volume splitting device, see [link to relevant documentation]. Figure 7 The diagram shown is a structural schematic of the clone volume splitting device, which includes:
[0139] The acquisition module 71 is used to acquire the split request for the clone volume to be split;
[0140] The determining module 72 is configured to, upon receiving the split request, determine the second volume identifier of the original volume corresponding to the first volume identifier of the volume to be split and cloned, and K first data nodes; wherein, the K first data nodes are used to copy the data objects of the original volume to the volume to be split and cloned;
[0141] The sending module 73 is used to send split task information to K first data nodes. The split task information includes a first volume identifier and a second volume identifier, so that each first data node stores the split task information in a specified storage medium. The split task information is used to trigger each first data node to copy the data object corresponding to the second volume identifier to the clone volume to be split corresponding to the first volume identifier.
[0142] The processing module 74 is configured to, if it receives split task response messages returned by K first data nodes, wherein the split task response messages indicate that the first data nodes have successfully stored the split task information in the specified storage medium, then prompt the user that the clone volume splitting operation of the clone volume to be split has been completed.
[0143] In one example, the processing module 74 is further configured to, after notifying the user that the cloning operation of the volume to be spun and cloned has been completed, set the clone marker corresponding to the volume to be spun and cloned to a first marker value; wherein the first marker value indicates that the volume to be spun and cloned depends on the original volume for read and write operations; the processing module 74 is further configured to, if a read and write operation request for the volume to be spun and cloned is received, query the clone marker corresponding to the volume to be spun and cloned; if the clone marker is the first marker value, determine the second volume identifier corresponding to the first volume identifier of the volume to be spun and cloned, and process the read and write operation request based on the volume to be spun and cloned and the original volume corresponding to the second volume identifier.
[0144] In one example, the processing module 74 is further configured to, after notifying the user that the cloning operation of the volume to be spun and cloned has been completed, if it receives a split task completion message returned by the K first data nodes, set the clone marker corresponding to the volume to be spun and cloned to a second marker value; wherein the second marker value indicates that the volume to be spun and cloned has ended its read / write operations dependent on the original volume; wherein, for each first data node, the data object corresponding to the second volume identifier is copied to the volume to be spun and cloned based on the split task information, and the split task completion message is sent after the data object copy is completed; the processing module 74 is further configured to, if it receives a read / write operation request for the volume to be spun and cloned, query the clone marker corresponding to the volume to be spun and cloned; if the clone marker is the second marker value, then process the read / write operation request based on the volume to be spun and cloned.
[0145] In one example, the acquisition module 71 is further configured to acquire a deletion request for the original volume to be deleted; the determination module 72 is further configured to determine the fourth volume identifier of the associated clone volume corresponding to the third volume identifier of the original volume to be deleted, and to determine the M second data nodes corresponding to the fourth volume identifier; the sending module 73 is further configured to send split task information to the M second data nodes; the split task information includes the third volume identifier and the fourth volume identifier, so that each second data node stores the split task information in the specified storage medium; the processing module 74 is further configured to, if it receives a split task response message returned by the M second data nodes, the split task response message indicating that the second data nodes have successfully stored the split task information in the specified storage medium, prompt the user that the original volume deletion operation of the original volume to be deleted has been completed.
[0146] In one example, the processing module 74 is further configured to, after notifying the user that the original volume deletion operation of the original volume to be deleted has been completed, set the clone flag corresponding to the associated clone volume to a first flag value; wherein the first flag value indicates that the associated clone volume depends on the original volume to be deleted for read and write operations; set the deletion flag corresponding to the original volume to be deleted to a third flag value; wherein the third flag value indicates that the associated clone volume corresponding to the original volume to be deleted has not been released from its dependency; the processing module 74 is further configured to periodically query the deletion flag corresponding to the original volume to be deleted, and if the deletion flag is the third flag value, then prohibit the execution of the volume deletion task corresponding to the original volume to be deleted; the processing module 74 is further configured to, when a deletion request for the original volume to be deleted is obtained, generate the volume deletion task for the original volume to be deleted and store the volume deletion task.
[0147] In one example, the processing module 74 is further configured to, after notifying the user that the original volume deletion operation of the original volume to be deleted has been completed, if it receives a split task completion message returned by the M second data nodes, set the clone flag corresponding to the associated clone volume to a second flag value; wherein the second flag value indicates that the associated clone volume has ended its read / write operation dependent on the original volume to be deleted; if the clone flags of all associated clone volumes corresponding to the original volume to be deleted are the second flag value, then set the deletion flag corresponding to the original volume to be deleted to a fourth flag value; wherein the fourth flag value indicates that the associated clone volumes corresponding to the original volume to be deleted have been released from dependency; the processing module 74 is further configured to, if the deletion flag corresponding to the original volume to be deleted is the fourth flag value, determine the N third data nodes corresponding to the third volume identifier, and send a volume deletion task corresponding to the original volume to be deleted to the N third data nodes, wherein the volume deletion task includes the third volume identifier, so that each third data node deletes the data object corresponding to the third volume identifier.
[0148] Based on the same concept as the above method, this application proposes an electronic device, see [link to previous application]. Figure 8 As shown, the electronic device includes a processor 81 and a machine-readable storage medium 82, the machine-readable storage medium 82 storing machine-executable instructions that can be executed by the processor 81; the processor 81 is used to execute the machine-executable instructions to implement the clone volume splitting method disclosed in the above example of this application.
[0149] Based on the same concept as the above method, this application also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the clone volume splitting method disclosed in the above examples of this application.
[0150] The aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0151] Based on the same concept as the methods described above, this application also provides a computer program product, which may include a computer program. When executed by a processor, the computer program implements the cloned volume splitting method disclosed in the examples above.
[0152] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0153] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. A method for splitting a cloned volume, characterized in that, The method includes: If a split request is received for the volume to be split and cloned, then the second volume identifier of the original volume corresponding to the first volume identifier of the volume to be split and cloned, and K first data nodes are determined; wherein, the K first data nodes are used to copy the data objects of the original volume to the volume to be split and cloned. Split task information is sent to the K first data nodes. The split task information includes a first volume identifier and a second volume identifier, so that each first data node stores the split task information in a specified storage medium. The split task information is used to trigger each first data node to copy the data object corresponding to the second volume identifier to the clone volume to be split corresponding to the first volume identifier. If a split task response message is received from the K first data nodes, indicating that the first data nodes have successfully stored the split task information in the specified storage medium, then the user is prompted that the clone volume splitting operation of the clone volume to be split has been completed.
2. The method according to claim 1, characterized in that, After notifying the user that the clone volume splitting operation has been completed, the method further includes: Set the clone marker corresponding to the volume to be split and cloned to a first marker value; wherein, the first marker value indicates that the volume to be split and cloned depends on the original volume for read and write operations; If a read / write operation request is received for the cloned volume to be split, the clone tag corresponding to the cloned volume to be split is queried; if the clone tag is a first tag value, the second volume tag corresponding to the first volume tag of the cloned volume to be split is determined, and the read / write operation request is processed based on the cloned volume to be split and the original volume corresponding to the second volume tag.
3. The method according to claim 1, characterized in that, After notifying the user that the clone volume splitting operation has been completed, the method further includes: If a split task completion message is received from the K first data nodes, the clone marker corresponding to the clone volume to be split is set to the second marker value; wherein, the second marker value indicates that the clone volume to be split has ended its read and write operations dependent on the original volume; for each first data node, the data object corresponding to the second volume identifier is copied to the clone volume to be split based on the split task information, and the split task completion message is sent after the data object copy is completed. The method further includes: if a read / write operation request for the clone volume to be split is received, querying the clone tag corresponding to the clone volume to be split; if the clone tag is the second tag value, then processing the read / write operation request based on the clone volume to be split.
4. The method according to claim 1, characterized in that, If a deletion request is received for the original volume to be deleted, the method further includes: Determine the fourth volume identifier of the associated clone volume corresponding to the third volume identifier of the original volume to be deleted, and determine M second data nodes corresponding to the fourth volume identifier; send split task information to the M second data nodes, the split task information including the third volume identifier and the fourth volume identifier, so that each second data node stores the split task information in the specified storage medium; If a split task response message is received from the M second data nodes, indicating that the second data nodes have successfully stored the split task information in the specified storage medium, then the user is prompted that the original volume deletion operation of the original volume to be deleted has been completed.
5. The method according to claim 4, characterized in that, After notifying the user that the deletion operation of the original volume to be deleted has been completed, the method further includes: Set the clone tag corresponding to the associated clone volume to a first tag value; wherein, the first tag value indicates that the associated clone volume depends on the original volume to be deleted for read and write operations; Set the deletion flag corresponding to the original volume to be deleted to a third flag value; wherein, the third flag value indicates that the associated clone volume corresponding to the original volume to be deleted has not been released from its dependency relationship; The method further includes: periodically querying the deletion flag corresponding to the original volume to be deleted; if the deletion flag is a third flag value, then prohibiting the execution of the volume deletion task corresponding to the original volume to be deleted. Specifically, when a deletion request is received for the original volume to be deleted, a volume deletion task is generated for the original volume to be deleted, and the volume deletion task is stored.
6. The method according to claim 4, characterized in that, After notifying the user that the deletion operation of the original volume to be deleted has been completed, the method further includes: If a split task completion message is received from the M second data nodes, the clone flag corresponding to the associated clone volume is set to the second flag value; wherein, the second flag value indicates that the associated clone volume has ended its read and write operations dependent on the original volume to be deleted; If the clone markers of all associated clone volumes corresponding to the original volume to be deleted are the second marker value, then the deletion marker corresponding to the original volume to be deleted is set to the fourth marker value; wherein, the fourth marker value indicates that the associated clone volumes corresponding to the original volume to be deleted have been released from dependency. The method further includes: if the deletion marker corresponding to the original volume to be deleted is a fourth marker value, then N third data nodes corresponding to the third volume identifier are determined, and a volume deletion task corresponding to the original volume to be deleted is sent to the N third data nodes, wherein the volume deletion task includes the third volume identifier, so that each third data node deletes the data object corresponding to the third volume identifier.
7. A cloned volume splitting device, characterized in that, The device includes: The acquisition module is used to acquire split requests for the cloned volume to be split; The determination module is configured to, upon receiving the split request, determine the second volume identifier of the original volume corresponding to the first volume identifier of the volume to be split and cloned, and K first data nodes; wherein, the K first data nodes are used to copy the data objects of the original volume to the volume to be split and cloned; The sending module is used to send split task information to the K first data nodes. The split task information includes a first volume identifier and a second volume identifier, so that each first data node stores the split task information in a specified storage medium. The split task information is used to trigger each first data node to copy the data object corresponding to the second volume identifier to the clone volume to be split corresponding to the first volume identifier. The processing module is configured to, upon receiving a split task response message from the K first data nodes, indicating that the first data nodes have successfully stored the split task information in the specified storage medium, prompt the user that the cloning operation of the cloned volume to be split has been completed.
8. The apparatus according to claim 7, characterized in that, The processing module is further configured to, after notifying the user that the cloning operation of the cloning volume to be spun out has been completed, set the cloning flag corresponding to the cloning volume to be spun out to a first flag value; wherein the first flag value indicates that the cloning volume to be spun out depends on the original volume for read and write operations. The processing module is further configured to, if a read / write operation request for the cloned volume to be split is received, query the clone tag corresponding to the cloned volume to be split; if the clone tag is a first tag value, determine the second volume tag corresponding to the first volume tag of the cloned volume to be split, and process the read / write operation request based on the cloned volume to be split and the original volume corresponding to the second volume tag.
9. The apparatus according to claim 7, characterized in that, The processing module is further configured to, after notifying the user that the cloning operation of the volume to be spun and cloned has been completed, if it receives a split task completion message returned by the K first data nodes, set the cloning flag corresponding to the volume to be spun and cloned to a second flag value; wherein the second flag value indicates that the volume to be spun and cloned has ended its read and write operations dependent on the original volume; wherein, for each first data node, based on the split task information, the data object corresponding to the second volume identifier is copied to the volume to be spun and cloned, and the split task completion message is sent after the data object copying is completed; The processing module is further configured to, if a read / write operation request for the cloned volume to be split is received, query the clone tag corresponding to the cloned volume to be split; if the clone tag is a second tag value, process the read / write operation request based on the cloned volume to be split.
10. The apparatus according to claim 7, characterized in that, The acquisition module is also used to acquire a deletion request for the original volume to be deleted; The determining module is further configured to determine the fourth volume identifier of the associated clone volume corresponding to the third volume identifier of the original volume to be deleted, and to determine the M second data nodes corresponding to the fourth volume identifier; The sending module is further configured to send split task information to the M second data nodes; wherein the split task information includes the third volume identifier and the fourth volume identifier, so that each second data node stores the split task information in a specified storage medium; The processing module is further configured to, if it receives a split task response message returned by M second data nodes, which indicates that the second data nodes have successfully stored the split task information in the specified storage medium, then prompt the user that the original volume deletion operation of the original volume to be deleted has been completed.
11. The apparatus according to claim 10, characterized in that, The processing module is further configured to, after notifying the user that the deletion operation of the original volume to be deleted has been completed, set the clone flag corresponding to the associated clone volume to a first flag value; wherein the first flag value indicates that the associated clone volume depends on the original volume to be deleted for read and write operations; and set the deletion flag corresponding to the original volume to be deleted to a third flag value; wherein the third flag value indicates that the associated clone volume corresponding to the original volume to be deleted has not been released from its dependency. The processing module is also used to periodically query the deletion flag corresponding to the original volume to be deleted. If the deletion flag is a third flag value, the volume deletion task corresponding to the original volume to be deleted is prohibited. The processing module is further configured to generate a volume deletion task for the original volume to be deleted and store the volume deletion task when a deletion request for the original volume to be deleted is obtained.
12. The apparatus according to claim 10, characterized in that, The processing module is further configured to, after notifying the user that the original volume deletion operation of the original volume to be deleted has been completed, if it receives a split task completion message returned by the M second data nodes, set the clone flag corresponding to the associated clone volume to a second flag value; wherein the second flag value indicates that the associated clone volume has ended its read / write operations dependent on the original volume to be deleted; if the clone flags of all associated clone volumes corresponding to the original volume to be deleted are the second flag value, then set the deletion flag corresponding to the original volume to be deleted to a fourth flag value; wherein the fourth flag value indicates that the associated clone volumes corresponding to the original volume to be deleted have been released from dependency. The processing module is further configured to, if the deletion flag corresponding to the original volume to be deleted is a fourth flag value, determine N third data nodes corresponding to the third volume identifier, and send a volume deletion task corresponding to the original volume to be deleted to the N third data nodes, wherein the volume deletion task includes the third volume identifier, so that each third data node deletes the data object corresponding to the third volume identifier.
13. An electronic device, characterized in that, include: A processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; The processor is configured to execute machine-executable instructions to implement the method of any one of claims 1-6.