CN113742182A - Hard disk lighting method, device, storage medium and computer program product - Google Patents
Hard disk lighting method, device, storage medium and computer program product Download PDFInfo
- Publication number
- CN113742182A CN113742182A CN202111040648.8A CN202111040648A CN113742182A CN 113742182 A CN113742182 A CN 113742182A CN 202111040648 A CN202111040648 A CN 202111040648A CN 113742182 A CN113742182 A CN 113742182A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- signal
- pin
- type
- slot position
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000004590 computer program Methods 0.000 title claims abstract description 22
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 7
- 230000009286 beneficial effect Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000012937 correction Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 108010037490 Peptidyl-Prolyl Cis-Trans Isomerase NIMA-Interacting 4 Proteins 0.000 description 2
- 102100031653 Peptidyl-prolyl cis-trans isomerase NIMA-interacting 4 Human genes 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000007794 visualization technique Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/325—Display of status information by lamps or LED's
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3034—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a hard disk lighting method, a hard disk lighting device, a storage medium and a computer program product. The method comprises the following steps: when the slot position of the backboard of the server is detected to be pulled out of the hard disk, the state information of the hard disk is determined through a target signal corresponding to the previous moment when the slot position is pulled out of the hard disk, wherein the target signal comprises an SGPIO signal or a VPP signal. And then, lighting up an indicator lamp corresponding to the type of the hard disk according to the state information of the hard disk. The hard disk lighting method, the hard disk lighting device, the storage medium and the computer program product improve the efficiency and accuracy of replacing the hard disk.
Description
Technical Field
The present disclosure relates to computer technologies, and in particular, to a method and an apparatus for lighting a hard disk, a storage medium, and a computer program product.
Background
With the rapid development of computer technology, the scale of cloud computing, data centers and other construction is continuously enlarged, and the demand for high-density data storage is continuously increased. For the server, different numbers of server hard disks are usually configured according to the actual needs of users to realize the expansion of storage capacity. According to different signal types, the server hard disk can be divided into a Serial Attached Small Computer System Interface/Serial Advanced Technology Attachment (SAS/SATA) hard disk and a Non-Volatile Memory host controller Interface (NVME) hard disk, and a server hard disk backplane can light a hard disk indicator lamp of a corresponding type of hard disk according to the type of the hard disk inserted into the slot, so that a simple visualization method is provided for a user to quickly know the state of the hard disk.
In the prior art, when different types of hard Disks in a server hard disk group are mixed and inserted, the same type of hard Disks may form a disk array group (RAID), and the hard Disks in the RAID group may implement data backup mutually. When a certain hard disk in the RAID group is unplugged, the hard disk indicating lamp of the corresponding type of hard disk is turned off.
However, in the above manner, when a hard disk in the RAID group is pulled out, the hard disk indicator light corresponding to the hard disk of the corresponding type is turned off, so that the user cannot know that the RAID group is damaged through the hard disk indicator light and replace the hard disk of the same type in time. If the replaced hard disks are the same type of hard disks, RAID recombination is carried out again; if the wrong hard disk is replaced, the data cannot be stored or is lost easily, and unnecessary loss is caused. Therefore, after the hard disk is pulled out, the hard disk state information cannot be checked by lighting the hard disk indicating lamp, so that the efficiency and accuracy of replacing the hard disk are low.
Disclosure of Invention
The application provides a hard disk lighting method, a hard disk lighting device, a storage medium and a computer program product, which are used for solving the problem that in the prior art, when a hard disk in a slot position is pulled out, the state information of the hard disk pulled out from the slot position cannot be confirmed through a hard disk indicator lamp, so that the efficiency and accuracy of replacing the hard disk are low, and the efficiency and accuracy of replacing the hard disk are improved.
In a first aspect, the present application provides a hard disk lighting method, including:
when the slot position of the backboard of the server is detected to be pulled out of the hard disk, determining the state information of the hard disk through a target signal corresponding to the previous moment when the slot position is pulled out of the hard disk, wherein the target signal comprises an SGPIO signal or a VPP signal;
and according to the state information of the hard disk, lighting up the hard disk indicator lamp corresponding to the type of the hard disk.
In a possible implementation manner, a signal of a first pin and a signal of a second pin of the slot are stored in a register, the signal of the first pin is used for indicating whether a hard disk is inserted into the slot, and the signal of the second pin is used for indicating the type of the hard disk;
the state information of the hard disk is determined through a target signal corresponding to the previous moment when the hard disk is pulled out of the slot position, and the method comprises the following steps:
and latching the register so that the signal of the first pin and the signal of the second pin in the latched register are respectively the same as the signal of the first pin and the signal of the second pin corresponding to the previous moment when the hard disk is pulled out of the slot position.
In a possible implementation manner, before determining the state information of the hard disk by using a target signal corresponding to a previous time when the hard disk is pulled out of the slot, the method further includes:
when the hard disk is inserted into the slot position, determining the type of the hard disk;
and selectively outputting the target signal according to the type of the hard disk.
In one possible implementation, selectively outputting the target signal according to the type of the hard disk includes:
if the type of the hard disk is SAS or SATA, determining that the target signal is an SGPIO signal;
and if the type of the hard disk is NVME, determining that the target signal is a VPP signal.
In one possible implementation, determining the type of the hard disk includes:
acquiring a signal of a second pin of the slot position;
if the signal of the second pin is a low level signal, determining the type of the hard disk as SAS or SATA;
and if the signal of the second pin is a high level signal, determining the type of the hard disk to be NVME.
In one possible implementation manner, detecting a slot where a hard disk is pulled out of a backplane of a server includes:
detecting a signal of a first pin of the slot position;
and if the signal of the first pin is a high-level signal, determining that the hard disk is pulled out of the slot position.
In a second aspect, the present application provides a hard disk drive lighting device, including:
the determining module is used for determining state information of the hard disk through a target signal corresponding to the previous moment when the hard disk is pulled out of the slot position when the slot position of the backboard of the hard disk is detected, wherein the target signal comprises an SGPIO signal or a VPP signal;
and the lighting module is used for lighting the hard disk indicator lamp corresponding to the type of the hard disk according to the state information of the hard disk.
In a possible implementation manner, a signal of a first pin and a signal of a second pin of the slot are stored in a register, the signal of the first pin is used for indicating whether a hard disk is inserted into the slot, and the signal of the second pin is used for indicating the type of the hard disk;
a determination module specifically configured to:
and latching the register so that the signal of the first pin and the signal of the second pin in the latched register are respectively the same as the signal of the first pin and the signal of the second pin corresponding to the previous moment when the hard disk is pulled out of the slot position.
In one possible implementation, the apparatus further includes: an output module;
the determining module is further used for determining the type of the hard disk when the hard disk is inserted into the slot position;
and the output module is used for selectively outputting the target signal according to the type of the hard disk.
In a possible implementation manner, the determining module is specifically configured to:
if the type of the hard disk is SAS or SATA, determining that the target signal is an SGPIO signal;
and if the type of the hard disk is NVME, determining that the target signal is a VPP signal.
In a possible implementation manner, the determining module is specifically configured to:
acquiring a signal of a second pin of the slot position;
if the signal of the second pin is a low level signal, determining the type of the hard disk as SAS or SATA;
and if the signal of the second pin is a high level signal, determining the type of the hard disk to be NVME.
In a possible implementation manner, the determining module is specifically configured to:
detecting a signal of a first pin of the slot position;
and if the signal of the first pin is a high-level signal, determining that the hard disk is pulled out of the slot position.
In a third aspect, an embodiment of the present application further provides an electronic device. The electronic device may include a processor and a memory; wherein,
a memory to store processor executable instructions.
And a processor configured to read the computer program stored in the memory, and execute the hard disk lighting method according to any one of the possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer executing instruction is stored in the computer-readable storage medium, and when the processor executes the computer executing instruction, the hard disk lighting method in any one of the possible implementation manners of the first aspect is implemented.
In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the hard disk lighting method according to any one of the possible implementation manners of the first aspect is implemented.
According to the hard disk lighting method, the hard disk lighting device, the storage medium and the computer program product, when the slot position of the backboard of the hard disk pull-out server is detected, the state information of the hard disk is determined according to the target signal corresponding to the previous time when the slot position of the hard disk is pulled out, the target signal comprises the SGPIO signal or the VPP signal, and then the hard disk indicator lamp corresponding to the type of the hard disk is lighted up according to the state information of the hard disk. After the hard disk is pulled out of the slot position, the state information of the hard disk is determined according to the target signal at the previous moment when the hard disk is pulled out of the slot position, and the lighting operation of the hard disk indicator lamp is realized according to the state information of the hard disk, so that a user can quickly and accurately determine the type and the state information of the hard disk pulled out of the slot position, the phenomenon that data cannot be stored or lost due to the replacement of the hard disk with the wrong type is avoided, and the efficiency and the accuracy of replacing the hard disk are improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic diagram of a hard disk lighting method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a hard disk lighting method according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating selective output of target signals from different types of hard disks;
FIG. 4 is a schematic diagram illustrating a process of lighting up a hard disk indicator;
fig. 5 is a schematic structural diagram of a hard disk lighting device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terms "first," "second," "third," and "fourth," if any, in the description and claims of the invention and in the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to help those skilled in the art to better understand the technical solutions of the present application, the related contents related to the technical solutions of the present application will be described below.
(1) The Baseboard Management Controller (BMC), which is a stand-alone system, represents a series of monitoring and control functions.
(2) The Platform Controller Hub (PCH) is a series of chipsets developed by intel to replace the conventional I/O path Controller.
(3) A Host Bus Adapter (HBA) is a circuit board or integrated circuit Adapter that provides input/output (I/O) processing and physical connections between a server and a storage device.
(4) A Frequency Correction Channel (FCCH) is used to correct the signal and adjust the signal to a corresponding Frequency.
The hard disk lighting method provided by the embodiment of the application can be applied to an application scene of replacing the hard disk according to the hard disk indicator lamp. For example, when a certain hard disk in the server hard disk backplane fails, the failed hard disk is usually pulled out and replaced with a new hard disk. In order to enable a user to quickly and accurately know the type of the hard disk to be replaced in the slot position, the hard disk indicator lamp of the corresponding hard disk type still needs to be turned on after the hard disk is pulled out, and the user can determine the type of the hard disk to be inserted in the slot position through the hard disk indicator lamp and replace the hard disk. And further, the efficiency and the accuracy of replacing the hard disk are improved.
At present, after a hard disk in a slot of a server backplane is pulled out, a Complex Programmable Logic Device (CPLD) in the server backplane cannot continuously determine the type of the hard disk in the slot, so that a target signal corresponding to the type of the hard disk cannot be output and state information of the hard disk cannot be analyzed, and then a state indicator lamp of the corresponding hard disk cannot be turned on according to the state information of the hard disk. When a user needs to re-insert a new hard disk into the slot, the user cannot practicably insert the hard disk because the type of the hard disk cannot be accurately confirmed, and the efficiency of replacing the hard disk is low. In addition, if a wrong hard disk is inserted, data storage failure or data loss is easily caused, so that unnecessary loss is brought to a user, and extremely poor user experience is caused, namely the accuracy of hard disk replacement is low.
In view of the above problems, an embodiment of the present application provides a hard disk lighting method, which may latch hard disk state information at a previous time when a hard disk is pulled out, so as to light a hard disk indicator corresponding to a type of the hard disk according to the hard disk state information at the previous time. The function that the hard disk indicator lamp of the corresponding hard disk type can be turned on after the hard disk is pulled out is achieved, a user is helped to quickly and accurately master the state of the hard disk in the slot, the efficiency of hard disk replacement can be improved, the phenomenon that data is lost or data storage fails due to the fact that the type of the replaced hard disk is wrong can be avoided, and then the efficiency and the accuracy of the user in replacing the hard disk are improved.
Fig. 1 is a system architecture diagram of a hard disk lighting method according to an embodiment of the present invention, as shown in fig. 1, the system includes a hard disk 10 and a server backplane 11. The hard disk 10 includes a hard disk interface 101, and the server backplane 11 includes a hard disk connector 110, a CPLD111, and a hard disk indicator 112. The hard disk interface 101 of the hard disk 10 is connected to the CPLD111 through the hard disk connector 110, and the CPLD111 can determine the type of the connected hard disk 10, analyze the state information corresponding to the connected hard disk 10, and turn on the hard disk indicator 112. The hard disk 10 may be a SATA/SAS type hard disk or an NVME type hard disk.
It should be understood that the number of the hard disk 10, the server backplane 11, the hard disk connector 110, the CPLD111 and the hard disk indicator light 112 in the system architecture diagram shown in fig. 1 is only exemplary, and a greater or lesser number falls within the scope of the present application.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart illustrating a hard disk lighting method according to an embodiment of the present disclosure, where the hard disk lighting method may be implemented by any device that executes the hard disk lighting method, and the device may be implemented by software and/or hardware. In this embodiment, the device may be integrated in the CPLD111 as shown in fig. 1. As shown in fig. 2, a hard disk lighting method provided in the embodiment of the present application includes the following steps:
step 201: when the slot position of the backboard of the server is detected to be pulled out of the hard disk, the state information of the hard disk is determined through a target signal corresponding to the previous moment when the slot position is pulled out of the hard disk, wherein the target signal comprises an SGPIO signal or a VPP signal.
When the hard disk is inserted into the slot position, the CPLD needs to determine the type of the hard disk, selectively outputs a target signal according to the type of the hard disk, where the target signal includes a Serial General Purpose Input/Output (SGPIO) signal or a Virtual Port (VPP) signal, and finally analyzes the state information corresponding to the hard disk in the slot position in the target signal. The state information of the hard disk refers to the state of the hard disk in the server backboard. For example: location information (Locate), Error information (Error), Active information (Active), Error information (Fault), and other information.
Specifically, whether the hard disk is inserted into the slot position is detected by detecting a signal of a first pin of the slot position, and if the signal of the first pin is a low level signal, it is determined that the hard disk is inserted into the slot position.
The signal of the first PIN is a signal PIN4(IFDET #) for determining whether the hard disk is inserted into the slot. And when the signal of the first pin is at a high level, determining that the hard disk is pulled out of the slot position, and when the signal of the first pin is at a low level, determining that the hard disk is inserted into the slot position. For example, when a hard disk is not inserted into a slot of a server backplane, the first pin signal is at a high level, and when an NVME or SATA hard disk is inserted at this time, the first pin signal changes to a low level.
In this example, whether the hard disk is inserted into the slot of the server backplane can be detected through the state change of the signal level of the first pin, so that the efficiency of determining whether the hard disk is in the slot can be improved.
For example, when it is detected that the hard disk is inserted into the slot, i.e., the signal of the first pin is low, the type of the hard disk needs to be determined first. In order to determine the type of the hard disk inserted into the slot position, a signal of a second pin of the slot position needs to be acquired at the same time, and if the signal of the second pin is a low-level signal, the type of the hard disk is determined to be SAS or SATA; and if the signal of the second pin is a high level signal, determining the type of the hard disk to be NVME. The signal of the second PIN is a signal PIN10(PRSNT #) for determining the type of the hard disk.
In order to better understand whether the hard disk is inserted into the slot and determine the process of inserting the hard disk type, table 1 below shows the corresponding relationship between the values of PIN4 and PIN10 and whether the hard disk is inserted into the slot and the hard disk type.
TABLE 1
Signal of the second pin | Signal of the first pin | |
SATA/SAS hard disk | Is low in | Is low in |
NVME hard disk | Height of | Is low in |
As can be seen from table 1, the level change state of the first pin signal of the slot position can determine whether the hard disk is inserted into the slot position, and if the signal of the first pin is at a low level, it indicates that the hard disk is inserted; if the level is high, no hard disk is inserted. When the hard disk inserted into the slot position is detected, the type of the hard disk inserted into the slot position can be judged according to the signal level change state of a second pin of the slot position, and if the signal of the second pin is low level, the type of the inserted hard disk is an SATA (serial advanced technology attachment) or SAS (serial attached small computer system interface) hard disk; if the level is high, the type of the inserted hard disk is NVME hard disk.
In the mode, the state of inserting or extracting the hard disk in the slot position and the automatic identification process of the type of the hard disk are determined by the combined judgment of the first pin signal and the second pin signal, so that the type of the hard disk inserted in the slot position can be simply and quickly determined, and the efficiency and the accuracy of determining the type of the hard disk are improved.
Illustratively, after the type of the hard disk inserted into the slot position is determined, a target signal can be selectively output according to the type of the hard disk, and if the type of the hard disk is SAS or SATA, the target signal is determined to be an SGPIO signal; and if the type of the hard disk is NVME, determining that the target signal is a VPP signal.
Specifically, the hard disk type can be automatically identified according to a first pin signal and a second pin signal of a slot position of the server backplane, and then a target signal is selectively output. Wherein the selective output of the target signal needs to be realized by using a hardware circuit of the CPLD in the backplane, for example: a Multiplexer (MUX), which is a combined circuit, is an electronic switch, and can select one input signal from a plurality of input signals as an output signal, for example: the input signal has A, B two signals, and the output signal passing through the multiplexer is the A signal or the B signal. The CPLD can select a target signal corresponding to the type of the hard disk to pass through according to the type of the hard disk inserted.
FIG. 3 is a diagram illustrating selective output of target signals according to types of hard disks. As shown in fig. 3, the server includes a motherboard 301 and a backplane 302, where the motherboard 301 includes a Central Processing Unit (CPU) 303 and a Platform Controller Hub (PCH)/RAID card/Host Bus Adapter card (HBA) 304, and the backplane includes a CPLD305, a slot 306, and a hard disk indicator 307. The circulation of the VPP signal is realized by the CPU303 in the mainboard 301 and the CPLD305 in the backboard 302 through the directly connected I2C HEADER; meanwhile, the PCH/RAID card/HBA card 304 in the mainboard 301 and the CPLD305 in the backboard 302 realize the circulation of the SGPIO signal through the SGPIO HEADER. The CPLD305 may determine an output target signal according to the type of the hard disk inserted in the slot 306, and control the hard disk indicator 307 to light up according to the target signal. For example: two input signals of the CPLD are a VPP signal and an SPGIO signal respectively, wherein the VPP signal is obtained through I2C directly connected with the CPU, and the SPGIO signal is obtained through a PCH/RAID card/HBA card. When the type of the hard disk inserted into the slot is NVME, the CPLD selects the VPP signal as an output signal according to the inserted NVME hard disk so as to light a hard disk indicator lamp corresponding to the NVME type hard disk. When the type of the hard disk inserted into the slot position is SAS or SATA, the CPLD selects the SPGIO signal as an output signal according to the inserted SAS or SATA hard disk to light a hard disk indicator lamp corresponding to the SAS or SATA hard disk.
In the method, the CPLD determines the output target signal according to the type of the hard disk inserted into the slot, and the output target signal can be analyzed to the state information of the hard disk in the slot, so that the target signal selectively switched and output by the hard disk under the condition of mixed insertion is realized.
And when the signal of the first pin of the detection slot is changed from low level to high level, the hard disk in the slot of the server backplane is determined to be pulled out. Because the hard disk does not exist in the slot position, the CPLD cannot acquire the type of the hard disk, and therefore the target signal cannot be output any more. In order to ensure that the target signal can be output to determine the state information of the hard disk after the hard disk is pulled out, the state information of the hard disk can be determined by the target signal corresponding to the previous moment when the hard disk is pulled out of the slot position.
Step 202: and according to the state information of the hard disk, lighting up the hard disk indicator lamp corresponding to the type of the hard disk.
The state information of the hard disk refers to the state of the hard disk in the slot position of the server backplane. For example: location information (Locate), Error information (Error), Active information (Active), Error information (Fault), and other information. Because the activity information frequencies of the hard disks of different manufacturers are not completely consistent, Frequency correction needs to be performed through a Frequency Correction Channel (FCCH).
Illustratively, a signal of a first pin of the slot and a signal of a second pin of the slot are stored in the register, the signal of the first pin is used for indicating whether a hard disk is inserted into the slot, and the signal of the second pin is used for indicating the type of the hard disk. The state information of the hard disk is determined by a target signal corresponding to the previous time when the hard disk is pulled out of the slot position, and the state information of the hard disk can be latched by a register, so that a signal of a first pin and a signal of a second pin in the latched register are respectively the same as the signal of the first pin and the signal of the second pin corresponding to the previous time when the hard disk is pulled out of the slot position.
Specifically, a signal of a first pin and a signal of a second pin of the slot are spliced and placed into a register of the CPLD, and the type of the hard disk inserted into the slot is determined according to a value in the register. For example: a register formed by the signal of the first pin and the signal of the second pin is (PRSNT, IFDET), and when the value of the register is (0, 0), the type of the inserted hard disk is determined to be SAS/SATA; when the register value is (1,0), confirming that the type of the inserted hard disk is NVME; when the register value is (1,1), it is confirmed that the hard disk is not inserted.
Furthermore, after the type of the hard disk is determined, analyzing the corresponding target signal to obtain the state information of the hard disk, and putting the state information of the hard disk into a register to form a data source channel. When the hard disk is pulled out of the slot position, the registers storing the first pin signal and the second pin signal are latched, and at the moment, the CPLD stops sampling the signal of the first pin and the signal level value of the second pin and keeps the register value at the previous moment before the hard disk is pulled out unchanged, so that the signal of the first pin and the signal of the second pin in the latched registers are respectively the same as the signal of the first pin and the signal of the second pin corresponding to the previous moment when the hard disk is pulled out of the slot position.
In the lighting method provided by the embodiment of the application, when any type of hard disk is inserted into the slot, the latch value of the register is formed according to the signal of the first pin and the signal of the second pin, and the data source channel formed by the register for storing the state data of the NVME hard disk and the register for storing the state information of the SAS/SATA hard disk is switched. For example: SAS/SATA hard disk state data analyzed through SGPIO signals are put into a register A to form a data source channel A, NVME hard disk state data analyzed through VPP signals are put into a register B to form a data source channel B, and a register (PRSNT, IFDET) formed by signals of a first pin and signals of a second pin is a register S. When the hard disk type in the slot at this moment is NVME, the destination signal output by the CPLD is a VPP signal, the value of the register S is (1,0), NVME hard disk state data analyzed through the VPP signal is stored in the register B, and the state information in the output destination signal is the state information in the register B at this moment. If the NVME hard disk in the slot position is pulled out, the CPLD stops sampling the state values of the signal of the first pin and the signal of the second pin, keeps the value of the register S unchanged, and outputs the state information in the target signal as the state information in the register B. When a SATA/SAS type hard disk is inserted into the slot again, the CPLD restarts to sample the state values of the signal of the first pin and the signal of the second pin, and the value of the register S is judged, so that the hard disk state data source is switched to be the register A. Therefore, the state information of the hard disks of the server backboard can be freely switched and locked when any type of hard disk is mixed and inserted.
In the mode, the signal of the first pin and the signal of the second pin of the slot position are stored in the register, and the register is latched after the hard disk is pulled out of the slot position, so that the effect that the output target signal can be obtained when the hard disk is pulled out is achieved. After the hard disk types are changed, the data channels can be switched, so that the data source channels of the state information of the corresponding hard disks can be freely switched and latched under the condition of mixed insertion of any hard disks.
Furthermore, the hard disk indicator lamp corresponding to the type of the hard disk is lighted up according to the state information in the output target signal. The state information in the output target signal register can be filled in the hard disk indicating lamp register, and the hard disk indicating lamp is lighted up through the hard disk indicating lamp control module.
Fig. 4 is a schematic diagram of a process of implementing lighting operation of the hard disk indicator lamp by the hard disk indicator lamp control module. As shown in fig. 4, the NVME register value is status information of the hard disk parsed from the VPP signal, the SATA register value is status information of the hard disk parsed from the SPGIO signal, and the NVME register value and the SATA register value enter the MUX combining circuit as two input signals. The register value formed by the first pin signal and the second pin signal can select the register value at the output end of the MUX combinational circuit, wherein the register value at the output end can be an NVME register value or an SATA register value. And the output end register value is filled into the hard disk indicator lamp register, so that the hard disk indicator lamp is lighted through the hard disk indicator lamp control module according to the hard disk indicator lamp register value.
If the hard disk is not accessed in the slot position after electrification, namely in the initial state, the CPLD detects that the signal of the first pin is high level, the register value of the hard disk indicator light is filled to be low level, and no light-on operation is executed at the moment. When the hard disk is inserted into the slot, the first pin signal is still at a low level, the type of the inserted hard disk is judged to be an unidentifiable type, and at the moment, no lighting operation is executed, for example: the inserted hard disk interface conforms to, but the hard disk is not a storage class hard disk. When the type of the inserted hard disk is in accordance with the type of the inserted hard disk, the register value of the hard disk of the corresponding type is selected to be filled into the register value of the hard disk indicating lamp, and the hard disk indicating lamp control module lights the hard disk indicating lamp of the corresponding hard disk. For example, if the inserted hard disk is NVME, the corresponding NVME register value is used as an output target signal by the MUX, the NVME register value is filled into the hard disk indicator lamp register value, and the hard disk indicator lamp of the NVME hard disk is lightened by the hard disk indicator lamp control module; when the type of the inserted hard disk is SAS or SATA, the corresponding SAS or SATA register value is used as an output target signal by MUX, the SAS or SATA register value is filled into the register value of the hard disk indicating lamp, and the hard disk indicating lamp of the SAS or SATA hard disk is lightened by the hard disk indicating lamp control module. At a certain moment, after the hard disk is pulled out, the CPLD latches a (PRSNT, IFDET) register consisting of the signal of the first pin and the signal of the second pin, so that the current state information of the hard disk still keeps the state information of the hard disk determined by the target signal corresponding to the moment before the hard disk is pulled out. Therefore, the hard disk indicating lamp can be lightened according to the state information of the hard disk. For example: at the moment, the type of the hard disk in the slot position is NVME, after the NVME hard disk is pulled out, the target signal of the current hard disk state information source is still a VPP signal, so that the pulled-out NVME hard disk state information can be analyzed according to the VPP signal and a corresponding hard disk indicator lamp is lightened; if the type of the hard disk in the slot position is SAS or SATA, after the SAS or SATA hard disk is pulled out, the target signal of the current hard disk state information source is still the SPGIO signal, so that the state information of the pulled-out SAS or SATA hard disk can be analyzed according to the SPGIO signal and the corresponding hard disk indicator lamp is lightened.
According to the hard disk lighting method provided by the embodiment of the application, when the slot position of the server backboard is pulled out of the hard disk is detected, the state information of the hard disk is determined according to the target signal corresponding to the previous moment when the slot position of the server backboard is pulled out of the hard disk, the target signal comprises the SGPIO signal or the VPP signal, and then the hard disk indicator lamp corresponding to the type of the hard disk is lighted up according to the state information of the hard disk. After the hard disk is pulled out, the state information of the hard disk is determined according to the target signal at the previous moment when the hard disk is pulled out of the slot position, and the hard disk indicator lamp is turned on according to the state information of the hard disk. After the hard disk is pulled out of the slot position, the state information of the hard disk is determined according to the target signal at the previous moment when the hard disk is pulled out of the slot position, and the lighting operation of the hard disk indicator lamp is realized according to the state information of the hard disk, so that a user can quickly and accurately determine the type and the state information of the hard disk pulled out of the slot position, the phenomenon that data cannot be stored or lost due to the replacement of the hard disk with the wrong type is avoided, and the efficiency and the accuracy of replacing the hard disk are improved.
Fig. 5 is a schematic structural diagram of a hard disk lighting device 50 according to an embodiment of the present application, and for example, please refer to fig. 5, the hard disk lighting device 50 may include:
the determining module 501 is configured to determine, when it is detected that the hard disk is pulled out of the slot of the backplane of the server, state information of the hard disk according to a target signal corresponding to a previous time when the hard disk is pulled out of the slot, where the target signal includes an SGPIO signal or a VPP signal;
and a lighting module 502, configured to light a hard disk indicator corresponding to the type of the hard disk according to the state information of the hard disk.
In a possible implementation manner, a signal of a first pin and a signal of a second pin of the slot are stored in a register, the signal of the first pin is used for indicating whether a hard disk is inserted into the slot, and the signal of the second pin is used for indicating the type of the hard disk;
the determining module 501 is specifically configured to:
and latching the register so that the signal of the first pin and the signal of the second pin in the latched register are respectively the same as the signal of the first pin and the signal of the second pin corresponding to the previous moment when the hard disk is pulled out of the slot position.
In one possible implementation, the apparatus further includes: an output module 503;
the determining module 501 is further configured to determine the type of the hard disk when the hard disk is detected to be inserted into the slot;
and an output module 503, configured to selectively output the target signal according to the type of the hard disk.
In a possible implementation manner, the determining module 501 is specifically configured to:
if the type of the hard disk is SAS or SATA, determining that the target signal is an SGPIO signal;
and if the type of the hard disk is NVME, determining that the target signal is a VPP signal.
In a possible implementation manner, the determining module 501 is specifically configured to:
acquiring a signal of a second pin of the slot position;
if the signal of the second pin is a low level signal, determining the type of the hard disk as SAS or SATA;
and if the signal of the second pin is a high level signal, determining the type of the hard disk to be NVME.
In a possible implementation manner, the determining module 501 is specifically configured to:
detecting a signal of a first pin of the slot position;
and if the signal of the first pin is a high-level signal, determining that the hard disk is pulled out of the slot position.
Fig. 6 is a schematic structural diagram of an electronic device 60 provided in an embodiment of the present application, and for example, referring to fig. 6, the terminal device may include a processor 601 and a memory 602; wherein,
a memory 602 for storing a computer program.
The processor 601 is configured to read the computer program stored in the memory 602, and execute the technical solution of the hard disk lighting method in any of the embodiments according to the computer program in the memory 602.
Alternatively, the memory 602 may be separate or integrated with the processor 601. When the memory 602 is a device separate from the processor 601, the electronic device may further include: a bus for connecting the memory 602 and the processor 601.
Optionally, this embodiment further includes: a communication interface, which may be connected to the processor 601 through a bus. The processor 601 may control the communication interface to implement the functions of acquisition and transmission of the electronic device described above.
The electronic device shown in the embodiment of the present application can execute the technical solution of the hard disk lighting method in any of the above embodiments, and the implementation principle and the beneficial effect of the electronic device are similar to those of the hard disk lighting method, and reference may be made to the implementation principle and the beneficial effect of the hard disk lighting method, which are not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, where a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the technical solution of the hard disk lighting method in any of the above embodiments is implemented, and the implementation principle and the beneficial effect of the hard disk lighting method are similar to those of the hard disk lighting method, which can be referred to as the implementation principle and the beneficial effect of the hard disk lighting method, and are not described herein again.
The embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the technical solution of the hard disk lighting method in any of the above embodiments is implemented, and the implementation principle and the beneficial effect of the computer program are similar to those of the hard disk lighting method, and reference may be made to the implementation principle and the beneficial effect of the hard disk lighting method, which is not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The computer-readable storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
Claims (10)
1. A hard disk lighting method is characterized by comprising the following steps:
when a slot position of a backboard of a server is detected to be pulled out of a hard disk, determining state information of the hard disk through a target signal corresponding to the previous moment when the slot position is pulled out of the hard disk, wherein the target signal comprises an SGPIO signal or a VPP signal;
and according to the state information of the hard disk, lighting up a hard disk indicator lamp corresponding to the type of the hard disk.
2. The method of claim 1, wherein a signal of a first pin of the slot and a signal of a second pin of the slot are stored in a register, the signal of the first pin being used to indicate whether the hard disk is inserted in the slot, the signal of the second pin being used to indicate a type of the hard disk;
the determining the state information of the hard disk through the target signal corresponding to the previous time when the hard disk is pulled out of the slot position comprises the following steps:
and latching the register so that the signal of the first pin and the signal of the second pin in the latched register are respectively the same as the signal of the first pin and the signal of the second pin corresponding to the previous moment when the hard disk is pulled out of the slot position.
3. The method according to claim 1 or 2, wherein before determining the status information of the hard disk by using the target signal corresponding to the previous time when the hard disk pulls out the slot, the method further comprises:
when the hard disk is inserted into the slot position, determining the type of the hard disk;
and selectively outputting the target signal according to the type of the hard disk.
4. The method of claim 3, wherein selectively outputting the target signal according to the type of the hard disk comprises:
if the type of the hard disk is SAS or SATA, determining that the target signal is the SGPIO signal;
and if the type of the hard disk is NVME, determining that the target signal is the VPP signal.
5. The method of claim 3, wherein the determining the type of the hard disk comprises:
acquiring a signal of a second pin of the slot position;
if the signal of the second pin is a low level signal, determining that the type of the hard disk is SAS or SATA;
and if the signal of the second pin is a high level signal, determining that the type of the hard disk is NVME.
6. The method of claim 1 or 2, wherein detecting that the slot of the server backplane is unplugged from the hard disk comprises:
detecting a signal of a first pin of the slot position;
and if the signal of the first pin is a high level signal, determining that the hard disk is pulled out of the slot position.
7. A hard disk drive lighting device comprising:
the determining module is used for determining state information of a hard disk through a target signal corresponding to the previous time when the hard disk is pulled out of a slot position of a backboard of a server when the slot position of the hard disk is detected to be pulled out, wherein the target signal comprises an SGPIO signal or a VPP signal;
and the lighting module is used for lighting a hard disk indicator lamp corresponding to the type of the hard disk according to the state information of the hard disk.
8. An electronic device, comprising: a memory, a processor;
the memory: for storing the processor-executable instructions;
the processor is configured to read the computer program stored in the memory, and execute the hard disk lighting method according to any one of claims 1 to 6 according to the computer program in the memory.
9. A computer-readable storage medium, wherein computer-executable instructions are stored therein, and when executed by a processor, are used for implementing the hard disk lighting method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method of lighting a hard disk according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111040648.8A CN113742182A (en) | 2021-09-06 | 2021-09-06 | Hard disk lighting method, device, storage medium and computer program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111040648.8A CN113742182A (en) | 2021-09-06 | 2021-09-06 | Hard disk lighting method, device, storage medium and computer program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113742182A true CN113742182A (en) | 2021-12-03 |
Family
ID=78736253
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111040648.8A Pending CN113742182A (en) | 2021-09-06 | 2021-09-06 | Hard disk lighting method, device, storage medium and computer program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113742182A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114185721A (en) * | 2022-02-17 | 2022-03-15 | 浪潮(山东)计算机科技有限公司 | Thermal storage backup system and method for server |
CN116991685A (en) * | 2023-09-25 | 2023-11-03 | 苏州元脑智能科技有限公司 | Signal transmission system and method |
-
2021
- 2021-09-06 CN CN202111040648.8A patent/CN113742182A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114185721A (en) * | 2022-02-17 | 2022-03-15 | 浪潮(山东)计算机科技有限公司 | Thermal storage backup system and method for server |
CN116991685A (en) * | 2023-09-25 | 2023-11-03 | 苏州元脑智能科技有限公司 | Signal transmission system and method |
CN116991685B (en) * | 2023-09-25 | 2024-01-26 | 苏州元脑智能科技有限公司 | Signal transmission system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2046356C (en) | Method and apparatus for improved initialization of computer system features | |
KR101143679B1 (en) | Automated firmware recovery | |
US9146823B2 (en) | Techniques for testing enclosure management controller using backplane initiator | |
CN113742182A (en) | Hard disk lighting method, device, storage medium and computer program product | |
CN110489367B (en) | Method and system for flexibly allocating and easily managing backplane by CPLD (complex programmable logic device) | |
US20150113178A1 (en) | Peripheral component health monitoring apparatus | |
CN114003538B (en) | Identification method of intelligent network card and intelligent network card | |
CN111722990A (en) | Method and device for checking cable connection between main back boards | |
CN112463689B (en) | OCP card hot plug device, method and computer readable storage medium | |
CN111209151A (en) | Linux-based NVME SSD hot plug test method, system, terminal and storage medium | |
CN104461799A (en) | Detecting system for board card configuration correctness | |
US11256521B2 (en) | Systems and methods for evaluating and updating deprecated products | |
CN112000535A (en) | SAS Expander card-based hard disk abnormity identification method and processing method | |
CN111048138A (en) | Hard disk fault detection method and related device | |
CN111176913A (en) | Circuit and method for detecting Cable Port in server | |
CN114265733A (en) | Automatic testing method and device for abnormal power failure of solid state disk | |
CN106354530B (en) | A kind of mainboard firmware fast writing method and device based on Loongson processor | |
CN113204456A (en) | Test method, tool, device and equipment for VPP interface of server | |
CN116539992A (en) | Storage device in-place stable state detection device, method, logic module and medium | |
CN110990207A (en) | BPS memory test method, system, terminal and storage medium based on Whitley platform | |
CN116401120A (en) | Cable connection verification method, device, equipment and machine-readable storage medium | |
CN114077452B (en) | PCIE equipment positioning method, device and related equipment | |
CN112579366A (en) | Hard disk in-place detection system | |
CN115756981A (en) | Automatic inspection method, device, equipment and medium for hard disk backboard cable assembly | |
CN113204475B (en) | Lighting device and method for hard disk of server backboard and server |
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 |