RAID card reliability test method and device, storage medium and electronic equipment
By entering multiple NCQ and non-NCQ commands on the RAID card, the problem of limited types in existing test methods is solved, and the accuracy of test results is improved.
Patent Information
- Application Number
- CN202411170233.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-26
AI Technical Summary
In the existing RAID card reliability testing methods, the NCQ command and non-NCQ command types are limited, resulting in inaccurate test results.
Reliability tests are performed by entering a variety of NCQ commands and non-NCQ commands on the RAID card, including entering NCQ commands in the first cycle, and entering a variety of non-NCQ commands in the second cycle through the pressure measurement tool and the target interface.
The NCQ command and non-NCQ commands of the test are added, which improves the accuracy of RAID card reliability testing.
Smart Images

Figure CN119025356A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and in particular, to a reliability testing method and device for a RAID card, a storage medium, and an electronic device. Background Art
[0002] In the current testing technology, the reliability of RAID card SATA NCQ and non-NCQ command scheduling is usually verified by using the system's stress testing tools to stress test the storage link where the RAID card is located to trigger the NCQ command, and relying on the operating system's self-starting process and BMC's monitoring items for the hard disk in the existing test environment to trigger the non-NCQ command, verifying whether the RAID card's scheduling and processing of the two commands are reliable.
[0003] like Figure 2 As shown in the figure, stress testing usually uses testing tools such as fio and IOMeter to select data blocks of different sizes (usually including 4k, 8k, 16k, 32k, 64k, 128k, 256k, 512k, 1024k, 2048k), different read and write modes (usually including random read, random write, sequential read, sequential write, mixed read and write), and different threads (usually including 1, 2, 4, 8, 16, 32) to perform stress testing on the hard disk link for a certain period of time. This process mainly relies on fio and IOMeter system tools to issue SCSI read and write commands, which are converted into SATA NCQ commands, namely READ FPDMA QUEUED and WRITE FPDMAQUEUED, through the SAT protocol. The non-NCQ commands in the stress test process are mainly issued by the operating system self-startup tools (such as smarted, etc.) and peripheral devices with hard disk monitoring and management functions (such as RAID cards, BMC).
[0004] The NCQ command types tested by the above method are limited. In addition, the coverage of non-NCQ command types issued by the system self-starting process is limited, resulting in inaccurate RAID card reliability test results.
[0005] In the related art, an effective solution has not yet been proposed for the technical problem that the existing reliability test method tests limited NCQ command and non-NCQ command types, resulting in inaccurate reliability test results for RAID cards. Summary of the invention
[0006] The embodiments of the present application provide a reliability testing method and device for a RAID card, a storage medium, and an electronic device, so as to at least solve the problem in the related art that the existing reliability testing method tests limited NCQ commands and non-NCQ command types, resulting in inaccurate reliability test results for the RAID card.
[0007] According to an embodiment of the present application, a reliability testing method for a RAID card is provided, comprising: inputting a first NCQ command to the RAID card according to a first cycle, and inputting a second NCQ command to the RAID card through a stress testing tool; inputting a plurality of non-NCQ commands to the RAID card through a target interface according to a second cycle; and performing a reliability test on the RAID card according to the first NCQ command, the second NCQ command, and the plurality of non-NCQ commands, wherein the reliability test is used to test the reliability of the RAID card in processing the first NCQ command, the second NCQ command, and the plurality of non-NCQ commands.
[0008] In an exemplary embodiment, inputting the first NCQ command to the RAID card according to the first cycle includes: selecting a target sub-NCQ command from a third NCQ command according to a SATA protocol, wherein the third NCQ command includes multiple sub-NCQ commands, and the multiple sub-NCQ commands include the target sub-NCQ command; formatting the target sub-NCQ command according to the SATA protocol to obtain the first NCQ command; creating a file system in a target system, wherein the target system includes the RAID card; setting a mount point of the file system by modifying a configuration file of the target system, and writing the first NCQ command to the file system; restarting the target system to mount the file system to the mount point; adding scheduled task information in the file system according to the first cycle, wherein the scheduled task information is used to set a scheduled task for the target system, and the scheduled task is used to input the first NCQ command to the RAID card; restarting the target service by executing a preset instruction, and executing the scheduled task according to the first cycle through the target service.
[0009] In an exemplary embodiment, inputting the second NCQ command to the RAID card through the stress testing tool includes: randomly combining multiple data blocks, multiple read / write modes, and multiple threads to obtain multiple combinations, wherein the multiple data blocks have different sizes and the multiple threads have different numbers of threads; generating multiple second NCQ commands according to the multiple combinations through the stress testing tool, and inputting the multiple second NCQ commands to the RAID card at preset time intervals, wherein the multiple combinations correspond one-to-one to the multiple second NCQ commands.
[0010] In an exemplary embodiment, the inputting multiple non-NCQ commands to the RAID card through the target interface according to the second cycle includes: obtaining the multiple non-NCQ commands; generating a target script according to the second cycle, the target interface and the multiple non-NCQ commands; and inputting the multiple non-NCQ commands to the RAID card through the target interface according to the second cycle by executing the target script.
[0011] In an exemplary embodiment, obtaining the multiple non-NCQ commands includes: calling a patrol read process service, wherein the patrol read process service is used to issue multiple first non-NCQ commands; format converting the multiple first non-NCQ commands according to the SATA protocol to obtain a second non-NCQ command, wherein the multiple non-NCQ commands include the second non-NCQ command.
[0012] In an exemplary embodiment, obtaining the multiple non-NCQ commands includes: calling a target command to obtain a third non-NCQ command, wherein the target command includes one of the following: a hard disk information check command, a hard disk SMART information acquisition command, and the multiple non-NCQ commands include the third non-NCQ command.
[0013] In an exemplary embodiment, after performing reliability testing on the RAID card according to the first NCQ command, the second NCQ command and the multiple non-NCQ commands, the method further includes: obtaining reliability test results; when the reliability test results indicate that the RAID card has a firmware hang, determining that the RAID card has a first problem; when the reliability test results indicate that the RAID card has timed out from executing a command, determining that the RAID card has a second problem.
[0014] According to another embodiment of the present application, a reliability testing device for a RAID card is provided, comprising: a first input module, used to input a first NCQ command to the RAID card according to a first cycle, and to input a second NCQ command to the RAID card through a stress testing tool; a second input module, used to input a plurality of non-NCQ commands to the RAID card through a target interface according to a second cycle; and a testing module, used to perform a reliability test on the RAID card according to the first NCQ command, the second NCQ command and the plurality of non-NCQ commands, wherein the reliability test is used to test the reliability of the RAID card in processing the first NCQ command, the second NCQ command and the plurality of non-NCQ commands.
[0015] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0016] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0017] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0018] Through the present application, a first NCQ command is input into the RAID card according to a first cycle, and a second NCQ command is input into the RAID card through a stress testing tool; then, a plurality of non-NCQ commands are input into the RAID card through a target interface according to a second cycle; thereby, a reliability test is performed on the RAID card according to the first NCQ command, the second NCQ command and the plurality of non-NCQ commands, and the reliability test is used to test the reliability of the RAID card in processing these commands; by adopting the above scheme, additional NCQ commands and non-NCQ commands are issued during the reliability test, so that the reliability test result of the RAID card is more accurate; thereby solving the problem in the related art that the types of NCQ commands and non-NCQ commands tested by the existing reliability test method are limited, resulting in inaccurate reliability test results of the RAID card. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a hardware structure block diagram of a computer terminal of a reliability testing method of a RAID card according to an embodiment of the present application;
[0020] Figure 2 It is a flow chart of an optional RAID card NCQ and non-NCQ command scheduling test method according to an embodiment of the present application (I);
[0021] Figure 3 is a schematic diagram comparing an optional sequential command and an NCQ command according to an embodiment of the present application;
[0022] Figure 4 is a flow chart of an optional reliability test of a RAID card according to an embodiment of the present application;
[0023] Figure 5 It is a flow chart (II) of an optional RAID card NCQ and non-NCQ command scheduling test method according to an embodiment of the present application;
[0024] Figure 6 It is a flow chart of an optional RAID card NCQ and non-NCQ command scheduling test method according to an embodiment of the present application (III);
[0025] Figure 7 It is a structural block diagram of an optional RAID card reliability testing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0028] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of a RAID card reliability test method according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the reliability test method of the RAID card in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 1 02, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] The following is an explanation of the professional terms that appear in this application:
[0032] ATA, Advanced Technology Attachment, advanced technology attachment;
[0033] SATA, Serail ATA, Serial Advanced Technology Attachment;
[0034] HDD, Hard Disk Drive, hard disk drive;
[0035] SSD, Solid State Drive, solid state drive;
[0036] RAID, Redundant Arrays of Independent Disks, Redundant Array of Independent Disks;
[0037] NC Q, Native Command Queuing, local command sorting;
[0038] I / O, Input / Output, input / output;
[0039] SCSI, Small Computer System Interface, small computer system interface;
[0040] BMC, Baseboard Management Controller, baseboard management controller;
[0041] SAT, SCSI / ATA Translation, Small Computer System Interface / Advanced Technology Attachment Translation;
[0042] SMART, Self-monitoring analysis and reporting technology, self-monitoring, analysis and reporting technology;
[0043] CDB, Command Descriptor Block, command descriptor block.
[0044] In the early computer environment, software and most ATA drives were designed to execute only one command at a time, which means that once the ATA drive completes a command, the drive remains idle for a relatively long time before the next command comes. Even if the ATA drive has a higher transfer rate on the ATA bus, the ATA transfer rate advantage is not reflected because a given command must be completed before the next command is sent.
[0045] When software supports asynchronous I / 0, it can issue (queue) one or more subsequent commands before the current command is completed, reducing the time the drive remains idle between commands. This technique is often referred to as software queuing. Due to the design limitation that ATA drives can only execute one command at a time, software is still limited to sending the next command to standard ATA drives only after the previous command is completed.
[0046] Better performance would be achieved if the drive also supported command queuing. That is, the drive is designed to queue commands internally, reducing the delay between completing one command and starting the next. Today's SATA hard drives based on SATA II usually support native command queuing, or NCQ, which can receive multiple commands and sort them, reducing latency and improving drive performance.
[0047] Taking SATA HDD as an example, NCQ schedules the next command to be executed in the shortest time required to reach the target based on the algorithm inside the hard disk, rather than executing it according to the order of commands, thereby reducing the average seek time and significantly improving the performance of the hard disk drive. Figure 3Two different command sequences for reading the contents of four target sectors of a SATA HDD are shown. The left picture shows the sequential reading method, that is, the target sectors are accessed in the order starting from sector 1, and the contents are read in the order of sector 1, sector 2, sector 3 to sector 4; the right picture shows the NCQ method, that is, the target sectors are accessed in the order starting from sector 1, and the contents are read in the order of sector 1, sector 3, sector 2 to sector 4.
[0048] This example shows that in both sequential command execution and NCQ modes, NCQ can significantly reduce the number of mechanical movements of the disk and the addressing time of the head, thereby improving the performance of the drive.
[0049] Drives, RAID cards, and software must all be designed to support NCQ. The NCQ commands defined in SATA III include READ FPDMA QUEUED, WRITE FPDMA QUEUED, NCQ NON-DATA, RECEIBVEFPDMA, and SEND FPDMAQUEUED.
[0050] It should be noted that the SATA III protocol stipulates that the host should not issue a non-local queued command when the local queued command is not completed. When a non-local queued command is received and the local queued command is not completed, the device should send an error condition signal to the host.
[0051] The existing test technology runs Fio and IOMeter tools and only issues two NCQ commands, READ FPDMA QUEUED and WRITE FPDMA QUEUED. In addition, the current non-NCQ commands are only issued by the system self-start process and BMC, resulting in limited coverage of NCQ commands and non-NCQ command types. In order to solve this problem, a reliability test method for a RAID card is provided in this embodiment, which is applied to a computer terminal. Figure 4 is a flow chart of a reliability testing method for a RAID card according to an embodiment of the present application, such as Figure 4 As shown, the process includes the following steps:
[0052] Step S402, inputting a first NCQ command to the RAID card according to a first cycle, and inputting a second NCQ command to the RAID card through a stress testing tool;
[0053] Step S404, inputting a plurality of non-NCQ commands to the RAID card through the target interface according to the second cycle;
[0054] Step S406: Perform a reliability test on the RAID card according to the first NCQ command, the second NCQ command and the multiple non-NCQ commands, wherein the reliability test is used to test the reliability of the RAID card in processing the first NCQ command, the second NCQ command and the multiple non-NCQ commands.
[0055] Through the above steps, a first NCQ command is input into the RAID card according to a first cycle, and a second NCQ command is input into the RAID card through a stress testing tool; then, a plurality of non-NCQ commands are input into the RAID card through a target interface according to a second cycle; thereby, a reliability test is performed on the RAID card according to the first NCQ command, the second NCQ command and the plurality of non-NCQ commands, and the reliability test is used to test the reliability of the RAID card in processing these commands; by adopting the above scheme, additional NCQ commands and non-NCQ commands are issued during the reliability test, so that the reliability test result of the RAID card is more accurate; thereby solving the problem in the related art that the types of NCQ commands and non-NCQ commands tested by the existing reliability test method are limited, resulting in inaccurate reliability test results of the RAID card.
[0056] The execution subject of the above steps may be a computer terminal, etc., but is not limited thereto.
[0057] The execution order of step S402 and step S404 is interchangeable, that is, step S404 may be executed first, and then step S402.
[0058] In an exemplary embodiment, inputting the first NCQ command to the RAID card according to the first cycle includes: selecting a target sub-NCQ command from a third NCQ command according to a SATA protocol, wherein the third NCQ command includes multiple sub-NCQ commands, and the multiple sub-NCQ commands include the target sub-NCQ command; formatting the target sub-NCQ command according to the SATA protocol to obtain the first NCQ command; creating a file system in a target system, wherein the target system includes the RAID card; setting a mount point of the file system by modifying a configuration file of the target system, and writing the first NCQ command to the file system; restarting the target system to mount the file system to the mount point; adding scheduled task information in the file system according to the first cycle, wherein the scheduled task information is used to set a scheduled task for the target system, and the scheduled task is used to input the first NCQ command to the RAID card; restarting the target service by executing a preset instruction, and executing the scheduled task according to the first cycle through the target service.
[0059] First, it is necessary to confirm the SEND FPDMA QUEUED NCQ command (i.e., the first NCQ command mentioned above), and in combination with the SATA protocol, refer to the several sub-commands shown in Table 1, and select the more commonly used DATASET MANAGEMENT sub-command (i.e., the target sub-NCQ command mentioned above) from the SEND FPDMA QUEUED NCQ command as the issuing command. Then, in combination with the SATA protocol, refer to Table 2, and the issued DATA SET MANAGEMENT command is converted into a SCSI U NMAP command (i.e., the first NCQ command mentioned above) through the protocol.
[0060] Table 1
[0061] Table 111-Subcommands for SEND FPDMA QUEUED
[0062]
[0063] Table 2Table 12-Summary of SCSI / ATA commmand mapping(part3of3)
[0064]
[0065] Then send the SEND FPDMA QUEUED NCQ command. In the Linux operating system, the UNMAP command can be started on the SATA SSD hard disk through the system fstrim tool / service. The specific operations are as follows:
[0066] 1. Create ext4 file systems (i.e. the above file systems) for the SSD drive letters under the system. You can use the method: mkfs.ext4 / dev / sdx;
[0067] 2. Modify fstable, set the mount point, use the blkid command to read the UUID of the disk, edit the / etc / fstab file and add the above command;
[0068] 3. Restart the machine and mount automatically;
[0069] 4. Add the system fstrim.service scheduled task (for example, run it every 20 minutes, which is the first cycle mentioned above):
[0070] 4.1. Execute the crontab -e command, press Enter, and then add "* / 20****systemctl restart fstrim.service" to the last line of the file;
[0071] 4.2. Execute the systemctl restart cron.service command (the above preset instruction) to restart the cron service (the above target service). After restarting, the scheduled task will take effect.
[0072] Through this embodiment, the SEND FPDMA QUEUED NCQ command is sent to the RAID card, and the types of NCQ commands are expanded.
[0073] Optionally, inputting the second NCQ command to the RAID card through the stress testing tool includes: randomly combining multiple data blocks, multiple read and write modes, and multiple threads to obtain multiple combinations, wherein the multiple data blocks have different sizes and the multiple threads have different numbers of threads; generating multiple second NCQ commands according to the multiple combinations through the stress testing tool, and inputting the multiple second NCQ commands to the RAID card at preset time intervals, wherein the multiple combinations correspond one-to-one to the multiple second NCQ commands.
[0074] Stress testing usually uses testing tools such as fio and IOMeter, and selects data blocks of different sizes (usually including 4k, 8k, 16k, 32k, 64k, 128k, 256k, 512k, 1024k, and 2048k), different read and write modes (usually including random read, random write, sequential read, sequential write, and mixed read and write), and different threads (usually including 1, 2, 4, 8, 16, and 32) to perform stress testing on the hard disk link for a certain period of time. By randomly combining data blocks of different sizes, different read and write modes, and different threads, a large number of different NCQ commands are generated, that is, the multiple second NCQ commands mentioned above.
[0075] Through this embodiment, a large number of different NCQ commands are generated by random combination to meet the test requirements.
[0076] Furthermore, the inputting of multiple non-NCQ commands to the RAID card through the target interface according to the second cycle includes: acquiring the multiple non-NCQ commands; generating a target script according to the second cycle, the target interface and the multiple non-NCQ commands; and inputting the multiple non-NCQ commands to the RAID card through the target interface according to the second cycle by executing the target script.
[0077] This embodiment first obtains multiple non-NCQ commands from other channels, and then controls the frequency of issuing non-NCQ commands by adding a system shell script to issue these non-NCQ commands. Optionally, the frequency of issuing can be controlled by using sleep, and the number of issuing can be controlled by using a for loop. The following is a reference to the script content:
[0078]
[0079] Where n is the number of times the control command is required to be issued, and m is the frequency of the control command required to be issued, in seconds.
[0080] In this embodiment, non-NCQ commands are sent using a passthrough path method. The RAID card management tool storelibtest has an interface (ie, the target interface) that supports sending SCSI passthrough commands, and common non-NCQ commands can be sent through the interface.
[0081] Through this embodiment, by increasing the frequency of non-NCQ command issuance controlled by the system shell script, the problem of low issuance frequency of non-NCQ commands in the related art is solved.
[0082] Optionally, obtaining the multiple non-NCQ commands includes: calling a patrol read process service, wherein the patrol read process service is used to issue multiple first non-NCQ commands; format converting the multiple first non-NCQ commands according to the SATA protocol to obtain a second non-NCQ command, wherein the multiple non-NCQ commands include the second non-NCQ command.
[0083] Patrol Read is a background service of the RAID card itself, which is designed to proactively discover and correct bad sectors that usually appear when the hard drive ages. The service issues a series of SCSI VERIFY commands (i.e., the multiple first non-NCQ commands mentioned above), which are converted into READ VERIFY SECTORS EXT non-NCQ commands (i.e., the second non-NCQ command mentioned above) through the SATA protocol.
[0084] Optionally, obtaining the multiple non-NCQ commands includes: calling a target command to obtain a third non-NCQ command, wherein the target command includes one of the following: a hard disk information check command, a hard disk SMART information acquisition command, and the multiple non-NCQ commands include the third non-NCQ command.
[0085] 1. Common monitoring commands add commands for viewing hard disk information. This command is often used by users to query or monitor hard disk related information. Commands for viewing hard disk information include the IDENTIFY DEVICE non-NCQ command: storcli64 / c0 / eall / sall show all;
[0086] 2. Hard disk SMART information acquisition command. SMART is the SATA hard disk self-monitoring, analysis and reporting technology. It is a commonly used hard disk health status monitoring command, including the SMART READ DATA non-NCQ command: storcli / c0 / eall / sallshowsmart.
[0087] Through the above two embodiments, some non-NCQ command mining methods are provided to obtain more non-NCQ commands, thereby making the types of non-NCQ commands used for reliability testing more comprehensive.
[0088] Optionally, after performing reliability testing on the RAID card according to the first NCQ command, the second NCQ command and the multiple non-NCQ commands, the method further includes: obtaining reliability test results; when the reliability test results indicate that the RAID card has a firmware hang, determining that the RAID card has a first problem; when the reliability test results indicate that the RAID card has timed out from executing a command, determining that the RAID card has a second problem.
[0089] If the RAID card has a firmware hang problem and restarts during the test, it means that the RAID card has a problem with the scheduling of SATA NCQ and non-NCQ commands and caused the firmware to hang (that is, the first problem mentioned above). If the RAID card prints a 28h CDB command timeout during the test, it means that the RAID card has a problem with the scheduling of SATA NCQ and non-NCQ commands and caused the command to time out.
[0090] In an optional embodiment, the present application proposes an optional RAID card SATA NCQ and non-NCQ scheduling reliability test method, the process is as follows: Figure 5 As shown, in this embodiment, only the NCQ command issuance is extended, including the following steps:
[0091] 5.1. Build a server equipped with a RAID controller, multiple SATA hard disks (including multiple SATA HDDs and multiple SATA SSDs), form a single-disk RAIDO, and install the RedHat operating system;
[0092] 5.2. SEND FPDMA QUEUED NCQ command confirmation;
[0093] 5.3. SEND FPDMA QUEUED NCQ command is issued;
[0094] 5.4. Run the fio stress test and enter the NCQ commands READ FPDMA QUEUED and WRITE FPDMA QUEUED.
[0095] 5.5. The operating system, BMC or other self-starting processes send non-NCQ commands, and the RAID card starts the reliability test;
[0096] 5.6. Analyze the test results.
[0097] Conventional testing technologies and methods can only test the reliability of the RAID card's scheduling and processing of the two NCQ commands READ FPDMA QUEUED and WRITE FPDMA QUEUED and other non-NCQ commands. This embodiment adds a method for issuing the SEND FPDMA QUEUED NCQ command through research and application of the protocol specification definition, thereby improving the NCQ command test coverage.
[0098] In another optional embodiment, the present application proposes another optional RAID card SATA NCQ and non-NCQ scheduling reliability test method, the process of which is as follows: Figure 6 As shown, in this embodiment, only the non-NCQ command issuing process is improved, including the following steps:
[0099] 6.1. Build a server equipped with a RAID controller and multiple SATA hard disks, set up multiple RAID groups, including RAID1, RAID5, RAID6 and other different levels of RAID groups, and install the RedHat operating system;
[0100] 6.2. Run the fio stress test and enter the NCQ commands READ FPDMA QUEUED and WRITE FPDMA QUEUED.
[0101] 6.3. Call the common monitoring commands, Smart information acquisition commands and patrol reading process services of the RAID card management tool to increase the types and number of non-NCQ commands:
[0102] 1) Common monitoring commands include the command to view hard disk information. This command is often used by users to query or monitor hard disk related information. The command to view hard disk information includes the IDENTIFY DEVICE non-NCQ command: storcli64 / c0 / eall / sall show all;
[0103] 2) Hard disk SMART information acquisition command. SMART is the SATA hard disk self-monitoring, analysis and reporting technology. It is a commonly used hard disk health status monitoring command, including SMART READ DATA non-NCQ command: Storcli / c0 / eall / sall showsmart;
[0104] 3) Patrol read is a background service of the RAID card itself, which is designed to proactively discover and correct bad sectors that usually appear when the hard disk drive ages. The service issues a series of SCSI VERIFY commands, which are converted into READVERIFYSECTORS EXT non-NCQ commands via the SAT protocol: Storcli64 / c0start patrolread.
[0105] 6.4. Passthrough path method for non-NCQ commands:
[0106] The RAID card management tool storelibtest has an interface that supports issuing SCSI passthrough commands. Common non-NCQ commands can be issued through this interface.
[0107] 6.5. Conduct testing;
[0108] 6.6. Analyze the test results.
[0109] Through this embodiment, the non-NCQ commands issued by the system self-starting process and BMC are expanded to IDENTIFY DEVICE, SMART READ DATA, READ VERIFY SECTORS EXT and CHECKPOWER MODE, etc., and flexible control of the frequency of issuing non-NCQ commands is achieved; on the other hand, by studying SATA, SAT, and ATA related protocols, this embodiment can send specific non-NCQ commands to the RAID card from the paSsthrough interface, thereby achieving targeted and accurate testing of any non-NCQ command.
[0110] 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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0111] In this embodiment, a reliability test device for a RAID card is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0112] Figure 7 is a structural block diagram of a reliability test device for a RAID card according to an embodiment of the present application, such as Figure 7 As shown, the device comprises:
[0113] A first input module 72, configured to input a first NCQ command to the RAID card according to a first cycle, and to input a second NCQ command to the RAID card through a stress testing tool;
[0114] A second input module 74, configured to input a plurality of non-NCQ commands to the RAID card through a target interface according to a second cycle;
[0115] The testing module 76 is used to perform a reliability test on the RAID card according to the first NCQ command, the second NCQ command and the multiple non-NCQ commands, wherein the reliability test is used to test the reliability of the RAID card in processing the first NCQ command, the second NCQ command and the multiple non-NCQ commands.
[0116] Through the above-mentioned device, a first NCQ command is input into the RAID card according to a first cycle, and a second NCQ command is input into the RAID card through a stress testing tool; then, a plurality of non-NCQ commands are input into the RAID card through a target interface according to a second cycle; thereby, a reliability test is performed on the RAID card according to the first NCQ command, the second NCQ command and the plurality of non-NCQ commands, and the reliability test is used to test the reliability of the RAID card in processing these commands; by adopting the above-mentioned scheme, the issuance of additional NCQ commands and non-NCQ commands is added during the reliability test process, so that the reliability test result of the RAID card is more accurate; thereby solving the problem in the related art that the types of NCQ commands and non-NCQ commands tested by the existing reliability test method are limited, resulting in inaccurate reliability test results of the RAID card.
[0117] Optionally, the first input module 72 is further used to select a target sub-NCQ command from a third NCQ command according to the SATA protocol, wherein the third NCQ command includes multiple sub-NCQ commands, and the multiple sub-NCQ commands include the target sub-NCQ command; convert the format of the target sub-NCQ command according to the SATA protocol to obtain the first NCQ command; create a file system in a target system, wherein the target system includes the RAID card; set the mount point of the file system by modifying the configuration file of the target system, and write the first NCQ command to the file system; restart the target system to mount the file system to the mount point; add scheduled task information in the file system according to the first cycle, wherein the scheduled task information is used to set a scheduled task for the target system, and the scheduled task is used to input the first NCQ command to the RAID card; restart the target service by executing a preset instruction, and execute the scheduled task according to the first cycle through the target service.
[0118] Optionally, the first input module 72 is further used to randomly combine multiple data blocks, multiple read / write modes and multiple threads to obtain multiple combinations, wherein the sizes of the multiple data blocks are different and the number of threads of the multiple threads is different; generate multiple second NCQ commands according to the multiple combinations through the stress testing tool, and input the multiple second NCQ commands into the RAID card at a preset time interval, wherein the multiple combinations correspond one-to-one to the multiple second NCQ commands.
[0119] Optionally, the second input module 74 is further used to obtain the multiple non-NCQ commands; generate a target script according to the second cycle, the target interface and the multiple non-NCQ commands; and input the multiple non-NCQ commands to the RAID card through the target interface according to the second cycle by executing the target script.
[0120] Optionally, the second input module 74 is further used to call a patrol read process service, wherein the patrol read process service is used to issue multiple first non-NCQ commands; convert the format of the multiple first non-NCQ commands according to the SATA protocol to obtain a second non-NCQ command, wherein the multiple non-NCQ commands include the second non-NCQ command.
[0121] Optionally, the second input module 74 is further used to call a target command to obtain a third non-NCQ command, wherein the target command includes one of the following: a hard disk information check command, a hard disk SMART information acquisition command, and the multiple non-NCQ commands include the third non-NCQ command.
[0122] Optionally, the above-mentioned test module 76 is also used to obtain reliability test results; when the reliability test results indicate that the RAID card has a firmware hang, it is determined that the RAID card has a first problem; when the reliability test results indicate that the RAID card has timed out from executing a command, it is determined that the RAID card has a second problem.
[0123] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0124] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0125] In an exemplary embodiment, the 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.
[0126] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0127] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0128] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0129] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0130] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0131] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A reliability test method for a RAID card. It is characterized in that include: Inputting a first NCQ command to the RAID card according to a first cycle, and inputting a second NCQ command to the RAID card through a stress testing tool; inputting a plurality of non-NCQ commands to the RAID card through the target interface according to a second cycle; A reliability test is performed on the RAID card according to the first NCQ command, the second NCQ command and the multiple non-NCQ commands, wherein the reliability test is used to test the reliability of the RAID card in processing the first NCQ command, the second NCQ command and the multiple non-NCQ commands.
2. The method according to claim 1, It is characterized in that The step of inputting the first NCQ command to the RAID card according to the first cycle includes: Selecting a target sub-NCQ command from a third NCQ command according to the SATA protocol, wherein the third NCQ command includes a plurality of sub-NCQ commands, and the plurality of sub-NCQ commands include the target sub-NCQ command; Convert the target sub-NCQ command into a format according to the SATA protocol to obtain the first NCQ command; Creating a file system in a target system, wherein the target system includes the RAID card; Setting a mount point of the file system by modifying a configuration file of the target system, and writing the first NCQ command into the file system; Restarting the target system to mount the file system to the mount point; Adding scheduled task information in the file system according to the first cycle, wherein the scheduled task information is used to set a scheduled task for the target system, and the scheduled task is used to input the first NCQ command to the RAID card; The target service is restarted by executing a preset instruction, and the scheduled task is executed according to the first period by the target service.
3. The method according to claim 1, It is characterized in that The inputting the second NCQ command to the RAID card through the stress testing tool includes: Randomly combining multiple data blocks, multiple read / write modes, and multiple threads to obtain multiple combinations, wherein the multiple data blocks have different sizes and the multiple threads have different numbers of threads; The stress testing tool generates a plurality of second NCQ commands according to the plurality of combinations, and inputs the plurality of second NCQ commands into the RAID card at preset time intervals, wherein the plurality of combinations correspond one-to-one to the plurality of second NCQ commands.
4. The method according to claim 1, It is characterized in that Inputting a plurality of non-NCQ commands to the RAID card through the target interface according to the second cycle includes: Obtaining the multiple non-NCQ commands; generating a target script according to the second period, the target interface, and the plurality of non-NCQ commands; By executing the target script, the multiple non-NCQ commands are input to the RAID card through the target interface according to the second cycle.
5. The method according to claim 4, It is characterized in that The obtaining of the multiple non-NCQ commands includes: Calling a patrol reading process service, wherein the patrol reading process service is used to issue a plurality of first non-NCQ commands; The format of the multiple first non-NCQ commands is converted according to the SATA protocol to obtain a second non-NCQ command, wherein the multiple non-NCQ commands include the second non-NCQ command.
6. The method according to claim 4, It is characterized in that The obtaining of the multiple non-NCQ commands includes: The target command is called to obtain a third non-NCQ command, wherein the target command includes one of the following: a hard disk information viewing command, a hard disk SMART information acquisition command, and the multiple non-NCQ commands include the third non-NCQ command.
7. The method according to claim 1, It is characterized in that After performing reliability testing on the RAID card according to the first NCQ command, the second NCQ command, and the multiple non-NCQ commands, the method further includes: Obtain reliability test results; When the reliability test result indicates that the firmware of the RAID card is hung, determining that the RAID card has a first problem; When the reliability test result indicates that the RAID card times out in executing a command, it is determined that the RAID card has a second problem.
8. A reliability test device for a RAID card, It is characterized in that include: A first input module, used to input a first NCQ command to the RAID card according to a first cycle, and to input a second NCQ command to the RAID card through a stress testing tool; a second input module, used to input a plurality of non-NCQ commands to the RAID card through the target interface according to a second cycle; and a test module, used to perform a reliability test on the RAID card according to the first NCQ command, the second NCQ command and the plurality of non-NCQ commands, wherein the reliability test is used to test the reliability of the RAID card in processing the first NCQ command, the second NCQ command and the plurality of non-NCQ commands.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
