A hard disk information monitoring method, product, device and storage medium

By monitoring the reset signal and time information statistics of the target device, reading the register status of the disk array card, solving the problem of disk array card loss caused by insufficient hard disk information monitoring, and improving the security and reliability of the hard disk.

CN119226091BActive Publication Date: 2025-03-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411722011.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-11
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

In business scenarios such as distributed storage, centralized storage and banking industries, insufficient hard disk information monitoring leads to the loss of disk array cards, affecting the security and reliability of data.

Method used

By monitoring the reset signal when the target device is started, it is determined that it is on the rising edge, and triggering the preset time information statistics operation. If the time information statistics result meets the preset conditions, the registers of the disk array card are read to obtain various state information of the hard disk.

Benefits of technology

Ensure that the disk array card will not be lost when the target device is restarted, reduce the impact of data backup function, improve the security and reliability of the hard disk, and release more slot resources, and improve the utilization rate of the entire machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226091B_ABST
    Figure CN119226091B_ABST
Patent Text Reader

Abstract

The present application discloses a hard disk information monitoring method, product, device and storage medium, which relates to the field of hard disk technology, including: when the target device is detected to be started, the reset signal of the physical slot where the disk array card in the target device is located is obtained, and it is judged whether the reset signal is at a rising edge; the reset signal being at a rising edge is used as a trigger condition to trigger a preset time information statistics operation to obtain a time information statistics result; if the time information statistics result meets the preset condition, the register of the disk array card is read to obtain various status information of each hard disk connected to the disk array card. The present application can ensure that the disk array card and the hard disk will not be lost due to the restart of the target device, thereby reducing the impact on the data backup function, ensuring the safety and reliability of the hard disk when the target device is restarted, thereby improving the utilization rate of the entire target device, and ensuring the reliability, stability and safety of the target device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of hard disk technology, and in particular to a hard disk information monitoring method, product, device and storage medium. Background Art

[0002] Currently, when deploying a server system, it is usually deployed in real time through a network environment. In this case, there is no need for storage devices, such as hard disks or RAID (Redundant Arrays of Independent Disks) cards, but network devices, such as PCI (Peripheral Component Interconnect) network cards, must exist. This is because each time the server is started, it connects to the remote mirror server through the network environment of the network card, and downloads and installs the operating system through the network. It does not need to be installed on storage devices such as hard disks, but only needs to be installed in the memory resource space. It has the advantage of reducing costs and the ability to automatically download and update each time the system is restarted or powered on.

[0003] However, for special application environments, such as distributed storage, centralized storage, and banking industries, which have large data demands and need to save data in real time, data needs to be stored and backed up securely, reliably, and in real time to avoid data loss due to sudden power failure of the server or increase in data volume. However, data is usually stored by using hard disk devices with PCI interfaces. The number of PCI slots that can be supported by a CPU (Central Processing Unit) processor is limited. A server with a known architecture supports up to 6 PCI slots. According to the minimum bandwidth requirement, 24 hard disk devices can be supported. A dual-core server can support up to 48 hard disk devices, but these can only be achieved under ideal conditions. When the customer wants to support more than 48 hard disks or other PCI slot devices need to be physically connected in the server, it is often impossible to reach 48 or 48 hard disk resources are insufficient. At this time, the hard disk storage capacity can be expanded by introducing a disk array card, and redundant information can be used to prevent data access loss when the disk fails.

[0004] At present, a disk array card only occupies one PCI slot but can support 8, 16, 24 or 12 storage hard disks, thereby increasing the number of storage hard disks physically connected to the server. It can be seen that disk array cards play an important role in server storage services. However, the hard disk devices on the disk array card also need to be managed by the BMC (Baseboard Management Controller) to monitor basic information such as temperature and usage capacity. Once monitoring is not possible or cannot be performed for some reason, the hard disk or disk array card will be lost, which will seriously affect the normal operation of the storage business, especially the loss of the disk array card during the restart or the first power-on process.

[0005] In summary, how to monitor hard disk information to avoid hard disk loss of a disk array card is a problem that needs to be further solved in the art. Summary of the invention

[0006] In view of this, the purpose of this application is to provide a hard disk information monitoring method, product, device and storage medium, which can ensure that the disk array card and hard disk will not be lost due to the restart of the target device, thereby reducing the impact on the data backup function, ensuring the security and reliability of the hard disk when the target device is restarted, thereby improving the utilization rate of the target device as a whole, and ensuring the reliability, stability and security of the target device. The specific scheme is as follows:

[0007] In a first aspect, the present application discloses a hard disk information monitoring method, comprising:

[0008] When it is detected that the target device is started, a reset signal of the physical slot where the disk array card in the target device is located is obtained, and it is determined whether the reset signal is at a rising edge;

