Communication connection method, device, storage device and program product

By obtaining the target network card information and determining the target function network port in the storage machine head, the problem of low perception and link efficiency of the storage head of the cabinet equipment is solved, and the rapid perception and efficient links are realized. Sexual and efficiency.

CN118921397BActive Publication Date: 2025-01-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411367348.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-24
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

The prior art is difficult to realize the rapid perception and fast link between the storage head and the upper and lower lines of the disk cabinet equipment, resulting in limited real-time and efficiency of the storage network.

Method used

By obtaining the target network card information in the storage machine head, the target functional network port is determined, and a communication connection with the panel device is established based on the network port to achieve rapid perception and linking of the panel device.

Benefits of technology

It realizes the storage machine head's rapid online and offline perception of cabinet equipment, improves the real-time performance and efficiency of the storage network, reduces configuration complexity, and saves human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921397B_ABST
    Figure CN118921397B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communication connection technology, and specifically to a communication connection method, apparatus, storage device, and program product. The network card information corresponding to the target network card in the storage head is obtained; the target network card is used to communicate and connect with the cabinet device in the storage device; based on the network card information, a target functional network port based on the target network card for communication connection with the cabinet device is determined in the storage head; a communication connection with the cabinet device is established based on the target functional network port. The storage head can quickly sense the online and offline connections of the cabinet device, ensuring a fast connection between the storage head and the cabinet device. In addition, the above communication connection method does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of communication connection between the storage head and the cabinet device and saving human resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication connection technology, and in particular to a communication connection method, device, storage device and program product. Background Art

[0002] With the development of technologies such as the Internet, cloud computing, the Internet of Things, and mobile Internet, data is growing explosively, bringing new challenges to traditional data transmission networks. As data grows at an expected high speed, the demand for storage space is also growing exponentially.

[0003] In order to meet the challenges of rapid growth of storage space and continuous improvement of transmission rate, more and more companies use independent disk cabinet devices to expand the storage space of centralized storage. RoCE is the implementation of InfiniBand network protocol based on Ethernet network. It has the characteristics of high speed and low latency of InfiniBand network, low price and strong scalability of Ethernet, and can also be accessed by four channels and can be transmitted over long distances. Therefore, RoCE is a common transmission link between the head of centralized storage and independent disk cabinet.

[0004] However, due to the characteristics of the Ethernet network itself, it poses challenges to the centralized storage head's real-time functions such as rapid perception and rapid connection of independent disk cabinets. Summary of the invention

[0005] In view of this, the present invention provides a communication connection method, apparatus, storage device and program product to solve the problem of how to enable a storage head to quickly sense the up and down lines of a cabinet device.

[0006] In a first aspect, the present invention provides a communication connection method, which is applied to a storage head in a storage device, and the method comprises:

[0007] Obtaining network card information corresponding to a target network card in a storage head; the target network card is used to communicate with a disk cabinet device in a storage device;

[0008] Based on the network card information, determine in the storage head a target functional network port for communication connection with the disk cabinet device based on the target network card;

[0009] Establish a communication connection with the cabinet device based on the target functional network port.

[0010] In the communication connection method provided by the embodiment of the present application, the storage head obtains the network card information corresponding to the target network card in the storage head, and then, based on the network card information, determines the target functional network port in the storage head for communication connection with the cabinet device based on the target network card, thereby ensuring the accuracy of the determined target functional network port. Then, based on the target functional network port, a communication connection with the cabinet device is established, so that the storage head can quickly sense the online and offline connections of the cabinet device, thereby ensuring a fast connection between the storage head and the cabinet device. In addition, the above communication connection method does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of communication connection between the storage head and the cabinet device and saving human resources.

[0011] In an optional implementation, obtaining network card information corresponding to a target network card in a storage head includes:

[0012] Identify the hardware devices in the storage head and determine the target network card;

[0013] Identify the target network card and determine the network card information corresponding to the target network card.

[0014] The communication connection method provided in the embodiment of the present application identifies the hardware device in the storage head, determines the target network card, and ensures the accuracy of the determined target network card. The target network card is identified, the network card information corresponding to the target network card is determined, and the accuracy of the network card information corresponding to the determined target network card is ensured.

[0015] In an optional implementation, based on the network card information, determining in the storage head a target functional network port for communication connection with the disk cabinet device based on the target network card includes:

[0016] Parse the network card information to determine a parsing result corresponding to the target network card; the parsing result includes at least one of type information, location information, configuration information, status information, and attribute information corresponding to the target network card;

[0017] Transmit the parsing results to the driver;

[0018] Based on the driver, set the target functional network port.

[0019] The communication connection method provided in the embodiment of the present application analyzes the network card information and determines the analysis result corresponding to the target network card. The accuracy of the determined analysis result is ensured. The analysis result is transmitted to the driver; based on the driver, the target functional network port is set, and the accuracy of the set target functional network port is ensured.

[0020] In an optional implementation, establishing a communication connection with a disk cabinet device based on a target functional network port includes:

[0021] Based on the target functional network port, monitor the online information of the cabinet equipment;

[0022] If the online information of the disk cabinet device is monitored, a communication connection with the disk cabinet device is established based on the non-volatile memory fast protocol.

[0023] The communication connection method provided in the embodiment of the present application monitors the online information of the cabinet device based on the target functional network port; if the online information of the cabinet device is monitored, a communication connection with the cabinet device is established based on the non-volatile memory fast protocol, so that the storage head can quickly perceive the online and offline information of the cabinet device, and ensure a fast connection between the storage head and the cabinet device. In addition, the above communication connection method does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of the communication connection between the storage head and the cabinet device and saving human resources.

[0024] In an optional implementation, based on the target functional network port, monitoring the online information of the cabinet device includes:

[0025] Get the multicast address based on the link layer discovery protocol;

[0026] Based on the multicast address, monitor the online information of the cabinet device corresponding to the multicast address.

[0027] The communication connection method provided in the embodiment of the present application obtains a multicast address based on a link layer discovery protocol; based on the multicast address, the online information of the cabinet device corresponding to the multicast address is monitored, thereby ensuring the accuracy of monitoring the online information of the cabinet device.

[0028] In an optional implementation, the storage device further includes a switch, the switch is communicatively connected to the storage head, and a communication connection with the cabinet device is established based on the target functional network port, including:

[0029] Based on the multicast address of the link layer discovery protocol, a subscription message is sent to the switch, and the subscription message is used to instruct the switch to send the online information of the cabinet device corresponding to the multicast address to the storage head;

[0030] Receive the online information of the cabinet device sent by the switch;

[0031] Establishes a communication connection with enclosure devices based on the non-volatile memory fast protocol.

[0032] The communication connection method provided in the embodiment of the present application sends a subscription message to the switch based on the multicast address of the link layer discovery protocol, and receives the online information of the cabinet device sent by the switch; establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol, thereby realizing that the storage head can quickly perceive the online and offline information of the cabinet device, thereby ensuring a fast connection between the storage head and the cabinet device.

[0033] In an optional implementation, establishing a communication connection with a disk cabinet device based on a non-volatile memory fast protocol includes:

[0034] Based on the preset multicast mode of the cabinet device, the cabinet information corresponding to the cabinet device is obtained;

[0035] According to the enclosure information, a communication connection with the enclosure device is established based on the non-volatile memory fast protocol.

[0036] The communication connection method provided in the embodiment of the present application obtains the cabinet information corresponding to the cabinet device based on the preset multicast mode of the cabinet device, thereby ensuring the accuracy of the cabinet information corresponding to the cabinet device obtained. According to the cabinet information, a communication connection with the cabinet device is established based on the non-volatile memory fast protocol, thereby ensuring the accuracy of establishing the communication connection between the storage head and the cabinet device.

[0037] In an optional implementation, establishing a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information includes:

[0038] The listening thread in the storage head adds the enclosure information corresponding to the enclosure device to the enclosure list;

[0039] The monitoring thread creates a read-write message queue and monitors the read-write message queue;

[0040] The monitoring thread receives the transmission message sent by the main thread in the storage head based on the read-write message queue, and transmits the cabinet information to the main thread;

[0041] The main thread establishes a communication connection with the enclosure device based on the non-volatile memory fast protocol according to the enclosure information.

[0042] In the communication connection method provided by the embodiment of the present application, the listening thread in the storage head adds the cabinet information corresponding to the cabinet device to the cabinet list, so that each cabinet device monitored can be recorded. The listening thread creates a read-write message queue and listens to the read-write message queue; the listening thread receives the transfer message issued by the main thread in the storage head based on the read-write message queue, and transmits the cabinet information to the main thread, ensuring that the main thread can receive the cabinet information corresponding to the cabinet device in a timely manner without affecting the normal operation of the main thread. The main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, ensuring the accuracy of establishing a communication connection between the storage head and the cabinet device. The storage head can quickly perceive the online and offline status of the cabinet device, ensuring a fast link between the storage head and the cabinet device.

[0043] In an optional implementation, the preset multicast mode includes MAC multicast, and the cabinet information includes cabinet identification information of the cabinet device; the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, including:

[0044] The main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field;

[0045] If the enclosure identification information contains a preset field, the main thread determines that the enclosure device is valid;

[0046] The main thread establishes a communication connection with the enclosure device based on the non-volatile memory fast protocol according to the enclosure information.

[0047] In the communication connection method provided in the embodiment of the present application, the main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field. If the cabinet identification information contains a preset field, the main thread determines that the cabinet device is valid, thereby ensuring the accuracy of the determined cabinet device being valid. The main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, thereby ensuring the accuracy of the communication connection established by the main thread between the storage head and the cabinet device. The storage head can quickly sense the online and offline status of the cabinet device, thereby ensuring a fast connection between the storage head and the cabinet device.

[0048] In an optional implementation, the preset multicast mode includes IP multicast, and the cabinet information includes a cabinet IP address of the cabinet device; the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, including:

[0049] The main thread detects whether the cabinet device is in the preset network according to the cabinet IP address;

[0050] If the cabinet device is in the preset network, the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information.

[0051] In the communication connection method provided in the embodiment of the present application, the main thread detects whether the cabinet device is in the preset network according to the cabinet IP address, thereby ensuring the accuracy of the detected cabinet device in the preset network, thereby avoiding the head device from establishing a communication connection with the cabinet device that is not in the preset network. If the cabinet device is in the preset network, the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information. The accuracy of the communication connection established by the main thread between the storage head and the cabinet device is guaranteed. The storage head can quickly sense the online and offline status of the cabinet device, ensuring a fast connection between the storage head and the cabinet device.

[0052] In an optional implementation, the cabinet information does not include the cabinet identification information of the cabinet device; after the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, the method further includes:

[0053] The main thread sends a request to the cabinet device to inquire about the cabinet identification information;

[0054] The main thread receives the cabinet identification information sent by the cabinet device;

[0055] The main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field;

[0056] If the preset field is not included in the disk cabinet identification information, the main thread disconnects the communication connection with the disk cabinet device.

[0057] In the communication connection method provided by the embodiment of the present application, the main thread sends a request to the cabinet device to inquire about the cabinet identification information; the main thread receives the cabinet identification information sent by the cabinet device, identifies the cabinet identification information, and detects whether the cabinet identification information contains a preset field; if the cabinet identification information does not contain the preset field, the main thread disconnects the communication connection with the cabinet device. The accuracy of the communication connection established by the main thread between the storage head and the cabinet device is guaranteed. The storage head can quickly sense the online and offline of the cabinet device, ensuring a fast connection between the storage head and the cabinet device.

[0058] In an optional embodiment, the method further includes:

[0059] Based on the preset multicast mode of the cabinet device, the monitoring thread periodically obtains the cabinet information corresponding to the cabinet device;

[0060] If the cabinet information multicasted by the cabinet device is not received within the preset time, the monitoring thread determines that the cabinet device is offline;

[0061] The monitoring thread deletes the cabinet information from the cabinet list;

[0062] The listening thread sends an offline message of the enclosure device to the main thread.

[0063] The communication connection method provided in the embodiment of the present application is based on the preset multicast mode of the cabinet device, and the listening thread periodically obtains the cabinet information corresponding to the cabinet device; if the cabinet information multicast by the cabinet device is not received within the preset time period, the listening thread determines that the cabinet device is offline; the listening thread deletes the cabinet information from the cabinet list; the listening thread sends an offline message of the cabinet device to the main thread, so as to effectively manage the status of each cabinet device and promptly notify the main program to perform corresponding processing to ensure the normal operation of the storage device.

[0064] In an optional implementation manner, after the main thread disconnects the communication connection with the disk cabinet device, the method further includes:

[0065] Acquire storage disk information of the storage disk included in the disk cabinet device; the storage disk information includes at least one of the number, size, and specification of the storage disk;

[0066] Establish a keep-alive connection with the enclosure device.

[0067] The communication connection method provided in the embodiment of the present application obtains the storage disk information of the storage disk included in the cabinet device, thereby improving the availability and reliability of the cabinet device. Then, a keep-alive connection is established with the cabinet device, thereby realizing data communication between the cabinet device and the storage head.

[0068] In an optional embodiment, the method further includes:

[0069] The head information corresponding to the head is stored based on the multicast of the target functional network port.

[0070] The communication connection method provided in the embodiment of the present application multicasts the head information corresponding to the storage head based on the target functional network port, so that the cabinet device can also receive the head information corresponding to the storage head.

[0071] In an optional implementation, storing the head information corresponding to the head based on the target functional network port multicast includes:

[0072] Obtain the MAC address, port number, protocol type and head identification information corresponding to the storage head;

[0073] According to the MAC address, generate the target address corresponding to the MAC address;

[0074] Generate the head information according to the MAC address, port number, protocol type, head identification information and target address;

[0075] The preset multicast method is used to multicast the head information.

[0076] The communication connection method provided in the embodiment of the present application obtains the MAC address, port number, protocol type and head identification information corresponding to the storage head; generates the target address corresponding to the MAC address according to the MAC address; generates the head information according to the MAC address, port number, protocol type, head identification information and target address, and ensures the accuracy of the generated head information. The head information is multicasted in a preset multicast mode, so that the cabinet device can also receive the head information corresponding to the storage head.

[0077] In a second aspect, the present invention provides a communication connection method, which is applied to a disk cabinet device in a storage device, and the method comprises:

[0078] Load the network card driver corresponding to the target network card;

[0079] Get the cabinet information corresponding to the cabinet device;

[0080] Multicast the cabinet information based on a preset multicast method; the preset multicast method includes at least one of IP multicast and MAC multicast;

[0081] Establish a communication connection with a storage head in a storage device.

[0082] The communication connection method provided in the embodiment of the present application loads the network card driver corresponding to the target network card; obtains the cabinet information corresponding to the cabinet device; multicasts the cabinet information based on a preset multicast method, so that the storage head can receive the cabinet information corresponding to the cabinet device, and then establishes a communication connection with the storage head in the storage device. The storage head can quickly sense the online and offline connections of the cabinet device, ensuring a fast connection between the storage head and the cabinet device. In addition, the above communication connection method does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of the communication connection between the storage head and the cabinet device and saving human resources.

[0083] In an optional implementation, after establishing a communication connection with a storage head in a storage device, the method further includes:

[0084] The storage disk information of the storage disk included in the disk cabinet device is transmitted to the storage head; the storage disk information includes at least one of the number, size, and specification of the storage disk.

[0085] The communication connection method provided in the embodiment of the present application transmits storage disk information of the storage disk included in the disk cabinet device to the storage head, so that the storage head can effectively manage the disk cabinet device, thereby improving the reliability of the disk cabinet device.

[0086] In an optional embodiment, the method further includes:

[0087] Obtain storage disk identification information corresponding to each storage disk in the disk cabinet device;

[0088] Detecting the status of each storage disk according to the identification information of each storage disk;

[0089] The status of each storage disk is transmitted to the storage head.

[0090] The communication connection method provided in the embodiment of the present application obtains storage disk identification information corresponding to each storage disk in the disk cabinet device; detects the status of each storage disk based on the identification information of each storage disk; transmits the status of each storage disk to the storage head, so that the storage head can effectively manage each storage disk in the disk cabinet device, thereby improving the reliability of each storage disk in the disk cabinet device.

[0091] In an optional implementation, obtaining storage disk identification information corresponding to each storage disk in the disk cabinet device includes:

[0092] Get the cabinet identification information corresponding to the cabinet information;

[0093] Obtain the topology information corresponding to each storage disk in the disk cabinet information;

[0094] Storage disk identification information corresponding to each storage disk is generated according to the topology information and the disk cabinet identification information corresponding to each storage disk.

[0095] The communication connection method provided in the embodiment of the present application obtains the cabinet identification information corresponding to the cabinet information; obtains the topology information corresponding to each storage disk in the cabinet information; generates the storage disk identification information corresponding to each storage disk based on the topology information and the cabinet identification information corresponding to each storage disk, thereby ensuring the accuracy and uniqueness of the generated storage disk identification information corresponding to each storage disk.

[0096] In a third aspect, the present invention provides a communication connection device, which is applied to a storage head in a storage device, and the device includes:

[0097] The first acquisition module is used to acquire the network card information corresponding to the target network card in the storage head; the target network card is used to communicate with the disk cabinet device in the storage device;

[0098] A determination module, used to determine, based on the network card information, a target functional network port in the storage head for communication connection with the disk cabinet device based on the target network card;

[0099] The first communication module is used to establish a communication connection with the cabinet device based on the target functional network port.

[0100] In the communication connection device provided in the embodiment of the present application, the storage head obtains the network card information corresponding to the target network card in the storage head, and then, based on the network card information, determines the target functional network port in the storage head for communication connection with the cabinet device based on the target network card, thereby ensuring the accuracy of the determined target functional network port. Then, based on the target functional network port, a communication connection with the cabinet device is established, so that the storage head can quickly sense the online and offline connections of the cabinet device, thereby ensuring a fast connection between the storage head and the cabinet device. In addition, the above-mentioned communication connection device does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of communication connection between the storage head and the cabinet device and saving human resources.

[0101] In a fourth aspect, the present invention provides a communication connection device, which is applied to a disk cabinet device in a storage device, and the device includes:

[0102] Loading module, used to load the network card driver corresponding to the target network card;

[0103] The second acquisition module is used to acquire the cabinet information corresponding to the cabinet device;

[0104] A multicast module, used for multicasting the cabinet information based on a preset multicast method;

[0105] The second communication module is used to establish a communication connection with a storage head in the storage device.

[0106] The communication connection device provided in the embodiment of the present application loads the network card driver corresponding to the target network card; obtains the cabinet information corresponding to the cabinet device; and multicasts the cabinet information based on a preset multicast method, so that the storage head can receive the cabinet information corresponding to the cabinet device, and then establishes a communication connection with the storage head in the storage device. The storage head can quickly sense the online and offline connections of the cabinet device, ensuring a fast connection between the storage head and the cabinet device. In addition, the above-mentioned communication connection device does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of the communication connection between the storage head and the cabinet device and saving human resources.

[0107] In a fifth aspect, the present invention provides a storage device, comprising a storage head and at least one disk cabinet device, wherein the storage head is used to execute the communication connection method of the above-mentioned first aspect or any corresponding embodiment thereof; and the disk cabinet device is used to execute the communication connection method of the above-mentioned second aspect or any corresponding embodiment thereof.

[0108] In an optional implementation, the storage device further includes a switch, and the switch is communicatively connected to the storage head.

[0109] In a sixth aspect, the present invention provides a computer program product, comprising computer instructions, the computer instructions being used to enable a computer to execute the communication connection method of the first aspect or any corresponding embodiment thereof and the communication connection method of the second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0110] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0111] Figure 1 is a flow chart of a first communication connection method according to an embodiment of the present invention;

[0112] Figure 2 is a flow chart of a second communication connection method according to an embodiment of the present invention;

[0113] Figure 3 is a flow chart of a method for determining a target functional network port according to an embodiment of the present invention;

[0114] Figure 4 is a flow chart of a third communication connection method according to an embodiment of the present invention;

[0115] Figure 5 is a schematic diagram of the interaction process between the monitoring thread and the main thread according to an embodiment of the present invention;

[0116] Figure 6 is a schematic flow chart of a fourth communication connection method according to an embodiment of the present invention;

[0117] Figure 7 is a flowchart of a fifth communication connection method according to an embodiment of the present invention;

[0118] Figure 8 is a structural block diagram of a first communication connection device according to an embodiment of the present invention;

[0119] Fig. 9 is a structural block diagram of a second communication connection device according to an embodiment of the present invention;

[0120] Fig.10 is a structural block diagram of a first storage device according to an embodiment of the present invention;

[0121] Fig.11 is a structural block diagram of a second storage device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0122] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0123] According to an embodiment of the present invention, a communication connection method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0124] In this embodiment, a communication connection method is provided, which is applied to a storage head in a storage device. Figure 1 is a flow chart of a communication connection method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0125] Step S101, obtaining network card information corresponding to a target network card in a storage head.

[0126] The target network card is used to communicate with the disk cabinet device in the storage device.

[0127] Specifically, the storage head can receive network card information corresponding to the target network card in the storage head input by the user, and can also receive network card information corresponding to the target network card in the storage head sent by other devices. The embodiment of the present application does not specifically limit the manner in which the storage head obtains the network card information corresponding to the target network card in the storage head.

[0128] Among them, the target network card can be a ROCE network card. The ROCE (RDMA over Converged Ethernet) network card is an Ethernet network card that supports remote direct memory access (RDMA) technology. RDMA is a network communication technology that allows computers to directly access each other's memory without the intervention of the operating system kernel. This can greatly improve the efficiency and performance of data transmission and reduce CPU overhead. The ROCE network card combines the popularity of Ethernet and the high performance advantages of RDMA. It implements the RDMA protocol on Ethernet to enable high-speed, low-latency data transmission between servers.

[0129] The target network card may also be a PCIE network card, and the embodiment of the present application does not specifically limit the target network card.

[0130] This step will be described in detail below.

[0131] Step S102: Based on the network card information, determine in the storage head a target functional network port for communication connection with the disk cabinet device based on the target network card.

[0132] Specifically, the storage head may determine, based on the network card information, a target functional network port in the storage head for communication connection with the disk cabinet device based on the target network card.

[0133] This step will be described in detail below.

[0134] Step S103: establishing a communication connection with the cabinet device based on the target functional network port.

[0135] Specifically, the storage head can establish a communication connection with the disk cabinet device based on the target functional network port.

[0136] In the communication connection method provided by the embodiment of the present application, the storage head obtains the network card information corresponding to the target network card in the storage head, and then, based on the network card information, determines the target functional network port in the storage head for communication connection with the cabinet device based on the target network card, thereby ensuring the accuracy of the determined target functional network port. Then, based on the target functional network port, a communication connection with the cabinet device is established, so that the storage head can quickly sense the online and offline connections of the cabinet device, thereby ensuring a fast connection between the storage head and the cabinet device. In addition, the above communication connection method does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of communication connection between the storage head and the cabinet device and saving human resources.

[0137] In this embodiment, a communication connection method is provided, which is applied to a storage head in a storage device. Figure 2 is a flow chart of a communication connection method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0138] Step S201, obtaining network card information corresponding to a target network card in a storage head.

[0139] The target network card is used to communicate with the disk cabinet device in the storage device.

[0140] Specifically, the above step S201 may include the following steps:

[0141] Step S2011, identifying the hardware device in the storage head and determining the target network card.

[0142] Specifically, the storage head may identify the hardware devices in the storage head based on the communication connection with the hardware devices in the storage head, and then determine the target network card from the hardware devices in the storage head according to the identification result.

[0143] Step S2012, identifying the target network card and determining the network card information corresponding to the target network card.

[0144] Specifically, the storage head can identify the target network card in the storage head through the hwconfig module, and obtain the network card information corresponding to the target network card.

[0145] The hwconfig module is a component in the storage head that manages and configures the hardware resources of the storage head. By communicating with the target network card, the hwconfig module can read relevant information about the target network card, such as the model, MAC address, speed, duplex mode, etc. of the network card.

[0146] Step S202: Based on the network card information, determine in the storage head a target functional network port for communication connection with the disk cabinet device based on the target network card.

[0147] Specifically, the above step S202 may include the following steps:

[0148] Step S2021, parse the network card information to determine the parsing result corresponding to the target network card.

[0149] The analysis result includes at least one of type information, location information, configuration information, status information and attribute information corresponding to the target network card.

