A test method and device for a storage server, an electronic device, and a medium

CN115981940BActive Publication Date: 2026-08-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211684781.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2026-08-18
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

然而,存储服务器需要使用独立的电源进行供电,在使用冷存储功能改变硬盘的电源状态时,板卡电路需要保证可以稳定的提供电力输入和输出,否则可能会导致在硬盘上保存的数据遭到破坏,造成损失

Benefits of technology

[0031]In this embodiment of the invention, the storage server is configured with a disk cluster. The storage server is used to provide expanded storage space for the primary server. The storage server is controlled to enter a cold storage mode. In the cold storage mode, the storage server does not supply power to any of the hard drives in the disk cluster by default, keeping them in a powered-off state. When the storage server is in cold storage mode, one or more test strategies are determined, and target hard drives are selected from all the hard drives in the disk cluster and powered on according to the one or more test strategies to perform stress tests on the target hard drives. During the test, the circuit status data of the storage server is monitored, and a first test result of the storage server is generated based on the circuit status data. This enables the power circuit of the storage server to be tested when some hard drives are working in cold storage mode, without having to test when all hard drives are working simultaneously, thus improving the efficiency of the test and ensuring the security and stability of the storage server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115981940B_ABST
    Figure CN115981940B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of storage server test method, device, electronic equipment and medium, the method comprises: control storage server enters cold storage mode;Wherein, in cold storage mode, all hard disks of disk cluster are not powered by default by storage server;In the case where storage server is in cold storage mode, one or more test strategies are determined, and according to one or more test strategies, target hard disk is selected from all hard disks of disk cluster to be powered on, to carry out stress test to target hard disk;During testing, the circuit state data of storage server is monitored, and according to circuit state data, the first test result of storage server is generated.It is realized that in cold storage mode, the power supply circuit of storage server can be tested when part of hard disk works, without testing when all hard disks work simultaneously, improve the efficiency of testing, guarantee the security, stability of storage server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to a testing method, apparatus, electronic device, and medium for a storage service server. Background Technology

[0002] With the development of science and technology, massive amounts of data need to be stored. Storing data usually requires the use of storage servers, but the number of hard drives that can be installed on a typical server is limited. If you want to increase storage capacity, you can only do so by increasing the number of servers.

[0003] Currently, the main server can be expanded using storage servers, such as JBOD (Just a Bunch Of Disk) servers. Furthermore, within storage servers, data that hasn't been used for a long time can be powered off using cold storage, ensuring data security while saving power. However, storage servers require independent power supplies. When using cold storage to change the power state of the hard drives, the circuitry must ensure a stable power input and output; otherwise, the data stored on the hard drives may be corrupted, resulting in data loss. In existing methods, the power circuitry of the storage server can only be tested and verified when all hard drives are operating simultaneously, which is insufficient to meet current requirements. Summary of the Invention

[0004] In view of the above problems, a test method, apparatus, electronic device, and medium for a storage server are proposed to overcome or at least partially solve the above problems, including:

[0005] A method for testing a storage server, wherein the storage server is configured with disk clusters and is used to provide expanded storage space for a primary server, the method comprising:

[0006] The storage server is controlled to enter a cold storage mode; wherein, in the cold storage mode, the storage server does not supply power to any of the hard drives in the disk cluster by default, so as to keep them in a shut-down state;

[0007] When the storage server is in cold storage mode, one or more test strategies are determined, and target hard drives are selected from all hard drives in the disk cluster and powered on according to the one or more test strategies to perform stress tests on the target hard drives.

[0008] During the test, the circuit status data of the storage server is monitored, and the first test result of the storage server is generated based on the circuit status data.

[0009] Optionally, the step of selecting a target hard drive from all hard drives in the disk cluster and powering it on according to one or more testing strategies to perform stress testing on the target hard drive includes:

[0010] According to one or more of the aforementioned testing strategies, one hard drive is selected from all the hard drives in the disk cluster as the target hard drive for each power-on test, until the last hard drive completes the stress test.

[0011] Optionally, the storage server has a storage configuration with multiple hard drive backplanes, and all hard drives of the disk cluster are installed on the multiple hard drive backplanes. The step of selecting a target hard drive from all hard drives of the disk cluster and powering it on according to one or more testing strategies to perform stress testing on the target hard drive includes:

[0012] According to one or more of the aforementioned testing strategies, all hard disk backplanes of the storage server are powered on, and for each hard disk backplane, the hard disks installed on it are powered on sequentially as target hard disks to perform stress tests on the target hard disks until the last hard disk completes the stress test.