[0009] The reset signal being at a rising edge is used as a trigger condition to trigger a preset time information statistics operation to obtain a corresponding time information statistics result;

[0010] If the statistical result of the time information meets the preset condition, the register of the disk array card is read to obtain various status information of each hard disk connected to the disk array card.

[0011] Optionally, when the target device is detected to be started, obtaining a reset signal of a physical slot where a disk array card in the target device is located includes:

[0012] When it is detected that the target device is restarted or restarted after power failure, the firmware of the disk array card in the target device detects the PCI slot where the disk array card is located, and obtains a reset signal of the PCI slot.

[0013] Optionally, the triggering of a preset time information statistics operation to obtain a corresponding time information statistics result includes:

[0014] Trigger timing operation or clock cycle statistics operation to obtain timing duration or cycle statistics results;

[0015] Correspondingly, if the statistical result of the time information meets the preset condition, the register of the disk array card is read, including:

[0016] Determine whether the timing duration exceeds a preset duration or whether the period statistical result is greater than a preset clock period threshold;

[0017] If the timing duration exceeds the preset duration or the cycle statistical result is greater than the preset clock cycle threshold, the register of the disk array card is read.

[0018] Optionally, the triggering of the timing operation or the clock cycle counting operation to obtain the timing duration or cycle counting result includes:

[0019] Timing is performed by a time counter or the number of clock cycles in which a rising edge occurs is counted by a clock cycle counter to obtain a timing duration or cycle statistics result;

[0020] Correspondingly, after obtaining various status information of each hard disk connected to the disk array card, the method further includes:

[0021] The time counter or the clock cycle counter is turned off, and the count value of the time counter or the clock cycle counter is cleared.

[0022] Optionally, when the target device is detected to be started, obtaining a reset signal of a physical slot where a disk array card in the target device is located includes:

[0023] When monitoring that the target device is started, determining whether the target device is started for the first time;

[0024] If the target device is not started for the first time, obtaining the current startup state of the target device to obtain the current startup state;

[0025] If the current startup state is a restart state, the PCI slot where the disk array card connected to the baseboard management controller is located, which was saved when the target device was last started, and the physical bus corresponding to the PCI slot and the slave address of the physical bus are obtained through the baseboard management controller, and the reset signal of the PCI slot is detected.

[0026] Optionally, the reading of the register of the disk array card to obtain various status information of each hard disk connected to the disk array card includes:

[0027] The register of the disk array card is read through the baseboard management controller based on the slave address of the physical bus to obtain various status information of each hard disk connected to the disk array card.

[0028] Optionally, the hard disk information monitoring method further includes:

[0029] When the baseboard management controller detects a restart signal, the operation of reading the register of the disk array card based on the slave address of the physical bus is stopped, and a restart after shutdown is performed to restart the target device.

[0030] Optionally, the hard disk information monitoring method further includes:

[0031] If the target device is started for the first time, checking whether the basic input and output system has been started and successfully entered the operating system;

[0032] If the basic input / output system has been started and has successfully entered the operating system, the slot information of the disk array card connected to the baseboard management controller and sent by the basic input / output system is obtained through the baseboard management controller, and the physical bus where the disk array card is located and the slave address of the physical bus are determined according to the slot information, and then the register of the disk array card is read based on the slave address to obtain various status information of each hard disk connected to the disk array card.

[0033] Optionally, the hard disk information monitoring method further includes:

[0034] Reading a power-off signal of a general input / output port currently connected to a central processing unit through the baseboard management controller to obtain a first signal, and acquiring a state of the first signal to obtain a first signal state;

[0035] Determining whether the first signal state is a low level;

[0036] If the first signal state is at a low level, the operation of reading the register of the disk array card based on the slave address is stopped, the physical bus where the disk array card is located is released, and the target device is restarted.

[0037] Optionally, after releasing the physical bus where the disk array card is located and restarting the target device, the method further includes:

[0038] Reading, by the baseboard management controller, a power-off signal of a general input / output port currently connected to the physical slot where the disk array card is located to obtain a second signal, and acquiring a state of the second signal to obtain a second signal state;

[0039] Determining whether the second signal state is a high level;

[0040] If the second signal state is at a high level, the step of triggering the preset time information statistical operation to obtain corresponding time information statistical results is triggered.

[0041] Optionally, after reading the register of the disk array card based on the slave address to obtain various status information of each hard disk connected to the disk array card, the method further includes:

[0042] Displaying various status information of each hard disk in real time;

[0043] Correspondingly, the stopping of the operation of reading the register of the disk array card based on the slave address includes:

[0044] The operation of reading the register of the disk array card based on the slave address and the operation of displaying various status information of each hard disk in real time are stopped.

[0045] Optionally, before checking whether the basic input and output system has been started and the operating system has been successfully entered, the step further includes:

[0046] The key information including the slot information of the PCI slot where the disk array card is located is transmitted to the baseboard management controller through the basic input and output system.

[0047] In a second aspect, the present application discloses a computer program product, including a computer program / instruction, which implements the aforementioned hard disk information monitoring method when executed by a processor.

[0048] In a third aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the processor implements the aforementioned hard disk information monitoring method when executing a computer program stored in the memory.

[0049] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned hard disk information monitoring method is implemented.

[0050] It can be seen that when the present application detects that the target device is started, the reset signal of the physical slot where the disk array card in the target device is located is first obtained, and it is determined whether the reset signal is at a rising edge. Then, the reset signal being at a rising edge is used as a trigger condition to trigger a preset time information statistical operation to obtain a corresponding time information statistical result. If the time information statistical result meets the preset condition, the register of the disk array card is read to obtain various status information of each hard disk connected to the disk array card. When the target device is detected to be started, the application obtains and detects whether the reset signal of the physical slot where the disk array card in the target device is located is at a rising edge. If so, a preset time information statistics operation is triggered, and when the time information statistics result meets the preset conditions, the register of the disk array card is read, so as to obtain various status information of each hard disk connected to the disk array card. Through the above-mentioned judgment mechanism for the reset signal of the physical slot where the disk array card is located, and reading the register of the disk array card when the preset time conditions are met, it can be ensured that the disk array card will not be lost due to the restart of the target device, and then the hard disk connected to the disk array card will not be lost, so that the hard disk cannot be used normally in the system or the hard disk of the disk array card cannot be combined in mode in the system, thereby reducing the impact on the data backup function, ensuring the safety and reliability of the hard disk when the target device is restarted, and at the same time, reducing the limitation that the maximum number of hard disks cannot be supported due to insufficient physical slots, can release more slot resources, thereby improving the utilization rate of the entire target device, and ensuring the reliability, stability and safety of the target device. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0052] Figure 1 A flow chart of a hard disk information monitoring method disclosed in this application;

[0053] Figure 2 A specific server motherboard structure diagram disclosed in this application;

[0054] Figure 3 A swim lane diagram of a specific hard disk information monitoring method disclosed in this application;

[0055] Figure 4 A flowchart of a specific hard disk information monitoring method disclosed in this application;

[0056] Figure 5A flowchart of a specific hard disk information monitoring method disclosed in this application;

[0057] Figure 6 A swim lane diagram of a specific hard disk information monitoring method disclosed in this application;

[0058] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] The present application embodiment discloses a hard disk information monitoring method, see Figure 1 As shown, the method includes:

[0061] Step S11: when it is detected that the target device is started, a reset signal of the physical slot where the disk array card in the target device is located is obtained, and it is determined whether the reset signal is at a rising edge.

[0062] In this embodiment, when the target device (such as a server, computer, etc.) is detected to be started, the reset signal of the physical slot where the disk array card (ie, RAID card) in the target device is located is first obtained, and then it is determined whether the reset signal is at a rising edge.

[0063] It should be pointed out that when a server or computer and other equipment restarts or restarts after a short interval, the baseboard management controller (BMC) can still monitor and manage the hard disk information on the RAID card, and can still perform I2C (Inter-Integrated Circuit) access that was not completed or ended before the restart or before the power-off and restart. This leads to the phenomenon of RAID card loss during the restart process or the power-off and restart process. This is because the RAID card responds to the reset signal during the restart, such as the RST signal (i.e. reset signal) of the PCIE (peripheral component interconnect express, a high-speed serial computer expansion bus standard) where the RAID card is located. There are timing requirements for the rising edge of the RST signal and the access to the I2C bus. For example, within the 4 clock cycles before and after the rising edge of the RST signal, no data transmission is required on the I2C bus of the RAID card, otherwise the RAID card will fail to initialize and will not be recognized. Therefore, when the target device is restarted or powered on after a power outage, if the RST signal of the RAID card and the BMC access to the RAID card through the slave address of the I2C bus and read the data in the register occur at the same time, the RAID card will be lost and an error will be reported, which will cause the hard disk of the RAID card to be lost and cannot be used normally, thereby affecting the storage needs of the business. It can be seen that the RST signal is very important during the restart or power-off process, which will affect the monitoring of hard disk information.

