Data acquisition method and device for a cloned volume

By transmitting data indexes instead of actual data in the storage system, the network bandwidth problem when acquiring clone volume data is solved, efficient data acquisition and accuracy are achieved, and the network load is reduced.

CN114860161BActive Publication Date: 2025-10-10HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210397209.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2025-10-10
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

In a storage system, when the clone volume and the clone source volume are located on different storage nodes, the data copy process requires two network transmissions, which increases the network bandwidth load and affects service performance.

Method used

After receiving a data acquisition request in the storage system, the data source index is obtained and transmitted instead of the actual data, thereby reducing the network transmission load between nodes and performing read protection when necessary to ensure data accuracy.

Benefits of technology

During the clone volume data acquisition process, network bandwidth resources between nodes are saved, additional network transmission load is avoided, and the accuracy and efficiency of data acquisition are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860161B_ABST
    Figure CN114860161B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a data acquisition method and device for a cloned volume, relates to the technical field of data processing, and can save bandwidth resources occupied by data transmission during data acquisition of the cloned volume. The method is applied to a first storage node of a storage system, the first storage node stores a cloned source volume of a cloned volume, the storage system further includes a second storage node, the second storage node stores the cloned volume, and the method specifically comprises the following steps: receiving a data acquisition request sent by the second storage node, the data acquisition request being used for requesting source data of a first data block in the cloned volume; performing data read protection on a data source according to the data acquisition request, and acquiring a source data index of the first data block, the source data index being used for searching the source data of the first data block; and sending the source data index to the second storage node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and device for acquiring data of a clone volume. Background Art

[0002] A clone volume is a new volume created by duplicating a clone source volume. It typically refers to a complete copy of a snapshot volume of the clone source volume. After the copy is complete, users can create a new branch on the clone volume for read and write access. A snapshot volume of a clone source volume refers to the volume created by taking a snapshot of the clone source volume. Typically, taking a snapshot of a clone source volume does not copy the source data of the clone source volume, so the clone volume does not contain the source data. When users access the source data of the clone volume, they must copy the source data from the clone source volume to the clone volume.

[0003] In a storage system, if the data of the storage system is uniformly stored in the back-end storage module, when the source data of the clone source volume is copied to the clone volume, the storage node where the clone source volume is located (referring to a storage device or a storage module of the storage system) needs to first obtain all the data from the back-end storage module, and then transmit the obtained data to the storage node where the clone volume is located. That is, two data transmissions are required, which will generate additional network bandwidth load, thereby causing the business performance of the storage system to deteriorate. Summary of the Invention

[0004] The present application provides a method and device for acquiring data of a clone volume, which can save bandwidth resources occupied by data transmission when acquiring data of the clone volume.

[0005] To achieve the above technical objectives, this application adopts the following technical solutions:

[0006] In a first aspect, the present application provides a data acquisition method for a clone volume, which is applied to a first storage node of a storage system, where the first storage node stores a clone source volume of the clone volume. The storage system also includes a second storage node, where the second storage node stores the clone volume. The method specifically includes: receiving a data acquisition request sent by the second storage node, where the data acquisition request is used to request source data of a first data block in the clone volume; performing data read protection on the data source according to the data acquisition request, and obtaining a source data index of the first data block, where the source data index is used to search for the source data of the first data block; and sending the source data index to the second storage node.

[0007] The data acquisition method for clone volumes provided in the present application can produce at least the following beneficial effects: during the data acquisition process for clone volumes, only the data source index is transmitted between the first storage node and the second storage node, and no additional network transmission load is generated, thereby saving bandwidth resources occupied by data transmission between nodes.

[0008] In a possible implementation, the method further includes: receiving a read protection instruction sent by the second storage node; and performing read protection on the source data of the first data block according to the received read protection instruction.

[0009] The above implementation method can read-protect the source data of the first data block before acquiring data, so as to ensure that the source data of the first data block cannot be modified during the process of cloning volume acquiring data, thereby ensuring the accuracy of cloning volume source data acquisition.

[0010] In another possible implementation, the above-mentioned obtaining of the source data index of the first data block specifically includes: searching for a first snapshot block in the snapshot volume of the clone source volume according to the received data acquisition request, the first snapshot block being a data block referenced by the first data block; and determining a first index mapped to the first snapshot block as the source data index, wherein the storage space indicated by the first index is used to store the source data of the first snapshot block.

[0011] In another possible implementation, the above-mentioned obtaining of the source data index of the first data block specifically includes: searching for a first snapshot block in the snapshot volume of the clone source volume according to the received data acquisition request, the first snapshot block being a data block referenced by the first data block; searching for a first clone source block in the clone source volume according to the found first snapshot block, the first clone source block being a data block referenced by the first snapshot block; and determining a second index mapped to the first clone source block as the source data index, wherein the storage space indicated by the second index is used to store the source data of the first clone source block.

[0012] In yet another possible implementation, the method further includes: receiving a read protection release instruction sent by the second storage node; and releasing the read protection of the source data according to the read protection release instruction.

[0013] In the second aspect, the present application provides a data acquisition method for a clone volume, which is applied to a second storage node of a storage system, the second storage node stores a clone volume, the storage system also includes a first storage node, and the clone source volume of the clone volume is stored in the first storage node. The method includes: sending a data acquisition request to the first storage node, the data acquisition request is used to request the source data of the first data block in the clone volume; receiving a source data index sent by the first storage node, the source data index is used to search for the source data of the first data block; and acquiring the source data according to the received source data index.

[0014] In a possible implementation, after sending the data acquisition request to the first storage node, the method further includes: sending a read protection instruction to the first storage node, where the read protection instruction is used to instruct the first storage node to perform read protection on the source data of the first data block.

[0015] In another possible implementation, after obtaining the source data, the method further includes: sending a read protection release instruction to the first storage node, where the read protection release instruction is used to instruct the first storage node to release data read protection of the data source.

[0016] In yet another possible implementation, before sending the data acquisition request to the first storage node, the method further includes: determining the first storage node, where the first storage node is used to store the clone source volume of the clone volume.

[0017] In another possible implementation, the determining the first storage node includes determining the first storage node according to the clone volume and first corresponding information, where the first corresponding information includes a correspondence between the clone volume and the first storage node for storing the clone source volume.

[0018] In another possible implementation, the above-mentioned storage system also includes a management node, and the method also includes: receiving a first broadcast message sent by the management node, the first broadcast message being used to broadcast the migration of the clone source volume from the first storage node to the third storage node; and updating the first storage node corresponding to the clone volume in the first corresponding information to the third storage node according to the first broadcast message.

