A link management method, device, medium and program product

By receiving online messages through switching equipment and constructing a red-black tree structure, the system automatically detects and broadcasts online node information, solving the problem of manually establishing links between servers and storage nodes and achieving fast and accurate communication link establishment.

CN120729938BActive Publication Date: 2026-01-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511214713.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2026-01-27
Estimated Expiration
2045-08-28

AI Technical Summary

Technical Problem

When there are a large number of servers and storage nodes, existing technologies require manual input of commands to establish communication links, resulting in repetitive operations and a high risk of errors.

Method used

The system receives online messages from servers and storage nodes via switching devices, constructs a red-black tree structure to update online information, detects preset link establishment conditions, and automatically broadcasts online node information to establish a communication link.

Benefits of technology

It enables automatic batch operations without manual command input, quickly establishing communication links between servers and storage nodes, and reducing the probability of errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729938B_ABST
    Figure CN120729938B_ABST
Patent Text Reader

Abstract

The application discloses a link management method, device, medium and program product in the computer technical field. The application can enable a server to automatically establish a communication link with an online node (i.e. a chainable storage node) based on online node information delivered by a switching device, without manual input of a command, and in the case that the number of servers and storage nodes is large, the application can automatically operate in batches, is not prone to errors, and can quickly establish a communication link between the server and the storage node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a link management method, device, medium, and program product. Background Technology

[0002] Currently, establishing a communication link between a server and a storage node requires manual command input. When dealing with a large number of servers and storage nodes, this not only necessitates repetitive operations but is also prone to errors.

[0003] Therefore, how to quickly establish a communication link between the server and the storage node is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a link management method, device, medium and program product to quickly establish a communication link between a server and a storage node.

[0005] In a first aspect, this application provides a link management method applied to a switching device, comprising: receiving a first online message sent by each server and updating online server information according to the first online message; receiving a second online message sent by each storage node in a target storage system and updating online node information according to the second online message; confirming whether a preset link establishment condition is met by detecting whether both the online server information and the online node information have valid values; if the preset link establishment condition is met, broadcasting the online node information to each server so that the server receiving the broadcast determines the linkable storage node based on the online node information and establishes a communication link between itself and the linkable storage node.

[0006] Secondly, this application provides a link management method applicable to any server, comprising: receiving online node information sent by a switching device; determining linkable storage nodes based on the online node information, and establishing a communication link between itself and the linkable storage nodes; wherein the switching device updates the online node information according to a second online message sent by each storage node in the target storage system, updates the online server information according to a first online message sent by each server, and if both the online server information and the online node information have valid values, it confirms that the preset link establishment conditions are met, and broadcasts the online node information to each server.

[0007] Thirdly, this application provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the aforementioned disclosed link management method.

[0008] Fourthly, this application provides a non-volatile storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned disclosed link management method.

[0009] Fifthly, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the aforementioned disclosed link management method.

[0010] As can be seen from the above scheme, this application provides a link management method applied to a switching device, including: receiving a first online message sent by each server and updating the online server information according to the first online message; receiving a second online message sent by each storage node in the target storage system and updating the online node information according to the second online message; confirming whether a preset link establishment condition is met by detecting whether both the online server information and the online node information have valid values; if the preset link establishment condition is met, broadcasting the online node information to each server so that the server receiving the broadcast can determine the linkable storage node based on the online node information and establish a communication link between itself and the linkable storage node.

[0011] As can be seen, the beneficial effects of this application are as follows: the switching device simultaneously monitors the online status of servers and storage nodes, and when the preset link establishment conditions are met, it broadcasts online node information to each server. This allows the receiving server to determine the storage nodes that can be linked based on the online node information, thereby establishing a communication link between itself and the linked storage nodes. This method enables the server to automatically establish a communication link with online nodes (i.e., linked storage nodes) based on the online node information transmitted by the switching device, without requiring manual command input. Furthermore, when there are a large number of servers and storage nodes, it can automatically perform batch operations, reducing the likelihood of errors and enabling rapid establishment of communication links between servers and storage nodes.

[0012] Correspondingly, the link management device, equipment, medium, and program product provided in this application also have the above-mentioned technical effects. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0014] Figure 1 This is a flowchart of a link management method disclosed in this application;

[0015] Figure 2 This is a schematic diagram of a red-black tree structure disclosed in this application;

[0016] Figure 3 This is a flowchart of another link management method disclosed in this application;

[0017] Figure 4 This is a schematic diagram of a status reporting process disclosed in this application;

[0018] Figure 5 This is a schematic diagram of a link establishment process disclosed in this application;

[0019] Figure 6 This is a schematic diagram of a processing flow for cases of failure to report within the time limit, as disclosed in this application.

[0020] Figure 7 This is a schematic diagram of a link disconnection process disclosed in this application;