[0150] Specifically, the storage head parses the network card information based on text recognition technology to determine the parsing result corresponding to the target network card.

[0151] Step S2022: transmitting the analysis result to the driver.

[0152] Specifically, the storage head may transmit the parsing result to the driver based on an interactive interface between the storage head and the driver.

[0153] The driver may be a remote direct memory access driver. A remote direct memory access (RDMA) driver is a software component used to support remote direct memory access in a computer network. RDMA allows data to be transferred directly between computers in memory without the intervention of the operating system kernel. This can greatly improve the efficiency and performance of data transfer and reduce CPU overhead. The main function of the RDMA driver is to provide an interface between the operating system and network hardware, so that applications can use RDMA technology for high-speed data transfer. It is responsible for handling the details of RDMA operations, including establishing connections, sending and receiving data, and managing memory buffers.

[0154] Step S2023, based on the driver program, set the target functional network port.

[0155] Specifically, the storage head can set the target functional network port according to the analysis result based on the functions and interfaces provided by the driver, which involves configuring network parameters, establishing connections, or performing other related setting operations.

[0156] The driver may be a remote direct memory access driver (RDMA driver).

[0157] For example, Figure 3 As shown in the figure, the process of setting the target functional network port can be as follows: 1. Identify the hardware and load the corresponding drivers, including the network card driver. 2. A multi-control cluster can be established according to customer needs. 3. It is particularly necessary to identify the target network card in the device. Use the hwconfig module to identify the target network card in the device and obtain the network card information of the target network card, which will be used to automatically configure the network. 4. PLSMI will parse the network card information of the target network card identified by HWCONFIG and notify the driver. 5. For a specific network card, the driver can manually set it as the functional network port for connecting to the cabinet; for a specific network card inserted in a specific slot, it can also be automatically designated as the functional network port for connecting to the cabinet.

[0158] Step S203: establishing a communication connection with the cabinet device based on the target functional network port.

[0159] For details about this step, please refer to the above description of step S103, which will not be elaborated here.

[0160] The communication connection method provided in the embodiment of the present application identifies the hardware device in the storage head, determines the target network card, and ensures the accuracy of the determined target network card. The target network card is identified, and the network card information corresponding to the target network card is determined, and the accuracy of the network card information corresponding to the determined target network card is ensured. The network card information is parsed to determine the parsing result corresponding to the target network card. The accuracy of the determined parsing result is ensured. The parsing result is transmitted to the driver; based on the driver, the target function network port is set, and the accuracy of the set target function network port is ensured.

[0161] In this embodiment, a communication connection method is provided, which is applied to a storage head in a storage device. Figure 4 is a flow chart of a communication connection method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0162] Step S301, obtaining network card information corresponding to a target network card in a storage head.

[0163] The target network card is used to communicate with the disk cabinet device in the storage device.

[0164] For details about this step, please refer to the above description of step S201, which will not be elaborated here.

[0165] Step S302: Based on the network card information, determine in the storage head a target functional network port for communication connection with the disk cabinet device based on the target network card.

[0166] For details about this step, please refer to the above description of step S202, which will not be elaborated here.

[0167] Step S303: establishing a communication connection with the cabinet device based on the target functional network port.

[0168] In an optional implementation, the above step S303 may include the following steps:

[0169] Step S3031, based on the target functional network port, monitor the online information of the cabinet device.

[0170] Specifically, the above step S3031 may include the following steps:

[0171] Step a1, obtaining a multicast address based on a link layer discovery protocol.

[0172] Specifically, the storage head can obtain the multicast address sent by the disk cabinet device based on the link layer discovery protocol.

[0173] It should be noted that the Link Layer Discovery Protocol (LLDP) is enabled on both the storage head and the enclosure device, and both the storage head and the enclosure device support the Link Layer Discovery Protocol and are correctly configured.

[0174] Step a2: Based on the multicast address, monitor the online information of the cabinet device corresponding to the multicast address.

[0175] Step S3032: if the online information of the disk cabinet device is monitored, a communication connection with the disk cabinet device is established based on the non-volatile memory fast protocol.

[0176] Specifically, the storage head can use network monitoring tools or software to monitor the specified multicast address. These tools can monitor multicast traffic and detect whether there are cabinet devices sending online information. When the storage head receives online information from the cabinet device, the storage head can parse the information to obtain detailed information about the cabinet device, such as device identifier, model, status, etc. Then, based on the parsed online information, the storage head can take corresponding actions, such as updating the device list, triggering event notifications, and making configuration adjustments.

[0177] In an optional implementation, the storage device further includes a switch, and the switch is communicatively connected to the storage head. The above step S303 may include the following steps:

[0178] Step S3033: Send a subscription message to the switch based on the multicast address of the link layer discovery protocol.

[0179] The subscription message is used to instruct the switch to send the online information of the cabinet device corresponding to the multicast address to the storage head.

[0180] Specifically, the storage head can receive the link layer discovery protocol multicast address input by the user, and can also receive the link layer discovery protocol multicast address sent by other devices. Then, the storage head constructs a subscription message based on the multicast address of the link layer discovery protocol and the requirements of the switch. The subscription message should contain relevant instructions to instruct the switch to send the online information of the cabinet device corresponding to the multicast address to the storage head.

[0181] The storage head then sends the constructed subscription message to the switch using the appropriate network communication method. This can be achieved through a network protocol (such as TCP / IP) or a specific switch management interface.

[0182] After receiving the subscription message, the switch will process it according to the instructions in the message, start monitoring the multicast address, and send the online information of the cabinet device to the specified storage head.

[0183] Step S3034, receiving the online information of the cabinet device sent by the switch.

[0184] Specifically, the storage head receives online information of the disk cabinet device sent by the switch based on the communication connection with the switch.

[0185] Step S3035: Establish a communication connection with the disk cabinet device based on the non-volatile memory fast protocol.

[0186] Among them, NVMF is a protocol used to transmit NVMe commands and data over the network.

[0187] The storage head performs necessary configuration on the storage head and network infrastructure to support NVMF communication. This may include setting network parameters, enabling related network functions, etc. The storage head can then use the NVMF protocol to send a connection request to the enclosure device and send connection parameters to the enclosure device. After receiving the response from the enclosure device, it establishes a connection with the enclosure device. Once the connection is successfully established, the storage head can use the NVMF protocol to transmit data with the enclosure device, including operations such as sending commands, reading and writing data, etc.

[0188] Specifically, the "establishing a communication connection with the disk cabinet device based on the non-volatile memory fast protocol" in the above step S3032 or step S3035 may include the following steps:

[0189] Step b1, based on the preset multicast mode of the cabinet device, obtain the cabinet information corresponding to the cabinet device.

[0190] Specifically, the storage head can receive the preset multicast mode of the cabinet device input by the user, or can receive the preset multicast mode of the cabinet device sent by the cabinet device. The embodiment of the present application does not specifically limit the way in which the storage head obtains the preset multicast mode of the cabinet device. Among them, the preset multicast mode can be IP multicast or MAC multicast. The embodiment of the present application does not specifically limit the preset multicast mode.

[0191] Then, the storage head monitors the traffic on the preset multicast address and receives the multicast message sent by the disk cabinet device. Then, after receiving the multicast message, the storage head parses the multicast message to obtain the disk cabinet information.

[0192] Step b2: establishing a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information.

[0193] Specifically, the storage head determines the IP address or MAC address of the enclosure device based on the enclosure information. Then, the storage head can use the NVMF protocol to send a connection request to the enclosure device based on the IP address or MAC address of the enclosure device, and send connection parameters to the enclosure device. After receiving the response from the enclosure device, the storage head establishes a connection with the enclosure device. Once the connection is successfully established, the storage head can use the NVMF protocol to perform data transmission with the enclosure device, including operations such as sending commands, reading and writing data, etc.

[0194] Specifically, the above step b2 may include the following steps:

[0195] Step b21: The listening thread in the storage head adds the cabinet information corresponding to the cabinet device to the cabinet list.

[0196] Specifically, the monitoring thread in the storage head adds the cabinet information corresponding to the cabinet device to the cabinet list, so that the cabinet information of the monitored cabinet device can be recorded.