[0013] Optionally, the step of selecting a target hard drive from all hard drives in the disk cluster and powering it on according to one or more testing strategies to perform stress testing on the target hard drive includes:

[0014] According to one or more of the aforementioned testing strategies, one or more hard drives are randomly selected from all hard drives in the disk cluster as target hard drives and powered on to perform stress tests on the target hard drives;

[0015] After stress testing the current target hard drive, power down the current target hard drive, and then perform the stress test again by randomly selecting one or more hard drives from all hard drives in the disk cluster as the target hard drive.

[0016] Optionally, it also includes:

[0017] After the stress test is completed, the original file used for the stress test is obtained, and the written files for the original file are obtained from the target hard drive.

[0018] Based on the original file and the written file, a second test result for the storage server is generated.

[0019] Optionally, before controlling the storage server to enter cold storage mode, the method further includes:

[0020] The number and distribution of hard drives in the disk cluster are obtained, and a target hard drive is selected based on the number and distribution of hard drives.

[0021] Optionally, generating the first test result of the storage server based on the circuit state data includes:

[0022] Obtain the expected data and compare the circuit state data with the expected data;

[0023] Based on the comparison results, the first test result of the storage server is generated.

[0024] A testing apparatus for a storage server, wherein the storage server is configured with disk clusters and is used to provide expanded storage space for a primary server, the apparatus comprising:

[0025] A cold storage mode entry module is used to control the storage server to enter cold storage mode; wherein, in the cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state;

[0026] The stress testing module is used to determine one or more test strategies when the storage server is in cold storage mode, and select a target hard drive from all hard drives in the disk cluster according to the one or more test strategies to perform stress testing on the target hard drive.

[0027] The first test result generation module is used to monitor the circuit status data of the storage server during the test and generate the first test result of the storage server based on the circuit status data.

[0028] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements a test method for storing the memory as described above.

[0029] A computer-readable storage medium storing a computer program that, when executed by a processor, implements a test method for a storage server as described above.

[0030] The embodiments of the present invention have the following advantages:

[0031] In this embodiment of the invention, the storage server is configured with a disk cluster. The storage server is used to provide expanded storage space for the primary server. The storage server is controlled to enter a cold storage mode. In the cold storage mode, the storage server does not supply power to any of the hard drives in the disk cluster by default, keeping them in a powered-off state. When the storage server is in cold storage mode, one or more test strategies are determined, and target hard drives are selected from all the hard drives in the disk cluster and powered on according to the one or more test strategies to perform stress tests on the target hard drives. During the test, the circuit status data of the storage server is monitored, and a first test result of the storage server is generated based on the circuit status data. This enables the power circuit of the storage server to be tested when some hard drives are working in cold storage mode, without having to test when all hard drives are working simultaneously, thus improving the efficiency of the test and ensuring the security and stability of the storage server. Attached Figure Description

[0032] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1a This is an architecture diagram of a testing system provided in an embodiment of the present invention;

[0034] Figure 1b This is a schematic diagram illustrating a test example of a storage service server provided in an embodiment of the present invention;

[0035] Figure 2 This is a flowchart of the steps of a testing method for a storage server provided in an embodiment of the present invention;

[0036] Figure 3 This is a flowchart of the steps of a testing method for another storage server provided in an embodiment of the present invention;

[0037] Figure 4 This is a flowchart of the steps of a testing method for another storage server provided in an embodiment of the present invention;

[0038] Figure 5 This is a flowchart of the steps of a testing method for another storage server provided in an embodiment of the present invention;

[0039] Figure 6 This is a flowchart of the steps of a testing method for another storage server provided in an embodiment of the present invention;

[0040] Figure 7This is a structural block diagram of a testing device for a storage service server provided in an embodiment of the present invention. Detailed Implementation

[0041] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0042] In practical applications, storage servers (such as JBOD servers) can be equipped with a large number of storage hard drives, such as... Figure 1a It connects to the main server via a SAS card. Using a storage server allows for direct expansion of the main server's storage capacity without increasing the number of general-purpose servers, and more storage servers can be connected via SAS cables. By adopting this method, server storage can be expanded, allowing more resources to be allocated to increasing storage capacity.