[0021] Figure 8 A storage node structure diagram provided in this application;

[0022] Figure 9 A terminal structure diagram provided for this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0024] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0025] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0026] Currently, establishing a communication link between a server and a storage node requires manual command input. When dealing with a large number of servers and storage nodes, this not only involves repetitive operations but is also prone to errors. Therefore, this application provides a link management solution that can quickly establish a communication link between the server and storage nodes.

[0027] See Figure 1 As shown in the figure, this application discloses a link management method applied to a switching device, including:

[0028] S101. Receive the first online message sent by each server and update the online server information according to the first online message.

[0029] S102. Receive the second online message sent by each storage node in the target storage system, and update the online node information according to the second online message.

[0030] It should be noted that multiple servers can connect to at least one storage system through a switching device, and a storage system includes at least one storage node. All servers and storage nodes connected to the switching device periodically report their online status to the switching device, enabling the switching device to promptly obtain information on the online status of each server and storage node. In one embodiment, receiving a first online message from each server includes: using the received periodically sent online messages from each server as the first online message; correspondingly, receiving a second online message from each storage node; and using the received periodically sent online messages from each storage node as the second online message. The period at which the servers send the first online message can be the same as or different from the period at which the storage nodes send the second online message. Of course, the second online message can be a message sent by a management node in the target storage system (which can be a dedicated management node or a storage node with management functions) indicating the online status of all online nodes in the storage system.

[0031] To facilitate the recording and updating of online server and online node information, the switching equipment constructs a corresponding red-black tree structure. In one implementation, updating online server information based on a first online message includes: constructing a first red-black tree structure based on each server; recording and updating online server information using the first red-black tree structure. Correspondingly, updating online node information based on a second online message includes: constructing a second red-black tree structure based on each storage node; recording and updating online node information using the second red-black tree structure. If multiple target storage systems exist, multiple second red-black tree structures are constructed accordingly; that is, one storage system corresponds to one second red-black tree structure. Figure 2 As shown, n storage systems correspond to n second red-black tree structures; Figure 2 In a red-black tree data structure, red and black dots are node types. These dots are distributed according to certain rules, which facilitates the construction of the entire tree, node deletion, node addition, and node querying. Both red and black dots can represent a storage node.

[0032] S103. Confirm whether the preset chain establishment conditions are met by checking whether both the online server information and the online node information have valid values.

[0033] In this embodiment, if the switching device confirms that both a server and a storage node are online at the same time, it informs the server of the IP address and other identification information of the online storage node, enabling the online server to actively establish a connection with the online storage node. The switching device can confirm the existence of both online servers and storage nodes simultaneously by verifying online server information and online node information. The online server information records the identification information of the online server, and the online node information records the identification information of the online storage node. If a red-black tree structure is used, the nodes representing each device in the red-black tree structure can record null values ​​or the identification information of specific devices. That is: if a server or storage node is online, its identification information is recorded in the corresponding node in the red-black tree structure; if a server or storage node is offline, a default value is recorded as an invalid value in the corresponding node in the red-black tree structure. Alternatively, if a server or storage node is offline, the node corresponding to that server or storage node can be deleted from the red-black tree structure.

[0034] Accordingly, in one implementation, the satisfaction of the preset link establishment condition is confirmed by detecting whether both the online server information and the online node information contain valid values. This includes: if both the online server information and the online node information contain valid values, and the valid values ​​are data that can reflect the online server identification information or the online storage node identification information, then the preset link establishment condition is satisfied; otherwise, the preset link establishment condition is not satisfied. In one implementation, if the online server information records the online server identification information and the online node information records the online storage node identification information, then both the online server information and the online node information contain valid values; if the online server information does not record the online server identification information and / or the online node information does not record the online storage node identification information, then the online server information does not record valid values ​​and / or the online node information does not record valid values, that is: the online server information and / or the online node information do not contain valid values, therefore the preset link establishment condition is not satisfied. It is evident that the switching device only informs the server of the IP address and other identification information of the online storage nodes when both a server and an online storage node exist simultaneously.

[0035] S104. If the preset chain establishment conditions are met, broadcast online node information to each server so that the server receiving the broadcast can determine the chainable storage node based on the online node information and establish a communication link between itself and the chainable storage node.