[0197] Step b22, the monitoring thread creates a read-write message queue and monitors the read-write message queue.

[0198] Specifically, the monitoring thread creates a read-write message queue and monitors the read-write message queue.

[0199] Step b23, the monitoring thread receives the transfer message sent by the main thread in the storage head based on the read-write message queue, and transmits the cabinet information to the main thread.

[0200] Specifically, when the main thread in the storage head needs the cabinet information in the cabinet list, it can send a transfer message in the read-write message queue. After the listening thread detects that there are unprocessed transfer messages in the read-write message queue, it transmits the cabinet information to the main thread.

[0201] Step b24, the main thread establishes a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information.

[0202] Specifically, the main thread determines the IP address or MAC address of the enclosure device based on the enclosure information. Then, the main thread can use the NVMF protocol to send a connection request to the enclosure device based on the IP address or MAC address of the enclosure device, and send connection parameters to the enclosure device. After receiving the response from the enclosure device, the main thread establishes a connection with the enclosure device. Once the connection is successfully established, the storage head can use the NVMF protocol to perform data transmission with the enclosure device, including operations such as sending commands, reading and writing data, etc.

[0203] In an optional implementation manner of the present application, the preset multicast mode includes MAC multicast, and the cabinet information includes cabinet identification information of the cabinet device; the above step b24 may include the following steps:

[0204] Step b241, the main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field.

[0205] Specifically, after the main thread obtains the cabinet information, it can search for the cabinet identification information from the cabinet information and identify it. Then, the main thread detects whether the cabinet identification information contains a preset field. The preset field may be a specific string, identifier or other predefined conditions.

[0206] By detecting whether the enclosure identification information contains a preset field, the main thread can perform different operations or processing logic according to the detection result. This detection can be used to determine the type, state, function or other related attributes of the enclosure.

[0207] Step b242: If the cabinet identification information contains a preset field, the main thread determines that the cabinet device is valid.

[0208] Specifically, if the enclosure identification information includes a preset field, the main thread determines that the enclosure device is valid.

[0209] Step b243, the main thread establishes a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information.

[0210] Specifically, after determining that the enclosure device is valid, the main thread determines the MAC address of the enclosure device based on the enclosure information. Then, the main thread can use the NVMF protocol to send a connection request to the enclosure device based on the MAC address of the enclosure device, and send connection parameters to the enclosure device. After receiving the response from the enclosure device, the main thread establishes a connection with the enclosure device. Once the connection is successfully established, the storage head can use the NVMF protocol to perform data transmission with the enclosure device, including operations such as sending commands, reading and writing data, etc.

[0211] In an optional implementation manner of the present application, the preset multicast mode includes IP multicast, and the cabinet information includes the cabinet IP address of the cabinet device; the above step b24 may include the following steps:

[0212] Step b2434, the main thread detects whether the cabinet device is in the preset network according to the cabinet IP address.

[0213] Specifically, after the main thread obtains the cabinet information, it can search for the cabinet IP address from the cabinet information, and then the main thread compares the cabinet IP address with the preset networking information.

[0214] The preset networking information may include one or more allowed IP address ranges or a specific IP address list. By comparing the IP address of the enclosure with the preset networking information, the main thread can determine whether the enclosure device is within the preset networking range. If the enclosure IP address matches the preset networking information, the main thread can consider that the enclosure device is within the preset networking; otherwise, the main thread can consider that the enclosure device is not within the preset networking.

[0215] Exemplarily, the preset network refers to the subnet where the node IP is located. For example, when the preset network is 192.168.2.0 / 24, the cabinet devices with cabinet IP addresses of 192.168.2.1-192.168.2.255 are all valid nodes; the main process will initiate an NVMF connection when it receives the corresponding cabinet device online. If the preset network is 192.168.2.5 / 32, the cabinet device with a cabinet IP address of 192.168.2.5 is a valid node.

[0216] Step b2435, if the cabinet device is in the preset network, the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information.

[0217] Specifically, if the enclosure device is in the preset network, the main thread storage head performs necessary configuration on the storage head and the network infrastructure to support NVMF communication. This may include setting network parameters, enabling related network functions, etc. The main thread determines the IP address of the enclosure device based on the enclosure information. Then, the storage head can use the NVMF protocol to send a connection request to the enclosure device based on the IP address of the enclosure device, and send connection parameters to the enclosure device. After receiving the response from the enclosure device, it establishes a connection with the enclosure device. Once the connection is successfully established, the storage head can use the NVMF protocol to transmit data with the enclosure device, including sending commands, reading and writing data, and other operations.

[0218] In an optional implementation manner, the cabinet information does not include the cabinet identification information of the cabinet device; after the above step b2435, the following steps may also be included:

[0219] Step b2436, the main thread sends a request to the disk cabinet device to inquire about the disk cabinet identification information.

[0220] Specifically, the main thread sends a request for the cabinet identification information to the cabinet device based on the communication connection with the cabinet device.

[0221] Step b2437, the main thread receives the cabinet identification information sent by the cabinet device.

[0222] Specifically, after receiving the request for inquiring the cabinet identification information sent by the cabinet device, the cabinet device returns the cabinet identification information of the cabinet device to the main thread, so that the main thread can receive the cabinet identification information sent by the cabinet device.

[0223] Step b2438, the main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field.

[0224] Specifically, the main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field, wherein the preset field may be a specific string, an identifier or other predefined conditions.

[0225] By detecting whether the enclosure identification information contains a preset field, the main thread can perform different operations or processing logic according to the detection result. This detection can be used to determine the type, state, function or other related attributes of the enclosure.

[0226] Step b2439, if the disk cabinet identification information does not contain the preset field, the main thread disconnects the communication connection with the disk cabinet device.

[0227] Specifically, if the preset field is not included in the disk cabinet identification information, the main thread disconnects the communication connection with the disk cabinet device.

[0228] Step b25, obtaining storage disk information of the storage disk included in the disk cabinet device.

[0229] The storage disk information includes at least one of the number, size, and specification of the storage disk.

[0230] Specifically, the storage head may receive storage disk information of the storage disk included in the enclosure device, which is sent by the enclosure device based on the communication connection with the enclosure device.

[0231] Step b26, establishing a keep-alive connection with the disk cabinet device.

[0232] Specifically, the storage head sends a keep-alive request or message to the disk cabinet device. After receiving the keep-alive request, the disk cabinet device replies with a confirmation message. The storage head and the disk cabinet device periodically exchange keep-alive messages at a certain time interval to maintain the activity of the connection.

[0233] If no keep-alive message is received from the other party within a period of time, the corresponding processing logic may be triggered, such as re-establishing the connection or taking other measures to restore communication.

[0234] Step b27, based on the preset multicast mode of the cabinet device, the monitoring thread periodically obtains the cabinet information corresponding to the cabinet device.

[0235] Specifically, based on a preset multicast mode of the cabinet device, the monitoring thread may periodically monitor the cabinet information corresponding to the cabinet device.

[0236] Step b28: If the cabinet information multicast by the cabinet device is not received within a preset time period, the monitoring thread determines that the cabinet device is offline.

[0237] Specifically, if the cabinet information multicast by the cabinet device is not monitored within a preset time period, the monitoring thread determines that the cabinet device is offline.

[0238] Step b29, the monitoring thread deletes the cabinet information from the cabinet list.

[0239] Specifically, the monitoring thread deletes the enclosure information from the enclosure list.

[0240] Step b210, the listening thread sends an offline message of the cabinet device to the main thread.

[0241] Specifically, the listening thread sends an offline message of the cabinet device to the main thread.

[0242] For example, Figure 5 As shown in the figure, the schematic diagram of the interaction process between the monitoring thread and the main thread. Among them, the handle is a handle created for subscribing to MAC multicast and IP multicast, which is used to send subscription messages; Plmain is the main process on the head side, which uniformly manages the link layer discovery protocol, RDMA driver, PLIF, PLNVME and other modules. Nvmf information, local and remote nvmf information are uniformly managed by linked lists for easy operation. Specifically, the listening thread scans each network interface and creates a handle for each interface. Select the listening interface message information, then check the validity of the message frame and parse the cabinet information. Add / update the cabinet information list. The listening thread creates a read-write message queue, listens to the message queue, and waits for the main thread to send a message. The listening thread receives the transfer message sent by the main thread in the storage head based on the read-write message queue, and transmits the cabinet information to the main thread. The main thread registers / cancels the local cabinet information based on the cabinet information, that is, establishes a communication connection with the cabinet device or disconnects the communication connection with the cabinet device based on the non-volatile memory fast protocol. The main thread adds / deletes the cabinet information from the connected cabinet information list. Checks whether the main thread has exited and confirms whether the storage head information needs to be broadcast. Periodically obtains the cabinet information corresponding to the cabinet device and detects the duration of not receiving the cabinet information multicasted by the cabinet device. If the cabinet information multicasted by the cabinet device is not heard within the preset duration, the listening thread determines that the cabinet device is offline.

