A Node IO Forwarding Method, Device and Medium for a Multi-Controlled Cluster
By dividing the volume into data areas for IO forwarding in a multi-control cluster storage system, the problems of load balancing and low IO efficiency are solved, and the availability and IO efficiency of the system are improved.
Patent Information
- Application Number
- CN202310165871.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2043-02-24
AI Technical Summary
The existing multi-control cluster storage system has low load balancing when nodes access single volumes, and the IO efficiency is limited by the RAID strip lock mechanism, which cannot meet the availability and security requirements of high-end storage systems.
By dividing the volume of the multi-control cluster into multiple data areas according to the RAID stripe width and mirroring, and determining the requested data area based on the address information and data length of the IO request, IO forwarding with the data area being granular, avoiding the stripe locking mechanism, and improving load balancing and IO efficiency.
The load balancing and IO efficiency of the multi-controlled storage system are realized, the system availability is improved, and the problems of low load balancing and low IO efficiency caused by single volume access in the prior art are avoided.
Smart Images

Figure CN116112498B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network technologies, and particularly to a method, device, and medium for node IO forwarding in a multi-control cluster. Background Art
[0002] In recent years, in the storage field, dual-control storage devices with single mirror to dual replicas have gradually been unable to meet the availability and security requirements of high-end storage systems.
[0003] Figure 1 As shown in the schematic diagram of the existing dual-replica four-control cluster storage system accessing a single volume, Figure 1 as shown, as the number of nodes in the storage system increases, if the mechanism that only the preferred node within the single mirror can access the single volume as before, the load balancing degree will be relatively low. If multiple nodes access the single volume, the input / output (IO) efficiency of multiple nodes accessing the single volume will be restricted due to the striping lock mechanism of the backend disk array (Redundant Arrays of Independent Disks, RAID).
[0004] Therefore, seeking a method for node IO forwarding in a multi-control cluster is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of the present invention is to provide a method, device, and medium for node IO forwarding in a multi-control cluster, to implement a striping lock-free optimization mechanism at the granularity of data regions and improve the availability of the multi-control storage system.
[0006] To solve the above technical problems, the present invention provides a method for node IO forwarding in a multi-control cluster, including:
[0007] Obtain the mirror pair nodes of the multi-control cluster, and divide the volume corresponding to the multi-control cluster into multiple data regions according to the RAID strip width and the mirror pair nodes, where the data regions are located within the mirror pair nodes;
[0008] Receive the request address information and request data length of the current IO request, and determine the corresponding request data region according to the request address information and the request data length;
[0009] Forward the current IO request to the mirror pair node corresponding to the data region according to the relationship between the request data region and the multiple data regions.
[0010] Preferably, the step of dividing the volume corresponding to the multi-control cluster into multiple data regions according to the RAID strip width and the mirror pair nodes includes:
[0011] Obtain the width data of the RAID stripe width;
[0012] Divide the volume corresponding to the multi - controller cluster into multiple data blocks according to the width data;
[0013] Process multiple data blocks according to the number of nodes of the mirror pair nodes to obtain the data regions corresponding to the mirror pair nodes.
[0014] Preferably, the process of processing multiple data blocks according to the number of nodes of the mirror pair nodes to obtain the data regions corresponding to the mirror pair nodes includes:
[0015] Perform numbering processing on the mirror pair nodes and multiple data blocks respectively;
[0016] Use the number of nodes as the divisor, and perform modulo operation on multiple data blocks to obtain corresponding remainders;
[0017] Divide the data blocks to which the remainders belong into the mirror pair nodes with the same numbers corresponding to the mirror pair nodes.
[0018] Preferably, before receiving the request address information and request data length of the current IO request, it further includes:
[0019] Obtain the online path logical value of the volume corresponding to the multi - controller cluster and the mirror pair node logical value;
[0020] Perform logical AND processing on the online path logical value and the mirror pair node logical value to obtain a first logical value;
[0021] Use the nodes corresponding to the first logical value as the forwarding target node set of multiple data regions;
[0022] Invert the first logical value to obtain a second logical value, and use the nodes corresponding to the second logical value as the forwarding source node set of multiple data regions.
[0023] Preferably, the process of determining the corresponding request data region according to the request address information and the request data length includes:
[0024] Obtain the number of bytes occupied by the address information corresponding to the RAID stripe width;
[0025] Obtain the number of bytes occupied by the request address information;
[0026] Perform modulo operation on the number of bytes occupied by the request address information and the number of bytes occupied by the address information corresponding to the RAID stripe width to obtain a corresponding initial data block;
[0027] Determine the termination data block according to the request data length and the request address information;
[0028] Determine the corresponding request data area according to the relationship between the initial data block and the termination data block.
[0029] Preferably, the forwarding of the current IO request to the mirror pair node corresponding to the data area according to the relationship between the request data area and multiple data areas includes:
[0030] When the initial data block and the termination data block are the same data block, determine that the request data area is one data area;
[0031] Determine the mirror pair node according to the position of the request data area in multiple data areas;
[0032] When the initial data block and the termination data block are not the same data block, determine that the request data area spans multiple data areas;
[0033] Determine the corresponding mirror pair node according to the positions of the multiple data areas spanned.
[0034] Preferably, determining the mirror pair node includes:
[0035] Determine the forwarding node information corresponding to the request data area;
[0036] When the forwarding node information is within the forwarding source node set, obtain the corresponding forwarding target node according to the forwarding source node set;
[0037] Forward the current IO request to the forwarding target node to determine the mirror pair node.
[0038] To solve the above technical problems, the present invention also provides a node IO forwarding device for a multi-control cluster, including:
[0039] A partitioning module, configured to obtain the mirror pair nodes of the multi-control cluster, and divide the volume corresponding to the multi-control cluster into multiple data areas according to the RAID stripe width and the mirror pair nodes, wherein the data areas are located within the mirror pair nodes;
[0040] A determination module, configured to receive the request address information and the request data length of the current IO request, and determine the corresponding request data area according to the request address information and the request data length;
[0041] A forwarding module, configured to forward the current IO request to the mirror pair node corresponding to the data area according to the relationship between the request data area and multiple data areas.
[0042] To solve the above technical problems, the present invention further provides a node IO forwarding device for a multi-control cluster, including:
[0043] A memory for storing a computer program;
[0044] A processor for implementing the steps of the node IO forwarding method for the multi-control cluster as described above when executing the computer program.
[0045] To solve the above technical problems, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the node IO forwarding method for the multi-control cluster as described above are implemented.
[0046] A node IO forwarding method for a multi-control cluster provided by the present invention includes: obtaining mirror pair nodes of the multi-control cluster, and dividing the volume corresponding to the multi-control cluster into multiple data regions according to the RAID stripe width and the mirror pair nodes, where the data regions are located within the mirror pair nodes; receiving the request address information and the request data length of the current IO request, and determining the corresponding request data region according to the request address information and the request data length; forwarding the current IO request to the mirror pair node corresponding to the data region according to the relationship between the request data region and the multiple data regions. This method scatters the volume space according to the stripe width and the mirror pair nodes, and divides it into data regions corresponding to the mirror pair nodes to ensure the load balance degree within each mirror pair node, and avoid the problem of low load balance degree caused by the existing method of using only one node to access the current volume with the volume as the granularity. Determine the current request data region according to the request address and data length of the IO request, and determine the forwarding to the corresponding mirror pair node according to the relationship between the request data region and the data region, avoiding the problem of low efficiency caused by the existing multiple nodes accessing a single volume. Forward to the corresponding mirror pair node according to the data region, and implement a stripeless lock optimization mechanism with the data region as the granularity to improve the availability of the multi-control storage system.
[0047] In addition, the present invention further provides a node IO forwarding device and medium for a multi-control cluster, which have the same beneficial effects as the node IO forwarding method for the multi-control cluster as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] To more clearly illustrate the embodiments of the present invention, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0049] Figure 1 It is a schematic diagram of an existing dual-copy four-control cluster storage system accessing a single volume;
[0050] Figure 2 This is a flowchart of a node IO forwarding method for a multi - control cluster provided by an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of dividing data regions provided by an embodiment of the present invention;
[0052] Figure 4 This is a structural diagram of a node IO forwarding device for a multi - control cluster provided by an embodiment of the present invention;
[0053] Figure 5 This is a structural diagram of another node IO forwarding device for a multi - control cluster provided by an embodiment of the present invention;
[0054] Figure 6 This is a flowchart of another node IO forwarding method for a multi - control cluster provided by an embodiment of the present invention. Detailed implementation manners
[0055] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present invention.
[0056] The core of the present invention is to provide a node IO forwarding method, device and medium for a multi - control cluster, to implement a strip - lock - free optimization mechanism with data regions as the granularity, and improve the availability of the multi - control storage system.
[0057] To enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0058] It should be noted that what RAID provides to the operating system is a volume, which is a continuous sector space, and what the volume presents to the file system is a partition. Compared with the volume, the partition is to cut the large - scale continuous addresses again. The RAID strip - lock mechanism requires waiting for the lock permission when multiple nodes access a single volume, which reduces the access IO efficiency. Especially when the performance requirements of the business side for the storage device continue to upgrade, such IO efficiency is unacceptable. The node IO forwarding method for a multi - control cluster provided by the present invention can solve the above - mentioned technical problems and perform strip - lock - free optimization on the premise of ensuring load balancing.
[0059] Figure 2 This is a flowchart of a node IO forwarding method for a multi - control cluster provided by an embodiment of the present invention, as Figure 2 shown, the method includes:
[0060] S11: Obtain the mirror pair nodes of the multi - control cluster, and divide the volume corresponding to the multi - control cluster into multiple data regions according to the RAID stripe width and the mirror pair nodes, where the data regions are located within the mirror pair nodes;
[0061] S12: Receive the request address information and the request data length of the current IO request, and determine the corresponding request data region according to the request address information and the request data length;
[0062] S13: Forward the current IO request to the mirror pair node corresponding to the data region according to the relationship between the request data region and the multiple data regions.
[0063] Specifically, obtain the mirror pair nodes of the multi - control cluster. The multi - control cluster can be a dual - replica four - control cluster or a dual - replica two - control cluster, which is not limited here. To achieve the high - availability service of the system, to solve the problem that when one server fails, other servers take over the application, so as to continuously and reliably provide services. The cluster software is different from the dual - machine software and can support multiple servers to work, deploy multiple applications at the same time, and flexibly set takeover policies among multiple servers. For the mirror pair, according to the different multi - control clusters, the number of mirror pairs is different. For example, for a dual - replica four - control cluster, there are 4 mirror pairs corresponding to 4 nodes, and its mirror pairs are: node 0 and node 1; node 1 and node 2; node 2 and node 3; node 3 and node 0. For a dual - replica two - control cluster, there are 2 mirror pairs, node 0 and node 1.
[0064] Divide the volume corresponding to the multi - control cluster according to the RAID stripe width and the mirror pair nodes. In the existing method, IO forwarding is carried out at the volume granularity. In this embodiment, the volume is broken up according to the stripe width and dispersed to multiple nodes of the multi - control cluster to improve the load - balancing degree. The corresponding division basis is to divide according to the RAID stripe width, and it can be divided with the bandwidth data alignment of the stripe width, or can also be divided according to the number of nodes. Based on the RAID stripe lock mechanism, the same stripe width corresponds to one node access. As an embodiment, the volume is divided according to the RAID stripe width.
[0065] As an implementation manner, dividing the volume corresponding to the multi - control cluster into multiple data regions according to the RAID stripe width and the mirror pair nodes includes:
[0066] Obtain the width data of the RAID stripe width;
[0067] Divide the volume corresponding to the multi - control cluster into multiple data blocks according to the width data;
[0068] Process the multiple data blocks according to the number of nodes of the mirror pair nodes to obtain the data regions corresponding to the mirror pair nodes.
[0069] Specifically, width data of the RAID stripe width is obtained, and the width data is the occupied space. The volume will be divided into multiple data blocks according to the width data. For example, if the backend RAID stripe width is 32M, aligning the stripe width, the volume is divided into several data blocks of 32M. It is necessary to allocate the data blocks to each mirror pair node, that is, process the multiple data blocks according to the number of mirror pair nodes to obtain data regions corresponding to the mirror pair nodes.
[0070] It should be noted that in a multi-control cluster, the data region adopts a dual-copy form. If there are 4 data regions, each node corresponds to 2 data regions to achieve dual-copy.
[0071] Receive the request address information and request data length of the current IO request. The existing management coordinates the operations among the IO coordination file system, volume, and disk driver. The IO management sends the request to the file system module. The file system maps the logical offset corresponding to a certain file into the LBA address offset of the volume and calls the volume management disk driver interface through the IO request. The file system requests to call the interface of the volume management software. The volume management software translates and maps the LBA address offset corresponding to the volume into the LBA address offset corresponding to the actual physical disk and requests to call the disk controller driver program. The IO management requests to call the disk controller driver program. Write the data of the corresponding LBA address segment from the memory to a certain physical disk. The process of this embodiment is the same as the existing IO process, only the LBA address information corresponding to the volume part needs to be determined through the IO request.
[0072] Receive the request address information (LBA address information) of the current IO request and the request data length of the current IO request to determine the data region where the corresponding IO request is located. The initial address information can be known according to the request address information, and the termination address information is determined through the request data length and the initial address information to determine the data region occupied by the current IO request.
[0073] Forward the current IO request to the corresponding mirror pair node according to the relationship between the request data region and the multiple data regions. It can be understood that the preferred node corresponding to the mirror pair node is one. By using the mechanism of the data region instead of the volume and the preferred node accessing the data region, the load balancing degree can be improved. If the data length of the current IO request is relatively long and its corresponding request data region spans multiple data regions, in the mirror pair node, one node corresponds to one data region, and there may be a situation of being forwarded to multiple nodes at the same time. If the request data region is one data region, there is no need to forward it to multiple nodes.
[0074] A method for node I / O forwarding in a multi-control cluster provided by an embodiment of the present invention includes: obtaining mirror pair nodes of the multi-control cluster, and dividing a volume corresponding to the multi-control cluster into multiple data regions according to the RAID stripe width and the mirror pair nodes, where the data regions are located within the mirror pair nodes; receiving request address information and request data length of a current I / O request, and determining a corresponding request data region according to the request address information and the request data length; and forwarding the current I / O request to a mirror pair node corresponding to the data region according to the relationship between the request data region and the multiple data regions. This method scatters the volume space according to the stripe width and the mirror pair nodes, and divides it into data regions corresponding to the mirror pair nodes to ensure the load balance within each mirror pair node, and avoid the problem of low load balance caused by the existing method of using only one node to access the current volume with the volume as the granularity. Determine the current request data region according to the request address and data length of the I / O request, and determine the forwarding to the corresponding mirror pair node according to the relationship between the request data region and the data region, avoiding the problem of low efficiency caused by the existing multiple nodes accessing a single volume. Forward to the corresponding mirror pair node according to the data region, and implement a stripeless lock optimization mechanism with the data region as the granularity to improve the availability of the multi-control storage system.
[0075] Based on the above embodiment, processing multiple data blocks according to the number of nodes of the mirror pair nodes to obtain data regions corresponding to the mirror pair nodes includes:
[0076] Performing numbering processing on the mirror pair nodes and the multiple data blocks respectively;
[0077] Using the number of nodes as the divisor, performing modulo operation on the multiple data blocks to obtain corresponding remainders;
[0078] Dividing the data blocks belonging to the remainder into the mirror pair nodes with the same number corresponding to the mirror pair nodes.
[0079] Specifically, number the nodes of the mirror pair nodes. Taking a dual-copy four-control cluster as an example, there are four nodes, numbered 0-3. Perform numbering processing on the multiple data blocks. Using the number of nodes as the divisor, perform modulo operation on the multiple data blocks to obtain corresponding remainders, and divide the data blocks belonging to the remainder into the mirror pair nodes with the same number corresponding to the mirror pair nodes. For example, divide the data block numbered 1 by 4, and the obtained remainder is 1, which corresponds to node 1 of the mirror pair node. Divide the data block numbered 4 by 4, and the obtained remainder is 0, which corresponds to node 0 of the mirror pair node. Divide the regions in sequence until all the data blocks are divided.
[0080] It can be understood that in one node, the corresponding data blocks can form a set. At the same time, in the node, the set exists in a dual-copy form, and a set can include multiple data blocks.
[0081] Figure 3 A schematic diagram of dividing data regions provided by an embodiment of the present invention is as follows Figure 3 As shown, the segments of the multi - control cluster storage system correspond to data blocks. The data blocks are numbered as index values, and those with an index value of 0 are divided into region0 (data region). In node 0 and node 1, region0 exists in a dual - copy form. If the preferred node of its mirror pair for accessing region0 is node 0, when the IO request is for region3, its corresponding mirror pair nodes are node 0 and node 3. Since node 0 is used to access region0, node 3 is used as the preferred node at this time.
[0082] The embodiment of the present invention provides a method for processing multiple data blocks according to the number of nodes of the mirror pair to obtain data regions corresponding to the mirror pair nodes, introducing a new IO forwarding mechanism. Instead of forwarding IO in terms of volumes, it is scattered into data blocks according to the strip width, and the data blocks correspond to data regions. The data regions are used as the granularity for forwarding within the multi - control cluster to ensure load balancing.
[0083] Based on the above - mentioned embodiment, before receiving the request address information and request data length of the current IO request, it further includes:
[0084] Obtaining the online path logic value of the volume corresponding to the multi - control cluster and the mirror pair node logic value;
[0085] Performing a logical AND operation on the online path logic value and the mirror pair node logic value to obtain a first logical value;
[0086] Taking the nodes corresponding to the first logical value as the forwarding target node set of multiple data regions;
[0087] Taking the negation of the first logical value to obtain a second logical value, and taking the nodes corresponding to the second logical value as the forwarding source node set of multiple data regions.
[0088] It can be understood that the logical values corresponding to the online path of the volume fed back by the lower layer and the read - write preferred nodes of each mirror pair are obtained respectively, and a logical AND operation is performed on the two logical values to obtain a first logical value. The first logical value is used as the forwarding target node set of each region (data region). Taking the negation of the first logical value is the forwarding source node set of each region (data region).
[0089] The embodiment provides a method for determining the forwarding source node and forwarding target node of the data region, establishing a mapping relationship between nodes, which is convenient for subsequent forwarding to the corresponding nodes according to the IO request.
[0090] Based on the above - mentioned embodiment, determining the corresponding request data region according to the request address information and request data length includes:
[0091] Obtain the number of bytes occupied by the address information corresponding to the RAID stripe width;
[0092] Obtain the number of bytes occupied by the request address information;
[0093] Perform a modulo operation on the number of bytes occupied by the request address information and the number of bytes occupied by the address information corresponding to the RAID stripe width to obtain the corresponding initial data block;
[0094] Determine the termination data block according to the request data length and the request address information;
[0095] Determine the corresponding request data area according to the relationship between the initial data block and the termination data block.
[0096] Specifically, when an IO is issued to a certain node, the request data area where it is located will be determined according to the address information of the IO to obtain the corresponding forwarding node information. First, obtain the number of LBA addresses in the address information of the RAID stripe width, then obtain the number of bytes of the LBA in the request address information, and the remainder obtained by dividing the request address information by the LBA address information corresponding to the stripe width is the initial data block. The termination data block can be known according to the data length, combined with Figure 3 In, the initial data block and the termination data block are the index values of the segment, and multiple intermediate data blocks corresponding to the relationship between the data block and the termination data block are used as the request data area of the current IO request.
[0097] The present embodiment provides determining the region where the IO is located according to the LBA address information of the IO, so as to facilitate subsequent forwarding to the corresponding mirror pair nodes.
[0098] Combined with the above embodiments, forwarding the current IO request to the mirror pair node corresponding to the data area according to the relationship between the request data area and multiple data areas includes:
[0099] When the initial data block and the termination data block are the same data block, determine that the request data area is one data area;
[0100] Determine the mirror pair node according to the position of the request data area in multiple data areas;
[0101] When the initial data block and the termination data block are not the same data block, determine that the request data area spans multiple data areas;
[0102] Determine the corresponding mirror pair node according to the positions of the multiple data areas spanned.
[0103] It is understandable that, in order to improve the IO efficiency when the current node accesses the data area, one node is accessed following the same stripe width. One segment is one stripe width. If the initial data block and the termination data block span multiple data blocks and it is determined that the requested data area spans multiple data areas, it is necessary to split it into several sub-IOs according to the segment boundary and forward them to the mirror pair nodes respectively. If it is one data area, it is directly forwarded according to the mirror pair node to which the data area belongs.
[0104] The present embodiment provides a method for forwarding the current IO request to the mirror pair node corresponding to the data area according to the relationship between the requested data area and multiple data areas, accessing one node following the same stripe width, and improving the IO efficiency when the current node accesses the data area.
[0105] As mentioned in the above embodiment, the requested data area where the current IO request is located is determined according to the LBA address information of the IO request to obtain the corresponding forwarding node information. As an embodiment, determining the mirror pair node includes:
[0106] Determining the forwarding node information corresponding to the requested data area;
[0107] When the forwarding node information is within the forwarding source node set, obtaining the corresponding forwarding target node according to the forwarding source node set;
[0108] Forwarding the current IO request to the forwarding target node to determine the mirror pair node.
[0109] Specifically, when determining the forwarding node information corresponding to the requested data area, if the current node is in the forwarding source node set, the target node is obtained from the forwarding target node set and forwarded, otherwise it is sent to the lower layer module of the IO stack for further processing.
[0110] The present embodiment provides a method for determining the mirror pair node to determine the forwarding target node, forwarding to the corresponding mirror pair node according to the data area, and implementing a striping lock-free optimization mechanism at the data area granularity to improve the availability of the multi-controller storage system.
[0111] The above has described in detail each embodiment corresponding to the node IO forwarding method of the multi-controller cluster. On this basis, the present invention also discloses a node IO forwarding device of the multi-controller cluster corresponding to the above method. Figure 4 This is a structural diagram of a node IO forwarding device of a multi-controller cluster provided by an embodiment of the present invention. As Figure 4 shown, the node IO forwarding device of the multi-controller cluster includes:
[0112] A partitioning module 11, configured to obtain the mirror pair nodes of the multi-controller cluster, and divide the volume corresponding to the multi-controller cluster into multiple data areas according to the RAID stripe width and the mirror pair nodes, where the data areas are located within the mirror pair nodes;
[0113] A determination module 12, configured to receive request address information and a request data length of a current IO request, and determine a corresponding request data area according to the request address information and the request data length;
[0114] A forwarding module 13, configured to forward the current IO request to a mirror pair node corresponding to the data area according to the relationship between the request data area and multiple data areas.
[0115] Since the embodiments of the apparatus part correspond to the above embodiments, the embodiments of the apparatus part are described with reference to the embodiments of the above method part and will not be repeated here.
[0116] For the introduction of a node IO forwarding apparatus of a multi-control cluster provided by the present invention, please refer to the above method embodiments. The present invention will not be repeated here, and it has the same beneficial effects as the above node IO forwarding method of the multi-control cluster.
[0117] Figure 5 It is a structural diagram of another node IO forwarding apparatus of a multi-control cluster provided by an embodiment of the present invention. As Figure 5 shown, the apparatus includes:
[0118] A memory 21, configured to store a computer program;
[0119] A processor 22, configured to implement the steps of the node IO forwarding method of the multi-control cluster when executing the computer program.
[0120] The node IO forwarding apparatus of the multi-control cluster provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a notebook computer, or a desktop computer, etc.
[0121] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 may be implemented in at least one hardware form of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the Central Processing Unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a Graphics Processing Unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may further include an Artificial Intelligence (AI) processor, and the AI processor is used to process computing operations related to machine learning.
[0122] The memory 21 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 21 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211. After the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the node IO forwarding method of the multi-control cluster disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may further include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include, but is not limited to, the data involved in the node IO forwarding method of the multi-control cluster, etc.
[0123] In some embodiments, the node IO forwarding device of the multi-control cluster may further include a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27.
[0124] Those skilled in the art can understand that Figure 5 the structure shown in
[0125] The processor 22 implements the node IO forwarding method of the multi-control cluster provided in any of the above embodiments by calling the instructions stored in the memory 21.
[0126] For the introduction of a node IO forwarding device of a multi-control cluster provided by the present invention, please refer to the above method embodiments. The present invention will not be elaborated herein, and it has the same beneficial effects as the above node IO forwarding method of the multi-control cluster.
[0127] Furthermore, the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor 22, the steps of the node IO forwarding method of the multi-control cluster as described above are implemented.
[0128] It can be understood that if the method in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0129] For the introduction of a computer-readable storage medium provided by the present invention, please refer to the above method embodiments. The present invention will not be elaborated herein, and it has the same beneficial effects as the above node IO forwarding method of the multi-control cluster.
[0130] As an embodiment, Figure 6 is a flowchart of another node IO forwarding method of the multi-control cluster provided by the embodiment of the present invention. As Figure 6 shown, it includes:
[0131] S21: Divide the volume into several data blocks according to the strip width, and add them to the region0-3 sets in a cycle of four, corresponding to the mirror pairs one by one;
[0132] S22: Obtain the AND operation of the online path of the volume fed back by the lower layer and the preferred nodes of each mirror pair respectively, and calculate the forwarding source node and the target node;
[0133] S23: Receive the IO, and calculate the actual region according to the address information and the data length;
[0134] S24: Determine whether the actual region of the IO crosses regions. If so, proceed to step S25; if not, proceed to step S26;
[0135] S25: Split the sub-IOs, forward them to the corresponding nodes respectively, and respond to the upper layer after all sub-IOs are completed;
[0136] S26: Forward it to the corresponding node in the region it belongs to according to the address information and data length.
[0137] For the introduction of another node IO forwarding method of the multi-control cluster provided by the present invention, please refer to the above method embodiment. The present invention will not elaborate here, and it has the same beneficial effects as the above node IO forwarding method of the multi-control cluster.
[0138] The above has introduced in detail a node IO forwarding method, a node IO forwarding device and a medium of a multi-control cluster provided by the present invention. The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
[0139] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
Claims
1. A node IO forwarding method for a multi-control cluster, characterized in that, Including: Obtain the mirror pair nodes of the multi - control cluster, and divide the volume corresponding to the multi - control cluster into multiple data regions according to the RAID stripe width and the mirror pair nodes, where the data regions are located within the mirror pair nodes; Disassemble the volume space according to the stripe width and the mirror pair nodes, and divide it into data regions corresponding to the mirror pair nodes; Receive the request address information and the request data length of the current IO request, and determine the corresponding request data region according to the request address information and the request data length; Among them, determine the initial data block according to the request address information; Determine the termination data block through the request data length and the initial data block to determine the data region occupied by the current IO request; When the initial data block and the termination data block are not the same data block, forward it to multiple mirror pair nodes; Forward the current IO request to the mirror pair node corresponding to the data region according to the relationship between the request data region and the multiple data regions; Correspondingly, the determining the corresponding request data region according to the request address information and the request data length includes: Obtain the number of bytes occupied by the address information corresponding to the RAID stripe width; Obtain the number of bytes occupied by the request address information; Perform a remainder operation on the number of bytes occupied by the request address information and the number of bytes occupied by the address information corresponding to the RAID stripe width to obtain the corresponding initial data block; Determine the termination data block according to the request data length and the request address information; Determine the corresponding request data region according to the relationship between the initial data block and the termination data block; Correspondingly, determining the mirror pair node includes: Determine the forwarding node information corresponding to the request data region; When the forwarding node information is within the forwarding source node set, obtain the corresponding forwarding target node according to the forwarding source node set; Forward the current IO request to the forwarding target node to determine the mirror pair node.
2. The node IO forwarding method of the multi-control cluster according to claim 1, characterized in that, The dividing the volume corresponding to the multi - control cluster into multiple data regions according to the RAID stripe width and the mirror pair nodes includes: Obtain the width data of the RAID stripe width; Divide the volume corresponding to the multi - control cluster into multiple data blocks according to the width data; Process the multiple data blocks according to the number of nodes of the mirror pair nodes to obtain the data regions corresponding to the mirror pair nodes.
3. The node IO forwarding method of the multi-control cluster according to claim 2, wherein The processing the multiple data blocks according to the number of nodes of the mirror pair nodes to obtain the data regions corresponding to the mirror pair nodes includes: Perform numbering processing on the mirror pair nodes and the multiple data blocks respectively; Use the number of nodes as the divisor, and perform a remainder operation on the multiple data blocks to obtain the corresponding remainders; Divide the data blocks to which the remainders belong into the mirror pair nodes with the same number corresponding to the mirror pair nodes.
4. The node IO forwarding method of the multi-control cluster according to any one of claims 1 to 3, characterized in that, Before receiving the request address information and the request data length of the current IO request, it further includes: Obtain the online path logical value of the volume corresponding to the multi - control cluster and the mirror pair node logical value; Performing a logical AND process on the online path logic value and the mirror pair node logic value to obtain a first logic value; Using the node corresponding to the first logic value as a forwarding target node set of the plurality of data regions; The first logic value is inverted to obtain a second logic value, and a node corresponding to the second logic value is used as a forwarding source node set of the plurality of data regions.
5. The node IO forwarding method of the multi-control cluster according to claim 1, characterized in that The forwarding of the current IO request to the mirror pair node corresponding to the data area according to the relationship between the requested data area and the plurality of data areas comprises: When the initial data block and the termination data block are the same data block, determining that the requested data area is one data area; Determine the mirror pair node according to the location of the requested data area in the plurality of data areas; When the initial data block and the termination data block are not the same data block, determining that the requested data area spans multiple data areas; The corresponding mirror pair nodes are determined according to the locations of the spanned multiple data areas.
6. A node IO forwarding device for a multi-control cluster, characterized in that, include: A partitioning module is used to obtain the mirror pair nodes of the multi-controller cluster, and divide the volume corresponding to the multi-controller cluster into multiple data areas according to the RAID stripe width and the mirror pair nodes, wherein the data area is located in the mirror pair nodes; and break up the volume space according to the stripe width and the mirror pair nodes to divide it into data areas corresponding to the mirror pair nodes; A determination module, configured to receive the request address information and the request data length of the current IO request, and determine the corresponding request data area according to the request address information and the request data length; wherein, an initial data block is determined according to the request address information; a termination data block is determined by the request data length and the initial data block, so as to determine the data area occupied by the current IO request; when the initial data block and the termination data block are not the same data block, forwarding to multiple mirror pair nodes; A forwarding module, configured to forward the current IO request to the mirror pair node corresponding to the data area according to the relationship between the requested data area and the plurality of data areas; Correspondingly, determining the corresponding request data area according to the request address information and the request data length includes: Obtain the number of bytes occupied by the address information corresponding to the RAID stripe width; Obtain the number of bytes occupied by the request address information; Performing modulo processing on the number of bytes occupied by the request address information and the number of bytes occupied by the address information corresponding to the RAID stripe width to obtain a corresponding initial data block; Determine the termination data block according to the request data length and the request address information; Determine the corresponding requested data area according to the relationship between the initial data block and the termination data block; Correspondingly, determining the mirror pair node includes: Determine the forwarding node information corresponding to the requested data area; When the forwarding node information is in the forwarding source node set, obtaining a corresponding forwarding target node according to the forwarding source node set; The current IO request is forwarded to the forwarding target node to determine the mirror pair node.
7. A node IO forwarding device for a multi-control cluster, characterized in that, include: Memory for storing computer programs; A processor for implementing the steps of the node IO forwarding method of the multi-control cluster according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the node IO forwarding method of the multi-control cluster according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Data storage method and device
CN111666043A
Flexibly combining mirroring, concatenation and striping in virtual storage devices
US7434091B1