[0036] In one example, when the communication link is an FC-NVMe (Fibre Channel-Non-Volatile Memory Express, also known as Fibre Channel over NVMe) link, the process by which the server receiving the broadcast determines the available storage nodes for link establishment based on online node information and establishes a communication link between itself and these nodes includes: the server obtaining the node name, port name, and unique identifier (NVMe Qualified Name, NQN) of the online storage nodes based on the online node information; then, it obtains the name and port number of its own FC controller and calls the command `nvme discover -t fc -w nn-0x***:pn-0x*** -a nn-0x***:pn-0x*** -n nqn.***` to actively probe and discover the ports of available FC-NVMe storage controllers. Each FC-NVMe storage controller corresponds one-to-one with an online storage node. After discovering an available port on the FC-NVMe storage controller, the server invokes the command `nvme connect -tfc -w nn-0x***:pn-0x*** -a nn-0x***:pn-0x*** -n nqn.***` to establish an FC-NVMe link between the server and the storage node. The "***" in the command is used to specify the node name, port name, and node unique identifier (NQN). This server-executed process can be automated using software tools.

[0037] It should be noted that, in order to enable the switching equipment to promptly detect offline servers and storage nodes, the intervals at which servers and storage nodes report their own status can be recorded and monitored. Specifically, the switching equipment records the first time interval between each server sending its first online message; determines the first tolerance time for each server based on the first time interval; if the first tolerance time for any server is exceeded and the first online message sent by that server is not received, then the server's identifier information is deleted from the online server information. In one embodiment, the calculation process of the first tolerance time includes: sorting the first time intervals recorded within a preset first time period (e.g., one minute) (from smallest to largest or from largest to smallest) to obtain a first sequence; using the mean of each element in the first sequence as the median to determine a first predetermined proportion confidence interval for the first sequence; and obtaining the first tolerance time based on the maximum value in the first predetermined proportion confidence interval and a preset first tolerance coefficient. For example: If the first time intervals recorded within a preset first time period are arranged in ascending order, resulting in 2 seconds, 2 seconds, 3 seconds, 4 seconds, and 4 seconds, then the first sequence is [2, 2, 2, 4, 4], with a corresponding mean of 2.8. The corresponding 90% confidence interval is then calculated, with a predetermined ratio of 90%, ensuring the mean is at the median of the 90% confidence interval. In one example, the first tolerance time = maximum value × preset first tolerance coefficient.

[0038] Accordingly, the process of the switching device detecting the reporting interval of storage nodes includes: recording the second time interval for each storage node to send the second online message; determining the second tolerance time corresponding to each storage node based on the second time interval; if the second tolerance time corresponding to any storage node is exceeded and no second online message is received from that storage node, then the identification information of that storage node is deleted from the online node information. The calculation process of the second tolerance time includes: sorting the second time intervals recorded within a preset second time period (e.g., one minute) to obtain a second sequence; the preset first time period and the preset second time period can be the same or different; using the mean of each element in the second sequence as the median to determine the second predetermined proportion confidence interval of the second sequence; obtaining the second tolerance time based on the maximum value in the second predetermined proportion confidence interval and the preset second tolerance coefficient; the preset first tolerance coefficient and the preset second tolerance coefficient can be the same or different, and the specific process can refer to the aforementioned calculation of the first tolerance time, which will not be repeated here. The minimum and maximum values ​​in the updated second sequence constitute the corresponding 90% confidence interval.

[0039] This embodiment also enables timely disconnection of invalid communication links. In one implementation, if the switching device confirms that a linkable storage node is offline, it sends a corresponding node offline notification message to the server with which the linkable storage node exists, causing the server to disconnect the communication link; or, if the switching device confirms that a linkable storage node is offline, it broadcasts a corresponding node offline notification message to each server, so that the receiving server checks whether it has a communication link with the linkable storage node based on the node offline notification message; if it confirms that it exists, it disconnects the corresponding communication link; if it confirms that it does not exist, no operation is performed. If the switching device receives an offline message, fault message, and / or upgrade message from the linkable storage node, the switching device confirms that the linkable storage node is offline.

[0040] As can be seen, in this embodiment, the switching device simultaneously monitors the online status of both servers and storage nodes. When the preset link establishment conditions are met, it broadcasts online node information to each server. The server receiving the broadcast then determines which storage nodes can be linked based on this information, thereby establishing a communication link between itself and the linked storage nodes. This method allows servers to automatically establish communication links with online nodes (i.e., linked storage nodes) based on the online node information transmitted by the switching device, without requiring manual command input. Furthermore, when there are a large number of servers and storage nodes, it can automatically perform batch operations, reducing the likelihood of errors and enabling rapid establishment of communication links between servers and storage nodes.

[0041] See Figure 3 As shown in the embodiments of this application, another link management method is disclosed, applicable to any server, including:

[0042] S301, Receive online node information sent by the switching equipment.

[0043] S302. Based on the online node information, determine the storage nodes that can be chained and establish a communication link between itself and the storage nodes that can be chained.

[0044] The switching device updates the online node information based on the second online message sent by each storage node in the target storage system, and updates the online server information based on the first online message sent by each server. If both the online server information and the online node information have valid values, it confirms that the preset link establishment conditions are met, and then broadcasts the online node information to each server.