[0043] Specifically, storage servers can have varying numbers of hard drive backplanes, with each backplane housing a certain number of hard drives. The master server can send cold storage switch commands to the connected storage servers via SAS lines. When a storage server is in cold storage mode, all hard drives are powered off by default. Through the control server, test scripts can be run on the master server to switch the power to the hard drives on and off. Once powered on, the master server can recognize the powered-on hard drives and perform stress tests, increasing power consumption.

[0044] In cold storage mode, the following tests can be performed on the storage server:

[0045] 1. Linear increase in the number of hard drives: The number of hard drives starts from 0 and is powered on sequentially. Each time a hard drive is powered on, a voltage is applied to the hard drive, causing the circuit load of the storage server to gradually increase until the last hard drive is powered on and the voltage is applied.

[0046] 2. Linearly increasing number of hard drive backplanes: Power-on commands are simultaneously sent to all backplanes on the storage server, starting with the 0th hard drive on each backplane and sequentially powering on until the last hard drive on the backplane is powered on. After each hard drive is recognized upon power-on, a stress test is performed on the hard drive.

[0047] 3. Random power-on / off of hard drives: Within a unit of time, randomly power on any hard drive on any backplane of the storage server, run under stress for a period of time, and then turn off the power to the next random group of hard drives, and so on.

[0048] Throughout the testing process, through server management software or physical measurements (such as...) Figure 1a The instrument monitors the current and voltage in the power circuit of the storage server, filtering out values ​​that exceed design standards, thus enabling highly efficient testing. Hard drive stress can be measured using tools like fio, or by directly writing to a file. After the test, the original file and the written file are compared to verify the integrity of the file during cold storage testing.

[0049] In this embodiment of the invention, a test environment can be built via a network, and a control server can transmit test programs, test data, and test results over the network. The test can also be performed by remotely controlling the machine under test via the network, so that the test process can be carried out automatically.

[0050] In practical implementation, the testing process can adopt methods such as... Figure 1b Method:

[0051] 1. The main server downloads the test program over the network and executes it automatically after download.

[0052] 2. The main server detects and records the total number of hard drives in the machine.

[0053] 3. The master server sends a command to the JBOD server to enable cold storage mode and records the number of hard drives.

[0054] 4. The main server or physical measuring instruments begin monitoring the server circuit status.

[0055] 5. Start executing the main test program, and perform tests in sequence such as linearly increasing the number of hard drives, linearly increasing the number of hard drive backplanes, and randomly powering on and off the hard drives.

[0056] 6. The main server or physical measuring instruments stop monitoring and filter out data that does not meet expectations.

[0057] 7. Verify the integrity of data written to the hard drive.

[0058] 8. Summarize the data results and provide feedback on the test data.

[0059] In this embodiment of the invention, by utilizing the cold storage function of the storage server, the number of hard drives powered on and their operating status on the hard drive backplane are changed to verify the stability of the power supply circuit in the storage server and whether it meets design standards. The integrity of data retention on the hard drives in cold storage mode is also verified. The testing is automated, saving labor costs. Furthermore, by configuring all machines on the same network, the control server can automatically control the server under test on the network using SSH, and the entire process can be automatically executed using scripts or programming languages ​​on the control server.

[0060] The following provides further explanation:

[0061] Reference Figure 2 The diagram illustrates a step flowchart of a testing method for a storage server according to an embodiment of the present invention. The storage server can be a JBOD server, which can be configured with disk clusters. The disk clusters can have multiple hard disk backplanes, and one or more hard disks can be installed on each hard disk backplane. The storage server can be connected to the main server via SAS lines, and can then be used to provide expanded storage space for the main server. The main server can store data in the disk clusters of the storage server.

[0062] Specifically, it may include the following steps:

[0063] Step 201: Control the storage server to enter cold storage mode; wherein, in the cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state.

[0064] Before testing, the master server can download the test program from the control server or other network servers via the network. After downloading the test program, automated testing can be performed. The master server can then send a command to the storage server to enable cold storage mode, controlling the storage server to enter cold storage mode. In cold storage mode, for data that has not been used for a long time, the storage server can use the cold storage function to power off the hard drive, ensuring data security while saving power consumption.

[0065] In one embodiment of the present invention, before controlling the storage server to enter the cold storage mode, the method may further include:

[0066] The number and distribution of hard drives in the disk cluster are obtained, and a target hard drive is selected based on the number and distribution of hard drives.

[0067] To facilitate subsequent control of hard drive power-on and power-off in cold storage mode, the main server can detect the hard drive data and distribution of the storage server (such as which hard drive backplane the hard drives are located on), so that the target hard drive can be selected for control based on the number and distribution of hard drives.

