CN109918257B - Hard disk exception handling method and device - Google Patents

Hard disk exception handling method and device Download PDF

Info

Publication number
CN109918257B
CN109918257B CN201711321098.0A CN201711321098A CN109918257B CN 109918257 B CN109918257 B CN 109918257B CN 201711321098 A CN201711321098 A CN 201711321098A CN 109918257 B CN109918257 B CN 109918257B
Authority
CN
China
Prior art keywords
hard disk
band communication
communication component
power supply
circuit
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.)
Active
Application number
CN201711321098.0A
Other languages
Chinese (zh)
Other versions
CN109918257A (en
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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201711321098.0A priority Critical patent/CN109918257B/en
Publication of CN109918257A publication Critical patent/CN109918257A/en
Application granted granted Critical
Publication of CN109918257B publication Critical patent/CN109918257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention provides a method and a device for processing hard disk exception, wherein the method is applied to electronic equipment which comprises an equipment end in-band communication component, an equipment end out-of-band communication component, a power supply and a control circuit, the equipment end in-band communication component is connected with the hard disk end in-band communication component of a hard disk through an in-band communication channel, and the control circuit is respectively connected with the equipment end out-of-band communication component, the power supply and the power supply circuit of the hard disk. The method comprises the following steps: and when the hard disk communication cannot be recovered by sending the repair message through the in-band communication component of the equipment end, the power of the hard disk is cut off through the out-of-band communication component of the equipment end. And when the power-off duration of the hard disk reaches a preset second duration, supplying power to the hard disk through the equipment end out-of-band communication component. Based on the processing, when the electronic equipment sends the repair message and cannot process the abnormity of the hard disk, the power of the hard disk can be cut off and the power can be supplied again, the normal communication of the hard disk can be recovered, and the efficiency of the abnormity processing of the hard disk can be improved.

Description

Hard disk exception handling method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a hard disk exception handling method and apparatus.
Background
Currently, a hard disk is one of the main storage media, and most electronic devices (e.g. computers, servers, etc.) are configured with the corresponding hard disk as the storage medium. In the process of using the hard disk, due to the reasons of quality problems, poor power supply, virus damage, high-frequency interference and the like, abnormity can occur. For example, a user may not respond when clicking an icon of a hard disk at a computer end, and the computer may not perform data transmission with the hard disk.
In the prior art, exception handling is usually performed on a hard disk based on a preset Interface protocol, which may be an ISCSI (Internet Small Computer System Interface) protocol. When the hard disk is abnormal, the electronic equipment can send a repair message specified by an interface protocol to the hard disk through the in-band communication channel to perform abnormal processing on the hard disk. When the hard disk is seriously abnormal, the electronic equipment may not enable the hard disk to recover normal communication through the method, and a user still cannot operate the hard disk through the electronic equipment.
Disclosure of Invention
The embodiment of the invention aims to provide a hard disk exception handling method, a hard disk exception handling device, electronic equipment and a computer readable storage medium, so as to improve the efficiency of hard disk exception handling. The specific technical scheme is as follows:
in a first aspect, to achieve the foregoing object, an embodiment of the present invention discloses a hard disk exception handling method, which is applied to an electronic device. The electronic equipment comprises an equipment end in-band communication component, an equipment end out-of-band communication component, a power supply and a control circuit; the equipment end in-band communication component is connected with the hard disk end in-band communication component of the hard disk through an in-band communication channel; the control circuit is respectively connected with the equipment end out-of-band communication component, the power supply and the power supply circuit of the hard disk, and the method comprises the following steps:
when the hard disk is detected to be abnormal, sending a repair message to the in-band communication component of the hard disk end through the in-band communication component of the equipment end;
if a first response message corresponding to the repair message is not received within a preset first time length, controlling the control circuit to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component;
and when the circuit connection time between the power supply and the power circuit is disconnected and reaches a preset second time, controlling the control circuit to switch on the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component.
Optionally, the controlling the control circuit to disconnect the circuit connection between the power supply and the power supply circuit by the device-side out-of-band communication component includes:
and sending a power-off control signal to the control circuit through the equipment end out-of-band communication component so that the control circuit disconnects the circuit connection between the power supply and the power circuit.
Optionally, the controlling the control circuit to conduct the circuit connection between the power supply and the power supply circuit through the device end out-of-band communication component includes:
and sending a power supply control signal to the control circuit through the equipment end out-of-band communication component so as to enable the control circuit to conduct the circuit connection between the power supply and the power circuit.
Optionally, after the controlling circuit is controlled by the device-side out-of-band communication component to conduct the circuit connection between the power supply and the power supply circuit, the method further includes:
sending a first operation message to the hard disk end in-band communication component through the equipment end in-band communication component;
and if the second response message corresponding to the first operation message is not received within a preset third time length, recording the hard disk as an unavailable hard disk.
Optionally, after recording the hard disk as an unavailable hard disk, the method further includes:
and outputting abnormal prompt information corresponding to the hard disk.
In a second aspect, in order to achieve the above object, an embodiment of the present invention discloses a hard disk exception handling apparatus, where the apparatus is applied to an electronic device. The electronic equipment comprises an equipment end in-band communication component, an equipment end out-of-band communication component, a power supply and a control circuit; the equipment end in-band communication component is connected with the hard disk end in-band communication component of the hard disk through an in-band communication channel; the control circuit is respectively connected with the equipment end out-of-band communication component, the power supply and the power supply circuit of the hard disk, and the device comprises:
the sending module is used for sending a repair message to the hard disk end in-band communication component through the equipment end in-band communication component when the abnormality of the hard disk is detected;
the power-off module is used for controlling the control circuit to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component if the first response message corresponding to the repair message is not received within a preset first time length;
and the power supply module is used for controlling the control circuit to conduct the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component when the circuit connection time between the power supply and the power circuit is disconnected and reaches a preset second time.
Optionally, the power-off module is specifically configured to send a power-off control signal to the control circuit through the device side out-of-band communication component, so that the control circuit disconnects the circuit connection between the power supply and the power supply circuit.
Optionally, the power supply module is specifically configured to send a power supply control signal to the control circuit through the device end out-of-band communication component, so that the control circuit conducts a circuit connection between the power supply and the power supply circuit.
Optionally, the apparatus further comprises:
the recording module is used for sending a first operation message to the hard disk end in-band communication component through the equipment end in-band communication component;
and if the second response message corresponding to the first operation message is not received within a preset third time, recording the hard disk as an unavailable hard disk.
Optionally, the apparatus further comprises:
and the output module is used for outputting the abnormal prompt information corresponding to the hard disk.
In another aspect of the implementation of the present invention, in order to achieve the above object, an embodiment of the present invention further discloses an electronic device, where the electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the hard disk exception handling method according to the first aspect when executing the program stored in the memory.
In another aspect of the present invention, there is also provided a computer-readable storage medium, which stores instructions that, when executed on a computer, implement the hard disk exception handling method according to the first aspect.
In another aspect of the present invention, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the hard disk exception handling method according to the first aspect.
The embodiment of the invention provides a hard disk exception handling method, a hard disk exception handling device, electronic equipment and a computer readable storage medium. The equipment end in-band communication component is connected with the hard disk end in-band communication component of the hard disk through an in-band communication channel. The control circuit is respectively connected with the equipment end out-of-band communication part, the power supply and the power supply circuit of the hard disk. The method comprises the following steps: when the abnormality of the hard disk is detected, the electronic equipment can send a repair message to the in-band communication component of the hard disk end through the in-band communication component of the equipment end. If the first response message corresponding to the repair message is not received within the preset first time length, the electronic equipment can control the control circuit to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component. When the circuit connection time length between the power supply and the power circuit is disconnected reaches a preset second time length, the electronic equipment can control the control circuit to be connected with the circuit between the power supply and the power circuit through the equipment end out-of-band communication component. Based on the processing, when the electronic equipment sends the repair message and cannot process the abnormality of the hard disk, the power of the hard disk can be cut off and the power can be supplied again, the normal communication of the hard disk can be recovered, and the efficiency of processing the abnormality of the hard disk can be further improved.
Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram illustrating a connection between an electronic device and a hard disk according to an embodiment of the present invention;
fig. 2 is a flowchart of a hard disk exception handling method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a hard disk exception handling apparatus according to an embodiment of the present invention;
fig. 4 is a flowchart of an operation performed on a hard disk according to an embodiment of the present invention;
fig. 5 is a structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the 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 embodiment of the invention provides a hard disk exception handling method which can be applied to electronic equipment, wherein the electronic equipment can be a terminal or a server. The electronic equipment comprises an equipment end in-band communication component, an equipment end out-of-band communication component, a power supply and a control circuit. The equipment end in-band communication component is connected with the hard disk end in-band communication component of the hard disk through an in-band communication channel. The control circuit is respectively connected with the equipment end out-of-band communication component, the power supply and the power supply circuit of the hard disk. When the abnormality of the hard disk is detected, the electronic equipment can send a repair message to the in-band communication component of the hard disk end through the in-band communication component of the equipment end. If the first response message corresponding to the repair message is not received within the preset first duration, the electronic equipment can control the control circuit to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component. When the circuit connection time length between the power supply and the power circuit is disconnected reaches a preset second time length, the electronic equipment can control the control circuit to be connected with the circuit between the power supply and the power circuit through the equipment end out-of-band communication component. Based on the processing, when the electronic equipment sends the repair message to the hard disk and cannot recover the normal communication of the hard disk, the electronic equipment can realize the power failure and the power re-supply of the hard disk and recover the normal communication of the hard disk, so that the efficiency of processing the hard disk abnormity is improved.
An embodiment of the present invention provides a schematic diagram of connection between an electronic device and a hard disk, referring to fig. 1, including:
electronic equipment and hard disk, wherein, electronic equipment can include: the device comprises an equipment end in-band communication component, an equipment end out-of-band communication component, a power supply and a control circuit. The hard disk may include a hard disk in-band communication component and a power circuit. The device-side in-band communication component and the hard disk-side in-band communication component may communicate in-band via an in-band communication channel. The in-band communication channel may be a channel shared by an interface of the electronic device and an interface of the hard disk for transmitting instructions and data. The power supply of the electronic equipment can be connected with the power circuit of the hard disk to supply power to the hard disk. The hard disk may obtain power from a power supply of the electronic device through the power circuit. The device-side out-of-band communication component may send a control signal to the control circuit to cause the control circuit to turn on or off a circuit connection between the power supply of the electronic device and the power supply circuit of the hard disk to supply power to the hard disk or to turn off the power supply of the hard disk.
Generally, the equipment-side in-band communication component and the hard disk-side in-band communication component perform in-band communication through an in-band communication channel. When a hard disk has a serious abnormality, for example, IO timeout, repeated IO retry failure, or the like, the device-side in-band communication component and the hard disk-side in-band communication component cannot perform normal in-band communication. At this time, the electronic device cannot send a power-off or power-supply instruction to the hard disk end in-band communication component through the device end in-band communication component. The electronic equipment can send a power-off control signal to the control circuit through the equipment end out-of-band communication component, so that the control circuit disconnects the circuit connection between the power supply of the electronic equipment and the power supply circuit of the hard disk, and the hard disk is powered off. When the power-off duration of the hard disk reaches a preset second duration, the electronic equipment can send a power supply control signal to the control circuit through the equipment end out-of-band communication component, so that the control circuit is connected with a circuit between a power supply of the electronic equipment and a power supply circuit of the hard disk, and the hard disk is powered on. Based on the above processing, the electronic device can resume normal communication of the hard disk, that is, resume in-band communication between the device-side in-band communication section and the hard disk-side in-band communication section.
Referring to fig. 2, fig. 2 is a flowchart of a hard disk exception handling method according to an embodiment of the present invention, including:
s201: and when the abnormality of the hard disk is detected, sending a repair message to the in-band communication component of the hard disk end through the in-band communication component of the equipment end.
In implementation, a user may interface the hard disk with the electronic device so that the user may operate the hard disk through the electronic device. When the user uses the electronic equipment to operate the hard disk, the electronic equipment sends a second operation message to the hard disk through the in-band communication channel. And after receiving the second operation message sent by the electronic equipment, the hard disk executes corresponding operation and sends an operation response message to the electronic equipment through the in-band communication channel. However, hard disks sometimes cannot communicate properly due to their own quality problems, poor power supply, virus damage, high frequency interference, and the like. If the electronic device does not receive the operation response message sent by the hard disk within a preset time period (which may be referred to as a fourth time period for distinguishing from the time period below), the electronic device may determine that the hard disk is abnormal. At this time, the electronic device may send the repair message to the hard disk through the in-band communication channel according to the preset interface protocol, so that the hard disk executes a corresponding repair operation. The Interface protocol may be an ISCSI (Internet Small Computer System Interface) protocol. Under the ISCSI protocol, the repair operations performed by the hard disk may include: data layer abort IO, data layer lun reset, data layer target reset, link layer link reset, physical layer hard reset.
S202: and if the first response message corresponding to the repair message is not received within the preset first time length, the control circuit is controlled to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component.
Wherein the first duration may be set by a technician empirically.
In an implementation, the electronic device may start timing when a repair message is sent to the hard disk. When the timing reaches the first time length, if the electronic equipment does not receive the first response message corresponding to the repair message, the control circuit can be controlled by the equipment end out-of-band communication component to disconnect the circuit connection between the power supply and the power circuit, so as to power off the hard disk.
Optionally, the electronic device may send a control signal to the control circuit through the device end out-of-band communication component to power off the hard disk. Specifically, the processing steps may include: and sending a power-off control signal to the control circuit through the equipment terminal out-of-band communication component so that the control circuit disconnects the circuit connection between the power supply and the power circuit.
The control circuit may be a circuit in the electronic device for controlling the connection between the power supply and the power circuit to be turned on or off.
In an implementation, the electronic device may send a power-off control signal to the control circuit through the device-side out-of-band communication component. After the control circuit receives the power-off control signal, the circuit connection between the power supply and the power circuit can be disconnected, and the hard disk is powered off.
S203: and when the circuit connection time length between the power supply and the power circuit is disconnected reaches a preset second time length, the control circuit is controlled to be connected with the circuit between the power supply and the power circuit through the equipment end out-of-band communication component.
In an implementation, the electronic device may start timing when the electrical connection between the power supply and the power circuit is broken. When the timing reaches the second duration, the electronic device can control the control circuit to conduct the circuit connection between the power supply and the power circuit through the out-of-band communication component to supply power to the hard disk. The second time period may be set by a technician according to experience, and the technician may set the second time period to 0.3 seconds, for example.
Optionally, the electronic device may send a control signal to the control circuit through the device-side out-of-band communication component to supply power to the hard disk. Specifically, the processing steps may include: and sending a power supply control signal to the control circuit through the equipment terminal out-of-band communication component so as to enable the control circuit to conduct circuit connection between the power supply and the power circuit.
In an implementation, the electronic device may send the power supply control signal to the control circuit through the device-side out-of-band communication component. After the control circuit receives the power supply control signal, the circuit connection between the power supply and the power circuit can be conducted to supply power to the hard disk.
As can be seen from the above, based on the method for processing hard disk exception provided in the embodiment of the present invention, when the electronic device sends the repair message to the hard disk and cannot recover the normal communication of the hard disk, the electronic device may power off and re-supply power to the hard disk to recover the normal communication of the hard disk, thereby improving the efficiency of processing hard disk exception, and reducing the loss caused by the downtime of the system to which the hard disk belongs.
Optionally, after the electronic device powers off and supplies power to the hard disk, it may be determined whether the hard disk resumes normal communication. Specifically, the processing steps may include: and sending a first operation message to the hard disk end in-band communication component through the equipment end in-band communication component, and recording the hard disk as an unavailable hard disk if a second response message corresponding to the first operation message is not received within a preset third time length.
Wherein the second time period may be set by a technician empirically.
In an implementation, after the electronic device powers off and supplies power to the hard disk, the user may continue to operate the hard disk using the electronic device. The electronic device sends a first operation message to the hard disk side in-band communication component through the device side in-band communication component. The first operation message may be the same as the second operation message, or may be different from the second operation message. Correspondingly, if the second response message corresponding to the first operation message is not received within the third duration, that is, the hard disk does not recover normal communication, at this time, the electronic device may record that the hard disk is an unavailable hard disk. Specifically, the electronic device may obtain an identifier of the hard disk, and record that the hard disk corresponding to the identifier is an unavailable hard disk.
In addition, after the electronic device powers off and supplies power to the hard disk, the device end in-band communication component sends a detection message (the first operation message) to the hard disk end in-band communication component, and if a second response message is not received within a third time period, the hard disk is recorded as an unavailable hard disk.
It should be noted that, in a general case, after the electronic device powers off and supplies power to the hard disk once, if the hard disk still cannot normally communicate, the electronic device may record that the hard disk is an unavailable hard disk. And if the business of the electronic equipment allows, the electronic equipment can perform the operations of powering off and supplying power for the hard disk for a plurality of times so as to recover the normal communication of the hard disk as much as possible.
Optionally, after the electronic device records that the hard disk is an unavailable hard disk, the electronic device may further output an exception prompt message corresponding to the hard disk.
In implementation, the electronic device may output and display the abnormal information corresponding to the unavailable hard disk to the user, for example, display "prompt: hard disk X is not available "so that a user can replace an unavailable hard disk with information that the hard disk is not available, or transfer data that needs to be stored in the electronic device to another available hard disk.
As can be seen from the above, according to the hard disk exception handling method provided in the embodiment of the present invention, after the hard disk is recorded as the unavailable hard disk, the electronic device may further output the exception prompt information corresponding to the hard disk, so that the user may perform corresponding handling according to the unavailable information of the hard disk, and user experience is improved.
An embodiment of the present invention further provides a complete flowchart for operating a hard disk, where this embodiment takes an example that an electronic device sends a second operation message to the hard disk as an example, as shown in fig. 3, the method may include the following steps:
s301: and sending a second operation message to the hard disk through the in-band communication channel.
S302: and the operation response message sent by the hard disk is not received within the fourth time length.
S303: and sending the repair message to the hard disk through the in-band communication channel.
S304: whether a first response message is received within a first duration.
If yes, go to S305, if no, go to S306.
S305: and determining that the hard disk response is successful.
S306: the hard disk is powered off by the out-of-band communication component.
S307: spaced apart by a second length of time.
S308: the hard disk is powered by the out-of-band communication component.
S309: and sending the first operation message to the hard disk through the in-band communication channel.
S3010: whether a second response message is received within a third duration.
If yes, go to S305, if no, go to S3011.
S3011: recording the hard disk as an unavailable hard disk.
S3012: and determining that the hard disk response fails.
Therefore, when the electronic equipment sends the repair message to the hard disk and cannot recover the normal communication of the hard disk, the electronic equipment can realize the power failure and the power re-supply of the hard disk and recover the normal communication of the hard disk, and further improve the efficiency of the abnormal processing of the hard disk.
Corresponding to the above method embodiment, referring to fig. 4, fig. 4 is a structural diagram of a hard disk exception handling apparatus provided in an embodiment of the present invention, where the apparatus is applied to an electronic device, and the electronic device includes an in-device communication component at a device end, an out-of-device communication component at the device end, a power supply and a control circuit; the equipment end in-band communication component is connected with the hard disk end in-band communication component of the hard disk through an in-band communication channel; the control circuit is respectively connected with the equipment end out-of-band communication component, the power supply and the power supply circuit of the hard disk, and the device comprises:
a sending module 401, configured to send, when it is detected that the hard disk is abnormal, a repair message to the hard disk in-band communication component through the device in-band communication component;
a power-off module 402, configured to control the control circuit to disconnect a circuit connection between the power supply and the power circuit through the device out-of-band communication component if a first response message corresponding to the repair message is not received within a preset first duration;
and a power supply module 403, configured to control the control circuit to turn on the circuit connection between the power supply and the power circuit through the device end out-of-band communication component when the circuit connection time length between the power supply and the power circuit is disconnected reaches a preset second time length.
In this embodiment of the present invention, the power-off module 402 is specifically configured to send a power-off control signal to the control circuit through the device-side out-of-band communication component, so that the control circuit disconnects the circuit connection between the power supply and the power circuit.
In this embodiment of the present invention, the power supply module 403 is specifically configured to send a power supply control signal to the control circuit through the device out-of-band communication component, so that the control circuit conducts a circuit connection between the power supply and the power supply circuit.
In an embodiment of the present invention, the apparatus further includes:
the recording module is used for sending a first operation message to the hard disk end in-band communication component through the equipment end in-band communication component;
and if the second response message corresponding to the first operation message is not received within a preset third time, recording the hard disk as an unavailable hard disk.
In an embodiment of the present invention, the apparatus further includes:
and the output module is used for outputting the abnormal prompt information corresponding to the hard disk.
As can be seen from the above, based on the hard disk exception handling device provided in the embodiment of the present invention, when the electronic device sends the repair message to the hard disk and cannot recover the normal communication of the hard disk, the electronic device may power off and re-supply power to the hard disk, and recover the normal communication of the hard disk, thereby improving the efficiency of handling the exception of the hard disk.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the following steps when executing the program stored in the memory 503:
when the hard disk is detected to be abnormal, sending a repair message to the in-band communication component of the hard disk end through the in-band communication component of the equipment end;
if a first response message corresponding to the repair message is not received within a preset first time length, the control circuit is controlled to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component;
and when the circuit connection time between the power supply and the power circuit is disconnected and reaches a preset second time, controlling the control circuit to switch on the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component.
The communication bus 504 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 504 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface 502 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory 503 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory 503 may also be at least one storage device located remotely from the aforementioned processor.
The Processor 501 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The electronic equipment provided by the embodiment of the invention can realize the power failure and the power re-supply of the hard disk when the repair message is sent and the abnormality of the hard disk cannot be processed, and the normal communication of the hard disk is recovered, thereby improving the efficiency of processing the abnormality of the hard disk.
The embodiment of the invention also provides a computer-readable storage medium, wherein the computer-readable storage medium is stored with instructions, and when the computer-readable storage medium runs on a computer, the computer is enabled to execute the hard disk exception handling method provided by the embodiment of the invention.
Specifically, the hard disk exception handling method includes:
when the hard disk is detected to be abnormal, sending a repair message to the hard disk end in-band communication component through the equipment end in-band communication component;
if a first response message corresponding to the repair message is not received within a preset first time length, the control circuit is controlled to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component;
and when the circuit connection time between the power supply and the power circuit is disconnected and reaches a preset second time, controlling the control circuit to switch on the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component.
It should be noted that other implementation manners of the hard disk exception handling method are the same as those of the foregoing method embodiment, and are not described here again.
By operating the instruction stored in the computer readable storage medium provided by the embodiment of the invention, when the abnormal condition of the hard disk cannot be processed by sending the repair message, the power failure and the power re-supply of the hard disk can be realized, the normal communication of the hard disk is recovered, and the efficiency of processing the abnormal condition of the hard disk is further improved.
The embodiment of the invention also provides another computer program product containing instructions, and when the computer program product runs on a computer, the computer is enabled to execute the hard disk exception handling method provided by the embodiment of the invention.
Specifically, the hard disk exception handling method includes:
when the hard disk is detected to be abnormal, sending a repair message to the hard disk end in-band communication component through the equipment end in-band communication component;
if a first response message corresponding to the repair message is not received within a preset first time length, controlling the control circuit to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component;
and when the circuit connection time between the power supply and the power circuit is disconnected and reaches a preset second time, controlling the control circuit to switch on the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component.
It should be noted that other implementation manners of the hard disk exception handling method are the same as those of the foregoing method embodiment, and are not described here again.
By operating the computer program product provided by the embodiment of the invention, when the abnormal condition of the hard disk cannot be processed by sending the repair message, the power failure and the power re-supply of the hard disk can be realized, the normal communication of the hard disk is recovered, and the abnormal condition processing efficiency of the hard disk is further improved.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A hard disk exception handling method is characterized in that the method is applied to electronic equipment, and the electronic equipment comprises an equipment end in-band communication component, an equipment end out-of-band communication component, a power supply and a control circuit; the equipment end in-band communication component is connected with the hard disk end in-band communication component of the hard disk through an in-band communication channel; the control circuit is respectively connected with the equipment end out-of-band communication component, the power supply and the power supply circuit of the hard disk, and the method comprises the following steps:
when the hard disk is detected to be abnormal, sending a repair message to the in-band communication component of the hard disk end through the in-band communication component of the equipment end, so that the hard disk executes corresponding repair operation;
if a first response message corresponding to the repair message is not received within a preset first time length, the control circuit is controlled to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component;
and when the circuit connection time length between the power supply and the power circuit is disconnected and reaches a preset second time length, controlling the control circuit to conduct the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component.
2. The method of claim 1, wherein the controlling, by the device-side out-of-band communication component, the control circuit to break the electrical connection between the power supply and the power circuit comprises:
and sending a power-off control signal to the control circuit through the equipment end out-of-band communication component so that the control circuit disconnects the circuit connection between the power supply and the power circuit.
3. The method of claim 1, wherein the controlling the control circuitry to conduct the circuit connection between the power supply and the power circuitry by the device-side out-of-band communication component comprises:
and sending a power supply control signal to the control circuit through the equipment end out-of-band communication component so as to enable the control circuit to conduct the circuit connection between the power supply and the power circuit.
4. The method of claim 1, wherein after the controlling the control circuitry by the device-side out-of-band communication component to conduct the circuit connection between the power supply and the power circuitry, the method further comprises:
sending a first operation message to the hard disk end in-band communication component through the equipment end in-band communication component;
and if the second response message corresponding to the first operation message is not received within a preset third time, recording the hard disk as an unavailable hard disk.
5. The method of claim 4, wherein after said recording said hard disk as a non-available hard disk, said method further comprises:
and outputting abnormal prompt information corresponding to the hard disk.
6. The device is characterized by being applied to electronic equipment, wherein the electronic equipment comprises an equipment end in-band communication component, an equipment end out-of-band communication component, a power supply and a control circuit; the equipment end in-band communication component is connected with the hard disk end in-band communication component of the hard disk through an in-band communication channel; the control circuit respectively with the equipment end communication part outside the band, power supply and the power supply circuit connection of hard disk, the device includes:
the sending module is used for sending a repair message to the hard disk end in-band communication component through the equipment end in-band communication component when the abnormality of the hard disk is detected, so that the hard disk executes corresponding repair operation;
the power-off module is used for controlling the control circuit to disconnect the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component if a first response message corresponding to the repair message is not received within a preset first time length;
and the power supply module is used for controlling the control circuit to be switched on for the circuit connection between the power supply and the power circuit through the equipment end out-of-band communication component when the circuit connection time between the power supply and the power circuit is disconnected and reaches a preset second time length.
7. The apparatus of claim 6,
the power-off module is specifically configured to send a power-off control signal to the control circuit through the device-side out-of-band communication component, so that the control circuit disconnects the circuit connection between the power supply and the power supply circuit.
8. The apparatus of claim 6,
the power supply module is specifically configured to send a power supply control signal to the control circuit through the device-side out-of-band communication component, so that the control circuit conducts a circuit connection between the power supply and the power supply circuit.
9. The apparatus of claim 6, further comprising:
the recording module is used for sending a first operation message to the hard disk end in-band communication component through the equipment end in-band communication component;
and if the second response message corresponding to the first operation message is not received within a preset third time, recording the hard disk as an unavailable hard disk.
10. The apparatus of claim 9, further comprising:
and the output module is used for outputting the abnormal prompt information corresponding to the hard disk.
11. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-5.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN201711321098.0A 2017-12-12 2017-12-12 Hard disk exception handling method and device Active CN109918257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711321098.0A CN109918257B (en) 2017-12-12 2017-12-12 Hard disk exception handling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711321098.0A CN109918257B (en) 2017-12-12 2017-12-12 Hard disk exception handling method and device

Publications (2)

Publication Number Publication Date
CN109918257A CN109918257A (en) 2019-06-21
CN109918257B true CN109918257B (en) 2022-11-04

Family

ID=66957742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711321098.0A Active CN109918257B (en) 2017-12-12 2017-12-12 Hard disk exception handling method and device

Country Status (1)

Country Link
CN (1) CN109918257B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112289368B (en) * 2020-10-27 2023-07-25 英业达科技有限公司 Universal hard disk simulation counterweight jig

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62172569A (en) * 1986-01-23 1987-07-29 Nec Corp Hard disk control circuit
CN102446123A (en) * 2010-10-09 2012-05-09 杭州华三通信技术有限公司 Method and device for processing SCSI sensing data
CN106598790A (en) * 2015-10-16 2017-04-26 中兴通讯股份有限公司 Server hardware failure detection method, apparatus of server, and server
WO2017125014A1 (en) * 2016-01-18 2017-07-27 中兴通讯股份有限公司 Method and device for monitoring hard disk

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62172569A (en) * 1986-01-23 1987-07-29 Nec Corp Hard disk control circuit
CN102446123A (en) * 2010-10-09 2012-05-09 杭州华三通信技术有限公司 Method and device for processing SCSI sensing data
CN106598790A (en) * 2015-10-16 2017-04-26 中兴通讯股份有限公司 Server hardware failure detection method, apparatus of server, and server
WO2017125014A1 (en) * 2016-01-18 2017-07-27 中兴通讯股份有限公司 Method and device for monitoring hard disk

Also Published As

Publication number Publication date
CN109918257A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
RU2614569C2 (en) Rack with automatic recovery function and method of automatic recovery for this rack
WO2020000758A1 (en) Server acceptance method and apparatus, computer device, and storage medium
US20120271645A1 (en) Automated replacement part ordering based on service thresholds
CN102799545A (en) Usb device remote control method and system
CN112445533A (en) Method, system, device and medium for resetting PCIE (peripheral component interface express) device
WO2016032442A1 (en) Computer device error instructions
CN111930222A (en) Control method and device and electronic equipment
CN109918257B (en) Hard disk exception handling method and device
CN105210043A (en) Information processing device
CN104699647A (en) Method and system for operating a dual chipset network interface controller
US10261937B2 (en) Method and system for communication of device information
CN117289963A (en) Method and equipment for online updating target area of server platform service firmware
WO2020102940A1 (en) Abnormality processing method, terminal device and storage medium
CN112214437B (en) Storage device, communication method and device and computer readable storage medium
CN105095043A (en) Monitoring management system and method thereof
US11176270B2 (en) Apparatus and method for improving data security
CN101964038A (en) Computer device for preventing camera shooting function from being embezzled and camera power supply control method
CN100588161C (en) Information processing device, method and programme
CN107194241B (en) Control method of terminal equipment, server, terminal equipment and control system
US20190332507A1 (en) Burn process data retrieval and notification
US10599510B2 (en) Computer system and error isolation method
CN110597652A (en) Fault detection system of intelligent interactive panel and control method thereof
CN114465963B (en) Switch abnormity detection method and device, electronic equipment and computer readable medium
US11652715B1 (en) Method for detecting network mis-cabling
US20220229755A1 (en) Docking stations health

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
GR01 Patent grant
GR01 Patent grant