[0045] In one implementation, the server also sends host information to the chainable storage node via a communication link, enabling the chainable storage node to create a control host based on the host information and mount a storage volume for the control host. After detecting the mounting of the storage volume, a corresponding path device is created, and a mapping relationship between the storage volume and the path device is established; wherein multiple path devices correspond to one storage volume.

[0046] As can be seen, this embodiment can automatically mount storage volumes based on the communication link between the server and storage nodes, and the server can assign multiple path devices to a single storage volume, thus achieving the aggregation of multi-path devices. Path devices correspond to hard drives, SSDs, NVMe disks, virtual disks, etc., while storage volumes are logical devices, which can be logical devices resulting from the aggregation of multiple path devices.

[0047] Please see Figure 4 Multipathing software is installed on each server. This software enables each server to send an online message to the switch (switching equipment) every 5 seconds. Upon receiving the message, the switch's monitoring system updates the online server list (online server information). This online server list is represented by a red-black tree to facilitate the insertion of new server nodes and the deletion of old ones. Furthermore, upon receiving the latest online message, the system updates the server's last online time to track how long it has been without information and determine whether it should go offline. The server notifies the switch of its online status, allowing the switch to use this heartbeat mechanism to determine the server's online status and add it to its maintained online queue.

[0048] Similarly, each storage node in the storage system sends an online message (containing information about all nodes in the storage system) to the switch every 5 seconds. After receiving the message from the storage system, the switch updates the online storage list (online node information).

[0049] Each storage system also corresponds to a red-black tree, facilitating quick lookup of online nodes in each storage system. For example... Figure 2 As shown, each red-black tree forms a queue structure. Each system in the queue is associated with a red-black tree, which is used to record the online and offline status of all storage nodes in that storage system.

[0050] When the switch confirms that the server and storage system are online at the same time, the switch's monitoring system will package and broadcast the information of the online storage nodes, that is, send it to the server's multipath software. After receiving the message, the multipath software will decompose the storage node information and establish an FC-NVMe link from the server to the storage node based on the storage node information.

[0051] Please see Figure 5, The multipath software analyzes the messages sent by the switch, and obtains the node name, port name, and NQN information of the storage node. The multipath software obtains the node name and port name of the FC (Fibre Channel) on the server. The multipath software invokes the command nvme discover -t fc -w nn-0x***:pn-0x*** -a nn-0x***:pn-0x*** -n nqn.***, that is, actively detects and discovers the available FC-NVMe storage controllers (target ports) provided through the FC-NVMe network (i.e., Fibre Channel SAN). The multipath software invokes the command nvme connect -t fc -w nn-0x***:pn-0x*** -a nn-0x***:pn-0x*** -n nqn.***, that is, establishes an FC-NVMe link between the server and the storage node.

[0052] Among them, the nvme discover command is used to send a discovery request to the storage target (Target) of FC-NVMe to obtain information about available NVMe namespaces (Namespaces) and controllers (Controllers); the complete command line is expressed as: nvme discover -t fc -a <target FC address> -s <FC port number> -q <host NQN>. The nvme connect command is used to establish an FC-NVMe link between the server or host (Initiator) and the storage target (Target) according to the information returned by nvme discover; the complete command line is expressed as: nvme connect -t fc -a <target FC address> -n <target NQN> -q <host NQN>.

[0053] Due to reasons such as network latency and packet loss, the online messages received by the switch monitoring system from the server and the storage system are not strictly once every 5 seconds. Therefore, it is necessary for the switch monitoring system to collect the reporting time intervals of each server and storage system to prepare for subsequent automatic disconnection.

[0054] For example, the time intervals between the online messages reported by the switch for Server 1 and Storage System 1 are shown in Table 1. In this embodiment, the management node of the storage system summarizes the status of multiple storage nodes and reports it to the switch. Therefore, only the reporting time interval of Storage System 1 needs to be counted.

[0055] Table 1

[0056]

[0057] Based on the data recorded in Table 1, the mean time interval for each server and the mean time interval for the storage system were calculated, and the corresponding 90% confidence intervals were determined.

[0058] For example: the average of the 10 time intervals for the i-th server is: x ij This represents the sampling of the j-th time interval of the i-th server.

[0059] If the 90% confidence interval is represented as: ,in This is the lower limit of the 90% confidence interval. This is the upper limit of the 90% confidence interval, and for and The median value, thus making this interval cover 90% of the samples.

[0060] Assume the maximum tolerance time of the switch is , that is U i This indicates the maximum tolerance time (first tolerance time or second tolerance time) of the switch to the server or storage system. 5 represents the upper limit of the 90% confidence interval for the i-th server, and 5 is the tolerance coefficient. In this example, the maximum tolerance time is 5 times the upper limit of the 90% confidence interval; see Table 2 for details.

[0061] Table 2

