Method, system, device, equipment and storage medium for connecting storage controller

By adding automatic scanning and timed scanning service configuration files to the server file system, the problem of link interruption in the storage system is solved, and the stable connection between the server and the ROCE cluster is realized, ensuring the normal transmission of service data.

CN115766824BActive Publication Date: 2024-11-05INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211337916.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2024-11-05
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

When the storage system is restarted, the storage controller is restarted or the switch is restarted, the link between the server and the ROCE cluster is easily interrupted, resulting in unstable service data transmission.

Method used

Add automatic scanning service configuration files and timed scanning service configuration files to the server's file system, scan the storage controllers in the ROCE cluster regularly, and automatically establish a connection when disconnected to ensure link stability.

Benefits of technology

Through automatic scanning and timed scanning services, the server can timely discover and connect to the storage controller, quickly restore link connections, improve link stability between the server and the ROCE cluster, and ensure normal transmission of service data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766824B_ABST
    Figure CN115766824B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, system, apparatus, device and storage medium for connecting a storage controller. By pre-adding an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server, the server has the ability to scan the storage controller regularly and automatically, so that when the server is disconnected from the first storage controller in the ROCE cluster, it can promptly find the second storage controller in the ROCE cluster and automatically establish a connection with it, so as to quickly restore the link connection between the server and the ROCE cluster, thereby effectively improving the link stability between the server and the ROCE cluster and ensuring the normal transmission of business data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, system, device, equipment and storage medium for connecting a storage controller. Background Art

[0002] After creating a ROCE (RDMA Over Converged Ethernet) cluster connection in the storage system, the server corresponding to the storage system scans the storage controllers in the ROCE cluster and establishes a connection with the scanned storage controllers based on the ROCE protocol, thereby using the link connection between the server and the ROCE cluster to achieve service data transmission.

[0003] However, when the storage system encounters abnormal situations such as server restart, storage controller restart, switch restart between the server and ROCE cluster, or business changes, the connection between the server and the storage controller will also be interrupted, resulting in low link stability between the server and the ROCE cluster, making it difficult to ensure normal transmission of business data. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, system, device, equipment and storage medium for connecting a storage controller, which can improve the connection stability between a server and a storage controller.

[0005] To solve the above technical problems, in a first aspect, an embodiment of the present application provides a method for connecting a storage controller, which is applied to a server, comprising:

[0006] When the server is disconnected from the first storage controller in the ROCE cluster, an automatic scanning service configuration file and a timed scanning service configuration file pre-added in the file system of the server are obtained, and the server communicates with the ROCE cluster based on the ROCE protocol;

[0007] Scan each storage controller in the ROCE cluster regularly according to the scanning interval configured in the scheduled scanning service configuration file;

[0008] When a second storage controller in the ROCE cluster is scanned, a connection is established with the second storage controller.

[0009] Optionally, the server is configured with a network card supporting the ROCE protocol, and each storage controller in the ROCE cluster is respectively configured with a network card supporting the ROCE protocol; the method further includes:

[0010] Configuring an IP address for the network card of the server;

[0011] Add an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server, and set the automatic scanning service configuration file and the scheduled scanning service configuration file to start automatically when the computer is turned on;

[0012] Adding an automatic connection configuration file in the file system of the server, wherein the automatic connection configuration file includes the IP address of the network card of each storage controller in the ROCE cluster;

[0013] Test whether the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster;

[0014] When the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster, executing a power-on command;

[0015] Scan each storage controller in the ROCE cluster according to the automatic scanning service configuration file;

[0016] When a first storage controller in the ROCE cluster is scanned, a connection is established with the first storage controller.

[0017] Optionally, there are multiple ROCE clusters; the IP address of the network card of the server is connected to the IP address of the network card of each storage controller in the multiple ROCE clusters; the method further includes:

[0018] When any storage controller in the ROCE cluster is not scanned, periodically scan each storage controller in another ROCE cluster according to the scanning interval configured in the scheduled scanning service configuration file;

[0019] When a storage controller in the other ROCE cluster is scanned, a connection is established with the scanned storage controller.

[0020] Optionally, the method further comprises:

