A storage hard disk power-on state monitoring method, device, equipment and medium

By using the SAS expander and chassis manager to collaboratively monitor the power-on status of storage hard drives, the problem of hard drive power failure is solved, enabling timely handling of faulty hard drives and improving the security and data transmission efficiency of the storage system.

CN115373936BActive Publication Date: 2025-11-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210908162.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-11-07
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

In existing technologies, storage hard drives are prone to power outages and cannot be monitored in real time, which threatens data integrity and business continuity.

Method used

The SAS extender is used to monitor the power-on status of the hard drive and send a notification to the chassis manager when an anomaly occurs. The chassis manager obtains the component attribute information, determines the power-loss hard drive, and sends a power-on command. The status information after power-on is obtained periodically, and an alarm is sent to the user terminal.

Benefits of technology

It enables timely detection and handling of power-loss hard drives, improving the security and data transmission efficiency of the storage system, and ensuring data integrity and business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115373936B_ABST
    Figure CN115373936B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of storage hard disk power-on state monitoring method, device, equipment and medium, several storage hard disks are respectively arranged in several cases, monitoring method includes: SAS expander obtains the power-on state information of all storage hard disks, and sends power-on abnormal notification information to case manager;Case manager obtains the component attribute information of each case by SAS expander;Wherein, the component attribute information includes the power-on state information of each storage hard disk in each case;Case manager obtains the power-off hard disk information according to the power-on state information of each storage hard disk, and sends the power-on instruction to the corresponding power-off hard disk;Case manager obtains the power-on state information after the power-on of power-off hard disk, and when the power-on state information after the power-on of power-off hard disk appears exception, it sends hard disk power-off alarm information to user end.Through the above technical scheme, the problem that current storage hard disk is prone to power-off, cannot be monitored in real time can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of storage hard disks, in particular to a storage hard disk power-on state monitoring method, device, equipment and medium. BACKGROUND

[0002] In the big data era, massive data needs professional storage equipment for storage. Due to the preciousness of data, effectively ensuring the integrity of data in the system has become a basic requirement of the storage equipment.

[0003] As a very important part of the storage equipment, the hard disk needs to monitor the properties of the hard disk in real time when storing data. Specifically, the power-on state of the hard disk should be stable after the hard disk is connected to the storage equipment. However, in the long-term use process, it is inevitable that the hard disk and the storage equipment will not be in good contact or other problems, which will cause the hard disk to power off. At this time, the hard disk becomes a faulty hard disk.

[0004] Therefore, in the process of server running, when a faulty hard disk is detected, it needs to be monitored in real time and repaired or replaced in time to ensure data integrity and normal business operation. SUMMARY

[0005] In order to solve the above technical problems, the present application provides a storage hard disk power-on state monitoring method, device, equipment and medium, which is used to solve the problem that the current storage hard disk is prone to power off and cannot be monitored in real time.

[0006] To achieve the above purpose, the present application provides a storage hard disk power-on state monitoring method, wherein a plurality of storage hard disks are arranged in a plurality of cases, and the monitoring method comprises the following steps:

[0007] The SAS expander obtains the power-on state information of all storage hard disks, and sends power-on abnormal notification information to the case manager when at least one storage hard disk has abnormal power-on state;

[0008] The case manager obtains the component attribute information of each case through the SAS expander; wherein the component attribute information includes the power-on state information of each storage hard disk in each case;

[0009] The case manager obtains the power-off hard disk information according to the power-on state information of each storage hard disk, and sends the power-on command to the corresponding power-off hard disk;

[0010] The case manager obtains the power-on state information of the power-off hard disk after power-on according to the predetermined time, and sends the hard disk power-off alarm information to the user terminal when the power-on state information of the power-off hard disk after power-on is abnormal.

[0011] Further, the chassis manager acquires power-off hard disk information according to the power-on state information of each storage hard disk, and sends a power-on command to the corresponding power-off hard disk, specifically including:

[0012] The chassis manager acquires the power-on state flag in the power-on state information of the current storage hard disk and the in-place state flag;

[0013] When the in-place state flag is correct and the power-on state flag is normal, the chassis manager determines that the current storage hard disk is in a power-off state;

[0014] The chassis manager acquires the power-off hard disk information of the current storage hard disk, and sends a power-on command to the current storage hard disk.

[0015] Further, the chassis manager acquires the power-off hard disk information of the current storage hard disk, and sends a power-on command to the current storage hard disk, specifically including:

