[go: up one dir, main page]

CN117234743A - Data transmission method, device, equipment and storage medium - Google Patents

Data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN117234743A
CN117234743A CN202311515349.4A CN202311515349A CN117234743A CN 117234743 A CN117234743 A CN 117234743A CN 202311515349 A CN202311515349 A CN 202311515349A CN 117234743 A CN117234743 A CN 117234743A
Authority
CN
China
Prior art keywords
data
stored
sub
node
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
Application number
CN202311515349.4A
Other languages
Chinese (zh)
Other versions
CN117234743B (en
Inventor
肖诗淼
邵雨恬
刘志魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311515349.4A priority Critical patent/CN117234743B/en
Publication of CN117234743A publication Critical patent/CN117234743A/en
Application granted granted Critical
Publication of CN117234743B publication Critical patent/CN117234743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application relates to the technical field of data storage, in particular to a data sending method, a device, equipment and a storage medium, aiming at realizing data forwarding among all nodes in a controller group. The method comprises the following steps: transmitting data to be stored to a data forwarding layer of the controller node; determining a data area corresponding to the data to be stored in response to the storage volume corresponding to the data to be stored being in an operating state; responding to the data area corresponding to the data to be stored as a non-single data area, and carrying out data splitting on the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored; responding to the sub-data to be stored as sub-data to be forwarded, and determining an inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored; and sending each sub-data to be stored to a corresponding controller node.

Description

Data transmission method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of data storage, in particular to a data transmission method, a device, equipment and a storage medium.
Background
Under a high-end storage architecture, after host IO (Input/Output) data is issued, the data is randomly sent to a controller group, when the controller group cannot process the issued data, the data needs to be forwarded to a node of the controller group capable of processing the data, the node processes the data and then sends the data to a storage device for storage, and in a storage mode in the related technology, the data is forwarded among different controller groups.
In the related art, data issued by a host cannot be forwarded among a plurality of nodes in the same controller group, so that loads of all nodes in the controller group are unbalanced, and processing speed is low.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a device, equipment and a storage medium, which aim to realize data forwarding among all nodes in a controller group.
An embodiment of the present application provides a data transmission method, where the method includes:
the data to be stored is sent to a data forwarding layer of any one controller node in the controller group;
determining a data area corresponding to the data to be stored in response to the storage volume corresponding to the data to be stored being in an operating state;
Responding to the data area corresponding to the data to be stored as a non-single data area, and carrying out data splitting on the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored;
responding to the sub-data to be stored as sub-data to be forwarded, and determining an inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored;
and sending each sub-data to be stored to a target controller node, wherein the target controller node is the controller node corresponding to the index node number.
Optionally, before sending the data to be stored to the data forwarding layer of any one controller node in the controller group, the method further comprises:
adding a plurality of the controller nodes in the controller group;
the controller nodes are paired in a cyclic mirror image mode, so that a plurality of controller node pairs are obtained;
designating one of the controller nodes in each of the controller node pairs as a master controller node.
Optionally, the method further comprises:
responding to the storage volume in a non-running state, and placing the data to be stored into a waiting queue;
And determining the data area corresponding to the data to be stored in response to the storage volume changing from the non-running state to the running state.
Optionally, the method further comprises:
determining whether a transmission path corresponding to the data to be stored is a fast path or not according to the fact that the data area corresponding to the data to be stored is a single data area;
and when the transmission path corresponding to the data to be stored is a fast path, directly transmitting the data to be stored to the storage device corresponding to the data to be stored.
Optionally, the method further comprises:
when the transmission path corresponding to the stored data is not the fast path, determining whether the storage volume corresponding to the data to be stored is in a non-running state;
and when the storage volume is in a non-running state, placing the data to be stored into a waiting queue.
Optionally, before splitting the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored, the method further includes:
determining a start storage address and a stop storage address corresponding to the data to be stored;
and determining whether the data area corresponding to the data to be stored is a single data area according to the initial storage address and the termination storage address.
Optionally, the determining, according to the start storage address and the end storage address, whether the data area corresponding to the data to be stored is a single data area includes:
comparing the initial storage address with the termination storage address with a preset initial address and a preset termination address of each data area;
when the initial storage address and the termination storage address are positioned in the same data area, determining the data area corresponding to the data to be stored as the single data area;
and when the initial storage address and the termination storage address are positioned in different data areas, determining the data area corresponding to the data to be stored as a non-single data area.
Optionally, the splitting the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored includes:
acquiring a start address and a termination address of each data area corresponding to the data to be stored;
and splitting the data to be stored into each data area according to the starting address and the ending address.
Optionally, before determining the inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored, the method further includes:
determining whether a forwarding mark exists in the data area corresponding to the sub-data to be stored;
and when the forwarding mark exists in the data area corresponding to the sub data to be stored, determining the sub data to be stored as the sub data to be forwarded.
Optionally, the determining, according to the data area corresponding to each sub-data to be stored, an inode number corresponding to each sub-data to be stored includes:
acquiring a node bitmap set corresponding to the data area;
and taking the node number with the value of 1 as the index node number corresponding to the sub-data to be stored from the node bitmap set.
Optionally, the method further comprises:
responding to the fault event of the controller node, and determining whether the sub-data to be stored starts forwarding or not;
when the sub data to be stored is not forwarded, setting the target controller node corresponding to the sub data to be stored as a fault state;
Adding a forwarding failure mark on a node bitmap corresponding to the controller node;
putting the sub data to be stored into a waiting queue;
repeating the retry forwarding of the sub-data to be stored every other preset time period;
and deleting the forwarding failure mark when the sub data to be stored is forwarded normally.
Optionally, the method further comprises:
setting a fault mark in the subsequent sub-data to be stored, which belongs to the same sub-data to be stored as the sub-data to be stored;
adding a forwarded failure mark to the node bitmap corresponding to the controller node;
setting the state code of the sub-data to be stored in the next state as a failure state;
after waiting for a preset time period, cleaning the fault mark;
forwarding the sub-data to be stored in the next sub-data;
and when the follow-up sub-data to be stored is forwarded normally, clearing the forwarding failure mark.
Optionally, the method further comprises:
when the sub data to be stored is forwarded, setting the target controller node corresponding to the sub data to be stored as a fault state;
adding the forwarding failure mark on a node bitmap corresponding to the controller node;
Setting the data state code of the sub data to be stored as an error state;
putting the sub data to be stored into the waiting queue;
repeating the retry forwarding of the sub-data to be stored every other preset time period;
and determining the forwarding failure of the sub data to be stored.
Optionally, the method further comprises:
setting a data state code of the subsequent sub data to be stored, which belongs to the same sub data to be stored as the sub data to be stored, as a failure state;
determining that the forwarding of the follow-up sub-data to be stored fails;
ending the forwarding flow of the follow-up sub-data to be stored;
and adding the forwarding failure mark on the node bitmap corresponding to the controller node corresponding to the sub-data to be stored subsequently.
A second aspect of an embodiment of the present application provides a data transmitting apparatus, including:
the data transmission module to be stored is used for transmitting the data to be stored to the data forwarding layer of any one controller node in the controller group;
the data area determining module is used for determining a data area corresponding to the data to be stored in response to the fact that the storage volume corresponding to the data to be stored is in an operating state;
The data splitting module is used for responding to the data area corresponding to the data to be stored as a non-single data area, and carrying out data splitting on the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored;
the node number confirming module is used for responding to the sub-data to be stored as sub-data to be forwarded and determining the node number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored;
and the sub-data to be stored sending module is used for sending each sub-data to be stored to a target controller node, wherein the target controller node is the controller node corresponding to the index node number.
Optionally, the apparatus further comprises:
a controller node adding module, configured to add a plurality of controller nodes in the controller group;
the controller node pair module is used for carrying out node pair on a plurality of controller nodes in a cyclic mirror image mode to obtain a plurality of controller node pairs;
and the main controller node designating module is used for designating one controller node as a main controller node in each controller node pair.
Optionally, the apparatus further comprises:
the first storage data waiting module is used for responding to the non-running state of the storage volume and placing the data to be stored into a waiting queue;
and the storage data state changing module is used for determining the data area corresponding to the data to be stored in response to the storage volume changing from the non-running state to the running state.
Optionally, the apparatus further comprises:
the path confirmation module is used for responding to the data area corresponding to the data to be stored as a single data area and determining whether the transmission path corresponding to the data to be stored is a fast path or not;
and the data transparent transmission module is used for directly transmitting the data to be stored to the storage equipment corresponding to the data to be stored when the transmission path corresponding to the data to be stored is a fast path.
Optionally, the apparatus further comprises:
a storage volume running state determining module, configured to determine, when the transmission path corresponding to the storage data is not the fast path, whether a storage volume corresponding to the data to be stored is in a non-running state;
and the second storage data waiting module is used for placing the data to be stored into a waiting queue when the storage volume is in a non-running state.
Optionally, the apparatus further comprises:
the address determining module is used for determining a start storage address and a stop storage address corresponding to the data to be stored;
and the data area judging module is used for determining whether the data area corresponding to the data to be stored is a single data area or not according to the initial storage address and the termination storage address.
Optionally, the data region determination module includes:
the address comparison sub-module is used for comparing the initial storage address with the termination storage address, and comparing the initial storage address with a preset initial address and a preset termination address of each data area;
a single data area determining sub-module, configured to determine, when the start storage address and the end storage address are located in the same data area, that the data area corresponding to the data to be stored is the single data area;
and the non-single data area determining submodule is used for determining the data area corresponding to the data to be stored as a non-single data area when the initial storage address and the termination storage address are positioned in different data areas.
Optionally, the data splitting module includes:
The address acquisition sub-module is used for acquiring a start address and a termination address of each data area corresponding to the data to be stored;
and the data splitting sub-module is used for splitting the data to be stored into each data area according to the starting address and the ending address.
Optionally, the apparatus further comprises:
a forwarding sign determining module, configured to determine whether a forwarding sign exists in the data area corresponding to the sub-data to be stored;
and the to-be-forwarded data determining module is used for determining the to-be-stored sub-data as the to-be-forwarded sub-data when the forwarding mark exists in the data area corresponding to the to-be-stored sub-data.
Optionally, the inode number determining module includes:
a node bitmap set acquisition sub-module, configured to acquire a node bitmap set corresponding to the data area;
and the node number determining submodule is used for taking the node number with the value of 1 as the node number of the index corresponding to the sub data to be stored from the node bitmap set.
Optionally, the apparatus further comprises:
the forwarding state determining module is used for determining whether the sub-data to be stored starts forwarding or not in response to the fault event of the controller node;
The first marking module is used for setting the target controller node corresponding to the sub data to be stored as a fault state when the sub data to be stored does not start forwarding;
the second marking module is used for adding a forwarding failure mark on the node bitmap corresponding to the controller node;
the first waiting queue placing module is used for placing the sub-data to be stored into a waiting queue;
the first retry module is used for retrying and forwarding the sub-data to be stored every other preset time period;
and the first failure mark deleting module is used for deleting the forwarding failure mark when the sub data to be stored is forwarded normally.
Optionally, the apparatus further comprises:
the third marking module is used for setting a fault mark in the follow-up sub data which belongs to one piece of the data to be stored together with the sub data to be stored;
a fourth marking module, configured to add a forwarded failure flag to the node bitmap corresponding to the controller node;
the first state setting module is used for setting the state code of the sub-data to be stored in the follow-up state as a failure state;
the first fault mark clearing module is used for clearing the fault mark after waiting for one preset time period;
The second retry module is used for retransmitting the follow-up sub-data to be stored;
and the second failure mark deleting module is used for clearing the forwarding failure mark when the follow-up sub-data to be stored is forwarded normally.
Optionally, the apparatus further comprises:
a fifth marking module, configured to set the target controller node corresponding to the sub-data to be stored as a fault state when the sub-data to be stored has already been forwarded;
a sixth marking module, configured to add the forwarding failure flag to a node bitmap corresponding to the controller node;
the second state setting module is used for setting the data state code of the sub data to be stored into an error state;
the second waiting queue placing module places the sub-data to be stored into the waiting queue;
the third retry module is used for retrying and forwarding the sub-data to be stored every other preset time period;
and the first forwarding failure determining module is used for determining the forwarding failure of the sub data to be stored.
Optionally, the method further comprises:
a seventh marking module, configured to set a data status code of a subsequent sub-data to be stored, which belongs to the same sub-data to be stored as the sub-data to be stored, to a failure status;
The second forwarding failure determining module is used for determining the forwarding failure of the follow-up sub-data to be stored;
the forwarding flow ending module is used for ending the forwarding flow of the follow-up sub-data to be stored;
and an eighth marking module, configured to add the forwarding failure mark to the node bitmap corresponding to the controller node corresponding to the sub-data to be stored subsequently.
A third aspect of the embodiments of the present application provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to the first aspect of the present application.
A fourth aspect of the embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect of the application when the processor executes the computer program.
By adopting the data transmission method provided by the application, the data to be stored is transmitted to the data forwarding layer of any one controller node in the controller group; determining a data area corresponding to the data to be stored in response to the storage volume corresponding to the data to be stored being in an operating state; responding to the data area corresponding to the data to be stored as a non-single data area, and carrying out data splitting on the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored; responding to the sub-data to be stored as sub-data to be forwarded, and determining an inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored; and sending each sub-data to be stored to a target controller node, wherein the target controller node is the controller node corresponding to the index node number.
In the application, when the data to be stored is processed, a plurality of data areas are preset, the data to be stored is firstly sent to the data forwarding layer, the data area corresponding to the data to be stored is determined, when the data area corresponding to the data to be stored is a non-single data area, the data to be stored is split, and the split sub data to be stored is sent to the controller node corresponding to the data area, so that flexible forwarding of the data among nodes in the controller group is realized, the processing performance of the storage volume is enhanced, the load balance in the controller group is realized, the data processing efficiency is improved, and the data processing time is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a storage system architecture;
fig. 3 is a schematic diagram of a data forwarding flow according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a data transmission system according to an embodiment of the present application;
fig. 5 is a schematic diagram of a data transmission flow according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating an IO exception handling mechanism according to an embodiment of the present application;
fig. 7 is a schematic diagram of a data forwarding device according to an embodiment of the present application;
fig. 8 is a schematic diagram of a data transmission apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flowchart of a data transmission method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
s11: and sending the data to be stored to a data forwarding layer of any one controller node in the controller group.
In this embodiment, the data to be stored is data to be stored, which is sent by a host of the storage system to a lower layer, and the controller group is a de-group formed by controller nodes that process data sent by an upper layer, and the data forwarding layer is a data forwarding module in the controller nodes, and can send and receive data between other controller nodes.
In this embodiment, referring to fig. 2, fig. 2 is a schematic diagram of a storage system, as shown in fig. 2, where the storage system includes a host, a controller group, and a storage device, and the host sends data to be stored to the controller group, and then the controller group sends the data to the storage device.
In this embodiment, when the host needs to store the data to be stored, the data to be stored is sent to any one of the controller nodes in the controller group, and specifically to the data forwarding layer in the controller node.
Illustratively, the data is forwarded.
S12: and determining a data area corresponding to the data to be stored in response to the storage volume corresponding to the data to be stored being in an operating state.
In this embodiment, the storage volume is a shared data storage space between a plurality of nodes. The data areas are a plurality of sub-storage spaces which divide the storage space according to the stripe width, and each data area corresponds to one controller node.
In this embodiment, when the storage volume corresponding to the data to be stored is in an operating state, a data area corresponding to the data to be stored is determined, and according to a start address and an end address of the data to be stored in the storage space, the data area corresponding to the data to be stored in the storage space can be determined. The data to be stored will carry information identifying the data to be stored with a corresponding lun (storage volume number), start address (startlba_i) and end address (endlba_i). After the lun is acquired, the running state of the storage volume corresponding to the data to be stored can be queried, and the starting address and the ending address of the data area corresponding to the data to be stored can be acquired.
S13: and responding to the data area corresponding to the data to be stored as a non-single data area, and carrying out data splitting on the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored.
In this embodiment, the non-single data area represents that the data to be stored corresponds to a plurality of data areas, the storage space is divided into a plurality of data areas in advance according to the stripe width, the address of each data area is continuous, the data to be stored in the non-single data area spans different data areas. The sub data to be stored is data obtained by splitting the data to be stored, and the sub data to be stored is data stored in a single data area.
In this embodiment, when the data to be stored is a non-single data area, splitting the data to be stored is required, and according to the data area corresponding to the data to be stored, splitting the data to be stored to obtain a plurality of sub-data to be stored.
In this embodiment, in response to the data area corresponding to the data to be stored being a non-single data area, according to the data area corresponding to the data to be stored, performing data splitting on the data to be stored to obtain a plurality of sub-data to be stored, the specific steps include:
s13-1, acquiring a start address and a termination address of each data area corresponding to the data to be stored.
In this embodiment, a start address and a stop address of each data area corresponding to data to be stored are obtained.
S13-2: and splitting the data to be stored into each data area according to the starting address and the ending address.
In this embodiment, after the start address and the end address of each data area corresponding to the data to be stored are obtained, the start address and the end address of the data to be stored in the storage space are compared with the start address and the end address of each data area, and then the data to be stored is split into a plurality of data areas according to the start address and the end address of each data area.
For example, 4 storage areas are divided in advance, the start address of the storage area 1 is 0, the end address is 5, the start address of the storage area 2 is 5, the end address is 10, the start address of the storage area 3 is 10, the end address is 15, the start address of the storage area 4 is 15, and the end address is 20. The starting address of the data to be stored is 3, the ending address is 18, the data to be stored is split into 4 sub data to be stored, wherein the starting address of the sub data to be stored 1 is 3, the ending address is 5, the starting address of the sub data to be stored 2 is 5, the ending address is 10, the starting address of the sub data to be stored 3 is 10, the ending address is 15, the starting address of the sub data to be stored is 15, and the ending address is 18.
S14: and responding to the sub-data to be stored as sub-data to be forwarded, and determining an inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored.
In this embodiment, the sub data to be forwarded is sub data to be stored, which does not belong to the node processing, and the sub data to be forwarded needs to be forwarded to another controller node for processing. The inoindex number (nodeIndex) is the number of the controller node from which the corresponding controller can be determined.
In this embodiment, each data area corresponds to a controller node for data processing, where the controller node is identified by an inode number. After determining that the sub data to be stored is the sub data to be forwarded, acquiring an inode number corresponding to the sub data to be stored from the information of the data area corresponding to the sub data to be stored.
In this embodiment, the specific step of determining, in response to the sub-data to be stored being sub-data to be forwarded, the inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored includes:
s14-1: and acquiring a node bitmap set corresponding to the data area.
In this embodiment, the node bitmap set is a set formed by representing the node numbers in the form of a bitmap.
In this embodiment, each data area corresponds to a node bitmap set, and the node bitmap set corresponding to each data area may be obtained from the host.
Illustratively, the number of bits of the node bitmap set corresponding to each data region is 32 bits.
S14-2: and taking the node number with the value of 1 as the index node number corresponding to the sub-data to be stored from the node bitmap set.
In this embodiment, the inode number is obtained by calculating the inode number according to a preset inode number calculation function, the main inode number of the mirror pair in the node path and the controller group, and the inode number of the online node, and the calculated result is displayed in the node bitmap set and is identified by a flag of 1< < nodeIndex.
In this embodiment, in the node bitmap set, a certain bit in a node bitmap is 1, and the node number represented by the node bitmap, that is, the index node number corresponding to the sub-data to be stored.
For example, if the 5 th bit of a 32-bit bitmap is 1 and the remaining bits are 0, the node number corresponding to the sub-data to be stored is 00001 … … 0, and the node number actually corresponding to the node number is node number 5 for a total of 32 bits.
S15: and sending each sub-data to be stored to a target controller node, wherein the target controller node is the controller node corresponding to the index node number.
In this embodiment, the target controller node is a controller node corresponding to the inode number, that is, a controller node that processes sub-data to be stored.
In this embodiment, after determining the node number corresponding to the sub-data to be stored, the sub-data to be stored is sent to the target controller node corresponding to the node number through the forwarding module.
For example, one data to be stored is split into 4 sub data to be stored, the sub data to be stored 1 is processed by the current node, and the sub data to be stored 2-3 are respectively forwarded to the controller node 2-3.
In this embodiment, the data area is divided in advance, the cross-area large-block data is split according to the pre-divided data area, and the split data is forwarded to each controller node for processing, so that the efficiency of data processing is improved, and the long tail effect during data transmission is reduced.
Referring to fig. 3, fig. 3 is a schematic diagram of a data forwarding flow according to an embodiment of the present application, wherein the data forwarding flow includes 4 data areas, namely, data area 0, data area 1, data area 2, and data area 3 (region 0-region 3), and the original IO is a cross-data area IO, split into sub IO1 and sub IO2, and sent to the controller node0 (node 0) and the node1 controller node1 (node 1), respectively. IO1 and IO2 are single region data, IO1 is sent to controller node2 (node 2), and IO2 is sent to node3 controller node3 (node 3).
Referring to fig. 4, fig. 4 is a schematic structural diagram of a data transmission system according to an embodiment of the present application, as shown in fig. 4, an upper layer IO performs random issuing, then performs cross-region judgment and data splitting on data, and then performs IO forwarding, IO issuing, fault processing, and parallel processing on sub-IOs, where these modules form a complete data transmission system.
In another embodiment of the present application, before sending the data to be stored to the data forwarding layer of any one of the controller nodes in the controller group, the method further comprises:
s21: adding a plurality of the controller nodes in the controller group.
The original controller group is generally a dual controller node.
In this embodiment, a plurality of controller nodes are added to the original controller group.
S22: and carrying out junction pairing on a plurality of controller nodes in a cyclic mirror image mode to obtain a plurality of controller node pairs.
In this embodiment, a plurality of controller nodes in the controller group are paired by a loop mirror mode, so as to obtain a plurality of controller nodes.
Illustratively, there are 4 controller nodes in the controller group, controller node 1 is paired with controller node 2, controller node 2 is paired with controller node 3, controller node 3 is paired with controller node 4, and controller node 4 remains with controller node 1.
S23: designating one of the controller nodes in each of the controller node pairs as a master controller node.
In this embodiment, the master controller node is a master node for processing data in the pair of controller nodes, and the other node plays an auxiliary role.
In this embodiment, one controller node is designated in each controller node pair as the master controller node.
For example, the master controller node may be set by itself according to actual conditions, and odd numbered nodes in the controller node pair may be set as the master controller node.
In this embodiment, the original dual-controller node is expanded into multiple controller nodes, and the different nodes are paired by a circular mirror mode, so that the original dual-control coupling structure is reserved, and meanwhile, the high-efficiency concurrency of the controller nodes to the running service can be improved.
In another embodiment of the present application, the method further comprises:
s31: and in response to the storage volume being in a non-running state, placing the data to be stored into a waiting queue.
In this embodiment, the waiting queue is a queue in which tasks to be processed wait for processing.
In this embodiment, when the storage volume is in the non-running state, the data cannot be received or transmitted, so that the data to be stored cannot be stored, and at this time, the data to be stored is put into the waiting queue, and is processed after waiting for the storage volume prototype.
S32: and determining the data area corresponding to the data to be stored in response to the storage volume changing from the non-running state to the running state.
In this embodiment, when the storage volume is changed from the non-running state to the running state, a data area corresponding to the data to be stored is determined.
In another embodiment of the present application, the method further comprises:
s41: and determining whether a transmission path corresponding to the data to be stored is a fast path or not in response to the data area corresponding to the data to be stored is a single data area.
In this embodiment, the fast path (fastpath) is a path for fast transferring a data packet without analysis processing, and through the fast path, the data packet can be directly sent to the target storage device without going through the controller node.
In this embodiment, when the data area corresponding to the data to be stored is a single data area, it is indicated that the start storage address and the end storage address of the data to be stored are both located in the same data area, and at this time, whether the path corresponding to the data to be stored is a fast path is determined according to the data information of the data to be stored.
S42: and when the transmission path corresponding to the data to be stored is a fast path, directly transmitting the data to be stored to the storage device corresponding to the data to be stored.
In this embodiment, when the transmission path corresponding to the data to be stored is a fast path, the data to be stored is directly transmitted through the fast path and transmitted to the corresponding storage device.
In another embodiment of the present application, the method further comprises:
s43: and when the transmission path corresponding to the storage data is not the fast path, determining whether the storage volume corresponding to the data to be stored is in a non-running state.
S44: and when the storage volume is in a non-running state, placing the data to be stored into a waiting queue.
In this embodiment, when it is determined that the data area corresponding to the pair of data to be stored is a single data area, and when the transmission path corresponding to the stored data is not a fast path, it is again determined whether the storage volume corresponding to the stored data is in a non-running state. When the storage volume is in a non-running state, the storage volume cannot receive or send data, and the data to be stored is placed in a waiting queue.
In another embodiment of the present application, before splitting the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored, the method further includes:
S51: and determining a starting storage address and a terminating storage address corresponding to the data to be stored.
In this embodiment, the start storage address corresponding to the data to be stored is the start address of the data to be stored in the storage space, and the end storage address is the end address of the data to be stored in the storage space.
In this embodiment, before splitting the data to be stored according to the data area corresponding to the data to be stored, the start storage address and the end storage address corresponding to the data to be stored are first determined.
S52: and determining whether the data area corresponding to the data to be stored is a single data area according to the initial storage address and the termination storage address.
In this embodiment, according to the start storage address and the end storage address, it is determined whether the data area corresponding to the data to be stored is a single data area.
In this embodiment, the specific step of determining whether the data area corresponding to the data to be stored is a single data area according to the start storage address and the end storage address includes:
s52-1: and comparing the initial storage address with the ending storage address with a preset initial address and a preset ending address of each data area.
In this embodiment, each data area has a corresponding preset start address and a corresponding preset end address, the start storage address of the data to be stored is compared with the preset start address of each data area, and the end storage area address of the data to be stored is compared with the preset end address of each data area.
S52-2: and when the initial storage address and the termination storage address are positioned in the same data area, determining the data area corresponding to the data to be stored as the single data area.
In this embodiment, when the start storage address and the end storage address of the data to be stored are located in the same data area, it is determined that the data area corresponding to the data to be stored is a single data area.
For example, the start storage address of the data to be stored is 2, the end storage address is 5, the start address of a certain data area is 0, the end address is 5, and the start storage address and the end storage address of the data to be stored are both within the data area, so that the data area corresponding to the data to be stored is a single data area.
S52-3: and when the initial storage address and the termination storage address are positioned in different data areas, determining the data area corresponding to the data to be stored as a non-single data area.
In this embodiment, when the start storage address and the end storage address of the data to be stored are located in different data areas, it is determined that the data area corresponding to the data to be stored is a non-single data area.
For example, when the start storage address of the data to be stored is 2, the end storage address is 8, the start address of a certain data area is 0, and the end address is 5, the start storage data of the data to be stored is in the data area, and the end storage address is not in the data area, the data to be stored at least corresponds to two data areas, and it is determined that the data area corresponding to the data to be stored is a non-single data area.
When judging whether the data area of the data to be stored is a single data area, the judgment statement used is as follows:
if(startSeg != endSeg) retrun true;
startSeg = startLba_i/REGION_LBA_SIZE;
endSeg = endLba_i/REGION_LBA_SIZE;
when startSeg is not equal to endSeg, determining the data area corresponding to the data to be stored as a non-single data area.
In another embodiment of the present application, before determining the inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored, the method further includes:
s61: and determining whether a forwarding mark exists in the data area corresponding to the sub-data to be stored.
In this embodiment, the forwarding flag exists in a data area corresponding to the sub data to be stored.
S62: and when the forwarding mark exists in the data area corresponding to the sub data to be stored, determining the sub data to be stored as the sub data to be forwarded.
In this embodiment, when a flag with a FORWARD flag bit exists in a data area corresponding to the sub-data to be stored, the sub-data to be stored needs to be forwarded to other nodes for processing, and when the forwarding flag does not exist, the sub-data is directly forwarded to the lower layer of the node for processing through a sub-down (lower layer forwarding).
Referring to fig. 5, fig. 5 is a schematic diagram of a data transmission flow proposed in an embodiment of the present application, in which a data forwarding layer first receives data, detects whether a volume is online, determines whether an IO is a block area when the volume is online, performs data splitting when the IO is a block area, processes sub-IOs, determines whether the IO needs to be directly forwarded when the IO is not a cross-area data, then checks whether the volume is offline, determines whether the IO on a current node needs to be forwarded after confirming that the volume is online, directly processes and issues the IO from the current node when the IO does not need to be forwarded, obtains an inode number (nodeindex) forwarded to the node when the IO needs to be forwarded, places the IO into a waiting queue when the inode code is invalid or the node is not online, and performs forwarding of the IO data when the inode code is valid and the node is online.
In another embodiment of the present application, the method further comprises:
s71: and in response to the controller node failure event, determining whether the sub data to be stored starts forwarding.
In this embodiment, referring to fig. 6, fig. 6 is a flowchart of an IO exception handling mechanism according to an embodiment of the present application, as shown in fig. 6, when a failure event occurs at a node where data to be stored is located, it is determined whether sub-data to be stored has already begun to be forwarded (transferred).
S72: and when the sub data to be stored is not forwarded, setting the target controller node corresponding to the sub data to be stored as a fault state.
In this embodiment, when the sub data to be stored does not start forwarding, the target controller node corresponding to the sub data to be stored is set to a fault state (pend).
S73: and adding a forwarding failure mark on a node bitmap corresponding to the controller node.
In this embodiment, a forwarding failure flag is added to a node bitmap corresponding to the controller node, where the forwarding failure flag is used to mark the latest data forwarding failure of the node.
S74: and placing the sub data to be stored into a waiting queue.
In this embodiment, the sub data to be stored is put into a waiting queue, and waiting for retransmission.
S75: and repeating the retry forwarding of the sub-data to be stored in every other preset time period.
In this embodiment, retry forwarding is performed on sub-data to be stored in every preset time period, where the preset time period may be set by itself.
S76: and deleting the forwarding failure mark when the sub data to be stored is forwarded normally.
In this embodiment, when the sub-data to be stored is forwarded normally, the forwarding failure flag is deleted, that is, the IO failure sub-bitmap is cleared.
In another embodiment of the present application, the method further comprises:
s81: and setting a fault mark in the subsequent sub-data to be stored, which belongs to one piece of the sub-data to be stored together with the sub-data to be stored.
In this embodiment, when a fault event occurs at a node corresponding to a first sub-data to be stored, fault processing is performed on a subsequent sub-data to be stored, which belongs to one sub-data to be stored, as shown in fig. 6, a fault flag (special IO flag) is set in a subsequent sub-IO, that is, the subsequent sub-data to be stored, where the fault flag is used to forward data after the subsequent sub-data to be stored performs a failure processing procedure, so as to ensure that a target controller node determines that a current controller node has a fault.
S82: and adding a forwarded failure mark to the node bitmap corresponding to the controller node.
In this embodiment, a forwarding failure flag is added to a node bitmap corresponding to a controller node.
S83: and setting the state code of the sub data to be stored in the next state as a failure state.
In this embodiment, the status code of the sub-data to be stored later is set to be in a failed status, the status code is used to mark the status of the data, and the data marked as the failed status needs to be retransmitted.
S84: and after waiting for the preset time period, cleaning the fault mark.
In this embodiment, a preset period of time is waited for, the fault flag of the sub data to be stored is cleared, and retry forwarding is ready.
S85: and forwarding the sub-data to be stored in the next step again.
In this embodiment, the sub data to be stored is retransmitted.
S86: and when the follow-up sub-data to be stored is forwarded normally, clearing the forwarding failure mark.
In this embodiment, when the sub-data to be stored subsequently is forwarded normally, the forwarding failure flag is cleared.
In another embodiment of the present application, the method further comprises:
s91: and when the sub data to be stored is forwarded, setting the target controller node corresponding to the sub data to be stored as a fault state.
In this embodiment, as shown in fig. 6, when the sub data to be stored has already started to be forwarded, the target controller node corresponding to the sub data to be stored is set to a failure state, so as to terminate the forwarding of the data.
S92: and adding the forwarding failure mark on a node bitmap corresponding to the controller node.
In this embodiment, a forwarding failure flag is added to a node bitmap corresponding to the controller node.
S93: setting the data status code of the sub data to be stored to an error status (DROP).
In this embodiment, the data status code of the storage sub-data is set to be in an error status, and for the data in the error status, a forwarding failure of the storage sub-data is determined.
S94: and placing the sub data to be stored into the waiting queue.
In this embodiment, the sub data to be stored is put into the waiting queue.
S95: and repeating the retry forwarding of the sub-data to be stored in every other preset time period.
In this embodiment, the sub data to be stored is retransmitted every other preset period, but because the sub data to be stored is already marked as an error state, the retry retransmission is not successful.
S96: and determining the forwarding failure of the sub data to be stored.
In this embodiment, when the retry forwarding is not successful yet, it is determined that the sub-data to be stored fails to be forwarded.
In another embodiment of the present application, the method further comprises:
s101: and setting a data state code of the subsequent sub data to be stored, which belongs to the same sub data to be stored as the sub data to be stored, as a failure state.
In this embodiment, as shown in fig. 6, when the IO has started forwarding, the data status code to be stored next to the sub-data to be stored is set to a failed status (failed).
S102: and determining the forwarding failure of the follow-up sub-data to be stored.
In this embodiment, after the status code of the sub-data to be stored is set to the failure status, it is determined that the forwarding of the sub-data to be stored is the failure status.
S103: and ending the forwarding flow of the follow-up sub-data to be stored.
In this embodiment, after the forwarding of the sub-data to be stored is in the failure state, the forwarding process of the sub-data to be stored is ended.
S104: and adding the forwarding failure mark on the node bitmap corresponding to the controller node corresponding to the sub-data to be stored subsequently.
In this embodiment, a forwarding failure flag is added to a node bitmap corresponding to a controller node corresponding to the sub-data to be stored subsequently.
In this embodiment, when the sub-data to be stored has already started to be forwarded, the forwarding process needs to be stopped, the current sub-data to be stored and the subsequent sub-data to be stored are marked as forwarding failure states, and forwarding is not performed any more, until the whole process is completed, the forwarding process is executed from the beginning, and the integrity of the data is guaranteed.
In this embodiment, for node failure, a corresponding failure processing and retry mechanism is adapted, failure flags are performed on forwarding failed data, a retry flow is initiated through a resume function, a failure processing mechanism for splitting data across data areas is set, it is ensured that before and after sub-IOs (sub-data to be stored) can also be processed according to correct logic when a node failure event occurs, as shown in fig. 3, for an IO that has started to be forwarded, a state code thereof is set as a DROP (error state), and a subsequent sub-IO also performs failure processing. For the IO which does not start forwarding, retry processing is needed, wherein the current sub IO is put into a retry queue to wait for retry, and the subsequent sub IO retries the normal processing flow after one-time failure processing through sub IO failure bitmap marking and a special IO marking mechanism.
In this embodiment, the original dual control nodes are expanded into the multi-control node group, so that splitting and forwarding of the sub-division of the stored data are realized, selection of forwarding nodes depends on the home nodes of different data areas, load balancing of a plurality of controller nodes is realized, parallel processing can be performed after splitting the data to be stored, a solution method when faults occur is provided, accuracy of data transmission is guaranteed, and processing efficiency of the data is improved.
Based on the same inventive concept, an embodiment of the present application provides a data forwarding device. Referring to fig. 7, fig. 7 is a schematic diagram of a data forwarding apparatus 700 according to an embodiment of the present application. As shown in fig. 7, the apparatus includes:
a data to be stored sending module 701, configured to send data to be stored to a data forwarding layer of any one controller node in the controller group;
a data area determining module 702, configured to determine a data area corresponding to the data to be stored in response to the storage volume corresponding to the data to be stored being in an operating state;
the data splitting module 703 is configured to split data to be stored according to the data area corresponding to the data to be stored, to obtain a plurality of sub-data to be stored, in response to the data area corresponding to the data to be stored being a non-single data area;
The inode number confirmation module 704 is configured to determine an inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored in response to the sub-data to be stored being sub-data to be forwarded;
and the sub-data to be stored sending module 705 is configured to send each sub-data to be stored to a target controller node, where the target controller node is a controller node corresponding to the inode number.
As an embodiment of the present application, the apparatus further comprises:
a controller node adding module, configured to add a plurality of controller nodes in the controller group;
the controller node pair module is used for carrying out node pair on a plurality of controller nodes in a cyclic mirror image mode to obtain a plurality of controller node pairs;
and the main controller node designating module is used for designating one controller node as a main controller node in each controller node pair.
As an embodiment of the present application, the apparatus further comprises:
the first storage data waiting module is used for responding to the non-running state of the storage volume and placing the data to be stored into a waiting queue;
And the storage data state changing module is used for determining the data area corresponding to the data to be stored in response to the storage volume changing from the non-running state to the running state.
As an embodiment of the present application, the apparatus further comprises:
the path confirmation module is used for responding to the data area corresponding to the data to be stored as a single data area and determining whether the transmission path corresponding to the data to be stored is a fast path or not;
and the data transparent transmission module is used for directly transmitting the data to be stored to the storage equipment corresponding to the data to be stored when the transmission path corresponding to the data to be stored is a fast path.
As an embodiment of the present application, the apparatus further comprises:
a storage volume running state determining module, configured to determine, when the transmission path corresponding to the storage data is not the fast path, whether a storage volume corresponding to the data to be stored is in a non-running state;
and the second storage data waiting module is used for placing the data to be stored into a waiting queue when the storage volume is in a non-running state.
As an embodiment of the present application, the apparatus further comprises:
The address determining module is used for determining a start storage address and a stop storage address corresponding to the data to be stored;
and the data area judging module is used for determining whether the data area corresponding to the data to be stored is a single data area or not according to the initial storage address and the termination storage address.
As one embodiment of the present application, the data area determination module includes:
the address comparison sub-module is used for comparing the initial storage address with the termination storage address, and comparing the initial storage address with a preset initial address and a preset termination address of each data area;
a single data area determining sub-module, configured to determine, when the start storage address and the end storage address are located in the same data area, that the data area corresponding to the data to be stored is the single data area;
and the non-single data area determining submodule is used for determining the data area corresponding to the data to be stored as a non-single data area when the initial storage address and the termination storage address are positioned in different data areas.
As one embodiment of the present application, the data splitting module includes:
The address acquisition sub-module is used for acquiring a start address and a termination address of each data area corresponding to the data to be stored;
and the data splitting sub-module is used for splitting the data to be stored into each data area according to the starting address and the ending address.
As an embodiment of the present application, the apparatus further comprises:
a forwarding sign determining module, configured to determine whether a forwarding sign exists in the data area corresponding to the sub-data to be stored;
and the to-be-forwarded data determining module is used for determining the to-be-stored sub-data as the to-be-forwarded sub-data when the forwarding mark exists in the data area corresponding to the to-be-stored sub-data.
Optionally, the inode number determining module includes:
a node bitmap set acquisition sub-module, configured to acquire a node bitmap set corresponding to the data area;
and the node number determining submodule is used for taking the node number with the value of 1 as the node number of the index corresponding to the sub data to be stored from the node bitmap set.
As an embodiment of the present application, the apparatus further comprises:
the forwarding state determining module is used for determining whether the sub-data to be stored starts forwarding or not in response to the fault event of the controller node;
The first marking module is used for setting the target controller node corresponding to the sub data to be stored as a fault state when the sub data to be stored does not start forwarding;
the second marking module is used for adding a forwarding failure mark on the node bitmap corresponding to the controller node;
the first waiting queue placing module is used for placing the sub-data to be stored into a waiting queue;
the first retry module is used for retrying and forwarding the sub-data to be stored every other preset time period;
and the first failure mark deleting module is used for deleting the forwarding failure mark when the sub data to be stored is forwarded normally.
As an embodiment of the present application, the apparatus further comprises:
the third marking module is used for setting a fault mark in the follow-up sub data which belongs to one piece of the data to be stored together with the sub data to be stored;
a fourth marking module, configured to add a forwarded failure flag to the node bitmap corresponding to the controller node;
the first state setting module is used for setting the state code of the sub-data to be stored in the follow-up state as a failure state;
the first fault mark clearing module is used for clearing the fault mark after waiting for one preset time period;
The second retry module is used for retransmitting the follow-up sub-data to be stored;
and the second failure mark deleting module is used for clearing the forwarding failure mark when the follow-up sub-data to be stored is forwarded normally.
As an embodiment of the present application, the apparatus further comprises:
a fifth marking module, configured to set the target controller node corresponding to the sub-data to be stored as a fault state when the sub-data to be stored has already been forwarded;
a sixth marking module, configured to add the forwarding failure flag to a node bitmap corresponding to the controller node;
the second state setting module is used for setting the data state code of the sub data to be stored into an error state;
the second waiting queue placing module places the sub-data to be stored into the waiting queue;
the third retry module is used for retrying and forwarding the sub-data to be stored every other preset time period;
and the first forwarding failure determining module is used for determining the forwarding failure of the sub data to be stored.
As an embodiment of the application, the method further comprises:
a seventh marking module, configured to set a data status code of a subsequent sub-data to be stored, which belongs to the same sub-data to be stored as the sub-data to be stored, to a failure status;
The second forwarding failure determining module is used for determining the forwarding failure of the follow-up sub-data to be stored;
the forwarding flow ending module is used for ending the forwarding flow of the follow-up sub-data to be stored;
and an eighth marking module, configured to add the forwarding failure mark to the node bitmap corresponding to the controller node corresponding to the sub-data to be stored subsequently.
Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data transmission method according to any of the above embodiments of the present application.
Based on the same inventive concept, another embodiment of the present application provides an electronic device, and referring to fig. 8, fig. 8 is a schematic diagram of a data transmission device 800 according to an embodiment of the present application, including a memory 801, a processor 802, and a computer program stored in the memory and capable of running on the processor, where the processor executes to implement the steps in the data transmission method according to any one of the foregoing embodiments of the present application.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail the methods, apparatuses, devices and storage medium for data transmission provided by the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, and the above examples are only used to help understand the methods and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (17)

1. A method of transmitting data, the method comprising:
the data to be stored is sent to a data forwarding layer of any one controller node in the controller group;
determining a data area corresponding to the data to be stored in response to the storage volume corresponding to the data to be stored being in an operating state;
responding to the data area corresponding to the data to be stored as a non-single data area, and carrying out data splitting on the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored;
responding to the sub-data to be stored as sub-data to be forwarded, and determining an inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored;
and sending each sub-data to be stored to a target controller node, wherein the target controller node is the controller node corresponding to the index node number.
2. The method of claim 1, wherein prior to sending the data to be stored to the data forwarding layer of any one of the controller nodes in the controller group, the method further comprises:
adding a plurality of the controller nodes in the controller group;
The controller nodes are paired in a cyclic mirror image mode, so that a plurality of controller node pairs are obtained;
designating one of the controller nodes in each of the controller node pairs as a master controller node.
3. The method according to claim 1, wherein the method further comprises:
responding to the storage volume in a non-running state, and placing the data to be stored into a waiting queue;
and determining the data area corresponding to the data to be stored in response to the storage volume changing from the non-running state to the running state.
4. The method according to claim 1, wherein the method further comprises:
determining whether a transmission path corresponding to the data to be stored is a fast path or not according to the fact that the data area corresponding to the data to be stored is a single data area;
and when the transmission path corresponding to the data to be stored is a fast path, directly transmitting the data to be stored to the storage device corresponding to the data to be stored.
5. The method according to claim 4, wherein the method further comprises:
when the transmission path corresponding to the stored data is not the fast path, determining whether the storage volume corresponding to the data to be stored is in a non-running state;
And when the storage volume is in a non-running state, placing the data to be stored into a waiting queue.
6. The method of claim 1, wherein before splitting the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored, the method further comprises:
determining a start storage address and a stop storage address corresponding to the data to be stored;
and determining whether the data area corresponding to the data to be stored is a single data area according to the initial storage address and the termination storage address.
7. The method of claim 6, wherein determining whether the data area corresponding to the data to be stored is a single data area according to the start storage address and the end storage address comprises:
comparing the initial storage address with the termination storage address with a preset initial address and a preset termination address of each data area;
when the initial storage address and the termination storage address are positioned in the same data area, determining the data area corresponding to the data to be stored as the single data area;
And when the initial storage address and the termination storage address are positioned in different data areas, determining the data area corresponding to the data to be stored as a non-single data area.
8. The method of claim 1, wherein the splitting the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored includes:
acquiring a start address and a termination address of each data area corresponding to the data to be stored;
and splitting the data to be stored into each data area according to the starting address and the ending address.
9. The method of claim 1, wherein prior to determining an inode number corresponding to each of the sub-data to be stored from the data region corresponding to each of the sub-data to be stored, the method further comprises:
determining whether a forwarding mark exists in the data area corresponding to the sub-data to be stored;
and when the forwarding mark exists in the data area corresponding to the sub data to be stored, determining the sub data to be stored as the sub data to be forwarded.
10. The method of claim 1, wherein determining the inode number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored comprises:
acquiring a node bitmap set corresponding to the data area;
and taking the node number with the value of 1 as the index node number corresponding to the sub-data to be stored from the node bitmap set.
11. The method according to claim 1, wherein the method further comprises:
responding to the fault event of the controller node, and determining whether the sub-data to be stored starts forwarding or not;
when the sub data to be stored is not forwarded, setting the target controller node corresponding to the sub data to be stored as a fault state;
adding a forwarding failure mark on a node bitmap corresponding to the controller node;
putting the sub data to be stored into a waiting queue;
repeating the retry forwarding of the sub-data to be stored every other preset time period;
and deleting the forwarding failure mark when the sub data to be stored is forwarded normally.
12. The method of claim 11, wherein the method further comprises:
Setting a fault mark in the subsequent sub-data to be stored, which belongs to the same sub-data to be stored as the sub-data to be stored;
adding a forwarded failure mark to the node bitmap corresponding to the controller node;
setting the state code of the sub-data to be stored in the next state as a failure state;
after waiting for a preset time period, cleaning the fault mark;
forwarding the sub-data to be stored in the next sub-data;
and when the follow-up sub-data to be stored is forwarded normally, clearing the forwarding failure mark.
13. The method of claim 11, wherein the method further comprises:
when the sub data to be stored is forwarded, setting the target controller node corresponding to the sub data to be stored as a fault state;
adding the forwarding failure mark on a node bitmap corresponding to the controller node;
setting the data state code of the sub data to be stored as an error state;
putting the sub data to be stored into the waiting queue;
repeating the retry forwarding of the sub-data to be stored every other preset time period;
and determining the forwarding failure of the sub data to be stored.
14. The method of claim 13, wherein the method further comprises:
setting a data state code of the subsequent sub data to be stored, which belongs to the same sub data to be stored as the sub data to be stored, as a failure state;
determining that the forwarding of the follow-up sub-data to be stored fails;
ending the forwarding flow of the follow-up sub-data to be stored;
and adding the forwarding failure mark on the node bitmap corresponding to the controller node corresponding to the sub-data to be stored subsequently.
15. A data transmission apparatus, the apparatus comprising:
the data transmission module to be stored is used for transmitting the data to be stored to the data forwarding layer of any one controller node in the controller group;
the data area determining module is used for determining a data area corresponding to the data to be stored in response to the fact that the storage volume corresponding to the data to be stored is in an operating state;
the data splitting module is used for responding to the data area corresponding to the data to be stored as a non-single data area, and carrying out data splitting on the data to be stored according to the data area corresponding to the data to be stored to obtain a plurality of sub data to be stored;
The node number confirming module is used for responding to the sub-data to be stored as sub-data to be forwarded and determining the node number corresponding to each sub-data to be stored according to the data area corresponding to each sub-data to be stored;
and the sub-data to be stored sending module is used for sending each sub-data to be stored to a target controller node, wherein the target controller node is the controller node corresponding to the index node number.
16. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1 to 14.
17. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 14 when executing the computer program.
CN202311515349.4A 2023-11-14 2023-11-14 Data transmission method, device, equipment and storage medium Active CN117234743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311515349.4A CN117234743B (en) 2023-11-14 2023-11-14 Data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311515349.4A CN117234743B (en) 2023-11-14 2023-11-14 Data transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117234743A true CN117234743A (en) 2023-12-15
CN117234743B CN117234743B (en) 2024-02-20

Family

ID=89086509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311515349.4A Active CN117234743B (en) 2023-11-14 2023-11-14 Data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117234743B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040088477A1 (en) * 2002-10-31 2004-05-06 Bullen Melvin James Methods and systems for a memory section
CN108701004A (en) * 2017-01-25 2018-10-23 华为技术有限公司 A data processing system, method and corresponding device
CN112000594A (en) * 2020-07-31 2020-11-27 瑞芯微电子股份有限公司 PCIe equipment management method and operation system thereof
WO2021232699A1 (en) * 2020-05-20 2021-11-25 歌尔股份有限公司 Data reading method, apparatus and device, and readable storage medium
CN114610951A (en) * 2020-12-08 2022-06-10 国信君和(北京)科技有限公司 Data processing method, apparatus, electronic device and readable storage medium
CN116954523A (en) * 2023-09-20 2023-10-27 苏州元脑智能科技有限公司 A storage system, data storage method, data reading method and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040088477A1 (en) * 2002-10-31 2004-05-06 Bullen Melvin James Methods and systems for a memory section
CN108701004A (en) * 2017-01-25 2018-10-23 华为技术有限公司 A data processing system, method and corresponding device
WO2021232699A1 (en) * 2020-05-20 2021-11-25 歌尔股份有限公司 Data reading method, apparatus and device, and readable storage medium
CN112000594A (en) * 2020-07-31 2020-11-27 瑞芯微电子股份有限公司 PCIe equipment management method and operation system thereof
CN114610951A (en) * 2020-12-08 2022-06-10 国信君和(北京)科技有限公司 Data processing method, apparatus, electronic device and readable storage medium
CN116954523A (en) * 2023-09-20 2023-10-27 苏州元脑智能科技有限公司 A storage system, data storage method, data reading method and storage medium

Also Published As

Publication number Publication date
CN117234743B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
CN103338118B (en) A kind of communication network method of attachment and device
CN110574019B (en) Robust data replication between data centers
US5655075A (en) Protocol method for validating an input protocol specification
JP6431197B2 (en) Snapshot processing methods and associated devices
CN106603692B (en) Data storage method and device in a distributed storage system
CN108924008A (en) A kind of dual controller data communications method, device, equipment and readable storage medium storing program for executing
JP5994601B2 (en) Parallel computer, parallel computer control program, and parallel computer control method
CN113810216A (en) Cluster fault switching method and device and electronic equipment
US10013367B2 (en) I/O processing system including dynamic missing interrupt and input/output detection
CN117234743B (en) Data transmission method, device, equipment and storage medium
EP1180271A1 (en) Method and system for multi-initiator support to streaming devices in a fibre channel network
CN107608711A (en) Upgrade method, device, system and electronic equipment
CN110750219A (en) Storage cluster service processing method, device, equipment and readable storage medium
US8903766B2 (en) Data mirroring using a virtual connection
US9252922B2 (en) System and method for improved error response in data mirroring
CN112817883A (en) Method, device and system for adapting interface platform and computer readable storage medium
CN110737613A (en) storage controller node communication method, device, equipment and storage medium
JP2008225745A (en) Process control device, method, and program
TW589525B (en) Checkpointing for recovery of channels in a data processing system
CN120034272B (en) Automatic testing method of Bluetooth equipment and electronic equipment
CN114979180B (en) Data synchronization method, system and equipment
US9396050B2 (en) Distributed execution system and distributed program execution method
CN111142791A (en) Data migration method and device
JP2570134B2 (en) Data broadcast transfer method
US20040133642A1 (en) Server and application programming interface for distributed rendezvous

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