[0243] The communication connection method provided in the embodiment of the present application obtains a multicast address based on a link layer discovery protocol; based on the multicast address, the online information of the cabinet device corresponding to the multicast address is monitored, thereby ensuring the accuracy of monitoring the online information of the cabinet device.

[0244] If the online information of the cabinet device is monitored, the cabinet information corresponding to the cabinet device is obtained based on the preset multicast method of the cabinet device, ensuring the accuracy of the cabinet information corresponding to the cabinet device. The listening thread in the storage head adds the cabinet information corresponding to the cabinet device to the cabinet list, so that each cabinet device monitored can be recorded. The listening thread creates a read-write message queue and monitors the read-write message queue; the listening thread receives the delivery message sent by the main thread in the storage head based on the read-write message queue, and transmits the cabinet information to the main thread, ensuring that the main thread can receive the cabinet information corresponding to the cabinet device in a timely manner without affecting the normal operation of the main thread.

[0245] In an optional implementation, the preset multicast method includes MAC multicast, and the cabinet information includes the cabinet identification information of the cabinet device; the main thread identifies the cabinet identification information and detects whether the cabinet identification information contains the preset field. If the cabinet identification information contains the preset field, the main thread determines that the cabinet device is valid, thereby ensuring the accuracy of the determined cabinet device being valid. The main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, thereby ensuring the accuracy of the communication connection established by the main thread between the storage head and the cabinet device. The storage head can quickly sense the online and offline status of the cabinet device, thereby ensuring a fast link between the storage head and the cabinet device.

[0246] In an optional implementation, the preset multicast method includes IP multicast, and the cabinet information includes the cabinet IP address of the cabinet device; the main thread detects whether the cabinet device is in the preset network based on the cabinet IP address, thereby ensuring the accuracy of the detected cabinet device in the preset network, thereby avoiding the head device from establishing a communication connection with the cabinet device that is not in the preset network. If the cabinet device is in the preset network, the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information. The accuracy of the communication connection established by the main thread between the storage head and the cabinet device is guaranteed. The storage head can quickly sense the online and offline status of the cabinet device, ensuring a fast link between the storage head and the cabinet device.

[0247] Then, the main thread sends a request to the cabinet device to inquire about the cabinet identification information; the main thread receives the cabinet identification information sent by the cabinet device, identifies the cabinet identification information, and detects whether the cabinet identification information contains a preset field; if the cabinet identification information does not contain the preset field, the main thread disconnects the communication connection with the cabinet device. This ensures the accuracy of the communication connection between the storage head and the cabinet device established by the main thread. This enables the storage head to quickly sense the online and offline status of the cabinet device, ensuring a fast connection between the storage head and the cabinet device.

[0248] In addition, based on the preset multicast method of the cabinet device, the listening thread periodically obtains the cabinet information corresponding to the cabinet device; if the cabinet information multicast by the cabinet device is not received within the preset time, the listening thread determines that the cabinet device is offline; the listening thread deletes the cabinet information from the cabinet list; the listening thread sends an offline message of the cabinet device to the main thread, so that the status of each cabinet device can be effectively managed, and the main program can be notified in time to perform corresponding processing to ensure the normal operation of the storage device.

[0249] In addition, the storage disk information of the storage disk included in the disk cabinet device is obtained, thereby improving the availability and reliability of the disk cabinet device. Then, a keep-alive connection with the disk cabinet device is established, thereby realizing data communication between the disk cabinet device and the storage head.

[0250] The above method ensures the accuracy of establishing the communication connection between the storage head and the cabinet device. The storage head can quickly sense the online and offline of the cabinet device, ensuring a fast connection between the storage head and the cabinet device. In addition, the above communication connection method does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of the communication connection between the storage head and the cabinet device and saving human resources.

[0251] In this embodiment, a communication connection method is provided, which is applied to a storage head in a storage device. Figure 6 is a flow chart of a communication connection method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:

[0252] Step S401, obtaining network card information corresponding to a target network card in a storage head.

[0253] The target network card is used to communicate with the disk cabinet device in the storage device.

[0254] For details about this step, please refer to the above description of step S301, which will not be elaborated here.

[0255] Step S402: Based on the network card information, determine in the storage head a target functional network port for communication connection with the disk cabinet device based on the target network card.

[0256] For details about this step, please refer to the above description of step S302, which will not be repeated here.

[0257] Step S403, multicasting the storage head information corresponding to the target functional network port.

[0258] Specifically, the above step S403 may include the following steps:

[0259] Step S4031, obtaining the MAC address, port number, protocol type and head identification information corresponding to the storage head.

[0260] Specifically, the storage head can receive the MAC address, port number, protocol type and head identification information corresponding to the storage head input by the user, and can also receive the MAC address, port number, protocol type and head identification information corresponding to the storage head sent by other devices. The storage head can also search for the MAC address, port number, protocol type and head identification information corresponding to the storage head in the storage space. The embodiment of the present application does not specifically limit the way in which the storage head obtains the MAC address, port number, protocol type and head identification information corresponding to the storage head.

[0261] Step S4032: Generate a target address corresponding to the MAC address based on the MAC address.

[0262] Specifically, the target address can be an IPv6 address, an IPv4 address, or other addresses. When the target address is an IPv6 address, the storage head can obtain the MAC address of the storage head, and then insert FF FE in the middle of the MAC address to expand it to 64 bits. Reverse the seventh bit (counting from left to right) of the expanded MAC address. This step is to identify that the address is generated through EUI-64. Combine the reversed 64 bits with the prefix to form a complete IPv6 address.

[0263] The prefix may be a specific prefix assigned by a user, or may be determined according to a network topology and an address allocation policy.

[0264] Step S4033, generating the head information according to the MAC address, port number, protocol type, head identification information and target address.

[0265] Specifically, the storage head combines the MAC address, port number, protocol type, head identification information and target address to generate head information.

[0266] Step S4034, multicast the head information using a preset multicast method.

[0267] Specifically, the storage head can multicast the head information through IP multicast or MAC multicast.

[0268] Step S404: establishing a communication connection with the cabinet device based on the target functional network port.

[0269] For details about this step, please refer to the above description of step S304, which will not be elaborated here.

[0270] The communication connection method provided in the embodiment of the present application obtains the MAC address, port number, protocol type and head identification information corresponding to the storage head; generates the target address corresponding to the MAC address according to the MAC address; generates the head information according to the MAC address, port number, protocol type, head identification information and target address, and ensures the accuracy of the generated head information. The head information is multicasted in a preset multicast mode, so that the cabinet device can also receive the head information corresponding to the storage head.

[0271] In this embodiment, a communication connection method is provided, which is applied to a disk cabinet device in a storage device. Figure 7 is a flow chart of a communication connection method according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:

[0272] Step S501, loading the network card driver corresponding to the target network card.

[0273] Specifically, the cabinet device may utilize the device manager to load the network card driver corresponding to the target network card.

[0274] Among them, the target network card can be a ROCE network card. The ROCE (RDMA over Converged Ethernet) network card is an Ethernet network card that supports remote direct memory access (RDMA) technology. RDMA is a network communication technology that allows computers to directly access each other's memory without the intervention of the operating system kernel. This can greatly improve the efficiency and performance of data transmission and reduce CPU overhead. The ROCE network card combines the popularity of Ethernet and the high performance advantages of RDMA. It implements the RDMA protocol on Ethernet to enable high-speed, low-latency data transmission between servers.

[0275] The target network card may also be other Ethernet network cards, and the embodiment of the present application does not specifically limit the target network card.

[0276] Step S502, obtaining the cabinet information corresponding to the cabinet device.