[0016] The chassis manager acquires the chassis information and the disk slot information corresponding to the current storage hard disk, and sends the power-on command in the power-on command to the chassis and the disk slot corresponding to the chassis information and the disk slot information.

[0017] Further, the chassis manager acquires the component attribute information of each chassis through the SAS expander, specifically including:

[0018] The chassis manager sends a discovery request to the SAS expander;

[0019] The SAS expander acquires the component attribute information of each chassis through the discovery process.

[0020] Further, when at least one storage hard disk power-on state is abnormal, the chassis manager is sent a power-on abnormality notification information, specifically including:

[0021] When at least one storage hard disk power-on state is abnormal, the SAS expander issues a broadcast event; wherein the broadcast event includes a request for the chassis manager to receive data notification information;

[0022] After the broadcast event passes through the driver layer, the protocol layer and reaches the service layer in turn, the chassis manager in the service layer receives the broadcast event.

[0023] Further, before the chassis manager acquires power-off hard disk information according to the power-on state information of each storage hard disk, and sends a power-on command to the corresponding power-off hard disk, the monitoring method further includes:

[0024] The chassis manager obtains chassis in-place state information of the current chassis according to the component attribute information of each component;

[0025] When the chassis in-place state information of the current chassis is normal, the chassis manager obtains power-on state information of each storage hard disk in the current chassis.

[0026] Further, before the chassis manager obtains power-off hard disk information according to the power-on state information of each storage hard disk and sends a power-on instruction to the corresponding power-off hard disk, the monitoring method further comprises:

[0027] The chassis manager obtains power supply unit state information of each component of the current chassis according to the component attribute information of each component;

[0028] When the power supply unit state information of each component is normal, the chassis manager obtains power-on state information of each storage hard disk in the current chassis.

[0029] The application also provides a monitoring device for the power-on state of a storage hard disk, which is used to implement the monitoring method for the power-on state of a storage hard disk as described above, and the monitoring device comprises:

[0030] A SAS expander is configured to obtain power-on state information of all storage hard disks and send power-on abnormality notification information to the chassis manager when at least one storage hard disk has an abnormal power-on state.

[0031] The chassis manager is configured to obtain component attribute information of each component of each chassis through the SAS expander, wherein the component attribute information comprises power-on state information of each storage hard disk in each chassis.

[0032] The chassis manager is further configured to traverse each storage hard disk in each chassis and obtain power-off hard disk information according to the power-on state information of each storage hard disk in each chassis and send a power-on instruction to the corresponding power-off hard disk.

[0033] The chassis manager is further configured to obtain power-on state information of the power-off hard disk after power-on according to a predetermined time and send hard disk power-off alarm information to a user terminal when the power-on state information of the power-off hard disk after power-on is abnormal.

[0034] The application further provides a computer device comprising a memory, a processor and a computer program, wherein the computer program is stored in the memory and can be run on the processor, and the processor implements the following steps when the computer program is executed:

[0035] The SAS expander obtains power-on state information of all storage hard disks and sends power-on abnormality notification information to the chassis manager when at least one storage hard disk has an abnormal power-on state.

[0036] The chassis manager obtains component attribute information of each chassis through the SAS expander; wherein the component attribute information comprises power-on state information of each storage hard disk in each chassis;

[0037] The chassis manager obtains power-off hard disk information according to the power-on state information of each storage hard disk, and sends a power-on instruction to the corresponding power-off hard disk;

[0038] The chassis manager obtains power-on state information of the power-off hard disk after power-on at a predetermined time, and sends a power-off alarm information to the user terminal when the power-on state information of the power-off hard disk after power-on is abnormal.

[0039] The application further provides a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to realize the following steps:

[0040] The SAS expander obtains power-on state information of all storage hard disks, and sends power-on abnormality notification information to the chassis manager when at least one storage hard disk has abnormal power-on state;

[0041] The chassis manager obtains component attribute information of each chassis through the SAS expander; wherein the component attribute information comprises power-on state information of each storage hard disk in each chassis;

[0042] The chassis manager obtains power-off hard disk information according to the power-on state information of each storage hard disk, and sends a power-on instruction to the corresponding power-off hard disk;

[0043] The chassis manager obtains power-on state information of the power-off hard disk after power-on at a predetermined time, and sends a power-off alarm information to the user terminal when the power-on state information of the power-off hard disk after power-on is abnormal.