[0064] For details, see Figure 2 As shown, Figure 2A specific server motherboard architecture is shown, which includes components such as a baseboard management controller, a central processing unit 0, a central processing unit 1, and a basic input output system (BIOS). The central processing unit 0 is connected to a disk array card through a PCI link, and the disk array card is connected to four hard disks, namely hard disk 0, hard disk 1, hard disk 2 and hard disk 3. The central processing unit 1 is connected to two riser cards, namely riser 1 and riser 2. In addition, the baseboard management controller is connected to the central processing unit 0 through an LPC (Low pin count Bus, a low pin count interface) bus or a PCI bus, the disk array card is connected to the baseboard management controller through an I2C bus, the basic input output system is connected through an LPC bus, an SPI (Serial Perripheral Interface, a serial peripheral device interface) bus or a QSPI (Quad SPI, a serial peripheral interface technology) bus, and the central processing unit 0 and the central processing unit 1 are connected through a CCIX (Cache Coherent Interconnect for Accelerators, a high-performance interconnect protocol) bus, a UPI (Ultra Path Interconnect, a high-speed interconnect interface standard for connecting processors to each other) bus or GMI (Global Memory Interconnect, a high-speed communication bus) bus connection.

[0065] In a specific implementation, when the target device is detected to be started, the reset signal of the physical slot where the disk array card in the target device is located is obtained, which may specifically include: when the target device is detected to be restarted or restarted after power failure, the PCI slot where the disk array card is located is detected by the firmware of the disk array card located in the target device, and the reset signal of the PCI slot is obtained. For example, when the server is detected to be restarted or restarted after power failure, the PCI slot where the RAID card is located is detected by the firmware (FW, Firm Ware) of the RAID card located in the server, and the reset signal (i.e., RST signal) of the PCI slot is obtained.

[0066] Step S12: taking the reset signal being at a rising edge as a trigger condition to trigger a preset time information statistical operation to obtain a corresponding time information statistical result.

[0067] In this embodiment, the state of the reset signal of the physical slot where the disk array card is located at a rising edge can be used as a trigger condition to trigger the preset time information statistics operation. For example, when the RST signal of the PCI physical slot where the RAID card is located is at a rising edge, the preset time information statistics operation is triggered to obtain the corresponding time information statistics result.

[0068] Specifically, the triggering of the preset time information statistics operation to obtain the corresponding time information statistics result may include: triggering a timing operation or a clock cycle statistics operation to obtain a timing duration or cycle statistics result. For example, when the RST signal of the PCI physical slot where the RAID card is located is at a rising edge, the firmware of the RAID card is used to time or count the number of occurrences of the clock cycle (i.e., the accumulated clock cycle of the rising edge of the RST signal).

[0069] In a specific implementation, the triggering timing operation or clock cycle counting operation to obtain the timing duration or cycle counting result may specifically include: timing by a time counter or counting the number of clock cycles in which the rising edge appears by a clock cycle counter to obtain the timing duration or cycle counting result. That is, when the reset signal is at a rising edge, timing is performed by a time counter or the number of clock cycles in which the rising edge appears by a clock cycle counter to obtain the corresponding timing duration or cycle counting result.

[0070] Step S13: If the statistical result of the time information meets the preset condition, the register of the disk array card is read to obtain various status information of each hard disk connected to the disk array card.

[0071] In this embodiment, if the statistical result of the time information meets the preset conditions, the register of the above-mentioned disk array card is read to obtain various status information of each hard disk connected to the disk array card; wherein the status information includes but is not limited to the health status, operating temperature, remaining capacity, manufacturer information, quantity information, etc. of the hard disk.

[0072] Specifically, if the statistical result of the time information meets the preset condition, then the register of the disk array card is read, which may include: judging whether the timing duration exceeds the preset duration or whether the cycle statistical result is greater than the preset clock cycle threshold; if the timing duration exceeds the preset duration or the cycle statistical result is greater than the preset clock cycle threshold, then the register of the disk array card is read. That is, judging whether the timing duration obtained by the time counter exceeds the preset duration or judging whether the cycle statistical result counted by the clock cycle counter is greater than the preset clock cycle threshold, if so, then the register of the RAID card is read.

[0073] Furthermore, after obtaining various status information of each hard disk connected to the disk array card, the method may further include: closing the time counter or the clock cycle counter, and clearing the count value of the time counter or the clock cycle counter. That is, after obtaining the status information of each hard disk, closing and clearing the count value of the time counter or the clock cycle counter, closing the time counter or the clock cycle counter and setting it to 0 can facilitate the counting operation at the next startup.

[0074] In a specific embodiment, see Figure 3 As shown, when it is detected that the server is restarted or restarted after power failure, the reset signal of the PCI slot where the RAID card is located is detected by the firmware of the RAID card, and it is determined whether the reset signal is on the rising edge (that is, whether the signal is at a high level). If it is not on the rising edge, the firmware continues to detect it. If it is on the rising edge, the time counter is used to count and determine whether the timing time exceeds 200ms, or the clock cycle counter is used to count the clock cycles accumulated when the reset signal rises, and determine whether the number of clock cycles exceeds 4 clock cycles. If it does not exceed 200ms (milliseconds) or does not exceed 4 clock cycles, the time counter or the clock cycle counter is continued to be accumulated. If it exceeds 200ms or exceeds 4 clock cycles, the count value of the time counter or the clock cycle counter is closed and cleared, and the I2C bus of the PCI link is initialized by the firmware of the RAID card, and the register of the RAID card is read through the BMC to obtain the status information of each hard disk connected to the RAID card.

