CN116112498A - A node IO forwarding method, device and medium of a multi-control cluster - Google Patents
A node IO forwarding method, device and medium of a multi-control cluster Download PDFInfo
- Publication number
- CN116112498A CN116112498A CN202310165871.8A CN202310165871A CN116112498A CN 116112498 A CN116112498 A CN 116112498A CN 202310165871 A CN202310165871 A CN 202310165871A CN 116112498 A CN116112498 A CN 116112498A
- Authority
- CN
- China
- Prior art keywords
- node
- request
- data
- mirror pair
- forwarding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种多控集群的节点IO转发方法、装置及介质,适用于网络技术领域。该方法按照条带宽度与镜像对节点将卷空间打散,划分为镜像对节点对应的数据区域,以保证负载在各镜像对节点内的均衡度,避免现有的以卷为粒度,仅使用一个节点访问当前卷,导致的负载均衡度低的问题。根据IO请求的请求地址和数据长度确定当前的请求数据区域,根据请求数据区域与数据区域的关系确定转发至对应的镜像对节点,避免现有的多个节点对单卷进行访问造成的效率低的问题,根据数据区域转发至对应的镜像对节点,以数据区域为粒度实现免条带锁优化机制,提升多控存储系统的可用性。
The invention discloses a node IO forwarding method, device and medium of a multi-control cluster, which are applicable to the field of network technology. This method breaks up the volume space according to the stripe width and the mirror pair nodes, and divides the volume space into data areas corresponding to the mirror pair nodes, so as to ensure the balance of the load in each mirror pair node, and avoid the existing volume-based granularity, which only uses A node accesses the current volume, resulting in low load balancing. Determine the current request data area 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 area and the data area, avoiding the inefficiency caused by existing multiple nodes accessing a single volume According to the problem, the data area is forwarded to the corresponding mirror pair node, and the stripe lock-free optimization mechanism is implemented with the data area as the granularity to improve the availability of the multi-control storage system.
Description
技术领域technical field
本发明涉及网络技术领域,特别是涉及一种多控集群的节点IO转发方法、装置及介质。The present invention relates to the field of network technology, in particular to a node IO forwarding method, device and medium of a multi-control cluster.
背景技术Background technique
近年来,在存储领域中,单镜像对双副本的双控存储设备逐渐不能满足高端存储系统的可用性及安全性要求。In recent years, in the field of storage, dual-controller storage devices with single-mirror and dual-copy cannot meet the availability and security requirements of high-end storage systems.
图1为现有的双副本四控集群存储系统访问单卷的示意图,如图1所示,随着存储系统的节点增加,若如原来只能由单镜像对内的优选节点访问单卷的机制,会出现负载均衡程度较低。若采取多个节点访问单卷,但会由于后端磁盘阵列(Redundant Arrays ofIndependent Disks,RAID)条带锁机制限制多个节点对单卷进行访问的输入输出(InputOutput,IO)效率。Figure 1 is a schematic diagram of the existing dual-copy four-control cluster storage system accessing a single volume. As shown in Figure 1, with the increase of nodes in the storage system, if only the preferred node in the single-mirror pair can access the single-volume Mechanism, there will be a lower degree of load balancing. If multiple nodes are used to access a single volume, the input and output (IO) efficiency of multiple nodes accessing a single volume will be limited due to the back-end disk array (Redundant Arrays of Independent Disks, RAID) stripe lock mechanism.
因此,寻求一种多控集群的节点IO转发方法是本领域技术人员亟需要解决的。Therefore, it is urgent for those skilled in the art to seek a node IO forwarding method for a multi-control cluster.
发明内容Contents of the invention
本发明的目的是提供一种多控集群的节点IO转发方法、装置及介质,以数据区域为粒度实现免条带锁优化机制,提升多控存储系统的可用性。The purpose of the present invention is to provide a node IO forwarding method, device and medium of a multi-control cluster, to implement a stripe-lock-free optimization mechanism at the granularity of the data area, and to improve the usability of a multi-control storage system.
为解决上述技术问题,本发明提供一种多控集群的节点IO转发方法,包括:In order to solve the above technical problems, the present invention provides a node IO forwarding method of a multi-control cluster, including:
获取所述多控集群的镜像对节点,并根据RAID条带宽度和所述镜像对节点将所述多控集群对应的卷划分为多个数据区域,其中所述数据区域位于所述镜像对节点内;Obtain the mirror pair node 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 node, wherein the data area is located at the mirror pair node Inside;
接收当前IO请求的请求地址信息和请求数据长度,并根据所述请求地址信息与所述请求数据长度确定对应的请求数据区域;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;
根据所述请求数据区域与多个所述数据区域的关系对所述当前IO请求转发至与所述数据区域对应的所述镜像对节点。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 the plurality of data areas.
优选地,所述根据RAID条带宽度和所述镜像对节点将所述多控集群对应的卷划分为多个数据区域,包括:Preferably, the volume corresponding to the multi-control cluster is divided into multiple data areas according to the RAID stripe width and the mirror pair node, including:
获取所述RAID条带宽度的宽度数据;Obtain the width data of the RAID stripe width;
根据所述宽度数据对所述多控集群对应的卷划分为多个数据块;dividing the volume corresponding to the multi-control cluster into multiple data blocks according to the width data;
根据所述镜像对节点的节点数对多个所述数据块进行处理得到与所述镜像对节点对应的所述数据区域。Processing the multiple data blocks according to the node number of the mirror pair node to obtain the data area corresponding to the mirror pair node.
优选地,所述根据所述镜像对节点的节点数对多个所述数据块进行处理得到与所述镜像对节点对应的所述数据区域,包括:Preferably, the processing of multiple data blocks according to the number of nodes of the mirror pair node to obtain the data area corresponding to the mirror pair node includes:
对所述镜像对节点和多个所述数据块分别进行编号处理;Perform numbering processing on the mirror pair node and the plurality of data blocks respectively;
以所述节点数作除数,将多个所述数据块进行取余处理得到对应的余数;Using the number of nodes as a divisor, performing remainder processing on a plurality of the data blocks to obtain a corresponding remainder;
根据所述余数所属的所述数据块划分至所述镜像对节点对应的编号相同的所述镜像对节点。Divide the data block to which the remainder belongs to the mirror pair node corresponding to the mirror pair node with the same number.
优选地,在所述接收当前IO请求的请求地址信息和请求数据长度之前,还包括:Preferably, before receiving the request address information and request data length of the current IO request, it also includes:
获取所述多控集群对应的卷的在线路径逻辑值以及所述镜像对节点逻辑值;Obtain the online path logic value of the volume corresponding to the multi-control cluster and the mirror pair node logic value;
将所述在线路径逻辑值与所述镜像对节点逻辑值进行逻辑与处理得到第一逻辑值;performing logical AND processing on the online path logical value and the mirror image pair node logical value to obtain a first logical value;
将所述第一逻辑值对应的节点作为多个所述数据区域的转发目标节点集合;taking the node corresponding to the first logic value as a set of forwarding target nodes of the multiple data areas;
将所述第一逻辑值取反得到第二逻辑值,并将所述第二逻辑值对应的节点作为多个所述数据区域的转发源节点集合。Inverting the first logical value to obtain a second logical value, and using the nodes corresponding to the second logical value as a set of forwarding source nodes of the multiple data areas.
优选地,所述根据所述请求地址信息与所述请求数据长度确定对应的请求数据区域,包括:Preferably, determining the corresponding request data area according to the request address information and the request data length includes:
获取所述RAID条带宽度对应的地址信息占用的字节数;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;
将所述请求地址信息占用的字节数与所述RAID条带宽度对应的地址信息占用的字节数进行取余处理得到对应的初始数据块;performing remainder processing on the number of bytes occupied by the requested 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;
根据所述请求数据长度与所述请求地址信息确定终止数据块;determining a 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 terminated data block.
优选地,所述根据所述请求数据区域与多个所述数据区域的关系对所述当前IO请求转发至与所述数据区域对应的所述镜像对节点,包括:Preferably, 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 multiple data areas includes:
当所述初始数据块和所述终止数据块为同一个数据块时,确定所述请求数据区域为一个数据区域;When the initial data block and the termination data block are the same data block, determining that the requested data area is a data area;
根据所述请求数据区域在多个所述数据区域的位置确定所述镜像对节点;determining the mirror pair node according to the positions of the requested data area in the plurality of data areas;
当所述初始数据块和所述终止数据块不为同一个数据块时,确定所述请求数据区域跨越多个数据区域;When the initial data block and the terminating data block are not the same data block, determine that the requested data area spans multiple data areas;
根据跨越的多个数据区域的位置确定对应的所述镜像对节点。The corresponding mirror pair node is determined according to the positions of the spanning multiple data areas.
优选地,确定所述镜像对节点,包括:Preferably, determining the mirror pair node includes:
确定所述请求数据区域对应的转发节点信息;determining forwarding node information corresponding to the requested data area;
当所述转发节点信息在所述转发源节点集合内时,根据所述转发源节点集合获取对应的转发目标节点;When the forwarding node information is in the forwarding source node set, obtain a corresponding forwarding target node according to the forwarding source node set;
将所述当前IO请求转发至所述转发目标节点以确定所述镜像对节点。Forwarding the current IO request to the forwarding target node to determine the mirror pair node.
为解决上述技术问题,本发明还提供一种多控集群的节点IO转发装置,包括:In order to solve the above technical problems, the present invention also provides a node IO forwarding device of a multi-control cluster, including:
划分模块,用于获取所述多控集群的镜像对节点,并根据RAID条带宽度和所述镜像对节点将所述多控集群对应的卷划分为多个数据区域,其中所述数据区域位于所述镜像对节点内;A division 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 at In the mirror pair node;
确定模块,用于接收当前IO请求的请求地址信息和请求数据长度,并根据所述请求地址信息与所述请求数据长度确定对应的请求数据区域;A determining module, configured to receive request address information and request data length of the current IO request, and determine a corresponding request data area according to the request address information and the request data length;
转发模块,用于根据所述请求数据区域与多个所述数据区域的关系对所述当前IO请求转发至与所述数据区域对应的所述镜像对节点。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 a plurality of the data areas.
为解决上述技术问题,本发明还提供一种多控集群的节点IO转发装置,包括:In order to solve the above technical problems, the present invention also provides a node IO forwarding device of a multi-control cluster, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行所述计算机程序时实现如上述所述的多控集群的节点IO转发方法的步骤。The processor is configured to implement the steps of the node IO forwarding method of the multi-control cluster as described above when executing the computer program.
为解决上述技术问题,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述所述的多控集群的节点IO转发方法的步骤。In order to solve the above-mentioned technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned multi-control cluster The steps of the node IO forwarding method.
本发明提供的一种多控集群的节点IO转发方法,包括:获取多控集群的镜像对节点,并根据RAID条带宽度和镜像对节点将多控集群对应的卷划分为多个数据区域,其中数据区域位于镜像对节点内;接收当前IO请求的请求地址信息和请求数据长度,并根据请求地址信息与请求数据长度确定对应的请求数据区域;根据请求数据区域与多个数据区域的关系对当前IO请求转发至与数据区域对应的镜像对节点。该方法按照条带宽度与镜像对节点将卷空间打散,划分为镜像对节点对应的数据区域,以保证负载在各镜像对节点内的均衡度,避免现有的以卷为粒度,仅使用一个节点访问当前卷,导致的负载均衡度低的问题。根据IO请求的请求地址和数据长度确定当前的请求数据区域,根据请求数据区域与数据区域的关系确定转发至对应的镜像对节点,避免现有的多个节点对单卷进行访问造成的效率低的问题,根据数据区域转发至对应的镜像对节点,以数据区域为粒度实现免条带锁优化机制,提升多控存储系统的可用性。A node IO forwarding method of a multi-control cluster provided by the present invention includes: obtaining a mirror pair node of the multi-control cluster, and dividing the volume corresponding to the multi-control cluster into multiple data areas according to the RAID stripe width and the mirror pair node, The data area is located in the mirror pair node; receive the request address information and request data length of the current IO request, and determine the corresponding request data area according to the request address information and request data length; pair according to the relationship between the request data area and multiple data areas The current IO request is forwarded to the mirror pair node corresponding to the data area. This method breaks up the volume space according to the stripe width and the mirror pair nodes, and divides the volume space into data areas corresponding to the mirror pair nodes, so as to ensure the balance of the load in each mirror pair node, avoiding the existing volume-based granularity, and only using A node accesses the current volume, resulting in low load balancing. Determine the current request data area 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 area and the data area, avoiding the inefficiency caused by existing multiple nodes accessing a single volume According to the problem, the data area is forwarded to the corresponding mirror pair node, and the stripe lock-free optimization mechanism is implemented with the data area as the granularity to improve the availability of the multi-control storage system.
另外,本发明还提供了一种多控集群的节点IO转发装置及介质,具有如上述多控集群的节点IO转发方法相同的有益效果。In addition, the present invention also provides a multi-control cluster node IO forwarding device and medium, which have the same beneficial effect as the above-mentioned multi-control cluster node IO forwarding method.
附图说明Description of drawings
为了更清楚地说明本发明实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. As far as people are concerned, other drawings can also be obtained based on these drawings on the premise of not paying creative work.
图1为现有的双副本四控集群存储系统访问单卷的示意图;FIG. 1 is a schematic diagram of accessing a single volume by an existing dual-copy four-control cluster storage system;
图2为本发明实施例提供的一种多控集群的节点IO转发方法的流程图;FIG. 2 is a flow chart of a node IO forwarding method of a multi-control cluster provided by an embodiment of the present invention;
图3为本发明实施例提供的一种划分数据区域的示意图;FIG. 3 is a schematic diagram of dividing a data area provided by an embodiment of the present invention;
图4为本发明实施例提供的一种多控集群的节点IO转发装置的结构图;FIG. 4 is a structural diagram of a node IO forwarding device of a multi-control cluster provided by an embodiment of the present invention;
图5为本发明实施例提供的另一种多控集群的节点IO转发装置的结构图;FIG. 5 is a structural diagram of another multi-control cluster node IO forwarding device provided by an embodiment of the present invention;
图6为本发明实施例提供的另一种多控集群的节点IO转发方法的流程图。FIG. 6 is a flow chart of another node IO forwarding method of a multi-control cluster provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本发明保护范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明的核心是提供一种多控集群的节点IO转发方法、装置及介质,以数据区域为粒度实现免条带锁优化机制,提升多控存储系统的可用性。The core of the present invention is to provide a node IO forwarding method, device and medium of a multi-control cluster, which implements a stripe lock-free optimization mechanism at the granularity of the data area, and improves the usability of a multi-control storage system.
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。In order 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 embodiments.
需要说明的是,RAID向操作系统提供的是卷,是连续的扇区空间,而卷向文件系统所展示的是分区,相对于卷,分区就是将大片连续地址再次切开。RAID条带锁机制是在多个节点对单卷访问时,需要等到锁的权限,使得访问IO效率降低,尤其在业务端对存储设备的性能要求持续升级,若以该IO效率是无法接受的。本发明提供的多控集群的节点IO转发方法,可解决上述技术问题,以保证负载均衡的前提下进行免条带锁优化。It should be noted that what RAID provides to the operating system is a volume, which is continuous sector space, and what the volume presents to the file system is a partition. Compared with a volume, a partition is to divide a large continuous address again. The RAID stripe lock mechanism is that when multiple nodes access a single volume, they need to wait for the lock permission, which reduces the access IO efficiency, especially on the business side. The performance requirements of the storage device are continuously upgraded. If the IO efficiency is unacceptable . The node IO forwarding method of the multi-control cluster provided by the present invention can solve the above-mentioned technical problems, so as to perform strip lock-free optimization under the premise of ensuring load balance.
图2为本发明实施例提供的一种多控集群的节点IO转发方法的流程图,如图2所示,该方法包括:FIG. 2 is a flow chart of a node IO forwarding method of a multi-control cluster provided by an embodiment of the present invention. As shown in FIG. 2 , the method includes:
S11:获取多控集群的镜像对节点,并根据RAID条带宽度和镜像对节点将多控集群对应的卷划分为多个数据区域,其中数据区域位于镜像对节点内;S11: Obtain the mirror pair node 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 node, wherein the data area is located in the mirror pair node;
S12:接收当前IO请求的请求地址信息和请求数据长度,并根据请求地址信息与请求数据长度确定对应的请求数据区域;S12: Receive the request address information and 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;
S13:根据请求数据区域与多个数据区域的关系对当前IO请求转发至与数据区域对应的镜像对节点。S13: According to the relationship between the requested data area and multiple data areas, the current IO request is forwarded to the mirror pair node corresponding to the data area.
具体地,获取多控集群的镜像对节点,对于多控集群可以是双副本四控集群,也可以是双副本双控集群,在此不做限定。为实现系统的高可用性服务,解决一台服务器出现故障,由其他服务器接管应用,从而持续可靠提供服务,集群软件与双机软件不同,可以支持多台服务器工作,同时部署多个应用,并在多个服务器间灵活设置接管策略。对于镜像对,根据多控集群的不同,其镜像对的数量不同,例如双副本四控集群,为4个镜像对,对应4个节点,其镜像对分别为:节点0和节点1;节点1和节点2;节点2和节点3;节点3和节点0。双副本双控集群,为2个镜像对,节点0和节点1。Specifically, to obtain the mirror pair node of the multi-control cluster, the multi-control cluster may be a dual-copy four-control cluster, or a double-copy dual-control cluster, which is not limited here. In order to realize the high availability service of the system and solve the problem of one server failure, other servers will take over the application, so as to provide continuous and reliable services. The cluster software is different from the dual-machine software. Flexible setting of takeover policies among multiple servers. For mirror pairs, the number of mirror pairs varies depending on the multi-control cluster. For example, a dual-copy four-control cluster has 4 mirror pairs, corresponding to 4 nodes. The mirror pairs are:
根据RAID条带宽度和镜像对节点对多控集群对应的卷进行划分,现有的以卷为粒度进行IO转发,在本实施例中,根据条带宽度将卷打散,分散到多控集群的多个节点以便于提高负载均衡度。对应的划分依据以RAID条带宽度划分,可以以条带宽度的带宽数据对齐进行划分,还可以根据节点的数量进行划分。基于RAID条带锁机制,同一个条带宽度对应一个节点访问,作为一种实施例,以RAID条带宽度划分卷。According to the RAID stripe width and mirroring, the nodes are divided into the volumes corresponding to the multi-control cluster. The existing volume is used as the granularity for IO forwarding. In this embodiment, the volumes are broken up according to the stripe width and distributed to the multi-control cluster. Multiple nodes in order to improve load balancing. The corresponding division is based on the RAID stripe width, which can be divided according to the bandwidth data alignment of the stripe width, or can 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 by the RAID stripe width.
作为一种实施方式,根据RAID条带宽度和镜像对节点将多控集群对应的卷划分为多个数据区域,包括:As an implementation manner, the volume corresponding to the multi-controller cluster is divided into multiple data areas according to the RAID stripe width and mirror pair nodes, including:
获取RAID条带宽度的宽度数据;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;
根据镜像对节点的节点数对多个数据块进行处理得到与镜像对节点对应的数据区域。The multiple data blocks are processed according to the number of nodes of the mirror pair node to obtain a data area corresponding to the mirror pair node.
具体地,获取RAID条带宽度的宽度数据,其宽度数据为占用的空间,将根据宽度数据对卷划分为多个数据块。例如后端RAID条带宽度为32M,将条带宽度对齐,卷按照32M分割成若干个数据块,需要将数据块归置至各镜像对节点,即根据镜像对节点的节点数对多个数据块进行处理得到与镜像对节点对应的数据区域。Specifically, the width data of the RAID stripe width is obtained, and the width data is the occupied space, and the volume is divided into multiple data blocks according to the width data. For example, the back-end RAID stripe width is 32M. Align the stripe width and divide the volume into several data blocks according to 32M. The data blocks need to be assigned to each mirror pair node. The block is processed to obtain the data area corresponding to the mirror pair node.
需要说明的是,数据区域在多控集群中,采用双副本形式,若存在4个数据区域,其每个节点对应的数据区域均为2个以实现双副本。It should be noted that in the multi-controller cluster, the data area adopts the form of double copy. If there are 4 data areas, each node corresponds to 2 data areas to realize double copy.
接收当前IO请求的请求地址信息和请求数据长度,现有的管理IO协调文件系统、卷、磁盘驱动程序之间的运作,IO管理将请求发送至文件系统模块,文件系统将某个文件对应的逻辑偏移映射成卷的LBA地址偏移并通过IO请求调用卷管理磁盘驱动接口,文件系统向IO管理请求调用卷管理软件的接口。卷管理软件将卷对应的LBA地址偏移翻译映射成实际物理磁盘对应的LBA地址偏移,并请求调用磁盘控制器驱动程序。IO管理请求调用磁盘控制器驱动程序。将对应的LBA地址段的数据从内存写入某物理磁盘。本实施例与现有的IO过程相同,仅是卷的部分对应的LBA地址信息需要通过IO请求确定。Receive the request address information and request data length of the current IO request. The existing management IO coordinates the operation between the file system, volume, and disk driver. The IO management sends the request to the file system module, and the file system sends the file corresponding to the The logical offset is mapped to the LBA address offset of the volume, and the interface of the volume management disk driver is called through the IO request, and the file system calls the interface of the volume management software for the IO management request. 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. IO management requests call the disk controller driver. Write the data of the corresponding LBA address segment from the memory to a physical disk. This embodiment is the same as the existing IO process, only the LBA address information corresponding to part of the volume needs to be determined through the IO request.
接收当前IO请求的请求地址信息(LBA地址信息)和当前IO请求的请求数据长度,以确定对应的IO请求所在的数据区域。根据请求地址信息可以知道初始地址信息,通过请求数据长度与初始地址信息确定终止地址信息,以确定当前IO请求占用的数据区域。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 area 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 area occupied by the current IO request.
根据请求数据区域与多个数据区域的关系对当前IO请求转发至对应的镜像对节点。可以理解的是,镜像对节点对应的优选节点为一个,通过数据区域代替卷,优选节点访问数据区域的机制,以提高负载均衡度。若当前IO请求的数据长度较长,其对应的请求数据区域跨越多个数据区域,在镜像对节点中,一个节点对应一个数据区域,可能存在同时转发至多个节点的情况。若请求数据区域为一个数据区域,则无需转发至多个节点。According to the relationship between the requested data area and multiple data areas, the current IO request is forwarded to the corresponding mirror pair node. It can be understood that there is only one preferred node corresponding to the mirror pair node, and the data area is used instead of the volume, and the preferred node accesses the data area mechanism to improve the load balance. If the data length of the current IO request is long, and the corresponding requested data area spans multiple data areas, in the mirror pair node, one node corresponds to one data area, which may be forwarded to multiple nodes at the same time. If the requested data area is a data area, it does not need to be forwarded to multiple nodes.
本发明实施例提供的一种多控集群的节点IO转发方法,包括:获取多控集群的镜像对节点,并根据RAID条带宽度和镜像对节点将多控集群对应的卷划分为多个数据区域,其中数据区域位于镜像对节点内;接收当前IO请求的请求地址信息和请求数据长度,并根据请求地址信息与请求数据长度确定对应的请求数据区域;根据请求数据区域与多个数据区域的关系对当前IO请求转发至与数据区域对应的镜像对节点。该方法按照条带宽度与镜像对节点将卷空间打散,划分为镜像对节点对应的数据区域,以保证负载在各镜像对节点内的均衡度,避免现有的以卷为粒度,仅使用一个节点访问当前卷,导致的负载均衡度低的问题。根据IO请求的请求地址和数据长度确定当前的请求数据区域,根据请求数据区域与数据区域的关系确定转发至对应的镜像对节点,避免现有的多个节点对单卷进行访问造成的效率低的问题,根据数据区域转发至对应的镜像对节点,以数据区域为粒度实现免条带锁优化机制,提升多控存储系统的可用性。A node IO forwarding method of a multi-control cluster provided by an embodiment of the present invention includes: obtaining a mirror pair node of a multi-control cluster, and dividing the volume corresponding to the multi-control cluster into multiple data according to the RAID stripe width and the mirror pair node Area, wherein the data area is located in the mirror pair node; receive the request address information and request data length of the current IO request, and determine the corresponding request data area according to the request address information and request data length; according to the request data area and multiple data areas The current IO request of the relationship pair is forwarded to the mirror pair node corresponding to the data area. This method breaks up the volume space according to the stripe width and the mirror pair nodes, and divides the volume space into data areas corresponding to the mirror pair nodes, so as to ensure the balance of the load in each mirror pair node, avoiding the existing volume-based granularity, and only using A node accesses the current volume, resulting in low load balancing. Determine the current request data area 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 area and the data area, avoiding the inefficiency caused by existing multiple nodes accessing a single volume According to the problem, the data area is forwarded to the corresponding mirror pair node, and the stripe lock-free optimization mechanism is implemented with the data area as the granularity to improve the availability of the multi-control storage system.
在上述实施例的基础上,根据镜像对节点的节点数对多个数据块进行处理得到与镜像对节点对应的数据区域,包括:On the basis of the foregoing embodiments, according to the number of nodes of the mirror pair node, a plurality of data blocks are processed to obtain the data area corresponding to the mirror pair node, including:
对镜像对节点和多个数据块分别进行编号处理;Number the mirror pair nodes and multiple data blocks separately;
以节点数作除数,将多个数据块进行取余处理得到对应的余数;Use the number of nodes as the divisor, and perform remainder processing on multiple data blocks to obtain the corresponding remainder;
根据余数所属的数据块划分至镜像对节点对应的编号相同的镜像对节点。According to the data block to which the remainder belongs, it is divided into the mirror pair node corresponding to the mirror pair node with the same number.
具体地,对镜像对节点的节点进行编号,以双副本四控集群为例,存在四个节点,其编号为0-3。对多个数据块进行编号处理,以节点数作除数,将多个数据块进行取余处理得到对应的余数,根据余数所述的数据块划分至镜像对节点对应编号相同的镜像对节点中。例如,对编号1的数据块除以4,得到的余数为1,则对应于镜像对节点的节点1,对编号4的数据块除以4,得到的余数为0,则对应于镜像对节点的节点0。依次进行划分区域直至将其数据块划分完毕。Specifically, the nodes of the mirroring pair nodes are numbered. Taking a dual-copy four-controller cluster as an example, there are four nodes whose numbers are 0-3. Perform numbering processing on multiple data blocks, use the number of nodes as a divisor, perform remainder processing on multiple data blocks to obtain the corresponding remainder, and divide the data blocks described by the remainder into mirror pair nodes with the same number corresponding to the mirror pair nodes. For example, if the data block numbered 1 is divided by 4 and the remainder is 1, it corresponds to
可以理解的是,在一个节点中,对应的数据块可以组成一个集合的形式,同时,在节点中,其集合以双副本形式存在,一个集合中可以包括多个数据块。It can be understood that in a node, the corresponding data blocks can form a set, and at the same time, in the node, the set exists in the form of double copies, and a set can include multiple data blocks.
图3为本发明实施例提供的一种划分数据区域的示意图,如图3所示,多控集群存储系统的segment对应数据块,对数据块进行编号作为索引值,将索引值为0的划分为region0(数据区域)中。在节点0和节点1中,region0以双副本形式存在,其镜像对节点的优选节点若为节点0对region0访问,当IO请求为region3时,其对应的镜像对节点的节点0和3,由于访问region0采用的为节点0,则此时采用节点3作为优选节点。Fig. 3 is a schematic diagram of a partitioned data area provided by an embodiment of the present invention. As shown in Fig. 3, the segments of the multi-control cluster storage system correspond to data blocks, and the data blocks are numbered as index values, and the partitions with an index value of 0 It is in region0 (data region). In
本发明实施例提供的根据镜像对节点的节点数对多个数据块进行处理得到与镜像对节点对应的数据区域,引入一种新的IO转发机制,不再以卷为粒度进行IO转发,而是按条带宽度将其打散为数据块,数据块对应数据区域,以数据区域为粒度在多控集群内进行转发,以此保证负载均衡。According to the number of nodes of the mirror pair node provided by the embodiment of the present invention, multiple data blocks are processed to obtain the data area corresponding to the mirror pair node, a new IO forwarding mechanism is introduced, and the IO forwarding is no longer performed at the granularity of the volume, but It is broken up into data blocks according to the width of the stripe, and the data blocks correspond to the data area, and the data area is used as the granularity to forward in the multi-control cluster to ensure load balance.
在上述实施例的基础上,在接收当前IO请求的请求地址信息和请求数据长度之前,还包括:On the basis of the above embodiments, before receiving the request address information and request data length of the current IO request, it also includes:
获取多控集群对应的卷的在线路径逻辑值以及镜像对节点逻辑值;Obtain the online path logic value of the volume corresponding to the multi-controller cluster and the mirror pair node logic value;
将在线路径逻辑值与镜像对节点逻辑值进行逻辑与处理得到第一逻辑值;performing logical AND processing on the online path logical value and the mirror image pair node logical value to obtain the first logical value;
将第一逻辑值对应的节点作为多个数据区域的转发目标节点集合;Taking the node corresponding to the first logical value as a set of forwarding target nodes of multiple data areas;
将第一逻辑值取反得到第二逻辑值,并将第二逻辑值对应的节点作为多个数据区域的转发源节点集合。The second logical value is obtained by inverting the first logical value, and the node corresponding to the second logical value is used as a set of forwarding source nodes of the multiple data areas.
可以理解的是,获取下层反馈的卷的在线路径与各个镜像对的读写优选节点分别对应的逻辑值,将两个逻辑值进行逻辑与处理得到第一逻辑值,第一逻辑值作为每个region(数据区域)的转发目标节点集合。将第一逻辑值取反即为每个region(数据区域)的转发源节点集合。It can be understood that the logical value corresponding to the online path of the volume fed back by the lower layer and the read-write preferred node of each mirror pair is obtained, and the two logical values are logically ANDed to obtain the first logical value, which is used as each A collection of forwarding target nodes for a region (data region). Inverting the first logical value is the set of forwarding source nodes for each region (data region).
本实施例提供的确定数据区域的转发源节点和转发目标节点,使得节点之间建立一种映射关系,便于后续的根据IO请求进行转发至对应的节点。The forwarding source node and the forwarding target node of the data area provided in this embodiment are determined, so that a mapping relationship is established between the nodes, which facilitates subsequent forwarding to the corresponding node according to the IO request.
在上述实施例的基础上,根据请求地址信息与请求数据长度确定对应的请求数据区域,包括:On the basis of the above-mentioned embodiments, the corresponding request data area is determined according to the request address information and the request data length, including:
获取RAID条带宽度对应的地址信息占用的字节数;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;
将请求地址信息占用的字节数与RAID条带宽度对应的地址信息占用的字节数进行取余处理得到对应的初始数据块;Perform remainder processing on the number of bytes occupied by the requested 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 request address information;
根据初始数据块和终止数据块的关系确定对应的请求数据区域。The corresponding requested data area is determined according to the relationship between the initial data block and the terminated data block.
具体地,当IO下发至某个节点时,会根据IO的地址信息确定所在的请求数据区域以获取对应的转发节点信息。先获取RAID条带宽度的地址信息中有多少LBA地址的数量,再获取请求地址信息中LBA的字节数,将请求地址信息除以条带宽度对应的LBA的地址信息得到的余数为初始数据块。根据数据长度可以知道终止数据块,结合图3中,初始数据块和终止数据块为segment的索引值,通过数据块和终止数据块的关系对应的中间的多个数据块作为当前IO请求的请求数据区域。Specifically, when an IO is delivered to a certain node, the requested data area is determined according to the address information of the IO to obtain corresponding forwarding node information. First obtain the number of LBA addresses in the address information of the RAID stripe width, and then obtain the number of bytes of the LBA in the requested address information, divide the requested address information by the address information of the LBA corresponding to the stripe width, and obtain the remainder as the initial data piece. The termination data block can be known according to the data length. In combination with Figure 3, the initial data block and the termination data block are the index values of the segment, and the multiple data blocks in the middle corresponding to the relationship between the data block and the termination data block are used as the request for the current IO request. data area.
本实施例提供的根据IO的LBA地址信息确定其所在region,以便于后续转发至对应的镜像对节点中。The region where the IO is located is determined according to the LBA address information of the IO provided in this embodiment, so as to facilitate subsequent forwarding to the corresponding mirror pair node.
结合上述实施例,根据请求数据区域与多个数据区域的关系将当前IO请求转发至与数据区域对应的镜像对节点,包括:In combination with the above embodiments, 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 multiple data areas, including:
当初始数据块和终止数据块为同一个数据块时,确定请求数据区域为一个数据区域;When the initial data block and the termination data block are the same data block, determine that the requested data area is a data area;
根据请求数据区域在多个数据区域的位置确定镜像对节点;Determine the mirror pair node according to the location of the requested data area in multiple data areas;
当初始数据块和终止数据块不为同一个数据块时,确定请求数据区域跨越多个数据区域;When the initial data block and the termination data block are not the same data block, it is determined that the requested data area spans multiple data areas;
根据跨越的多个数据区域的位置确定对应的镜像对节点。The corresponding mirror pair nodes are determined according to the positions of the spanning multiple data areas.
可以理解的是,为了提高当前节点对数据区域访问时的IO效率,遵循同一个条带宽访问一个节点。一个segment为一个条带宽度。若初始数据块和终止数据块中间跨越多个数据块,其确定请求数据区域跨越多个数据区域,则需要根据segment分界线将其拆分为数个子IO,分别转发至镜像对节点。若为一个数据区域,则直接根据该数据区域所属的镜像对节点进行转发。It can be understood that, in order to improve the IO efficiency when the current node accesses the data area, a node is accessed according to the same stripe bandwidth. A segment is a 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 needs to be split into several sub-IOs according to the segment boundary and forwarded to the mirror pair node respectively. If it is a data area, forward the nodes directly according to the image to which the data area belongs.
本实施例提供的根据请求数据区域与多个数据区域的关系将当前IO请求转发至与数据区域对应的镜像对节点,遵循同一个条带宽访问一个节点,提高当前节点对数据区域访问时的IO效率。According to the relationship between the requested data area and multiple data areas provided in this embodiment, the current IO request is forwarded to the mirror pair node corresponding to the data area, and a node is accessed according to the same strip bandwidth, so as to improve the IO when the current node accesses the data area efficiency.
在上述实施例中提到,根据IO请求的LBA地址信息确定其所在的请求数据区域,以获取相应的转发节点信息,作为一种实施例,确定镜像对节点,包括:As mentioned in the above-mentioned embodiment, according to the LBA address information of the IO request, the request data area where it is located is determined to obtain the corresponding forwarding node information. As an embodiment, the mirror pair node is determined, including:
确定请求数据区域对应的转发节点信息;Determine the forwarding node information corresponding to the requested data area;
当转发节点信息在转发源节点集合内时,根据转发源节点集合获取对应的转发目标节点;When the forwarding node information is in the forwarding source node set, the corresponding forwarding target node is obtained according to the forwarding source node set;
将当前IO请求转发至转发目标节点以确定镜像对节点。Forward the current IO request to the forwarding target node to determine the mirror pair node.
具体地,确定请求数据区域对应的转发节点信息,当前节点在转发源节点集合中,则从转发目标节点集合获取目标节点并转发,否则下发到IO栈下层模块继续处理。Specifically, determine the forwarding node information corresponding to the requested data area, if the current node is in the forwarding source node set, then obtain the target node from the forwarding target node set and forward it, otherwise send it to the lower module of the IO stack to continue processing.
本实施例提供的确定镜像对节点以确定转发目标节点,根据数据区域转发至对应的镜像对节点,以数据区域为粒度实现免条带锁优化机制,提升多控存储系统的可用性。The mirror pair node provided in this embodiment is determined to determine the forwarding target node, forwarded to the corresponding mirror pair node according to the data area, and the stripe lock-free optimization mechanism is implemented with the data area as the granularity, and the availability of the multi-control storage system is improved.
上述详细描述了多控集群的节点IO转发方法对应的各个实施例,在此基础上,本发明还公开与上述方法对应的多控集群的节点IO转发装置,图4为本发明实施例提供的一种多控集群的节点IO转发装置的结构图。如图4所示,多控集群的节点IO转发装置包括:The above describes in detail the various embodiments corresponding to the node IO forwarding method of the multi-control cluster. On this basis, the present invention also discloses the node IO forwarding device of the multi-control cluster corresponding to the above method. FIG. 4 is provided by the embodiment of the present invention A structural diagram of a node IO forwarding device of a multi-control cluster. As shown in Figure 4, the node IO forwarding device of the multi-control cluster includes:
划分模块11,用于获取多控集群的镜像对节点,并根据RAID条带宽度和镜像对节点将多控集群对应的卷划分为多个数据区域,其中数据区域位于镜像对节点内;The dividing
确定模块12,用于接收当前IO请求的请求地址信息和请求数据长度,并根据请求地址信息与请求数据长度确定对应的请求数据区域;Determining
转发模块13,用于根据请求数据区域与多个数据区域的关系对当前IO请求转发至与数据区域对应的镜像对节点。The
由于装置部分的实施例与上述的实施例相互对应,因此装置部分的实施例请参照上述方法部分的实施例描述,在此不再赘述。Since the embodiment of the device part corresponds to the above-mentioned embodiments, please refer to the description of the embodiments of the above-mentioned method part for the embodiment of the device part, and details are not repeated here.
对于本发明提供的一种多控集群的节点IO转发装置的介绍请参照上述方法实施例,本发明在此不再赘述,其具有上述多控集群的节点IO转发方法相同的有益效果。For the introduction of a multi-control cluster node IO forwarding device provided by the present invention, please refer to the above method embodiment, and the present invention will not repeat it here, and it has the same beneficial effect as the above-mentioned multi-control cluster node IO forwarding method.
图5为本发明实施例提供的另一种多控集群的节点IO转发装置的结构图,如图5所示,该装置包括:FIG. 5 is a structural diagram of another multi-control cluster node IO forwarding device provided by an embodiment of the present invention. As shown in FIG. 5, the device includes:
存储器21,用于存储计算机程序;Memory 21, used to store computer programs;
处理器22,用于执行计算机程序时实现多控集群的节点IO转发方法的步骤。The processor 22 is configured to implement the steps of the node IO forwarding method of the multi-control cluster when executing the computer program.
本实施例提供的多控集群的节点IO转发装置可以包括但不限于智能手机、平板电脑、笔记本电脑或者台式电脑等。The node IO forwarding device of the multi-control cluster provided in this embodiment may include but not limited to a smart phone, a tablet computer, a notebook computer or a desktop computer, and the like.
其中,处理器22可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器22可以采用数字信号处理器(Digital Signal Processor,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器22也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称中央处理器(CentralProcessing Unit,CPU);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器22可以集成有图像处理器(Graphics Processing Unit,GPU),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器22还可以包括人工智能(Artificial Intelligence,AI)处理器,该AI处理器用于处理有关机器学习的计算操作。Wherein, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. Processor 22 can adopt at least one hardware form in Digital Signal Processor (Digital Signal Processor, DSP), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA), Programmable Logic Array (Programmable LogicArray, PLA) accomplish. Processor 22 may also include a main processor and a coprocessor, the main processor is a processor for processing data in a wake-up state, and is also called a central processing unit (Central Processing Unit, CPU); Low-power processor for processing data in standby state. In some embodiments, the processor 22 may be integrated with a graphics processor (Graphics Processing Unit, GPU), and the GPU is used for rendering and drawing the content that needs to be displayed on the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (Artificial Intelligence, AI) processor, which is used to process computing operations related to machine learning.
存储器21可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器21还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器21至少用于存储以下计算机程序211,其中,该计算机程序被处理器22加载并执行之后,能够实现前述任一实施例公开的多控集群的节点IO转发方法的相关步骤。另外,存储器21所存储的资源还可以包括操作系统212和数据213等,存储方式可以是短暂存储或者永久存储。其中,操作系统212可以包括Windows、Unix、Linux等。数据213可以包括但不限于多控集群的节点IO转发方法所涉及到的数据等等。Memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211, wherein, after the computer program is loaded and executed by the processor 22, it can realize 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 also include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Wherein, the operating system 212 may include Windows, Unix, Linux and so on. The data 213 may include but not limited to the data involved in the node IO forwarding method of the multi-control cluster and the like.
在一些实施例中,多控集群的节点IO转发装置还可包括有显示屏23、输入输出接口24、通信接口25、电源26以及通信总线27。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 .
领域技术人员可以理解,图5中示出的结构并不构成对多控集群的节点IO转发装置的限定,可以包括比图示更多或更少的组件。Those skilled in the art can understand that the structure shown in FIG. 5 does not constitute a limitation on the node IO forwarding device of the multi-control cluster, and may include more or less components than those shown in the figure.
处理器22通过调用存储于存储器21中的指令以实现上述任一实施例所提供的多控集群的节点IO转发方法。The processor 22 implements the node IO forwarding method of the multi-control cluster provided by any one of the above-mentioned embodiments by invoking instructions stored in the memory 21 .
对于本发明提供的一种多控集群的节点IO转发装置的介绍请参照上述方法实施例,本发明在此不再赘述,其具有上述多控集群的节点IO转发方法相同的有益效果。For the introduction of a multi-control cluster node IO forwarding device provided by the present invention, please refer to the above method embodiment, and the present invention will not repeat it here, and it has the same beneficial effect as the above-mentioned multi-control cluster node IO forwarding method.
进一步的,本发明还提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器22执行时实现如上述多控集群的节点IO转发方法的步骤。Further, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 22, the steps of the above-mentioned node IO forwarding method of the multi-control cluster are implemented.
可以理解的是,如果上述实施例中的方法以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。It can be understood that if the methods in the above embodiments are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the essence of the technical solution of the present invention 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, and the computer software product is stored in a storage medium , executing all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
对于本发明提供的一种计算机可读存储介质的介绍请参照上述方法实施例,本发明在此不再赘述,其具有上述多控集群的节点IO转发方法相同的有益效果。For the introduction of a computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here, and it has the same beneficial effect as the above-mentioned multi-control cluster node IO forwarding method.
作为一种实施例,图6为本发明实施例提供的另一种多控集群的节点IO转发方法的流程图,如图6所示,包括:As an embodiment, FIG. 6 is a flowchart of another node IO forwarding method of a multi-control cluster provided by an embodiment of the present invention, as shown in FIG. 6 , including:
S21:按条带宽度,将卷划分为若干数据块,按四个一循环分别加入region0-3集合,与镜像对一一对应;S21: Divide the volume into a number of data blocks according to the stripe width, and add them to the region0-3 sets respectively in four cycles, corresponding to the mirror pairs one by one;
S22:获取下层反馈的卷的在线路径与各镜像对优选节点分别取与,计算转发源节点与目标节点;S22: Obtain the online path of the volume fed back by the lower layer and the optimal node of each mirror pair respectively, and calculate the forwarding source node and target node;
S23:接收IO,根据地址信息和数据长度计算实际region;S23: Receive IO, and calculate the actual region according to the address information and data length;
S24:判断IO的实际region是否跨region,若是,则进入步骤S25,若否,则进入步骤S26;S24: Determine whether the actual region of the IO is cross-region, if yes, go to step S25, if not, go to step S26;
S25:拆分子IO,分别转发至对应节点,并在所有子IO结束后响应上层;S25: Split sub-IOs, forward them to corresponding nodes, and respond to the upper layer after all sub-IOs are completed;
S26:根据地址信息和数据长度转发至所属region的对应节点。S26: forward to the corresponding node of the region according to the address information and data length.
对于本发明提供的另一种多控集群的节点IO转发方法的介绍请参照上述方法实施例,本发明在此不再赘述,其具有上述多控集群的节点IO转发方法相同的有益效果。For the introduction of another multi-control cluster node IO forwarding method provided by the present invention, please refer to the above-mentioned method embodiment, and the present invention will not repeat it here, and it has the same beneficial effect as the above-mentioned multi-control cluster node IO forwarding method.
以上对本发明所提供的一种多控集群的节点IO转发方法、多控集群的节点IO转发装置及介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。A node IO forwarding method of a multi-control cluster, a node IO forwarding device and a medium of a multi-control cluster provided by the present invention have been introduced in detail above. Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for relevant details, please refer to the description of the method part. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some 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.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative 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 that these entities or operations There is no such actual relationship or order between the operations. Moreover, the terms "comprising", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also items not expressly listed. other elements, or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310165871.8A CN116112498B (en) | 2023-02-24 | 2023-02-24 | A node IO forwarding method, device and medium for a multi-control cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310165871.8A CN116112498B (en) | 2023-02-24 | 2023-02-24 | A node IO forwarding method, device and medium for a multi-control cluster |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116112498A true CN116112498A (en) | 2023-05-12 |
CN116112498B CN116112498B (en) | 2025-07-11 |
Family
ID=86261499
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310165871.8A Active CN116112498B (en) | 2023-02-24 | 2023-02-24 | A node IO forwarding method, device and medium for a multi-control cluster |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116112498B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7325111B1 (en) * | 2005-11-01 | 2008-01-29 | Network Appliance, Inc. | Method and system for single pass volume scanning for multiple destination mirroring |
US7434091B1 (en) * | 2004-12-07 | 2008-10-07 | Symantec Operating Corporation | Flexibly combining mirroring, concatenation and striping in virtual storage devices |
CN101645837A (en) * | 2009-09-04 | 2010-02-10 | 成都市华为赛门铁克科技有限公司 | Method and device for realizing load balancing |
CN108400999A (en) * | 2017-02-06 | 2018-08-14 | 中国移动通信集团公司 | A kind of load-balancing method and device of data-base cluster mirror nodes |
CN111666043A (en) * | 2017-11-03 | 2020-09-15 | 华为技术有限公司 | Data storage method and equipment |
CN112596673A (en) * | 2020-12-18 | 2021-04-02 | 南京道熵信息技术有限公司 | Multi-active multi-control storage system with dual RAID data protection |
WO2021174654A1 (en) * | 2020-03-06 | 2021-09-10 | 苏州浪潮智能科技有限公司 | Io request processing method, apparatus and device, and readable storage medium |
US20220156152A1 (en) * | 2016-09-15 | 2022-05-19 | Pure Storage, Inc. | Dynamic data segment sizing |
CN115061634A (en) * | 2022-06-30 | 2022-09-16 | 济南浪潮数据技术有限公司 | System service load distribution method, device and medium |
CN115080453A (en) * | 2022-07-20 | 2022-09-20 | 井芯微电子技术(天津)有限公司 | Address calculation array management method and system |
-
2023
- 2023-02-24 CN CN202310165871.8A patent/CN116112498B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7434091B1 (en) * | 2004-12-07 | 2008-10-07 | Symantec Operating Corporation | Flexibly combining mirroring, concatenation and striping in virtual storage devices |
US7325111B1 (en) * | 2005-11-01 | 2008-01-29 | Network Appliance, Inc. | Method and system for single pass volume scanning for multiple destination mirroring |
CN101645837A (en) * | 2009-09-04 | 2010-02-10 | 成都市华为赛门铁克科技有限公司 | Method and device for realizing load balancing |
US20220156152A1 (en) * | 2016-09-15 | 2022-05-19 | Pure Storage, Inc. | Dynamic data segment sizing |
CN108400999A (en) * | 2017-02-06 | 2018-08-14 | 中国移动通信集团公司 | A kind of load-balancing method and device of data-base cluster mirror nodes |
CN111666043A (en) * | 2017-11-03 | 2020-09-15 | 华为技术有限公司 | Data storage method and equipment |
WO2021174654A1 (en) * | 2020-03-06 | 2021-09-10 | 苏州浪潮智能科技有限公司 | Io request processing method, apparatus and device, and readable storage medium |
CN112596673A (en) * | 2020-12-18 | 2021-04-02 | 南京道熵信息技术有限公司 | Multi-active multi-control storage system with dual RAID data protection |
CN115061634A (en) * | 2022-06-30 | 2022-09-16 | 济南浪潮数据技术有限公司 | System service load distribution method, device and medium |
CN115080453A (en) * | 2022-07-20 | 2022-09-20 | 井芯微电子技术(天津)有限公司 | Address calculation array management method and system |
Non-Patent Citations (5)
Title |
---|
ANDYGUAN0_2: "RAID技术原理", Retrieved from the Internet <URL:https://blog.csdn.net/andyguan01_2/article/details/89637305> * |
KAI HWANG: "Orthogonal striping and mirroring in distributed RAID for I/O-centric cluster computing", IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 31 January 2002 (2002-01-31), pages 26 - 44, XP011094091, DOI: 10.1109/71.980025 * |
云计算&大数据: "HDFS存储机制", Retrieved from the Internet <URL:https://blog.csdn.net/m0_46864744/article/details/121417231> * |
刘飞: "基于RFID的校园学生管理系统的设计与实现", 硕士电子期刊, 15 September 2018 (2018-09-15) * |
孙志卓;张全新;李元章;谭毓安;刘靖宇;马忠梅;: "连续数据存储中面向RAID5的写操作优化设计", 计算机研究与发展, no. 08, 15 August 2013 (2013-08-15), pages 34 - 42 * |
Also Published As
Publication number | Publication date |
---|---|
CN116112498B (en) | 2025-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110663019B (en) | File system for Shingled Magnetic Recording (SMR) | |
CN112130768B (en) | Disk array online expansion method, device and computer-readable storage medium | |
CN102255962B (en) | Distributive storage method, device and system | |
US8639876B2 (en) | Extent allocation in thinly provisioned storage environment | |
US20170177224A1 (en) | Dynamic storage transitions employing tiered range volumes | |
CN102929748B (en) | Data back up method and device | |
US11314447B2 (en) | System and method for sustaining single NVMe subsystem by a federated storage array for NVMe-oF connectivity | |
WO2016144544A1 (en) | Live configurable storage | |
TW201214105A (en) | Scalable storage devices | |
US11977785B2 (en) | Non-volatile memory device-assisted live migration of virtual machine data | |
CN115061634A (en) | System service load distribution method, device and medium | |
US12032849B2 (en) | Distributed storage system and computer program product | |
WO2025152506A1 (en) | Data processing system and method, device and nonvolatile readable storage medium | |
JP2022016368A (en) | How to manage namespaces in storage devices and storage devices that use those methods | |
US20230297260A1 (en) | Initial cache segmentation recommendation engine using customer-specific historical workload analysis | |
CN113535087B (en) | Data processing method, server and storage system in data migration process | |
CN114047886A (en) | NVME command processing method, system, electronic equipment and storage medium | |
CN111007988B (en) | RAID internal wear balancing method, system, terminal and storage medium | |
US11989460B2 (en) | Capacity expansion in a virtual storage appliance | |
CN116112498A (en) | A node IO forwarding method, device and medium of a multi-control cluster | |
US9043533B1 (en) | Sizing volatile memory cache based on flash-based cache usage | |
US11693577B2 (en) | Storage operation processing during data migration using migrated indicator from source storage | |
US8943280B2 (en) | Method and apparatus to move page between tiers | |
CN118885132B (en) | A data processing method, device, equipment, medium, product and system | |
US12112074B2 (en) | Maintaining quality of service of non-volatile memory devices in heterogeneous environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |