CN112256504A - Method, system and device for testing hard disk state indicator lamp - Google Patents

Method, system and device for testing hard disk state indicator lamp Download PDF

Info

Publication number
CN112256504A
CN112256504A CN202011097066.9A CN202011097066A CN112256504A CN 112256504 A CN112256504 A CN 112256504A CN 202011097066 A CN202011097066 A CN 202011097066A CN 112256504 A CN112256504 A CN 112256504A
Authority
CN
China
Prior art keywords
hard disk
target
raid card
testing
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011097066.9A
Other languages
Chinese (zh)
Other versions
CN112256504B (en
Inventor
楚日娅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202011097066.9A priority Critical patent/CN112256504B/en
Publication of CN112256504A publication Critical patent/CN112256504A/en
Application granted granted Critical
Publication of CN112256504B publication Critical patent/CN112256504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested

Abstract

The invention discloses a method, a system and a device for testing a hard disk state indicator light.A first hard disk directly connected with a server and a second hard disk connected with the server through an RAID card are automatically distinguished according to interface connection information of the server after a hard disk indicator light test instruction of the server is received; acquiring first hard disk information of different interfaces of a server, and sequentially and autonomously testing status indicator lamps of each first hard disk based on the first hard disk information according to a preset hard disk direct connection testing strategy; and acquiring second hard disk information under the RAID card, and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk test strategy. Therefore, the state indicator lamp of each hard disk of the server can be automatically tested, the state indicator lamp testing method and the device are suitable for the test conditions of the indicator lamps of the hard disks in different connection modes, the working efficiency is high, the condition of missed test and misdetection can be avoided, and the testing accuracy is high.

Description

Method, system and device for testing hard disk state indicator lamp
Technical Field
The invention relates to the field of hard disk testing, in particular to a method, a system and a device for testing a hard disk status indicator lamp.
Background
Currently, a server system is connected with a plurality of hard disks, such as NVME (Non-Volatile Memory express) hard disks, and each hard disk is provided with a plurality of indicator lamps. In the prior art, when the indicator lamps on the hard disks are tested, a manual testing mode is usually adopted for testing, namely, a plurality of indicator lamps of each hard disk are manually tested, so that time and labor are wasted, and the condition of missing test and misdetection is easy to occur.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a method, a system and a device for testing hard disk status indicator lamps, which can automatically test the status indicator lamps of each hard disk of a server, are suitable for the test conditions of the indicator lamps of the hard disks in different connection modes, have higher working efficiency, avoid the condition of missing test and error test and have higher test accuracy.
In order to solve the technical problem, the invention provides a method for testing a hard disk status indicator lamp, which comprises the following steps:
after a hard disk indicator lamp test instruction of a server is received, a first hard disk directly connected with the server and a second hard disk connected with the server through a RAID card are automatically distinguished according to interface connection information of the server;
acquiring first hard disk information of different interfaces of the server, and sequentially and autonomously testing the status indicator lamps of the first hard disks based on the first hard disk information according to a preset hard disk direct connection testing strategy;
and acquiring second hard disk information under the RAID card, and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk test strategy.
Preferably, the process of obtaining first hard disk information of the server at different interfaces, and sequentially performing autonomous test on status indicator lamps of each first hard disk based on the first hard disk information according to a preset hard disk direct connection test strategy includes:
acquiring hard disk names of first hard disks under different interfaces of the server, and sequentially placing the hard disk names into an FIFO queue;
and sequentially taking out the hard disk names from the FIFO queue, and carrying out autonomous test on the status indicator lamp of the first hard disk corresponding to the currently taken-out hard disk name according to a preset hard disk direct connection test strategy.
Preferably, the status indicator lamp of the hard disk of the server includes a locate lamp for locating the hard disk, an offline lamp for representing an offline status of the hard disk, and an Initial lamp for representing an initialization status of the hard disk;
correspondingly, the preset process of the preset hard disk direct connection test strategy comprises the following steps:
performing Locate operation, Offline operation, Online operation and Initialization operation on each directly connected hard disk in the server respectively;
when the target direct connection hard disk is subjected to indicator lamp operation, controlling a display screen to display hard disk information of the target direct connection hard disk and specific indicator lamp operation currently carried out by the target direct connection hard disk so as to judge whether the state of the target direct connection hard disk is normal or not by prompting and observing the light state of a corresponding state indicator lamp through the display screen; and the target direct connection hard disk is any one direct connection hard disk.
Preferably, the process of obtaining the information of the second hard disks under the RAID card and sequentially performing the autonomous test on the status indicator lamps of the second hard disks based on the information of the second hard disks according to a preset test strategy of the RAID card hard disks includes:
acquiring relevant information of the RAID card, and storing the relevant information of the RAID card into a log file;
reading keywords from the log file to obtain a second hard disk serial number and the number of second hard disks under the RAID card;
and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the serial numbers of the second hard disks and the quantity of the second hard disks according to a preset RAID card hard disk test strategy.
Preferably, the status indicator lamp of the hard disk of the server includes a locate lamp for locating the hard disk, an offline lamp for representing an offline status of the hard disk, and an Initial lamp for representing an initialization status of the hard disk;
correspondingly, the preset process of presetting the RAID card hard disk test strategy includes:
judging whether the hard disks under the RAID card are RAID groups or not based on the information related to the RAID card;
if so, respectively performing Locate operation, Offline operation and Online operation on each hard disk under the RAID card; then deleting the RAID of the hard disk group under the RAID card, and respectively carrying out Initialization operation on each hard disk under the RAID card;
if not, respectively carrying out Initialization operation on each hard disk under the RAID card; then, performing Locate operation, Offline operation and Online operation on each hard disk under the RAID card by using the RAID of the hard disk group under the RAID card;
when the target RAID card hard disk is subjected to indicator lamp operation, controlling a display screen to display the hard disk information of the target RAID card hard disk and the specific indicator lamp operation currently performed by the target RAID card hard disk so as to judge whether the state of the target RAID card hard disk is normal or not by prompting and observing the light state of a corresponding state indicator lamp through the display screen; and the target RAID card hard disk is any hard disk under the RAID card.
Preferably, the method for testing the hard disk status indicator lamp further includes:
when a target hard disk is subjected to target indicator lamp operation, storing an operation result into a log file; the target hard disk is any hard disk on the server; the target indicator light operation is any indicator light operation; the target indicator light operation is any indicator light operation;
reading keywords from the log file to judge whether the target hard disk successfully executes target indicator lamp operation;
if so, determining that the target hard disk successfully executes the target indicator light operation;
if not, determining that the target hard disk fails to execute the target indicator light operation.
Preferably, the method for testing the hard disk status indicator lamp further includes:
and if the target hard disk successfully executes all the indicator light operations, determining that the status indicator light of the target hard disk is successfully tested.
In order to solve the above technical problem, the present invention further provides a system for testing a hard disk status indicator, comprising:
the hard disk distinguishing module is used for automatically distinguishing a first hard disk directly connected with the server and a second hard disk connected with the server through an RAID card according to interface connection information of the server after receiving a hard disk indicator lamp test instruction of the server;
the first testing module is used for acquiring first hard disk information under different interfaces of the server and sequentially and autonomously testing the status indicator lamps of the first hard disks based on the first hard disk information according to a preset hard disk direct connection testing strategy;
and the second testing module is used for acquiring second hard disk information under the RAID card and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk testing strategy.
Preferably, the test system of the hard disk status indicator lamp further includes:
the result storage module is used for storing the operation result into a log file when the target hard disk is subjected to target indicator lamp operation; the target hard disk is any hard disk on the server;
the operation judgment module is used for reading keywords from the log file so as to judge whether the target hard disk successfully executes the target indicator lamp operation; if yes, executing a success determining module; if not, executing a failure determining module;
the success determining module is used for determining that the target hard disk successfully executes the target indicator light operation;
and the failure determining module is used for determining that the target hard disk fails to execute the target indicator light operation.
In order to solve the above technical problem, the present invention further provides a device for testing a hard disk status indicator, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of any one of the hard disk state indicator lamp testing methods when executing the computer program.
The invention provides a test method of a hard disk state indicator lamp, which is characterized in that after a hard disk indicator lamp test instruction of a server is received, a first hard disk directly connected with the server and a second hard disk connected with the server through an RAID card are automatically distinguished according to interface connection information of the server; acquiring first hard disk information of different interfaces of a server, and sequentially and autonomously testing status indicator lamps of each first hard disk based on the first hard disk information according to a preset hard disk direct connection testing strategy; and acquiring second hard disk information under the RAID card, and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk test strategy. Therefore, the state indicator lamp of each hard disk of the server can be automatically tested, the state indicator lamp testing method and the device are suitable for the test conditions of the indicator lamps of the hard disks in different connection modes, the working efficiency is high, the condition of missed test and misdetection can be avoided, and the testing accuracy is high.
The invention also provides a system and a device for testing the hard disk state indicator lamp, and the system and the device have the same beneficial effects as the testing method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a method for testing a hard disk status indicator according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a test system of a hard disk status indicator lamp according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a method, a system and a device for testing the status indicator lamps of the hard disks of the server, which can automatically test the status indicator lamps of the hard disks of the server, are suitable for the test conditions of the status indicator lamps of the hard disks in different connection modes, have higher working efficiency, avoid the condition of missing test and error test and have higher test accuracy.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for testing a hard disk status indicator according to an embodiment of the present invention.
The test method of the hard disk state indicator lamp comprises the following steps:
step S1: after a hard disk indicator lamp test instruction of the server is received, a first hard disk directly connected with the server and a second hard disk connected with the server through an RAID card are automatically distinguished according to interface connection information of the server.
Specifically, different connection modes between the server and the hard disk are considered, and the connection modes include a hard disk direct connection mode and a RAID (Redundant Arrays of Independent Disks) card connection mode, where the hard disk direct connection mode refers to that the server and the hard disk are directly connected through a PCIe (peripheral component interconnect express) interface; the RAID card connection mode is that the server is connected with a hard disk through the RAID card; the method comprises the steps of receiving a hard disk indicator lamp test instruction of a server, acquiring interface connection information of the server, and then automatically distinguishing a hard disk directly connected with the server (called a first hard disk) and a hard disk connected with the server through a RAID card (called a second hard disk) according to the interface connection information of the server so as to provide a basis for selecting a proper hard disk test strategy for the hard disk subsequently.
Step S2: the method comprises the steps of obtaining first hard disk information of different interfaces of a server, and sequentially carrying out autonomous test on status indicator lamps of all first hard disks based on the first hard disk information according to a preset hard disk direct connection test strategy.
It should be noted that the preset of the present application is set in advance, and only needs to be set once, and the reset is not needed unless the modification is needed according to the actual situation.
Specifically, for a first hard disk directly connected to the server, the test mode of the status indicator lamp is as follows: setting a test strategy (called a hard disk direct connection test strategy) for guiding the test of a status indicator lamp on a first hard disk directly connected with a server in advance; hard disk information (called as first hard disk information) of first hard disks directly connected under different interfaces of a server is obtained so as to determine the first hard disks to be tested, and then according to a preset hard disk direct connection test strategy, the status indicator lamps of the first hard disks directly connected with the server are sequentially and autonomously tested on the basis of the first hard disk information, so that the hard disk status indicator lamp test under a hard disk direct connection mode is completed.
Step S3: and acquiring second hard disk information under the RAID card, and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk test strategy.
Specifically, for the second hard disk connected with the server through the RAID card, the test mode of the status indicator lamp is as follows: setting a test strategy (called RAID card hard disk test strategy) for guiding the test of a status indicator lamp on a second hard disk connected with a server through a RAID card in advance; hard disk information (called as second hard disk information) of a second hard disk connected with the server through the RAID card is obtained so as to determine the second hard disk to be tested, and then according to a preset RAID card hard disk test strategy, the status indicator lamps of the second hard disks connected with the server through the RAID card are automatically tested in sequence based on the second hard disk information, so that the hard disk status indicator lamp test in the RAID card connection mode is completed.
It should be noted that, the execution sequence of step S2 and step S3 is not sequential, and step S2 may be executed first and step S3 may be executed later as shown in fig. 1, step S3 may be executed first and step S2 may be executed later, step S2 and step S3 may be executed simultaneously, and the present application is not limited herein. Moreover, before testing each hard disk state indicator lamp of the server, a testing environment needs to be set up in advance, a Linux operating system is installed in the set up testing environment, and then a testing tool kit is installed in the set up testing environment to provide a testing basis for subsequent testing of the hard disk state indicator lamps.
The invention provides a test method of a hard disk state indicator lamp, which is characterized in that after a hard disk indicator lamp test instruction of a server is received, a first hard disk directly connected with the server and a second hard disk connected with the server through an RAID card are automatically distinguished according to interface connection information of the server; acquiring first hard disk information of different interfaces of a server, and sequentially and autonomously testing status indicator lamps of each first hard disk based on the first hard disk information according to a preset hard disk direct connection testing strategy; and acquiring second hard disk information under the RAID card, and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk test strategy. Therefore, the state indicator lamp of each hard disk of the server can be automatically tested, the state indicator lamp testing method and the device are suitable for the test conditions of the indicator lamps of the hard disks in different connection modes, the working efficiency is high, the condition of missed test and misdetection can be avoided, and the testing accuracy is high.
On the basis of the above-described embodiment:
as an optional embodiment, a process of obtaining first hard disk information of different interfaces of a server, and sequentially performing an autonomous test on status indicator lamps of each first hard disk based on the first hard disk information according to a preset hard disk direct connection test strategy includes:
acquiring hard disk names of first hard disks under different interfaces of a server, and sequentially placing the hard disk names into an FIFO queue;
and sequentially taking out the hard disk names from the FIFO queue, and carrying out autonomous test on the status indicator lamp of the first hard disk corresponding to the currently taken-out hard disk name according to a preset hard disk direct connection test strategy.
Specifically, for a first hard disk directly connected to the server, the test mode of the status indicator light is specifically as follows: acquiring hard disk names (as the first hard disk information) of first hard disks directly connected under different interfaces of a server so as to determine the first hard disks to be tested; sequentially placing hard disk names of First hard disks directly connected with a server into an FIFO (First Input First Output) queue; based on the first-in first-out rule of the FIFO queue, the hard disk names are sequentially taken out from the FIFO queue for storing the hard disk names of the first hard disks directly connected with the server, and then the status indicator lamps of the first hard disks corresponding to the currently taken hard disk names are automatically tested according to a preset hard disk direct connection test strategy, so that the status indicator lamps of the first hard disks directly connected with the server are automatically tested in sequence.
As an optional embodiment, the status indicator lamp of the hard disk of the server includes a location lamp for locating the hard disk, an offline lamp for representing an offline status of the hard disk, and an Initial lamp for representing an initialization status of the hard disk;
correspondingly, the preset process of presetting the hard disk direct connection test strategy comprises the following steps:
performing Locate operation, Offline operation, Online operation and Initialization operation on each directly connected hard disk in the server respectively;
when the target direct-connected hard disk is subjected to indicator lamp operation, controlling a display screen to display hard disk information of the target direct-connected hard disk and specific indicator lamp operation currently carried out by the target direct-connected hard disk so as to judge whether the state of the target direct-connected hard disk is normal or not by prompting and observing the light state of a corresponding state indicator lamp through the display screen; the target direct connection hard disk is any direct connection hard disk.
Specifically, the status indicator lamp of the hard disk of the server of the present application includes a locate lamp, an offline lamp, and an Initial lamp; the location lamp is used for positioning the hard disk, and the normal state of the location lamp is blue and normally bright when the hard disk is positioned; the offline lamp is used for representing the offline state of the hard disk, the off state of the offline lamp represents hard disk online, and the red normally-on state of the offline lamp represents hard disk offline; the Initial lamp is used for representing the initialization state of the hard disk, and the normal state of the initialization lamp is green flashing when the hard disk is initialized.
Based on this, for any direct connection hard disk directly connected with the server (called a target direct connection hard disk), the specific test strategy of the status indicator lamp is as follows: sequentially performing Locate operation, Offline operation, Online operation and Initialization operation on the target direct-connected hard disk, and specifically performing each indicator lamp operation on the target direct-connected hard disk by using an led command carried by a Linux system; when each indicator light operation is carried out on the target direct connection hard disk, the display screen is controlled to display the hard disk information of the target direct connection hard disk and the specific indicator light operation currently carried out on the target direct connection hard disk, then the current test can be known through the prompt of the display screen, which state indicator light of the target direct connection hard disk needs to be observed, and whether the state of the target direct connection hard disk is normal or not needs to be judged by observing the light state of the corresponding state indicator light.
For example, when Online/Offline operation is performed on a target direct-connected hard disk, a display screen is controlled to display hard disk information of the target direct-connected hard disk and Online/Offline operation is currently performed on the target direct-connected hard disk, then it can be known that the currently tested Offline lamp of the target direct-connected hard disk is required to be observed through prompt of the display screen, and at this time, the light state of the Offline lamp on the target direct-connected hard disk needs to be observed, and if the Online/Offline operation is in an off state or in a red normally-on state, the state of the Offline/Offline operation is determined to be normal; otherwise, the state is determined to be abnormal.
When the Locate operation is carried out on the target direct-connected hard disk, the display screen is controlled to display the hard disk information of the target direct-connected hard disk and the Locate operation currently carried out on the target direct-connected hard disk, then the currently tested Locate lamp of the target direct-connected hard disk can be known through the prompt of the display screen, the lighting state of the Locate lamp on the target direct-connected hard disk needs to be observed at the moment, and if the lighting state is a blue normally-on state, the state is determined to be normal; otherwise, the state is determined to be abnormal.
When the Initialization operation is carried out on the target direct-connected hard disk, the display screen is controlled to display the hard disk information of the target direct-connected hard disk and the Initialization operation is currently carried out on the target direct-connected hard disk, the fact that the current test is the Initialization lamp of the target direct-connected hard disk can be known through prompt of the display screen, the lighting state of the Initialization lamp on the target direct-connected hard disk needs to be observed at the moment, and if the state is a green flashing state, the state is determined to be normal; otherwise, the state is determined to be abnormal.
As an optional embodiment, a process of obtaining second hard disk information under an RAID card, and sequentially performing an autonomous test on status indicator lamps of each second hard disk based on the second hard disk information according to a preset RAID card hard disk test policy includes:
acquiring related information of the RAID card, and storing the related information of the RAID card into a log file;
reading keywords from the log file to obtain a second hard disk serial number and the number of second hard disks under the RAID card;
and sequentially carrying out autonomous test on the status indicator lamps of the second hard disks based on the serial numbers of the second hard disks and the quantity of the second hard disks according to a preset RAID card hard disk test strategy.
Specifically, for the second hard disk connected to the server via the RAID card, the test mode of the status indicator lamp is specifically: acquiring related information of a RAID card connected with a server, and storing the related information of the RAID card into a log (log) file; reading keywords from a log file stored with information related to the RAID card, and aiming at acquiring the hard disk serial number and the hard disk number (as the information of the second hard disk) of a second hard disk connected with the server through the RAID card so as to determine the second hard disk to be tested; and according to a preset RAID card hard disk test strategy, sequentially and autonomously testing the status indicator lamps of the second hard disks connected with the server through the RAID card based on the serial numbers of the second hard disks until the total test quantity of the second hard disks reaches the quantity of the hard disks in the second hard disk information, thereby completing the test of the hard disk status indicator lamps in the RAID card connection mode.
As an optional embodiment, the status indicator lamp of the hard disk of the server includes a location lamp for locating the hard disk, an offline lamp for representing an offline status of the hard disk, and an Initial lamp for representing an initialization status of the hard disk;
correspondingly, the preset process of presetting the RAID card hard disk test strategy comprises the following steps:
judging whether the hard disks under the RAID card are RAID groups or not based on the information related to the RAID card;
if so, respectively performing Locate operation, Offline operation and Online operation on each hard disk under the RAID card; then deleting the RAID of the hard disk group under the RAID card, and respectively carrying out Initialization operation on each hard disk under the RAID card;
if not, respectively carrying out Initialization operation on each hard disk under the RAID card; then, respectively performing Locate operation, Offline operation and Online operation on each hard disk under the RAID card by using the hard disk group RAID under the RAID card;
when the target RAID card hard disk is subjected to indicator lamp operation, the display screen is controlled to display the hard disk information of the target RAID card hard disk and the specific indicator lamp operation currently performed by the target RAID card hard disk, so that the state of the target RAID card hard disk is judged to be normal or not by prompting and observing the light state of the corresponding state indicator lamp through the display screen; the target RAID card hard disk is any hard disk under the RAID card.
Specifically, considering that, under the condition of a hard disk group RAID under a RAID card, location operation, Offline operation, Online operation can be performed on a hard disk, and Initialization operation cannot be performed on the hard disk, a specific test strategy of a status indicator lamp for any one of the hard disks of the RAID card connected to the server via the RAID card (referred to as a target hard disk of the RAID card) is as follows: 1) and acquiring related information of the RAID card connected with the server, and storing the related information of the RAID card into a log file. 2) And reading the key words from the log file stored with the information related to the RAID card, and aiming at judging whether the hard disk under the RAID card is a RAID group or not based on the information related to the RAID card. 3) If the RAID of the hard disk group under the RAID card indicates that the Initialization operation cannot be performed on the hard disk at the moment, the location operation, the Offline operation and the Online operation are sequentially performed on a target RAID card hard disk under the RAID card, and specifically, a Storcli tool of a RAID card manufacturer can be used for performing each indicator lamp operation on the target RAID card hard disk; and deleting the RAID of the hard disk group under the RAID card, and then carrying out Initialization operation on the target RAID card hard disk under the RAID card. If the hard disk under the RAID card does not have a group RAID, indicating that the location operation, the Offline operation and the Online operation cannot be performed on the hard disk at the moment, firstly performing Initialization operation on a target RAID card hard disk under the RAID card; and then, the hard disk under the RAID card is grouped into the RAID, and then the location operation, the Offline operation and the Online operation are sequentially carried out on the target RAID card hard disk under the RAID card. 4) When each indicator light operation is carried out on the target RAID card hard disk, the display screen is controlled to display the hard disk information of the target RAID card hard disk and the specific indicator light operation currently carried out on the target RAID card hard disk, then the current test can be known which state indicator light of the target RAID card hard disk is through the prompt of the display screen, and at the moment, the light state of the corresponding state indicator light needs to be observed to judge whether the state is normal or not.
For example, when an Online/Offline operation is performed on a target RAID card hard disk, a display screen is controlled to display hard disk information (such as a hard disk serial number) of the target RAID card hard disk and the target RAID card hard disk is currently subjected to the Online/Offline operation, then an Offline lamp of the target RAID card hard disk can be known through prompt of the display screen, at this time, a light state of the Offline lamp on the target RAID card hard disk needs to be observed, and if the Online operation is in an off state or the Offline operation is in a red normally-on state, the state of the target RAID card hard disk is determined to be normal; otherwise, the state is determined to be abnormal.
As an optional embodiment, the method for testing a hard disk status indicator further includes:
when a target hard disk is subjected to target indicator lamp operation, storing an operation result into a log file; the target hard disk is any hard disk on the server; the target indicator light operation is any indicator light operation;
reading keywords from the log file to judge whether the target hard disk successfully executes the target indicator light operation;
if so, determining that the target hard disk successfully executes the target indicator light operation;
if not, determining that the target hard disk fails to execute the target indicator light operation.
Furthermore, when any hard disk (called a target hard disk, including a hard disk directly connected with the server and a hard disk connected with the server via a RAID card) on the server is subjected to target indicator light operation (Locate/Offline/Online/Initialization operation), the operation result is stored in a log file, so as to read a keyword from the log file and autonomously determine whether the target hard disk successfully executes the target indicator light operation; if the operation result that the target hard disk executes the target indicator light operation is successful, determining that the target hard disk executes the target indicator light operation successfully; otherwise, determining that the target hard disk fails to execute the target indicator light operation. In addition, the operation result of the target hard disk executing the operation of the target indicating lamp can be displayed on the display screen for the test personnel to check.
As an optional embodiment, the method for testing a hard disk status indicator further includes:
and if the target hard disk successfully executes all the indicator light operations, determining that the status indicator light of the target hard disk successfully tests.
Furthermore, the method can also summarize the operation results of the target hard disk executing all the indicator light operations, and if the operation results of the target hard disk executing all the indicator light operations are successful, the state indicator light of the target hard disk is determined to be tested successfully; otherwise, determining that the test of the status indicator lamp of the target hard disk fails. In addition, this application still can show the test result of the status indicator lamp of target hard disk on the display screen for the tester to look over.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a test system for a hard disk status indicator according to an embodiment of the present invention.
The test system of the hard disk state indicator lamp comprises:
the hard disk distinguishing module 1 is used for automatically distinguishing a first hard disk directly connected with the server and a second hard disk connected with the server through an RAID card according to interface connection information of the server after receiving a hard disk indicator lamp test instruction of the server;
the first testing module 2 is used for acquiring first hard disk information under different interfaces of the server, and sequentially and autonomously testing the status indicator lamps of the first hard disks based on the first hard disk information according to a preset hard disk direct connection testing strategy;
and the second testing module 3 is used for acquiring second hard disk information under the RAID card and sequentially carrying out autonomous testing on the status indicator lamps of the second hard disks on the basis of the second hard disk information according to a preset RAID card hard disk testing strategy.
As an optional embodiment, the system for testing a hard disk status indicator lamp further includes:
the result storage module is used for storing the operation result into a log file when the target hard disk is subjected to target indicator lamp operation; the target hard disk is any hard disk on the server; the target indicator light operation is any indicator light operation;
the operation judgment module is used for reading the keywords from the log file so as to judge whether the target hard disk successfully executes the target indicator lamp operation; if yes, executing a success determining module; if not, executing a failure determining module;
the success determining module is used for determining that the target hard disk successfully executes the target indicating lamp operation;
and the failure determining module is used for determining that the target hard disk fails to execute the target indicator light operation.
For introduction of the test system provided in the present application, reference is made to the embodiments of the test method described above, and details of the test system are not repeated herein.
The application also provides a testing arrangement of hard disk status indicator lamp, includes:
a memory for storing a computer program;
and the processor is used for realizing the steps of any one of the hard disk state indicator lamp testing methods when executing the computer program.
For the introduction of the testing apparatus provided in the present application, reference is made to the embodiments of the testing method described above, and details of the testing apparatus are not repeated herein.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A test method of a hard disk status indicator lamp is characterized by comprising the following steps:
after a hard disk indicator lamp test instruction of a server is received, a first hard disk directly connected with the server and a second hard disk connected with the server through a RAID card are automatically distinguished according to interface connection information of the server;
acquiring first hard disk information of different interfaces of the server, and sequentially and autonomously testing the status indicator lamps of the first hard disks based on the first hard disk information according to a preset hard disk direct connection testing strategy;
and acquiring second hard disk information under the RAID card, and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk test strategy.
2. The method for testing the status indicator lights of the hard disk according to claim 1, wherein the step of obtaining the information of the first hard disk under different interfaces of the server and sequentially performing the autonomous test on the status indicator lights of the first hard disk based on the information of the first hard disk according to a preset hard disk direct connection test strategy comprises the steps of:
acquiring hard disk names of first hard disks under different interfaces of the server, and sequentially placing the hard disk names into an FIFO queue;
and sequentially taking out the hard disk names from the FIFO queue, and carrying out autonomous test on the status indicator lamp of the first hard disk corresponding to the currently taken-out hard disk name according to a preset hard disk direct connection test strategy.
3. The method for testing the status indicator lamp of the hard disk according to claim 1, wherein the status indicator lamp of the hard disk of the server comprises a location lamp for locating the hard disk, an offline lamp for representing an offline status of the hard disk, and an Initial lamp for representing an initialization status of the hard disk;
correspondingly, the preset process of the preset hard disk direct connection test strategy comprises the following steps:
performing Locate operation, Offline operation, Online operation and Initialization operation on each directly connected hard disk in the server respectively;
when the target direct connection hard disk is subjected to indicator lamp operation, controlling a display screen to display hard disk information of the target direct connection hard disk and specific indicator lamp operation currently carried out by the target direct connection hard disk so as to judge whether the state of the target direct connection hard disk is normal or not by prompting and observing the light state of a corresponding state indicator lamp through the display screen; and the target direct connection hard disk is any one direct connection hard disk.
4. The method for testing the status indicator lights of the hard disks according to claim 1, wherein a process of obtaining second hard disk information under the RAID card and sequentially performing an autonomous test on the status indicator lights of the second hard disks based on the second hard disk information according to a preset RAID card hard disk test policy comprises:
acquiring relevant information of the RAID card, and storing the relevant information of the RAID card into a log file;
reading keywords from the log file to obtain a second hard disk serial number and the number of second hard disks under the RAID card;
and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the serial numbers of the second hard disks and the quantity of the second hard disks according to a preset RAID card hard disk test strategy.
5. The method for testing the status indicator lamp of the hard disk according to claim 1, wherein the status indicator lamp of the hard disk of the server comprises a location lamp for locating the hard disk, an offline lamp for representing an offline status of the hard disk, and an Initial lamp for representing an initialization status of the hard disk;
correspondingly, the preset process of presetting the RAID card hard disk test strategy includes:
judging whether the hard disks under the RAID card are RAID groups or not based on the information related to the RAID card;
if so, respectively performing Locate operation, Offline operation and Online operation on each hard disk under the RAID card; then deleting the RAID of the hard disk group under the RAID card, and respectively carrying out Initialization operation on each hard disk under the RAID card;
if not, respectively carrying out Initialization operation on each hard disk under the RAID card; then, performing Locate operation, Offline operation and Online operation on each hard disk under the RAID card by using the RAID of the hard disk group under the RAID card;
when the target RAID card hard disk is subjected to indicator lamp operation, controlling a display screen to display the hard disk information of the target RAID card hard disk and the specific indicator lamp operation currently performed by the target RAID card hard disk so as to judge whether the state of the target RAID card hard disk is normal or not by prompting and observing the light state of a corresponding state indicator lamp through the display screen; and the target RAID card hard disk is any hard disk under the RAID card.
6. The method for testing a status indicator light of a hard disk according to any one of claims 1 to 5, wherein the method for testing a status indicator light of a hard disk further comprises:
when a target hard disk is subjected to target indicator lamp operation, storing an operation result into a log file; the target hard disk is any hard disk on the server; the target indicator light operation is any indicator light operation;
reading keywords from the log file to judge whether the target hard disk successfully executes target indicator lamp operation;
if so, determining that the target hard disk successfully executes the target indicator light operation;
if not, determining that the target hard disk fails to execute the target indicator light operation.
7. The method for testing a status indicator light of a hard disk of claim 6, wherein the method for testing a status indicator light of a hard disk further comprises:
and if the target hard disk successfully executes all the indicator light operations, determining that the status indicator light of the target hard disk is successfully tested.
8. A test system of a hard disk status indicator lamp is characterized by comprising:
the hard disk distinguishing module is used for automatically distinguishing a first hard disk directly connected with the server and a second hard disk connected with the server through an RAID card according to interface connection information of the server after receiving a hard disk indicator lamp test instruction of the server;
the first testing module is used for acquiring first hard disk information under different interfaces of the server and sequentially and autonomously testing the status indicator lamps of the first hard disks based on the first hard disk information according to a preset hard disk direct connection testing strategy;
and the second testing module is used for acquiring second hard disk information under the RAID card and sequentially and autonomously testing the status indicator lamps of the second hard disks based on the second hard disk information according to a preset RAID card hard disk testing strategy.
9. The system for testing a status indicator light on a hard disk of claim 8, wherein the system for testing a status indicator light on a hard disk further comprises:
the result storage module is used for storing the operation result into a log file when the target hard disk is subjected to target indicator lamp operation; the target hard disk is any hard disk on the server; the target indicator light operation is any indicator light operation;
the operation judgment module is used for reading keywords from the log file so as to judge whether the target hard disk successfully executes the target indicator lamp operation; if yes, executing a success determining module; if not, executing a failure determining module;
the success determining module is used for determining that the target hard disk successfully executes the target indicator light operation;
and the failure determining module is used for determining that the target hard disk fails to execute the target indicator light operation.
10. The utility model provides a testing arrangement of hard disk status indicator lamp which characterized in that includes:
a memory for storing a computer program;
a processor for implementing the steps of the method of testing a hard disk status indicator light according to any of claims 1-7 when executing the computer program.
CN202011097066.9A 2020-10-14 2020-10-14 Method, system and device for testing hard disk state indicator lamp Active CN112256504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011097066.9A CN112256504B (en) 2020-10-14 2020-10-14 Method, system and device for testing hard disk state indicator lamp

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011097066.9A CN112256504B (en) 2020-10-14 2020-10-14 Method, system and device for testing hard disk state indicator lamp

Publications (2)

Publication Number Publication Date
CN112256504A true CN112256504A (en) 2021-01-22
CN112256504B CN112256504B (en) 2022-11-04

Family

ID=74242364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011097066.9A Active CN112256504B (en) 2020-10-14 2020-10-14 Method, system and device for testing hard disk state indicator lamp

Country Status (1)

Country Link
CN (1) CN112256504B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988513A (en) * 2021-03-12 2021-06-18 山东英信计算机技术有限公司 Server hard disk information management method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070028041A1 (en) * 2005-07-26 2007-02-01 Lsi Logic Corporation Extended failure analysis in RAID environments
CN107783875A (en) * 2017-10-23 2018-03-09 郑州云海信息技术有限公司 A kind of VMD cressets method of testing and system for being applied to NVMe hard disks under UFEI shell
CN107992400A (en) * 2017-12-15 2018-05-04 郑州云海信息技术有限公司 A kind of method for detecting hard disk indication lamp state in storage system
CN108021481A (en) * 2017-12-21 2018-05-11 曙光信息产业(北京)有限公司 The detection device and its automatic testing method of a kind of hard disk backboard
CN109933498A (en) * 2019-03-21 2019-06-25 浪潮商用机器有限公司 A kind of mixing lighting system, control device and the server of hard disk

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070028041A1 (en) * 2005-07-26 2007-02-01 Lsi Logic Corporation Extended failure analysis in RAID environments
CN107783875A (en) * 2017-10-23 2018-03-09 郑州云海信息技术有限公司 A kind of VMD cressets method of testing and system for being applied to NVMe hard disks under UFEI shell
CN107992400A (en) * 2017-12-15 2018-05-04 郑州云海信息技术有限公司 A kind of method for detecting hard disk indication lamp state in storage system
CN108021481A (en) * 2017-12-21 2018-05-11 曙光信息产业(北京)有限公司 The detection device and its automatic testing method of a kind of hard disk backboard
CN109933498A (en) * 2019-03-21 2019-06-25 浪潮商用机器有限公司 A kind of mixing lighting system, control device and the server of hard disk

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988513A (en) * 2021-03-12 2021-06-18 山东英信计算机技术有限公司 Server hard disk information management method, device, equipment and medium
CN112988513B (en) * 2021-03-12 2023-07-14 山东英信计算机技术有限公司 Method, device, equipment and medium for managing server hard disk information