[0075] It can be seen that when the embodiment of the present application monitors the startup of the target device, the reset signal of the physical slot where the disk array card in the target device is located is first obtained, and it is determined whether the reset signal is at a rising edge. Then, the reset signal being at a rising edge is used as a trigger condition to trigger a preset time information statistical operation to obtain a corresponding time information statistical result. If the time information statistical result meets the preset condition, the register of the disk array card is read to obtain various status information of each hard disk connected to the disk array card. When the target device is detected to be started, the embodiment of the present application obtains and detects whether the reset signal of the physical slot where the disk array card in the target device is located is at a rising edge. If so, a preset time information statistical operation is triggered, and when the time information statistical result meets the preset condition, the register of the disk array card is read, so as to obtain various status information of each hard disk connected to the disk array card. Through the above-mentioned judgment mechanism for the reset signal of the physical slot where the disk array card is located, and reading the register of the disk array card when the preset time condition is met, it can be ensured that the disk array card will not be lost due to the restart of the target device, and then the hard disk connected to the disk array card will not be lost, so that the hard disk cannot be used normally in the system or cannot be combined in mode by the hard disk of the disk array card in the system, thereby reducing the impact on the data backup function, ensuring the safety and reliability of the hard disk when the target device is restarted, and at the same time, reducing the limitation that the maximum number of hard disks cannot be supported due to insufficient physical slots, can release more slot resources, thereby improving the utilization rate of the entire target device, and ensuring the reliability, stability and safety of the target device.

[0076] The present application embodiment discloses a specific hard disk information monitoring method, see Figure 4 As shown, the method includes:

[0077] Step S21: when it is detected that the target device is started, it is determined whether the target device is started for the first time.

[0078] In this embodiment, when a target device, such as a server, is detected to be started, it is first determined whether the server is started for the first time (ie, the first time it is started).

[0079] Step S22: If the target device is not started for the first time, the current startup state of the target device is obtained to obtain the current startup state.

[0080] In this embodiment, if the target device is not started for the first time, the current startup state of the target device is acquired to obtain the corresponding current startup state.

[0081] Step S23: If the current startup state is a restart state, the PCI slot where the disk array card connected to the baseboard management controller is located, which is saved when the target device was last started, and the physical bus corresponding to the PCI slot and the slave address of the physical bus are obtained through the baseboard management controller, and the reset signal of the PCI slot is detected, and then it is determined whether the reset signal is on a rising edge.

[0082] In this embodiment, if the current startup state of the target device is a restart state, the PCI slot where the disk array card connected to the baseboard management controller (i.e., BMC) is located, which is saved when the target device was last started, and the physical bus (such as an I2C bus) corresponding to the PCI slot and the slave address of the physical bus (such as an I2C address) are further obtained through the baseboard management controller (i.e., BMC), and then the reset signal of the PCI slot is detected, and it is determined whether the reset signal is at a rising edge.

[0083] Step S24: taking the reset signal being at a rising edge as a trigger condition to trigger a preset time information statistical operation to obtain a corresponding time information statistical result.

[0084] Step S25: If the time information statistics result meets the preset condition, the register of the disk array card is read through the baseboard management controller based on the slave address of the physical bus to obtain various status information of each hard disk connected to the disk array card.

[0085] For example, see Figure 5 As shown, when the timing time exceeds 200ms, or the number of clock cycles exceeds 4 clock cycles, the register of the disk array card is read through the BMC based on the I2C address corresponding to the I2C bus, so as to obtain the status information of each hard disk connected to the above disk array card.

[0086] Furthermore, in the process of reading the register of the disk array card, it may also include: when the baseboard management controller detects a restart signal, stopping the operation of reading the register of the disk array card based on the slave address of the physical bus, and performing a restart after shutdown to restart the target device. That is, when the BMC receives the restart signal, the current action of reading the register of the disk array card based on the slave address of the physical bus is stopped, and the target device is shut down and restarted; wherein the restart signal may come from a power button, a restart command under the system, a restart command of an IPMI (Intelligent Platform Management Interface) command managed by the BMC, a restart signal control on the BMC side, etc., but no matter which restart signal comes from, the power-off restart is performed through a GPIO (General-purpose input / output) signal that controls the power-on and power-off timing. Therefore, when the BMC detects that the power-off signal of the server is triggered, the function of reading the register of the RAID card based on the slave address of the I2C bus of the PCI link where the RAID card is located is immediately stopped or disabled to ensure that the restart function of the server is executed normally.

[0087] For a more specific processing procedure of the above step S24, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.