[0277] Specifically, the cabinet device can receive the cabinet information corresponding to the cabinet device input by the user, and can also receive the cabinet information corresponding to the cabinet device sent by other devices. The cabinet device can also search for the cabinet information corresponding to the cabinet device in the storage space. The embodiment of the present application does not specifically limit the way in which the cabinet device obtains the cabinet information corresponding to the cabinet device.

[0278] Step S503, multicast the cabinet information based on a preset multicast method.

[0279] The preset multicast mode includes at least one of IP multicast and MAC multicast.

[0280] Specifically, the cabinet device can use IP multicast or MAC multicast, IP multicast and MAC multicast.

[0281] Step S504: establishing a communication connection with a storage head in the storage device.

[0282] Specifically, after the cabinet device multicasts the cabinet information, it can receive a request for establishing a communication connection sent by the storage head, and then feedback to the storage head to agree to the connection, thereby establishing a communication connection with the storage head in the storage device.

[0283] Step S505: Transmit storage disk information of the storage disk included in the disk enclosure device to the storage head.

[0284] The storage disk information includes at least one of the number, size, and specification of the storage disk.

[0285] Specifically, the disk enclosure device may transmit storage disk information of the storage disks included in the disk enclosure device to the storage head based on the communication connection between the disk enclosure device and the storage head.

[0286] Step S506: Obtain storage disk identification information corresponding to each storage disk in the disk cabinet device.

[0287] Specifically, the disk cabinet device may receive storage disk identification information corresponding to each storage disk in the disk cabinet device input by a user, and may also receive storage disk identification information corresponding to each storage disk in the disk cabinet device sent by other devices.

[0288] In an optional implementation manner of the present application, the above step S506 may include the following steps:

[0289] Step S5061, obtaining the cabinet identification information corresponding to the cabinet information.

[0290] Specifically, the cabinet device can receive cabinet identification information corresponding to cabinet information input by a user, can also receive cabinet identification information corresponding to cabinet information sent by other devices, and can also search for cabinet identification information corresponding to cabinet information from a storage space.

[0291] The embodiment of the present application does not specifically limit the manner in which the cabinet device obtains the cabinet identification information corresponding to the cabinet information.

[0292] Step S5062, obtaining topology information corresponding to each storage disk in the disk cabinet information.

[0293] Specifically, the cabinet device can receive the topology information corresponding to each storage disk in the cabinet information input by the user, and can also receive the topology information corresponding to each storage disk in the cabinet information sent by other devices. It can also identify each storage disk to determine the location information corresponding to each storage disk, and determine the topology information corresponding to each storage disk based on the location information corresponding to each storage disk.

[0294] The embodiment of the present application does not specifically limit the manner in which the disk cabinet device obtains the topology information corresponding to each storage disk.

[0295] Step S5063: Generate storage disk identification information corresponding to each storage disk according to the topology information and disk cabinet identification information corresponding to each storage disk.

[0296] Specifically, the disk cabinet device may combine the topology information corresponding to each storage disk and the disk cabinet identification information to generate storage disk identification information corresponding to each storage disk.

[0297] Step S507: detecting the status of each storage disk according to the identification information of each storage disk.

[0298] Specifically, the disk cabinet device may detect each storage disk according to the identification information of each storage disk, thereby detecting the status of each storage disk.

[0299] Step S508: Transmit the status of each storage disk to the storage head.

[0300] Specifically, the disk enclosure device transmits the status of each storage disk to the storage head based on the communication connection with the storage head.

[0301] Specifically, each time a storage disk is found to be online or offline, the disk cabinet device can transmit the online or offline status of each storage disk to the storage head based on the communication connection with the storage head.

[0302] The communication connection method provided in the embodiment of the present application loads the network card driver corresponding to the target network card; obtains the cabinet information corresponding to the cabinet device; multicasts the cabinet information based on a preset multicast method, so that the storage head can receive the cabinet information corresponding to the cabinet device, and then establishes a communication connection with the storage head in the storage device. The storage head can quickly sense the online and offline connections of the cabinet device, ensuring a fast connection between the storage head and the cabinet device. In addition, the above communication connection method does not require complex configuration of the storage head and the cabinet device, thereby improving the efficiency of the communication connection between the storage head and the cabinet device and saving human resources.

[0303] Then, the storage disk information of the storage disk included in the disk cabinet device is transmitted to the storage head, so that the storage head can effectively manage the disk cabinet device, thereby improving the reliability of the disk cabinet device.

[0304] In addition, the cabinet identification information corresponding to the cabinet information is obtained; the topology information corresponding to each storage disk in the cabinet information is obtained; based on the topology information corresponding to each storage disk and the cabinet identification information, the storage disk identification information corresponding to each storage disk is generated, thereby ensuring the accuracy and uniqueness of the generated storage disk identification information corresponding to each storage disk. According to the identification information of each storage disk, the status of each storage disk is detected; the status of each storage disk is transmitted to the storage head, so that the storage head can effectively manage each storage disk in the cabinet device, thereby improving the reliability of each storage disk in the cabinet device.

[0305] In this embodiment, a communication connection device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0306] This embodiment provides a communication connection device, which is applied to a storage head in a storage device, such as Figure 8 As shown, including:

[0307] The first acquisition module 601 is used to acquire the network card information corresponding to the target network card in the storage head; the target network card is used to communicate with the disk cabinet device in the storage device;

[0308] A determination module 602 is used to determine, based on the network card information, a target functional network port in the storage head for communication connection with the disk cabinet device based on the target network card;

[0309] The first communication module 603 is used to establish a communication connection with the cabinet device based on the target functional network port.

[0310] This embodiment provides a communication connection device, which is applied to a disk cabinet device in a storage device, such as Fig. 9 As shown, including:

[0311] The loading module 701 is used to load the network card driver corresponding to the target network card;

[0312] The second acquisition module 702 is used to acquire the cabinet information corresponding to the cabinet device;

[0313] The multicast module 703 is used to multicast the cabinet information based on a preset multicast method;

[0314] The second communication module 704 is used to establish a communication connection with a storage head in the storage device.

[0315] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0316] The communication connection device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0317] The embodiment of the present invention also provides a storage device, such as Fig.10 The storage device includes a storage head and at least one disk cabinet device, wherein the storage head is used to execute the communication connection method described in any one of the above embodiments; and the disk cabinet device is used to execute the communication connection method described in any one of the above embodiments.

[0318] The network module mainly handles the chassis management of the cabinet equipment;

[0319] Programmable logic controller, used for automatic network configuration and RoCE card management of RoCE cards;

[0320] Programmable logic error alarm, used to output abnormal alarms of cabinet equipment;

[0321] Platform-level system management interface, used for VPD (used for software to manage hardware information) management and hardware management;

[0322] Log, which is the log system of the cabinet equipment, including livedump, log files, etc.;

[0323] PLIF (driver interface abstraction layer), used to interact with hardware (ROCE card, NVME disk), upper layer protocols (such as host protocol, interconnection protocol), etc.;

[0324] Hot-swap module, used to handle PCIe hot-swap of disks;

[0325] NVME driver is responsible for hardware interaction, queue creation, etc., and cooperates with VL to implement NVMe Initiator;

[0326] Link layer discovery protocol, used for automatic discovery on the storage node side;

[0327] Memory management, used to manage the memory of the cabinet device; thread management, used to manage the thread scheduling of the cabinet device;

[0328] Discovery management, used for cabinet device discovery.

[0329] In an optional embodiment of the present application, Fig.11 The storage device also includes a switch, and the switch is communicatively connected with the storage head.

[0330] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0331] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0332] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A communication connection method, characterized in that: The method is applied to a storage head in a storage device, and comprises: Acquire network card information corresponding to a target network card in the storage head; the target network card is used to communicate with a disk cabinet device in the storage device; Based on the network card information, determining in the storage head a target functional network port for communication connection with the cabinet device based on the target network card; Establishing a communication connection with the cabinet device based on the target functional network port; Wherein, establishing a communication connection with the cabinet device based on the target functional network port includes: Based on the target functional network port, monitoring the online information of the cabinet device; If the online information of the cabinet device is monitored, a communication connection with the cabinet device is established based on a non-volatile memory fast protocol; Wherein, monitoring the online information of the cabinet device based on the target functional network port includes: Get the multicast address based on the link layer discovery protocol; Based on the multicast address, monitoring the online information of the cabinet device corresponding to the multicast address; If the online information of the disk cabinet device is monitored, a communication connection with the disk cabinet device is established based on a non-volatile memory fast protocol, including: If the online information of the cabinet device is monitored, a connection request is sent to the cabinet device using the NVMF protocol, and connection parameters are sent to the cabinet device; After receiving the response from the cabinet device, a connection is established with the cabinet device.

