CN115373936A - Method, device, equipment and medium for monitoring power-on state of storage hard disk - Google Patents

Method, device, equipment and medium for monitoring power-on state of storage hard disk Download PDF

Info

Publication number
CN115373936A
CN115373936A CN202210908162.XA CN202210908162A CN115373936A CN 115373936 A CN115373936 A CN 115373936A CN 202210908162 A CN202210908162 A CN 202210908162A CN 115373936 A CN115373936 A CN 115373936A
Authority
CN
China
Prior art keywords
power
hard disk
information
state
storage hard
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210908162.XA
Other languages
Chinese (zh)
Inventor
宋以强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210908162.XA priority Critical patent/CN115373936A/en
Publication of CN115373936A publication Critical patent/CN115373936A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Power Sources (AREA)

Abstract

The invention relates to a method, a device, equipment and a medium for monitoring the power-on state of a storage hard disk, wherein a plurality of storage hard disks are respectively arranged in a plurality of cabinets, 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 abnormal notification information to the chassis manager; the chassis manager acquires attribute information of each component of each chassis through the SAS expander; wherein, each item of component attribute information comprises power-on state information of each storage hard disk in each chassis; the case manager acquires power-down hard disk information according to the power-on state information of each storage hard disk and sends a power restoration instruction to the corresponding power-down hard disk; the case manager acquires power-on state information after power failure hard disk power restoration, and sends hard disk power failure warning information to the user side when the power-on state information after power failure hard disk power restoration is abnormal. By the technical scheme, the problems that the existing storage hard disk is prone to power failure and cannot be monitored in real time can be solved.

Description

