Method and system for testing indicating lamp of storage device
By generating and executing indicators, controlling the indicator light action of the storage device, the problems of inconvenient location of storage devices and inability to meet the management needs of large-scale server clusters in the prior art are solved, and efficient and convenient storage device positioning and management are achieved.
Patent Information
- Application Number
- CN202411826034.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-11
AI Technical Summary
The existing storage device status indication method is not intuitive and convenient enough, it is difficult to quickly locate specific storage devices in complex server environments, and cannot meet the remote centralized management and rapid troubleshooting requirements of large-scale server clusters.
By obtaining the slot position and indicator status input by the user, the indicator light command is generated, and the indicator light action of the storage device is controlled based on the instruction, and the indicator light test is realized, which is suitable for many different types of servers and storage devices.
It realizes accurate and convenient positioning of storage devices, improves operation and maintenance efficiency, improves user experience, and is suitable for many different types of servers and storage devices.
Smart Images

Figure CN119806954A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server storage device management, and in particular to a method and system for testing an indicator light of a storage device. Background Art
[0002] In the process of server operation and maintenance, it is an important task to quickly and accurately identify the location and status of storage devices. However, existing storage device status indication methods are often not intuitive and convenient enough, making it difficult for operation and maintenance personnel to quickly locate specific storage devices in a complex server environment.
[0003] Traditional lighting methods may require manual operation on the server site, or rely on complex hardware connections and settings, which is not only inefficient but also prone to errors. At the same time, for the management of large-scale server clusters, this method cannot meet the needs of remote centralized management and rapid troubleshooting.
[0004] There is a lack of a unified and efficient storage device lighting control method that is compatible with different types of servers and storage devices and supports flexible indicator light status settings to adapt to various operation and maintenance scenarios. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for testing an indicator light of a storage device. The method generates an indicator light instruction by obtaining the slot position and indicator light status input by the user, and controls the indicator light action of the storage device based on the instruction to complete the indicator light test. The storage device can be accurately and conveniently located, and the method and system are suitable for a variety of different types of servers and storage devices, thereby improving operation and maintenance efficiency and user experience.
[0006] In a first aspect, the present invention provides a method for testing an indicator light of a storage device, which is applied to an indicator light testing system of a storage device. The method for testing an indicator light of a storage device comprises:
[0007] In response to the user's operation, the input parameter information is obtained; wherein the parameter information includes: slot position and indicator light status;
[0008] Generate indicator light instructions based on parameter information;
[0009] The LED instruction is sent to the storage device, so that the storage device performs the LED test based on the LED instruction.
[0010] In some preferred embodiments of the present invention, before the step of obtaining the input parameter information, the method further includes:
[0011] Get the IP address of the baseboard management controller;
[0012] A communication connection is established with the baseboard management controller based on the IP address of the baseboard management controller.
[0013] In some preferred embodiments of the present invention, the step of obtaining the IP address of the baseboard management controller includes:
[0014] Acquire network configuration information of the baseboard management controller based on a preset first script;
[0015] Search for target keywords in the text content of network configuration information;
[0016] The target field of the row where the target keyword is located is extracted, and the target field is determined to be the IP address of the baseboard management controller.
[0017] In some preferred embodiments of the present invention, the step of establishing a communication connection with the baseboard management controller based on the IP address of the baseboard management controller includes:
[0018] Get the prompt information returned by the server;
[0019] If the prompt information includes a preset first prompt, sending a preset first reply information to the server;
[0020] If the prompt information includes a preset second prompt, the preset login password is sent to the server.
[0021] In some preferred embodiments of the present invention, after the step of obtaining the input parameter information, the method further includes:
[0022] Verify whether the parameter information meets the preset parameter requirements;
[0023] If the parameter information does not meet the preset parameter requirements, the test process is terminated.
[0024] In some preferred embodiments of the present invention, the step of generating an indicator light instruction based on parameter information includes:
[0025] Convert parameter information according to preset conversion rules;
[0026] Generate indicator light instructions based on the converted parameter information.
[0027] In some preferred embodiments of the present invention, the indicator light instruction includes: a hard disk controller backplane, a target disk position code and an indicator light status code.
[0028] In some preferred embodiments of the present invention, after the step of generating an indicator light instruction based on the parameter information, the method further comprises:
[0029] The indicator light instructions are encoded based on preset encoding rules.
[0030] In some preferred embodiments of the present invention, the storage device performs the step of the indicator light test based on the indicator light instruction, including:
[0031] Decoding the coded indicator light instructions;
[0032] storing the decoded indicator light instruction in a register of the indicator light controller chip;
[0033] Performs LED testing based on LED instructions in registers.
[0034] In a second aspect, the present invention provides an indicator light testing system for a storage device, which is used to execute the indicator light testing method for the storage device provided in the first aspect.
[0035] The present invention brings the following beneficial effects:
[0036] The present invention provides a method and system for testing an indicator light of a storage device, which are applied to an indicator light testing system of a storage device. The method for testing an indicator light of a storage device comprises: responding to a user's operation to obtain input parameter information; wherein the parameter information comprises: a slot position and an indicator light state; generating an indicator light instruction based on the parameter information; sending the indicator light instruction to a storage device so that the storage device performs an indicator light test based on the indicator light instruction; generating an indicator light instruction by obtaining the slot position and the indicator light state input by the user, and completing the indicator light test by controlling the indicator light action of the storage device based on the instruction. The storage device can be accurately and conveniently located, and is applicable to a variety of different types of servers and storage devices, thereby improving operation and maintenance efficiency and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A flowchart of a method for testing an indicator light of a storage device provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of system communication logic provided by an embodiment of the present invention.
[0040] Icon: 100-baseboard management controller; 200-I2C bus; 300-indicator light controller chip. DETAILED DESCRIPTION
[0041] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0042] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0044] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0045] In addition, the terms "horizontal", "vertical", "overhanging" and the like do not mean that the components are required to be absolutely horizontal or overhanging, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0046] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0047] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0048] Embodiment 1
[0049] The embodiment of the present invention provides a method for testing an indicator light of a storage device, which is applied to an indicator light testing system of a storage device. Figure 1 The flowchart of a method for testing an indicator light of a storage device provided by an embodiment of the present invention is shown, and the method includes:
[0050] Step S102, in response to the user's operation, obtaining input parameter information; wherein the parameter information includes: slot position and indicator light status.
[0051] Specifically, the user inputs the required parameter information through a certain interface or command line tool. These parameters usually include the slot position of the storage device and the expected indicator light status. For example, in a data center, the administrator may need to check whether the hard disk drive in the 5th slot of the 3rd rack is working properly. At this time, he will enter the corresponding slot position "3-5" and the expected indicator light status, such as "normal", "fault" or "positioning".
[0052] In some preferred embodiments of the present invention, the slots may be numbered consecutively. For example, each rack is provided with 10 slots, and the number corresponding to the 5th slot of the 3rd rack is 25. The user may input the corresponding slot position "25".
[0053] Step S104: Generate indicator light instructions based on the parameter information.
[0054] Specifically, the system generates corresponding indicator light control instructions based on the parameter information provided by the user. This process may involve some preset logical judgments and conversions to ensure that the instructions match the actual configuration of the storage device. The preset rules are set in advance by the user's server, storage device or communication bus. For example, if the storage device is designed to control the indicator light based on specific coding rules, then the system needs to convert these user-friendly parameters into codes or signals that the device can understand.
[0055] Step S106: Send the indicator light instruction to the storage device, so that the storage device performs the indicator light test based on the indicator light instruction.
[0056] Specifically, the generated indicator light instruction is sent to the target storage device via a network or other communication interface. After the storage device receives the instruction, its built-in control logic activates the corresponding indicator light according to the instruction content, thereby performing status indication or fault diagnosis. In some preferred embodiments of the present invention, this process may also include verification and confirmation of the instruction and feedback of the execution result.
[0057] For example, suppose an administrator of a data center wants to check whether the second solid-state drive (SSD) in a server is being recognized by the system. The administrator enters the slot position "2" and the indicator light status "positioning" through the management software, and the management software converts this information into a specific instruction format and sends it to the server through an out-of-band management interface (such as IPMI, BMC, etc.). After receiving the instruction, the baseboard management controller 100 (BMC) of the server activates the indicator light on the corresponding SSD slot so that the administrator can intuitively see the current status of the SSD. In this way, the indicator light test of the storage device not only improves the operation and maintenance efficiency and reduces the need for on-site inspections, but also enhances the real-time and accuracy of device status monitoring.
[0058] In addition, this automated testing process can also be integrated into a wider monitoring system to achieve centralized management and remote diagnosis of storage devices throughout the data center.
[0059] An embodiment of the present invention provides an indicator light testing method for a storage device, which is applied to an indicator light testing system for a storage device. The indicator light testing method for a storage device includes: responding to a user's operation to obtain input parameter information; wherein the parameter information includes: a slot position and an indicator light status; generating an indicator light instruction based on the parameter information; sending the indicator light instruction to a storage device so that the storage device performs an indicator light test based on the indicator light instruction; generating an indicator light instruction by obtaining the slot position and indicator light status input by the user, and completing the indicator light test by controlling the indicator light action of the storage device based on the instruction. The storage device can be accurately and conveniently located, is applicable to a variety of different types of servers and storage devices, improves operation and maintenance efficiency, and improves user experience.
[0060] Embodiment 2
[0061] Based on the above embodiment, an embodiment of the present invention provides another test method for a storage device. Before the step of obtaining input parameter information, the method also includes: obtaining the IP address of the baseboard management controller 100; and establishing a communication connection with the baseboard management controller 100 based on the IP address of the baseboard management controller 100.
[0062] Specifically, the administrator or automated script first needs to determine and obtain the IP address of the baseboard management controller 100 (BMC). BMC is a key component of the server that allows administrators to remotely manage and monitor the hardware status of the server even if the server's operating system is not running or the server is powered off. The process of obtaining the IP address may involve querying the network configuration, scanning the network to discover the BMC device, or retrieving information from a centralized management repository such as a CMDB (configuration management database).
[0063] Once the IP address of the BMC is determined, the next step is to establish a stable communication session. This is usually achieved by using remote management protocols such as IPMI, SSH, or other specialized protocols. The process of establishing a connection may include verifying the user's identity (for example, through a username and password), setting encryption parameters to ensure the security of data transmission, and making necessary network configurations to optimize communication efficiency. After a successful connection is established, administrators or automated tools can send commands and receive server status information through this connection.
[0064] The above steps are the basis for subsequent indicator light tests and other remote management tasks. They ensure that the administrator can reliably communicate with the target storage device for effective monitoring and management. This practice of establishing a stable communication mechanism first helps reduce connection problems in subsequent management operations and improves the efficiency and reliability of the entire management process.
[0065] Furthermore, in some preferred embodiments of the present invention, the step of obtaining the IP address of the baseboard management controller 100 includes: obtaining network configuration information of the baseboard management controller 100 based on a preset first script; searching for target keywords in the text content of the network configuration information; extracting the target field of the row where the target keyword is located, and determining the target field as the IP address of the baseboard management controller 100.
[0066] Specifically, the administrator or automated tool will start a preset script, the purpose of which is to query and collect the network configuration information of the BMC. This script may obtain data by executing specific commands on the server or accessing a management interface. For example, the BMC-related network configuration can be retrieved using ipmitool, openIPMI tools, or through SNMP protocol queries.
[0067] After the script is executed, it will output text content containing network configuration information. Next, you need to search for specific target keywords in these text contents, such as "IP Address" or other words that identify IP addresses. This process may involve text parsing techniques, such as regular expression matching, to ensure that the text lines containing IP address information are accurately located.
[0068] Once the text line containing the target keyword is found, the next step is to extract a specific field in the line, which is the IP address of the BMC. In most cases, the IP address follows the target keyword or is located in a predictable position such as the end of the line. The extracted IP address is then recorded and used in the subsequent steps of establishing a remote communication connection.
[0069] For example, the ipmitool tool on the server is used to obtain the network configuration information of the BMC by executing the ipmitool lan print1 command. This command will output a series of text contents containing the BMC network parameters. Next, use the grep command to filter out the line containing "IP Address" because this line contains the IP information we need. Then, the awk command extracts the last field of each line, which is most likely the IP address. Since there may be multiple similar information, use the sed-n'2p' command to obtain the second matching result as the final BMC IP address. If the obtained IP address is a null value, it indicates that the acquisition has failed. At this time, the system will output the prompt message "Unable to obtain BMC IP address, script exit." and terminate the entire operation process.
[0070] Obtaining the BMC IP address in this automated way greatly improves management efficiency and reduces the possibility of human error, ensuring that administrators can quickly and accurately establish connections with target devices and perform various management operations throughout the storage device management process.
[0071] Furthermore, in some preferred embodiments of the present invention, the step of establishing a communication connection with the baseboard management controller 100 based on the IP address of the baseboard management controller 100 includes: obtaining prompt information returned by the server; if the prompt information includes a preset first prompt, sending a preset first reply information to the server; if the prompt information includes a preset second prompt, sending a preset login password to the server.
[0072] Specifically, when trying to connect to the BMC, the administrator or automated tool will send a connection request to the server. After receiving these requests, the server may return some prompt information, which is usually some interactive queries to verify the legitimacy of the connection request or request more connection details.
[0073] If the prompt message returned by the server contains a preset first prompt (for example, asking whether to continue to establish the connection or warning about unauthorized access), the administrator or automated script will send a first reply message according to the preset instructions. This may include a simple confirmation instruction, such as "yes" or "continue", to tell the server to confirm the process of continuing to establish the connection.
[0074] If the prompt contains a preset second prompt (usually requiring a login password or other authentication information), the administrator or automated script will respond to this prompt and send the preset login password to the server. This password must be correctly provided before establishing a connection to ensure that only authorized users can access the BMC and its functions.
[0075] For example, after obtaining the BMC IP address, use the expect script to establish an SSH (Secure Shell) connection. Start the SSH connection process by executing the spawn ssh sysadmin@$bmc_ip command. During this process, you may encounter two expected situations: one is receiving a "yes / no" prompt returned by the server, which means that the server requires confirmation whether to accept its public key. At this time, the script will automatically send a "yes\r" response and continue to wait for subsequent prompts; the other is receiving a "password:" prompt, which means that the server requires a login password. At this time, the script will send the preset password "superuser\r" to log in. Only after a successful login (that is, receiving the "sysadmin@*" prompt) can you continue with subsequent operations.
[0076] Expect is a tool for automating interactive tasks and is used in Shell scripts. It is mainly used to process command line programs that require user input. For example, in scenarios such as SSH login and FTP file transfer, the program will wait for the user to enter a password or other instructions. Expect can simulate user input to achieve automated operations.
[0077] This interactive communication process is a key part of ensuring connection security, which prevents unauthorized access through two-way verification. The automation of each step not only speeds up the entire connection process, but also reduces the security risks that may be caused by manual input errors. Once these steps are passed, the administrator can successfully establish a remote communication connection with the BMC and perform various management tasks including indicator light testing.
[0078] Furthermore, in some preferred embodiments of the present invention, after the step of obtaining input parameter information, the method further includes: verifying whether the parameter information meets the preset parameter requirements; if the parameter information does not meet the preset parameter requirements, terminating the test process.
[0079] Specifically, after the user enters parameter information (such as slot position and indicator light status), the system will perform detailed verification on this information. This includes checking whether the input format is correct, whether it is within the allowed range, and whether it conforms to the preset logical rules. For example, the slot position parameter must be a valid number or a string that conforms to a specific format, and the indicator light status parameter should be one of the predefined status codes.
[0080] If the parameter information entered by the user does not meet the preset requirements, the system will take appropriate measures to terminate the test process. This may be by displaying an error message to inform the user that the input is incorrect, or directly interrupting the test process to prevent potential operational errors.
[0081] In some preferred embodiments of the present invention, in some systems with a higher degree of automation, a mechanism for automatically correcting errors may also be included, such as prompting the user to re-enter the correct parameters or automatically selecting default values.
[0082] Before the login is successful, you need to ensure that the user enters the correct number of parameters. The script requires the user to enter two parameters, representing the storage device <slot>(slot location) and<led_status> (Indicator light status). By checking the parameter number variable $#, if its value is less than 2, it outputs "Usage: $0 <slot><led_status>" prompt message and exit the script. This step is crucial to ensure the accuracy and completeness of the instructions and avoid sending erroneous instructions due to insufficient parameters.
[0083] This verification mechanism ensures that only valid and accurate parameter information can be used to generate indicator light instructions and sent to the storage device for testing. This not only improves the accuracy of the test, but also enhances the robustness of the system and prevents unnecessary system overhead or erroneous operations caused by invalid parameters. In this way, the indicator light testing method for storage devices can more reliably help operation and maintenance personnel quickly and accurately locate and identify the status of storage devices.
[0084] Furthermore, in some preferred embodiments of the present invention, the step of generating an indicator light instruction based on parameter information includes: converting the parameter information according to a preset conversion rule; and generating an indicator light instruction based on the converted parameter information.
[0085] The system converts the parameters input by the user according to the pre-set parameter conversion rules. These rules may involve a variety of logic and conditional judgments to ensure that the parameter information can be accurately mapped to the various parts of the indicator light instruction. For example, the slot position parameter may need to be converted into an internal identifier according to a specific encoding rule, while the indicator light status parameter may need to be converted according to a predefined status code table. This conversion ensures that the generated instruction matches the hardware configuration of the actual storage device.
[0086] For example, for the input <slot>If the value of the parameter is "3", it will be converted to "12" according to the specific storage device numbering rules inside the server.<led_status> If the parameter value is "fault", it is converted to "01"; if it is "locate", it is converted to "02"; if it is other values, the input value is directly used as the indicator status code. This parameter conversion mechanism ensures the compatibility of the command with the server and storage device hardware, and can accurately convert the user's intention into command information that the server and storage device can recognize.
[0087] After completing the conversion of parameter information, the system will integrate this data into a complete indicator light instruction. This instruction usually contains all necessary control information, such as the target device address, operation type, and specific operation value.
[0088] Furthermore, in some preferred embodiments of the present invention, the indicator light instruction includes: a hard disk controller backplane, a target disk slot code and an indicator light status code.
[0089] For example, a typical indicator light command may be in the form of "i2cset-yf$1 0x4c 0x$2 0x$3", where $ represents variables 1, 2, and 3; $1 represents the corresponding hard disk controller backplane, $2 represents the corresponding disk slot code of the hard disk specified disk slot conversion, and $3 represents led_status01-active / 02-locate / 03-fault / 04-off.
[0090] Exemplarily, after completing parameter processing, a lighting instruction is generated according to a preset instruction format. The specific instruction is "i2cset-yf 55 0x4c 0xled". Among them, "55" and "0x4c" are specific parameters related to the lighting control of the storage device. They have specific meanings in the communication protocol between the server and the storage device, and are used to specify the target device and operation type of communication. " and led" are the converted slot position and indicator light status codes. These parameters accurately specify which state of the indicator light of which hard disk slot is to be set.
[0091] This detailed conversion process ensures that the generated indicator light instructions can accurately control the indicator light status of the storage device, thereby achieving effective device monitoring and management. This not only improves the accuracy of the test, but also enhances the reliability and ease of use of the system.
[0092] Furthermore, in some preferred embodiments of the present invention, after the step of generating the indicator light instruction based on the parameter information, the method further comprises: encoding the indicator light instruction based on a preset encoding rule.
[0093] Specifically, the system encodes the generated indicator light instructions according to pre-set encoding rules. These encoding rules may include specific byte orders, data formats, or encryption algorithms to ensure that the instructions are not misunderstood or tampered with when transmitted over a network or other communication channels. For example, some storage devices may require instructions to be encoded in big-endian or little-endian order, while other devices may need to use a specific checksum algorithm to verify the integrity of the instructions. After completing the encoding operation, the system ensures that the encoded instructions are fully compatible with the target storage device. This may involve checking whether the encoded instruction length, format, and any necessary authentication fields meet the requirements of the device. In this way, device response errors or management failures caused by instruction mismatches can be effectively prevented.
[0094] In some preferred embodiments of the present invention, the indicator light instruction needs to be transmitted through the I2C channel. Therefore, after generating the light-on instruction, the BMC encodes the instruction according to the I2C protocol.
[0095] I2C (Inter-Integrated Circuit) is a bus protocol widely used for communication between electronic devices. In the embodiment of the present invention, it is used for command transmission between the BMC and the storage device backplane. Figure 2 In the embodiment of the present invention, a system communication logic diagram is provided, in which the baseboard manager communicates with the indicator light control chip through the I2C bus 200. The I2C bus 200 consists of a clock line (SCL) and a data line (SDA). During the communication process, the BMC acts as a master device, responsible for generating a clock signal and controlling data transmission. The related control chip on the backplane of the storage device acts as a slave device, receiving instructions from the BMC.
[0096] During the encoding process, first, a stable clock signal is generated on the SCL clock line to provide a synchronization reference for data transmission. Then, data is transmitted on the SDA data line in the format specified by I2C. Specifically, the transmission process includes sending the start condition (when SCL is high, SDA changes from high to low), then sending the I2C address of the storage device backplane indicator light control chip (this is pre-defined in the server and storage device design), and then sending each byte of data in the lighting instruction in sequence (including the converted slot position and indicator light status code related data bytes), and finally sending the stop condition (when SCL is high, SDA changes from low to high), completing a complete instruction transmission process.
[0097] This detailed encoding process not only improves the security of data transmission, but also enhances the interoperability of the system, ensuring that storage devices of different manufacturers and models can accurately execute the indicator control commands from the management system. In this way, the indicator light test method of the storage device can more reliably help operation and maintenance personnel quickly and accurately locate and identify the status of the storage device.
[0098] The hard disk backplane interface module is a key component on the backplane of the storage device. It is responsible for receiving instructions transmitted from the I2C bus 200. The module has an interface circuit compatible with the I2C bus 200 and can accurately receive and parse the signals on the SDA and SCL lines. Its internal structure includes signal buffers, decoders, etc. The signal buffer is used to stabilize and enhance the signal received from the I2C bus 200, ensure signal quality, and prevent signal distortion or interference. The decoder is responsible for converting the received I2C data signal into an internally recognizable format for subsequent processing.
[0099] In some preferred embodiments of the present invention, the storage device performs the step of indicator light testing based on the indicator light instruction, including: decoding the encoded indicator light instruction; storing the decoded indicator light instruction in the register of the indicator light controller chip 300; and performing the indicator light test based on the indicator light instruction in the register.
[0100] Specifically, when the encoded indicator light instruction arrives at the storage device, it first needs to be decoded. This process involves converting the encoded instruction into the original data format that the device can understand. For example, if a specific byte order or encryption algorithm is used for encoding, then when the instruction is received, the device will restore it to the original instruction format according to the reverse decoding rules.
[0101] When the lighting command on the I2C bus 200 is transmitted to the hard disk backplane interface module, the interface module first processes the signal through the signal buffer to enhance the strength and stability of the signal. Then, the decoder starts to work and converts the received signal into a parallel data format according to the rules of the I2C protocol, identifying information such as the start condition, slave device address, instruction byte, and data byte. If a signal error (such as a checksum error, format mismatch, etc.) is found during the reception process, the interface module will take corresponding error handling measures, such as sending an error feedback signal to the BMC or ignoring the error command. The specific error handling mechanism depends on the design requirements of the server and storage device.
[0102] The decoded instructions will be stored in a dedicated register group, which is usually located in the indicator light controller chip 300 of the storage device. The function of the register is to temporarily store the instruction data so that the subsequent logic control unit can access and use the data to perform corresponding operations.
[0103] The register module plays an important role in both the BMC and the indicator light control chip of the storage device backplane. In the BMC, the register is used to store configuration information and temporary data related to the lighting operation, such as the current communication mode (I2C), the address information of the target storage device backplane, the result of the last communication, etc. The values of these registers are constantly updated and used during the entire lighting operation process, providing the necessary data support for the command generation module and the communication module. In the indicator light control chip, the register is used to store the lighting command and related parameters received from the BMC. When the chip receives data on the I2C bus 200, it will parse and store the data in the corresponding register, and then drive the indicator light circuit according to the value of the register.
[0104] The logic control unit monitors the data changes in the register in real time. Once a new light-on command is detected, it will perform logical judgment and calculation based on the specific content of the command (such as the status code). If it is a command to light up the indicator light, the logic control unit will generate a corresponding drive signal, which is sent to the drive circuit. According to the requirements of the drive signal, the drive circuit applies the appropriate voltage and current to the indicator light corresponding to the specified hard disk slot, thereby lighting the indicator light.
[0105] The backplane interface module is a key part for physical connection and data transmission between the BMC and the storage device backplane. At the hardware level, it implements the physical interface of the I2C bus 200, including the connection of the data line and the clock line. At the software level, it works in conjunction with the command generation module and register module of the BMC, and is responsible for sending the generated I2C lighting command to the indicator light control chip on the storage device backplane through the physical interface. At the same time, it also receives feedback information returned from the storage device backplane (if any), and passes this information to the relevant modules of the BMC for processing. For example, during the command execution process, if there are some abnormal conditions on the storage device backplane (such as communication failure, indicator light hardware problem, etc.), the backplane interface module will feed back these abnormal information to the BMC so that the BMC can take corresponding measures (such as resending commands, recording error information, etc.).
[0106] The indicator light controller chip 300 is the core hardware component for lighting the indicator light of the hard disk slot. It contains multiple functional modules, such as a register group, a logic control unit, and a drive circuit. The register group is used to store the instruction data received from the backplane interface module and the current status information of the chip. The logic control unit performs logical judgment and calculation based on the instruction data in the register to generate a corresponding control signal. The drive circuit provides the indicator light with appropriate voltage and current according to the output signal of the logic control unit, thereby realizing different states of the indicator light, such as lighting, extinguishing, or flashing.
[0107] When the hard disk backplane interface module successfully decodes and obtains the lighting instruction, it passes the instruction data to the register group of the indicator light controller chip 300. The register group updates the corresponding register value according to the received data. The logic control unit monitors the changes in the register in real time. When a new lighting instruction is detected, it will perform logical judgment based on the indicator light status code in the instruction (such as "01" for fault status, "02" for positioning status, etc.). If it is an instruction to light up the indicator light, the logic control unit will generate a corresponding drive signal, which is sent to the drive circuit. According to the requirements of the drive signal, the drive circuit applies the appropriate voltage and current to the indicator light corresponding to the specified hard disk slot, thereby realizing the lighting of the indicator light and achieving the purpose of lighting up the specified hard disk slot.
[0108] This detailed decoding and execution process ensures that the indicator lights of the storage device can accurately reflect the status of the device, thereby effectively helping operation and maintenance personnel to perform fault diagnosis and maintenance work. This not only improves the accuracy of the test, but also enhances the reliability and ease of use of the system.
[0109] The embodiment of the present invention provides a method for testing an indicator light of a storage device. Through BMC and SSH technology, remote control of the lighting function of the storage device is realized, and operation and maintenance personnel do not need to be on site at the server to perform the operation, which greatly improves the operation and maintenance efficiency; it supports multiple indicator light state settings and slot position recognition and conversion, can meet different operation and maintenance scenarios and requirements, and has strong flexibility and adaptability; the entire lighting control process is realized through script automation, which reduces the complexity and error rate of manual operation and improves the accuracy and reliability of operation.
[0110] Embodiment 3
[0111] On the basis of the above embodiments, an embodiment of the present invention provides an indicator light testing system for a storage device, which is used to execute the indicator light testing method for the storage device provided by the above embodiments.
[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the indicator light testing system of the storage device described above can refer to the corresponding process in the embodiment of the indicator light testing method of the aforementioned storage device, and will not be repeated here.
[0113] In addition, in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0114] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.< / slot> < / slot> < / slot>
Claims
1. A method for testing an indicator light of a storage device, characterized in that: An indicator light testing system for a storage device, wherein the indicator light testing method for the storage device comprises: In response to the user's operation, the input parameter information is obtained; wherein the parameter information includes: slot position and indicator light status; generating an indicator light instruction based on the parameter information; The indicator light instruction is sent to the storage device, so that the storage device performs the indicator light test based on the indicator light instruction.
2. The method for testing the indicator light of a storage device according to claim 1, characterized in that: Before the step of obtaining input parameter information, the method further includes: Get the IP address of the baseboard management controller; A communication connection is established with the baseboard management controller based on the IP address of the baseboard management controller.
3. The method for testing the indicator light of a storage device according to claim 2, characterized in that: The steps to obtain the IP address of the baseboard management controller include: Acquire network configuration information of the baseboard management controller based on a preset first script; Searching for target keywords in the text content of the network configuration information; A target field of the row where the target keyword is located is extracted, and the target field is determined to be the IP address of the baseboard management controller.
4. The method for testing the indicator light of a storage device according to claim 3, characterized in that: The step of establishing a communication connection with the baseboard management controller based on the IP address of the baseboard management controller includes: Get the prompt information returned by the server; If the prompt information includes a preset first prompt, sending a preset first reply information to the server; If the prompt information includes a preset second prompt, a preset login password is sent to the server.
5. The method for testing an indicator light of a storage device according to claim 1, characterized in that: After the step of obtaining the input parameter information, the method further includes: Verifying whether the parameter information meets the preset parameter requirements; If the parameter information does not meet the preset parameter requirements, the test process is terminated.
6. The method for testing an indicator light of a storage device according to claim 1, characterized in that: The step of generating an indicator light instruction based on the parameter information comprises: Convert the parameter information according to a preset conversion rule; The indicator light instruction is generated based on the converted parameter information.
7. The method for testing an indicator light of a storage device according to claim 6, characterized in that: The indicator light instruction includes: a hard disk controller backplane, a target disk position code and an indicator light status code.
8. The method for testing an indicator light of a storage device according to claim 1, characterized in that: After the step of generating an indicator light instruction based on the parameter information, the method further comprises: The indicator light instruction is coded based on a preset coding rule.
9. The method for testing an indicator light of a storage device according to claim 8, characterized in that: The step of the storage device performing an indicator light test based on the indicator light instruction includes: Decoding the encoded indicator light instruction; storing the decoded indicator light instruction in a register of the indicator light controller chip; The indicator light test is performed based on the indicator light instruction in the register.
10. A system for testing an indicator light of a storage device, characterized in that: Used to execute the indicator light testing method of the storage device as described in any one of claims 1 to 9.
Citation Information
Cited By
Method for testing status indicator lamp of server and electronic equipment
CN121187901A
Method for testing status indicator light of server and electronic device
CN121187901B