[0068] Step 202: When the storage server is in cold storage mode, determine one or more test strategies, and select a target hard drive from all hard drives in the disk cluster according to the one or more test strategies to perform stress test on the target hard drive.

[0069] In practical applications, one or more test strategies can be pre-set. After the storage server enters cold storage mode, a target hard drive can be selected from all the hard drives in the disk cluster and powered on according to one or more test strategies. The target hard drive can be some of the hard drives in the disk cluster, which can verify the stability of the circuit of the storage server when some hard drives are working.

[0070] Hard drive pressure can be measured using tools like fio, or it can be written directly to a file.

[0071] In one embodiment of the present invention, the step of selecting a target hard drive from all hard drives in the disk cluster and powering it on according to the one or more testing strategies to perform a stress test on the target hard drive may include:

[0072] According to one or more of the aforementioned testing strategies, one hard drive is selected from all the hard drives in the disk cluster as the target hard drive for each power-on test, until the last hard drive completes the stress test.

[0073] In a test strategy where the number of hard drives increases linearly, the storage server can be powered on sequentially starting from 0, with each hard drive being pressurized upon power-on, gradually increasing the load on the storage server circuitry until the last hard drive is powered on and pressurized.

[0074] In one embodiment of the present invention, the storage server has a storage configuration with multiple hard disk backplanes, and all hard disks of the disk cluster are installed on the multiple hard disk backplanes. The step of selecting a target hard disk from all hard disks of the disk cluster and powering it on according to one or more testing strategies to perform a stress test on the target hard disk may include:

[0075] According to one or more of the aforementioned testing strategies, all hard disk backplanes of the storage server are powered on, and for each hard disk backplane, the hard disks installed on it are powered on sequentially as target hard disks to perform stress tests on the target hard disks until the last hard disk completes the stress test.

[0076] In the case where the testing strategy involves linearly increasing the number of hard drive backplanes, a power-on command can be sent to all backplanes on the storage server simultaneously. Power-on can be performed sequentially starting from the 0th hard drive on the backplane until the last hard drive on the backplane is powered on. After each hard drive is recognized upon power-on, a stress test is performed on the hard drive.

[0077] In one embodiment of the present invention, the step of selecting a target hard drive from all hard drives in the disk cluster and powering it on according to the one or more testing strategies to perform a stress test on the target hard drive may include:

[0078] According to one or more of the aforementioned testing strategies, all hard disk backplanes of the storage server are powered on, and for each hard disk backplane, the hard disks installed on it are powered on sequentially as target hard disks to perform stress tests on the target hard disks until the last hard disk completes the stress test; after performing stress tests on the current target hard disk, the current target hard disk is powered off, and the process of randomly selecting one or more hard disks from all hard disks in the disk cluster as target hard disks to perform stress tests on the target hard disks is executed again.

[0079] In a test strategy involving random power-on and power-off of hard drives, within a unit of time, any hard drive on any backplane of the storage server is randomly powered on, subjected to stress for a period of time, and then the hard drive power is turned off before switching to the next set of random hard drives for power-on. This process is repeated in a loop.

[0080] Step 203: During the test, monitor the circuit status data of the storage server and generate the first test result of the storage server based on the circuit status data.

[0081] Throughout the testing process, the current and voltage in the storage server circuitry are monitored using server management software or physical measurements to identify values ​​that exceed design standards.

[0082] In one embodiment of the present invention, generating a first test result for the storage server based on the circuit state data may include:

[0083] Obtain the expected data and compare the circuit status data with the expected data; based on the comparison result, generate the first test result of the storage server.

[0084] In practice, expected data can be preset, and then the circuit status data can be compared with the expected data. Based on the comparison results, the first test result of the storage server can be generated.

[0085] In one embodiment of the present invention, it may further include:

[0086] After the stress test is completed, the original file used for the stress test is obtained, and the written file for the original file is obtained from the target hard disk; based on the original file and the written file, a second test result of the storage server is generated.

[0087] For stress testing by directly writing to files, the original file can be used for stress testing, and the written file corresponding to the original file can be obtained from the target hard drive. Then, based on the original file and the written file, a second test result of the storage server can be generated, which can verify the integrity of file preservation during the cold storage test.