[0044] The above technical solutions of the application have the following technical effects compared with the prior art:

[0045] In the application, the SAS expander is used to monitor the power-on state of each hard disk, and the SAS expander can read and record the power-on state of the hard disk; when an abnormal power-on state of the hard disk is found, the SAS expander sends power-on abnormality notification information to the chassis manager;

[0046] After receiving the power-on abnormality notification information, the chassis manager obtains current component attribute information of the chassis from the SAS expander, which includes the power-on state of each hard disk;

[0047] The chassis manager obtains the power-on state of the hard disk, and then determines whether an abnormal power-off occurs; if the abnormal power-off exists, the chassis manager performs a power-on operation on the faulty hard disk;

[0048] Then, the chassis manager determines whether to report an alarm according to the actual power-on result of the faulty hard disk, so as to inform the user to replace the corresponding faulty hard disk.

[0049] In summary, the SAS expander is used to monitor the power-on state in real time, the chassis manager is used to diagnose the power-off and perform the power-on operation, so that the faulty hard disk can be found in time, and the user can effectively handle the faulty hard disk in time, thereby effectively ensuring the safety of the storage system and the data transmission efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0051] Figure 1 is a flowchart of the monitoring method of the power-on state of the storage hard disk in the first embodiment of the present application;

[0052] Figure 2 is an architecture diagram of the storage system in the actual embodiment of the present application;

[0053] Figure 3 is a schematic diagram of the chassis manager analyzing the power supply state data in the actual embodiment of the present application;

[0054] Figure 4 is a schematic diagram of the chassis manager analyzing the power-on state flag and the in-place state flag in the actual embodiment of the present application;

[0055] Figure 5 is a specific flowchart of the monitoring method in the actual embodiment of the present application;

[0056] Figure 6 is a structure block diagram of the monitoring device of the power-on state of the storage hard disk in the second embodiment of the present application;

[0057] Figure 7 is an internal structure diagram of the computer device in the second embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the objects, technical solutions and advantages of the present application clearer, the following will be combined with the drawings of the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0059] Embodiment one:

[0060] As shown in the figure, the present application provides a monitoring method for power-on state of storage hard disks. A plurality of storage hard disks are arranged in a plurality of cases, and the monitoring method comprises the following steps: Figure 1 S1, the SAS expander acquires power-on state information of all the storage hard disks, and sends power-on abnormality notification information to the case manager when power-on state of at least one storage hard disk is abnormal;

[0061] S2, the case manager acquires component attribute information of each case through the SAS expander; wherein, the component attribute information comprises power-on state information of each storage hard disk in each case;

[0062] S5, the case manager acquires power-off hard disk information according to the power-on state information of each storage hard disk, and sends power-on command to the corresponding power-off hard disk;

[0063] S6, the case manager acquires power-on state information of the power-off hard disk after power-on according to the predetermined time, and sends hard disk power-off alarm information to the user terminal when the power-on state information of the power-off hard disk after power-on is abnormal.

[0064] In a specific embodiment, the SAS expander is used to monitor the power-on state of each hard disk. The SAS expander can read and record the power-on state of the hard disk. When the power-on state of the hard disk is found to be abnormal, the SAS expander sends power-on abnormality notification information to the case manager.

[0065] After receiving the power-on abnormality notification information, the case manager acquires the current attributes of the case from the SAS expander, including the power-on state of each hard disk.

[0066] After the case manager acquires the power-on state of the hard disk, it determines whether there is an abnormal power-off. If there is an abnormal power-off, the faulty hard disk is re-powered.

[0067] Then, the case manager determines whether to report an alarm according to the actual power-on result of the faulty hard disk, to inform the user to replace the corresponding faulty hard disk.

[0068]

[0069] ​In summary, the SAS expander is used to monitor the power-on state in real time, the chassis manager is used to diagnose the power-off state and the power-on operation, so that the power-off hard disk can be found in time, and the user can effectively deal with the problem hard disk in time, thereby effectively ensuring the safety of the storage system and the data transmission efficiency.

[0070] In practical applications, SAS (Serial Attached SCSI) is a computer hub technology, which is mainly used for data transmission of peripheral components, such as hard disks, CD-ROMs and other devices.

[0071] The SAS expander (SAS Expander) is an expander that complies with the SAS protocol and can be used for chassis management. The downstream port of the SAS expander can be connected to a hard disk.

[0072] SES (SCSI Enclosure Services) is a standard for chassis management developed by the T10 Technical Committee.

[0073] EN (Enclosure Mangement) represents chassis management; slot represents the slot of the inserted hard disk.

[0074] In a preferred embodiment, S5 specifically includes:

[0075] S51, the chassis manager obtains the power-on state flag and the in-place state flag in the power-on state information of the current storage hard disk;

[0076] S52, when the in-place state flag is correct and the power-on state flag is normal, the chassis manager determines that the current storage hard disk is in a power-off state;

[0077] S53, the chassis manager obtains the power-off hard disk information of the current storage hard disk, and sends a power-on command to the current storage hard disk.

[0078] In a specific embodiment, the power-on state information of the current storage hard disk includes the power-on state flag (DEVICE OFF) and the in-place state flag (COMMON STATUS) of the current storage hard disk. When the hard disk is in place and the DEVICE OFF bit is set to 1, it is considered that the hard disk has a power-off, that is, the power-off state needs to meet the condition: ((COMMON STATUS! = 0x05) && (DEVICE OFF = 1)).

[0079] In a preferred embodiment, S53 specifically includes:

[0080] The chassis manager obtains chassis information and disk slot information corresponding to the current storage hard disk, and sends the power-on instruction in the power recovery instruction to the chassis and disk slot corresponding to the chassis information and disk slot information.

[0081] In specific embodiments, when the current storage hard disk meets the power-off judgment condition and power-off occurs, the chassis and the hard disk slot information where the hard disk is located are recorded.

[0082] Then, the chassis manager issues a re-power-on instruction to the hard disk slot in the chassis to perform power recovery operation. If the hard disk is powered on normally, it means that the power recovery is successful. If the hard disk is not powered on normally, an alarm of hard disk power-off needs to be reported to notify the user to replace the hard disk in time.

[0083] In a preferred embodiment, S2 specifically comprises:

[0084] S21 The chassis manager sends a discovery request to the SAS expander.

[0085] S22 The SAS expander obtains the component attribute information of each chassis through the discovery process.

[0086] In specific embodiments, when the chassis manager receives the power-on abnormality notification information, it immediately initiates a discovery request to the SAS expander. The discovery request process can comply with the SES protocol requirements.

[0087] Through the discovery request process, the chassis manager can obtain the information of all components in all chassis, including the power-on state of each hard disk. Then, the chassis manager judges the power-on state of each hard disk in each chassis, thereby realizing power-off diagnosis.

[0088] In a preferred embodiment, in S1, the power-on abnormality notification information is sent to the chassis manager when at least one storage hard disk has a power-on state abnormality, specifically comprising:

[0089] S12 When at least one storage hard disk has a power-on state abnormality, the SAS expander issues a broadcast event. The broadcast event includes a request for the chassis manager to receive data notification information.

[0090] S13 After the broadcast event passes through the driver layer, the protocol layer and reaches the service layer, the chassis manager in the service layer receives the broadcast event.

[0091] In specific embodiments, when a hard disk power-off abnormality occurs, the SAS expander immediately issues a broadcast event to request the chassis manager to receive monitoring data.

[0092] The broadcast event passes through the driver layer and the protocol layer to the service layer in turn, the broadcast event is processed by the chassis manager in the service layer, and each component attribute information of each chassis is acquired by initiating a discovery request to the SAS extender.

[0093] In a preferred embodiment, before S5, the monitoring method further comprises:

[0094] S31 The chassis manager acquires chassis in-place state information of the current chassis according to the component attribute information.

[0095] S32 When the chassis in-place state information of the current chassis is normal, the chassis manager acquires power-on state information of each storage hard disk in the current chassis.

[0096] In a specific embodiment, before the power-off diagnosis of each storage hard disk, the state of the chassis can be detected first; if the chassis is in an offline state, the power-on state detection of the hard disk is not necessary; when the chassis in-place state information of the current chassis is normal, the power-on state detection of the hard disk is performed.

[0097] In a preferred embodiment, before S5, the monitoring method further comprises:

[0098] S41 The chassis manager acquires each power supply unit state information of the current chassis according to the component attribute information.

[0099] S42 When each power supply unit state information is normal, the chassis manager acquires power-on state information of each storage hard disk in the current chassis.

[0100] In a specific embodiment, after the state of the chassis is detected, the power supply state of the power supply unit (PSU) in the chassis can be further checked; the power supply state of the power supply unit can also be acquired through the discovery process of the chassis manager.