[0062]

[0063] Please see Figure 6 As per the configuration, the server's multipath software sends an online message to the switch's monitoring system every 5 seconds. If the switch does not receive an online message after the server's maximum tolerability period has elapsed, it considers the server offline and removes it from the online server list. Similarly, the storage system sends an online message (containing relevant information about the storage node) to the switch's monitoring system every 5 seconds. If the switch does not receive the corresponding online message after the storage system's maximum tolerability period has elapsed, it removes the storage system from the online storage list.

[0064] When the switch determines that the storage system is offline, the switch packages and broadcasts the offline message of the storage system, that is, it sends it to the multipath software of the server. After receiving the message, the multipath software decomposes the storage node information in the message and disconnects the FC-NVMe link from the server to the corresponding storage node according to the storage node information.

[0065] Please see Figure 7The detailed steps for disconnecting the connection are as follows: The multipath software parses the switch messages to obtain the storage node's node name, port name, and NQN information. The multipath software obtains the server's FC card's node name and port name. The multipath software calls the command `list list-subsys --output-format=json` to check if a link exists between the server and the storage system. If not, the process ends; if it exists, proceed to the next step. The multipath software calls the command `nvme discconnect -t fc -w nn-0x***:pn-0x*** -a nn-0x***:pn-0x*** -n nqn.***`, which disconnects the FC-NVMe link between the server and the storage node.

[0066] After establishing the FC-NVMe link between the host and storage nodes, host information is reported to the storage system. First, the server's multipath software identifies all FC-NVMe channels. The command `ls / dev / | egrep ^nvme([0-9]+$)` retrieves all channels established in the previous step; the channel identifier is typically ` / dev / nvmeX`. Second, multipath collects host information every 10 minutes. The required host information includes hostname, serial number, operating system type, and version. The hostname is obtained using the command `hostname`, the serial number using the command `dmidecode -t 1 | grep 'Serial Number'`, and the operating system type and version are obtained by reading the file ` / dev / os-release`. Then, multipath reports the host information to the storage system. This is done through an in-band channel. After receiving the host information reported by multipath, the storage system retrieves the host's NQN information via the FC-NVMe link and then calls the command `mkhost` to create a host. Note that the host type must be FC-NVMe; this host is used for mounting volumes. At this point, all the preliminary work for mounting the volume is complete. When creating the host, a name needs to be specified, which is formed by concatenating the serial number and NQN from the host information.

[0067] Users can then log in to the storage system and create and map volumes using the following commands: Create a volume using the `mkvdisk` or `mkvolume` command. Map the volume created in the previous step to a host using the `mkvdiskhostmap` command. Note that the host here is created by the storage system after receiving the host information reported by multipath. After mapping the volume to the host in the previous step, the FC driver on the server automatically detects that a new volume has been mapped to the storage system, and the kernel automatically creates the corresponding path device (sdX). If there are multiple FC-NVMe links from the server to the storage system, multiple path devices will be created, and they will all correspond to the same storage volume.

[0068] It's important to note that when the multipathing software starts, it creates a thread whose responsibility is to monitor events from the kernel. When the kernel creates a path device (sdX), it generates a kernel event, which is automatically passed to user space. The multipathing software can then monitor this event, indicating that a path device (sdX) is online. If multiple path devices (sdX) have the same WWId (World Wide Identifier), it means they correspond to the same volume. The multipathing software will then aggregate these SdX devices into a single logical device (dm-Y). The WWId is a globally unique identifier used to uniquely identify a storage volume. Multiple SdXs may have the same WWId because they correspond to the same storage volume.

[0069] During aggregation, a device dm-Y is created in the Linux directory / dev / . Multiple sdX devices with the same WWId are then associated with dm-Y (for example, if sdb and sdc can be seen under / sys / block / dm-3 / slaves / , it means that sdb and sdc are aggregated into dm-3). In this way, these sdX devices are aggregated into dm-Y.

[0070] In many scenarios, it's necessary to isolate the storage controller of a storage node, meaning that the node is temporarily not expected to handle I / O. For example, during a storage system upgrade, storage nodes are upgraded one by one. When upgrading a single storage node, the storage system removes that storage node from the online messages sent to the switch's monitoring program. This causes the switch to consider the storage node offline and broadcasts the offline message. The server's multipath software, upon receiving this message, primarily disconnects the FC-NVMe link with that storage node. After the upgrade is complete, the storage system resumes sending online messages (including the storage node) to the switch's monitoring program. The switch then considers the storage node online and broadcasts the online message. The server's multipath software, upon receiving this message, primarily establishes the FC-NVMe link with that storage node.