[0021] In the case where the server is connected to the first storage controller in the ROCE cluster, detecting whether a disconnection detection condition occurs, wherein the disconnection detection condition includes at least one of the following: the server is restarted, a switch supporting the ROCE protocol connected between the server and the ROCE cluster is restarted, any storage controller in the ROCE cluster is restarted, and the server receives a service processing request;

[0022] When a disconnection detection condition occurs, it is detected whether the connection with the first storage controller in the ROCE cluster is disconnected.

[0023] Optionally, the method further comprises:

[0024] When any storage controller in the ROCE cluster is not scanned, issuing an alarm; and / or

[0025] When a connection with a scanned storage controller fails, an alarm is issued.

[0026] In a second aspect, an embodiment of the present application further provides a system for connecting a storage controller, including:

[0027] The server is equipped with a network card that supports the ROCE protocol;

[0028] A plurality of storage controllers, each of which is configured with a network card supporting the ROCE protocol, and the plurality of storage controllers are interconnected through the ROCE protocol to form a ROCE cluster;

[0029] A switch supporting ROCE, connected between the ROCE cluster and the server;

[0030] The server is used to execute the method for connecting to the storage controller described in the first aspect.

[0031] Optionally, the multiple storage controllers constitute multiple ROCE clusters, and the IP address of the network card of the server is connected to the IP address of the network card of each storage controller in the multiple ROCE clusters.

[0032] In a third aspect, an embodiment of the present application further provides a device for connecting a storage controller, which is applied to a server, and the device includes:

[0033] A first acquisition module, configured to acquire, when the server is disconnected from the first storage controller in the ROCE cluster, an automatic scanning service configuration file and a scheduled scanning service configuration file pre-added in the file system of the server, wherein the server communicates with the ROCE cluster based on the ROCE protocol;

[0034] A first scanning module, configured to periodically scan each storage controller in the ROCE cluster according to a scanning interval configured in the periodic scanning service configuration file;

[0035] The first processing module is configured to establish a connection with the second storage controller when scanning the second storage controller in the ROCE cluster.

[0036] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of connecting a storage controller as described in the first aspect.

[0037] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the method for connecting a storage controller as described in the first aspect.

[0038] It can be seen from the above technical solution that by adding an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server in advance, the server has the ability to scan the storage controller regularly and automatically, so that when the server is disconnected from the first storage controller in the ROCE cluster, it can find the second storage controller in the ROCE cluster in time and automatically establish a connection with it, so as to quickly restore the link connection between the server and the ROCE cluster, thereby effectively improving the link stability between the server and the ROCE cluster and ensuring the normal transmission of business data. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0040] Figure 1 A flowchart of a method for connecting a storage controller provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of the structure of a system connected to a storage controller provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of the structure of a device connected to a storage controller provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0046] After creating a ROCE cluster connection in the storage system, the server in the storage system will scan the storage controller in the ROCE cluster and establish a connection with the scanned storage controller based on the ROCE protocol, thereby using the link connection between the server and the ROCE cluster to achieve the transmission of business data. It can be understood that ROCE is an Ethernet-based RDMA technology that enables high-speed, ultra-low latency, and extremely low CPU usage RDMA (Remote Direct Memory Access) technology to be applied in the storage system. Among them, RDMA (Remote Direct Memory Access) technology is a technology created to solve the delay of server-side data processing in network transmission. RDMA technology can directly access memory data through the network interface without using the CPU or the intervention of the operating system kernel. It can directly access the memory of another host or server from the memory of one host or server, thereby freeing up the CPU to perform its work, such as running applications and processing large amounts of data, and increasing bandwidth, reducing latency, jitter and CPU consumption, thereby providing a high-throughput, low-latency network communication-based memory access technology for large-scale parallel computer clusters.

[0047] However, the server in the traditional storage system mainly scans and connects to the storage controller in the ROCE cluster according to the dynamic command Discover. After the current transmission service is completed, the connection between the server and the storage controller will be disconnected, thereby interrupting the link connection between the server and the ROCE cluster. In addition, when the server is restarted, the storage controller is restarted, or the switch between the server and the ROCE cluster is restarted, the connection between the server and the storage controller associated with the server and the switch will also be disconnected, thereby interrupting the link connection between the server and the ROCE cluster. As a result, the link stability between the server and the ROCE cluster in the traditional storage system is low, and it is difficult to ensure the normal transmission of business data.