[0019] Based on the above optional implementation, whenever the clone source volume in the storage node is migrated, the management node can actively initiate a broadcast and promptly instruct each storage node to update the corresponding information, so that when obtaining the data of the clone volume, the storage node can obtain accurate corresponding information.

[0020] In another possible implementation, the storage system further includes a management node, and the method further includes: sending an update request to the management node, where the update request is used to request migration information of the clone source volume; receiving a response result of the update request returned by the management node, and updating the first corresponding information based on the response result.

[0021] Based on the above optional implementation method, the correspondence between the clone volume and the storage node where the clone source volume is located can be updated in time, so that when obtaining the data of the clone volume, the storage node can quickly determine the storage node where the clone source volume is located based on the correspondence, thereby improving the data acquisition speed of the clone volume.

[0022] In a third aspect, the present application provides a data acquisition device for a clone volume, comprising modules for executing the method described in the first aspect or any optional implementation of the first aspect.

[0023] In a fourth aspect, the present application provides a data acquisition device for a clone volume. The data acquisition device for a clone volume includes various modules for executing the method described in the second aspect or any optional implementation of the second aspect.

[0024] In a fifth aspect, the present application provides a data acquisition device for a clone volume, comprising: one or more processors; one or more memories; wherein the one or more memories are used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method provided in the first aspect above, or the method provided in the second aspect above.

[0025] In a sixth aspect, the present application provides a chip system, which is applied to an electronic device; the chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via wiring; the interface circuits are configured to receive signals from the electronic device's memory and send signals to the processors, the signals including computer instructions stored in the memory. When the processors execute the computer instructions, the electronic device executes the method provided in the first aspect or the method provided in the second aspect.

[0026] In the seventh aspect, the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method provided in the first aspect above, or the method provided in the second aspect above.

[0027] In an eighth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the method provided in the first aspect above, or the method provided in the second aspect above.

[0028] For the specific description of the third to eighth aspects and their various implementations in this application, reference can be made to the detailed description in the first or second aspect and their various implementations; and for the beneficial effects of the third to eighth aspects and their various implementations, reference can be made to the analysis of the beneficial effects in the first or second aspect and their various implementations, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of a distributed block storage system provided in an embodiment of the present application;

[0030] Figure 2 A schematic diagram of an application scenario of a method for obtaining data from a clone volume provided in an embodiment of the present application;

[0031] Figure 3 A flowchart of a method for obtaining data from a clone volume provided in an embodiment of the present application;

[0032] Figure 4A schematic diagram of a backend storage module 10 provided in an embodiment of the present application;

[0033] Figure 5 A schematic diagram of another backend storage module 10 provided in an embodiment of the present application;

[0034] Figure 6 A flowchart of another method for obtaining data from a clone volume provided in an embodiment of the present application;

[0035] Figure 7 A flowchart of another method for obtaining data from a clone volume provided in an embodiment of the present application;

[0036] Figure 8 A flowchart of another method for obtaining data from a clone volume provided in an embodiment of the present application;

[0037] Figure 9 A flowchart of another method for obtaining data from a clone volume provided in an embodiment of the present application;

[0038] Figure 10 A flowchart of another method for obtaining data from a clone volume provided in an embodiment of the present application;

[0039] Figure 11 A logical flow chart of a method for obtaining data from a clone volume provided in an embodiment of the present application;

[0040] Figure 12 A schematic diagram of the structure of a data acquisition device for a clone volume provided in an embodiment of the present application;

[0041] Figure 13 A schematic diagram of the structure of another device for acquiring data of a clone volume provided in an embodiment of the present application;

[0042] Figure 14 A schematic diagram of the composition of a data acquisition device for a clone volume provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0044] In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" herein is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more. "First", "second", and the like do not limit the quantity and execution order, and "first", "second", and the like do not necessarily mean different.

[0045] It should be noted that in the present application, "exemplary" or "for example" is used to mean an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.

[0046] Here, the related technical terms involved in the present application are first explained.

[0047] Volume: also known as logical volume, is a virtual disk formed by logical disk, which can also be called disk partition. Dividing logical volume is a disk management method, the purpose of which is to jump out of the management of physical hard disk and perform more convenient unified management and allocation.

[0048] Snapshot: refers to an image of a specific moment of a specified data set (for example, the time point when cloning starts). It should be noted that the snapshot is a record of the state of the data set at a certain time.

[0049] Cloned volume: refers to a new volume obtained by copying a logical volume, and the copied new volume is the cloned volume of the logical volume.

[0050] Cloned source volume: in the process of data cloning, the logical volume to be copied is called the cloned source volume.

[0051] Snapshot volume: a logical volume generated by creating a snapshot of the cloned source volume. The cloned volume is generally copied based on a snapshot volume of the cloned source volume. Generally, when a snapshot volume is created, the snapshot volume can include a link to the source data of the cloned source volume, so that the snapshot volume can serve as a channel to access the source data of the cloned source volume. Generally, the snapshot volume does not copy the source data of the cloned source volume. When a snapshot volume 1 is created for a cloned source volume, the source data corresponding to the snapshot volume 1 is the source data before the write operation of the cloned source volume occurs.

[0052] Chain clone: A clone volume created in a cloning process does not store data by itself, but references data of a clone source volume by establishing a link to a snapshot volume of the clone source volume.

[0053] Chunk: Refers to the smallest unit of data storage in a logical volume. A logical volume can include one or more chunks. In the same storage system, the size of data in a chunk is fixed, and the size of data in each chunk is the same.

[0054] Read lock of a chunk: Refers to a read protection of data in a chunk, so that the data in the chunk can be read but cannot be written. Read locks can be repeatedly added. For a chunk with at least one read lock added, data can be written to the chunk only after all read locks added to the chunk are released.

[0055] Migration of a volume: The process of transferring a volume with allocated storage space from one storage node to another storage node due to storage node failure or other reasons is called migration.

[0056] The above is an introduction to the technical terms involved in the present application, which will not be described again below.

[0057] As described in the background, if a clone volume and a clone source volume of the clone volume are located on two different storage nodes respectively, when accessing data of the clone volume, data in the clone source volume needs to be copied to the clone volume, which requires two times of data transmission, thus generating extra network load and causing great waste of network bandwidth resources, thereby affecting data transmission of other services of the storage system.

[0058] In order to avoid extra network transmission, one solution in the prior art is to place the clone volume and the clone source volume on the same node. However, when a large number of clone volumes reference the same source volume, the node where the source volume is located will concentrate a large number of volumes, resulting in unbalanced load.