[0071] This embodiment can automatically establish and disconnect FC-NVMe links, create, map, and aggregate volumes, as well as isolate controllers. By utilizing the server's multipathing software, the switch's monitoring system, and the storage system, the creation and deletion of FC-NVMe links between the server and storage nodes are automated, reducing manual intervention and freeing up manpower. Furthermore, host information acquisition is also automatically generated by the multipathing software, and host information on the storage cluster is automatically handled by the storage system, reducing errors caused by manual operation and improving efficiency. This solution is not only applicable to FC-NVMe but also to RoCE-NVMe links. For RoCE-NVMe links, establishing a connection between the server and storage nodes requires only a single command: `nvme connect`.

[0072] The following describes a link management device provided in an embodiment of this application. The link management device described below can be referred to in conjunction with other embodiments described herein.

[0073] This application discloses a link management device applied to a switching device, comprising: a first receiving module for receiving a first online message sent by each server and updating online server information according to the first online message; a second receiving module for receiving a second online message sent by each storage node in a target storage system and updating online node information according to the second online message; a confirmation module for confirming whether a preset link establishment condition is met by detecting whether both the online server information and the online node information have valid values; and a broadcasting module for broadcasting the online node information to each server if the preset link establishment condition is met, so that the server receiving the broadcast can determine the linkable storage node based on the online node information and establish a communication link between itself and the linkable storage node.

[0074] In one implementation, the first receiving module is specifically used to: take the online messages periodically sent by each server as a first online message; correspondingly, the second receiving module is specifically used to: take the online messages periodically sent by each storage node as a second online message.

[0075] In one implementation, the first receiving module is specifically used to: construct a first red-black tree structure based on each server; and record and update online server information using the first red-black tree structure. Correspondingly, the second receiving module is specifically used to: construct a second red-black tree structure based on each storage node; and record and update online node information using the second red-black tree structure.

[0076] In one implementation, the second receiving module is further configured to: if there are multiple target storage systems, construct multiple second red-black tree structures accordingly.

[0077] In one implementation, the confirmation module is used to: confirm that the preset chain establishment conditions are met if both the online server information and the online node information have valid values; otherwise, confirm that the preset chain establishment conditions are not met.

[0078] In one implementation, if the online server information records the identification information of the online server and the online node information records the identification information of the online storage node, then it is confirmed that both the online server information and the online node information have valid values; if the online server information does not record the identification information of the online server and / or the online node information does not record the identification information of the online storage node, then it is confirmed that the online server information does not record a valid value and / or the online node information does not record a valid value.

[0079] In one embodiment, the system further includes: a timeout processing module, used to record the first time interval between each server sending the first online message; determine the first tolerance time corresponding to each server based on the first time interval; if the first tolerance time corresponding to any server is exceeded and the first online message sent by that server is not received, then the identification information of that server is deleted from the online server information.

[0080] In one implementation, the timeout processing module is further configured to: record the second time interval for each storage node to send the second online message; determine the second tolerance time corresponding to each storage node based on the second time interval; if the second tolerance time corresponding to any storage node is exceeded and the second online message sent by that storage node is not received, then delete the identification information of that storage node from the online node information.

[0081] In one embodiment, the calculation process of the first tolerance time includes: sorting the first time intervals recorded within a preset first time period to obtain a first sequence; using the mean of each element in the first sequence as the median to determine a first predetermined proportion confidence interval of the first sequence; and obtaining the first tolerance time based on the maximum value in the first predetermined proportion confidence interval and a preset first tolerance coefficient.

[0082] In one embodiment, the calculation process of the second tolerance time includes: sorting the second time intervals recorded within a preset second time period to obtain a second sequence; using the mean of each element in the second sequence as the median to determine a second predetermined proportion confidence interval for the second sequence; and obtaining the second tolerance time based on the maximum value in the second predetermined proportion confidence interval and a preset second tolerance coefficient.

[0083] In one embodiment, the system further includes: a link disconnection module, configured to, if it is confirmed that a linkable storage node is offline, send a corresponding node offline notification message to a server that has a communication link with the linkable storage node, so that the server disconnects the communication link; or, if it is confirmed that a linkable storage node is offline, broadcast a corresponding node offline notification message to each server, so that the server receiving the broadcast can detect whether it has a communication link with the linkable storage node based on the node offline notification message; if it is confirmed that it exists, disconnect the corresponding communication link; if it is confirmed that it does not exist, do nothing.

[0084] In one implementation, if an offline message, fault message, and / or upgrade message is received from a chainable storage node, the chainable storage node is confirmed to be offline.

[0085] This application also discloses another link management method applicable to any server, including: a node information receiving module for receiving online node information sent by a switching device; and a link establishment module for determining eligible storage nodes based on the online node information and establishing a communication link between itself and the eligible storage nodes. The switching device updates the online node information according to second online messages sent by each storage node in the target storage system, and updates the online server information according to first online messages sent by each server. If both the online server information and the online node information have valid values, it confirms that the preset link establishment conditions are met and broadcasts the online node information to each server.