[0088] In one embodiment of the present invention, a storage server is configured with a disk cluster. The storage server is used to provide expanded storage space for the primary server. The storage server is controlled to enter a cold storage mode. In the cold storage mode, the storage server does not supply power to any of the hard drives in the disk cluster by default, keeping them in a powered-off state. When the storage server is in cold storage mode, one or more test strategies are determined, and target hard drives are selected from all the hard drives in the disk cluster and powered on according to the one or more test strategies to perform stress tests on the target hard drives. During the test, the circuit status data of the storage server is monitored, and a first test result of the storage server is generated based on the circuit status data. This enables the power circuit of the storage server to be tested when some hard drives are working in cold storage mode, without having to test when all hard drives are working simultaneously, thus improving the efficiency of the test and ensuring the security and stability of the storage server.

[0089] Reference Figure 3 The diagram illustrates a step flowchart of a testing method for another storage server provided by an embodiment of the present invention. The storage server can be a JBOD server, which can be configured with disk clusters. The disk clusters can have multiple hard disk backplanes, and one or more hard disks can be installed on each hard disk backplane. The storage server can be connected to the main server via SAS lines, and can then be used to provide expanded storage space for the main server. The main server can store data in the disk clusters of the storage server.

[0090] Specifically, it may include the following steps:

[0091] Step 301: Control the storage server to enter cold storage mode; wherein, in the cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state.

[0092] Before testing, the master server can download the test program from the control server or other network servers via the network. After downloading the test program, automated testing can be performed. The master server can then send a command to the storage server to enable cold storage mode, controlling the storage server to enter cold storage mode. In cold storage mode, for data that has not been used for a long time, the storage server can use the cold storage function to power off the hard drive, ensuring data security while saving power consumption.

[0093] Step 302: When the storage server is in cold storage mode, determine one or more test strategies, and according to the one or more test strategies, select one hard drive from all the hard drives in the disk cluster as the target hard drive for power-on each time to perform stress test on the target hard drive until the last hard drive completes the stress test.

[0094] In practical applications, one or more test strategies can be pre-set. After the storage server enters cold storage mode, a target hard drive can be selected from all the hard drives in the disk cluster and powered on according to one or more test strategies. The target hard drive can be some of the hard drives in the disk cluster, which can verify the stability of the circuit of the storage server when some hard drives are working.

[0095] Hard drive pressure can be measured using tools like fio, or it can be written directly to a file.

[0096] In a test strategy where the number of hard drives increases linearly, the storage server can be powered on sequentially starting from 0, with each hard drive being pressurized upon power-on, gradually increasing the load on the storage server circuitry until the last hard drive is powered on and pressurized.

[0097] Step 303: During the test, monitor the circuit status data of the storage server and generate the first test result of the storage server based on the circuit status data.

[0098] Throughout the testing process, the current and voltage in the storage server circuitry are monitored using server management software or physical measurements to identify values ​​that exceed design standards.

[0099] Reference Figure 4 The diagram illustrates a step flowchart of a testing method for another storage server provided by an embodiment of the present invention. The storage server can be a JBOD server, which can be configured with disk clusters. The disk clusters can have multiple hard disk backplanes, and one or more hard disks can be installed on each hard disk backplane. The storage server can be connected to the main server via SAS lines, and can then be used to provide expanded storage space for the main server. The main server can store data in the disk clusters of the storage server.

[0100] Specifically, it may include the following steps:

[0101] Step 401: Control the storage server to enter cold storage mode; wherein, in cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state; wherein, the storage server has a storage configuration with multiple hard drive backplanes, and all hard drives of the disk cluster are installed on the multiple hard drive backplanes.

[0102] Before testing, the master server can download the test program from the control server or other network servers via the network. After downloading the test program, automated testing can be performed. The master server can then send a command to the storage server to enable cold storage mode, controlling the storage server to enter cold storage mode. In cold storage mode, for data that has not been used for a long time, the storage server can use the cold storage function to power off the hard drive, ensuring data security while saving power consumption.

[0103] Step 402: According to one or more of the test strategies, power on all hard disk backplanes of the storage server, and for each hard disk backplane, power on the hard disks installed on it in sequence as target hard disks to perform stress tests on the target hard disks until the last hard disk completes the stress test.

[0104] In practical applications, one or more test strategies can be pre-set. After the storage server enters cold storage mode, a target hard drive can be selected from all the hard drives in the disk cluster and powered on according to one or more test strategies. The target hard drive can be some of the hard drives in the disk cluster, which can verify the stability of the circuit of the storage server when some hard drives are working.

[0105] Hard drive pressure can be measured using tools like fio, or it can be written directly to a file.