[0059] Based on this, an embodiment of the present application provides a data acquisition method of a clone volume. The method is applied to a first storage node of a storage system. The first storage node stores a clone source volume of a clone volume. The storage system further includes a second storage node storing the clone volume. The method specifically includes: receiving a data acquisition request sent by the second storage node, the data acquisition request being used to request source data of a first chunk in the clone volume; performing data read protection on a data source according to the data acquisition request, and acquiring a source data index of the first chunk, the source data index being used to find the source data of the first chunk; and sending the source data index to the second storage node. In this way, bandwidth resources occupied by data transmission during data acquisition of the clone volume can be reduced, so that other services of the system can be normally performed.

[0060] The present application also provides a storage system. Figure 1 As shown in FIG, a schematic diagram of the structure of a storage system (also referred to as a cluster) 100 is shown. The storage system 100 is used to provide data storage services to users. Optionally, the storage system 100 can be a distributed storage system or cluster including multiple storage nodes, a block storage system including multiple block storage service nodes, or a cloud storage system including multiple clients (such as cloud computing nodes). Figure 1 As shown, the storage system 100 includes a backend storage module 10, at least one storage node, and a management node 30. In the storage system 100, the backend storage module 10 is the module or device actually used to store data. The storage node can access the backend storage module 10.

[0061] The back-end storage module 10 is used to provide persistent storage of data, and the data in the back-end storage module 10 can be queried, read and written. Exemplarily, the back-end storage module 10 can be a storage pool aggregated from one or more storage spaces (such as disks or hard disks), which is used to store data. For example, the back-end storage module 10 may include at least one memory, for example, the memory may include a new type of non-volatile memory (NVM) with byte-addressable and accessible capabilities such as phase change memory (PCM), resistive random access memory (ReRAM), and magnetic random access memory (MRAM). Other memories may also be included. Optionally, the back-end storage module 10 may include a removable storage device or a non-removable storage device. Optionally, the back-end storage module 10 may also be a file storage, block storage, object storage, or other type of storage device that can be applied to the storage system 100.

[0062] The management node 30 is used to manage all storage nodes in the storage system 100. It can be responsible for coordinating and synchronizing all storage nodes globally. For example, the management node 30 can be used to detect storage node failures. In another example, the management node 30 can be used to process storage nodes joining and leaving the storage system 100. For example, the management node 30 can be a device or module with data processing capabilities.

[0063] It is understood that the management node 30 can be an independent node device, such as a computer or a server. Alternatively, the functions implemented by the management node 30 can be implemented by any storage node. This embodiment of the present application does not limit this.

[0064] Storage nodes are used to provide data block storage services to user devices. User devices can access the backend storage module 10 through storage nodes. Simply put, a storage node can be considered a virtual storage space, such as a virtual hard disk. User devices can use storage nodes to read, write, and format data stored in the backend storage module 10. For example, a storage node can be a running virtual machine mapped to the backend storage module 10, or it can be a gateway that provides data block storage services to user devices.

[0065] Optionally, the number of storage nodes in the storage system 100 may be multiple. Figure 1 As shown, the storage system 100 may include a storage node 21, a storage node 22, ..., and a storage node 2N, where N is a positive integer.

[0066] Furthermore, a storage node may include one or more logical volumes. It should be noted that the storage node does not actually store the source data of the one or more logical volumes; rather, the source data of the one or more logical volumes is stored in the backend storage module 10. The storage node can receive read and write requests for the logical volumes. After receiving the read and write requests, the storage node can modify the source data of the logical volumes in the backend storage module 10.

[0067] After chain cloning a logical volume, there is a reference relationship between the clone volume, snapshot volume and clone source volume. The clone volume references the snapshot volume, and the snapshot volume references the clone source volume. Figure 1 The storage system 100 shown, Figure 2 FIG. 1 shows a reference relationship diagram of a logical volume, where storage node 1 and storage node 2 are any two storage nodes in the storage system 100. Figure 2 As shown, storage node 2 stores volume 41, while storage node 1 stores volumes 42 and 43. Volume 41 is a clone of volume 42, meaning that volume 42 is the clone source of volume 41. Volume 43 is a snapshot of volume 42. Therefore, volume 41 references volume 42, and volume 42 references volume 43.

[0068] Optionally, the data blocks in volume 41 can have the same names as those in the clone source volume or its snapshot volume. Volume 41 stores data blocks chunk0, chunk1, chunk2, and chunk3. Chunk1 in volume 41 references chunk1 in volume 43, and chunk3 in volume 41 references chunk3 in volume 43. Chunk1 in volume 43 references chunk1 in volume 42, and chunk2 in volume 43 references chunk2 in volume 42.

[0069] The embodiments provided in this application are described in detail below with reference to the accompanying drawings.

[0070] like Figure 3 As shown, the embodiment of the present application provides a method for obtaining data of a clone volume, which is applicable to Figure 1 In the storage system 100 shown, the first storage node and the second storage node are any two storage nodes in the storage system 100, and the clone volume is stored in the second storage node, the clone source volume of the clone volume is stored in the first storage node, and the snapshot volume of the clone source volume is also stored in the first storage node. The method includes the following steps:

[0071] S101: A second storage node sends a data acquisition request to a first storage node.

[0072] Correspondingly, the first storage node receives the data acquisition request sent by the second storage node.

[0073] The data acquisition request is used to request the source data of the first data block in the clone volume. The first data block refers to any data block in the clone volume, that is, the smallest storage unit. For example, the first data block can be Figure 2 Chunk0, chunk1, chunk2, or chunk3 in the cloned volume (volume 41).

[0074] Optionally, the data acquisition request may include an identifier of the first data block in the clone volume. Exemplarily, the identifier may be a name, a serial number, or other identifier that can refer to the first data block.

[0075] In some embodiments, when a first data block of a clone volume is accessed, the second storage node may first determine whether the first data block references other data blocks.

[0076] Optionally, a reference refers to a data block that has a link to another data block. Typically, a data block in a clone volume can reference a data block in a snapshot volume, and a data block in a snapshot volume can reference a data block in the clone source volume.

[0077] It should be noted that if the second storage node determines that the first data block references other data blocks, this indicates that the first data block does not store data in the actual storage space of the backend storage module 10. In this case, the second storage node needs to copy the source data of the first data block in the clone source volume to the clone volume. Therefore, the second storage node can execute step S101 and send the aforementioned data acquisition request to the first storage node to request the source data of the first data block in the clone volume from the first storage node.

[0078] If the second storage node determines that the first data block does not reference other data blocks, it means that the first data block currently stores data in the actual storage space of the backend storage module 10. In this case, the second storage node does not need to perform step S101 and can directly read the data of the first data block from the backend storage module 10.

[0079] In some embodiments, before executing step S101 , the second storage node may first determine, based on the clone volume, a storage node where the clone source volume of the clone volume is located.