[0048] In response to the problems existing in the above-mentioned related technologies, the present application proposes to add an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server, so that the server has the ability to automatically connect after being disconnected from the storage controller in the ROCE cluster, thereby improving the link stability between the server and the ROCE cluster and ensuring the normal transmission of business data.

[0049] The method for connecting a storage controller provided in the embodiment of the present application is described in detail below through some embodiments and application scenarios in conjunction with the accompanying drawings.

[0050] First, see Figure 1 As shown, it is a flowchart of an implementation of a method for connecting a storage controller provided by an embodiment of the present application, which is applied to a server. The method may include the following steps:

[0051] Step S101: when the server is disconnected from the first storage controller in the ROCE cluster, an automatic scanning service configuration file and a scheduled scanning service configuration file pre-added in the file system of the server are obtained, and the server communicates with the ROCE cluster based on the ROCE protocol.

[0052] In the specific implementation, a storage device (such as a hard disk) is hung under the storage controller, and the storage controllers in the server and the ROCE cluster are both configured with a network card that supports the ROCE protocol, so that the server and the storage controller in the ROCE cluster can be connected based on the ROCE protocol. When the server is disconnected from the first storage controller in the ROCE cluster, the link connection between the server and the ROCE cluster is interrupted. In order to restore the service transmission between the server and the ROCE cluster, the server will automatically create an automatic scanning service and a scheduled scanning service configuration in the server system according to the automatic scanning service configuration file and the scheduled scanning service configuration file preset in its own file system.

[0053] Wherein, when the server is connected to the first storage controller in the ROCE cluster based on the ROCE protocol, it detects whether a disconnection detection condition occurs, and the disconnection detection condition includes at least one of the following: the server is restarted, the switch supporting the ROCE protocol connected between the server and the ROCE cluster is restarted, any storage controller in the ROCE cluster is restarted, and the server receives a business processing request; when the disconnection detection condition occurs, it detects whether the connection with the first storage controller in the ROCE cluster occurs. It can be understood that by setting the disconnection detection condition, the frequency of the server's detection of whether the storage controller is disconnected can be effectively reduced, thereby reducing the burden on the server, and enabling the server to quickly discover the disconnection with the first storage controller in the ROCE cluster when the server is restarted, the switch supporting the ROCE protocol connected between the server and the ROCE cluster is restarted, any storage controller in the ROCE cluster is restarted, the server receives a business processing request, etc., which are very likely to cause the server and the storage controller to be disconnected before. The automatic scanning service corresponding to the automatic scanning service configuration file is started in time, so that the server scans each storage controller in the ROCE cluster once through the automatic scanning service, and when the second storage controller is not scanned, the scheduled scanning service corresponding to the scheduled scanning service configuration is started for timing, thereby triggering the automatic scanning service once every scanning interval, so that the server can regularly scan each storage controller in the ROCE cluster until the server and the storage controller in the ROCE are restored.

[0054] As a possible implementation, when adding an automatic scanning service configuration file and a scheduled scanning service configuration file to a server, the IP address of the network card of the server can be configured first, and then the automatic scanning service configuration file and the scheduled scanning service configuration file can be added to the file system of the server, and the automatic scanning service configuration file and the scheduled scanning service configuration file can be set to start automatically when the computer is turned on. It can be understood that the automatic scanning service configuration file and the scheduled scanning service configuration file can be executable files for creating automatic scanning services and scheduled scanning services. By setting the automatic scanning service configuration file and the scheduled scanning service configuration file to start automatically when the computer is turned on, the server with the configured IP address will automatically create the automatic scanning service and the scheduled scanning service when it is turned on for the first time, so as to establish a connection with the first storage controller in a timely manner.