[0106] In the case where the testing strategy involves linearly increasing the number of hard drive backplanes, a power-on command can be sent to all backplanes on the storage server simultaneously. Power-on can be performed sequentially starting from the 0th hard drive on the backplane until the last hard drive on the backplane is powered on. After each hard drive is recognized upon power-on, a stress test is performed on the hard drive.

[0107] Step 403: During the test, monitor the circuit status data of the storage server and generate the first test result of the storage server based on the circuit status data.

[0108] Throughout the testing process, the current and voltage in the storage server circuitry are monitored using server management software or physical measurements to identify values ​​that exceed design standards.

[0109] Reference Figure 5 The diagram illustrates a step flowchart of a testing method for another storage server provided by an embodiment of the present invention. The storage server can be a JBOD server, which can be configured with disk clusters. The disk clusters can have multiple hard disk backplanes, and one or more hard disks can be installed on each hard disk backplane. The storage server can be connected to the main server via SAS lines, and can then be used to provide expanded storage space for the main server. The main server can store data in the disk clusters of the storage server.

[0110] Specifically, it may include the following steps:

[0111] Step 501: Control the storage server to enter cold storage mode; wherein, in cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state.

[0112] Before testing, the master server can download the test program from the control server or other network servers via the network. After downloading the test program, automated testing can be performed. The master server can then send a command to the storage server to enable cold storage mode, controlling the storage server to enter cold storage mode. In cold storage mode, for data that has not been used for a long time, the storage server can use the cold storage function to power off the hard drive, ensuring data security while saving power consumption.

[0113] Step 502: When the storage server is in cold storage mode, determine one or more test strategies, and according to the one or more test strategies, randomly select one or more hard drives from all hard drives in the disk cluster as target hard drives and power them on to perform stress tests on the target hard drives.

[0114] Step 503: After stress testing the current target hard drive, power down the current target hard drive, and then execute the step of randomly selecting one or more hard drives from all hard drives in the disk cluster as the target hard drive and powering them on again to perform stress testing on the target hard drive.

[0115] In practical applications, one or more test strategies can be pre-set. After the storage server enters cold storage mode, a target hard drive can be selected from all the hard drives in the disk cluster and powered on according to one or more test strategies. The target hard drive can be some of the hard drives in the disk cluster, which can verify the stability of the circuit of the storage server when some hard drives are working.

[0116] Hard drive pressure can be measured using tools like fio, or it can be written directly to a file.

[0117] In a test strategy involving random power-on and power-off of hard drives, within a unit of time, any hard drive on any backplane of the storage server is randomly powered on, subjected to stress for a period of time, and then the hard drive power is turned off before switching to the next set of random hard drives for power-on. This process is repeated in a loop.

[0118] Step 504: During the test, monitor the circuit status data of the storage server and generate the first test result of the storage server based on the circuit status data.

[0119] Throughout the testing process, the current and voltage in the storage server circuitry are monitored using server management software or physical measurements to identify values ​​that exceed design standards.

[0120] Reference Figure 6 The diagram illustrates a step flowchart of a testing method for another storage server provided by an embodiment of the present invention. The storage server can be a JBOD server, which can be configured with disk clusters. The disk clusters can have multiple hard disk backplanes, and one or more hard disks can be installed on each hard disk backplane. The storage server can be connected to the main server via SAS lines, and can then be used to provide expanded storage space for the main server. The main server can store data in the disk clusters of the storage server.

[0121] Specifically, it may include the following steps:

[0122] Step 601: Control the storage server to enter cold storage mode; wherein, in cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state.

[0123] Before testing, the master server can download the test program from the control server or other network servers via the network. After downloading the test program, automated testing can be performed. The master server can then send a command to the storage server to enable cold storage mode, controlling the storage server to enter cold storage mode. In cold storage mode, for data that has not been used for a long time, the storage server can use the cold storage function to power off the hard drive, ensuring data security while saving power consumption.

[0124] Step 602: When the storage server is in cold storage mode, determine one or more test strategies, and select a target hard drive from all hard drives in the disk cluster according to the one or more test strategies to perform stress test on the target hard drive.

[0125] In practical applications, one or more test strategies can be pre-set. After the storage server enters cold storage mode, a target hard drive can be selected from all the hard drives in the disk cluster and powered on according to one or more test strategies. The target hard drive can be some of the hard drives in the disk cluster, which can verify the stability of the circuit of the storage server when some hard drives are working.

