CN109918257A - A kind of hard disk abnormality eliminating method and device - Google Patents
A kind of hard disk abnormality eliminating method and device Download PDFInfo
- Publication number
- CN109918257A CN109918257A CN201711321098.0A CN201711321098A CN109918257A CN 109918257 A CN109918257 A CN 109918257A CN 201711321098 A CN201711321098 A CN 201711321098A CN 109918257 A CN109918257 A CN 109918257A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- circuit
- power supply
- power
- band
- 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.)
- Granted
Links
Landscapes
- Power Sources (AREA)
- Communication Control (AREA)
Abstract
The embodiment of the invention provides a kind of hard disk abnormality eliminating method and devices, the above method is applied to electronic equipment, electronic equipment includes equipment end in-band communications component, equipment end out-of-band communication component, power supply and control circuit, equipment end in-band communications component is connected by the hard disk end in-band communications component of in-band communications channel and hard disk, and control circuit is connect with the power circuit of equipment end out-of-band communication component, power supply and hard disk respectively.Method includes: when hard disk communication can not be restored by sending reparation message by equipment end in-band communications component, is hard disk power-off by equipment end out-of-band communication component.It is hard disk power supply by equipment end out-of-band communication component when hard disk power-off duration reaches preset second duration.Based on above-mentioned processing, electronic equipment can be implemented as hard disk and power off and power again, restore the normal communication of hard disk, improve the efficiency of hard disk abnormality processing when the exception of hard disk can not be handled by sending reparation message.
Description
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of hard disk abnormality eliminating method and device.
Background technique
Currently, hard disk is one of main storaging medium, most electronic equipments (such as computer, server etc.) can all be configured
Corresponding hard disk is as storaging medium.Hard disk during use, due to quality problems, power bad, viral subversive and height
The reasons such as frequency interference, it may appear that abnormal.For example, user is reactionless in the icon that computer end clicks hard disk, computer can not be with hard disk
Situations such as carrying out data transmission.
The prior art is typically based on preset interface protocol and carries out abnormality processing to hard disk, and interface protocol can be ISCSI
(Internet Small Computer System Interface, Internet Small Computer interface) agreement.When hard disk goes out
When now abnormal, electronic equipment can repair message to as defined in hard disk transmission interface agreement by in-band communications channel, to hard disk
Carry out abnormality processing.When severely subnormal occurs for hard disk, electronic equipment possibly can not make disk recovery normal by the above method
Communication, user still can not operate hard disk by electronic equipment.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of hard disk abnormality eliminating method, device, electronic equipment and computer
Readable storage medium storing program for executing, to improve the efficiency of hard disk abnormality processing.Specific technical solution is as follows:
In a first aspect, in order to achieve the above object, it is above-mentioned the embodiment of the invention discloses a kind of hard disk abnormality eliminating method
Method is applied to electronic equipment.The electronic equipment includes equipment end in-band communications component, equipment end out-of-band communication component, power supply
Power supply and control circuit;The equipment end in-band communications component passes through the hard disk end in-band communications portion in in-band communications channel and hard disk
Part connection;The control circuit power supply with the equipment end out-of-band communication component, the power supply and the hard disk respectively
Circuit connection, the above method include:
When detecting that the hard disk is abnormal, through the equipment end in-band communications component into hard disk end band
Communication component, which is sent, repairs message;
If corresponding first response message of the reparation message is not received in preset first duration, by described
Control circuit described in equipment end out-of-band communication component controls disconnects the company of the circuit between the power supply and the power circuit
It connects;
When the circuit connection duration disconnected between the power supply and the power circuit reaches preset second duration
When, by control circuit described in the equipment end out-of-band communication component controls be connected the power supply and the power circuit it
Between circuit connection.
Optionally, described that the power supply is disconnected by control circuit described in the equipment end out-of-band communication component controls
With the circuit connection between the power circuit, comprising:
Power down control signal is sent to the control circuit by 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, described that the power supply is connected by control circuit described in the equipment end out-of-band communication component controls
With the circuit connection between the power circuit, comprising:
Power supplying control signal is sent to the control circuit by the equipment end out-of-band communication component, so that the control
The circuit connection between the power supply and the power circuit is connected in circuit.
Optionally, the power supply electricity is connected by control circuit described in the equipment end out-of-band communication component controls described
After circuit connection between source and the power circuit, the method also includes:
The first operation information is sent to the hard disk end in-band communications component by the equipment end in-band communications component;
It, will if not receiving corresponding second response message of first operation information in preset third duration
The hard disk recording is unavailable hard disk.
Optionally, it is described by the hard disk recording be unavailable hard disk after, the method also includes:
The abnormal prompt information of the corresponding hard disk of output.
Second aspect, it is in order to achieve the above object, above-mentioned the embodiment of the invention discloses a kind of hard disk exception handling device
Device is applied to electronic equipment.The electronic equipment includes equipment end in-band communications component, equipment end out-of-band communication component, power supply
Power supply and control circuit;The equipment end in-band communications component passes through the hard disk end in-band communications portion in in-band communications channel and hard disk
Part connection;The control circuit power supply with the equipment end out-of-band communication component, the power supply and the hard disk respectively
Circuit connection, above-mentioned apparatus include:
Sending module, for when detecting that the hard disk is abnormal, by the equipment end in-band communications component to
The hard disk end in-band communications component, which is sent, repairs message;
Power-off modular, if for not receiving corresponding first response of the reparation message in preset first duration
Message disconnects the power supply and the power circuit by control circuit described in the equipment end out-of-band communication component controls
Between circuit connection;
Power supply module, for reaching pre- when the circuit connection duration disconnected between the power supply and the power circuit
If the second duration when, pass through control circuit described in the equipment end out-of-band communication component controls and the power supply and institute be connected
State the circuit connection between power circuit.
Optionally, the power-off modular is specifically used for through the equipment end out-of-band communication component to the control circuit
Power down control signal is sent, so that the control circuit disconnects the company of the circuit between the power supply and the power circuit
It connects.
Optionally, the power supply module is specifically used for through the equipment end out-of-band communication component to the control circuit
Power supplying control signal is sent, so that the company of the circuit between the power supply and the power circuit is connected in the control circuit
It connects.
Optionally, described device further include:
Logging modle, for by the equipment end in-band communications component to hard disk end in-band communications component transmission the
One operation information;
It, will if not receiving corresponding second response message of first operation information in preset third duration
The hard disk recording is unavailable hard disk.
Optionally, described device further include:
Output module, for exporting the abnormal prompt information of the corresponding hard disk.
In the another aspect that the present invention is implemented, in order to achieve the above object, the embodiment of the invention also discloses a kind of electronics
Equipment, the electronic equipment include processor, communication interface, memory and communication bus, wherein and the processor is described logical
Believe that interface, the memory complete mutual communication by the communication bus;
The memory, for storing computer program;
The processor when for executing the program stored on the memory, is realized as described in above-mentioned first aspect
Hard disk abnormality eliminating method.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable
It is stored with instruction in storage medium, when run on a computer, realizes the hard disk exception as described in above-mentioned first aspect
Reason method.
At the another aspect that the present invention is implemented, the embodiment of the invention also provides a kind of, and the computer program comprising instruction is produced
Product, when run on a computer, so that computer executes hard disk abnormality eliminating method described in above-mentioned first aspect.
The embodiment of the invention provides hard disk abnormality eliminating method, device, electronic equipment and computer readable storage medium,
The above method is applied to electronic equipment, and electronic equipment includes equipment end in-band communications component, equipment end out-of-band communication component, power supply
Power supply and control circuit.Equipment end in-band communications component is connected by the hard disk end in-band communications component of in-band communications channel and hard disk
It connects.Control circuit is connect with the power circuit of equipment end out-of-band communication component, power supply and hard disk respectively.Above method packet
Include: when detecting that hard disk is abnormal, electronic equipment can be by equipment end in-band communications component to the in-band communications of hard disk end
Component, which is sent, repairs message.Corresponding first response message of message, electricity are repaired if do not received in preset first duration
Sub- equipment can disconnect the circuit between power supply and power circuit by equipment end out-of-band communication component controls control circuit
Connection.When the circuit connection duration between disconnection power supply and power circuit reaches preset second duration, electronic equipment
The circuit connection between power supply and power circuit can be connected by equipment end out-of-band communication component controls control circuit.Base
In above-mentioned processing, electronic equipment can be implemented as hard disk power-off and lay equal stress on when the exception of hard disk can not be handled by sending reparation message
New power supply restores the normal communication of hard disk, and then improves the efficiency of hard disk abnormality processing.
Certainly, it implements any of the products of the present invention or method must be not necessarily required to reach all the above excellent simultaneously
Point.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the schematic diagram that a kind of electronic equipment provided in an embodiment of the present invention is connect with hard disk;
Fig. 2 is a kind of flow chart of hard disk abnormality eliminating method provided in an embodiment of the present invention;
Fig. 3 is a kind of structure chart of hard disk exception handling device provided in an embodiment of the present invention;
Fig. 4 is the flow chart that a kind of pair of hard disk provided in an embodiment of the present invention is operated;
Fig. 5 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of hard disk abnormality eliminating method, this method can be applied to electronic equipment, the electricity
Sub- equipment can be terminal, be also possible to server.Above-mentioned electronic equipment includes equipment end in-band communications component, outside equipment end band
Communication component, power supply and control circuit.Equipment end in-band communications component passes through the hard disk end in in-band communications channel and hard disk
The connection of in-band communications component.Control circuit connects with the power circuit of equipment end out-of-band communication component, power supply and hard disk respectively
It connects.When detecting that hard disk is abnormal, electronic equipment can be by equipment end in-band communications component to the in-band communications of hard disk end
Component, which is sent, repairs message.Corresponding first response message of message, electricity are repaired if do not received in preset first duration
Sub- equipment can disconnect the circuit between power supply and power circuit by equipment end out-of-band communication component controls control circuit
Connection.When the circuit connection duration between disconnection power supply and power circuit reaches preset second duration, electronic equipment
The circuit connection between power supply and power circuit can be connected by equipment end out-of-band communication component controls control circuit.Base
In above-mentioned processing, electronic equipment can be implemented as hard when the normal communication of hard disk can not be restored by sending reparation message to hard disk
Disk is powered off and is powered again, restores the normal communication of hard disk, and then improve the efficiency of hard disk abnormality processing.
The embodiment of the invention provides the schematic diagrames that a kind of electronic equipment is connect with hard disk, referring to Fig. 1, comprising:
Electronic equipment and hard disk, wherein electronic equipment may include: equipment end in-band communications component, logical outside equipment end band
Believe component, power supply and control circuit.Hard disk may include hard disk end in-band communications component and power circuit.In equipment end band
Communication component and hard disk end in-band communications component can carry out in-band communications by in-band communications channel.Wherein, in-band communications are believed
Road, which can be, transmits the shared channel of instruction and data between the interface of electronic equipment and the interface of hard disk.The power supply of electronic equipment
Power supply can be connect with the power circuit of hard disk, for hard disk power supply.Hard disk can be by power circuit from the confession of electronic equipment
Power supply obtains electric energy.Equipment end out-of-band communication component can send control signal to control circuit, so that control circuit is connected
Perhaps the circuit connection between the power supply of electronic equipment and the power circuit of hard disk is disconnected to power for hard disk or be hard
Disk power-off.
Under normal conditions, equipment end in-band communications component is carried out with hard disk end in-band communications component by in-band communications channel
In-band communications.When severely subnormal occurs for hard disk, for example, situations such as IO is overtime, IO is retried unsuccessfully repeatedly, equipment end in-band communications
Component and hard disk end in-band communications component can not carry out normal in-band communications.At this point, electronic equipment can not pass through equipment end band
Interior communication component sends power-off or power supply instruction to hard disk end in-band communications component.Electronic equipment can be by equipment end band outside
Communication component sends power down control signal to control circuit, so that control circuit disconnects the power supply and hard disk of electronic equipment
Circuit connection between power circuit powers off for hard disk.When hard disk power-off duration reaches preset second duration, electronic equipment
Power supplying control signal can be sent to control circuit by equipment end out-of-band communication component, so that control circuit conduct electrons equipment
Power supply and hard disk power circuit between circuit connection, for hard disk power.Based on above-mentioned processing, electronic equipment can be with
The normal communication for restoring hard disk, i.e., leading between restorer end in-band communications component and hard disk end in-band communications component with interior
Letter.
Referring to fig. 2, Fig. 2 is a kind of flow chart of hard disk abnormality eliminating method provided in an embodiment of the present invention, comprising:
S201: when detecting that hard disk is abnormal, by equipment end in-band communications component to hard disk end in-band communications portion
Part, which is sent, repairs message.
In an implementation, hard disk can be connect with electronic equipment by interface by user, so that user can pass through electronics
Equipment operates hard disk.When user operates hard disk using electronic equipment, electronic equipment then can be by with interior logical
Believe that channel sends the second operation information to hard disk.After hard disk receives the second operation information of electronic equipment transmission, phase can be executed
The operation answered, and operation response message is sent to electronic equipment by in-band communications channel.However, quality of the hard disk due to itself
Problem, the power supply reasons such as bad, viral subversive and High-frequency Interference are unable to normal communication sometimes.If preset duration (in order to
With hereafter duration distinguish, can be described as the 4th duration) inner electronic equipment do not receive hard disk transmission operation response message, electronics
Equipment can determine that hard disk is abnormal.At this point, electronic equipment can pass through in-band communications channel according to preset interface protocol
It is sent to hard disk and repairs message, so that hard disk executes corresponding reparation operation.Wherein, interface protocol can be ISCSI
(Internet Small Computer System Interface, Internet Small Computer interface) agreement.It is assisted in ISCSI
Under view, the reparation operation that hard disk executes may include: data Layer abort IO, data Layer lun reset, data Layer target
Reset, link layer link reset, physical layer hard reset.
S202: corresponding first response message of message is repaired if do not received in preset first duration, by setting
Standby end out-of-band communication component controls control circuit disconnects the circuit connection between power supply and power circuit.
Wherein, the first duration can be rule of thumb configured by technical staff.
In an implementation, electronic equipment can start timing when sending to hard disk and repairing message.When timing reaches first
When long, if electronic equipment, which does not receive, repairs corresponding first response message of message, equipment end out-of-band communication can be passed through
Component controls control circuit disconnects the circuit connection between power supply and power circuit, for hard disk power-off.
Optionally, electronic equipment can by equipment end out-of-band communication component to control circuit send control signal, with for
Hard disk power-off.Specifically, above-mentioned processing step may include: to send to power off to control circuit by equipment end out-of-band communication component
Signal is controlled, so that control circuit disconnects the circuit connection between power supply and power circuit.
Wherein, control circuit can be in electronic equipment for controlling the circuit connection between power supply and power circuit
The circuit being switched on or off.
In an implementation, electronic equipment can send power-off control letter to control circuit by equipment end out-of-band communication component
Number.After control circuit receives power down control signal, the circuit connection between power supply and power circuit can be disconnected, is hard
Disk power-off.
S203: when the circuit connection duration between disconnection power supply and power circuit reaches preset second duration,
The circuit connection between power supply and power circuit is connected by equipment end out-of-band communication component controls control circuit.
In an implementation, electronic equipment can start to count when disconnecting the circuit connection between power supply and power circuit
When.When timing reaches the second duration, power supply can be connected by out-of-band communication component controls control circuit in electronic equipment
Circuit connection between power circuit, for hard disk power supply.Wherein, the second duration can rule of thumb be carried out by technical staff
Setting, illustratively, technical staff can set the second duration to 0.3 second.
Optionally, electronic equipment can by equipment end out-of-band communication component to control circuit send control signal, with for
Hard disk power supply.Specifically, above-mentioned processing step may include: to send to power to control circuit by equipment end out-of-band communication component
Signal is controlled, so that the circuit connection between control circuit conducting power supply and power circuit.
In an implementation, electronic equipment can send power supply control letter to control circuit by equipment end out-of-band communication component
Number.After control circuit receives power supplying control signal, the circuit connection between power supply and power circuit can be connected, be hard
Disk power supply.
From the above, it is seen that hard disk abnormality eliminating method based on the embodiment of the present invention, electronic equipment is to hard
When disk transmission reparation message can not restore the normal communication of hard disk, it can be implemented as hard disk and power off and power again, restore hard disk
Normal communication, and then improve hard disk abnormality processing efficiency, reduce hard disk said system delay machine bring loss.
Optionally, electronic equipment is after powering off and powering for hard disk, it can be determined that whether hard disk restores normal communication.Tool
Body, above-mentioned processing step may include: to send first to hard disk end in-band communications component by equipment end in-band communications component
Operation information will be hard if not receiving corresponding second response message of the first operation information in preset third duration
Disk is recorded as unavailable hard disk.
Wherein, the second duration can be rule of thumb configured by technical staff.
In an implementation, after powering off and powering for hard disk, user can be used electronic equipment and continues to hard electronic equipment
Disk is operated.Electronic equipment then can send the first operation to hard disk end in-band communications component by equipment end in-band communications component
Message.Wherein, the first operation information can be identical as above-mentioned second operation information, can also be with above-mentioned second operation information not phase
Together.Correspondingly, if not receiving corresponding second response message of the first operation information namely hard disk in third duration does not have
Restore normal communication, at this point, it is unavailable hard disk that electronic equipment, which can recorde the hard disk,.Specifically, electronic equipment is available
The mark of the hard disk, and recording the corresponding hard disk of the mark is unavailable hard disk.
In addition, electronic equipment can be after powering off and powering to hard disk, by equipment end in-band communications component to hard disk end
In-band communications component sends detection message (above-mentioned first operation information), if the second response not received in third duration
Hard disk recording is then unavailable hard disk by message.
It should be noted that under normal conditions, electronic equipment is after once being powered off and being powered for hard disk, if this is hard
Disk still can not normal communication, then electronic equipment can recorde the hard disk be unavailable hard disk.And if belonging to the electronic equipment
Business allows, the operation which repeatedly can be powered off and be powered to the hard disk, to restore the hard disk as far as possible
Normal communication.
Optionally, after electronic equipment recording disk is unavailable hard disk, the abnormal prompt of corresponding hard disk can also be exported
Information.
In an implementation, the corresponding exception information output of unavailable hard disk can be shown to user by electronic equipment, for example, aobvious
Show " prompt: hard disk X is unavailable ", so that user can carry out more not available hard disk according to the not available information of hard disk
It changes, or the data for needing to store in electronic equipment is transferred on other available hard disks.
From the above, it is seen that hard disk abnormality eliminating method based on the embodiment of the present invention, is not in recording disk
Can be with after hard disk, electronic equipment can also export the abnormal prompt information of corresponding hard disk, allow user can not according to hard disk
Information carries out respective handling, improves user experience.
The embodiment of the invention also provides the entire flow figures that a kind of pair of hard disk is operated, and the present embodiment is with electronic equipment
It is illustrated for sending the second operation information to hard disk, as shown in figure 3, may comprise steps of:
S301: the second operation information is sent to hard disk by in-band communications channel.
S302: the operation response message of hard disk transmission is not received in the 4th duration.
S303: it is sent by in-band communications channel to hard disk and repairs message.
S304: the first response message whether is received in the first duration.
If so, S305 is executed, if not, executing S306.
S305: hard disk response success is determined.
S306: being hard disk power-off by out-of-band communication component.
S307: the second duration of interval.
S308: being hard disk power supply by out-of-band communication component.
S309: the first operation information is sent to hard disk by in-band communications channel.
S3010: the second response message whether is received in third duration.
If so, S305 is executed, if not, executing S3011.
S3011: recording the hard disk is unavailable hard disk.
S3012: hard disk answer failed is determined.
From the above, it is seen that electronic equipment to hard disk send repair message can not restore the normal communication of hard disk when,
It can be implemented as hard disk to power off and power again, restore the normal communication of hard disk, and then improve the efficiency of hard disk abnormality processing.
Corresponding with above method embodiment, referring to fig. 4, Fig. 4 is a kind of hard disk exception provided in an embodiment of the present invention
The structure chart of device is managed, described device is applied to electronic equipment, and the electronic equipment includes equipment end in-band communications component, equipment
Hold out-of-band communication component, power supply and control circuit;The equipment end in-band communications component is by in-band communications channel and firmly
The hard disk end in-band communications component of disk connects;The control circuit respectively with the equipment end out-of-band communication component, the power supply
Power supply is connected with the power circuit of the hard disk, and described device includes:
Sending module 401, for passing through the equipment end in-band communications component when detecting that the hard disk is abnormal
It is sent to the hard disk end in-band communications component and repairs message;
Power-off modular 402, if for not receiving the reparation message corresponding first in preset first duration
Response message disconnects the power supply and the power supply by control circuit described in the equipment end out-of-band communication component controls
Circuit connection between circuit;
Power supply module 403, for being up to when disconnecting the circuit connection between the power supply and the power circuit
When to preset second duration, passes through control circuit described in the equipment end out-of-band communication component controls and the power supply is connected
With the circuit connection between the power circuit.
In embodiments of the present invention, the power-off modular 402, be specifically used for by the equipment end out-of-band communication component to
The control circuit sends power down control signal so that the control circuit disconnect the power supply and the power circuit it
Between circuit connection.
In embodiments of the present invention, the power supply module 403, be specifically used for by the equipment end out-of-band communication component to
The control circuit sends power supplying control signal so that the control circuit be connected the power supply and the power circuit it
Between circuit connection.
In embodiments of the present invention, described device further include:
Logging modle, for by the equipment end in-band communications component to hard disk end in-band communications component transmission the
One operation information;
It, will if not receiving corresponding second response message of first operation information in preset third duration
The hard disk recording is unavailable hard disk.
In embodiments of the present invention, described device further include:
Output module, for exporting the abnormal prompt information of the corresponding hard disk.
From the foregoing, it can be seen that hard disk exception handling device based on the embodiment of the present invention, electronic equipment are sent out to hard disk
When sending reparation message that can not restore the normal communication of hard disk, it can be implemented as hard disk and power off and power again, restoring hard disk just
Normal open letter, and then improve the efficiency of hard disk abnormality processing.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 5, include processor 501, communication interface 502,
Memory 503 and communication bus 504, wherein processor 501, communication interface 502, memory 503 are complete by communication bus 504
At mutual communication,
Memory 503, for storing computer program;
Processor 501 when for executing the program stored on memory 503, realizes following steps:
When detecting that the hard disk is abnormal, through the equipment end in-band communications component into hard disk end band
Communication component, which is sent, repairs message;
If corresponding first response message of the reparation message is not received in preset first duration, by described
Control circuit described in equipment end out-of-band communication component controls disconnects the company of the circuit between the power supply and the power circuit
It connects;
When the circuit connection duration disconnected between the power supply and the power circuit reaches preset second duration
When, by control circuit described in the equipment end out-of-band communication component controls be connected the power supply and the power circuit it
Between circuit connection.
The communication bus 504 that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral
Component Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry
Standard Architecture, abbreviation EISA) bus etc..The communication bus 504 can be divided into address bus, data/address bus,
Control bus etc..Only to be indicated with a thick line in figure, it is not intended that an only bus or a type of convenient for indicating
Bus.
Communication interface 502 is for the communication between above-mentioned electronic equipment and other equipment.
Memory 503 may include random access memory (Random Access Memory, abbreviation RAM), can also be with
Including nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory
503 can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor 501 can be general processor, including central processing unit (Central Processing
Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor
(Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific
Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array,
Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Electronic equipment provided in an embodiment of the present invention, when the exception of hard disk can not be handled by sending reparation message, Ke Yishi
It now powers off for hard disk and powers again, restore the normal communication of hard disk, and then improve the efficiency of hard disk abnormality processing.
The embodiment of the invention also provides a kind of computer readable storage medium, stored in the computer readable storage medium
There is instruction, when run on a computer, so that computer executes hard disk abnormality eliminating method provided in an embodiment of the present invention.
Specifically, above-mentioned hard disk abnormality eliminating method, comprising:
When detecting that the hard disk is abnormal, through the equipment end in-band communications component into hard disk end band
Communication component, which is sent, repairs message;
If corresponding first response message of the reparation message is not received in preset first duration, by described
Control circuit described in equipment end out-of-band communication component controls disconnects the company of the circuit between the power supply and the power circuit
It connects;
When the circuit connection duration disconnected between the power supply and the power circuit reaches preset second duration
When, by control circuit described in the equipment end out-of-band communication component controls be connected the power supply and the power circuit it
Between circuit connection.
It should be noted that other implementations of above-mentioned hard disk abnormality eliminating method and preceding method embodiment part phase
Together, which is not described herein again.
By running the instruction stored in computer readable storage medium provided in an embodiment of the present invention, disappear sending to repair
When breath can not handle the exception of hard disk, it can be implemented as hard disk and power off and power again, restore the normal communication of hard disk, Jin Erti
The efficiency of high hard disk abnormality processing.
The embodiment of the invention also provides another computer program products comprising instruction, when it runs on computers
When, so that computer executes hard disk abnormality eliminating method provided in an embodiment of the present invention.
Specifically, above-mentioned hard disk abnormality eliminating method, comprising:
When detecting that the hard disk is abnormal, through the equipment end in-band communications component into hard disk end band
Communication component, which is sent, repairs message;
If corresponding first response message of the reparation message is not received in preset first duration, by described
Control circuit described in equipment end out-of-band communication component controls disconnects the company of the circuit between the power supply and the power circuit
It connects;
When the circuit connection duration disconnected between the power supply and the power circuit reaches preset second duration
When, by control circuit described in the equipment end out-of-band communication component controls be connected the power supply and the power circuit it
Between circuit connection.
It should be noted that other implementations of above-mentioned hard disk abnormality eliminating method and preceding method embodiment part phase
Together, which is not described herein again.
By running computer program product provided in an embodiment of the present invention, hard disk can not be handled sending reparation message
When abnormal, it can be implemented as hard disk and power off and power again, restore the normal communication of hard disk, and then improve hard disk abnormality processing
Efficiency.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For electronic equipment, computer readable storage medium, computer program product embodiments, implement since it is substantially similar to method
Example, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (12)
1. a kind of hard disk abnormality eliminating method, which is characterized in that the method is applied to electronic equipment, and the electronic equipment includes
Equipment end in-band communications component, equipment end out-of-band communication component, power supply and control circuit;Equipment end in-band communications portion
Part is connected by the hard disk end in-band communications component of in-band communications channel and hard disk;The control circuit respectively with the equipment end
Out-of-band communication component, the power supply are connected with the power circuit of the hard disk, which comprises
When detecting that the hard disk is abnormal, by the equipment end in-band communications component to hard disk end in-band communications
Component, which is sent, repairs message;
If not receiving corresponding first response message of the reparation message in preset first duration, pass through the equipment
Control circuit described in the out-of-band communication component controls of end disconnects the circuit connection between the power supply and the power circuit;
When the circuit connection duration between the disconnection power supply and the power circuit reaches preset second duration, lead to
Control circuit described in the equipment end out-of-band communication component controls is crossed to be connected between the power supply and the power circuit
Circuit connection.
2. the method according to claim 1, wherein described pass through equipment end out-of-band communication component controls institute
It states control circuit and disconnects circuit connection between the power supply and the power circuit, comprising:
Power down control signal is sent to the control circuit by the equipment end out-of-band communication component, so that the control circuit
Disconnect the circuit connection between the power supply and the power circuit.
3. the method according to claim 1, wherein described pass through equipment end out-of-band communication component controls institute
It states control circuit and circuit connection between the power supply and the power circuit is connected, comprising:
Power supplying control signal is sent to the control circuit by the equipment end out-of-band communication component, so that the control circuit
The circuit connection between the power supply and the power circuit is connected.
4. the method according to claim 1, wherein passing through the equipment end out-of-band communication component controls described
After the circuit connection between the power supply and the power circuit is connected in the control circuit, the method also includes:
The first operation information is sent to the hard disk end in-band communications component by the equipment end in-band communications component;
It, will be described if not receiving corresponding second response message of first operation information in preset third duration
Hard disk recording is unavailable hard disk.
5. according to the method described in claim 4, it is characterized in that, it is described by the hard disk recording be unavailable hard disk it
Afterwards, the method also includes:
The abnormal prompt information of the corresponding hard disk of output.
6. a kind of hard disk exception handling device, which is characterized in that described device is applied to electronic equipment, and the electronic equipment includes
Equipment end in-band communications component, equipment end out-of-band communication component, power supply and control circuit;Equipment end in-band communications portion
Part is connected by the hard disk end in-band communications component of in-band communications channel and hard disk;The control circuit respectively with the equipment end
Out-of-band communication component, the power supply are connected with the power circuit of the hard disk, and described device includes:
Sending module, for when detecting that the hard disk is abnormal, by the equipment end in-band communications component to described
In-band communications component in hard disk end, which is sent, repairs message;
Power-off modular, if disappeared for not receiving corresponding first response of the reparation message in preset first duration
Breath, by control circuit described in the equipment end out-of-band communication component controls disconnect the power supply and the power circuit it
Between circuit connection;
Power supply module, for reaching preset when the circuit connection duration disconnected between the power supply and the power circuit
When the second duration, the power supply and the electricity are connected by control circuit described in the equipment end out-of-band communication component controls
Circuit connection between source circuit.
7. device according to claim 6, which is characterized in that
The power-off modular is specifically used for sending power-off control to the control circuit by the equipment end out-of-band communication component
Signal, so that the control circuit disconnects the circuit connection between the power supply and the power circuit.
8. device according to claim 6, which is characterized in that
The power supply module is specifically used for sending power supply control to the control circuit by the equipment end out-of-band communication component
Signal, so that the circuit connection between the power supply and the power circuit is connected in the control circuit.
9. device according to claim 6, which is characterized in that described device further include:
Logging modle, for sending the first behaviour to the hard disk end in-band communications component by the equipment end in-band communications component
Make message;
It, will be described if not receiving corresponding second response message of first operation information in preset third duration
Hard disk recording is unavailable hard disk.
10. device according to claim 9, which is characterized in that described device further include:
Output module, for exporting the abnormal prompt information of the corresponding hard disk.
11. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein described
Processor, the communication interface, the memory complete mutual communication by the communication bus;
The memory, for storing computer program;
The processor when for executing the program stored on the memory, realizes any side claim 1-5
Method step.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-5 any method and step when the computer program is executed by processor.
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 true CN109918257A (en) | 2019-06-21 |
CN109918257B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112289368A (en) * | 2020-10-27 | 2021-01-29 | 英业达科技有限公司 | Universal hard disk simulation counterweight jig |
Citations (4)
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 |
-
2017
- 2017-12-12 CN CN201711321098.0A patent/CN109918257B/en active Active
Patent Citations (4)
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 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112289368A (en) * | 2020-10-27 | 2021-01-29 | 英业达科技有限公司 | Universal hard disk simulation counterweight jig |
CN112289368B (en) * | 2020-10-27 | 2023-07-25 | 英业达科技有限公司 | Universal hard disk simulation counterweight jig |
Also Published As
Publication number | Publication date |
---|---|
CN109918257B (en) | 2022-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6391700B2 (en) | Method for processing impedance abnormality of power adapter, terminal and charging circuit | |
CN102132523B (en) | Device power management using network connections | |
WO2018001168A1 (en) | Method and apparatus for managing main board card and backup board card | |
CN105338550B (en) | A kind of management method and device of the connection for wireless network | |
US9684351B2 (en) | Discovery of connectivity between PDU outlet and device | |
CN101888284B (en) | Method and device used for one-way transmission of data | |
CN107896172A (en) | Monitor fault handling method and device, storage medium and electronic equipment | |
CN111865710A (en) | Remote equipment debugging system based on public network environment | |
CN108564776A (en) | Equipment debugging system, apparatus debugging method and computer storage media | |
CN107835222A (en) | Combustion gas data transmission method and Internet of things system based on compound Internet of Things | |
CN109918257A (en) | A kind of hard disk abnormality eliminating method and device | |
CN107809457A (en) | Water data transmission method and Internet of things system based on compound Internet of Things | |
CN105210043A (en) | Information processing device | |
CN109062733A (en) | A kind of method, system, equipment and storage medium restoring BMC initial setting up | |
CN104683130A (en) | Method for configuring stacking port and equipment | |
CN104902476A (en) | Control method for Bluetooth security management | |
CN208315027U (en) | A kind of maintenance of nuclear | |
CN109358983A (en) | Server data processing method, device and storage medium | |
CN102594597B (en) | Network equipment Internet-surfing configuration method, device and system | |
US9836037B2 (en) | Managing power emission to electrical appliances | |
CN101576862A (en) | Serial port data interactive mode based on PC and device | |
CN103441901A (en) | Monitor and server monitoring method | |
CN104182366A (en) | Method for processing information and electronic devices | |
CN110418431A (en) | A kind of control method and device of communication connection | |
CN108901009A (en) | data interaction method, device and system |
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 |