[0088] It can be seen that in the embodiment of the present application, when the target device is not started for the first time, the startup state of the current target device is obtained to obtain the current startup state, and when the current startup state is a restart state, the PCI slot where the disk array card connected to the baseboard management controller is located, which is saved when the target device was last started, and the physical bus corresponding to the PCI slot and the slave address of the physical bus are obtained through the baseboard management controller, and the reset signal of the PCI slot is detected, and then it is determined whether the reset signal is on a rising edge. If so, the reset signal being on a rising edge is used as a trigger condition to trigger a preset time information statistical operation, and the corresponding time information statistical result is obtained, and When the statistical result of the time information meets the preset conditions, the register of the disk array card is read through the baseboard management controller and based on the slave address of the physical bus, so as to obtain various status information of each hard disk connected to the disk array card. By controlling the reading timing of the I2C bus of the physically connected RAID card through the BMC, the status information of the hard disk of the RAID card is monitored in real time, and it can be ensured that the disk array card will not be lost due to the restart of the target device, and then the hard disk connected to the disk array card will not be lost, thereby ensuring the safety and reliability of the hard disk when the target device is restarted, and at the same time, reducing the purchase cost of the hard disk. In addition, the RAID mode of the disk array card can better back up the hard disk data, occupy less PCI link resources of the server and achieve the maximum number of hard disks supported, which meets the use and application requirements of customers in storage business, thereby improving the user's work efficiency, ensuring the reliability of the target device, and providing great beneficial measures for the stability and security of the target device, the operation and maintenance of the data center and the service life of the target device.

[0089] The present application embodiment discloses a specific hard disk information monitoring method, see Figure 5 As shown, the method includes:

[0090] Step S31: when it is detected that the target device is started, it is determined whether the target device is started for the first time.

[0091] Step S32: If the target device is started for the first time, check whether the basic input and output system has been started and successfully entered the operating system.

[0092] In this embodiment, if the target device is started for the first time, a check is performed to determine whether the basic input and output system (ie, BIOS) has been started and has successfully entered the operating system.

[0093] It should be noted that the step of checking whether the basic input / output system has been started and successfully entered the operating system specifically includes: transmitting key information including the slot information of the PCI slot where the disk array card is located to the baseboard management controller through the basic input / output system. That is, if the target device is started for the first time, the key information including the slot information of the PCI slot where the RAID card is located is sent to the BMC through the BIOS.

[0094] It is understandable that when the server is powered on for the first time, since the BIOS has not yet passed the server's physical configuration information and key information such as the core information and location information of each component to the BMC, the BMC can start normally without any operation. When the server has completed the BIOS startup and successfully entered the operating system, the BIOS has passed the physical location information and other key information of the RAID card to the BMC. At this time, the BMC can confirm the slave address of the I2C channel of the RAID card (i.e., the I2C address) based on the PCI slot information of the RAID card transmitted by the BIOS, and then read the register of the RAID card with the I2C address, so as to obtain the status information of the hard disk physically connected to the RAID card, including but not limited to the location information of the hard disk, the temperature information of the hard disk, the in-place information of the hard disk, the manufacturer information of the hard disk, the capacity information of the hard disk, the remaining capacity information of the hard disk, etc.

[0095] Step S33: If the basic input / output system has been started and has successfully entered the operating system, the slot information of the disk array card connected to the baseboard management controller and sent by the basic input / output system is obtained through the baseboard management controller, and the physical bus where the disk array card is located and the slave address of the physical bus are determined according to the slot information, and then the register of the disk array card is read based on the slave address to obtain various status information of each hard disk connected to the disk array card.

[0096] In this embodiment, if the BIOS has been started and successfully entered the operating system, the slot information of the RAID card connected to the BMC sent by the BIOS can be obtained through the BMC, and then the I2C bus where the RAID card is located and the corresponding slave address (I2C address) are determined according to the slot information, and finally the register of the RAID card is read based on the slave address (I2C address) to obtain the status information of each hard disk connected to the RAID card.

[0097] Furthermore, in the process of reading the register of the disk array card based on the slave address, it can also include: reading the power-off signal of the general input / output port currently connected to the central processing unit through the baseboard management controller to obtain a first signal, and obtaining the state of the first signal to obtain the first signal state; judging whether the first signal state is a low level; if the first signal state is a low level, stopping the operation of reading the register of the disk array card based on the slave address, releasing the physical bus where the disk array card is located, and restarting the target device. In this embodiment, in the process of obtaining the status information of each hard disk, the power-off signal of the GPIO currently connected to the CPU can be read through the BMC to obtain the first signal, and the state of the first signal can be obtained to obtain the first signal state, and then judging whether the first signal state is a low level, if so, it indicates that the target device needs to be restarted, at this time, the work of reading the register of the RAID card based on the slave address can be stopped first, and the physical bus where the RAID card is located can be released, so as to realize the restart of the target device, and ensure that the restart function of the server is executed normally.