[0055] After adding an automatic scanning service configuration file and a scheduled scanning service configuration file to the server, an automatic connection configuration file is added to the file system of the server, wherein the automatic connection configuration file includes the IP addresses of the network cards of the various storage controllers in the ROCE cluster; whether the IP address of the network card of the server is connected to the IP addresses of the network cards of the various storage controllers in the ROCE cluster is tested, so as to ensure the normal implementation of the subsequent automatic connection function; when the IP address of the network card of the server is connected to the IP addresses of the network cards of the various storage controllers in the ROCE cluster, a power-on command is executed; according to the automatic scanning service configuration file, each storage controller in the ROCE cluster is scanned; when the first storage controller in the ROCE cluster is scanned, a connection is established with the first storage controller.

[0056] As a possible implementation, when configuring the automatic scanning service nvme_fabrice_service and the timed scanning service nvme_fabrice_timer for the server, the following configuration file content may be added to the server's system directory / etc / system / system:

[0057] [unit]

[0058] Description=nvme_fabrice_service

[0059] Requires = network.target

[0060] After=nvme_fabrice_service network.target

[0061] [service]

[0062] Type=oneshot

[0063] Execstart= / usr / sbin / nvme connect-all

[0064] Standardoutout=journal

[0065] [install]

[0066] Wantby=multi-user.target timer.tartget

[0067] At the same time, add an automatic connection configuration file / etc / nvme / discovery.conf to the server, fill in the node IP of the storage MCS end in the automatic connection configuration file, and set the network IP of the server and the IP of the storage controller to be able to access each other (that is, they are in the same network).

[0068] Step S102: Scan each storage controller in the ROCE cluster regularly according to the scanning interval configured in the scheduled scanning service configuration file.

[0069] The scanning interval can be reasonably set according to factors such as the size of the ROCE cluster, the time taken for an automatic scan, and the processing performance of the server. The scanning interval can usually be set to 60 seconds.

[0070] Exemplarily, when the server is disconnected from the first storage controller, the automatic scanning service corresponding to the automatic scanning service configuration file is started, and the server scans each storage controller in the ROCE cluster once through the automatic scanning service. When the second storage controller is not scanned, the scheduled scanning service corresponding to the scheduled scanning service configuration is started and starts timing, so as to trigger the automatic scanning service once every scanning interval, so that the server can regularly scan each storage controller in the ROCE cluster until the server establishes a connection with the second storage controller.

[0071] In specific implementation, two triggering modes can be set for the automatic scanning service and the scheduled scanning service of the same server at the same time, namely, triggering when the server is powered on and triggering when the first storage controller is disconnected, so that after the server is powered on, it will create and start the automatic scanning service and the scheduled scanning service according to the automatic scanning service configuration file and the scheduled scanning service configuration file added in the file system. The server uses the automatic scanning service to scan the storage controllers in the ROCE cluster once, and establishes an automatic connection to the scanned storage controllers. At the same time, the scheduled scanning service starts timing, and triggers the automatic scanning service once every scanning interval configured by the scanning service configuration file, thereby realizing the automatic scheduled scanning function of the server when it is powered on. The automatic scheduled scanning function when it is powered on is mainly used to establish a connection with the first storage controller and the storage controllers newly added in the ROCE cluster. When the first storage controller in the ROCE cluster is disconnected, the scheduled scanning service and the automatic scanning service will be triggered immediately. At this time, the server scans the storage controllers in the ROCE cluster through the scheduled scanning service, and the scheduled scanning service restarts timing to realize the automatic scheduled scanning function of the server when it is disconnected. The automatic scheduled scanning function of the server when it is disconnected is mainly used to establish a connection with the second storage controller.

[0072] As a possible implementation, the number of the ROCE clusters is multiple; the IP address of the network card of the server is connected to the IP address of the network card of each storage controller in the multiple ROCE clusters; when the server does not scan any storage controller in the ROCE cluster, it periodically scans each storage controller in another ROCE cluster according to the scanning interval configured by the scheduled scanning service configuration file; when scanning a storage controller in the other ROCE cluster, it establishes a connection with the scanned storage controller. It can be understood that, unlike the independent ROCE clusters in the traditional storage system (for example, a server only establishes a business connection with one ROCE cluster, and the business data transmission work between the ROCE clusters is not interoperable), the multiple ROCE clusters set in this application can be mutually redundant (it can be regarded as multiple ROCE clusters together forming a ROCE interconnected cluster, and the business transmission work of the server is based on the link connection between the ROCE interconnected cluster). Exemplarily, the server establishes a connection with the storage controller A1 in the ROCE cluster A based on the ROCE protocol to perform related business data transmission work. When ROCE cluster A fails, the connection between the server and storage controller A1 is also disconnected. At this time, the server triggers the automatic scanning service to scan the various storage controllers in the ROCE cluster A. However, due to the failure of ROCE cluster A, the server fails to establish a connection with any server in the ROCE cluster A. At this time, the scheduled scanning service is started and starts timing, so that the server scans ROCE cluster B after the scanning interval time has passed. After establishing a connection with the storage in ROCE cluster B (that is, other ROCE clusters that have business connections with the server), the scheduled scanning service is closed, and the business data transmission work is continued using ROCE cluster B.