Method, device, equipment and medium for monitoring power-on state of storage hard disk
Technical Field
The present invention relates to the field of hard disk storage technologies, and in particular, to a method, an apparatus, a device, and a medium for monitoring a power-on state of a hard disk.
Background
In the big data era, mass data needs to be stored by professional storage equipment, and due to the invaluability of the data, the most basic requirement of the storage equipment is to effectively ensure the integrity of the data in a system.
The hard disk is an important part of the storage device, and various attributes of the hard disk need to be monitored in real time when data are stored. Specifically, after the hard disk is accessed to the storage device, the power-on state of the hard disk should be stable; however, in the long-term use process, the hard disk is inevitably in poor contact with the storage device or other poor problems, so that the hard disk is powered off, and the hard disk becomes a fault hard disk at the moment.
Therefore, in the operation process of the server, when a failed hard disk is detected, the failed hard disk needs to be monitored in real time and repaired or replaced in time so as to ensure the integrity of data and the normal operation of services.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method, a device, equipment and a medium for monitoring the power-on state of a storage hard disk, wherein the method, the device, the equipment and the medium are used for solving the problems that the power-off condition of the existing storage hard disk is easy to occur and the real-time monitoring cannot be realized.
In order to achieve the above object, the present invention provides a method for monitoring a power-on state of a storage hard disk, wherein a plurality of storage hard disks are respectively disposed in a plurality of chassis, the method for monitoring comprises the steps of:
the SAS expander acquires the power-on state information of all the storage hard disks and sends power-on abnormal notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;
the chassis manager acquires attribute information of each component of each chassis through the SAS expander; the attribute information of each component comprises the power-on state information of each storage hard disk in each chassis;
the case manager acquires the power-down hard disk information according to the power-on state information of each storage hard disk and sends a power restoration instruction to the corresponding power-down hard disk;
and the case manager acquires the power-on state information of the power-down hard disk after power restoration according to preset time, and sends hard disk power-down warning information to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
Further, the case manager acquires power-down hard disk information according to the power-on state information of each storage hard disk, and sends a power restoration instruction to the corresponding power-down hard disk, and the method specifically includes:
the case manager acquires a power-on state mark and an on-site state mark in the power-on state information of the current storage hard disk;
when the on-site state mark is correct and the power-on state mark is normal, the case manager judges that the current storage hard disk is in a power-off state;
and the case manager acquires the power failure hard disk information of the current storage hard disk and sends a power restoration instruction to the current storage hard disk.
Further, the case manager obtains the power failure hard disk information of the current storage hard disk, and sends a power restoration instruction to the current storage hard disk, and the method specifically includes:
the case manager acquires case information and disk slot position information corresponding to the current storage hard disk, and sends a power-on instruction in the power restoration instruction to the case and the disk slot position corresponding to the case information and the disk slot position information.
Further, the chassis manager obtains attribute information of each component of each chassis through the SAS expander, and specifically includes:
the chassis manager sends a discovery request to the SAS expander;
the SAS expander acquires attribute information of each component of each chassis through a discovery process.
Further, when the power-on state of at least one storage hard disk is abnormal, power-on abnormal notification information is sent to the case manager, which specifically includes:
when the power-on state of at least one storage hard disk is abnormal, the SAS expander issues a broadcast event; wherein the broadcast event comprises a request for the chassis manager to receive data notification information;
and after the broadcast event sequentially passes through a driving layer and a protocol layer and reaches a service layer, the chassis manager in the service layer receives the broadcast event.
Further, before the chassis manager obtains the power-down hard disk information according to the power-on state information of each storage hard disk and sends the power restoration instruction to the corresponding power-down hard disk, the monitoring method further includes:
the case manager acquires the case in-place state information of the current case according to the attribute information of each component;
and when the in-place state information of the current case is normal, the case manager acquires the power-on state information of each storage hard disk in the current case.
Further, before the chassis manager acquires the power-down hard disk information according to the power-on state information of each storage hard disk and sends the power-up command to the corresponding power-down hard disk, the monitoring method further includes:
the case manager acquires the state information of each power supply unit of the current case according to the attribute information of each component;
and when the state information of each power supply unit is normal, the case manager acquires the power-on state information of each storage hard disk in the current case.
The invention also provides a monitoring device for the power-on state of the storage hard disk, which is used for realizing the monitoring method for the power-on state of the storage hard disk, and the monitoring device comprises:
the SAS expander is used for acquiring the power-on state information of all the storage hard disks and sending power-on abnormal notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;
the case manager is used for acquiring attribute information of each component of each case through the SAS expander; the component attribute information comprises power-on state information of each storage hard disk in each chassis;
the case manager is also used for traversing each storage hard disk in each case, acquiring power-down hard disk information according to the power-on state information of each storage hard disk in each case, and sending a power restoration instruction to the corresponding power-down hard disk;
the case manager is also used for acquiring the power-on state information of the power-down hard disk after power restoration according to preset time, and sending hard disk power-down warning information to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
The present invention also provides a computer device, comprising a memory, a processor and a computer program, wherein the computer program is stored in the memory and can run on the processor, and the processor executes the computer program to realize the following steps:
the SAS expander acquires the power-on state information of all the storage hard disks and sends power-on abnormal notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;
the chassis manager acquires attribute information of each component of each chassis through the SAS expander; the component attribute information comprises power-on state information of each storage hard disk in each chassis;
the case manager acquires power failure hard disk information according to the power-on state information of each storage hard disk and sends a power restoration instruction to the corresponding power failure hard disk;
and the case manager acquires the power-on state information of the power-down hard disk after power restoration according to preset time, and sends hard disk power-down warning information to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
The present invention further provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of:
the SAS expander acquires the power-on state information of all the storage hard disks and sends power-on abnormal notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;
the chassis manager acquires attribute information of each component of each chassis through the SAS expander; the component attribute information comprises power-on state information of each storage hard disk in each chassis;
the case manager acquires the power-down hard disk information according to the power-on state information of each storage hard disk and sends a power restoration instruction to the corresponding power-down hard disk;
and the case manager acquires the power-on state information of the power-down hard disk after power restoration according to preset time, and sends hard disk power-down warning information to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
Compared with the prior art, the technical scheme of the invention has the following technical effects:
in the invention, an SAS expander is adopted 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 disks; when the power-on state of the hard disk is abnormal, the SAS expander sends power-on abnormal notification information to the chassis manager;
after receiving the power-on abnormal notification information, the chassis manager acquires current attributes of the chassis including power-on states of the hard disks from the SAS expander;
after acquiring the power-on state of the hard disk, the case manager judges whether abnormal power failure occurs or not; if the abnormal power failure problem exists, the power on action is carried out on the failed hard disk again;
then, the case manager judges whether an alarm needs to be reported according to the actual power-on result of the fault hard disk, and the alarm is used for informing a user to replace the corresponding fault hard disk;
in conclusion, the SAS expander is used for monitoring the power-on state in real time, and the chassis manager is used for performing power failure diagnosis and power restoration operation, so that a power-failure hard disk can be found in time, users can conveniently and effectively process a problem hard disk in time, and the safety and the data transmission efficiency of the storage system can be effectively guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a monitoring method for a power-on state of a storage hard disk according to an embodiment of the present invention;
FIG. 2 is an architecture diagram of a memory system in a practical embodiment of the invention;
FIG. 3 is a diagram illustrating a chassis manager parsing power state data according to an embodiment of the invention;
FIG. 4 is a diagram illustrating a chassis manager analyzing a power-on status flag and an on-site status flag according to an embodiment of the present invention;
FIG. 5 is a flow chart showing a specific example of a monitoring method according to an embodiment of the present invention;
fig. 6 is a block diagram of a monitoring apparatus for storing a power-on state of a hard disk according to a second embodiment of the present invention;
fig. 7 is an internal structural diagram of a computer device according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
as shown in fig. 1, an embodiment of the present invention provides a method for monitoring a power-on state of a storage hard disk, where a plurality of storage hard disks are respectively disposed in a plurality of chassis, and the method for monitoring includes:
s1, an SAS expander acquires power-on state information of all storage hard disks, and sends power-on abnormal notification information to a chassis manager when at least one storage hard disk is abnormal in power-on state;
s2, the chassis manager acquires attribute information of each component of each chassis through the SAS expander; wherein, each item of component attribute information comprises power-on state information of each storage hard disk in each chassis;
s5, the case manager acquires the power-down hard disk information according to the power-on state information of each storage hard disk and sends a power-up command to the corresponding power-down hard disk;
s6, the case manager acquires the power-on state information of the power-down hard disk after power restoration according to preset time, and sends the hard disk power-down warning information to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
In a specific embodiment, an SAS expander is adopted to monitor the power-on state of each hard disk, and the SAS expander can read and record the power-on state of each hard disk; when the power-on state of the hard disk is abnormal, the SAS expander sends power-on abnormal notification information to the chassis manager;
after receiving the power-on abnormal notification information, the chassis manager acquires current attributes of the chassis including power-on states of the hard disks from the SAS expander;
after acquiring the power-on state of the hard disk, the case manager judges whether abnormal power failure occurs or not; if the abnormal power failure problem exists, the power on action is carried out on the failed hard disk again;
then, the case manager judges whether an alarm needs to be reported according to the actual power-on result of the fault hard disk, and the alarm is used for informing a user to replace the corresponding fault hard disk;
in conclusion, the SAS expander is used for monitoring the power-on state in real time, and the case manager is used for performing power-off diagnosis and power restoration operation, so that the hard disk with power failure can be found in time, users can conveniently and effectively process the hard disk with problems in time, and the safety and the data transmission efficiency of the storage system can be effectively guaranteed.
In practical applications, SAS (Serial Attached SCSI) is a computer hub technology, and its function is mainly to transmit data of peripheral components, such as design interfaces applied to devices such as hard disks and CD-ROMs.
An SAS Expander (i.e., SAS Expander) is an Expander conforming to the SAS protocol, and can be used for enclosure management, and its downstream port can be connected to a hard disk.
SES (SCSI Enclosure Services) is a standard for Enclosure management as specified by the T10 technical Commission.
EN (Enclosure management) stands for chassis management; slot represents a slot into which a hard disk is inserted.
In a preferred embodiment, S5 specifically includes:
s51, the case manager acquires a power-on state mark and an on-position state mark in the power-on state information of the current storage hard disk;
s52, when the on-position state mark is correct and the power-on state mark is normal, the case manager judges that the current storage hard disk is in a power-off state;
s53, the case manager acquires the power failure hard disk information of the current storage hard disk and sends the power restoration instruction to the current storage hard disk.
In a specific embodiment, the power-on state information of the current storage hard disk includes a power-on state flag (DEVICE OFF) and a present 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, the hard disk is considered to be powered down, that is, the power down state needs to satisfy the condition: ((COMMON STATUS | =0x 05) & (DEVICE OFF = 1)).
In a preferred embodiment, S53 specifically includes:
the case manager acquires case information and disk slot position information corresponding to the current storage hard disk, and sends a power-on instruction in the power-on instruction to the case and the disk slot position corresponding to the case information and the disk slot position information.
In a specific embodiment, when the current storage hard disk meets the power failure judgment condition and power failure occurs, the case where the hard disk is located and the slot position information of the hard disk where the hard disk is inserted are recorded.
Then, the case manager issues a power-on command to the hard disk insertion slot in the case to perform power-on operation; if the hard disk is electrified normally, representing that the electrification is successfully recovered; if the hard disk is not normally powered on, an alarm of power failure of the hard disk needs to be reported so as to inform a user of timely replacing the hard disk.
In a preferred embodiment, S2 specifically includes:
s21, the chassis manager sends the discovery request to the SAS expander;
s22, the SAS expander acquires attribute information of each component of each chassis through a discovery process.
In a specific embodiment, when the chassis manager receives the power-on exception notification information, a discovery request is immediately initiated to the SAS expander; wherein the discovery request procedure may comply with SES protocol requirements.
Through the discovery request process, the case manager can acquire the information of all components in all cases, wherein the information comprises the power-on state of each hard disk; and then, the case manager judges the power-on state of each hard disk in each case by taking the case as a unit, so as to realize power failure diagnosis.
In a preferred embodiment, in S1, sending power-on abnormality notification information to the enclosure manager when a power-on state of at least one storage hard disk is abnormal, specifically including:
s12, when the power-on state of at least one storage hard disk is abnormal, the SAS expander issues a broadcast event; the broadcasting event comprises a request for the case manager to receive data notification information;
s13, after the broadcast event passes through the driving layer and the protocol layer in sequence and reaches the service layer, the chassis manager in the service layer receives the broadcast event.
In a specific embodiment, when the power failure of the hard disk is abnormal, the SAS expander immediately issues a broadcast event and requests the chassis manager to receive monitoring data.
The broadcast event reaches the service layer through the driving layer and the protocol layer in sequence, the broadcast event is processed by the case manager of the service layer, and the attribute information of each component of each case is acquired by initiating a discovery request to the SAS expander.
In a preferred embodiment, before S5, the monitoring method further includes:
s31, the case manager acquires the case in-place state information of the current case according to the attribute information of each component;
s32, when the in-place state information of the current case is normal, the case manager acquires the power-on state information of each storage hard disk in the current case.
In a specific embodiment, before performing power failure diagnosis on each storage hard disk, the state of the chassis can be detected; if the case is in the offline state, the hard disk does not need to be subjected to power-on condition detection; when the current chassis is in-place state information is normal, the hard disk is subjected to power-on condition inspection.
In a preferred embodiment, before S5, the monitoring method further includes:
s41, the case manager acquires the state information of each power supply unit of the current case according to the attribute information of each component;
s42, when the state information of each power supply unit is normal, the case manager acquires the power-on state information of each storage hard disk in the current case.
In an embodiment, after detecting the chassis status, the Power Supply status of the Power Supply Unit (i.e., PSU) in the chassis may be continuously checked; the power supply state of the power supply unit may also be acquired through a discovery process (i.e., discovery) of the chassis manager.
After the power supply state of all the power supply units in the case is checked, if the power supply units are found to be abnormal, the hard disk does not need to be electrified; when the states of all the power supply units are normal, the hard disk is subjected to power-on condition inspection.
In a practical embodiment, as shown in fig. 5, the monitoring method includes the following steps:
1) And (4) accessing each hard disk into the storage equipment, and after the equipment is powered on, normally starting and operating the storage system.
As shown in the memory system architecture diagram of fig. 2. The SAS expander chip is a programmable chip, and can be set to conduct sampling every 5s, and the power-on state of a hard disk in a case can be acquired through sampling every time. If the hard disk is powered off due to some reason, the SAS expander updates the power-on state of the hard disk in the database of the chip.
2) When the power failure of the hard disk is abnormal, the SAS expander immediately issues a broadcast event and requests the case manager to receive data. Broadcast events reach the chassis manager via the SAS driver and interface protocol layers.
3) When the case manager receives the broadcast event, the case manager immediately initiates a discovery request to the SAS expander, and the discovery process follows the requirements of the SES protocol.
After the discovery process is completed, the chassis manager can take the information of all the components in all the chassis, including the power-on state of the hard disk.
4) And the case manager judges the power-on state of each hard disk in each case by taking the case as a unit.
5) Firstly, detecting the state of a case; if the case is in the offline state, the hard disk does not need to be subjected to power-on condition detection; otherwise, carrying out the next detection.
6) And then, checking the power supply state of all the power supply units in the case, wherein the power supply state of the power supply units can also be acquired through the discovery process of the case manager. As shown in FIG. 3, the case manager can parse the received data according to the SES protocol, which can be seen in the Power Supply status element of the SES protocol.
When the power supply units in the machine frame supply power abnormally, the hard disk does not need to be electrified for detection; otherwise, carrying out the next detection.
7) Similarly, after the discovery process is completed, the data of the hard disk is also already taken by the chassis manager.
As shown in fig. 4, after the SES protocol is resolved, the power-on STATUS flag (DEVICE OFF) and the on-position STATUS flag (COMMON STATUS) of the hard disk are mainly used.
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 failure, that is, the power failure state needs to be satisfied: ((COMMON STATUS | =0x 05) & (DEVICE OFF = 1)). At the moment, the information of the case where the hard disk is located and the slot position where the hard disk is inserted is recorded.
8) Issuing a power-on instruction (namely a power-on instruction) to the slot position of the inserted hard disk in the chassis, wherein the power-on instruction can be issued through an SES protocol; meanwhile, recording a complex electricity frequency value; theoretically, the complex power frequency value cannot exceed 5 times within 24h, and an alarm needs to be reported and displayed on a user interface when the complex power frequency value exceeds 5 times, so that the hard disk is powered down for too many times.
9) A timer is started, and the duration of the timer can be set according to requirements (for example, set to 2 min).
After the time length of the timer is up, the chassis manager initiatively initiates a discovery request to obtain the latest power-on state after the current hard disk is powered on again.
10 If the hard disk is normally powered on, the power-on recovery is successful. If the hard disk is not normally powered on, an alarm of power failure of the hard disk needs to be reported for informing a user of timely replacing the hard disk.
In summary, in the monitoring method, the SAS expander is used to acquire the power-on state of the hard disk, and the power-on state is submitted to the upper layer for analysis, and then the upper layer makes a decision to perform corresponding processing on the hard disk so as to replace the failed hard disk in time, thereby greatly improving the safety and reliability of the storage system.
It should be noted that, although the steps in the flowchart are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Example two:
as shown in fig. 6, an embodiment of the present invention further provides a monitoring device for monitoring a power-on state of a storage hard disk, which is used to implement the foregoing monitoring method for monitoring a power-on state of a storage hard disk, where the monitoring device includes:
the SAS expander is used for acquiring the power-on state information of all the storage hard disks and sending power-on abnormal notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;
the case manager is used for acquiring the attribute information of each component of each case through the SAS expander; wherein, each item of component attribute information comprises power-on state information of each storage hard disk in each chassis;
the case manager is also used for traversing each storage hard disk in each case, acquiring power-down hard disk information according to the power-on state information of each storage hard disk in each case, and sending a power restoration instruction to the corresponding power-down hard disk;
the case manager is also used for acquiring the power-on state information of the power-down hard disk after power restoration according to preset time, and sending the power-down alarm information of the hard disk to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
In a preferred embodiment, the chassis manager is further configured to obtain a power-on status flag and an in-place status flag in the power-on status information of the current storage hard disk;
when the on-position state mark is correct and the power-on state mark is normal, the case manager is also used for judging that the current storage hard disk is in a power-off state;
the case manager is also used for acquiring the power failure hard disk information of the current storage hard disk and sending the power restoration instruction to the current storage hard disk.
In a preferred embodiment, the chassis manager is further configured to obtain chassis information and disk-inserting slot information corresponding to the current storage hard disk, and send a power-on instruction in the power-on instruction to the chassis and the disk-inserting slot corresponding to the chassis information and the disk-inserting slot information.
In a preferred embodiment, the enclosure manager is further configured to send a discovery request to the SAS expander;
the SAS expander is also used for acquiring attribute information of each component of each chassis in a discovery process; the component attribute information comprises power-on state information of each storage hard disk in each chassis.
In a preferred embodiment, the SAS expander is further configured to issue a broadcast event when a power-on state of at least one storage hard disk is abnormal; the broadcasting event comprises a request for the case manager to receive data notification information;
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 also used for receiving the broadcast event.
In a preferred embodiment, the chassis manager is further configured to obtain the chassis in-place state information of the current chassis according to the attribute information of each component;
when the in-place state information of the current case is normal, the case manager is further used for acquiring the power-on state information of each storage hard disk in the current case.
In a preferred embodiment, the chassis manager is further configured to obtain status information of each power supply unit of the current chassis according to the attribute information of each component;
when the state information of each power supply unit is normal, the case manager is further used for acquiring the power-on state information of each storage hard disk in the current case.
For the specific limitations of the above apparatus, reference may be made to the limitations of the above method, which are not described herein again.
The modules in the above device can be implemented wholly or partially by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, or can be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
As shown in fig. 7, the computer device may be a terminal including a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated that the arrangements shown in the above figures are merely block diagrams of some of the arrangements relevant to the inventive arrangements and do not constitute limitations on the computer apparatus to which the inventive arrangements may be applied, as a particular computer apparatus may comprise more or less components than those shown in the figures, or some of the components may be combined, or have a different arrangement of components.
Example three:
an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program, where the computer program is stored in the memory and can be run on the processor, and the processor implements the following steps when executing the computer program:
s1, an SAS expander acquires power-on state information of all storage hard disks and sends power-on abnormal notification information to a chassis manager when at least one storage hard disk is abnormal in power-on state;
s2, the chassis manager acquires attribute information of each component of each chassis through the SAS expander; wherein, each item of component attribute information comprises power-on state information of each storage hard disk in each chassis;
s5, the case manager acquires power-down hard disk information according to the power-on state information of each storage hard disk and sends a power restoration instruction to the corresponding power-down hard disk;
s6, the case manager acquires the power-on state information of the power-down hard disk after power restoration according to preset time, and sends the power-down alarm information of the hard disk to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
In a preferred embodiment, the processor, when executing the computer program, further performs the steps of:
s5 specifically comprises the following steps: s51, the case manager acquires a power-on state mark and an on-position state mark in the power-on state information of the current storage hard disk; s52, when the on-position state mark is correct and the power-on state mark is normal, the case manager judges that the current storage hard disk is in a power-off state; s53, the case manager acquires the power-down hard disk information of the current storage hard disk and sends the power-up command to the current storage hard disk.
In a preferred embodiment, the processor, when executing the computer program, further performs the steps of:
s53 specifically comprises the following steps: the case manager acquires case information and disk inserting slot position information corresponding to the current storage hard disk, and sends a power-on instruction in the power-on instruction to the case and the disk inserting slot position corresponding to the case information and the disk inserting slot position information.
In a preferred embodiment, the processor when executing the computer program further performs the steps of:
s2 specifically comprises the following steps: s21, the chassis manager sends the discovery request to the SAS expander; s22, the SAS expander acquires attribute information of each component of each chassis through a discovery process.
In a preferred embodiment, the processor, when executing the computer program, further performs the steps of:
in S1, sending power-on abnormality notification information to a chassis manager when a power-on state of at least one storage hard disk is abnormal, specifically including: s12, when the power-on state of at least one storage hard disk is abnormal, the SAS expander issues a broadcast event; the broadcasting event comprises a request for the case manager to receive data notification information; s13, after the broadcast event passes through the driving layer and the protocol layer in sequence and reaches the service layer, the chassis manager in the service layer receives the broadcast event.
In a preferred embodiment, the processor when executing the computer program further performs the steps of:
before S5, further comprising: s31, acquiring the in-place state information of the current chassis according to the attribute information of each component; s32, when the in-place state information of the current case is normal, acquiring the power-on state information of each storage hard disk in the current case.
In a preferred embodiment, the processor, when executing the computer program, further performs the steps of:
before S5, further comprising: s41, acquiring the state information of each power supply unit of the current chassis according to the attribute information of each component; s42, when the state information of each power supply unit is normal, acquiring the power-on state information of each storage hard disk in the current case.
Example four:
an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:
s1, an SAS expander acquires power-on state information of all storage hard disks, and sends power-on abnormal notification information to a chassis manager when at least one storage hard disk is abnormal in power-on state;
s2, the chassis manager acquires attribute information of each component of each chassis through the SAS expander; wherein, each item of component attribute information comprises power-on state information of each storage hard disk in each chassis;
s5, the case manager acquires power-down hard disk information according to the power-on state information of each storage hard disk and sends a power restoration instruction to the corresponding power-down hard disk;
s6, the case manager acquires the power-on state information of the power-down hard disk after power restoration according to preset time, and sends the power-down alarm information of the hard disk to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
In a preferred embodiment, the computer program, when executed by the processor, further performs the steps of:
s5 specifically comprises the following steps: s51, the case manager acquires a power-on state mark and an in-place state mark in the power-on state information of the current storage hard disk; s52, when the on-position state mark is correct and the power-on state mark is normal, the case manager judges that the current storage hard disk is in a power-off state; s53, the case manager acquires the power failure hard disk information of the current storage hard disk and sends the power restoration instruction to the current storage hard disk.
In a preferred embodiment, the computer program when executed by the processor further performs the steps of:
s53 specifically comprises the following steps: the case manager acquires case information and disk slot position information corresponding to the current storage hard disk, and sends a power-on instruction in the power-on instruction to the case and the disk slot position corresponding to the case information and the disk slot position information.
In a preferred embodiment, the computer program when executed by the processor further performs the steps of:
s2 specifically comprises the following steps: s21, the chassis manager sends the discovery request to the SAS expander; s22, the SAS expander acquires attribute information of each component of each case through a discovery process.
In a preferred embodiment, the computer program, when executed by the processor, further performs the steps of:
in S1, sending power-on abnormality notification information to a chassis manager when a power-on state of at least one storage hard disk is abnormal, specifically including: s12, when the power-on state of at least one storage hard disk is abnormal, the SAS expander issues a broadcast event; wherein the broadcast event comprises a request for the chassis manager to receive data notification information; s13, after the broadcast event passes through the driving layer and the protocol layer in sequence and reaches the service layer, the chassis manager in the service layer receives the broadcast event.
In a preferred embodiment, the computer program when executed by the processor further performs the steps of:
before S5, further comprising: s31, acquiring the in-place state information of the current chassis according to the attribute information of each component; s32, when the in-place state information of the current case is normal, acquiring the power-on state information of each storage hard disk in the current case.
In a preferred embodiment, the computer program when executed by the processor further performs the steps of:
before S5, further comprising: s41, acquiring the state information of each power supply unit of the current chassis according to the attribute information of each component; s42, when the state information of each power supply unit is normal, acquiring the power-on state information of each storage hard disk in the current case.
It is understood that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when executed.
Any reference to memory, storage, databases, or other media used in embodiments provided herein may 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. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be noted that the above-mentioned embodiments are only preferred embodiments of the present invention and the technical principles applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A monitoring method for the power-on state of a storage hard disk is characterized in that a plurality of storage hard disks are respectively arranged in a plurality of cabinets, and the monitoring method comprises the following steps:
the SAS expander acquires the power-on state information of all the storage hard disks and sends power-on abnormal notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;
the chassis manager acquires attribute information of each component of each chassis through the SAS expander; the component attribute information comprises power-on state information of each storage hard disk in each chassis;
the case manager acquires power failure hard disk information according to the power-on state information of each storage hard disk and sends a power restoration instruction to the corresponding power failure hard disk;
and the case manager acquires the power-on state information of the power-down hard disk after power restoration according to preset time, and sends hard disk power-down warning information to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
2. The method for monitoring the power-on state of the storage hard disks according to claim 1, wherein the chassis manager obtains information about the power-down hard disks according to the power-on state information about each storage hard disk, and sends a power restoration instruction to the corresponding power-down hard disk, and specifically comprises:
the case manager acquires a power-on state mark and an on-site state mark in the power-on state information of the current storage hard disk;
when the on-site state mark is correct and the power-on state mark is normal, the case manager judges that the current storage hard disk is in a power-off state;
and the case manager acquires the power failure hard disk information of the current storage hard disk and sends a power restoration instruction to the current storage hard disk.
3. The method for monitoring the power-on state of the storage hard disk according to claim 2, wherein the chassis manager acquires power-off hard disk information of the current storage hard disk and sends a power-restoration instruction to the current storage hard disk, and specifically comprises:
the case manager acquires case information and disk slot position information corresponding to the current storage hard disk, and sends a power-on instruction in the power restoration instruction to the case and the disk slot position corresponding to the case information and the disk slot position information.
4. The method for monitoring the power-on state of the storage hard disk according to claim 1, wherein the chassis manager obtains attribute information of each component 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 attribute information of each component of each chassis through a discovery process.
5. The method for monitoring the power-on state of the storage hard disk according to claim 1, wherein when at least one storage hard disk is in an abnormal power-on state, sending a power-on abnormality notification message to the enclosure manager, specifically comprising:
when the power-on state of at least one storage hard disk is abnormal, the SAS expander issues a broadcast event; wherein the broadcast event comprises a request for the chassis manager to receive data notification information;
and after the broadcast event sequentially passes through a driving layer and a protocol layer and reaches a service layer, the chassis manager in the service layer receives the broadcast event.
6. The method for monitoring the power-on state of the storage hard disks according to claim 1, wherein before the chassis manager obtains the information of the power-down hard disks according to the power-on state information of each storage hard disk and sends the power-restoration instruction to the corresponding power-down hard disk, the method further comprises:
the case manager acquires the case in-place state information of the current case according to the attribute information of each component;
and when the in-place state information of the current case is normal, the case manager acquires the power-on state information of each storage hard disk in the current case.
7. The method for monitoring the power-on state of the storage hard disks according to claim 6, wherein before the chassis manager obtains the information of the power-down hard disks according to the power-on state information of each storage hard disk and sends the power-restoration instruction to the corresponding power-down hard disk, the method further comprises:
the case manager acquires the state information of each power supply unit of the current case according to the attribute information of each component;
and when the state information of each power supply unit is normal, the case manager acquires the power-on state information of each storage hard disk in the current case.
8. A monitoring apparatus for monitoring a power-on state of a storage hard disk, wherein the monitoring apparatus is configured to implement the monitoring method for monitoring a power-on state of a storage hard disk according to any one of claims 1 to 7, and the monitoring apparatus comprises:
the SAS expander is used for acquiring the power-on state information of all the storage hard disks and sending power-on abnormal notification information to the case manager when the power-on state of at least one storage hard disk is abnormal;
the case manager is used for acquiring attribute information of each component of each case through the SAS expander; the component attribute information comprises power-on state information of each storage hard disk in each chassis;
the case manager is also used for traversing each storage hard disk in each case, acquiring power-down hard disk information according to the power-on state information of each storage hard disk in each case, and sending a power restoration instruction to the corresponding power-down hard disk;
the case manager is further used for acquiring the power-on state information of the power-down hard disk after power restoration according to preset time, and sending hard disk power-down warning information to the user side when the power-on state information of the power-down hard disk after power restoration is abnormal.
9. A computer arrangement comprising a memory, a processor and a computer program, said computer program being stored in said memory and being executable on said processor, characterized in that said processor, when executing said computer program, carries out the steps of the method for monitoring the power-on status of a storage hard disk according to any one of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for monitoring the power-on status of a storage hard disk according to any one of claims 1 to 7.
CN202210908162.XA 2022-07-29 2022-07-29 Method, device, equipment and medium for monitoring power-on state of storage hard disk Pending CN115373936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210908162.XA CN115373936A (en) 2022-07-29 2022-07-29 Method, device, equipment and medium for monitoring power-on state of storage hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210908162.XA CN115373936A (en) 2022-07-29 2022-07-29 Method, device, equipment and medium for monitoring power-on state of storage hard disk

Publications (1)

Publication Number Publication Date
CN115373936A true CN115373936A (en) 2022-11-22

Family

ID=84064486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210908162.XA Pending CN115373936A (en) 2022-07-29 2022-07-29 Method, device, equipment and medium for monitoring power-on state of storage hard disk

Country Status (1)

Country Link
CN (1) CN115373936A (en)

Similar Documents

Publication Publication Date Title
KR102268355B1 (en) Cloud deployment infrastructure validation engine
CN102662821B (en) Method, device and system for auxiliary diagnosis of virtual machine failure
CN105357038A (en) Method and system for monitoring virtual machine cluster
CN114003439B (en) Data backup method, device, equipment and storage medium
CN109901969B (en) Design method and device of centralized monitoring management platform
CN111581021B (en) Application program starting abnormality repairing method, device, equipment and storage medium
US9164857B2 (en) Scalable structured data store operations
WO2023226380A1 (en) Disk processing method and system, and electronic device
CN111522703A (en) Method, apparatus and computer program product for monitoring access requests
US8959507B2 (en) Bookmarks and performance history for network software deployment evaluation
US20140201566A1 (en) Automatic computer storage medium diagnostics
CN115129558A (en) Method, device, equipment and medium for monitoring leakage of water-cooled server
CN114816022A (en) Server power supply abnormity monitoring method, system and storage medium
CN110704229A (en) Log recording method, system, device and storage medium when storage system is abnormal
WO2021077948A1 (en) Base station software version rollback control method, apparatus, base station, and readable storage medium
CN109104314B (en) Method and device for modifying log configuration file
CN115373936A (en) Method, device, equipment and medium for monitoring power-on state of storage hard disk
CN110968456B (en) Method and device for processing fault disk in distributed storage system
WO2023125702A1 (en) Cloud management method and system for battery swapping station, server, and storage medium
CN116450461A (en) Method, device, equipment and medium for processing hard disk faults of storage cluster
CN111984473B (en) Memory snapshot data acquisition method and related device
CN104346233A (en) Fault recovery method and device for computer system
CN109062718B (en) Server and data processing method
CN111584059A (en) System monitoring method and device and computer equipment
CN111542048A (en) Method and device for restarting acquisition function of code detection equipment, server and storage medium

Legal Events

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