2. The method according to claim 1, characterized in that The obtaining the network card information corresponding to the target network card in the storage head includes: Identify the hardware device in the storage head and determine the target network card; The target network card is identified, and the network card information corresponding to the target network card is determined.

3. The method according to claim 1 or 2, characterized in that: The step of determining, in the storage head, a target functional network port for communication connection between the target network card and the cabinet device based on the network card information includes: Parsing the network card information to determine a parsing result corresponding to the target network card; the parsing result includes at least one of type information, location information, configuration information, status information, and attribute information corresponding to the target network card; Transmitting the analysis result to the driver; Based on the driver program, the target functional network port is set.

4. The method according to claim 1, characterized in that: The storage device further includes a switch, the switch is communicatively connected to the storage head, and the communication connection with the cabinet device is established based on the target functional network port, including: Based on the multicast address of the link layer discovery protocol, a subscription message is sent to the switch, wherein the subscription message is used to instruct the switch to send the online information of the cabinet device corresponding to the multicast address to the storage head; Receiving online information of the cabinet device sent by the switch; A communication connection with the disk cabinet device is established based on a non-volatile memory fast protocol.

5. The method according to claim 4, characterized in that The establishing of a communication connection with the disk cabinet device based on a non-volatile memory fast protocol includes: Based on the preset multicast mode of the cabinet device, obtaining cabinet information corresponding to the cabinet device; According to the disk cabinet information, a communication connection with the disk cabinet device is established based on the non-volatile memory express protocol.

6. The method according to claim 5, characterized in that The step of establishing a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information includes: The listening thread in the storage head adds the cabinet information corresponding to the cabinet device to the cabinet list; The monitoring thread creates a read-write message queue and monitors the read-write message queue; The listening thread receives the transfer message sent by the main thread in the storage head based on the read-write message queue, and transmits the cabinet information to the main thread; The main thread establishes a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information.

7. The method according to claim 6, characterized in that The preset multicast mode includes MAC multicast, and the cabinet information includes cabinet identification information of the cabinet device; the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, including: The main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field; If the cabinet identification information includes the preset field, the main thread determines that the cabinet device is valid; The main thread establishes a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information.

8. The method according to claim 6, characterized in that The preset multicast mode includes IP multicast, and the cabinet information includes the cabinet IP address of the cabinet device; The main thread establishes a communication connection with the disk cabinet device based on the non-volatile memory fast protocol according to the disk cabinet information, including: The main thread detects whether the cabinet device is in a preset network according to the cabinet IP address; If the cabinet device is in the preset network, the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information.

9. The method according to claim 7, characterized in that: The cabinet information does not include the cabinet identification information of the cabinet device; after the main thread establishes a communication connection with the cabinet device based on the non-volatile memory fast protocol according to the cabinet information, the method further includes: The main thread sends a request to the cabinet device to inquire about the cabinet identification information; The main thread receives the cabinet identification information sent by the cabinet device, The main thread identifies the cabinet identification information and detects whether the cabinet identification information contains a preset field; If the preset field is not included in the cabinet identification information, the main thread disconnects the communication connection with the cabinet device.

10. The method according to claim 6, characterized in that The method further comprises: Based on the preset multicast mode of the cabinet device, the monitoring thread periodically obtains the cabinet information corresponding to the cabinet device; If the cabinet information multicast by the cabinet device is not received within a preset time period, the monitoring thread determines that the cabinet device is offline; The monitoring thread deletes the cabinet information from the cabinet list; The listening thread sends an offline message of the disk cabinet device to the main thread.

11. The method according to any one of claims 6 to 9, characterized in that: After the main thread disconnects the communication connection with the disk cabinet device, the method further includes: Acquire storage disk information of the storage disk included in the disk cabinet device; the storage disk information includes at least one of the quantity, size, and specification of the storage disk; A keep-alive connection is established with the enclosure device.

12. The method according to claim 1, characterized in that The method further comprises: The head information corresponding to the storage head is multicast based on the target functional network port.

13. The method according to claim 12, characterized in that The multicasting of the head information corresponding to the storage head based on the target functional network port includes: Obtaining the MAC address, port number, protocol type and head identification information corresponding to the storage head; According to the MAC address, generating a target address corresponding to the MAC address; Generate the head information according to the MAC address, the port number, the protocol type, the head identification information and the target address; The head information is multicasted in a preset multicast mode.

14. A communication connection method, characterized in that: A disk cabinet device applied to a storage device, the method comprising: Load the network card driver corresponding to the target network card; Obtaining cabinet information corresponding to the cabinet device; Multicast the cabinet information based on a preset multicast method; the preset multicast method includes at least one of IP multicast and MAC multicast; Establishing a communication connection with a storage head in the storage device; wherein the storage head is used to execute the communication connection method according to any one of claims 1 to 13.

15. The method according to claim 14, characterized in that After establishing the communication connection with the storage head in the storage device, the method further includes: The storage disk information of the storage disk included in the disk cabinet device is transmitted to the storage head; the storage disk information includes at least one of the quantity, size and specification of the storage disk.

16. The method according to claim 15, characterized in that The method further comprises: Obtaining storage disk identification information corresponding to each storage disk in the disk cabinet device; Detecting the status of each storage disk according to the identification information of each storage disk; The status of each of the storage disks is transmitted to the storage head.

17. The method according to claim 16, characterized in that The obtaining of storage disk identification information corresponding to each storage disk in the disk cabinet device includes: Obtaining cabinet identification information corresponding to the cabinet information; Obtaining topology information corresponding to each storage disk in the disk cabinet information; The storage disk identification information corresponding to each storage disk is generated according to the topology information and the disk cabinet identification information corresponding to each storage disk.

18. A communication connection device, characterized in that: A storage head used in a storage device, the device comprising: A first acquisition module is used to acquire network card information corresponding to a target network card in the storage head; the target network card is used to communicate with a disk cabinet device in the storage device; A determination module, configured to determine, based on the network card information, in the storage head, a target functional network port for communication connection between the target network card and the cabinet device; A first communication module is used to establish a communication connection with the cabinet device based on the target functional network port; wherein, the communication connection established with the cabinet device based on the target functional network port includes: based on the target functional network port, monitoring the online information of the cabinet device; if the online information of the cabinet device is monitored, establishing a communication connection with the cabinet device based on the non-volatile memory fast protocol; wherein, based on the target functional network port, monitoring the online information of the cabinet device includes: obtaining a multicast address based on a link layer discovery protocol; based on the multicast address, monitoring the online information of the cabinet device corresponding to the multicast address; if the online information of the cabinet device is monitored, establishing a communication connection with the cabinet device based on the non-volatile memory fast protocol, including: if the online information of the cabinet device is monitored, using the NVMF protocol to send a connection request to the cabinet device and sending connection parameters to the cabinet device; after receiving the response of the cabinet device, establishing a connection with the cabinet device.

19. A communication connection device, characterized in that: A disk cabinet device used in a storage device, the device comprising: Loading module, used to load the network card driver corresponding to the target network card; A second acquisition module is used to acquire the cabinet information corresponding to the cabinet device; A multicast module, used for multicasting the cabinet information based on a preset multicast method; A second communication module is used to establish a communication connection with a storage head in the storage device; wherein the storage head is used to execute the communication connection method according to any one of claims 1 to 13.

20. A storage device, characterized in that: The storage device includes a storage head and at least one cabinet device, wherein the storage head is used to execute the communication connection method described in any one of claims 1 to 13; and the cabinet device is used to execute the communication connection method described in any one of claims 14 to 17.

21. The storage device according to claim 20, characterized in that The storage device also includes a switch, and the switch is communicatively connected with the storage head.

22. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the communication connection method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Memory system and memory disk group

    CN115756339A