[0073] In specific implementation, in order to establish a ROCE interconnected cluster including multiple ROCE clusters, the following configurations may be performed on the server and each storage controller in the multiple ROCE clusters:

[0074] 1. Install the RDMA Ethernet card driver and set the ofed driver to load automatically by creating the nvme_rdma.conf configuration file in / etc / modules-load,d / to support the operation of the RDMA Ethernet card driver.

[0075] 2. Configure nvme multipath and install nvme-cli to manage NVMe drives (non-volatile memory high-speed drives).

[0076] 3. Build a ROCE interconnected cluster in the storage system. Use the ROCE protocol to connect multiple storage nodes (can be set to four nodes) to each other, that is, connect four storage controllers into a ROCE interconnected cluster (the four storage controllers can form a ROCE cluster in groups of two) to jointly manage the storage system.

[0077] 4. Create a storage pool in the ROCE interconnected cluster, add raid, and then create the volume vdisk that needs to be mapped to the ROCE host (i.e. server). Taking the creation of three volumes as an example, all the three volumes need to be mapped to the ROCE host, recorded as vdisk0, vdisk1, and vdisk2.

[0078] 5. Create a ROCE host and add the corresponding nqn number to the ROCE host to bind the storage system and the ROCE host;

[0079] 6. On the ROCE host side, establish a ROCE connection with the ROCE interconnection cluster through the node ip of the storage controller.

[0080] Step S103: when a second storage controller in the ROCE cluster is scanned, a connection is established with the second storage controller.

[0081] The second storage controller may be the same storage controller as the first storage controller, and the second controller may also be a controller redundant with the first storage controller, so that the second controller can normally complete the business that the first storage controller is responsible for.

[0082] As a possible implementation, the server issues an alarm when any storage controller in the ROCE cluster is not scanned; and / or issues an alarm when a connection with the scanned storage controller fails. In a specific implementation, after the server automatically scans and connects the disk mapped by the storage end (i.e., establishes a connection with the storage controller), it can send a message to the storage end (such as the display device processor of the storage system) through SNMP (Simple Network Management Protocol), where SNMP is a network protocol for managing and monitoring network-connected devices in Internet Protocol networks. The SNMP protocol can be embedded in multiple local devices, such as routers, switches, servers, firewalls, and wireless access points that can be accessed using their IP addresses. It provides a general mechanism for relaying management information for network devices in single and multi-vendor LAN (Local Area Network) or WAN (Wide Area Network) environments. The storage end displays an automatic connection prompt on the storage alarm page, which is used to instruct the server to establish a connection with the storage controller; and when the server finds that it is disconnected from the storage controller, it sends a message to the storage end through SNMP, and the storage end displays a disconnection prompt on the storage alarm page, which is used to instruct the server to disconnect from the storage controller. In addition, the disconnection prompt can also be sent to the user's mailbox through SNMP, and the disconnection prompt of the corresponding alarm level can be output according to the number of disconnected storage controllers, disconnection time, etc.

[0083] It can be understood that the present application proposes a method for automatically scanning and connecting storage controllers based on the ROCE protocol. This method automatically reconnects the storage controller connection that is often interrupted due to abnormal reasons such as server restart, storage controller restart, switch restart between the server and the ROCE cluster, or business changes, and can inform the user of the disconnection between the server and the storage device through email alerts and other methods so that the user can take corresponding measures.