[0101] After the power supply state of all power supply units in the chassis is checked, if the power supply unit is found to have a power supply abnormality, the power-on state detection of the hard disk is not necessary; when each power supply unit state is normal, the power-on state detection of the hard disk is performed.

[0102] In an actual embodiment, as shown in Figure 5 The above monitoring method comprises the following steps:

[0103] 1) Each hard disk is connected to the storage device, the device is powered on, and the storage system is normally started and runs.

[0104] As shown in Figure 2The SAS expander chip is a programmable chip that can be set to perform a test every 5s, and the power-on state of the hard disk in the chassis can be collected each time. If the hard disk is powered off due to some reason, the SAS expander will update the power-on state of the hard disk in its own database.

[0105] 2) When the hard disk power-off anomaly occurs, the SAS expander immediately issues a broadcast event and requests the chassis manager to receive data. The broadcast event reaches the chassis manager through the SAS driver and interface protocol layer.

[0106] 3) When the chassis manager receives the broadcast event, it immediately initiates a discovery request to the SAS expander, and the discovery process follows the SES protocol requirements.

[0107] After the discovery process is completed, the chassis manager can obtain information of all components in the chassis, including the power-on state of the hard disk.

[0108] 4) The chassis manager then judges the power-on state of each hard disk in each chassis in the chassis unit.

[0109] 5) First, detect the state of the chassis; if the chassis is in the offline state, there is no need to detect the power-on state of the hard disk; otherwise, proceed to the next step.

[0110] 6) Then, check the power supply state of all power supply units in the chassis. The power supply state of the power supply unit can also be collected through the discovery process of the chassis manager. As shown in Figure 3 , the chassis manager can obtain data according to the SES protocol analysis, which can be seen in the Power Supply status element in the SES protocol.

[0111] When all power supply units in the chassis are abnormal, there is no need to detect the power-on state of the hard disk; otherwise, proceed to the next step.

[0112] 7) Similarly, after the discovery process is completed, the data of the hard disk has also been obtained by the chassis manager.

[0113] As shown in Figure 4 , after SES protocol analysis, the power-on state flag of the hard disk (DEVICE OFF) and the in-place state flag (COMMON STATUS) are mainly used.

[0114] When the hard disk is in place and the DEVICE OFF bit is set to 1, it is considered that the hard disk has power-off, that is, the power-off state needs to meet: ((COMMON STATUS!= 0x05) && (DEVICE OFF = 1)). At this time, the chassis where the hard disk is located and the hard disk slot information are recorded.

[0115] 8) The power-on command (i.e. the power-on command) is issued to the above-mentioned hard disk slot in the above-mentioned case, and the power-on command can be issued through the SES protocol; at the same time, the power-on frequency value is recorded; in theory, this power-on frequency value cannot exceed 5 times within 24 hours, and when it exceeds 5 times, an alarm needs to be reported and displayed on the user interface, indicating that the hard disk has been powered off too many times.

[0116] 9) A timer is started, and the duration of the timer can be set according to requirements (such as 2 minutes).

[0117] After the duration of the timer arrives, the case manager initiates a discovery request to obtain the latest power-on state of the hard disk after power-on.

[0118] 10) If the hard disk is powered on normally, it means that the power-on recovery is successful. If the hard disk is not powered on normally, an alarm needs to be reported to notify the user to replace the hard disk in time.

[0119] In summary, in the above-mentioned monitoring method, the SAS expander is used to obtain the power-on state of the hard disk, which is submitted to the upper layer for analysis, and then the upper layer makes a decision to process the hard disk accordingly, so as to replace the faulty hard disk in time, thereby greatly improving the safety and reliability of the storage system.

[0120] It should be noted that although each step in the flowchart is displayed in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified in this document, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.

[0121] Embodiment Two:

[0122] As shown in Figure 6 , the embodiment of the application also provides a monitoring device for storing the power-on state of a hard disk, which is used to implement the above-mentioned monitoring method for the power-on state of the hard disk, and the monitoring device comprises:

[0123] a SAS expander, which is used to obtain the power-on state information of all storage hard disks, and send power-on abnormality notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;

[0124] The chassis manager is configured to acquire component attribute information of each chassis through the SAS expander, wherein the component attribute information comprises power-on state information of each storage hard disk in each chassis.

[0125] The chassis manager is further configured to traverse each storage hard disk in each chassis, acquire power-off hard disk information according to the power-on state information of each storage hard disk in each chassis, and send a power-on instruction to the corresponding power-off hard disk.