[0080] Optionally, the second storage node may first determine first corresponding information. The first corresponding information includes a correspondence between the clone volume identifier and the first storage node used to store the clone source volume of the clone volume. The clone volume identifier is used to uniquely refer to the clone volume, such as the name and number of the clone volume.

[0081] As a possible implementation, the second storage node can use the clone volume identifier as the identifier to be searched, traverse the clone volume identifiers included in each corresponding information in the correspondence set, and determine the corresponding information in the correspondence table that includes the identifier to be searched as the first corresponding information. The correspondence set includes at least one corresponding information, such as a correspondence table. The second storage node can then search the first corresponding information for the first storage node corresponding to the clone volume.

[0082] Exemplarily, the above correspondence table can be as shown in Table 1, wherein a corresponding information includes the clone volume identifier, the clone source volume identifier of the clone volume, and the node information of the storage node where the clone source volume is located. The node information can be the IP address, communication port, communication identity certificate or other information that can be used to refer to the storage node where the clone source volume is located. Taking the above clone volume identifier as Volume001 as an example, the second row of data in Table 1 is the above first corresponding information. The second storage node can find the above first storage node as storage node 01 in the second row of data in Table 1.

[0083] Table 1

[0084]

[0085]

[0086] Illustratively, the above correspondence table may also be as shown in Table 2, wherein one correspondence information includes node information of the storage node where the clone volume and the clone source volume of the clone volume are located.

[0087] Table 2

[0088] Clone Volume Node Information Volume001 Storage Node 01 Volume002 Storage Node 02 Volume003 Storage Node 03 …… ……

[0089] It should be understood that the correspondence table shown in Table 1 or Table 2 is only one example of the embodiment of the above-mentioned correspondence information set, and the second storage node can also determine the first storage node in other possible manners, which is not limited in the present application.

[0090] The source volume can be updated, and the first correspondence information can also be updated. The specific updating process can be referred to the description below, which is not described here.

[0091] It should be noted that the above-mentioned correspondence table can be pre-stored in the storage node. According to the correspondence table, the node information of the storage node where the cloned source volume of all cloned volumes in the storage node can be found. In this way, the access speed of the first storage node can be accelerated, and the service efficiency of the storage system can be improved.

[0092] Further, after determining the first storage node, the second storage node can send the above-mentioned data acquisition request to the first storage node.

[0093] S102, the first storage node acquires the source data index of the first data block according to the data acquisition request.

[0094] The above-mentioned source data index is used to indicate the storage space of the source data of the first data block. According to the source data index, the first storage node can find the storage space in the back-end storage module 10, and acquire the source data of the first data block in the storage space.

[0095] For example, the above-mentioned source data index can be the physical address of the storage space corresponding to the source data of the first data block or the identifier of the storage space, etc. The physical address can be the address determined by the physical location of the physical disk, such as cylinder, head, segment, etc.

[0096] It should be noted that in the storage system 100 shown in Figure 1 In the storage system 100 shown in

[0097] In one example, as shown in (a) of Figure 4 Figure 2 ​Taking the clone volume (volume 41) on the storage node 2 as an example, the clone volume includes data block chunk0 having a corresponding storage space A in the back-end storage module 10, and chunk2 having a corresponding storage space C in the back-end storage module 10. No data is written in chunk1 and chunk3, and chunk1 and chunk3 do not have corresponding storage space in the back-end storage module 10. Moreover, each storage space in the back-end storage module 10 has a corresponding index. Taking storage space A as an example, the source data of chunk0 is stored in storage space A, that is, the source data of chunk0 can be found according to the index corresponding to storage space A, and the index is, for example, the physical address of storage space A.

[0098] Further, in Figure 1 In the storage system 100 shown, when writing data in each data block, a storage space can be applied for in the backend storage module 10 first, and then the written data is stored in the applied storage space. In addition, the data block has a mapping relationship with the storage space in the applied backend storage module 10. Figure 4 As shown in (b), when data is written into data blocks chunk1 and chunk3 of the clone volume, data block chunk1 has corresponding storage space B in the backend storage module 10 , and chunk3 has corresponding storage space D in the backend storage module 10 .

[0099] In another example, Figure 5 As shown, the same Figure 2 Taking the clone volume (volume 41) on storage node 2 as an example, the clone volume includes data blocks chunk0, chunk1, chunk2, and chunk3. Chunk0 has a corresponding storage space A in the backend storage module 10, chunk1 has a corresponding storage space B in the backend storage module 10, chunk2 has a corresponding storage space C in the backend storage module 10, and chunk3 has a corresponding storage space D in the backend storage module 10. However, no data is written to chunk1 and chunk3, that is, no data is written to the storage space B corresponding to chunk1 in the backend storage module 10 and the storage space D corresponding to chunk3 in the backend storage module 10. Similarly, storage space A, storage space B, storage space C, and storage space D in the backend storage module 10 all have corresponding indexes.

[0100] Optionally, the first storage node may first determine a data block referenced by the first data block, and obtain a source data index of the first data block based on the referenced data block.

[0101] In one implementation, Figure 6 As shown, the above step S102 can be specifically implemented as the following steps:

[0102] S102A1 : The first storage node searches for a first snapshot block in the snapshot volume of the clone source volume according to the data acquisition request. The first snapshot block is a data block referenced by the first data block.

[0103] Optionally, after determining the first snapshot block, the first storage node may determine whether the first snapshot block references other data blocks. If the first storage node determines that the first snapshot block does not reference other data blocks, it indicates that the first snapshot block currently stores data in the actual storage space of the backend storage module 10.

[0104] For example Figure 2 Chunk0 or chunk3 in the snapshot volume (volume 43) in the clone source volume, where chunk0 in the snapshot volume references chunk0 in the clone source volume (volume 42), and chunk3 in the snapshot volume references chunk3 in the clone source volume.

[0105] At this time, the first storage node may further perform the following step S102A2 to determine the source data index according to the actual storage space of the first snapshot block in the backend storage module 10 .

[0106] S102A2: The first storage node determines the first index mapped to the first snapshot block as the source data index, wherein the storage space indicated by the first index is used to store the source data of the first snapshot block.

[0107] Optionally, the first storage node may store a mapping relationship set (eg, a mapping relationship table), wherein the mapping relationship set includes one or more mapping relationship information, wherein one mapping relationship information includes a mapping relationship between a data block and an index.

[0108] Specifically, the first storage node may use the identifier of the first snapshot block (e.g., the name or number of the first data block) as a search index and traverse the identifiers of the data blocks included in each mapping information in the mapping relationship table. The first storage node may find the first index corresponding to the identifier of the first snapshot block in the mapping information. The storage space indicated by the first index is used to store the source data of the first snapshot block.

