Method, device, electronic device and storage medium for cloning unowned volumes
By dividing the unowned source volume into granules and assigning them to multiple storage nodes for parallel data copying, the problems of storage node resource waste and low efficiency are solved, and efficient volume cloning operations are achieved.
Patent Information
- Application Number
- CN202511072935.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-31
AI Technical Summary
In the prior art, there are problems of storage node resource waste and low volume cloning processing efficiency, especially in the case of owned volume cloning operations, where a single storage node processing causes performance bottlenecks and resource waste.
The preset unattached source volume is divided into multiple particles according to the preset volume particle size, and these particles are evenly distributed to multiple storage nodes. The participation of each storage node is achieved through parallel data copying. The parallel capability of the storage cluster is utilized to control each storage node to execute data copying in parallel until completion.
Improves the execution efficiency of volume cloning, shortens the overall time consumption of volume cloning tasks, fully utilizes the hardware resources of the storage cluster, and optimizes overall efficiency.
Smart Images

Figure CN120560595B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data storage technology, and in particular to a method, device, electronic device and storage medium for cloning an unattached volume. Background Art
[0002] With the explosion of cloud computing and big data services, storage systems need to quickly generate complete copies of volumes (clone volumes) without interrupting services for use in scenarios such as backup, testing, and data distribution.
[0003] In related technologies, storage clusters often adopt an owned volume architecture, that is, each volume is fixedly owned by a storage node, and the storage node is used to perform read and write operations on the corresponding volume.
[0004] However, this method can only complete the volume cloning operation by the single node, resulting in waste of storage node resources and low efficiency of volume cloning processing, which needs to be solved urgently. Summary of the Invention
[0005] The present invention provides a method, device, electronic device, and storage medium for non-attributable volume cloning, which at least solves the problems of waste of storage node resources and low volume cloning processing efficiency caused by the single storage node processing volume cloning process in the prior art, and achieves the technical effect of improving the execution efficiency of volume cloning and shortening the overall time consumption of volume cloning tasks.
[0006] The present invention provides a method for cloning an unattached volume, characterized by comprising the following steps:
[0007] Dividing a preset unowned source volume into a plurality of first particles according to a preset volume particle size, wherein the preset unowned source volume is created based on a preset storage cluster;
[0008] Allocating the plurality of first particles to a plurality of storage nodes in the preset storage cluster to obtain a plurality of particle groups, wherein each particle group includes the same number of first particles;
[0009] A volume clone instruction is obtained, and based on the volume clone instruction, each storage node is controlled to execute a data copy operation on each particle group in parallel until each storage node generates a data copy task completion signal.
[0010] The present invention provides a device for cloning a non-owned volume, characterized by comprising:
[0011] a partitioning module, configured to partition a preset unowned source volume into a plurality of first granules according to a preset volume granularity, wherein the preset unowned source volume is created based on a preset storage cluster;
[0012] an allocating module, configured to allocate the plurality of first particles to a plurality of storage nodes in the preset storage cluster to obtain a plurality of particle groups, wherein each particle group includes the same number of first particles;
[0013] The control module is configured to obtain a volume cloning instruction and, based on the volume cloning instruction, control each storage node to execute a data copy operation on each particle group in parallel until each storage node generates a data copy task completion signal.
[0014] The present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above-mentioned methods for cloning a non-owned volume when executing the computer program.
[0015] The present invention also provides a non-volatile computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for cloning a non-owned volume are implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, which implements the steps of any of the above-mentioned methods for cloning unowned volumes when executed by a processor.
[0017] Through the present invention, a preset unattached source volume is divided into multiple particles according to a preset volume particle size, and the multiple particles are evenly distributed to each storage node in a preset storage cluster, resulting in multiple particle groups. A volume cloning instruction is obtained, and based on the volume cloning instruction, each storage node is controlled to execute the data copy action on each particle group in parallel until each storage node generates a data copy task completion signal. Therefore, by introducing the characteristics of unattached volumes, all storage nodes can be involved in the volume cloning process, solving the problem of single storage node processing of volume cloning in the prior art, resulting in wasted storage node resources and low volume cloning processing efficiency, achieving the technical effect of improving volume cloning execution efficiency and shortening the overall time consumption of volume cloning tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 A flowchart of a method for cloning a non-owned volume provided by an embodiment of the present invention;
[0020] Figure 2A flowchart of another method for cloning a non-owned volume provided by an embodiment of the present invention;
[0021] Figure 3 A block diagram of a device for cloning unattached volumes provided by an embodiment of the present invention;
[0022] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0024] It should be noted that, in the description of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. The terms "first," "second," etc., in the present invention are used to distinguish similar objects, and are not used to describe a particular order or precedence.
[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0026] An embodiment of the present invention provides a method for cloning a non-owned volume, and the method is described in detail in conjunction with the execution process of the order resolution error locating method.
[0027] Figure 1 The figure is a flowchart of a method for cloning a non-owned volume according to an embodiment of the present invention.
[0028] Before introducing the method for cloning a non-ownership volume proposed in an embodiment of the present invention, the relevant technical background is briefly introduced.
[0029] It's understood that a cloned volume is a persistent copy of the source volume at a specific point in time. That is, the data in the cloned volume is consistent with the data in the source volume at the time of cloning, but the cloned volume is not synchronized with the source volume in real time. The time required for cloning varies depending on the size of the source volume and the amount of data in it: larger source volumes and larger amounts of data in them will require longer cloning times, while smaller source volumes and smaller amounts of data in them will require shorter cloning times. The specific final cloning time depends on the state of the storage resources.
[0030] Volumes can be categorized as either owned or unowned. An owned volume is one that belongs to a node in the storage cluster. Only the owning node can read and write to the volume. All input / output (I / O) requests (i.e., service write requests) received by other nodes are forwarded to the owning node for processing. Therefore, when cloning an owned volume, the owning node copies the data from the source volume to the target volume. This is a single-node operation, and the maximum copy rate does not exceed the maximum performance provided by the node. Furthermore, in actual application scenarios for cloning owned volumes, I / O services on the source volume are typically suspended to ensure that the data in the source volume remains unchanged before the cloning operation is performed. After the target volume is cloned, I / O services on the source volume are resumed. While this approach ensures data consistency between the target and source volumes, it requires I / O services to be suspended, which can significantly impact customers.
[0031] Unowned volumes are a different type of volume from owned volumes. Unowned volumes are not owned by any node. They can be split into multiple granules through granularity, which are then distributed to all storage nodes in the storage cluster, enabling each storage node to read and write to the volume simultaneously.
[0032] In related technologies, volume cloning solutions all involve processing flows with attached volumes. Their execution efficiency is affected by the performance of the attached nodes and they are unable to utilize the parallel capabilities of the cluster, thus becoming a performance bottleneck.
[0033] It is precisely based on the above-mentioned problems that an embodiment of the present invention proposes a method for cloning unattached volumes. By introducing the characteristics of unattached volumes, the source volume and the target volume are split according to a pre-set particle size, and the split particles are distributed to different storage nodes, which perform input and output business processing. In this way, all storage nodes participate in the volume cloning process. At the same time, each storage node can also adaptively allocate hardware resources according to its own pressure conditions, so as to adjust the rate of volume cloning and optimize the overall efficiency. In this way, the hardware resources of each storage node in the storage cluster can be fully utilized, solving the problem of waste of storage node resources and low efficiency of volume cloning processing caused by the single storage node processing volume cloning process in the prior art, and achieving the technical effect of improving the execution efficiency of volume cloning and shortening the overall time of volume cloning tasks.
[0034] For example, Figure 1 As shown, the method for cloning a non-owned volume includes the following steps:
[0035] In step S101 , a preset unowned source volume is divided into a plurality of first granules according to a preset volume granule size, wherein the preset unowned source volume is created based on a preset storage cluster.
[0036] It's understood that the pre-configured storage cluster refers to a pre-configured distributed storage system consisting of multiple storage nodes. The pre-configured volume granule size refers to the minimum data unit size. For example, if a 1TB volume is split into a large number of granules, and each granule is 4 MB (i.e., the pre-configured volume granule size is 4 MB), then there are 262,144 granules.
[0037] Specifically, through management tools or an API (Application Programming Interface), an administrator or automated script can initiate a request to create a source volume to a pre-set storage cluster, specifying the source volume's name, total capacity, and access permissions. This creates and configures a non-owned source volume in the pre-set storage cluster as the pre-set non-owned source volume. The total capacity of the pre-set non-owned source volume is then divided into multiple first granules based on the pre-set volume granule size (e.g., 4MB, 8MB, etc.), each of which has a unique identifier.
[0038] In step S102 , a plurality of first particles are distributed to a plurality of storage nodes in a preset storage cluster to obtain a plurality of particle groups, wherein each particle group includes the same number of first particles.
[0039] Specifically, after obtaining multiple first particles, all first particles can be evenly distributed to all storage nodes in the preset storage cluster in a certain order (i.e., each particle group contains the same number of first particles), forming multiple particle groups (i.e., each particle group corresponds to a storage node). For example, assuming that the preset storage cluster includes 4 storage nodes and a total of 262,144 first particles, the number of first particles allocated to each storage node is: 262,144 ÷ 4 = 65,536, indicating that 4 particle groups are formed, each containing 65,536 first particles. In addition, a particle mapping table can be generated to record information such as the identifier of each first particle, the starting logical block address, and the identifier of the storage node responsible for the first particle. The particle mapping table is the core data structure of the unowned volume and is used for subsequent read and write operations and data distribution.
[0040] Next, how to allocate the plurality of first particles to the plurality of storage nodes in the preset storage cluster to obtain a plurality of particle groups will be described in detail.
[0041] As a possible implementation method, in some embodiments, multiple first particles are allocated to multiple storage nodes in a preset storage cluster to obtain multiple particle groups, and the method further includes: generating a first particle bitmap based on the multiple first particles, wherein each bit of the first particle bitmap corresponds to one first particle; based on the first particle bitmap, the multiple first particles are allocated to multiple storage nodes in the preset storage cluster to generate a business status bitmap, wherein each bit of the business status bitmap corresponds to one first particle, and an initial business status value of each bit of the business status bitmap is a first preset threshold; and obtaining multiple particle groups according to the business status bitmap.
[0042] Specifically, based on the particle size (i.e., the preset volume particle size), a bitmap can be used to record the allocation status of each particle. Since each first particle has a unique identifier, these identifiers can be stored in a first particle bitmap, with each bit in the first particle bitmap corresponding to a first particle. Using this first particle bitmap, it is possible to quickly determine whether each first particle has been assigned to a storage node. It is understood that each storage node can correspond to a local first particle bitmap, or all storage nodes can share a global first particle bitmap, which is not specifically limited here.
[0043] Then, using a consistent hashing algorithm (or other algorithms like weighted round-robin), all first granules are evenly distributed across all storage nodes in the pre-defined storage cluster. Each storage node can then search for the first granule it is responsible for based on the information in the first granule bitmap, thereby generating a business status bitmap. This business status bitmap records the write status of each first granule. Each bit in the business status bitmap corresponds to the state of a first granule, and the initial business status value of each bit in the business status bitmap is a first preset threshold (0, indicating that the granule has not written data). When a volume granule writes to that bit, the corresponding bitmap value changes to a second preset threshold (1, indicating that the granule has written data). Similarly, each storage node can have its own business status bitmap, or all storage nodes can share a single large business status bitmap; this is not specifically defined here. The set of granules that each storage node is responsible for is called a granule group, and multiple granule groups can be generated.
[0044] It should be noted that the status value of each bit in the business status bitmap can only be changed once, from the initial state (usually 0) to another state (1). Once a bit is set to 1, its state will not change back to 0 even if the content related to the bit is subsequently operated (for example, erased).
[0045] Therefore, by using a method based on a particle bitmap and a service status bitmap, particle allocation and data writing in the process of cloning unowned volumes can be efficiently managed, thereby improving the reliability and performance of the storage cluster.
[0046] In step S103 , a volume clone instruction is obtained, and based on the volume clone instruction, each storage node is controlled to execute a data copy operation on each particle group in parallel until each storage node generates a data copy task completion signal.
[0047] Specifically, when a volume clone operation is required, the user can issue a volume clone command to clone a pre-defined, unattached source. When the storage configuration node receives the volume clone command and begins preparing for the initial cloning phase, to ensure data consistency on the source volume, each storage node can suspend write operations on the source volume. All data written to the source volume is temporarily stored in the write cache (a temporary storage area used to temporarily store data before being written to disk) rather than being written directly to disk. This ensures that the source volume's data remains consistent during the cloning operation. Write operations refer to the process of persisting written data from memory (or cache) to disk. Under normal circumstances, written data is first temporarily stored in memory (or cache) and then written to disk periodically or on demand. Therefore, to prevent data modifications during the cloning process, which could lead to inconsistent data in the cloned target volume, direct writes to disk are suspended. Subsequently, based on the volume clone command, each storage node is controlled to perform data copy operations on its respective granule groups in parallel until each storage node successfully completes the data copy task and issues a completion signal, indicating the successful completion of the data copy task.
[0048] During the cloning process (i.e., the data copy process), the storage node can resume writing data to disk, and the data in the write cache can be gradually written to disk. This ensures that business operations are not completely blocked while the cloning operation is in progress, and the system can continue to process new write requests.
[0049] Therefore, without increasing hardware costs, we can make full use of existing hardware resources, combine the characteristics of unowned volumes, and use all storage nodes in the preset storage cluster to achieve cloning of unowned volumes, thereby improving the execution efficiency of volume cloning and shortening the overall time of volume cloning tasks.
[0050] For ease of understanding, the following describes in detail how to control each storage node to execute the data copy action on each particle group in parallel based on the volume clone instruction.
[0051] As a possible implementation method, in some embodiments, each storage node is controlled to perform data copy operations on each particle group in parallel based on the volume cloning instruction, including: creating a non-attributed target volume based on the volume cloning instruction; establishing a local copy mapping between a preset non-attributed source volume and a non-attributed target volume; and controlling each storage node to perform data copy operations on each particle group in parallel based on the local copy mapping.
[0052] In some embodiments, the logical capacity, attributes, and volume granularity of the unowned target volume are the same as those of the preset unowned source volume.
[0053] Specifically, after receiving a volume cloning instruction, the storage configuration node creates a target volume with the same logical capacity (the amount of data a storage volume can logically accommodate, typically expressed in bytes (e.g., GB, TB)) and attributes (parameters describing the storage volume's characteristics, such as access permissions, data protection level, performance characteristics (e.g., read / write speed), and storage type (e.g., SSD (Solid State Drive) or HDD (Hard Disk Drive))) as the pre-set unowned source volume. This target volume is also unowned, and its volume granule size is the same as the pre-set unowned source volume (i.e., the volume granule size of the unowned target volume is consistent with the pre-set volume granule size). A local replication mapping is then established between the pre-set unowned source volume and the unowned target volume. The mapping type is clone. The local replication mapping is a logical relationship that records the granule correspondence between the source and target volumes. Relying on the local replication mapping mechanism, each storage node can precisely control the execution of data copy operations for the granule group it is responsible for, ensuring that each granule of the pre-set unowned source volume is correctly copied to the corresponding granule of the unowned target volume.
[0054] Therefore, during the data copy process, each storage node executes the copy operation in parallel according to the range of the granule group it is responsible for. This parallel processing method can significantly shorten the completion time of the cloning operation, especially when processing large data sets. In addition, due to the existence of local copy mapping, the storage node can accurately locate the granule correspondence between the source volume and the target volume, thereby ensuring the integrity and consistency of the data copy.
[0055] Furthermore, in some embodiments, after creating the unattached target volume, it also includes: dividing the unattached target volume into multiple second particles according to a preset volume particle size, generating a second particle bitmap based on the multiple second particles, wherein each bit of the second particle bitmap corresponds to one second particle; based on the second particle bitmap, allocating the multiple second particles to multiple storage nodes in a preset storage cluster, generating a copy status bitmap, wherein each bit of the copy status bitmap corresponds to one second particle, and the copy status value of each bit of the copy status bitmap is the same as the business status value of the corresponding bit of the business status bitmap.
[0056] Specifically, after creating a non-attributed target volume, the non-attributed target volume can be divided into multiple second particles (whose volume particle size is the same as that of the preset non-attributed target volume). A second particle bitmap is created based on the volume particle size of the non-attributed target volume, and each bit in the second particle bitmap corresponds to a second particle. Similarly, a consistent hashing algorithm (or an algorithm such as weighted round-robin) can be used to evenly distribute the multiple second particles of the non-attributed target volume to all storage nodes in the preset storage cluster. Each storage node can search for the second particles it is responsible for based on the information in the second particle bitmap, compare it with the business status bitmap, and generate a copy status bitmap to record whether each second particle needs to be copied. If the value of a bit in the business status bitmap is 0, then the corresponding value of this bit in the copy status bitmap is also 0. If the value of a bit in the business status bitmap is 1, then the corresponding value of this bit in the copy status bitmap is also 1.
[0057] Similarly, each storage node may correspond to a local second-granularity bitmap, or all storage nodes may share a global second-granularity bitmap; each storage node may correspond to a copy status bitmap, or all storage nodes may share a large copy status bitmap, which is not specifically limited here.
[0058] Therefore, by accurately recording the copy status of each particle in the copy status bitmap, it is ensured that all particles that need to be copied are processed correctly, ensuring data consistency.
[0059] As a possible implementation method, in some embodiments, each storage node is controlled to perform a data copy action on each particle group in parallel, including: determining whether the current copy status value of each bit in the copy status bitmap is a second preset threshold; when the current copy status value of at least one bit in the copy status bitmap is the second preset threshold, switching the current copy status value to the copy status bit of the second preset threshold as the target status bit; and controlling the storage node corresponding to the target status bit to perform a data copy action on the target status bit in parallel.
[0060] That is, during the data copy process, each storage node will determine whether the bitmap value of the particle in the copy status bitmap for which it is responsible is 1 (the second preset threshold). In other words, each storage node will only perform the data copy operation from the preset unowned source volume to the unowned target volume for the particles whose value in the copy status bitmap is 1. After the particle copy is completed, the bitmap value of the corresponding bit in the copy status bitmap becomes 0. After completing the copy of each particle, the storage node will update the copy status bitmap and synchronize its latest copy status bitmap to the corresponding backup storage node. Then, it will perform the data copy operation on the next particle whose value in the latest copy status bitmap is 1.
[0061] This also demonstrates another function of the business status bitmap: when the source volume is not initially fully written, a value of 0 in the business status bitmap indicates that no data has been written to that particle, and the corresponding bit in the copy status bitmap is also set to 0. Therefore, when cloning, there is no need to copy particles with a copy status value of 0, thus reducing unnecessary copy operations and further improving cloning efficiency. However, if all bits in the business status bitmap are set to 1, to ensure data consistency, the volume cloning operation can perform a full clone operation on the pre-set unowned source volume. That is, all data in the source volume will be copied to the target volume, even if the data information in a particle in the source volume has been completely deleted.
[0062] In addition, during the cloning process, a cloning task process can be started synchronously, and the detailed progress information of the task is displayed in real time in the "Running" task management interface of the storage system, so that users can check the execution status and progress of the task at any time.
[0063] Therefore, by combining the business status bitmap and the copy status bitmap, efficient and consistent granular-level copy operations are achieved during the cloning process. This not only significantly improves cloning efficiency but also ensures data consistency.
[0064] Furthermore, in some embodiments, before dividing the preset unattached source volume into multiple particles according to the preset volume particle size, it also includes: creating multiple groups of mirror pairs based on multiple storage nodes in the preset storage cluster, wherein each group of mirror pairs includes a primary storage node and a backup storage node.
[0065] It is understood that, to ensure the continuity of the cloning process, embodiments of the present invention can utilize a mirror pair mechanism (a mirror pair is a method for accelerating information synchronization between nodes) to create a mirror pair for each storage node in the preset storage cluster. Each mirror pair includes a primary storage node that performs the main processing tasks and a corresponding backup storage node for data backup and redundancy protection. For example, taking a preset storage cluster with four storage nodes as an example, the four storage nodes are distributed in four mirror pairs, specifically: Mirror Pair 1 (Storage Node 1, Storage Node 3), Mirror Pair 2 (Storage Node 3, Storage Node 2), Mirror Pair 3 (Storage Node 2, Storage Node 4), and Mirror Pair 4 (Storage Node 4, Storage Node 1). In each mirror pair, the first node is the primary node, and the second node is the backup storage node for the primary node.
[0066] Therefore, during the cloning process, if a node fails, the system can quickly recover using the mirror pair mechanism to ensure the continuity of the cloning operation.
[0067] Optionally, in some embodiments, when controlling each storage node to perform a data copy action on each particle group in parallel, it also includes: determining whether each primary storage node has a preset fault; and when at least one primary storage node has a preset fault, controlling the backup storage node corresponding to the primary storage node with the preset fault to perform a data copy action.
[0068] Specifically, during the cloning process, the primary storage node can be monitored in real time to see if there are preset faults (such as network connection interruption between nodes, node failure to respond, etc.). When at least one primary storage node has a preset fault, its corresponding backup storage node can temporarily take over the particles that the primary storage node is responsible for, and continue to perform data copy operations and business writing needs. After the primary storage node with the preset fault returns to normal, the corresponding backup storage node will no longer take over particles that do not belong to it.
[0069] Therefore, through real-time monitoring and failover mechanisms, a rapid response can be made to the failure of the primary storage node, ensuring the continuity of cloning operations and data integrity. This mechanism not only improves the reliability of the storage system, but also significantly reduces the risk of data loss or cloning interruption caused by node failure.
[0070] Optionally, in some embodiments, when controlling the backup storage node corresponding to the main storage node with a preset fault to perform a data copy action, it also includes: judging whether the backup storage node corresponding to the main storage node with a preset fault has completed its own data copy task; if the backup storage node has completed its own data copy task, then controlling the backup storage node to perform the data copy action instead of the main storage node with the preset fault; otherwise, after controlling the backup storage node to complete its own data copy task, it performs the data copy action instead of the main storage node with the preset fault.
[0071] Specifically, when a preset fault occurs in the primary storage node and the corresponding backup storage node is required to take over the task, it is possible to first determine whether the corresponding backup storage node has completed its own data copy task. Before its own data copy task is fully completed, the backup storage node will not perform data copy operations on the particles originally assigned to the primary storage node with the preset fault.
[0072] If the backup storage node has completed all its own data copy tasks and the primary storage node with the preset fault has not yet recovered to normal, the backup storage node will start to perform data copy operations on the particles originally assigned to the primary storage node with the preset fault until the primary storage node with the preset fault recovers and can take over the particles it was originally responsible for.
[0073] This ensures that when a backup storage node takes over the primary storage node's tasks, data copying will not be delayed or incorrect due to its own unfinished tasks. This judgment and execution mechanism further improves the stability of the storage system and the security of the data.
[0074] Optionally, in some embodiments, when controlling each storage node to perform data copy operations on each particle group in parallel, it also includes: determining whether a business write demand for a preset non-attributed source volume is received; in the case of receiving a business write demand, determining the particle to be written based on the business write demand; based on the copy status bitmap, determining whether the copy status value of the particle to be written is a first preset threshold; in the case of the copy status value being the first preset threshold, performing the business write operation.
[0075] Specifically, during the cloning process (data copying process), if the preset non-attributed source volume has a new business write demand, the system can determine the specific particle to which the data is about to be written (i.e., the particle to be written) based on the business write demand, and then determine whether the bitmap value of the particle to be written is 0 (the first preset threshold) based on the copy status bitmap. If it is not 0, it means it is 1 (the second preset threshold), indicating that the data of the particle to be written has not been copied yet, and it is necessary to wait until the data copy task of the particle to be written is completed before executing the new business write operation.
[0076] That is to say, if the particle to be written has not been copied (the copy status bitmap is 1), the copy of the particle is completed first, and then a new business write operation is allowed. If the particle to be written has been copied (the copy status bitmap is 0), a new business write operation is directly allowed to ensure that the data of the unowned target volume is consistent with the preset unowned source volume.
[0077] Optionally, in some embodiments, when controlling each storage node to perform data copy operations on each particle group in parallel, it also includes: controlling each storage node to report the expected completion time of the data copy process of each particle group according to a preset period; based on the expected completion time of the data copy process of each particle group, the expected completion time of the target data copy process that meets the preset time condition is used as the total expected time of the overall data cloning task.
[0078] Specifically, each storage node can start a 5-minute (calibrated) timer. During this time, each storage node can monitor its current cache utilization and the execution rate of adaptive granule copy operations. Based on these data metrics, it calculates the expected completion time of the data copy process for the granule group it is responsible for. The system can control each storage node to report its data copy progress and expected completion time to the storage configuration node every 5 minutes (preset period). The expected completion time of the data copy process for a storage node is: (the number of remaining uncopied granules on the storage node × the granule size) / the currently configured granule copy execution rate for the storage node. For example, if the number of remaining uncopied granules is 100, the granule size is 4MB, and the currently configured granule copy execution rate is 100 MB / s, the expected completion time of the data copy process for the storage node is: (100 × 4MB) / 100MB / s = 4s.
[0079] Because each storage node periodically (e.g., every five minutes) monitors its own granular copy execution rate, it recalculates the expected completion time of its data copy process based on the currently detected granular copy execution rate and reports the new expected completion time to the storage configuration node. Upon receiving the expected completion times reported by all storage nodes, the storage configuration node selects the longest expected completion time (meeting the preset duration conditions) (the expected completion time of the target data copy process) as the total expected completion time for the entire data cloning task. (This total time is also dynamically updated; upon receiving a new report, the longest expected completion time is reselected and the overall expected completion time is updated.)
[0080] Furthermore, the storage configuration node displays the maximum expected completion time for each selection (i.e., the total estimated duration of the entire data cloning task) to the user or records it in the system log, allowing users to promptly understand the estimated completion time of the entire cloning task. This not only improves the transparency of cloning operations but also helps users better plan and monitor the progress of cloning tasks.
[0081] It should be noted that at the end of each 5-minute timer, each storage node can first determine whether the bitmap values in its corresponding copy status bitmap are all 0. If all are 0, the storage node can be determined to have completed the data copy task and send a data copy task completion signal to the storage configuration node. If the bitmap values in the copy status bitmap are not all 0 (including the case where data has been copied and then newly written), the current copy status bitmap can be synchronized with the corresponding backup storage node in the mirror pair, and then another 5-minute timer can be started to continue the data copy process. If a storage node has detected that there are no bits with a value of 1 in its copy status bitmap within 5 minutes, the data copy task can be determined to have been completed. The storage node then stops its corresponding 5-minute timer, sends a data copy task completion signal to the storage configuration node, and synchronizes its current copy status bitmap with the corresponding backup storage node in the mirror pair.
[0082] Furthermore, during the storage node's RAID (Redundant Array of Independent Disks) granule initialization process, the granule copy execution rate can be adjusted based on the storage node's current cache utilization. Specifically, when the storage node's cache utilization is low, the system can speed up the granule copy execution rate; when cache utilization is high, the granule copy execution rate can be slowed down. The adaptive relationship is shown in Table 1. This adaptive mechanism optimizes storage system performance and avoids system efficiency degradation caused by excessive cache usage.
[0083] Table 1
[0084]
[0085] To fully and efficiently utilize storage node hardware resources and further improve cloning efficiency, storage nodes adaptively adjust the granular copy execution rate at the start of each 5-minute timer. For example, if at a specific moment 1, the storage node's cache utilization is measured at 15%, the storage node can intelligently set the granular copy execution rate to 512 MBps. Then, after a 5-minute interval, due to new business write requests, the storage node's cache utilization increases significantly to 72%. The storage node responds quickly by reducing the granular copy execution rate to 8 MBps to accommodate the new load. After another 5 minutes, as all business write requests are completed, the storage node's cache utilization drops to 5%. To maximize hardware resource utilization, the storage node adjusts the granular copy execution rate again, this time to 1 GBps. If the storage node's cache utilization remains below 10% after another 5 minutes, the storage node maintains the granular copy execution rate at 1 GBps. Although the rate before and after the change appears to be consistent in this scenario, the system still issues the change instructions and performs the corresponding adjustments to ensure the rigor of the entire adjustment process and system stability. This dynamic adjustment mechanism not only optimizes resource utilization but also significantly improves the flexibility and efficiency of cloning operations.
[0086] Furthermore, in some embodiments, after each storage node generates a data copy task completion signal, it also includes: based on the data copy task completion signal, deleting the local copy mapping between the preset non-owned source volume and the non-owned target volume, and controlling each storage node to delete the copy status bitmap information.
[0087] Specifically, after each storage node generates a data copy task completion signal, it can report the data copy task completion signal to the storage configuration node. The storage configuration node can receive and record the information reported by all storage nodes that all assigned granules have been copied. Once each storage node has sent the data copy task completion signal to the storage configuration node, the storage configuration node can determine that the cloning task is complete. At this point, the storage configuration node deletes the local replication mapping between the pre-set unattached source volume and the pre-set unattached target volume. The pre-set unattached source volume and the pre-set unattached target volume then become independent. Next, it can send instructions to each storage node, instructing it to delete its stored copy status bitmap information to free up storage space and avoid redundant data. Finally, the storage configuration node can update the progress information of the cloning task to 100%, indicating the complete completion of the task. At this point, the task no longer appears in the "Running" task interface of the storage system, but is instead displayed in the "Completed" task interface, allowing users and administrators to clearly understand the task status and history.
[0088] If the primary storage node with a preset fault does not return to normal status for a long time, its corresponding backup storage node can take over the data copy task originally assigned to the primary storage node with the preset fault. After the backup storage node completes the copying of these particles, it can proactively send a data copy task completion signal to the storage configuration node. This signal is specially set with a clear mark bit, which is used to clearly indicate that the data copy task was completed by the backup storage node instead of the primary storage node with the preset fault. After receiving the data copy task completion signal containing the mark bit, the storage configuration node can determine that the data copy task of the primary storage node has been completed. After determining that all storage nodes have completed the data copy task, it further determines that the overall cloning task has been successfully completed. Similarly, the local copy mapping between the preset non-owned source volume and the non-owned target volume is deleted, and each storage node is required to delete its own saved copy status bitmap information. The progress information of this cloning task is updated to 100%. The task will no longer appear in the "Running" task interface of the storage system, but will be transferred to the "Completed" task interface for display.
[0089] Therefore, through the collaborative work of storage configuration nodes and storage nodes, the system can ensure the smooth completion of cloning tasks in various situations. In addition, it optimizes resource management and task display, and enhances system reliability and user experience.
[0090] For ease of understanding, the following Figure 2 Detailed description of the processing flow in different situations during the cloning process.
[0091] Case (1): When the clone instruction is issued, the preset unowned source volume has no business write requirements. In this case, the storage node can copy the particles with a value of 1 in its corresponding copy status bitmap from the source volume to the target volume. After each particle to be copied is copied, the storage node will change the value of the corresponding bit in the copy status bitmap from 1 to 0, and then synchronize its latest copy status bitmap with its corresponding backup node. Then, it will copy the data for the particles with a value of 1 in the new copy status bitmap.
[0092] Case (2): When the cloning instruction is issued or after the cloning operation begins, there is a business write request for the preset non-attributed source volume. In this case, after receiving the business write request, the storage node can check the copy status bitmap value of the corresponding particle based on the target space of the business write request. If the value is 0, the business write operation is performed directly; if the value is 1, the data copy operation is first performed on the corresponding particle in the preset non-attributed source volume. After the copy is completed, the business write operation is performed. After the business write operation is completed, if there is no subsequent business write request, the process will be transferred to case (1). If there is still a business write request or a new business write request arises after a period of time, the process will continue to case (2).
[0093] Case (3): Primary storage node failure. In this case, after the primary storage node fails, the corresponding backup storage node in its mirror pair can, at the start of the next 5-minute timer, aggregate the number of uncopied particles in its own node and the failed storage node (the primary storage node with the preset failure), calculate the new expected completion time, and prioritize copying the particles originally assigned to itself. After all particles are copied, it copies the uncopied particles assigned to the failed storage node and changes the copy status bitmap information.
[0094] Case (4): The failed storage node (the primary storage node with the preset fault) recovers. In this case, the failed storage node can synchronize the data information of the preset storage cluster with the corresponding backup storage node in the mirror pair, obtain the copy status bitmap information allocated to itself (the restored primary storage node) saved on the backup storage node, and compare it with the copy status bitmap information saved before its own failure. If the copy status bitmap information obtained from the backup storage node is the same as the copy status bitmap information saved before its own failure, and the values in the copy status bitmap are not all 0, then the failed storage node determines that the backup storage node did not copy the particles allocated to the failed storage node during its failure. The failed storage node locates the first particle with a bit value of 1 based on the copy status bitmap information saved before its own failure, and continues to perform subsequent data copy operations. The backup storage node of the failed storage node will no longer count the number of particles allocated to the failed storage node when the next 5-minute timer starts to calculate the expected completion time. After the backup storage node completes the copy operation of the particles allocated to itself, it will not copy the data of the particles allocated to the failed storage node. If the backup storage node has already copied the data of the particles allocated to the failed storage node when the failed storage node recovers, then the failed storage node will be restored. When a storage node obtains the copy status bitmap information assigned to itself from the backup storage node, the backup storage node stops the data copying operation after copying the current particle and sends the latest copy status bitmap information to the faulty storage node. After receiving it, the faulty storage node compares it with the copy status bitmap information saved before the failure. If a difference is found in the value, it uses the received new copy status bitmap information to refresh the copy status bitmap information value saved before the failure, and then locates the first particle with a bit value of 1 according to the latest copy status bitmap, and continues the subsequent data copy operation; if the faulty storage node recovers, its backup storage node has completed the data copying operation assigned to the faulty storage node, that is, the cloning task has been completed, then the faulty storage node no longer obtains the latest copy status bitmap information from the backup storage node, but directly deletes the copy status bitmap information saved before the failure.
[0095] Case (5): Deleting the unattached target volume during the cloning process. In this case, after the storage configuration node receives the deletion instruction for the unattached target volume, it will prompt "The current cloning task is still in progress, do you confirm the deletion?" and provide two options: "Confirm Delete" and "Cancel". If "Confirm Delete" is selected, the storage configuration node can notify each storage node to stop the current data copy action, the storage configuration node stops and deletes the preset local copy mapping of the unattached source volume and the unattached target volume, the storage configuration node notifies each storage node to delete the 5-minute timer, deletes the copy status bitmap, deletes the cloning task progress information in the "Running" task interface, and deletes the unattached target volume; if "Cancel" is selected, the storage configuration node will not issue subsequent deletion actions, and the cloning action will continue normally.
[0096] Case (6): Deleting the preset unattached source volume during the cloning process. In this case, after receiving the deletion instruction for the preset unattached source volume, the storage configuration node will prompt "The current preset unattached source volume has a local replication mapping. Do you confirm the deletion?" and provide three options: "Delete only the preset unattached source volume", "Delete the preset unattached source volume and unattached target volume", and "Cancel". If you select "Delete only the pre-set orphan source volume," the storage configuration node notifies each storage node to stop the current data copy operation, stop and delete the local replication mapping between the pre-set orphan source volume and the target volume, and notifies each storage node to delete the 5-minute timer and the copy status bitmap. The storage configuration node also deletes the cloning task progress information in the "Running" task interface and forcibly deletes the pre-set orphan source volume, even if the pre-set orphan source volume has been mapped to a host. If you select "Delete both the pre-set orphan source volume and the target volume," the storage configuration node notifies each storage node to stop the current data copy operation, stop and delete the local replication mapping between the pre-set orphan source volume and the target volume, and notifies each storage node to delete the 5-minute timer and the copy status bitmap. The storage configuration node also deletes the cloning task progress information in the "Running" task interface and forcibly deletes the pre-set orphan source volume and the target volume, even if the pre-set orphan source volume has been mapped to a host. If you select "Cancel," the storage configuration node does not issue subsequent deletion actions, and the cloning operation continues normally.
[0097] According to the method for cloning unattached volumes proposed in an embodiment of the present invention, a preset unattached source volume is divided into multiple particles according to a preset volume particle size, and the multiple particles are evenly distributed to each storage node in a preset storage cluster to obtain multiple particle groups; a volume cloning instruction is obtained, and based on the volume cloning instruction, each storage node is controlled to perform data copy operations on each particle group in parallel until each storage node generates a data copy task completion signal. Therefore, by introducing the characteristics of unattached volumes, all storage nodes can be involved in the volume cloning process, solving the problem of single storage node processing of volume cloning in the prior art, resulting in waste of storage node resources and low volume cloning processing efficiency, and achieving the technical effect of improving volume cloning execution efficiency and shortening the overall time consumption of volume cloning tasks.
[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that the system according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0099] An embodiment of the present invention also provides a device for cloning a non-ownership volume.
[0100] Figure 3 The figure is a block diagram of an apparatus for cloning a non-owned volume according to an embodiment of the present invention.
[0101] like Figure 3 As shown, the device 10 for cloning an unattached volume includes: a partitioning module 100 , an allocation module 200 and a control module 300 .
[0102] The partitioning module 100 is configured to partition a preset unowned source volume into a plurality of first granules according to a preset volume granularity, wherein the preset unowned source volume is created based on a preset storage cluster;
[0103] an allocating module 200 for allocating the plurality of first particles to a plurality of storage nodes in a preset storage cluster to obtain a plurality of particle groups, wherein each particle group includes the same number of first particles;
[0104] The control module 300 is configured to obtain a volume cloning instruction and, based on the volume cloning instruction, control each storage node to execute a data copy operation on each particle group in parallel until each storage node generates a data copy task completion signal.
[0105] Optionally, in some embodiments, the allocation module 200 is specifically configured to:
[0106] generating a first particle bitmap based on the plurality of first particles, wherein each bit in the first particle bitmap corresponds to one particle;
[0107] Based on the first particle bitmap, the plurality of first particles are allocated to a plurality of storage nodes in a preset storage cluster to generate a business status bitmap, wherein each bit in the business status bitmap corresponds to a first particle, and an initial business status value of each bit in the business status bitmap is a first preset threshold;
[0108] According to the service status bitmap, multiple particle groups are obtained.
[0109] Optionally, in some embodiments, the control module 300 includes:
[0110] A creation unit, configured to create a non-owned target volume based on a volume cloning instruction;
[0111] An establishing unit, configured to establish a local replication mapping between a preset non-owned source volume and a non-owned target volume;
[0112] The control unit is configured to control each storage node to execute a data copy operation on each particle group in parallel based on the local replication map.
[0113] Optionally, in some embodiments, after creating the unowned target volume, the creation unit is further configured to:
[0114] Divide the unowned target volume into a plurality of second granules according to a preset volume granule size, and generate a second granule bitmap based on the plurality of second granules, wherein each bit in the second granule bitmap corresponds to one second granule;
[0115] Based on the second particle bitmap, multiple second particles are allocated to multiple storage nodes in a preset storage cluster to generate a copy status bitmap, wherein each bit of the copy status bitmap corresponds to a second particle, and the copy status value of each bit of the copy status bitmap is the same as the business status value of the corresponding bit of the business status bitmap.
[0116] Optionally, in some embodiments, the control unit is specifically configured to:
[0117] Determining whether the current copy status value of each bit in the copy status bitmap is a second preset threshold;
[0118] When the current copy status value of at least one bit in the copy status bitmap is a second preset threshold, switching the current copy status value to the copy status bit of the second preset threshold as the target status bit;
[0119] The storage node corresponding to the target status bit is controlled to execute a data copy action on the target status bit in parallel.
[0120] Optionally, in some embodiments, before dividing the preset unowned source volume into a plurality of granules according to a preset volume granularity, the allocation module 200 is further configured to:
[0121] Based on multiple storage nodes in a preset storage cluster, multiple mirror pairs are created, wherein each mirror pair includes a primary storage node and a backup storage node.
[0122] Optionally, in some embodiments, when controlling each storage node to perform the data copy operation on each particle group in parallel, the control unit further includes:
[0123] A judgment subunit, used to judge whether each main storage node has a preset fault;
[0124] The control subunit is used to control the backup storage node corresponding to the primary storage node with the preset fault to perform a data copy action when at least one primary storage node has a preset fault.
[0125] Optionally, in some embodiments, when controlling the backup storage node corresponding to the primary storage node with a preset fault to perform a data copy operation, the control subunit is further configured to:
[0126] Determine whether the backup storage node corresponding to the primary storage node with the preset fault has completed its own data copy task;
[0127] If the backup storage node completes its own data copy task, the backup storage node is controlled to perform the data copy action instead of the primary storage node with the preset fault. Otherwise, after the backup storage node is controlled to complete its own data copy task, it performs the data copy action instead of the primary storage node with the preset fault.
[0128] Optionally, in some embodiments, when controlling each storage node to perform a data copy operation on each particle group in parallel, the control unit is further configured to:
[0129] Determine whether a service write request for a preset unowned source volume is received;
[0130] When receiving a business write request, determine the granules to be written based on the business write request;
[0131] Based on the copy status bitmap, determining whether the copy status value of the particle to be written is a first preset threshold;
[0132] When the copy status value is equal to the first preset threshold, a service write operation is performed.
[0133] Optionally, in some embodiments, when controlling each storage node to perform a data copy operation on each particle group in parallel, the control unit is further configured to:
[0134] Control each storage node to report the expected completion time of the data copy process for each granule group according to the preset period;
[0135] Based on the expected completion time of the data copy process of each granule group, the expected completion time of the target data copy process that meets the preset time condition is used as the total expected time of the entire data cloning task.
[0136] Optionally, in some embodiments, after each storage node generates a data copy task completion signal, the control module 300 is further configured to:
[0137] Based on the data copy task completion signal, the local copy mapping between the preset non-owned source volume and the non-owned target volume is deleted, and each storage node is controlled to delete the copy status bitmap information.
[0138] Optionally, in some embodiments, the logical capacity, attributes, and volume granularity of the unowned target volume are the same as those of the preset unowned source volume.
[0139] According to an embodiment of the present invention, the device for cloning unattached volumes is proposed. This device divides a preset unattached source volume into multiple particles according to a preset volume particle size, and evenly distributes the multiple particles to each storage node in a preset storage cluster to obtain multiple particle groups. The device then obtains a volume cloning instruction and, based on the volume cloning instruction, controls each storage node to execute data copy operations on each particle group in parallel until each storage node generates a data copy task completion signal. Thus, by introducing the characteristics of unattached volumes, all storage nodes can be involved in the volume cloning process, solving the problem of a single storage node handling the volume cloning process in the prior art, resulting in wasted storage node resources and low volume cloning processing efficiency. This achieves the technical effect of improving volume cloning execution efficiency and shortening the overall time consumption of volume cloning tasks.
[0140] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device may include:
[0141] Memory 401 , processor 402 , and computer programs stored in the memory 401 and executable on the processor 402 .
[0142] When the processor 402 executes the program, the steps in any of the above-mentioned methods for cloning non-owned volumes are implemented.
[0143] Furthermore, the electronic device further includes:
[0144] The communication interface 403 is used for communication between the memory 401 and the processor 402 .
[0145] The memory 401 is used to store computer programs that can be run on the processor 402 .
[0146] The memory 401 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.
[0147] If the memory 401, processor 402, and communication interface 403 are implemented independently, the communication interface 403, memory 401, and processor 402 can be connected to each other via a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0148] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.
[0149] The processor 402 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0150] An embodiment of the present invention further provides a non-volatile computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned non-ownership volume cloning method embodiments when running.
[0151] In an exemplary embodiment, the non-volatile computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory, a mobile hard disk, a magnetic disk, or an optical disk.
[0152] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for cloning non-homed volumes are implemented.
[0153] An embodiment of the present invention further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods for cloning a non-owned volume are implemented.
[0154] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0155] The above describes in detail the method for cloning a non-attributed volume provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above examples is only intended to help understand the method and core concept of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from the principles of the present invention, and such improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for cloning a non-owned volume, characterized in that: The following steps are involved: Dividing a preset unowned source volume into a plurality of first particles according to a preset volume particle size, wherein the preset unowned source volume is created based on a preset storage cluster; Allocating the plurality of first particles to a plurality of storage nodes in the preset storage cluster to obtain a plurality of particle groups, wherein each particle group includes the same number of first particles; Obtaining a volume cloning instruction, and controlling each storage node to execute a data copy operation on each particle group in parallel based on the volume cloning instruction, until each storage node generates a data copy task completion signal; The controlling each storage node to execute the data copy action on each particle group in parallel includes: dividing the unowned target volume into a plurality of second particles according to a preset volume particle size, generating a second particle bitmap based on the plurality of second particles, wherein each bit of the second particle bitmap corresponds to a second particle, allocating the plurality of second particles to the plurality of storage nodes in the preset storage cluster based on the second particle bitmap, and generating a copy status bitmap, wherein each bit of the copy status bitmap corresponds to a second particle, and a copy status value of each bit of the copy status bitmap is the same as a business status value of a corresponding bit of a business status bitmap; Determine whether the current copy status value of each bit of the copy status bitmap is a second preset threshold value, wherein the current copy status value being the second preset threshold value indicates that data has been written to the corresponding bit of the copy status bitmap. In the case that the current copy status value of at least one bit of the copy status bitmap is the second preset threshold value, switch the current copy status value to the copy status bit of the second preset threshold value as the target status bit, and control the storage node corresponding to the target status bit to execute the data copy action on the target status bit in parallel.
2. The method for cloning a non-owned volume according to claim 1, characterized in that: The allocating the plurality of first particles to a plurality of storage nodes in the preset storage cluster to obtain a plurality of particle groups further includes: generating a first particle bitmap based on the plurality of first particles, wherein each bit in the first particle bitmap corresponds to one first particle; Based on the first granule bitmap, a plurality of the first granules are allocated to a plurality of the storage nodes in the preset storage cluster to generate a business status bitmap, wherein each bit of the business status bitmap corresponds to a first granule, and an initial business status value of each bit of the business status bitmap is a first preset threshold value, wherein the initial business status value according to the first preset threshold value indicates that no data is written to the corresponding bit of the business status bitmap; A plurality of particle groups are obtained according to the service status bitmap.
3. The method for cloning a non-owned volume according to claim 2, characterized in that: The controlling each storage node to execute the data copy operation on each particle group in parallel based on the volume clone instruction includes: Creating the unowned target volume based on the volume cloning instruction; Establishing a local replication mapping between the preset unattached source volume and the unattached target volume; Based on the local replication map, each storage node is controlled to execute the data copy operation on each particle group in parallel.
4. The method for cloning a non-owned volume according to claim 1, characterized in that: Before dividing the preset unowned source volume into a plurality of first particles according to the preset volume particle size, the method further includes: Based on the plurality of storage nodes in the preset storage cluster, a plurality of mirror pairs are created, wherein each mirror pair includes a primary storage node and a backup storage node.
5. The method for cloning a non-owned volume according to claim 4, characterized in that: When controlling each storage node to execute the data copy operation on each particle group in parallel, the method further includes: Determining whether each of the primary storage nodes has a preset fault; In the case that the preset fault occurs in at least one of the primary storage nodes, the backup storage node corresponding to the primary storage node having the preset fault is controlled to perform the data copy operation.
6. The method for cloning a non-owned volume according to claim 5, characterized in that: When controlling the backup storage node corresponding to the primary storage node having the preset fault to perform the data copy action, the method further includes: Determine whether the backup storage node corresponding to the primary storage node with the preset fault has completed its own data copy task; If the backup storage node completes its own data copy task, the backup storage node is controlled to perform the data copy action instead of the primary storage node with the preset fault; otherwise, after the backup storage node is controlled to complete its own data copy task, it performs the data copy action instead of the primary storage node with the preset fault.
7. The method for cloning a non-owned volume according to claim 3, characterized in that: When controlling each storage node to execute the data copy operation on each particle group in parallel, the method further includes: Determining whether a service write request for the preset unowned source volume is received; When receiving the service write demand, determining a granule to be written based on the service write demand; Based on the copy status bitmap, determining whether the copy status value of the to-be-written particle is the first preset threshold; When the copy status value is the first preset threshold, a service write operation is performed.
8. The method for cloning a non-owned volume according to claim 3, characterized in that: When controlling each storage node to execute the data copy operation on each particle group in parallel, the method further includes: Controlling each of the storage nodes to report the expected completion time of the data copy process of each of the particle groups according to a preset period; Based on the expected completion time of the data copy process of each granule group, the expected completion time of the target data copy process that meets the preset time condition is used as the total expected time of the entire data cloning task.
9. The method for cloning a non-owned volume according to claim 3, characterized in that: After each of the storage nodes generates the data copy task completion signal, the method further includes: Based on the data copy task completion signal, the local copy mapping between the preset non-owned source volume and the non-owned target volume is deleted, and each storage node is controlled to delete copy status bitmap information.
10. The method for cloning a non-owned volume according to claim 3, characterized in that: The logical capacity, attributes and volume granularity of the unowned target volume are the same as those of the preset unowned source volume.
11. An electronic device, characterized in that: include: memory for storing computer programs; A processor is configured to implement the steps of the method for cloning a non-ownership volume according to any one of claims 1 to 10 when executing the computer program.
12. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: The non-volatile computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for cloning a non-ownership volume are implemented as claimed in any one of claims 1 to 10.
13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for cloning a non-ownership volume as claimed in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
A background copy method and device
CN106406763A
Read-write request processing method, electronic equipment, readable storage medium and product
CN118860297A