[0126] The chassis manager is further configured to acquire power-on state information of the power-off hard disk after power-on at a predetermined time, and send a hard disk power-off alarm to the user terminal when the power-on state information of the power-off hard disk after power-on is abnormal.

[0127] In a preferred embodiment, the chassis manager is further configured to acquire a power-on state flag in the power-on state information of the current storage hard disk and an in-place state flag.

[0128] When the in-place state flag is correct and the power-on state flag is normal, the chassis manager is further configured to determine that the current storage hard disk is in a power-off state.

[0129] The chassis manager is further configured to acquire power-off hard disk information of the current storage hard disk and send a power-on instruction to the corresponding chassis and disk slot.

[0130] In a preferred embodiment, the chassis manager is further configured to acquire chassis information and disk slot information corresponding to the current storage hard disk, and send a power-on instruction in the power-on instruction to the chassis and disk slot corresponding to the chassis information and disk slot information.

[0131] In a preferred embodiment, the chassis manager is further configured to send a discovery request to the SAS expander.

[0132] The SAS expander is further configured to acquire component attribute information of each chassis through the discovery process, wherein the component attribute information comprises power-on state information of each storage hard disk in each chassis.

[0133] In a preferred embodiment, when at least one storage hard disk has an abnormal power-on state, the SAS expander is further configured to issue a broadcast event, wherein the broadcast event comprises a request for the chassis manager to receive data notification information.

[0134] After the broadcast event passes through the driver layer, the protocol layer, and reaches the service layer in sequence, the chassis manager in the service layer is further configured to receive the broadcast event.

[0135] In a preferred embodiment, the chassis manager is further configured to acquire chassis in-place state information of the current chassis according to the component attribute information.

[0136] When the chassis status information of the current chassis is normal, the chassis manager is also used to obtain the power-on status information of each storage hard drive in the current chassis.

[0137] In a preferred embodiment, the chassis manager is also used to obtain the status information of each power supply unit of the current chassis based on the attribute information of each component.

[0138] When the status information of each power supply unit is normal, the chassis manager is also used to obtain the power-on status information of each storage hard drive in the current chassis.

[0139] For specific limitations on the aforementioned apparatus, please refer to the limitations on the method described above, which will not be repeated here.

[0140] Each module in the aforementioned device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0141] Among them, such as Figure 7 As shown, the aforementioned computer device can be a terminal, comprising a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. The display screen can be an LCD screen or an e-ink display screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0142] It is understood that the structures shown in the above figures are merely block diagrams of some structures related to the present invention and do not constitute a limitation on the computer device to which the present invention is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0143] Example 3:

[0144] This invention provides another computer device, including a memory, a processor, and a computer program. The computer program is stored in the memory and can be run on the processor. When the processor executes the computer program, it performs the following steps:

[0145] S1, the SAS expander acquires power-on state information of all storage hard disks, and sends power-on abnormality notification information to the chassis manager when power-on state of at least one storage hard disk is abnormal;

[0146] S2, the chassis manager acquires component attribute information of each chassis through the SAS expander; wherein the component attribute information includes power-on state information of each storage hard disk in each chassis;

[0147] S5, the chassis manager acquires power-off hard disk information according to the power-on state information of each storage hard disk, and sends power-on instruction to the corresponding power-off hard disk;

[0148] S6, the chassis manager acquires power-on state information of the power-off hard disk after power-on according to a predetermined time, and sends hard disk power-off alarm information to the user terminal when the power-on state information of the power-off hard disk after power-on is abnormal.

[0149] In a preferred embodiment, the processor further implements the following steps when executing the computer program:

[0150] S5 specifically includes: S51, the chassis manager acquires the power-on state flag and the in-place state flag in the power-on state information of the current storage hard disk; S52, when the in-place state flag is correct and the power-on state flag is normal, the chassis manager determines that the current storage hard disk is in power-off state; S53, the chassis manager acquires power-off hard disk information of the current storage hard disk, and sends power-on instruction to the current storage hard disk.

[0151] In a preferred embodiment, the processor further implements the following steps when executing the computer program:

[0152] S53 specifically includes: the chassis manager acquires chassis information and disk slot information corresponding to the current storage hard disk, and sends the power-on instruction in the power-on instruction to the chassis and the disk slot corresponding to the chassis information and the disk slot information.

[0153] In a preferred embodiment, the processor further implements the following steps when executing the computer program:

[0154] S2 specifically includes: S21, the chassis manager sends a discovery request to the SAS expander; S22, the SAS expander acquires component attribute information of each chassis through the discovery process.

[0155] In a preferred embodiment, the processor further implements the following steps when executing the computer program:

[0156] In S1, the power-on abnormality notification information is sent to the chassis manager when at least one storage hard disk has a power-on state abnormality, and specifically includes: S12, the SAS expander issues a broadcast event when at least one storage hard disk has a power-on state abnormality; wherein the broadcast event includes a request for the chassis manager to receive data notification information; S13, the chassis manager in the service layer receives the broadcast event after the broadcast event passes through the drive layer, the protocol layer and reaches the service layer in turn.

[0157] In one preferred embodiment, the processor executing the computer program also implements the following steps:

[0158] Before S5, it further includes: S31, obtaining the chassis in-place state information of the current chassis according to the component attribute information; S32, obtaining the power-on state information of each storage hard disk in the current chassis when the chassis in-place state information of the current chassis is normal.

[0159] In one preferred embodiment, the processor executing the computer program also implements the following steps:

[0160] Before S5, it further includes: S41, obtaining the power supply unit state information of each power supply unit in the current chassis according to the component attribute information; S42, obtaining the power-on state information of each storage hard disk in the current chassis when the power supply unit state information of each power supply unit is normal.

[0161] Embodiment four:

[0162] The embodiment of the present application further provides a computer readable storage medium storing a computer program, and the computer program is executed by a processor to implement the following steps:

[0163] S1, the SAS expander obtains the power-on state information of all storage hard disks, and sends the power-on abnormality notification information to the chassis manager when at least one storage hard disk has a power-on state abnormality;

[0164] S2, the chassis manager obtains the component attribute information of each chassis through the SAS expander; wherein the component attribute information includes the power-on state information of each storage hard disk in each chassis;

[0165] S5, the chassis manager obtains the power-on state information of each storage hard disk, and sends the power-on state information to the chassis manager;

[0166] S6, the chassis manager obtains the power-on state information of the power-off hard disk after power recovery according to a predetermined time, and sends the hard disk power-off alarm information to the user end when the power-on state information of the power-off hard disk after power recovery is abnormal.

[0167] In one preferred embodiment, the computer program is executed by the processor to further implement the following steps:

[0168] S5 specifically comprises: S51, the chassis manager acquires the power-on state flag and the in-place state flag in the power-on state information of the current storage hard disk; S52, when the in-place state flag is correct and the power-on state flag is normal, the chassis manager determines that the current storage hard disk is in a power-off state; S53, the chassis manager acquires the power-off hard disk information of the current storage hard disk, and sends the power-on instruction in the power-on instruction to the chassis and the disk slot corresponding to the chassis information and the disk slot information of the current storage hard disk.

[0169] In one preferred embodiment, the computer program, when executed by the processor, further implements the following steps:

[0170] S53 specifically comprises: the chassis manager acquires the chassis information and the disk slot information corresponding to the current storage hard disk, and sends the power-on instruction in the power-on instruction to the chassis and the disk slot corresponding to the chassis information and the disk slot information.

[0171] In one preferred embodiment, the computer program, when executed by the processor, further implements the following steps:

[0172] S2 specifically comprises: S21, the chassis manager sends the discovery request to the SAS expander; S22, the SAS expander acquires the component attribute information of each chassis through the discovery process.

[0173] In one preferred embodiment, the computer program, when executed by the processor, further implements the following steps:

[0174] In S1, the power-on abnormality notification information is sent to the chassis manager when at least one storage hard disk power-on state is abnormal, specifically comprising: S12, when at least one storage hard disk power-on state is abnormal, the SAS expander issues a broadcast event; wherein the broadcast event includes a request for the chassis manager to receive data notification information; S13, after the broadcast event passes through the drive layer, the protocol layer and reaches the business layer in turn, the chassis manager in the business layer receives the broadcast event.

[0175] In one preferred embodiment, the computer program, when executed by the processor, further implements the following steps:

[0176] Before S5, it further comprises: S31, acquiring the chassis in-place state information of the current chassis according to the component attribute information; S32, when the chassis in-place state information of the current chassis is normal, acquiring the power-on state information of each storage hard disk in the current chassis.

[0177] In one preferred embodiment, the computer program, when executed by the processor, further implements the following steps:

[0178] Before S5, further comprising: S41, obtaining each power supply unit state information of the current chassis according to each component attribute information; S42, when each power supply unit state information is normal, obtaining the power-on state information of each storage hard disk in the current chassis.

[0179] It can be understood that all or part of the processes in the above-mentioned embodiment methods can be implemented by a computer program instructing relevant hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method.

[0180] In the embodiments of the present application, any reference to memory, storage, database, or other medium can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0181] It should be noted that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for monitoring the power-on state of a storage hard disk, characterized in that, Several storage hard disks are arranged in several chassis, and the monitoring method comprises the following steps: The SAS expander acquires power-on state information of all storage hard disks, and sends power-on abnormality notification information to the chassis manager when at least one storage hard disk has power-on state abnormality; The chassis manager acquires component attribute information of each chassis through the SAS expander; wherein the component attribute information comprises power-on state information of each storage hard disk in each chassis; The chassis manager acquires chassis in-place state information of the current chassis and each power supply unit state information of the current chassis according to the component attribute information; The chassis manager acquires power-on state information of each storage hard disk in the current chassis when the chassis in-place state information of the current chassis is normal and the each power supply unit state information is normal; The chassis manager acquires a power-on state flag and an in-place state flag in the power-on state information of the current storage hard disk; When the in-place state flag is a non-hexadecimal value 0x05 and the power-on state flag is 1, the chassis manager determines that the current storage hard disk is in a power-off state; The chassis manager acquires chassis information and disk slot position information corresponding to the current storage hard disk, and sends a power-on instruction in a power recovery instruction to the chassis and the disk slot position corresponding to the chassis information and the disk slot position information; The chassis manager acquires power-on state information of the power-off hard disk after power recovery according to a predetermined time, and sends hard disk power-off alarm information to the user end when the power-on state information of the power-off hard disk after power recovery is abnormal.

2. The method of claim 1, wherein the method further comprises: The chassis manager acquires component attribute information of each chassis through the SAS expander, and specifically comprises: The chassis manager sends a discovery request to the SAS expander; The SAS expander acquires component attribute information of each chassis through a discovery process.

3. The method of claim 1, wherein the method further comprises: The SAS expander sends power-on abnormality notification information to the chassis manager when at least one storage hard disk has power-on state abnormality, and specifically comprises: When at least one storage hard disk has power-on state abnormality, the SAS expander issues a broadcast event; wherein the broadcast event comprises a request for the chassis manager to receive data notification information; After the broadcast event passes through a drive layer, a protocol layer and reaches a service layer in turn, the chassis manager in the service layer receives the broadcast event.

4. A monitoring device for storing a power-on state of a hard disk, characterized by The monitoring device for implementing the storage hard disk power-on state monitoring method as claimed in any one of claims 1-3 comprises: The SAS expander acquires power-on state information of all storage hard disks, and sends power-on abnormality notification information to the chassis manager when at least one storage hard disk has power-on state abnormality; The chassis manager acquires component attribute information of each chassis through the SAS expander; wherein the component attribute information comprises power-on state information of each storage hard disk in each chassis; The chassis manager obtains chassis in-place state information of the current chassis and each power supply unit state information of the current chassis according to the component attribute information; when the chassis in-place state information of the current chassis is normal and the each power supply unit state information is normal, the chassis manager obtains power-on state information of each storage hard disk in the current chassis; The chassis manager obtains a power-on state flag and an in-place state flag in the power-on state information of the current storage hard disk; when the in-place state flag is a non-hexadecimal value 0x05 and the power-on state flag is 1, the chassis manager determines that the current storage hard disk is in a power-off state; the chassis manager obtains chassis information and a disk slot position corresponding to the current storage hard disk, and sends a power-on instruction in a power recovery instruction to the chassis and the disk slot position corresponding to the chassis information and the disk slot position; The chassis manager is further configured to obtain power-on state information of the power-off hard disk after power recovery according to a predetermined time, and send hard disk power-off alarm information to a user terminal when the power-on state information of the power-off hard disk after power recovery is abnormal.

5. A computer device comprising a memory, a processor and a computer program, the computer program being stored on the memory and being executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the storage hard disk power-on state monitoring method in any one of claims 1-3.

6. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the storage hard disk power-on state monitoring method in any one of claims 1-3.

Citation Information

Patent Citations

  • Hard disk fault checking method, device and apparatus and storage medium

    CN111124785A