[0084] It can be seen from the above technical solution that by adding an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server in advance, the server has the ability to scan the storage controller regularly and automatically, so that when the server is disconnected from the first storage controller in the ROCE cluster, it can find the second storage controller in the ROCE cluster in time and automatically establish a connection with it, so as to quickly restore the link connection between the server and the ROCE cluster, thereby effectively improving the link stability between the server and the ROCE cluster and ensuring the normal transmission of business data.

[0085] Second, as Figure 2 As shown, an embodiment of the present application provides a system for connecting a storage controller, the system comprising:

[0086] The server is equipped with a network card that supports the ROCE protocol;

[0087] A plurality of storage controllers, each of which is configured with a network card supporting the ROCE protocol, and the plurality of storage controllers are interconnected through the ROCE protocol to form a ROCE cluster;

[0088] A switch supporting ROCE, connected between the ROCE cluster and the server;

[0089] The server is used to execute the method for connecting to the storage controller described in the first aspect.

[0090] In the specific implementation, the server and the storage controller in the ROCE cluster are both configured with a network card that supports the ROCE protocol, so that the server and the storage controller in the ROCE cluster can be connected through a switch based on the ROCE protocol. When the server is disconnected from the first storage controller in the ROCE cluster, the link connection between the server and the ROCE cluster is interrupted. In order to restore the service transmission between the server and the ROCE cluster, the server will automatically create an automatic scanning service and a scheduled scanning service configuration in the server system according to the automatic scanning service configuration file and the scheduled scanning service configuration file preset in its own file system.

[0091] Then, the automatic scanning service corresponding to the automatic scanning service configuration file is started, and the server scans each storage controller in the ROCE cluster once through the automatic scanning service. When the second storage controller is not scanned, the scheduled scanning service corresponding to the scheduled scanning service configuration is started and starts timing, so as to trigger the automatic scanning service once every scanning interval, so that the server can regularly scan each storage controller in the ROCE cluster until the server establishes a connection with the second storage controller.

[0092] Optionally, the multiple storage controllers constitute multiple ROCE clusters, and the IP address of the network card of the server is connected to the IP address of the network card of each storage controller in the multiple ROCE clusters.

[0093] In the specific implementation, by establishing multiple ROCE clusters and performing mutual redundancy, even if multiple ROCE clusters together form a ROCE interconnected cluster, the service transmission work of the server is realized based on the link connection process between the ROCE interconnected cluster. Taking the ROCE interconnected cluster including ROCE clusters A and B as an example, the server establishes a connection with the storage controller A1 in the ROCE cluster A based on the ROCE protocol and the IP address of the network card of the storage controller A to perform related service data transmission work. When the ROCE cluster A fails, the connection between the server and the storage controller A1 is also disconnected. At this time, the server triggers the automatic scanning service, such as scanning the IP addresses of the network cards of each storage controller in the ROCE cluster A in the automatic connection configuration file and trying to connect. However, due to the failure of the ROCE cluster A, the server fails to establish a connection with any server in the ROCE cluster A. At this time, the scheduled scanning service is started and the timing starts, so that the server scans the ROCE cluster B after the scanning interval time, and after establishing a connection with the storage in the ROCE cluster B (that is, other ROCE clusters with which the server has a business connection), the scheduled scanning service is closed, and the service data transmission work is continued using the ROCE cluster B.

[0094] It can be seen from the above technical solution that by adding an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server in advance, the server has the ability to scan the storage controller regularly and automatically, so that when the server is disconnected from the first storage controller in the ROCE cluster, it can find the second storage controller in the ROCE cluster in time and automatically establish a connection with it, so as to quickly restore the link connection between the server and the ROCE cluster, thereby effectively improving the link stability between the server and the ROCE cluster and ensuring the normal transmission of business data.

[0095] The server provided in the embodiment of the present application can implement each process implemented by the embodiment of the method for connecting to the storage controller described in the first aspect, and will not be described again here to avoid repetition.

[0096] In a third aspect, an embodiment of the present application provides a device connected to a storage controller, such as Figure 3 As shown, the device comprises:

[0097] A first acquisition module 21 is used to acquire an automatic scanning service configuration file and a scheduled scanning service configuration file pre-added in the file system of the server when the server is disconnected from the first storage controller in the ROCE cluster, and the server and the ROCE cluster communicate based on the ROCE protocol;