[0086] In one embodiment, it further includes: a sending module, configured to send host information to a chainable storage node via a communication link, so that the chainable storage node can create a control host based on the host information and mount a storage volume for the control host.

[0087] In one embodiment, it further includes: an aggregation module, used to create corresponding path devices and establish a mapping relationship between storage volumes and path devices after detecting that a storage volume is mounted; wherein multiple path devices correspond to one storage volume.

[0088] For more detailed information on the working process of each module and unit in this embodiment, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0089] As can be seen, this embodiment provides a link management device that enables the server to automatically establish a communication link with online nodes (i.e., link-establishing storage nodes) based on the online node information transmitted by the switching equipment. No manual command input is required, and when there are a large number of servers and storage nodes, automatic batch operation is possible, which is less prone to errors and can quickly establish a communication link between the server and the storage nodes.

[0090] The following describes an electronic device provided by an embodiment of this application. The electronic device described below can be referred to in conjunction with other embodiments described herein.

[0091] This application discloses an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the method disclosed in any of the above embodiments.

[0092] Furthermore, embodiments of this application also provide an electronic device. The aforementioned electronic device can be, for example,... Figure 8 The storage node shown can also be as follows: Figure 9 The terminal shown. Figure 8 and Figure 9 These are all diagrams illustrating the structure of an electronic device according to an exemplary embodiment. The content in the diagrams should not be considered as any limitation on the scope of this application.

[0093] Figure 8 This is a schematic diagram of a storage node provided in an embodiment of this application. Specifically, the storage node may include: at least one processor, at least one memory, a power supply, a communication interface, an input / output interface, and a communication bus. The memory stores a computer program, which is loaded and executed by the processor to implement the relevant steps in the link management disclosed in any of the foregoing embodiments.

[0094] In this embodiment, the power supply is used to provide operating voltage for each hardware device on the storage node; the communication interface can create a data transmission channel between the storage node and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0095] In addition, the memory, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system, computer programs and data, etc., and the storage method can be temporary storage or permanent storage.

[0096] The operating system manages and controls the hardware devices and computer programs on the storage node to enable the processor to perform operations and processes on the data in the memory. It can be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs capable of performing the link management method disclosed in any of the foregoing embodiments, the computer programs may further include computer programs capable of performing other specific tasks. The data may include application update information and application developer information.

[0097] Figure 9 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal may include, but is not limited to, a smartphone, tablet computer, laptop computer, or desktop computer.

[0098] Typically, the terminal in this embodiment includes a processor and a memory.

[0099] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor can be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which handles computational operations related to machine learning.

[0100] The memory may include one or more computer non-volatile storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory is used to store at least the following computer program, which, after being loaded and executed by the processor, is capable of implementing the relevant steps in the link management method executed by the terminal side as disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory may also include operating systems and data, and the storage method may be temporary or permanent storage. The operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, application update information.

[0101] In some embodiments, the terminal may further include a display screen, an input / output interface, a communication interface, a sensor, a power supply, and a communication bus.

[0102] Those skilled in the art will understand that Figure 9 The structure shown does not constitute a limitation on the terminal and may include more or fewer components than illustrated.

[0103] The following describes a non-volatile storage medium provided in an embodiment of this application. The non-volatile storage medium described below can be referred to in conjunction with other embodiments described herein.

[0104] A non-volatile storage medium is provided for storing a computer program, wherein the computer program, when executed by a processor, implements the link management method disclosed in the foregoing embodiments. The non-volatile storage medium is a computer-readable non-volatile storage medium, which, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon include an operating system, computer programs, and data, and the storage method can be temporary storage or permanent storage.

[0105] The following describes a computer program product provided by an embodiment of this application. The computer program product described below can be referred to in conjunction with other embodiments described herein.

[0106] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the aforementioned disclosed link management method.

[0107] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium for storing a computer program that, when executed by a processor, implements the steps in any of the above embodiments.

[0108] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0109] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of non-volatile storage medium known in the art.

[0110] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A link management method, characterized in that, Applied to switching equipment, including: Receive the first online message sent by each server, and update the online server information according to the first online message; Receive the second online message sent by each storage node in the target storage system, and update the online node information according to the second online message; By detecting whether both the online server information and the online node information have valid values, it is confirmed whether the preset chain establishment condition is met: there are online servers and online storage nodes at the same time. If the preset chain establishment conditions are met, the online node information is broadcast to each server so that the server receiving the broadcast can determine the chainable storage node based on the online node information and automatically establish a communication link between itself and the chainable storage node. If the chainable storage node is confirmed to be offline, a corresponding node offline notification message is sent to the server that has the communication link with the chainable storage node, so that the server disconnects the communication link; wherein, the storage controller of the storage node is isolated, and if the offline message, fault message and / or upgrade message sent by the chainable storage node are received, the chainable storage node is confirmed to be offline. Specifically, host information is sent to the chainable storage node via the communication link, so that the chainable storage node can create a control host based on the host information and automatically mount a storage volume for the control host. After the storage volume is detected to be mounted, a corresponding path device is created, and a mapping relationship between the storage volume and the path device is established; wherein, multiple path devices correspond to one storage volume.

2. The method according to claim 1, characterized in that, Receive the first online messages sent by each server, including: The online messages periodically sent by each server are received and used as the first online message; Accordingly, it receives the second online message sent by each storage node; The online messages periodically sent by each storage node are used as the second online message.

3. The method according to claim 1, characterized in that, Update the online server information according to the first online message, including: The first red-black tree structure was obtained by constructing it based on each server; The online server information is recorded and updated using the first red-black tree structure; Accordingly, the online node information is updated based on the second online message, including: The second red-black tree structure is constructed based on each storage node; The online node information is recorded and updated using the second red-black tree structure.

4. The method according to claim 3, characterized in that, Also includes: If there are multiple target storage systems, then multiple second red-black tree structures will be constructed accordingly.

5. The method according to claim 1, characterized in that, If the online server information and / or the online node information do not have valid values, then it is confirmed that the preset chain establishment conditions are not met.

6. The method according to claim 5, characterized in that, If the online server information records the identification information of the online server and the online node information records the identification information of the online storage node, then it is confirmed that both the online server information and the online node information have valid values. If the online server information does not record the identification information of the online server, and / or the online node information does not record the identification information of the online storage node, then it is confirmed that the online server information does not record a valid value, and / or the online node information does not record a valid value.

7. The method according to claim 1, characterized in that, Also includes: Record the first time interval between each server sending the first online message; The first tolerance time for each server is determined based on the first time interval. If the first patience time corresponding to any server is exceeded and no first online message is received from that server, then the server's identification information is deleted from the online server information.

8. The method according to claim 1, characterized in that, Also includes: Record the second time interval at which each storage node sends the second online message; The second tolerance time corresponding to each storage node is determined based on the second time interval. If the second tolerance time corresponding to any storage node is exceeded and no second online message is received from that storage node, then the identification information of that storage node is deleted from the online node information.

9. The method according to claim 7 or 8, characterized in that, The calculation process for the first patience time includes: Sort the first time intervals recorded within the preset first time period to obtain the first sequence; The mean of each element in the first sequence is used as the median to determine the first predetermined proportion confidence interval of the first sequence; The first tolerance time is obtained based on the maximum value in the first predetermined confidence interval and the preset first tolerance coefficient; Accordingly, the calculation process for the second tolerance time includes: Sort the second time intervals recorded within the preset second time period to obtain the second sequence; The mean of each element in the second sequence is used as the median to determine the second predetermined proportion confidence interval of the second sequence; The second tolerance time is obtained based on the maximum value in the second predetermined proportion confidence interval and the preset second tolerance coefficient.

10. The method according to any one of claims 1 to 8, characterized in that, Also includes: If the chainable storage node is confirmed to be offline, a corresponding node offline notification message is broadcast to each server, so that the server receiving the broadcast can detect whether there is a communication link with the chainable storage node based on the node offline notification message; if it is confirmed to exist, the corresponding communication link is disconnected; if it is confirmed not to exist, no operation is performed.

11. A link management method, characterized in that, Applicable to any server, including: Receive online node information sent by the switching equipment; Based on the online node information, identify the storage nodes that can be used for chain building, and automatically establish a communication link between yourself and the storage nodes that can be used for chain building; The switching device updates the online node information based on the second online message sent by each storage node in the target storage system, and updates the online server information based on the first online message sent by each server. If both the online server information and the online node information have valid values, it confirms that the preset link establishment condition is met: there are online servers and online storage nodes at the same time, and broadcasts the online node information to each server. If the switching device confirms that the chainable storage node is offline, it sends a corresponding node offline notification message to the server that has the communication link with the chainable storage node, so that the server disconnects the communication link; wherein, the storage controller of the storage node is isolated, and if it receives an offline message, fault message and / or upgrade message sent by the chainable storage node, it confirms that the chainable storage node is offline; The host information is sent to the chainable storage node through the communication link, so that the chainable storage node can create a control host based on the host information and mount a storage volume for the control host. After the storage volume is detected to be mounted, a corresponding path device is created, and a mapping relationship between the storage volume and the path device is established; wherein, multiple path devices correspond to one storage volume.

12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as claimed in any one of claims 1 to 11.

13. A non-volatile storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the method as described in any one of claims 1 to 11.

14. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Communication link establishment method and device, storage medium and product

    CN120091055A