[0098] In this embodiment, after releasing the physical bus where the disk array card is located and restarting the target device, the method may also include: reading the power-off signal of the general input / output port currently connected to the physical slot where the disk array card is located through the baseboard management controller to obtain a second signal, and obtaining the state of the second signal to obtain the second signal state; judging whether the second signal state is a high level; if the second signal state is a high level, triggering the preset time information statistics operation to obtain the corresponding time information statistics result. That is, reading the power-off signal of the GPIO currently connected to the PCI slot where the RAID card is located through the BMC to obtain the second signal, and obtaining the state of the second signal to obtain the corresponding second signal state, if the second signal state is a high level, triggering the preset time information statistics operation, i.e., triggering step S12.

[0099] In this embodiment, after reading the register of the disk array card based on the slave address to obtain various status information of each hard disk connected to the disk array card, it can also include: displaying various status information of each hard disk in real time; correspondingly, stopping the operation of reading the register of the disk array card based on the slave address can specifically include: stopping the operation of reading the register of the disk array card based on the slave address and the operation of displaying various status information of each hard disk in real time. In this embodiment, after obtaining various status information of each hard disk connected to the disk array card, it can be displayed in real time on the user's front-end interface, so as to facilitate the user to view it in time. In addition, when the reading of the register of the disk array card is stopped, the display of various status information of the hard disk is stopped at the same time.

[0100] For a more specific processing procedure of the above step S31, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.

[0101] It can be seen that, in the embodiment of the present application, when the target device is started for the first time, it is checked whether the basic input and output system has been started and the operating system has been successfully entered. If yes, the slot information of the disk array card connected to the baseboard management controller and sent by the basic input and output system is obtained through the baseboard management controller, and the physical bus where the disk array card is located and the slave address of the physical bus are determined according to the slot information, and then the register of the disk array card is read based on the slave address, so as to obtain various status information of each hard disk connected to the disk array card. Through the above method, when the target device is started for the first time, real-time monitoring of various status information of the hard disk connected to the disk array card is realized, which can ensure that the disk array card will not be lost due to the restart of the target device, and then the hard disk connected to the disk array card will not be lost, thereby ensuring the safety and reliability of the hard disk when the target device is restarted.

[0102] For details, see Figure 6As shown, after the server is powered on, it is first determined whether this startup is the first startup. If it is the first startup, key information such as the core information and location information of each component will be transmitted to the BMC during the BIOS startup process. After the BIOS startup is completed, the operating system will be entered. At this time, the location information of the RAID card transmitted by the BIOS can be parsed by the BMC, and then the I2C bus and I2C slave address where the RAID card is located are determined based on the location information, and then the content in the register of the RAID card is read through the I2C slave address to obtain the status information of the hard disk connected to the RAID card, thereby realizing real-time monitoring of the hard disk status information. Furthermore, the server continues to start and enter the operating system. When a restart signal is detected, the read and write functions of the physical I2C link where the RAID card is located are turned off, and a restart action is performed. If it is not the first startup, the startup status of the server is obtained. If it is the restart status, the slave address of the I2C bus of the PCI link where the RAID card is located, which has been saved in the last startup process, is obtained through the BMC. Then, it is detected whether the RST signal of the PCI link where the RAID card is located is on the rising edge. If it is on the rising edge, whether the time for the next rising edge exceeds 200ms or whether it exceeds 4 clock cycles. If it exceeds, the content in the register of the RAID card is read through the I2C slave address to obtain the status information of the hard disk connected to the RAID card.

[0103] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0104] Figure 7 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the hard disk information monitoring method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0105] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0106] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0107] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the hard disk information monitoring method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0108] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the hard disk information monitoring method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.

[0109] Furthermore, an embodiment of the present application also discloses a computer program product, including a computer program / instruction, which implements the steps of the hard disk information monitoring method disclosed above when executed by a processor.

[0110] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0111] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0112] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0113] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0114] The above is a detailed introduction to a hard disk information monitoring method, product, device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A hard disk information monitoring method, characterized in that: include: When it is detected that the target device is started, a reset signal of the physical slot where the disk array card in the target device is located is obtained, and it is determined whether the reset signal is at a rising edge; The reset signal being at a rising edge is used as a trigger condition to trigger a preset time information statistics operation to obtain a corresponding time information statistics result; If the statistical result of the time information meets the preset condition, the register of the disk array card is read to obtain various status information of each hard disk connected to the disk array card; The triggering of the preset time information statistical operation to obtain the corresponding time information statistical result includes: triggering the timing operation or the clock cycle statistical operation to obtain the timing duration or cycle statistical result; Correspondingly, if the statistical result of the time information meets the preset condition, the register of the disk array card is read, including: judging whether the timing duration exceeds the preset duration or whether the cycle statistical result is greater than the preset clock cycle threshold; if the timing duration exceeds the preset duration or the cycle statistical result is greater than the preset clock cycle threshold, the register of the disk array card is read.

