Test method and device of storage server, equipment and storage medium
By configuring link test items for multi-controller storage servers, detecting the negotiated status and data transmission efficiency between controllers, the problem of not being able to detect link status in the prior art is solved, the performance and reliability of the storage server are improved, and user satisfaction is improved.
Patent Information
- Application Number
- CN202510667950.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-22
AI Technical Summary
The prior art cannot effectively detect the link status between multi-controller storage servers, resulting in insufficient performance and reliability and low user satisfaction.
Each controller is configured with multiple test items, including link test items, records test-related information, and conducts link tests when all controllers are ready for link test status to detect the negotiated status and data transmission efficiency between controllers.
It improves the performance stability and reliability of the storage server, improves user satisfaction, reduces the potential risks of link failures, and improves the efficiency of production line maintenance.
Smart Images

Figure CN120528840A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of servers, and more specifically to a testing method, apparatus, device, and storage medium for a storage server. Background Art
[0002] With the advancement of technology, multi-controller storage servers are widely used. For example, in data centers that need to store large amounts of business data, cloud platforms that provide flexible storage services, and computing fields that need to process large amounts of data. As a result, the performance and reliability requirements for storage servers are becoming increasingly stringent.
[0003] However, the testing content of a multi-controller storage server is mostly to identify network failures of each controller, and lacks the detection of the connection status between multiple controllers. Summary of the Invention
[0004] In view of the above problems, the present application provides a storage server testing method, apparatus, device and storage medium that improve user satisfaction.
[0005] According to the first aspect of the present application, a testing method for a storage server is provided, wherein the storage server includes multiple controllers, and each controller is connected to other controllers of the storage server through a link. The testing method includes: configuring multiple test items including link test items for each controller, wherein for each test item, test related information is recorded; determining whether the test related information of each controller regarding the link test items indicates a link test preparation state; when the test related information of each controller regarding the link test items indicates a link test preparation state, testing the links between each pair of controllers according to the link test items.
[0006] The second aspect of the present application provides a testing device for a storage server, wherein the storage server includes multiple controllers, and each controller is connected to other controllers of the storage server through a link. The testing device includes: a configuration module for configuring multiple test items including link test items for each controller, wherein test related information is recorded for each test item; a status determination module for determining whether the test related information of each controller regarding the above link test items indicates a link test preparation state; and a testing module for testing the link between each pair of controllers according to the above link test items when the test related information of each controller regarding the above link test items all indicate a link test preparation state.
[0007] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0008] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0009] According to an embodiment of the present application, by configuring multiple test items including link test items for each controller, and when the test-related information about the link test items of each controller indicates the preparation for the link test state, the link between each pair of controllers is tested according to the link test items, thereby overcoming the defect of the storage server testing technology that lacks the ability to identify the link status between multiple controllers, so that the tested storage server has more stable performance, thereby improving the reliability of the storage server and further improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0011] Figure 1 Schematically illustrates an application scenario diagram of a storage server testing method, apparatus, device, and storage medium according to an embodiment of the present application;
[0012] Figure 2 A flowchart schematically illustrates a method for testing a storage server according to an embodiment of the present application;
[0013] Figure 3 A schematic diagram showing the connection relationship between controllers according to an embodiment of the present application is shown;
[0014] Figure 4 The following schematically shows a flow chart of a storage server testing method according to another embodiment of the present application;
[0015] Figure 5 A structural block diagram schematically shows a storage server test device according to an embodiment of the present application; and
[0016] Figure 6 A block diagram of an electronic device suitable for implementing a storage server testing method according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0017] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0018] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0019] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0020] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0021] Since most storage servers have dual controllers, limited scalability, and a low performance ceiling, as the requirements for storage server performance, load, and reliability become increasingly stringent, quad-controller storage servers have been produced to meet the needs of high performance and high availability. However, the management complexity increases, and higher requirements are placed on the reliability, availability, and serviceability of storage servers, especially in data backup applications.
[0022] The storage server's four-controller interconnection link enables real-time data synchronization between controllers, ensuring consistency of metadata and user data when multiple controllers share a storage pool, avoiding read and write conflicts, and also preventing overload of a single controller, improving overall throughput. If any controller fails, other controllers quickly take over the business through the interconnection link to ensure business continuity.
[0023] However, the current four-controller interconnection test can only be performed by manually disconnecting the controller power to simulate a single-node failure, or can only perform simple identification of the four-controller Internet ports, or can only identify failures in the current node's high-speed network adapter network. It cannot identify failures in interconnection negotiation, and it cannot detect the link performance and stability between controllers. It is also impossible to test aspects of interconnection performance and stability introduced during the manufacturing process. For example, when a four-controller storage server is powered on to check the high-speed network adapter network, the high-speed network adapter network has multiple network ports. As long as these multiple network ports can be identified, the four-controller interconnection link test is considered to have passed.
[0024] To prevent storage servers with faulty four-controller interconnection links from reaching users, a fast and efficient testing method is needed to ensure that the four-controller interconnection links are fault-free.
[0025] For ease of understanding, the terms appearing in this application are uniformly interpreted as follows:
[0026] Quad-controller interconnection: This is an architectural design for high-end storage systems that uses four independent storage controllers to work together and achieve data synchronization, load balancing, and fault switching between controllers through high-speed interconnect technology, thereby improving the performance, reliability, and scalability of the storage system.
[0027] Controller: An independent processing unit that includes a central processing unit (CPU), cache, front-end (host interface) module, and back-end (disk interface) module. It is responsible for processing host input / output (I / O) requests and data reading and writing.
[0028] High-speed network adapter: used to achieve high-bandwidth, low-latency communication between multiple controllers.
[0029] An embodiment of the present application provides a testing method for a storage server, wherein the storage server includes multiple controllers, and each controller is connected to other controllers of the storage server through a link. The testing method includes: configuring multiple test items including link test items for each controller, wherein for each test item, test-related information is recorded; determining whether the test-related information about the link test items of each controller indicates a link test preparation state; when the test-related information about the link test items of each controller indicates a link test preparation state, testing the links between each pair of controllers according to the link test items.
[0030] According to an embodiment of the present application, by configuring multiple test items including link test items for each controller, and when the test-related information about the link test items of each controller indicates the preparation for the link test state, the link between each pair of controllers is tested according to the link test items, thereby overcoming the defect of the storage server testing technology that lacks the ability to identify the link status between multiple controllers, so that the tested storage server has more stable performance, thereby improving the reliability of the storage server and further improving user satisfaction.
[0031] Figure 1 The application scenario diagram of the storage server testing method, apparatus, device and storage medium according to an embodiment of the present application is schematically shown.
[0032] like Figure 1 As shown, an application scenario 100 according to this embodiment may include a storage server 101 and a test management device 102; the storage server 101 includes multiple controllers; the multiple controllers include a first controller 1011, a second controller 1012, a third controller 1013, ..., an Nth controller 1014. The first controller 1011, the second controller 1012, the third controller 1013, ..., the Nth controller 1014, and the test management device 102 are connected via a network. The network may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0033] The user can use the test management device 102 to interact with the first controller 1011, the second controller 1012, the third controller 1013, ..., the Nth controller 1014 to receive or send messages, etc. The first controller 1011, the second controller 1012, the third controller 1013, ..., the Nth controller 1014 can also interact with each other to receive or send messages, etc.
[0034] The test management device 102 may be installed with a test management tool; the test management device 102 may use the test management tool to configure multiple test items regarding the first controller 1011, the second controller 1012, the third controller 1013, ..., the Nth controller 1014, and the link connection statuses between the first controller 1011, the second controller 1012, the third controller 1013, ..., the Nth controller 1014. The test management device 102 may be a server, a network device, or a terminal device.
[0035] It should be noted that the storage server test method provided in the embodiment of the present application can generally be executed by the test management device 102. Accordingly, the storage server test apparatus provided in the embodiment of the present application can generally be set in the test management device 102.
[0036] The following will be based on Figure 1The scene described by Figures 2 to 4 The test method of the storage server of the disclosed embodiment is described in detail.
[0037] Figure 2 The flowchart of the storage server testing method according to an embodiment of the present application is schematically shown.
[0038] like Figure 2 As shown, the storage server testing method 200 of this embodiment includes operations S210 to S230.
[0039] In operation S210 , a plurality of test items including a link test item are configured for each controller, wherein test related information is recorded for each test item.
[0040] According to an embodiment of the present application, a storage server includes multiple controllers, each of which is connected to other controllers of the storage server via links. When testing the storage server, it is necessary to configure multiple test items to be tested for each controller of the storage server; the multiple test items may include link test items for testing the links between the controllers and individual test items for each controller, and the test process for each test item is recorded.
[0041] Multiple test items for each controller may include: (1) uploading test-related data or programs to a specified location, such as uploading a test script to a device; (2) refreshing DMI (Desktop Management Interface) related information to update hardware configuration information; (3) checking the register status of CPLD (Complex Programmable Logic Device); (4) refreshing BIOS (Basic Input / Output System) to update the BIOS version or configuration; (5) checking the status of BIOS to see if it is running normally and whether the configuration is correct; (6) refreshing BMC (Baseboard Management Controller) to update its firmware; (7) refreshing a specific CPLD, such as a CPLD related to the motherboard or middle layer; (8) checking the flash memory status of the CPLD, such as whether the program in the flash memory is complete and can run normally; (9) refreshing the firmware related to the power supply, such as refreshing the PSU (Power Supply Unit); (10) refreshing the VPD (Vital Product (1) Refresh the firmware of the host bus adapter (HBA); (14) Refresh the firmware of the high-speed network adapter; (15) Refresh the firmware of the network interface card (NIC); (16) Refresh the firmware of the hard disk, such as the hard disk drive (HDD). (17) Run the command script to execute a series of test-related commands; (18) Perform a power test to check the power supply, stability and other indicators; (19) Perform pre-configuration operations to set the relevant parameters and environment before the formal test; (20) Perform a health check to detect whether the components of the device are in normal working condition; (21) Create a test script to provide an execution program for subsequent tests; (22) Perform diagnostic operations to check whether the device has faults or potential problems; (23) The pre-test is completed and the entire pre-test process is over.
[0042] For example, multiple test items can be recorded using a test process map, and the test order of multiple test items can be set. Figure 1 The test management device in the storage server can control multiple controllers to perform independent tests according to the multiple test items recorded in the test process map in the test sequence.
[0043] According to an embodiment of the present application, the link test item is configured after each controller completes a firmware refresh and a power-on operation.
[0044] For the link test item of the storage server, a link test item can be added to the test process map and added after the firmware refresh and power-on operation. When the storage server is a four-controller storage server, for the test of the four-controller interconnection of the storage server, a link test item can be added to the test process map. For example, the link test item can be set after executing test item (18) and before executing test item (19). The link test item checks the connectivity of the storage server and tests whether the devices (such as network connection, hardware interface connection, etc.) are connected normally.
[0045] By placing the link test item after a firmware refresh and a power cycle, it is ensured that all server firmware uses the latest version when performing the interconnection test, which improves the validity of the storage server test results and makes the storage server test results more accurate.
[0046] According to an embodiment of the present application, each controller can record the test progress of multiple test items in the database of each controller to form a test log. The database record information can include data entry ID (Identity), order number, SN (Serial Number), current test item, test status, test information, test results, start time, end time, etc. When the test program is executed, the test logs of all controllers must be traversed. The test logs can be recorded in a table format, and the test logs of all controllers can also be transmitted to a test management device and stored in the corresponding table or file of the test management device.
[0047] In operation S220, it is determined whether the test related information on the link test item of each controller indicates a ready link test state.
[0048] According to an embodiment of the present application, since multiple controllers reach this link test item at different times, judgment logic can be added to the test process map to determine whether all controllers have indicated the link test preparation state, that is, to determine whether all controllers have entered the link test item. Since each controller records the test process data of multiple test items in a test log, it is possible to determine whether all controllers have currently entered the link test item based on the recording pattern of each controller's test log.
[0049] For example, regardless of whether the test contents of multiple test items of all controllers are the same or different, when the test order of multiple test items of all controllers is different, determine which test item the link test item of each controller is executed after. At this time, it is only necessary to judge whether the test items of each controller before the link test item are executed. When the test items of all controllers before the link test item are executed, it is considered that all controllers have entered the link test item.
[0050] When the test order of multiple test items of all controllers is the same, and the test items before all controllers execute the link test item are the same, then it is determined whether the same test items before the link test item of all controllers have been executed to completion. When the same test items before the link test item of all controllers have been executed to completion, it is considered that all controllers have entered the link test item.
[0051] According to an embodiment of the present application, to determine whether all controllers currently enter the link test item, a flag bit can be set at the beginning of the link test item, and the flag bit of each controller can be detected. When the flag bit of the controller indicates that the controller enters the link test item, the controller is considered to have entered the link test item. When the identification bits of all controls indicate that the controller enters the link test item, all controllers are considered to have entered the link test item.
[0052] In one embodiment, to determine whether all controllers are currently entering the link test item, a data query language can be applied to filter out the latest record that meets specific conditions from the test log of the controller, for example, the identifier of the test list is a preset test list identifier, and the device serial number is a preset serial number, and the test item is a link test item, and the status index is start, and the data entry ID is greater than the test item in the same test list of the same controller, which is the latest record data entry ID of the test item in the uploaded test script. To determine whether all controllers are currently in the link test item, the command can be: "SELECT * FROM DIAG_MACHINEMODUAL_STATUS WHERE LIST_ID='{0}' AND SN='{1}' ANDTEST_ITEM='PRETEST_CONNECT_CHECK' AND STATUS_INFO='Start' AND ID > (SELECT IDFROM DIAG_MACHINEMODUAL_STATUS WHERE LIST_ID='{0}' AND SN='{1}' AND TEST_ITEM='PRETEST_UPLOAD' ORDER BY ID DESC LIMIT 1) ORDER BY ID DESC LIMIT 1;".
[0053] The meanings of the field names are as follows: LIST_ID='{0}' indicates a list with order number 0, SN='{1}' indicates a device with serial number 1, TEST_ITEM='PRETEST_CONNECT_CHECK' indicates that the current test item is a link test item, STATUS_INFO='Start' indicates that the test status is Start, ID > (...) indicates that the data item ID is greater than the data item ID returned in the subquery, TEST_ITEM='PRETEST_UPLOAD' indicates that the current test item is an upload test script, ORDER BYID DESC LIMIT 1 indicates that the latest record that meets the conditions is selected, DIAG_MACHINEMODUAL_STATUS indicates the name of the test log, 'SELECT' indicates filtering, '*' indicates the target content to be filtered out, 'FROM' indicates from..., 'WHERE' indicates the conditions that the target content must meet, 'AND' indicates that both conditions are met, and '>' indicates that they are greater than.
[0054] According to an embodiment of the present disclosure, when each controller tests multiple test items, when the contents of the test items of each controller are different or the contents of multiple test items of each controller are the same but the execution order is different, it is also possible for all controllers to enter the link test items at the same time, thereby reducing interference with the test results and making the test results more accurate.
[0055] In operation S230 , when the test-related information about the link test items of each controller indicates a link test preparation state, the link between each pair of controllers is tested according to the link test items.
[0056] According to an embodiment of the present application, when one controller enters the link test item, it is determined whether other controllers have entered the link test item; if other controllers have not entered the link test item, the controller that has entered the link test item waits for other controllers to enter the link test item, and if other controllers also enter the link test item, the link test is started.
[0057] According to an embodiment of the present application, by configuring multiple test items including link test items for each controller, and when the test-related information about the link test items of each controller indicates the preparation for the link test state, the link between each pair of controllers is tested according to the link test items, thereby overcoming the defect of the storage server testing technology that lacks the ability to identify the link status between multiple controllers, so that the tested storage server has more stable performance, thereby improving the reliability of the storage server and further improving user satisfaction.
[0058] According to an embodiment of the present application, when the test-related information about the link test item of at least one controller indicates that the link test state is not yet ready, it is waited for all controllers to enter the link test ready state.
[0059] According to an embodiment of the present application, by making all controllers enter the link test item at the same time, test interference can be reduced, making the link test results of the links between multiple controllers more accurate.
[0060] According to an embodiment of the present application, the link test items include at least one of a negotiation status test, a data transmission efficiency test, a negotiation status test after the link is disconnected and then reconnected, and a data transmission efficiency test.
[0061] When conducting the link test items, you can only conduct any one of the link test items on the storage server, or you can conduct multiple tests in the link test items on the storage server. When conducting multiple tests in the link test items on the storage server, you can perform them in a preset order. For example, when conducting the negotiation status test and the data transmission efficiency test, the negotiation status test is conducted on each controller at the same time. When the negotiation status test of each controller passes, the data transmission efficiency test is conducted on each controller at the same time. When the negotiation status of a controller fails, the data transmission efficiency test can no longer be conducted on the storage controller, and the negotiation status test result is recorded as failed in the test log of the controller that fails the negotiation status test, so as to facilitate maintenance personnel to perform repairs. When the data transmission efficiency test of a controller fails, the data transmission efficiency test result is recorded as failed in the test log of the controller that fails the data transmission efficiency test, so as to facilitate maintenance personnel to perform repairs.
[0062] According to the embodiments of the present application, by performing link test items on the links between the controllers, it is possible to detect which specific link has failed and what the specific failure of the failed link is, thereby improving the maintenance efficiency of the production line.
[0063] According to an embodiment of the present application, the negotiation status test includes: detecting the negotiation status of each controller based on the identification of the connection port of each controller; the data transmission efficiency test includes: setting the network addresses of multiple controllers based on the identification of the connection port of each controller; performing a data transmission test between the multiple controllers according to the network addresses of the multiple controllers to obtain the data transmission efficiency, and the negotiation status test and data transmission efficiency test after the link is disconnected and then reconnected include: based on the identification of the connection port of each controller, controlling the closing of the connection port of each controller to disconnect the link connection between the controllers, and then controlling the opening of the connection port of each controller to reconnect the link between the controllers; performing a negotiation status test and a data transmission efficiency test on the link between the reconnected controllers.
[0064] According to an embodiment of the present application, the identification of the connection port includes the Ethernet interface number, and the testing method of the storage server also includes: obtaining the Ethernet interface numbers of all network port devices in the system; and determining the Ethernet interface number corresponding to the connection port from the obtained Ethernet interface numbers based on the BDF number of the connection port of each controller.
[0065] According to an embodiment of the present application, the controllers are connected via a high-speed network adapter; the high-speed network adapter can be an Ethernet device; for example, an Ethernet network card, an Ethernet switch, a wireless network card, a Fibre Channel network adapter, etc.
[0066] Taking the Ethernet network card as an example for high-speed network adapter selection, the BDF (Bus-Device-Function) number of the Ethernet network card of each controller is known. By obtaining the names of all physical Ethernet interfaces in the system, for example, the command "ifconfig|grep eth.:|awk '{{print$1}}'|grep -v :1:|sed 's / : / / g'" can be used to get the ETH (Ethernet Interface Number) numbers of all Ethernet network cards. Among them, "ifconfig" means outputting the configuration information of all network interfaces in the system; "grep eth.:" means filtering out lines containing "ethX:" (X is any character), which will match all Ethernet interfaces (such as eth0: and eth1:); "awk '{print$1}' means extracting the first field of each line (that is, the interface name, such as eth0:); "grep -v :1:" means excluding lines containing ":1:", which are usually virtual sub-interfaces (such as eth0:1); "sed 's / : / / g' removes all colons and converts eth0: to eth0. Obtain the BDF numbers of all Ethernet network cards in the system using the command, for example, ethtool -i eth* |grep bus|awk '{{print$NF}}'|sed 's / 0000: / / g'. 'ethtool -i eth*' retrieves driver information for all Ethernet devices (eth0, eth1, and so on), including the BDF numbers; 'grep bus' selects lines containing bus-info; 'awk '{print$NF}' extracts the last field of each line (the BDF number, such as 0000:00:19.0); and 'sed 's / 0000: / / g' removes the prefix 0000:, formatting the BDF number as 00:19.0. Based on the BDF numbers of the Ethernet cards on each controller, determine the Ethernet interface number corresponding to each controller's Ethernet interface from all Ethernet interface numbers.
[0067] According to an embodiment of the present application, by making a one-to-one correspondence between the interface number of the Ethernet device and the bus-device-function number, the interface of the Ethernet device used to connect multiple controllers can be determined, which facilitates determining whether there is a network connection failure when a storage server fails.
[0068] According to an embodiment of the present application, when detecting the negotiation status of each controller based on the identification of the connection port of each controller, a command for managing and monitoring the network adapter is applied to operate the network device by specifying the BDF number of the device. For example, the command for managing and monitoring network adapters is: mlxlink –d DB:00.0, where ‘mlxlink’ is a built-in tool of the network adapter, which is used to query and configure the link status, speed, negotiation parameters, etc. of the network adapter. By specifying the BDF number of the device (such as DB:00.0) through the ‘-d’ parameter, you can operate the network card and get the negotiation status of the device with the specified BDF number. For example, State is Active, Physical state is LinkUp, Speed is 200G, and Width is 4X. State is Active, which means that the network device or link is currently active and is working normally, and data transmission can be carried out; Physical state is LinkUp, which means that the physical link is connected and working normally, and the devices at both ends have successfully established a physical connection and can transmit signals; Speed is 200G, which means that the transmission rate of the link is 200Gbps (Gigabits per Gigabit per second indicates that data is transmitted very quickly on this link, supporting the rapid transmission of large amounts of data. A Width of 4X indicates that the link width is quadrupled. For example, higher bandwidth can be achieved by transmitting data in parallel through multiple channels. "4X" means that four channels or links are used to achieve a 200G transmission rate. If the rate of each channel is evenly distributed, the rate is 50G.
[0069] Figure 3 The figure schematically shows the connection relationship between the controllers according to the embodiment of the present application.
[0070] like Figure 3As shown, the connection relationship 300 between the controllers includes four controllers, namely the first controller 301, the second controller 302, the third controller 303 and the fourth controller 304; the Ethernet card interface numbers of each controller are respectively represented as CX6_0, CX6_1 and CX6_2. When connecting, the Ethernet card interface numbered CX6_0 of the first controller 301 is connected to the Ethernet card interface numbered CX6_0 of the second controller 302, the Ethernet card interface numbered CX6_0 of the third controller 303 and the Ethernet card interface numbered CX6_0 of the fourth controller 304; the Ethernet card interface numbered CX6_1 of the first controller 301 is connected to the Ethernet card interface numbered CX6_1 of the second controller 302, the Ethernet card interface numbered CX6_1 of the third controller 303 The interface is connected to the Ethernet card interface of the fourth controller 304 with the Ethernet card interface numbered CX6_1; the Ethernet card interface of the second controller 302 with the Ethernet card interface numbered CX6_0 is connected to the Ethernet card interface of the third controller 303 with the Ethernet card interface numbered CX6_0; the Ethernet card interface of the second controller 302 with the Ethernet card interface numbered CX6_1 is connected to the Ethernet card interface of the fourth controller 304 with the Ethernet card interface numbered CX6_1; the Ethernet card interface of the third controller 303 with the Ethernet card interface numbered CX6_2 is connected to the Ethernet card interface of the fourth controller 304 with the Ethernet card interface numbered CX6_2.
[0071] According to the connection relationship between the controllers, set the network address for each controller. For example, if the storage controller includes four controllers, set the network address for each controller separately. The CX6_2 of the first controller is set to 192.168.102.101, CX6_1 is set to 192.168.101.101, and CX6_0 is set to 192.168.100.101; the CX6_2 of the second controller is set to 192.168.102.102, CX6_1 is set to 192.168.101.102, and CX6_0 is set to The IP address of the third controller is 192.168.102.103, CX6_1 is set to 192.168.101.103, and CX6_0 is set to 192.168.100.103. The IP address of the fourth controller is 192.168.102.104, CX6_1 is set to 192.168.101.104, and CX6_0 is set to 192.168.100.104.
[0072] According to an embodiment of the present application, the data transmission test includes: controlling each controller to send a first data packet and a second data packet to other connected controllers multiple times, and receiving corresponding response data, wherein the first data packet and the second data packet include data with different data lengths from each other; based on the corresponding response data, calculating the first response time of each controller under the first data packet test and the second response time under the second data packet test to determine the data transmission efficiency.
[0073] According to an embodiment of the present application, when each controller sends a first data packet and a second data packet to another connected controller multiple times, the first data packet and the second data packet are sent alternately. For example, if the first data packet is a small data packet and the second data packet is a large data packet, the small data packets and the large data packets are sent alternately.
[0074] For example, if a storage controller consists of four controllers, after setting the network addresses of the first, second, third, and fourth controllers, the first controller executes the command "ping 192.168.102.102 –c 5 –s100" to test the data link between the first controller CX6_2 and the second controller CX6_2 using small data packets and collect response time data. Then, the command "ping 192.168.102.102 –c 5 –s 65000" is executed to test the data link between the first controller CX6_2 and the second controller CX6_2 using large data packets and collect response time data. This cycle is repeated multiple times. For example, if the number of cycles is three, a total of three small data packet and three large data packet response data are collected. The average and maximum value of the small data packet response data are calculated. If the average value is less than 0.1 milliseconds and the maximum value is less than 0.3 milliseconds, the small data packet test for this link passes. The average and maximum value of the large data packet response data are calculated. If the average value is less than 0.5 milliseconds and the maximum value is less than 1 millisecond, the large data packet test for this link passes. This criterion is derived from multiple statistical analyses of the response time data from the four-controller interconnection test. Repeat the above steps to test the links from the first controller to the third and fourth controllers. Simultaneously, the second, third, and fourth controllers initiate tests on their links to each other.
[0075] Among them, the meanings of the command "ping 192.168.102.102 –c 5 –s 100" field names are as follows: ' ping ' is used to test the reachability and latency of the network connection; ' 192.168.102.102 ' is the target IP address, that is, the IP address of the device connected to it (such as another computer, router, controller, etc.) to be tested; ' -c 5 ' is an option of the ping command, and the following 5 means that the number of ICMP (Internet Control Message Protocol) packets sent is 5, that is, the ping command will send 5 test packets to the target IP address; the ' -s 100 ' option is used to specify the size of the data packet to be sent, and '100' means that the size of each data packet is 100 bytes (excluding overhead such as the IP header and ICMP header). After executing this command, the system sends five 100-byte ICMP echo request packets to 192.168.102.102 and displays information such as the round-trip time (RTT) of each packet to determine whether the network connection is normal, as well as network latency and packet loss.
[0076] In the command "ping 192.168.102.102 –c 5 –s 65000", the same field names as in the command "ping192.168.102.102 –c 5 –s 100" have the same meanings and are not repeated here. The '-s' option in '-s 65000' is used to specify the size of the data packet to be sent. '65000' means that the size of each data packet is 65000 bytes (excluding overhead such as the IP header and ICMP header).
[0077] For example, the data link from the first controller CX6_2 to the second controller CX6_2 is tested with a small data packet, and response time data is collected. The three average values are 0.092 milliseconds, 0.040 milliseconds, and 0.041 milliseconds, all less than 0.1 milliseconds. The three maximum values are 0.261 milliseconds, 0.065 milliseconds, and 0.058 milliseconds, all less than 0.3 milliseconds. Therefore, the test result of the data link from the first controller CX6_2 to the second controller CX6_2 under the small data packet test is passed.
[0078] The data link from the first controller CX6_2 to the second controller CX6_2 was tested with a large data packet, and response time data was collected. The three average values were 0.372 milliseconds, 0.347 milliseconds, and 0.364 milliseconds, all less than 0.5 milliseconds. The three maximum values were 0.401 milliseconds, 0.387 milliseconds, and 0.408 milliseconds, all less than 1 millisecond. Therefore, the test result of the data link from the first controller CX6_2 to the second controller CX6_2 under the large data packet test was passed.
[0079] According to an embodiment of the present application, the data transmission efficiency of the links between controllers is tested. When the data transmission efficiency of the links between controllers does not meet the passing criteria, it can be determined that there is a data transmission efficiency failure in the links between controllers. Furthermore, by alternating between sending the first and second data packets during the data transmission efficiency test, data processing efficiency can be improved and link congestion can be avoided.
[0080] According to an embodiment of the present application, after the storage server completes the data transmission efficiency test, it first performs a link disconnection test to test whether the link status between each controller is disconnected, then reconnects the links between each controller and tests whether the link status between each controller is connected. Then, network addresses are set for all controllers, and a negotiation status test and a data transmission efficiency test are performed on the links between the reconnected controllers. After the negotiation status test and the data transmission efficiency test are completed on the links between the reconnected controllers, the storage controller completes the test.
[0081] According to an embodiment of the present application, taking a storage server including four controllers as an example, after disconnecting the interconnection link between the four controllers, execute the command "ip link set eth* down", where eth* corresponds to CX6_2, which is the eth device number. After disconnecting the link, execute the command "ethtool eth*" to check the link status. If the command output contains "Link detected: no", it means that the link is disconnected. Execute the command "ip link set eth* up" to re-establish the connection, and execute the command "ethtool eth*" to check the link status. If the command output contains "Link detected: yes", it means that the link is reconnected. Perform the same operation on CX6_1 and CX6_0 to re-establish the connection between CX6_1 and CX6_0. All four controllers execute the commands in this step.
[0082] The meanings of the field names in the command "ip link set eth* down" are as follows: 'ip' in the 'ip link set' command is used to configure a network interface, 'link' is used to operate a network device, and 'set' sets the device status. 'eth*' indicates that the wildcard * matches all interface names beginning with 'eth'. 'down' shuts down the interface, equivalent to unplugging the network cable. The interface no longer receives or sends data, and configuration information such as the IP address remains but is temporarily inactive. 'ethtool eth*' displays detailed information about all Ethernet interfaces. 'ethtool' is a tool used to query and modify network card driver and hardware settings. This command can obtain information such as the card's status, speed, link information, and driver version. 'Link detected: no' indicates that the Ethernet interface in question has no valid physical connection to other network devices or the link status is abnormal. 'up' activates the interface, equivalent to plugging in a network cable and enabling the network card to operate. The interface then attempts to establish a physical connection and begins receiving and sending data. 'Linkdetected:yes' means "Link detected: yes", indicating that a valid physical connection has been established between the currently queried Ethernet interface and other network devices.
[0083] According to the embodiments of the present application, by testing the storage server, the number of devices with hidden dangers in the links between multiple controllers that reach customers is reduced, thereby improving customer satisfaction with the product. In addition, it is possible to test which link in the storage server has a link failure and determine what the link failure is, thereby improving the efficiency of production line maintenance. Furthermore, the testing process does not require manual operation, which can reduce labor costs and time costs.
[0084] Figure 4 The flowchart of the storage server testing method according to another embodiment of the present application is schematically shown.
[0085] like Figure 4 As shown, the storage server testing method 400 of this embodiment includes operations S401 to S404.
[0086] In operation S401, it is determined that all test-related information about link test items of each controller indicates a link test preparation state. If all test-related information about link test items of each controller indicates a link test preparation state, operation S402 is executed. If at least one controller's test-related information about link test items indicates a link test preparation state, the process returns to operation S401 and waits for all controllers to enter the link test preparation state.
[0087] In operation S402 , based on the identifier of the connection port of each controller, the negotiation state of each controller is detected.
[0088] In operation S403 , network addresses of the multiple controllers are set based on identifiers of connection ports of the multiple controllers; and a data transmission test is performed between the multiple controllers according to the network addresses of the multiple controllers to obtain data transmission efficiency.
[0089] In operation S404, based on the identification of the connection port of each controller, the connection port of each controller is controlled to be closed to disconnect the link connection between the controllers, and then the connection port of each controller is controlled to be opened to reconnect the link between the controllers; the negotiation status test and data transmission efficiency test are performed on the link between the reconnected controllers.
[0090] According to an embodiment of the present application, the testing method of the storage server is applicable to a method for testing the interconnection links between controllers of a multi-controller storage server in an entire factory; when the number of controllers of the storage server is four, the testing method of the storage server is applicable to a method for testing the interconnection links between four controllers of a four-controller storage server in an entire factory.
[0091] Based on the above storage server testing method, this application also provides a storage server testing device. Figure 5 The test apparatus is described in detail.
[0092] Figure 5 The structural block diagram of the storage server testing device according to an embodiment of the present application is schematically shown.
[0093] like Figure 5 As shown, the storage server testing device 500 of this embodiment includes a configuration module 510 , a state determination module 520 and a testing module 530 .
[0094] The configuration module 510 is used to configure multiple test items including link test items for each controller, wherein for each test item, test related information is recorded. In one embodiment, the configuration module 510 can be used to perform the operation S210 described above, which will not be repeated here.
[0095] The state determination module 520 is used to determine whether the test related information about the link test item of each controller indicates the link test preparation state. In one embodiment, the state determination module 520 can be used to perform the operation S220 described above, which will not be repeated here.
[0096] The testing module 530 is configured to test the link between each controller pair according to the link test item when the test-related information about the link test item of each controller indicates a ready link test state. In one embodiment, the testing module 530 can be configured to perform operation S230 described above, which will not be described in detail here.
[0097] According to an embodiment of the present application, by configuring multiple test items including link test items for each controller, and when the test-related information about the link test items of each controller indicates the preparation for the link test state, the link between each pair of controllers is tested according to the link test items, thereby overcoming the defect of the storage server testing technology that lacks the ability to identify the link status between multiple controllers, so that the tested storage server has more stable performance, thereby improving the reliability of the storage server and further improving user satisfaction.
[0098] According to embodiments of the present application, any multiple modules among the configuration module 510, the status determination module 520, and the test module 530 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the configuration module 510, the status determination module 520, and the test module 530 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of these. Alternatively, at least one of the configuration module 510, the status determination module 520, and the test module 530 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.
[0099] Figure 6 A block diagram of an electronic device suitable for implementing a storage server testing method according to an embodiment of the present application is schematically shown.
[0100] like Figure 6As shown, an electronic device 600 according to an embodiment of the present application includes a processor 601, which can perform various appropriate actions and processes based on a program stored in a read-only memory (ROM) 602 or a program loaded from a storage unit 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present application.
[0101] Various programs and data required for the operation of the electronic device 600 are stored in the RAM 603. The processor 601, ROM 602, and RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in the one or more memories.
[0102] According to an embodiment of the present application, electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to bus 604. Electronic device 600 may also include one or more of the following components connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN card or modem. Communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. Removable media 611, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 610 as needed, so that computer programs read from the removable media can be installed into storage section 608 as needed.
[0103] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0104] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.
[0105] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided in the embodiments of the present application.
[0106] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the computer program is executed by the processor 601. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0107] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0108] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the processor 601, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0109] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0111] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
[0112] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A method for testing a storage server, wherein the storage server includes multiple controllers, each controller being connected to other controllers of the storage server via a link, characterized in that: The test method includes: Configuring multiple test items including link test items for each controller, wherein for each test item, test related information is recorded; determining whether the test related information about the link test item of each controller indicates a ready link test state; and When the test related information about the link test items of each controller indicates a link test preparation state, the link between each pair of controllers is tested according to the link test items.
2. The testing method according to claim 1, wherein: Also includes: When the test related information about the link test item of at least one controller indicates that the link test state is not ready, wait for all controllers to enter the link test state.
3. The testing method according to claim 1, wherein: The link test items include at least one of a negotiation status test, a data transmission efficiency test, a negotiation status test after a link is disconnected and then reconnected, and a data transmission efficiency test.
4. The testing method according to claim 3, wherein: The negotiation status test includes: detecting the negotiation status of each controller based on the identification of the connection port of each controller, The data transmission efficiency test includes: setting the network addresses of the multiple controllers based on the identification of the connection ports of each controller; performing a data transmission test between the multiple controllers according to the network addresses of the multiple controllers to obtain the data transmission efficiency, The negotiation status test and the data transmission efficiency test after the link is disconnected and then reconnected include: based on the identification of the connection port of each controller, controlling the closing of the connection port of each controller to disconnect the link connection between the controllers, and then controlling the opening of the connection port of each controller to reconnect the link between the controllers; performing a negotiation status test and a data transmission efficiency test on the link between the reconnected controllers.
5. The testing method according to claim 4, characterized in that: The data transmission test includes: Controlling each controller to send a first data packet and a second data packet to other connected controllers multiple times, and receiving corresponding response data, wherein the first data packet and the second data packet include data with different data lengths; According to the corresponding response data, a first response time of each controller under the first data packet test and a second response time under the second data packet test are calculated to determine the data transmission efficiency.
6. The testing method according to claim 4, wherein: The identification of the connection port includes the Ethernet interface number, The method further comprises: Get the Ethernet interface numbers of all network port devices in the system; According to the BDF number of the connection port of each controller, the Ethernet interface number corresponding to the connection port is determined from the acquired Ethernet interface numbers.
7. The method according to claim 1, characterized in that The link test items are configured after each controller completes firmware refresh and a power-on operation.
8. A test device for a storage server, wherein the storage server comprises a plurality of controllers, each controller being connected to other controllers of the storage server via a link, characterized in that: The testing device comprises: A configuration module is used to configure multiple test items including link test items for each controller, wherein for each test item, test related information is recorded; a state determination module, configured to determine whether the test related information about the link test item of each controller indicates a ready link test state; and The testing module is configured to test the link between each pair of controllers according to the link test item when the test related information of each controller on the link test item indicates a link test preparation state.
9. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.