Also Published As

Publication number Publication date
CN112256504B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
US9032371B2 (en) Method and apparatus for automatic diagnosis of software failures
CN104123219B (en) Method and device for testing software
US20110202901A1 (en) Automated software testing and validation system
CN105223889A (en) A kind of method being applicable to the automatic monitoring PMC RAID card daily record of producing line
CN111274154A (en) Automatic testing method, device, equipment and storage medium
WO2019134113A1 (en) Automated test method and system
CN111400121B (en) Server hard disk slot positioning and maintaining method
CN107480021A (en) A kind of method and system based on test Expander backboard hard disk indication lamps under linux system
US20100042353A1 (en) System and method for testing working condition of led indicators on hard disk drives
CN112256504B (en) Method, system and device for testing hard disk state indicator lamp
CN102789405A (en) Automated testing method and system for mainboard
CN106227630B (en) Detection system for embedded wireless module
CN105630661A (en) Automatic cross-system program debugging method and device
CN112015609A (en) Hot plug test method, device and equipment
CN116560985B (en) Chip equipment test control method, upper computer, equipment and medium
CN112216340A (en) Hard disk test method and device, storage medium and electronic equipment
JP2008135008A (en) Program module verification method
CN110795341A (en) Automatic testing method, system and device for server
CN113961257B (en) Automatic detection method, system and storage medium for activation of server operating system
CN102023916B (en) Computer system detection method
CN111863116B (en) Multi-disk indicator lamp testing method, system and device
CN101206606A (en) Method for monitoring input/output port data
CN108845902A (en) A kind of ATE hardware configuration and test program check method and apparatus
US8249728B2 (en) Method for operating a management system of function modules
CN110825645A (en) Assembly line type full-process automatic testing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant