Storage system testing system, method, electronic equipment and storage medium
By combining intelligent PDUs and status monitoring programs, the power control of centralized storage systems is automatically managed, solving the problems of multi-service node status monitoring and SSH connection jams, and achieving efficient and reliable storage system testing.
Patent Information
- Application Number
- CN202511055666.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-30
AI Technical Summary
In the prior art, centralized storage systems are not suitable for monitoring the status of multiple service nodes during testing and rely on manual intervention to handle SSH connection freezes, resulting in low testing efficiency.
Intelligent PDU is used for millisecond-level power pulse control. Combined with status monitoring programs and timeout monitoring programs, it automatically manages the power on and off of storage components, accesses storage nodes through new processes, monitors the timeout status of clients, and realizes the identification and recording of abnormal status.
It improves the test efficiency of the storage system, reduces the test time, enhances the test reliability, adapts to centralized storage devices with different configurations, and improves the accuracy and reliability of the overall test.
Smart Images

Figure CN120560919B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automated testing technology, and in particular to a testing system, method, electronic device, and storage medium for a storage system. Background Art
[0002] With the development of information technology, the demand for data storage continues to grow, and centralized storage systems have become a vital component of enterprise data centers. Centralized storage achieves millisecond-level access response times through centralized data management and control (such as SAN (Storage Area Network) / NAS (Network Attached Storage) architectures). However, in real-time-intensive scenarios such as finance and healthcare, storage failures can result in economic losses of tens of thousands of yuan per hour.
[0003] Therefore, during the product development phase, we added complete machine reliability testing, such as complete machine power-off recovery testing. Traditional manual testing methods for this are inefficient. The use of intelligent PDUs (Power Distribution Units) enables millisecond-level power pulse control, significantly improving efficiency. However, because the intelligent PDU and centralized storage are two isolated systems, there is a risk of the SSH client freezing when powering on the complete machine via the SSH service, severely impacting testing efficiency. Summary of the Invention
[0004] The present application provides a storage system testing system, method, electronic device and storage medium to at least solve the problems in the related art such as being unsuitable for monitoring the status of multiple business nodes, relying on manual intervention to handle SSH connection freezes, and low testing efficiency.
[0005] The present application provides a test system for a storage system, which includes a storage component, a switching component and at least one server. The services provided by the storage component are mapped to at least one server through the switching component. The storage component is provided with a client, wherein the test system includes: a power distribution unit for powering on and off the storage component; a test component for testing the storage system, wherein during the test, the power distribution unit is controlled to power on and off the storage component, a status monitoring program and a timeout monitoring program are started at the beginning of the test, the status monitoring program starts a new process of the client, and uses the new process to access the storage node in the storage component, and the timeout monitoring program monitors whether the new process of the client has timed out based on a timeout threshold. If the new process of the client has timed out, the status of the storage node of the storage component is set.
[0006] The present application also provides a method for testing a storage system, wherein the storage system includes a storage component, a switching component and at least one server, wherein the services provided by the storage component are mapped to at least one server through the switching component, and the storage component is provided with a client, wherein the method is applied to the testing component of the testing system of the above-mentioned storage system, and the method includes: obtaining a test instruction of the storage system; executing a test process of the storage system based on the test instruction, and controlling the power distribution unit to power on and off the storage component during the test; starting a status monitoring program and a timeout monitoring program, wherein the status monitoring program starts a new process of the client and uses the new process to access the storage node in the storage component, and the timeout monitoring program monitors whether the new process of the client has timed out based on a timeout threshold, and if the new process of the client has timed out, setting the status of the storage node of the storage component.
[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the above-mentioned storage system testing method when executing the computer program.
[0008] The present application also provides a non-volatile computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned storage system testing method are implemented.
[0009] Through this application, a test component is used to test the storage system. During the test, the power distribution unit is controlled to power on and off the storage component, and a status monitoring program and a timeout monitoring program are started at the beginning of the test. A new process of the storage system client is started through the status monitoring program, and the new process is used to access the storage node in the storage component. The timeout monitoring program monitors whether the new process of the client has timed out based on the timeout threshold to complete a high-efficiency reliability test of the storage system. Therefore, it can solve the technical problems that the relevant technology is not suitable for monitoring the status of multiple business nodes, relies on manual intervention to handle SSH connection jams, and has low testing efficiency, and achieve technical effects such as automated testing, reduced testing time, and enhanced test reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] 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 any creative work.
[0011] Figure 1 A flowchart of a server automation testing method provided for related technologies;
[0012] Figure 2A schematic diagram of the structure of a storage system test system provided in an embodiment of the present application;
[0013] Figure 3 A schematic diagram of a centralized storage system provided in one embodiment of the present application;
[0014] Figure 4 A flowchart of a storage reliability testing method provided in one embodiment of the present application;
[0015] Figure 5 A schematic diagram of a process for obtaining the status of multiple nodes in a centralized storage system by a status monitoring program provided in one embodiment of the present application;
[0016] Figure 6 A schematic diagram of the timeout monitoring program processing logic provided by one embodiment of the present application;
[0017] Figure 7 A flowchart of a storage system testing method provided in an embodiment of the present application;
[0018] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0020] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0021] In related technologies, the test host computer can coordinate the controllable power supply with the server under test, and use Python / Shell (two scripting languages commonly used for automated task development) scripts to implement an automated process: after verifying the device connectivity, perform a power-off-power-on cycle test, collect information on components such as hard disks and network cards, and compare the data before and after power failure. Combined with log analysis to determine the test results, a stability assessment report is finally generated to achieve automated server reliability testing, such as Figure 1 As shown, specifically:
[0022] Step 1: The test host computer verifies the connectivity between the server under test and the controllable power supply. Once both are connected, the test host computer sends a test script to the server under test. After the server under test receives and runs the script, it collects its component information and sends this information back to the test host computer.
[0023] Step 2: Test that the host computer sends a power-off command to the controllable power supply, and then sends a power-on command.
[0024] Step 3: After confirming that the server under test is reconnected, the test host computer sends a command to execute the test script to the server under test again. The server under test collects component information and feeds it back to the test host computer.
[0025] Step 4: The test host computer compares the component information before and after power failure to determine whether the test passes; if passed, the test parameters are adjusted and steps 2 and 3 are repeated until the preset number of tests is reached; if not passed, the test is stopped.
[0026] However, using the above method for centralized storage has major flaws. There are significant differences between servers and centralized storage. Centralized storage has two or more business nodes, while servers have only one business node. After using the intelligent PDU to restore the storage after a power outage, it is necessary to check whether the multiple nodes of the centralized storage have returned to normal. This solution is not suitable for centralized storage and does not consider the judgment of the recovery status of multiple business nodes. At the same time, this solution may have the problem that when the server OS (Operating System) starts the SSHD (Secure Shell Daemon) service, the test host computer sends an SSH connection, which will cause the executed remote command to be unresponsive, and the entire test process will be stuck, which will affect the test efficiency. This problem can be alleviated by increasing the preset time threshold. However, increasing the preset time threshold will introduce the following defects:
[0027] 1. Increase the test time and affect the overall test efficiency;
[0028] Second, different centralized storage devices have different component configurations, resulting in different system startup times. The preset time threshold values are unreasonable, which will cause some business nodes to be unable to execute subsequent test scripts. This solution still relies on manual intervention to handle SSH stuck issues.
[0029] In response to the defects of the above-mentioned related technologies, the present application provides a storage system testing system, method, electronic device and storage medium to solve technical problems such as the related technologies being unsuitable for monitoring the status of multiple business nodes, relying on manual intervention to handle SSH connection freezes, and low testing efficiency. The details will be described in detail below.
[0030] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0031] Figure 2 This is a schematic diagram of the structure of the test system of the storage system provided in this application. Figure 2 As shown, the storage system 10 includes: a storage component 101 , a client 1011 , a switching component 102 and at least one server 103 ; the storage system test system 20 includes: a power distribution unit 201 and a test component 202 .
[0032] Among them, in the storage system 10, the service provided by the storage component 101 is mapped to at least one server 103 through the switching component 102; in the test system 20 of the storage system, the power distribution unit 201 is used to power on and off the storage component 101; the test component 202 is used to test the storage system, and during the test, the power distribution unit 201 is controlled to power on and off the storage component 101. At the beginning of the test, the status monitoring program and the timeout monitoring program are started. The status monitoring program starts a new process of the client 1011 and uses the new process to access the storage node in the storage component 101. The timeout monitoring program monitors whether the new process of the client 1011 has timed out based on the timeout threshold. If the new process of the client 1011 has timed out, the status of the storage node of the storage component 101 is set.
[0033] Among them, the storage component 101 is centralized storage, which can achieve millisecond-level access response through centralized data management and control (such as SAN / NAS architecture); the switching component 102 is a network switch, in which different network methods can be used, such as FC (Fibre Channel) / IP (Internet Protocol) network, etc., to create a pool / volume on the storage component 101 and map the volume to at least one server 103. The volume mapped to the server 103 can be a SCSI (Small Computer System Interface) block device or an NVMe (Non-Volatile Memory Express) block device, depending on the protocol type supported by the storage component 101; the power distribution unit 201 is an intelligent PDU, which is a device used to manage and distribute power and can achieve millisecond-level power pulse control.
[0034] It can be understood that the power distribution unit 201 of the embodiment of the present application is an intelligent PDU, which is used to power on and off the storage component 101 and has millisecond-level power pulse control capability; the test component 202 is responsible for performing functional and stability testing on the entire storage system, controlling the power distribution unit 201 to perform power operations during the test, and starting the status monitoring program and the timeout monitoring program at the beginning of the test. The status monitoring program starts a new process of the client 1011 to access the storage node in the storage component 101, and the timeout monitoring program monitors whether the process has an access timeout based on a preset timeout threshold. If it is detected that the new process of the client 1011 has timed out, the status of the corresponding storage node in the storage component 101 is automatically set to realize abnormal status identification and recording.
[0035] In an embodiment of the present application, the test component 202 sends a test instruction to at least one server 103 , and the at least one server 103 responds to the test instruction and performs a storage stress test on the storage component 101 .
[0036] Among them, storage stress testing is a testing method that detects the performance and stability of the storage component 101 under extreme conditions by simulating high concurrency, large data volume or high-frequency access requests.
[0037] It can be understood that the test component 202 of the embodiment of the present application sends a test instruction to at least one server 103. After receiving the instruction, the server 103 responds and initiates a storage stress test on the storage component 101 according to the content of the instruction, so as to evaluate the performance and reliability of the storage component 101 under a high-load environment.
[0038] According to the test system of the storage system of the embodiment of the present application, the storage system can be tested through the test component. During the test, the power distribution unit is controlled to power on and off the storage component, and the status monitoring program and the timeout monitoring program are started at the beginning of the test. A new process of the storage system client is started through the status monitoring program, and the new process is used to access the storage node in the storage component. The timeout monitoring program monitors whether the new process of the client has timed out based on the timeout threshold, so as to complete the reliability test of the storage system with high efficiency, thereby achieving technical effects such as automated testing, reduced test time, and enhanced test reliability.
[0039] The following further describes the storage system test system through a specific embodiment.
[0040] This embodiment provides a method for testing the reliability of centralized storage based on intelligent PDU control. Before implementing the method of this embodiment, it is necessary to first build a centralized storage system to be tested, such as Figure 3As shown in the figure, different network methods, such as FC / IP / RDMA (Remote Direct Memory Access) networks, can be used to create pools / volumes on centralized storage and map the volumes to servers. The volumes mapped to the hosts can be SCSI block devices or NVMe block devices, depending on the protocol types supported by the centralized storage.
[0041] After the centralized storage system to be tested is built, the method for performing storage reliability testing is as follows: Figure 4 As shown, the specific steps include:
[0042] Step S301: Deploy centralized storage, network, and servers according to the business scenario, and use multiple servers to perform business stress testing.
[0043] Step S302: The volume service or NAS service provided by the centralized storage is mapped to the server, and data is pre-embedded on the server, such as creating a verification file and recording the file's MD5 (Message Digest Algorithm 5, a widely used cryptographic hash function) verification value.
[0044] Step S303: Perform a stress test on the storage service on all server nodes, such as using IO (Input / Output) tools such as fio and vdbench, to keep the centralized storage under high load.
[0045] Step S304: After the stress test runs for a predetermined time, the control program calls the intelligent PDU interface to power off the PDU port corresponding to the centralized storage.
[0046] Step S305: The control program monitors the status of all nodes in the centralized storage.
[0047] Step S306 , judging the status of all nodes. If the monitoring program returns that the status of all nodes is OFF, proceed to step S307 . If the status of any node returns to ON, proceed to step S314 .
[0048] Step S307: Record stress test data on each server for reliability assessment.
[0049] Step S308: The control program calls the intelligent PDU interface to power on the PDU port corresponding to the centralized storage.
[0050] Step S309: The control program monitors the status of all nodes in the centralized storage.
[0051] Step S310 , judging the status of all nodes. If the monitoring program returns that all nodes are powered on (ON), proceed to step S311 . If they are powered off (OFF), proceed to step S314 .
[0052] Step S311: Record stress test data on each server for reliability assessment.
[0053] Step S312: Verify the data written in step S302 to verify data consistency for reliability assessment. If the verification fails, proceed to step S314.
[0054] Step S313: Determine whether the reliability meets the test round. If so, the reliability verification of centralized storage is satisfied and the test ends. If not, return to step S304 and repeat steps S304-S313.
[0055] Step S314: the test is interrupted and exited, that is, the reliability test process is exited.
[0056] The process of the state monitoring program in this embodiment obtaining the state of multiple nodes stored in a centralized manner is as follows: Figure 5 As shown, the specific steps include:
[0057] Step S401: Start the status monitoring program to obtain the status of each node in the centralized storage.
[0058] Step S402: Set a timeout threshold for each status monitoring program. The threshold is used for the timeout monitoring program.
[0059] Step S403: Start the timeout monitoring program.
[0060] Step S404: The monitoring program starts a first sub-process to access the centralized storage node from the network layer.
[0061] Step S405: Determine whether the centralized storage node can be accessed from the network layer. If the centralized storage node cannot be accessed from the network layer, proceed to step S406; if the centralized storage node can be accessed from the network layer, proceed to step S407.
[0062] Step S406: Determine whether the first child process has timed out (this status is returned by the timeout monitoring program). If it has not timed out, proceed to step S413; if it has timed out, return to step S404 and repeat the operation.
[0063] Step S407: Set a new timeout threshold.
[0064] Step S408: Start the second sub-process and access the centralized storage node from the application layer (such as SSH).
[0065] Step S409: Determine whether the second child process times out (this status is returned by the timeout monitoring program). If not, proceed to step S410; if yes, proceed to step S412.
[0066] Step S410: Determine whether SSH can access the centralized storage node normally. If so, proceed to step S411; if not, proceed to step S412.
[0067] Step S411: Return the storage node status to ON.
[0068] Step S412: Determine whether the maximum number of retries has been reached. If so, proceed to step S413; if not, return to step S408 and repeat the operation.
[0069] Step S413: Return the centralized storage node status to OFF.
[0070] The timeout monitoring program processing logic of this embodiment is as follows: Figure 6 As shown, the details are as follows:
[0071] Step S501: Determine whether the timeout monitoring program has been started. If it has been started, exit; if it has not been started, proceed to step S502.
[0072] Step S502: Acquire information of each remote access process, such as acquiring process information of accessing the centralized storage node from the network layer and application layer, information error process ID, process running time, and process name.
[0073] Step S503: Obtain the process timeout from the process information.
[0074] Step S504: Determine whether the running time of each process exceeds the timeout threshold. If it exceeds the threshold, proceed to step S505; if it does not exceed the threshold, return to step S502 and repeat the operation.
[0075] Step S505: forcibly stop the timed-out process and record the timed-out information to provide it to the monitoring program.
[0076] Through this embodiment, the test efficiency can be improved. The millisecond-level power control of the intelligent PDU and the anti-stuck monitoring process processing, while relatively increasing the delay to solve this problem, can shorten the single test cycle by 20%, and enhance the test reliability. Different timeout thresholds can be set according to the centralized storage of different configurations to suit different product types and improve the overall test reliability.
[0077] Figure 7A flowchart of a method for testing a storage system provided in an embodiment of the present application. The storage system includes a storage component, a switching component, and at least one server. The service provided by the storage component is mapped to the at least one server via the switching component. The storage component is provided with a client. The method is applied to the test component of the test system of the above-mentioned storage system, such as Figure 7 As shown, the method includes:
[0078] In step S601, a test instruction of the storage system is obtained.
[0079] Among them, the test instructions are a set of commands specific to the required test scenarios or requirements, which are used to instruct the storage system to perform operations to verify its performance, reliability, functional integrity, etc. In the embodiment of the present application, the test instructions are the entire machine power-off recovery test instructions of the storage system.
[0080] It is understandable that the embodiment of the present application first obtains a test instruction of the storage system to instruct the storage system to start executing the test process of the storage system.
[0081] In step S602, a test process of the storage system is executed based on the test instruction. During the test, the power distribution unit is controlled to power on and off the storage components.
[0082] Among them, the power distribution unit is an intelligent PDU, which is a device used to manage and distribute electricity. It is usually used in data centers, supports power access and control of multiple devices, and can achieve millisecond-level power pulse control; the storage component is centralized storage, usually supports SAN / NAS architecture, and provides high-speed data access services; power-on is to supply power to the device, so that it starts and enters the operating state, and power-off is to cut off the power supply to the device and stop it from running.
[0083] It can be understood that the embodiment of the present application executes the test process of the storage system according to the test instructions. During the test process, the power distribution unit is controlled to power on and off the storage components to simulate power anomalies or restart scenarios that may occur in actual operation, thereby verifying the stability, recovery ability and data consistency performance of the storage components under power changes.
[0084] In an embodiment of the present application, the test process of the storage system includes: when the storage component is powered on, issuing a test instruction to at least one server, at least one server responding to the test instruction, performing storage stress testing and storage reliability testing on the storage component, and obtaining the status of all storage nodes of the test component through a status monitoring program; monitoring the running time of the server test, if the running time reaches a preset time, controlling the power distribution unit to power off the storage component; if the status of all storage nodes of the test component is a power-off state, recording the stress test results of the server, and controlling the power distribution unit to power on the storage component; if the status of all storage nodes of the test component is a power-on state, recording the stress test results of the server, and if the number of stress tests is less than the preset number, controlling the power distribution unit to power off the storage component, otherwise ending the test process.
[0085] Among them, the storage stress test simulates high-load, high-concurrency access scenarios to evaluate the performance of the storage system under extreme conditions; the storage reliability test detects the stability and data consistency capabilities of the storage system in scenarios such as long-term operation and frequent power on and off; the preset number of times is the upper limit of the set test rounds, which is used to control the number of repeated executions of the test. It is set according to actual needs and is not specifically limited here.
[0086] It can be understood that in the embodiment of the present application, when the storage component is in the power-on state, the test component sends a test instruction to at least one server. After the server responds to the instruction, it performs storage stress testing and storage reliability testing on the storage component, and obtains the operating status of all storage nodes through the status monitoring program; at the same time, it monitors the stress test running time of the server. If the preset time is reached, the power distribution unit is controlled to power off the storage component; when it is detected that all storage nodes are in the power-off state, the current stress test result is recorded, and the power distribution unit is controlled to power on the storage component again. If all storage nodes are restored to the power-on state, the test results are continued to be recorded, and it is determined whether the number of times the stress test is executed is less than the preset number. If it is less than, the power distribution unit is controlled again to power off the storage component to prepare for the next round of testing. If the preset number has been reached, the entire test process is terminated. During the entire process, if it is detected that a storage node is not in the power-off state in the power-off state, and if it is detected that a storage node is not restored to the power-on state in the power-on state, the training is interrupted.
[0087] In step S603, the status monitoring program and the timeout monitoring program are started. The status monitoring program starts a new process of the client and uses the new process to access the storage node in the storage component. The timeout monitoring program monitors whether the new process of the client has timed out based on the timeout threshold. If the new process of the client has timed out, the status of the storage node of the storage component is set.
[0088] Among them, the client refers to the software module or device that initiates the access request and is used to interact with the storage component for data. The specific steps of using the new process to access the storage node in the storage component will be described in detail below and will not be repeated here. The timeout threshold is a preset time limit value used to determine whether the client access exceeds the expected time range. It is set according to actual needs and is not specifically limited here.
[0089] It can be understood that the embodiment of the present application starts a status monitoring program and a timeout monitoring program. The status monitoring program is responsible for starting a new process of the client and accessing the storage node in the storage component through the process; at the same time, the timeout monitoring program monitors the access operation of the new process based on a preset timeout threshold. If it is detected that the access operation time of the new process of the client exceeds the set timeout threshold, it is determined to be an access timeout, and the status of the corresponding storage node in the storage component will be automatically set to abnormal or unavailable to facilitate subsequent problem analysis and recovery processing.
[0090] In an embodiment of the present application, the client includes a network layer and an application layer, the new process includes a first sub-process and a second sub-process, and the new process is used to access the storage node in the storage component, including: starting the first sub-process, identifying whether the first sub-process is allowed to access the storage node from the network layer; if the first sub-process is not allowed to access the storage node from the network layer, using a timeout monitoring program to monitor whether the first sub-process has timed out from the network layer, if the first sub-process has timed out from the network layer, the state of the storage node of the storage component is set to a power-off state; if the first sub-process is allowed to access the storage node from the network layer, starting the second sub-process to access the storage node from the application layer, using a timeout monitoring program to monitor whether the second sub-process has timed out from the application layer, if the second sub-process has timed out from the application layer, the state of the storage node of the storage component is set to a power-off state; if the second sub-process has not timed out from the application layer, the state of the storage node of the storage component is set to a power-on state.
[0091] The network layer is the third layer in the OSI (Open Systems Interconnection Reference Model) and is responsible for routing and transmitting data in the network. It is used to determine whether the client can access the storage node through the network. The status monitoring program verifies whether the storage component IP is normally accessible through the ping command (a common network diagnostic tool used to test network connectivity), thereby realizing network layer identification. The application layer is the seventh layer in the OSI model. It is the level at which users directly interact with the system and is used to execute specific business logic, such as read and write operations.
[0092] It can be understood that the client of the embodiment of the present application includes two communication layers, the network layer and the application layer. The new process consists of two sub-processes, namely the first sub-process and the second sub-process. The first sub-process is first started to try to access the storage node in the storage component from the network layer. If the network layer access is denied, the timeout monitoring program detects whether an access timeout occurs. If a timeout occurs, the status of the storage node is marked as a power-off state; if the first sub-process successfully accesses through the network layer, the second sub-process is started to continue to perform the actual access operation from the application layer. At this time, the timeout monitoring program continues to monitor whether its access has timed out. If a timeout occurs, the storage node status is also set to a power-off state; if the second sub-process completes the access at the application layer and does not time out, the status of the storage node is set to a power-on state, indicating that the access is normal and the node is available.
[0093] In an embodiment of the present application, if the second sub-process times out in access from the application layer, before setting the state of the storage node of the storage component to a power-off state, it also includes: resetting the client and restarting the second sub-process to access the storage node from the application layer; obtaining the number of reset times of the client, and if the number of reset times is greater than the preset number, setting the state of the storage node of the storage component to a power-off state.
[0094] Among them, resetting the client refers to restoring the client to its initial state to try to re-establish a connection or access; the preset number of times is set according to the actual situation and is not specifically limited.
[0095] It can be understood that when the second sub-process of the embodiment of the present application times out when accessing the storage node in the storage component from the application layer, it is necessary to attempt a recovery operation before setting the status of the storage node to a power-off state: first reset the client, and restart the second sub-process to initiate an access request from the application layer again, and record the number of client resets. If the number exceeds the preset maximum number of retries, it is determined that the access failed and the status of the storage node is set to a power-off state; conversely, if the access is successful within the allowed retry range, the test process continues and the node is not marked as abnormal.
[0096] In an embodiment of the present application, before setting the status of the storage node of the storage component to the power-on state, it also includes: identifying whether the second sub-process is allowed to access the storage node from the application layer; if the second sub-process is allowed to access the storage node from the application layer, setting the status of the storage node of the storage component to the power-on state; if the second sub-process is not allowed to access the storage node from the application layer, resetting the client.
[0097] It can be understood that before the embodiment of the present application sets the storage node of the storage component to the power-on state, it will first attempt to access the storage node from the application layer through the second sub-process. If the access is successful and it is confirmed that access is allowed, the storage node is considered to be in normal operating state and its state is marked as the power-on state; if the second sub-process cannot access the storage node at the application layer, it will trigger a client reset operation to try to restore the connection and re-detect the availability of the storage node.
[0098] In an embodiment of the present application, before starting the status monitoring program and the timeout monitoring program, it also includes: obtaining the number of storage nodes in the storage component; and starting a corresponding number of status monitoring programs and timeout monitoring programs based on the number of storage nodes in the storage component.
[0099] Among them, by dynamically allocating monitoring resources according to the number of storage nodes, resource waste or monitoring omissions can be avoided. For example, in a storage system with multiple volumes, each storage node has an independent status monitoring program and timeout monitoring program, which can more accurately identify the source of the fault and isolate it, thereby improving the system's stability, maintainability and fault location capabilities.
[0100] It can be understood that before starting the status monitoring program and the timeout monitoring program, the embodiment of the present application will first obtain the number of storage nodes in the storage component, and start the corresponding number of status monitoring programs and timeout monitoring programs based on the number to ensure that each storage node can be independently monitored and managed. It is suitable for monitoring the status of multiple business nodes, realizes refined and parallel monitoring of storage nodes, and improves the efficiency and accuracy of detecting abnormal conditions during testing or operation.
[0101] In an embodiment of the present application, before starting the status monitoring program and the timeout monitoring program, it is identified whether the timeout monitoring program has been started; if the timeout monitoring program has not been started, the historical process information of each new process in the client is obtained, and the corresponding new process timeout threshold is determined based on the historical process information.
[0102] The new process includes the first sub-process and the second sub-process; the historical process information is the relevant information recorded during the past running of the new process, such as the running time, access results, etc.
[0103] It can be understood that before starting the status monitoring program and the timeout monitoring program in the embodiment of the present application, it will first determine whether the timeout monitoring program is already in a running state. If it has not yet been started, the historical running information of each new process in the client is obtained, and based on this information, the corresponding timeout threshold is dynamically determined for each new process. This mechanism ensures the adaptability and accuracy of timeout monitoring, and avoids misjudgment or waste of resources that may be caused by the use of a unified timeout value.
[0104] According to the storage system testing method of the embodiment of the present application, a test component is used to test the storage system. During the test, the power distribution unit is controlled to power on and off the storage component, and a status monitoring program and a timeout monitoring program are started at the beginning of the test. A new process of the storage system client is started through the status monitoring program, and the new process is used to access the storage node in the storage component. The timeout monitoring program monitors whether the new process of the client has timed out based on the timeout threshold, so as to complete the reliability test of the storage system with high efficiency, thereby achieving technical effects such as automated testing, reduced test time, and enhanced test reliability.
[0105] For descriptions of features in the embodiments corresponding to the storage system testing method, please refer to the relevant descriptions of the embodiments corresponding to the storage system testing method system, which will not be repeated here.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0107] The embodiment of the present application also provides an electronic device, such as Figure 8 As shown, it includes a memory 701 and a processor 702. The memory 701 stores a computer program, and the processor 702 is configured to run the computer program to execute the steps in the embodiment of the test method for the storage system.
[0108] An embodiment of the present application further provides a non-volatile computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of the above-mentioned storage system testing method embodiment when running.
[0109] In an exemplary embodiment, the non-volatile computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0110] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0111] The above is a detailed introduction to the test system, method, electronic device and storage medium of a storage system provided by the present application. Specific examples are used herein 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 and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A storage system testing system, characterized in that: The storage system includes a storage component, a switching component, and at least one server. The service provided by the storage component is mapped to the at least one server via the switching component. The storage component is provided with a client. The test system includes: A power distribution unit, configured to power on and off the storage component; A test component is used to test the storage system. The test process includes sending a test instruction to the at least one server when the storage component is powered on. The at least one server responds to the test instruction and performs a storage stress test and a storage reliability test on the storage component. The status of all storage nodes of the test component is obtained through the status monitoring program; the running time of the server test is monitored. If the running time reaches a preset time, the power distribution unit is controlled to power off the storage component; if the status of all storage nodes of the test component is a power-off state, the stress test result of the server is recorded, and the power distribution unit is controlled to power on the storage component; if the test If the status of all storage nodes of the test component is powered on, the stress test result of the server is recorded; if the number of stress tests is less than the preset number, the power distribution unit is controlled to power off the storage component, otherwise the test process is terminated; during the test, the power distribution unit is controlled to power on and off the storage component; at the beginning of the test, a status monitoring program and a timeout monitoring program are started; the status monitoring program starts a new process of the client, and uses the new process to access the storage node in the storage component; the timeout monitoring program monitors whether the new process of the client has timed out based on a timeout threshold; if the new process of the client has timed out, the status of the storage node of the storage component is set.
2. The storage system test system according to claim 1, wherein: The test component sends a test instruction to the at least one server, and the at least one server responds to the test instruction and performs a storage stress test on the storage component.
3. A storage system testing method, characterized in that: The storage system includes a storage component, a switching component, and at least one server. Services provided by the storage component are mapped to the at least one server via the switching component. The storage component is provided with a client. The method is applied to a test component of a test system for the storage system according to claim 1 or 2, and the method includes: Obtaining a test instruction for the storage system; The test process of the storage system is executed based on the test instruction, and the test process of the storage system includes: when the storage component is powered on, issuing a test instruction to the at least one server, the at least one server responding to the test instruction, performing a storage stress test and a storage reliability test on the storage component, and obtaining the status of all storage nodes of the test component through the status monitoring program; monitoring the running time of the server test, and if the running time reaches a preset time, controlling the power distribution unit to power off the storage component; if the status of all storage nodes of the test component is a power-off state, recording the stress test result of the server, and controlling the power distribution unit to power on the storage component; if the status of all storage nodes of the test component is a power-on state, recording the stress test result of the server, and if the number of stress tests is less than a preset number, controlling the power distribution unit to power off the storage component, otherwise terminating the test process, and controlling the power distribution unit to power on and off the storage component during the test; Start a status monitoring program and a timeout monitoring program. The status monitoring program starts a new process of the client and uses the new process to access the storage node in the storage component. The timeout monitoring program monitors whether the new process of the client has timed out based on a timeout threshold. If the new process of the client has timed out, the status of the storage node of the storage component is set.
4. The storage system testing method according to claim 3, wherein: The client includes a network layer and an application layer, the new process includes a first sub-process and a second sub-process, and using the new process to access the storage node in the storage component includes: Starting the first sub-process and identifying whether the first sub-process is allowed to access the storage node from the network layer; If the first sub-process is not allowed to access the storage node from the network layer, monitoring whether the first sub-process has timed out from the network layer using the timeout monitoring program, and if the first sub-process has timed out from the network layer, setting the state of the storage node of the storage component to a power-off state; If the first sub-process is allowed to access the storage node from the network layer, a second sub-process is started to access the storage node from the application layer, and the timeout monitoring program is used to monitor whether the second sub-process times out of access from the application layer; if the second sub-process times out of access from the application layer, the state of the storage node of the storage component is set to a power-off state; If the second sub-process accesses the application layer without timeout, the state of the storage node of the storage component is set to a power-on state.
5. The storage system testing method according to claim 4, wherein: If the second sub-process times out from accessing the application layer, the method further includes setting the state of the storage node of the storage component to a power-off state: Resetting the client and restarting the second sub-process to access the storage node from the application layer; The number of reset times of the client is obtained, and if the number of reset times is greater than a preset number, the state of the storage node of the storage component is set to a power-off state.
6. The storage system testing method according to claim 5, characterized in that: Before setting the state of the storage node of the storage component to the power-on state, the method further includes: identifying whether the second sub-process is allowed to access the storage node from the application layer; If the second sub-process allows access to the storage node from the application layer, setting the state of the storage node of the storage component to a powered-on state; If the second sub-process is not allowed to access the storage node from the application layer, the client is reset.
7. The storage system testing method according to claim 3, wherein: Before starting the status monitor and timeout monitor, it also includes: Obtaining the number of storage nodes in the storage component; According to the number of storage nodes in the storage component, a corresponding number of status monitoring programs and timeout monitoring programs are started.
8. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the storage system testing method according to any one of claims 3 to 7 when executing the computer program.
9. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the storage system testing method according to any one of claims 3 to 7.
Citation Information
Patent Citations
Cluster-type automatic test method
CN106874159A
Storage software testing method, apparatus and device
CN108984419A
Test system and test method of memory
CN118675602A