2. The hard disk information monitoring method according to claim 1, characterized in that: When the target device is detected to be started, obtaining a reset signal of the physical slot where the disk array card in the target device is located includes: When it is detected that the target device is restarted or restarted after power failure, the firmware of the disk array card in the target device detects the PCI slot where the disk array card is located, and obtains a reset signal of the PCI slot.

3. The hard disk information monitoring method according to claim 1, characterized in that: The triggering of the timing operation or the clock cycle counting operation to obtain the timing duration or cycle counting result includes: Timing is performed by a time counter or the number of clock cycles in which a rising edge occurs is counted by a clock cycle counter to obtain a timing duration or cycle statistics result; Correspondingly, after obtaining various status information of each hard disk connected to the disk array card, the method further includes: The time counter or the clock cycle counter is turned off, and the count value of the time counter or the clock cycle counter is cleared.

4. The hard disk information monitoring method according to claim 1, characterized in that: When the target device is detected to be started, obtaining a reset signal of the physical slot where the disk array card in the target device is located includes: When monitoring that the target device is started, determining whether the target device is started for the first time; If the target device is not started for the first time, obtaining the current startup state of the target device to obtain the current startup state; If the current startup state is a restart state, the PCI slot where the disk array card connected to the baseboard management controller is located, which was saved when the target device was last started, and the physical bus corresponding to the PCI slot and the slave address of the physical bus are obtained through the baseboard management controller, and the reset signal of the PCI slot is detected.

5. The hard disk information monitoring method according to claim 4, characterized in that: The register of the disk array card is read to obtain various status information of each hard disk connected to the disk array card, including: The register of the disk array card is read through the baseboard management controller based on the slave address of the physical bus to obtain various status information of each hard disk connected to the disk array card.

6. The hard disk information monitoring method according to claim 5, characterized in that: Also includes: When the baseboard management controller detects a restart signal, the operation of reading the register of the disk array card based on the slave address of the physical bus is stopped, and a restart after shutdown is performed to restart the target device.

7. The hard disk information monitoring method according to claim 4, characterized in that: Also includes: If the target device is started for the first time, checking whether the basic input and output system has been started and successfully entered the operating system; If the basic input / output system has been started and has successfully entered the operating system, the slot information of the disk array card connected to the baseboard management controller and sent by the basic input / output system is obtained through the baseboard management controller, and the physical bus where the disk array card is located and the slave address of the physical bus are determined according to the slot information, and then the register of the disk array card is read based on the slave address to obtain various status information of each hard disk connected to the disk array card.

8. The hard disk information monitoring method according to claim 7, characterized in that: Also includes: Reading a power-off signal of a general input / output port currently connected to a central processing unit through the baseboard management controller to obtain a first signal, and acquiring a state of the first signal to obtain a first signal state; Determining whether the first signal state is a low level; If the first signal state is at a low level, the operation of reading the register of the disk array card based on the slave address is stopped, the physical bus where the disk array card is located is released, and the target device is restarted.

9. The hard disk information monitoring method according to claim 8, characterized in that: After releasing the physical bus where the disk array card is located and restarting the target device, the method further includes: Reading, by the baseboard management controller, a power-off signal of a general input / output port currently connected to the physical slot where the disk array card is located to obtain a second signal, and acquiring a state of the second signal to obtain a second signal state; Determining whether the second signal state is a high level; If the second signal state is at a high level, the step of triggering the preset time information statistical operation to obtain corresponding time information statistical results is triggered.

10. The hard disk information monitoring method according to claim 8, characterized in that: After reading the register of the disk array card based on the slave address to obtain various status information of each hard disk connected to the disk array card, the method further includes: Displaying various status information of each hard disk in real time; Correspondingly, the stopping of the operation of reading the register of the disk array card based on the slave address includes: The operation of reading the register of the disk array card based on the slave address and the operation of displaying various status information of each hard disk in real time are stopped.

11. The hard disk information monitoring method according to any one of claims 7 to 10, characterized in that: Before checking whether the basic input and output system has been started and the operating system has been successfully entered, the method further includes: The key information including the slot information of the PCI slot where the disk array card is located is transmitted to the baseboard management controller through the basic input and output system.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the hard disk information monitoring method as described in any one of claims 1 to 11 is implemented.

13. An electronic device, characterized in that: It comprises a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the hard disk information monitoring method as claimed in any one of claims 1 to 11 is implemented.

14. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the hard disk information monitoring method as described in any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Storage device, CPLD device, reset method of storage device and storage medium

    CN113849060A

  • High-availability NAS storage service method and system

    CN116204502A