[0098] A first scanning module 22, configured to periodically scan each storage controller in the ROCE cluster according to a scanning interval configured in the periodic scanning service configuration file;

[0099] The first processing module 23 is configured to establish a connection with the second storage controller when scanning the second storage controller in the ROCE cluster.

[0100] Optionally, the server is configured with a network card supporting the ROCE protocol, and each storage controller in the ROCE cluster is respectively configured with a network card supporting the ROCE protocol;

[0101] The device also includes:

[0102] A first configuration module, used to configure an IP address for the network card of the server;

[0103] A second configuration module is used to add an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server, and set the automatic scanning service configuration file and the scheduled scanning service configuration file to start automatically when the computer is turned on;

[0104] A third configuration module is used to add an automatic connection configuration file in the file system of the server, wherein the automatic connection configuration file includes the IP address of the network card of each storage controller in the ROCE cluster;

[0105] A testing module, used to test whether the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster;

[0106] A first control module, configured to execute a power-on command when the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster;

[0107] A second scanning module, configured to scan each storage controller in the ROCE cluster according to the automatic scanning service configuration file;

[0108] The second processing module is configured to establish a connection with the first storage controller when scanning the first storage controller in the ROCE cluster.

[0109] Optionally, there are multiple ROCE clusters; the IP address of the network card of the server is connected to the IP address of the network card of each storage controller in the multiple ROCE clusters;

[0110] The device also includes:

[0111] A third scanning module is used to periodically scan each storage controller in another ROCE cluster according to the scanning interval configured in the scheduled scanning service configuration file when any storage controller in the ROCE cluster is not scanned;

[0112] The third processing module is configured to establish a connection with a scanned storage controller when a storage controller in the another ROCE cluster is scanned.

[0113] Optionally, the device further comprises:

[0114] A first detection module is used to detect whether a disconnection detection condition occurs based on the connection between the server and the first storage controller in the ROCE cluster, wherein the disconnection detection condition includes at least one of the following: the server is restarted, a switch supporting the ROCE protocol connected between the server and the ROCE cluster is restarted, any storage controller in the ROCE cluster is restarted, and the server receives a service processing request;

[0115] The second detection module is used to detect whether the connection with the first storage controller in the ROCE cluster is disconnected when a disconnection detection condition occurs.

[0116] Optionally, the device further comprises:

[0117] The alarm module is used to issue an alarm when any storage controller in the ROCE cluster is not scanned; and / or issue an alarm when a connection with the scanned storage controller fails.

[0118] It can be seen from the above technical solution that by adding an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server in advance, the server has the ability to scan the storage controller regularly and automatically, so that when the server is disconnected from the first storage controller in the ROCE cluster, it can find the second storage controller in the ROCE cluster in time and automatically establish a connection with it, so as to quickly restore the link connection between the server and the ROCE cluster, thereby effectively improving the link stability between the server and the ROCE cluster and ensuring the normal transmission of business data.

[0119] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.

[0120] The present application also provides an electronic device, referring to Figure 4 , Figure 4 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 4As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be run on the processor 120 to implement the steps in the method of connecting a storage controller disclosed in an embodiment of the present application.

[0121] The embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the method for connecting a storage controller as disclosed in the embodiment of the present application is implemented.

[0122] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the method of connecting a storage controller as disclosed in the embodiment of the present application.

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

[0124] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0125] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, systems, devices, storage media, and program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0128] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0129] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0130] The above is a detailed introduction to a method, system, device, equipment and storage medium for connecting a storage controller provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for connecting a storage controller, characterized in that: Applied to a server, the method comprises: When the server is disconnected from the first storage controller in the ROCE cluster, an automatic scanning service configuration file and a timed scanning service configuration file pre-added in the file system of the server are obtained, and the server communicates with the ROCE cluster based on the ROCE protocol; Scan each storage controller in the ROCE cluster regularly according to the scanning interval configured in the scheduled scanning service configuration file; When a second storage controller in the ROCE cluster is scanned, establishing a connection with the second storage controller; The server is configured with a network card supporting the ROCE protocol, and each storage controller in the ROCE cluster is respectively configured with a network card supporting the ROCE protocol; the method further comprises: Configuring an IP address for the network card of the server; Add an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server, and set the automatic scanning service configuration file and the scheduled scanning service configuration file to start automatically when the computer is turned on; Adding an automatic connection configuration file in the file system of the server, wherein the automatic connection configuration file includes the IP address of the network card of each storage controller in the ROCE cluster; Test whether the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster; When the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster, executing a power-on command; Scan each storage controller in the ROCE cluster according to the automatic scanning service configuration file; When a first storage controller in the ROCE cluster is scanned, a connection is established with the first storage controller.