[0109] Illustratively, the mapping relationship table may be as shown in Table 3, where one mapping information includes a volume identifier, a data block identifier, and an index of the actual storage space of the data block in the backend storage module 10. Taking chunk_001 in the first snapshot block Volume001 as an example, the first storage node can find the first index unit_key_aaa of the first snapshot block in the second row of data in Table 3.

[0110] Table 3

[0111]

[0112]

[0113] It should be understood that the mapping relationship table shown in Table 3 is only an example of the embodiment of the above-mentioned mapping relationship set. The first storage node can also determine the first index in other possible ways, and this application does not limit this.

[0114] Furthermore, the first storage node may determine the acquired first index as the source data index.

[0115] In another implementation, Figure 7 As shown, the above step S102 can be specifically implemented as the following steps:

[0116] S102B1. The first storage node searches for a first data block in the snapshot volume of the clone source volume according to the data acquisition request. The first snapshot block is a data block referenced by the first data block.

[0117] Optionally, after determining the first snapshot block, the first storage node may determine whether the first snapshot block references other data blocks. If the first storage node determines that the first snapshot block references other data blocks, it indicates that the first snapshot block does not store data in the actual storage space of the backend storage module 10.

[0118] For example Figure 2 chunk1 or chunk2 in the snapshot volume (volume 43), where chunk1 in the snapshot volume references chunk1 in the clone source volume (volume 42), and chunk2 in the snapshot volume references chunk2 in the clone source volume.

[0119] At this time, the first storage node may further perform the following steps S102B2 to S102B3.

[0120] S102B2: The first storage node searches for a first clone source block in the clone source volume according to the first snapshot block. The first clone source block is a data block referenced by the first snapshot block.

[0121] S102B3. The first storage node determines the second index mapped to the first clone source block as the source data index, wherein the storage space indicated by the second index is used to store the source data of the first clone source block.

[0122] Optionally, the first storage node can use the first clone source block (or the identifier of the first clone source block) as a search index to traverse the data blocks included in each mapping information in the mapping relationship table shown in Table 3. If the data volume included in a mapping information is the first clone source block, the first storage node can search the mapping information for the second index corresponding to the first clone source block. The storage space indicated by the second index is used to store the source data of the first clone source block.

[0123] S103. The first storage node sends the source data index to the second storage node.

[0124] Correspondingly, the second storage node receives the source data index.

[0125] It can be understood that only the data source index is transmitted between the first storage node and the second storage node, which greatly reduces the amount of data transmitted over the network between different nodes.

[0126] S104. The second storage node obtains the source data according to the source data index.

[0127] Specifically, the second storage node may search for a storage space corresponding to the source data index in the backend storage module 10 according to the received source data index, and obtain the data stored in the storage space.

[0128] Based on the above embodiment, at least the following beneficial effects can be produced: during the data acquisition process of the clone volume, only the data source index is transmitted between the first storage node and the second storage node, no additional network transmission load is generated, and bandwidth resources occupied by data transmission between nodes are saved.

[0129] Optionally, during the process of acquiring the data of the cloned volume, the source data of the cloned volume may be read-protected to prevent the source data of the cloned volume from being modified during the data acquisition process. Figure 8 As shown, the method for obtaining data of a clone volume provided in this application can also be implemented as the following steps:

[0130] S201: The second storage node sends a data acquisition request to the first storage node.

[0131] Correspondingly, the first storage node receives the data acquisition request.

[0132] For the detailed description of step S201 , reference may be made to the detailed description of step S101 , which will not be repeated here.

[0133] S202: The second storage node sends a read protection instruction to the first storage node.

[0134] Correspondingly, the first storage node receives the read protection instruction.

[0135] The embodiment of the present application does not limit the execution order of 201 and 202. For example, steps S201 and S202 can be executed simultaneously, or step S201 can be executed first and then step S202.

[0136] S203. The first storage node performs read protection on the source data of the first data block according to the read protection instruction.

[0137] Optionally, the first storage node may add a read lock to the source data of the first data block according to the read protection instruction.

[0138] In one possible implementation, combining Figure 6 It can be seen from steps S102A1 and S102A2 that the storage space data corresponding to the first snapshot block is the source data of the first data block, so the first storage node can add a read lock to the first snapshot block.

[0139] In another possible implementation, combining Figure 7 It can be seen from steps S102B1 to S102B3 that the storage space data corresponding to the first clone source block is the source data of the first data block, so the first storage node can add a read lock to the first clone source block.

[0140] Optionally, after the first storage node performs read protection on the source data of the first data block, the first storage node returns a message indicating that the read protection is successfully added to the second storage node.

[0141] S204: The first storage node obtains the source data index of the first data block according to the data acquisition request.

[0142] S205. The first storage node sends the source data index of the first data block to the second storage node.

[0143] Correspondingly, the second storage node may receive the source data index of the first data block.

[0144] For the detailed description of step S204 to step S205 , reference may be made to the detailed description of step S102 to step S103 , which will not be described in detail here.

[0145] S206. The second storage node obtains source data according to the source data index of the first data block.

[0146] For the detailed description of step 206 , reference can be made to the detailed description of step S104 , which will not be repeated here.

[0147] S207: The second storage node sends a read protection release instruction to the first storage node.

[0148] S208: The first storage node releases the read protection of the source data.

[0149] Based on the above embodiment, the source data of the first data block can be read-protected before data acquisition to ensure that the source data of the first data block cannot be modified during data acquisition by the clone volume, thereby ensuring the accuracy of data acquisition by the clone volume.

[0150] The following describes the process in which the second storage node obtains the corresponding information / updates the first corresponding information.

[0151] In one possible implementation, Figure 9 As shown, the process of the second storage node acquiring / updating the corresponding information can be specifically implemented as follows:

[0152] S301: A second storage node sends an update request to a management node, where the update request is used to request migration information of a clone source volume.

[0153] The second storage node can be: Figure 1 Any storage node in the storage system 100 shown.

[0154] Optional, in Figure 1 In the storage system 100 shown, each storage node may send an update request to the management node when it is started, so as to obtain migration information of the clone source volume in the storage node and further update the corresponding information of the clone volume in the storage node.

[0155] Optional, in Figure 1 In the storage system 100 shown, each storage node may send an update request to the management node at a preset frequency to obtain migration information of the clone source volume in the storage node, and further regularly update the corresponding information of the clone volume in the storage node.

[0156] It should be noted that if the storage node where the clone volume of the clone source volume is located does not update the corresponding information of the clone volume in a timely manner, and the clone volume is referencing the clone source volume, then when the clone volume is read, the referenced source data cannot be obtained, resulting in the storage node being unable to provide storage services normally.