[0126] Hard drive pressure can be measured using tools like fio, or it can be written directly to a file.

[0127] Step 603: During the test, monitor the circuit status data of the storage server.

[0128] Step 604: Obtain the expected data and compare the circuit state data with the expected data.

[0129] In practice, expected data can be preset, and then the circuit status data can be compared with the expected data. Based on the comparison results, the first test result of the storage server can be generated.

[0130] Step 605: Based on the comparison results, generate the first test result for the storage server.

[0131] Throughout the testing process, the current and voltage in the storage server circuitry are monitored using server management software or physical measurements to identify values ​​that exceed design standards.

[0132] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0133] Reference Figure 7 The diagram shows a structural schematic of a test device for a storage server according to an embodiment of the present invention. The storage server can be a JBOD server, which can be configured with disk clusters. The disk clusters can have multiple hard disk backplanes, and one or more hard disks can be installed on each hard disk backplane. The storage server can be connected to the main server through SAS lines, and can then be used to provide expanded storage space for the main server. The main server can store data in the disk clusters of the storage server.

[0134] Specifically, it can include the following modules:

[0135] The cold storage mode entry module 701 is used to control the storage server to enter the cold storage mode; wherein, in the cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state;

[0136] The stress testing module 702 is used to determine one or more test strategies when the storage server is in cold storage mode, and select a target hard drive from all hard drives in the disk cluster according to the one or more test strategies to power on the target hard drive in order to perform stress testing on the target hard drive.

[0137] The first test result generation module 703 is used to monitor the circuit status data of the storage server during the test and generate the first test result of the storage server based on the circuit status data.

[0138] In one embodiment of the present invention, the pressure testing module 702 includes:

[0139] The first test submodule is used to select one hard drive from all the hard drives in the disk cluster as the target hard drive and power it on each time according to one or more test strategies, so as to perform stress test on the target hard drive until the last hard drive completes the stress test.

[0140] In one embodiment of the present invention, the storage server is equipped with a backplane of multiple hard disks, and all the hard disks of the disk cluster are mounted on the backplane of multiple hard disks.

[0141] In one embodiment of the present invention, the pressure testing module 702 includes:

[0142] The second test submodule is used to power on all hard disk backplanes of the storage server according to one or more test strategies, and to power on the hard disks installed on each hard disk backplane in sequence as target hard disks to perform stress tests on the target hard disks until the last hard disk completes the stress test.

[0143] In one embodiment of the present invention, the pressure testing module 702 includes:

[0144] The third test module is used to randomly select one or more hard drives from all hard drives in the disk cluster as target hard drives for power-on according to one or more test strategies, so as to perform stress tests on the target hard drives.

[0145] The third test module is used to power down the current target hard drive after stress testing, and then perform the process of randomly selecting one or more hard drives from all hard drives in the disk cluster as the target hard drive to perform stress testing on the target hard drive again.

[0146] In one embodiment of the present invention, it further includes:

[0147] The file acquisition module is used to acquire the original file used for the stress test after the stress test is completed, and to acquire the written files for the original file from the target hard disk.

[0148] The second test result generation module is used to generate a second test result for the storage server based on the original file and the written file.

[0149] In one embodiment of the present invention, it further includes:

[0150] The hard disk information acquisition module is used to acquire the number of hard disks and the distribution of hard disks in the disk cluster, so as to select a target hard disk based on the number of hard disks and the distribution of hard disks.

[0151] In one embodiment of the present invention, the first test result generation module 703 includes:

[0152] The data comparison submodule is used to obtain the expected data and compare the circuit state data with the expected data.

[0153] The "Generate Test Results Based on Comparison" submodule is used to generate the first test result of the storage server based on the comparison results.

[0154] In one embodiment of the present invention, the storage server is configured with a disk cluster, and the storage server is used to provide expanded storage space for the primary server. The storage server is controlled to enter a cold storage mode; wherein, in the cold storage mode, the storage server defaults to all hard drives in the disk cluster.

[0155] Power is not supplied to maintain a shut-off state. While the storage server is in cold storage mode, one or more test strategies are determined, and target hard drives are selected from all hard drives in the disk cluster according to these strategies for stress testing. During the test, the circuit status data of the storage server is monitored, and a first test result for the storage server is generated based on the circuit status data. This achieves the ability to perform stress tests on some hard drives even in cold storage mode.

[0156] The power circuit of the storage server is tested while the hard drive is working, eliminating the need to test when all hard drives are working simultaneously. This improves testing efficiency and ensures the security and stability of the storage server.