2. The method according to claim 1, characterized in that The number of the ROCE clusters is multiple; the IP address of the network card of the server is connected to the IP address of the network card of each storage controller in the multiple ROCE clusters; the method further includes: When any storage controller in the ROCE cluster is not scanned, periodically scan each storage controller in another ROCE cluster according to the scanning interval configured in the scheduled scanning service configuration file; When a storage controller in the other ROCE cluster is scanned, a connection is established with the scanned storage controller.

3. The method according to claim 1, characterized in that The method further comprises: In the case where the server is connected to the first storage controller in the ROCE cluster, detecting whether a disconnection detection condition occurs, wherein the disconnection detection condition includes at least one of the following: the server is restarted, a switch supporting the ROCE protocol connected between the server and the ROCE cluster is restarted, any storage controller in the ROCE cluster is restarted, and the server receives a service processing request; When a disconnection detection condition occurs, it is detected whether the connection with the first storage controller in the ROCE cluster is disconnected.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: When any storage controller in the ROCE cluster is not scanned, issuing an alarm; and / or When a connection with a scanned storage controller fails, an alarm is issued.

5. A system connected to a storage controller, characterized in that: include: The server is equipped with a network card that supports the ROCE protocol; A plurality of storage controllers, each of which is configured with a network card supporting the ROCE protocol, and the plurality of storage controllers are interconnected through the ROCE protocol to form a ROCE cluster; A switch supporting ROCE, connected between the ROCE cluster and the server; The server is used to execute the method for connecting to a storage controller as described in any one of claims 1-4.

6. The system for connecting a storage controller according to claim 5, characterized in that: The multiple storage controllers constitute multiple ROCE clusters, and the IP address of the network card of the server is connected to the IP address of the network card of each storage controller in the multiple ROCE clusters.

7. A device connected to a storage controller, characterized in that: Applied to a server, the device comprises: A first acquisition module, configured to acquire, when the server is disconnected from the first storage controller in the ROCE cluster, an automatic scanning service configuration file and a scheduled scanning service configuration file pre-added in the file system of the server, wherein the server communicates with the ROCE cluster based on the ROCE protocol; A first scanning module, configured to periodically scan each storage controller in the ROCE cluster according to a scanning interval configured in the periodic scanning service configuration file; A first processing module, configured to establish a connection with a second storage controller in the ROCE cluster when scanning the second storage controller; The server is configured with a network card supporting the ROCE protocol, and each storage controller in the ROCE cluster is respectively configured with a network card supporting the ROCE protocol; The device also includes: A first configuration module, used to configure an IP address for the network card of the server; A second configuration module is used to add an automatic scanning service configuration file and a scheduled scanning service configuration file in the file system of the server, and set the automatic scanning service configuration file and the scheduled scanning service configuration file to start automatically when the computer is turned on; A third configuration module is used to add an automatic connection configuration file in the file system of the server, wherein the automatic connection configuration file includes the IP address of the network card of each storage controller in the ROCE cluster; A testing module, used to test whether the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster; A first control module, configured to execute a power-on command when the IP address of the network card of the server is connected to the IP addresses of the network cards of each storage controller in the ROCE cluster; A second scanning module, configured to scan each storage controller in the ROCE cluster according to the automatic scanning service configuration file; The second processing module is configured to establish a connection with the first storage controller when scanning the first storage controller in the ROCE cluster.

8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method for connecting a storage controller according to any one of claims 1 to 4.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method for connecting a storage controller according to any one of claims 1 to 4 is implemented.