[0157] Optionally, the management node can monitor the migration status of each volume in each storage node in real time, and can store the corresponding relationship information between each volume and its storage node.

[0158] Therefore, the management node can obtain the node information where the clone source volume of the clone volume in the storage node is located from pre-stored corresponding relationship information according to the update request.

[0159] In this way, the management node can return the clone source volume identifier of the clone volume in the storage node and the node information of the storage node where the clone source volume is located to the second storage node as a response result of the update request.

[0160] S302: The second storage node receives a response result of the update request returned by the management node, and updates the first corresponding information according to the response result.

[0161] For example, if the response result of the update request received by the second storage node includes the clone source volume Volume01 of the clone volume Volume001, and the node information storage node 03 corresponding to Volume01, the second storage node can update the correspondence table shown in Table 1 to the correspondence table shown in Table 4. The node information corresponding to the clone volume Volume001 is updated from storage node 01 to storage node 03.

[0162] Table 4

[0163] Clone Volume Clone source volume Node Information Volume001 Volume01 Storage Node 03 Volume002 Volume02 Storage Node 02 Volume003 Volume03 Storage Node 03 …… …… ……

[0164] Alternatively, if the response received by the second storage node includes the clone source volume Volume05 of the clone volume Volume005 and the node information storage node 03 corresponding to Volume05, but the second storage node does not store the corresponding information of the clone volume Volume005, the second storage node can update the corresponding relationship table shown in Table 1 to the corresponding relationship table shown in Table 5, in which the corresponding information of Volume005 is added.

[0165] Table 5

[0166] Clone Volume Clone source volume Node Information Volume001 Volume01 Storage Node 01 Volume002 Volume02 Storage Node 02 Volume003 Volume03 Storage Node 03 Volume005 Volume05 Storage Node 03 …… …… ……

[0167] Based on the above embodiment, the correspondence between the clone volume and the storage node where the clone source volume is located can be updated in a timely manner, so that when obtaining the data of the clone volume, the storage node can quickly determine the storage node where the clone source volume is located based on the correspondence, thereby improving the data acquisition speed of the clone volume.

[0168] In another possible implementation, Figure 10 As shown, the process of the second storage node acquiring / updating the corresponding information can also be specifically implemented as the following steps:

[0169] S401: The management node sends a first broadcast message to the second storage node.

[0170] Correspondingly, the second storage node receives the first broadcast message sent by the management node.

[0171] The first broadcast message is used to broadcast the migration of the clone source volume from the first storage node to the third storage node. It can be understood that migration refers to moving a volume with allocated storage space from one storage node to another storage node.

[0172] The first storage node, the second storage node and the third storage node can be: Figure 1 Any three storage nodes in the storage system 100 shown. Exemplarily, the second storage node may be any storage node among the storage node 21, the storage node 22, ..., or the storage node 2N in the storage system 100.

[0173] Optionally, the first broadcast message may include the identifier of the clone source volume, node information of the third storage node, and the relationship between the clone source volume and the third storage node.

[0174] It should be noted that if a storage node experiences an exception or for load balancing, the management node will migrate the volumes on that storage node to other storage nodes to continue providing storage services. At this time, if the clone source volume has been moved, but the storage node where the clone volume of the clone source volume resides has not updated the corresponding information of the clone volume, and the clone volume is referencing the clone source volume, when the clone volume is read, the referenced source data will be unable to be retrieved, and the storage node will be unable to provide storage services normally.

[0175] Thus, the management node can monitor the migration status of each volume in each storage node in real time.

[0176] Furthermore, when a clone source volume of a storage node is migrated, a broadcast message is sent to all other storage nodes in the system except the storage node, so as to broadcast the migration status of the clone source volume to other storage nodes in the system.

[0177] S402: Update the first storage node corresponding to the clone volume in the first corresponding information to a third storage node according to the first broadcast message.

[0178] Based on the above embodiment, whenever a clone source volume in a storage node is migrated, the management node can proactively initiate a broadcast and promptly instruct each storage node to update corresponding information, so that when obtaining data of the clone volume, the storage node can obtain accurate corresponding information.

[0179] Optionally, in combination with the above embodiments, the method provided by this application can also be expressed as follows: Figure 11 The logic flow chart shown is as follows. Wherein, the first storage node and the second storage node are any two storage nodes in the storage system 100.

[0180] S1. The second storage node determines whether the first data block references other data blocks.

[0181] If not, then execute the following step S2. If quoted, then execute the following step S3.

[0182] S2. The second storage node directly reads the data of the first data block from the backend storage.

[0183] S3. The second storage node searches the stored corresponding information for the storage node where the clone source volume of the clone volume is located.

[0184] If the search is unsuccessful, the following step S4 is executed. If the search is successful, the following step S5 is executed.

[0185] S4. The second storage node obtains storage node information of the clone source volume of the clone volume from the management node.

[0186] It should be understood that if the search is unsuccessful, it means that the second storage node has not updated the stored corresponding information in time. In this case, the second storage node can send an update request to the management node to update the corresponding information stored in the second storage node.

[0187] S5. The second storage node sends a data acquisition request and a read protection instruction to the storage node where the clone source volume is located (ie, the first storage node).

[0188] S6. Obtain a source data index, and read the source data of the first data block from the backend storage according to the source data index.

[0189] S7. The second storage node sends a read protection release request to the storage node where the clone source volume is located to release the read protection of the source data.

[0190] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed herein, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0191] like Figure 12FIG2 is a schematic diagram of the structure of a clone volume data acquisition device 200 provided in an embodiment of the present application. The clone volume data acquisition device 200 is applied to a first storage node, which stores a clone source volume of the clone volume. The clone volume is stored on a second storage node. The clone volume data acquisition device 200 includes a transceiver module 201 and a processing module 202.

[0192] The transceiver module 201 is configured to receive a data acquisition request sent by a second storage node, where the data acquisition request is used to request source data of a first data block in a clone volume.

[0193] The processing module 202 is configured to obtain a source data index of the first data block according to a data acquisition request, where the source data index is used to search for source data of the first data block.

[0194] The transceiver module 201 is further configured to send the source data index to the second storage node.

[0195] In a possible implementation, the transceiver module 201 is further configured to receive a read protection instruction sent by the second storage node. The processing module 202 is further configured to perform read protection on the source data of the first data block according to the received read protection instruction.

[0196] In another possible implementation, processing module 202 is specifically configured to: search, in response to the data acquisition request, a first snapshot block in a snapshot volume of the clone source volume, where the first snapshot block is a data block referenced by the first data block; and determine a first index mapped to the first snapshot block as a source data index, where the storage space indicated by the first index is used to store the source data of the first snapshot block.