[0157] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described test method for storing the memory.

[0158] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and a test method for implementing the above-mentioned storage service when the computer program is executed by a processor.

[0159] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0160] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to mutually.

[0161] That's all.

[0162] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0163] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0164] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0165] These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable terminal equipment, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0166] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0167] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements that constitute such a process, method, article, or terminal apparatus.

[0168] The elements inherent in the terminal device. Without further limitations, the elements defined by the phrase "including a..." do not exclude the process, method, article, or terminal that includes the aforementioned elements.

[0169] There are other identical elements in the terminal device.

[0170] The above provides a detailed description of the testing method, apparatus, electronic equipment, and medium for a storage service server. Specific examples have been used to illustrate the principles and implementation methods of this invention.

[0171] The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of the present invention; at the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A testing method for a storage service server, characterized in that, The storage server is configured with disk clusters and is used to provide expanded storage space for the primary server. The method includes: The storage server is controlled to enter a cold storage mode; wherein, in the cold storage mode, the storage server does not supply power to any of the hard drives in the disk cluster by default, so as to keep them in a shut-down state; When the storage server is in cold storage mode, one or more test strategies are determined, and target hard drives are selected from all hard drives in the disk cluster and powered on according to the one or more test strategies to perform stress tests on the target hard drives. During the test, the circuit status data of the storage server is monitored, and the first test result of the storage server is generated based on the circuit status data.

2. The method according to claim 1, characterized in that, The step of selecting a target hard drive from all hard drives in the disk cluster and powering it on according to one or more testing strategies to perform stress testing on the target hard drive includes: According to one or more of the aforementioned testing strategies, one hard drive is selected from all the hard drives in the disk cluster as the target hard drive for each power-on test, until the last hard drive completes the stress test.

3. The method according to claim 1, characterized in that, The storage server has a multi-hard drive backplane, and all the hard drives of the disk cluster are installed on the multi-hard drive backplane. The step of selecting a target hard drive from all the hard drives in the disk cluster and powering it on according to one or more testing strategies to perform a stress test on the target hard drive includes: According to one or more of the aforementioned testing strategies, all hard disk backplanes of the storage server are powered on, and for each hard disk backplane, the hard disks installed on it are powered on sequentially as target hard disks to perform stress tests on the target hard disks until the last hard disk completes the stress test.

4. The method according to claim 1, characterized in that, The step of selecting a target hard drive from all hard drives in the disk cluster and powering it on according to one or more testing strategies to perform stress testing on the target hard drive includes: According to one or more of the aforementioned testing strategies, one or more hard drives are randomly selected from all hard drives in the disk cluster as target hard drives and powered on to perform stress tests on the target hard drives; After stress testing the current target hard drive, power down the current target hard drive, and then perform the stress test again by randomly selecting one or more hard drives from all hard drives in the disk cluster as the target hard drive.

5. The method according to any one of claims 1-4, characterized in that, Also includes: After the stress test is completed, the original file used for the stress test is obtained, and the written files for the original file are obtained from the target hard drive. Based on the original file and the written file, a second test result for the storage server is generated.

6. The method according to claim 1, characterized in that, Before controlling the storage server to enter cold storage mode, the method further includes: The number and distribution of hard drives in the disk cluster are obtained, and a target hard drive is selected based on the number and distribution of hard drives.

7. The method according to claim 1, characterized in that, The step of generating the first test result of the storage server based on the circuit state data includes: Obtain the expected data and compare the circuit state data with the expected data; Based on the comparison results, the first test result of the storage server is generated.

8. A testing device for a storage service server, characterized in that, The storage server is configured with disk clusters and is used to provide expanded storage space for the primary server. The device includes: A cold storage mode entry module is used to control the storage server to enter cold storage mode; wherein, in the cold storage mode, the storage server does not supply power to all hard drives of the disk cluster by default, so as to keep them in a shut-down state; The stress testing module is used to determine one or more test strategies when the storage server is in cold storage mode, and select a target hard drive from all hard drives in the disk cluster according to the one or more test strategies to perform stress testing on the target hard drive. The first test result generation module is used to monitor the circuit status data of the storage server during the test and generate the first test result of the storage server based on the circuit status data.

9. An electronic device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements a test method for the storage server as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the test method for the storage server as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Testing method for Rack cabinet JBOD storage in production environment

    CN107273251A

  • Method and system for testing hard disk in server, electronic equipment and storage medium

    CN111309535A