[0197] In another possible implementation, processing module 202 is specifically configured to: search for a first snapshot block in the snapshot volume of the clone source volume based on the data acquisition request, where the first snapshot block is a data block referenced by the first data block; and search for a first clone source block in the clone source volume based on the first snapshot block, where the first clone source block is a data block referenced by the first snapshot block; and determine a second index mapped to the first clone source block as a source data index, where the storage space indicated by the second index is used to store source data of the first clone source block.

[0198] In another possible implementation, the transceiver module 201 is further configured to receive a read protection release instruction sent by the second storage node. The processing module 202 is further configured to release the read protection of the source data according to the received read protection release instruction.

[0199] like Figure 13FIG2 is a schematic diagram of another clone volume data acquisition device 300 provided in an embodiment of the present application. This clone volume data acquisition device 200 is applied to a second storage node, which stores the clone volume. The clone source volume of the clone volume is stored on a first storage node. The clone volume data acquisition device 300 includes a transceiver module 301 and a processing module 302.

[0200] The transceiver module 301 is configured to send a data acquisition request to the first storage node, where the data acquisition request is used to request source data of a first data block in the clone volume.

[0201] The transceiver module 301 is further configured to receive a source data index sent by the first storage node, the source data index being used to search for source data of the first data block, and to obtain the source data according to the source data index.

[0202] In a possible implementation, the transceiver module 301 is further configured to send a read protection instruction to the first storage node, where the read protection instruction is configured to instruct the first storage node to perform read protection on the source data of the first data block.

[0203] In another possible implementation, the transceiver module 301 is further configured to send a read protection release instruction to the first storage node, where the read protection release instruction is used to instruct the first storage node to release data read protection of the data source.

[0204] In yet another possible implementation, the processing module 302 is configured to determine a first storage node, where the first storage node is configured to store a clone source volume of the clone volume.

[0205] In another possible implementation, the processing module 302 is further configured to determine the first storage node according to the clone volume and the first corresponding information, where the first corresponding information includes a correspondence between the clone volume and the first storage node for storing the clone source volume.

[0206] In another possible implementation, the transceiver module 301 is further configured to receive a first broadcast message from the management node, the first broadcast message being used to broadcast the migration of the clone source volume from the first storage node to the third storage node. The processing module 302 is further configured to update the first storage node corresponding to the clone volume in the first correspondence information to the third storage node based on the first broadcast message.

[0207] In another possible implementation, the transceiver module 301 is further configured to send an update request to the management node, the update request being used to request migration information of the clone source volume, and to receive a response to the update request from the management node. The processing module 302 is further configured to update the first corresponding information based on the response to the update request.

[0208] In addition, the explanation and description of the beneficial effects of any of the above-mentioned data acquisition devices 200 or 300 can refer to the above-mentioned corresponding method embodiments and will not be repeated here.

[0209] It should be readily apparent to those skilled in the art that, in combination with the units and algorithmic steps of the various examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0210] It should be noted that Figure 12 or Figure 13 The module division described is illustrative and represents only one logical functional division. Actual implementations may employ different divisions. For example, two or more functions may be integrated into a single processing module. These integrated modules may be implemented as either hardware or software functional modules.

[0211] Optionally, the hardware structure of the data acquisition device 200 or the data acquisition device 300 for the clone volume can be as follows: Figure 14 As shown, the data acquisition device 400 for a clone volume includes a processor 401, a communication line 402, and a communication interface 403. Optionally, the data acquisition device 400 may further include a memory 404. The processor 401, the memory 404, and the communication interface 403 may be connected via the communication line 402.

[0212] The processor 401 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 201 may also be any other device with processing capabilities, such as a circuit, a device, or a software module, without limitation.

[0213] In one example, the processor 401 may include one or more CPUs, such as Figure 14 CPU0 and CPU1 in.

[0214] As an optional implementation, the apparatus 400 for obtaining data of a clone volume includes multiple processors, for example, in addition to the processor 401, it may also include a processor 405. The communication line 402 is used to transmit information between the components included in the apparatus 400 for obtaining data of a clone volume.

[0215] Communication interface 403 is used to communicate with other devices or other communication networks. Such other communication networks may be Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc. Communication interface 403 may be a module, circuit, transceiver, or any other device capable of communication.

[0216] The memory 404 is used to store instructions, where the instructions may be computer programs.

[0217] The memory 404 may be a read-only memory (ROM) or other type of static storage device that can store static information and / or instructions, or a random access memory (RAM) or other type of dynamic storage device that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, etc., without limitation.

[0218] It should be noted that the memory 404 can exist independently of the processor 401 or can be integrated with the processor 401. The memory 404 can be used to store instructions, program code, or some data. The memory 404 can be located within the clone volume data acquisition device 400 or outside the clone volume data acquisition device 400, without limitation.

[0219] Processor 401 is configured to execute instructions stored in memory 404 to implement the communication methods provided in the following embodiments of this application. For example, when clone volume data acquisition device 400 is a terminal or a chip or system-on-chip in the terminal, processor 401 may execute instructions stored in memory 404 to implement the steps in the following embodiments of this application.

[0220] It should be pointed out that Figure 14The structure shown in the figure does not constitute a limitation of the device, except Figure 14 In addition to the components shown, the device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0221] The present application also provides a computer-readable storage medium including computer-executable instructions, which, when executed on a computer, enables the computer to execute any one of the methods provided in the above embodiments. For example, Figure 3 One or more features of S101 to S104 may be performed by one or more computer-executable instructions stored in the computer-readable storage medium.

[0222] An embodiment of the present application further provides a computer program product comprising computer-executable instructions, which, when executed on a computer, enables the computer to execute any one of the methods provided in the above embodiments.

[0223] An embodiment of the present application also provides a chip, including: a processor and an interface, the processor is coupled to a memory through the interface, and when the processor executes a computer program or computer execution instruction in the memory, any one of the methods provided in the above embodiments is executed.

[0224] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer execution instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more media that can be integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0225] The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for obtaining data from a clone volume, characterized in that: A method is applied to a first storage node of a storage system, the first storage node storing a clone source volume of the clone volume, the storage system further comprising a second storage node storing the clone volume, the method comprising: receiving a data acquisition request sent by the second storage node, where the data acquisition request is used to request source data of a first data block in the clone volume; Acquire, according to the data acquisition request, a source data index of the first data block, wherein the source data index is used to search for source data of the first data block; Sending the source data index to the second storage node; The source data index is a first index or a second index, the first index is used to indicate the storage space of the source data of the first snapshot block, the second index is used to indicate the storage space of the source data of the first clone source block, the first data block references the first snapshot block, and the first snapshot block references the first clone source block.

2. The method according to claim 1, characterized in that The method further comprises: receiving a read protection instruction sent by the second storage node; Before sending the source data index to the second storage node, read protection is performed on the source data of the first data block according to the read protection instruction.

3. The method according to claim 1 or 2, characterized in that The obtaining of the source data index of the first data block includes: searching, according to the data acquisition request, for the first snapshot block in the snapshot volume of the clone source volume; A first index mapped to the first snapshot block is determined as the source data index, wherein a storage space indicated by the first index is used to store the source data of the first snapshot block.

4. The method according to claim 1 or 2, characterized in that The obtaining of the source data index of the first data block includes: searching, according to the data acquisition request, for the first snapshot block in the snapshot volume of the clone source volume; searching the clone source volume for the first clone source block according to the first snapshot block; A second index mapped to the first clone source block is determined as the source data index, wherein a storage space indicated by the second index is used to store source data of the first clone source block.

5. The method according to claim 2, characterized in that The method further comprises: receiving a read protection release instruction sent by the second storage node; According to the read protection release instruction, the read protection of the source data is released.

6. A method for obtaining data from a clone volume, characterized in that: The method includes: applying to a second storage node of a storage system, the second storage node storing the clone volume, the storage system further comprising a first storage node, and the clone source volume of the clone volume being stored in the first storage node. Sending a data acquisition request to the first storage node, where the data acquisition request is used to request source data of a first data block in the clone volume; receiving a source data index sent by the first storage node, where the source data index is used to search for source data of the first data block; Acquire the source data according to the source data index; The source data index is a first index or a second index, the first index is used to indicate the storage space of the source data of the first snapshot block, the second index is used to indicate the storage space of the source data of the first clone source block, the first data block references the first snapshot block, and the first snapshot block references the first clone source block.

7. The method according to claim 6, characterized in that Before obtaining the source data, the method further includes: A read protection instruction is sent to the first storage node, where the read protection instruction is used to instruct the first storage node to perform read protection on the source data of the first data block.

8. The method according to claim 7, characterized in that After obtaining the source data, the method further includes: A read protection release instruction is sent to the first storage node, where the read protection release instruction is used to instruct the first storage node to release data read protection of the source data.

9. The method according to any one of claims 6 to 8, characterized in that Before sending the data acquisition request to the first storage node, the method further includes: A first storage node is determined, where the first storage node is used to store a clone source volume of the clone volume.

10. The method according to claim 9, characterized in that The determining of the first storage node includes: The first storage node is determined according to the clone volume and first corresponding information, where the first corresponding information includes a corresponding relationship between the clone volume and a first storage node for storing the clone source volume.

11. The method according to claim 10, characterized in that The storage system further includes a management node, and the method further includes: receiving a first broadcast message sent by a management node, where the first broadcast message is used to broadcast migration of the clone source volume from the first storage node to a third storage node; According to the first broadcast message, the first storage node corresponding to the clone volume in the first corresponding information is updated to the third storage node.

12. The method according to claim 10, characterized in that The storage system further includes a management node, and the method further includes: Sending an update request to the management node, wherein the update request is used to request migration information of the clone source volume; receiving a response result of the update request returned by the management node; The first corresponding information is updated according to the response result.

13. A data acquisition device for a clone volume, characterized in that: A first storage node applied to a storage system, the first storage node storing a clone source volume of the clone volume, the storage system further comprising a second storage node storing the clone volume, the device comprising a transceiver module and a processing module; The transceiver module is configured to receive a data acquisition request sent by the second storage node, wherein the data acquisition request is used to request source data of the first data block in the clone volume; The processing module is configured to obtain a source data index of the first data block according to the data acquisition request, wherein the source data index is used to search for source data of the first data block; The transceiver module is further configured to send the source data index to the second storage node; The transceiver module is further configured to receive a read protection instruction sent by the second storage node; The processing module is further configured to perform read protection on the source data of the first data block according to the read protection instruction; The processing module is specifically used to: searching, according to the data acquisition request, for a first snapshot block in a snapshot volume of the clone source volume, where the first snapshot block is a data block referenced by the first data block; Determine a first index mapped to the first snapshot block as the source data index, wherein a storage space indicated by the first index is used to store the source data of the first snapshot block; The processing module is specifically used to: searching, according to the data acquisition request, for a first snapshot block in a snapshot volume of the clone source volume, where the first snapshot block is a data block referenced by the first data block; searching, in the clone source volume according to the first snapshot block, for a first clone source block, where the first clone source block is a data block referenced by the first snapshot block; Determine a second index mapped to the first clone source block as the source data index, wherein a storage space indicated by the second index is used to store source data of the first clone source block; The transceiver module is further configured to receive a read protection release instruction sent by the second storage node; The processing module is further configured to release the read protection of the source data according to the read protection release instruction.

14. A data acquisition device for a clone volume, characterized in that: The device is applied to a second storage node of a storage system, the second storage node storing the clone volume, the storage system further comprising a first storage node, the clone source volume of the clone volume being stored in the first storage node, and the device comprising a transceiver module and a processing module: The transceiver module is configured to send a data acquisition request to the first storage node, wherein the data acquisition request is used to request source data of the first data block in the clone volume; The transceiver module is further configured to receive a source data index sent by the first storage node, where the source data index is used to search for source data of the first data block; and obtaining the source data according to the source data index; The transceiver module is further configured to send a read protection instruction to the first storage node, wherein the read protection instruction is configured to instruct the first storage node to perform read protection on the source data of the first data block; The transceiver module is further configured to send a read protection release instruction to the first storage node, wherein the read protection release instruction is configured to instruct the first storage node to release data read protection of the source data; The processing module is configured to determine a first storage node, where the first storage node is configured to store a clone source volume of the clone volume; The processing module is further configured to determine the first storage node according to the clone volume and first corresponding information, wherein the first corresponding information includes a corresponding relationship between the clone volume and the first storage node for storing the clone source volume; The transceiver module is further configured to receive a first broadcast message sent by the management node, where the first broadcast message is configured to broadcast the migration of the clone source volume from the first storage node to the third storage node; The processing module is further configured to update the first storage node corresponding to the clone volume in the first corresponding information to the third storage node according to the first broadcast message; The transceiver module is further configured to send an update request to the management node, the update request being used to request migration information of the clone source volume, and receive a request result of the update request returned by the management node; The processing module is further configured to update the first corresponding information according to the request result.

15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which, when executed, enable a computer to execute the method according to any one of claims 1 to 5 or the method according to any one of claims 6 to 12.

Citation Information

Patent Citations

  • Device, system and method for recovering multiple data

    CN101145120A

  • Data copying and unloading method based on distributed storage and terminal equipment

    CN113721849A