CN112214094A - Method and equipment for coping with power supply jitter of hard disk - Google Patents

Method and equipment for coping with power supply jitter of hard disk Download PDF

Info

Publication number
CN112214094A
CN112214094A CN202010985499.1A CN202010985499A CN112214094A CN 112214094 A CN112214094 A CN 112214094A CN 202010985499 A CN202010985499 A CN 202010985499A CN 112214094 A CN112214094 A CN 112214094A
Authority
CN
China
Prior art keywords
hard disk
duration
power supply
timer
time
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
Application number
CN202010985499.1A
Other languages
Chinese (zh)
Other versions
CN112214094B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010985499.1A priority Critical patent/CN112214094B/en
Publication of CN112214094A publication Critical patent/CN112214094A/en
Application granted granted Critical
Publication of CN112214094B publication Critical patent/CN112214094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/30Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips

Abstract

The invention provides a method and equipment for dealing with the power supply jitter of a hard disk, wherein the method comprises the following steps: responding to the detected power supply of the hard disk to shake, and sending an abnormal power down signal to the hard disk; responding to the hard disk receiving an abnormal power failure signal, establishing a timer and setting the timer to count time by first threshold time; detecting the duration of the power supply dithering, and judging whether the timing of the timer in the duration is finished; in response to the timer counting is completed within the duration, the power supply of the hard disk is disconnected; the hard disk is powered on in response to the power being off for a second threshold time. By using the scheme of the invention, the situation that the SSD cannot be identified when the power supply fluctuates in the system can be avoided, and the reliability and maintainability of the operation of the system hard disk are ensured.

Description

Method and equipment for coping with power supply jitter of hard disk
Technical Field
The field relates to the field of computers, and more particularly to a method and apparatus for coping with power supply jitter of a hard disk.
Background
With the development of technologies such as internet, cloud computing, internet of things and the like, solid state disks are widely used as a new generation of storage. As the bottom end of a data center, an SSD (solid state disk) carries a key task of storing data, and as used in a server or a storage system, the SSD, as a hard disk device, is easily affected by power supply fluctuation of the system, thereby causing various abnormalities, such as not recognizing a disk.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method and an apparatus for handling power supply jitter of a hard disk, which avoid the situation that an SSD cannot recognize when power supply fluctuation occurs in a system, and ensure reliability and maintainability of system hard disk operation.
In view of the above object, an aspect of the embodiments of the present invention provides a method for coping with power supply jitter of a hard disk, including the steps of:
responding to the detected power supply of the hard disk to shake, and sending an abnormal power down signal to the hard disk;
responding to the hard disk receiving an abnormal power failure signal, establishing a timer and setting the timer to count time by first threshold time;
detecting the duration of the power supply dithering, and judging whether the timing of the timer in the duration is finished;
in response to the timer counting is completed within the duration, the power supply of the hard disk is disconnected;
the hard disk is powered on in response to the power being off for a second threshold time.
According to one embodiment of the invention, in response to the hard disk receiving the abnormal power down signal, establishing a timer and setting the timer to count at a first threshold time comprises:
in response to the hard disk receiving an abnormal power down signal, the hard disk is powered down under the power supply of the capacitor;
the timer is set to the total time the hard disk is powered down.
According to one embodiment of the present invention, detecting a duration of time during which the power supply is jittered and determining whether the counting by the timer is completed within the duration comprises:
detecting the duration of the power supply jittering, and comparing the duration with a first threshold time;
in response to the duration being greater than the first threshold time, it is determined that the timing of the timer has been completed within the duration.
According to one embodiment of the present invention, the powering down the hard disk in response to the timer counting being completed for the duration comprises:
in response to the timer counting completion within the duration, sending information that the power needs to be cut off to an auxiliary processing unit of the hard disk;
the auxiliary processing unit receives the information and disconnects the power supply of the hard disk for a second threshold time.
According to one embodiment of the invention, the hard disk comprises an SSD solid state disk supporting the nvme protocol using an u.2 interface.
In another aspect of the embodiments of the present invention, there is also provided an apparatus for coping with power supply jitter of a hard disk, the apparatus including:
the sending module is configured to respond to the detection that the power supply of the hard disk shakes and send an abnormal power failure signal to the hard disk;
the setting module is configured to respond to the fact that the hard disk receives the abnormal power failure signal, establish a timer and set the timer to count time according to first threshold time;
the judging module is configured to detect the duration of the power supply dithering and judge whether the timing of the timer is finished within the duration;
a disconnection module configured to disconnect the power supply of the hard disk in response to completion of the timer counting within the duration;
a power-on module configured to power on the hard disk in response to the power being off for a second threshold time.
According to an embodiment of the invention, the setting module is further configured to:
in response to the hard disk receiving an abnormal power down signal, the hard disk is powered down under the power supply of the capacitor;
the timer is set to the total time the hard disk is powered down.
According to an embodiment of the invention, the determining module is further configured to:
detecting the duration of the power supply jittering, and comparing the duration with a first threshold time;
in response to the duration being greater than the first threshold time, it is determined that the timing of the timer has been completed within the duration.
According to one embodiment of the invention, the disconnection module is further configured to:
in response to the timer counting completion within the duration, sending information that the power needs to be cut off to an auxiliary processing unit of the hard disk;
the auxiliary processing unit receives the information and disconnects the power supply of the hard disk for a second threshold time.
According to one embodiment of the invention, the hard disk comprises an SSD solid state disk supporting the nvme protocol using an u.2 interface.
The invention has the following beneficial technical effects: according to the method for dealing with the power supply jitter of the hard disk, provided by the embodiment of the invention, the abnormal power failure signal is sent to the hard disk by responding to the detected power supply jitter of the hard disk; responding to the hard disk receiving an abnormal power failure signal, establishing a timer and setting the timer to count time by first threshold time; detecting the duration of the power supply dithering, and judging whether the timing of the timer in the duration is finished; in response to the timer counting is completed within the duration, the power supply of the hard disk is disconnected; the technical scheme of responding to the power-off for the second threshold time and switching on the power supply of the hard disk can avoid the situation that the SSD cannot identify when the power supply in the system fluctuates, and ensures the reliability and maintainability of the operation of the hard disk of the system.
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 description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of a method of handling power supply jitter to a hard disk according to one embodiment of the present invention;
fig. 2 is a schematic diagram of an apparatus for handling power supply jitter of a hard disk according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
In view of the above objects, a first aspect of embodiments of the present invention proposes an embodiment of a method for coping with power supply jitter of a hard disk. Fig. 1 shows a schematic flow diagram of the method.
As shown in fig. 1, the method may include the steps of:
s1, responding to the detected power supply of the hard disk to shake, sending an abnormal power failure signal to the hard disk, wherein the power supply of the hard disk is unstable and can shake, and when the system detects the power supply shake, sending the abnormal power failure signal to the hard disk, and receiving the abnormal power failure signal, the system can power off under the condition of capacitor power supply to avoid the data loss of the hard disk;
s2, responding to the hard disk receiving the abnormal power down signal, establishing a timer and setting the timer to count time by a first threshold time, after the hard disk receiving the abnormal power down signal, establishing a timer, and setting the timer timing time as the total time (the first threshold time) of the hard disk power down, for example, to 50 milliseconds;
s3, detecting the duration of the power supply jitter, judging whether the timing of the timer is finished in the duration, continuously detecting the power supply jitter, and comparing the duration of the jitter with the timing time of the timer to judge whether the timer reaches the preset time;
s4, responding to the completion of the timing of the timer in the duration, disconnecting the power supply of the hard disk, if the time of the power supply jitter is longer, forcibly disconnecting the power supply of the hard disk to simulate the power-off process when the hard disk is pulled out;
s5 powers on the hard disk in response to the power being off for a second threshold time, and powers back on the hard disk after the power jitter ends and the time of the power being off exceeds the discharge time of the capacitor powering the hard disk to simulate a process of hard disk reinsertion for power re-powering.
By the technical scheme of the invention, the situation that the SSD cannot be identified when the power supply fluctuates in the system can be avoided, and the reliability and maintainability of the operation of the system hard disk are ensured.
In a preferred embodiment of the present invention, in response to the hard disk receiving the abnormal power down signal, establishing a timer and setting the timer to count at a first threshold time comprises:
in response to the hard disk receiving an abnormal power down signal, the hard disk is powered down under the power supply of the capacitor;
the timer is set to the total time the hard disk is powered down. The hard disk is normally powered down for typically 30 milliseconds, and in some embodiments of the invention, the timer is set to a time between 30 milliseconds and 50 milliseconds.
In a preferred embodiment of the present invention, detecting a duration of the power supply jittering and determining whether the counting by the timer within the duration is completed comprises:
detecting the duration of the power supply jittering, and comparing the duration with a first threshold time;
in response to the duration being greater than the first threshold time, it is determined that the timing of the timer has been completed within the duration.
In a preferred embodiment of the present invention, the powering down the hard disk in response to the timer counting for the duration being completed comprises:
in response to the timer counting completion within the duration, sending information that the power needs to be cut off to an auxiliary processing unit of the hard disk;
the auxiliary processing unit receives the information and disconnects the power supply of the hard disk for a second threshold time. If the duration of the power supply jitter is short, namely the duration is less than the timing time of the timer, the hard disk can be continuously electrified under the condition that the capacitor supplies power, if the duration of the jitter is greater than the timing time of the timer, the hard disk needs to be powered off forcibly, a message can be sent to the MCU auxiliary processing unit of the hard disk, and after the MCU auxiliary processing unit receives the message, the 12V main power supply of the hard disk board card is disconnected, so that the capacitor is fully discharged to simulate the power-off process of the hard disk.
In a preferred embodiment of the present invention, the hard disk comprises an SSD solid state disk supporting the nvme protocol using an u.2 interface. The technical scheme of the invention designs a processing mode under power supply jitter for the nvme protocol SSD solid state disk using an u.2 interface, utilizes the characteristic that the u.2nvme hard disk supports hot plug, and simulates the independent hot plug behavior of the SSD by matching a firmware internal timer with a solid state disk MCU control module when power supply jitter occurs.
By the technical scheme of the invention, the situation that the SSD cannot be identified when the power supply fluctuates in the system can be avoided, and the reliability and maintainability of the operation of the system hard disk are ensured.
It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by instructing relevant hardware through a computer program, and the above programs may be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.
In view of the above object, a second aspect of the embodiments of the present invention proposes an apparatus for coping with power supply jitter of a hard disk, as shown in fig. 2, the apparatus 200 comprising:
the sending module is configured to respond to the detection that the power supply of the hard disk shakes and send an abnormal power failure signal to the hard disk;
the setting module is configured to respond to the fact that the hard disk receives the abnormal power failure signal, establish a timer and set the timer to count time according to first threshold time;
the judging module is configured to detect the duration of the power supply dithering and judge whether the timing of the timer is finished within the duration;
a disconnection module configured to disconnect the power supply of the hard disk in response to completion of the timer counting within the duration;
a power-on module configured to power on the hard disk in response to the power being off for a second threshold time.
In a preferred embodiment of the present invention, the setting module is further configured to:
in response to the hard disk receiving an abnormal power down signal, the hard disk is powered down under the power supply of the capacitor;
the timer is set to the total time the hard disk is powered down.
In a preferred embodiment of the present invention, the determining module is further configured to:
detecting the duration of the power supply jittering, and comparing the duration with a first threshold time;
in response to the duration being greater than the first threshold time, it is determined that the timing of the timer has been completed within the duration.
In a preferred embodiment of the invention, the disconnection module is further configured to:
in response to the timer counting completion within the duration, sending information that the power needs to be cut off to an auxiliary processing unit of the hard disk;
the auxiliary processing unit receives the information and disconnects the power supply of the hard disk for a second threshold time.
In a preferred embodiment of the present invention, the hard disk comprises an SSD solid state disk supporting the nvme protocol using an u.2 interface.
The embodiments described above, particularly any "preferred" embodiments, are possible examples of implementations and are presented merely to clearly understand the principles of the invention. Many variations and modifications may be made to the above-described embodiments without departing from the spirit and principles of the technology described herein. All such modifications are intended to be included within the scope of this disclosure and protected by the following claims.

Claims (10)

1. A method for dealing with the power supply jitter of a hard disk is characterized by comprising the following steps:
responding to the detected power supply jitter of the hard disk, and sending an abnormal power down signal to the hard disk;
responding to the hard disk receiving the abnormal power failure signal, establishing a timer and setting the timer to count time by first threshold time;
detecting the duration of the power supply jittering, and judging whether the timing of the timer is finished within the duration;
in response to the timer completing within the duration of time, disconnecting the power supply to the hard disk;
turning on the power to the hard disk in response to the power being off for a second threshold time.
2. The method of claim 1, wherein in response to the hard disk receiving the abnormal power down signal, establishing and setting a timer to count at a first threshold time comprises:
in response to the hard disk receiving the abnormal power down signal, the hard disk is powered down under the power supply of a capacitor;
and setting the timer to be the total time of powering off the hard disk.
3. The method of claim 1, wherein detecting a duration of time during which the power supply is jittered and determining whether the timing of the timer is complete within the duration of time comprises:
detecting a duration of time that the power supply is jittered, comparing the duration of time to the first threshold time;
in response to the duration being greater than the first threshold time, determining that the counting of the timer has been completed within the duration.
4. The method of claim 1, wherein disconnecting the power supply to the hard disk in response to completion of the timer count for the duration of time comprises:
in response to the timer completing within the duration, sending information that the power is required to be cut off to an auxiliary processing unit of the hard disk;
and the auxiliary processing unit receives the information and disconnects the power supply of the hard disk for the second threshold time.
5. The method of claim 1, wherein the hard disk comprises an SSD solid state disk supporting nvme protocol using an u.2 interface.
6. An apparatus for coping with power supply jitter of a hard disk, the apparatus comprising:
the sending module is configured to send an abnormal power failure signal to the hard disk in response to the detection of the jitter of the power supply of the hard disk;
the setting module is configured to respond to the hard disk receiving the abnormal power failure signal, establish a timer and set the timer to count time by a first threshold time;
the judging module is configured to detect the duration of the power supply jittering and judge whether the timing of the timer is finished within the duration;
a disconnect module configured to disconnect the power supply to the hard disk in response to completion of the timer count within the duration of time;
a power-on module configured to turn on the power to the hard disk in response to the power being turned off for a second threshold time.
7. The apparatus of claim 6, wherein the setup module is further configured to:
in response to the hard disk receiving the abnormal power down signal, the hard disk is powered down under the power supply of a capacitor;
and setting the timer to be the total time of powering off the hard disk.
8. The device of claim 7, wherein the determination module is further configured to:
detecting a duration of time that the power supply is jittered, comparing the duration of time to the first threshold time;
in response to the duration being greater than the first threshold time, determining that the counting of the timer has been completed within the duration.
9. The device of claim 8, wherein the disconnection module is further configured to:
in response to the timer completing within the duration, sending information that the power is required to be cut off to an auxiliary processing unit of the hard disk;
and the auxiliary processing unit receives the information and disconnects the power supply of the hard disk for the second threshold time.
10. The device of claim 9, wherein the hard disk comprises an SSD solid state disk supporting nvme protocol using an u.2 interface.
CN202010985499.1A 2020-09-18 2020-09-18 Method and equipment for coping with power supply jitter of hard disk Active CN112214094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010985499.1A CN112214094B (en) 2020-09-18 2020-09-18 Method and equipment for coping with power supply jitter of hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010985499.1A CN112214094B (en) 2020-09-18 2020-09-18 Method and equipment for coping with power supply jitter of hard disk

Publications (2)

Publication Number Publication Date
CN112214094A true CN112214094A (en) 2021-01-12
CN112214094B CN112214094B (en) 2022-04-29

Family

ID=74049666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010985499.1A Active CN112214094B (en) 2020-09-18 2020-09-18 Method and equipment for coping with power supply jitter of hard disk

Country Status (1)

Country Link
CN (1) CN112214094B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114141280A (en) * 2021-10-14 2022-03-04 苏州浪潮智能科技有限公司 Method and circuit for preventing solid state disk input power supply from shaking and mistakenly touching

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110012546A1 (en) * 2009-07-20 2011-01-20 Hong Fu Jin Precision Industry (Shenzhen) Co.,Ltd. Power control circuit for hard disk drive
US20150091475A1 (en) * 2013-09-27 2015-04-02 Seagate Technology Llc Efficient energy recovery in disk drive during power loss
US20150248920A1 (en) * 2014-02-28 2015-09-03 Kyocera Document Solutions Inc. Storage apparatus, image forming apparatus, abnormality detecting method by instantaneous power failure of hard disk, and abnormality recovery method thereof
CN106815117A (en) * 2017-01-22 2017-06-09 郑州云海信息技术有限公司 A kind of method that server realizes vibration monitoring
CN110874293A (en) * 2018-08-29 2020-03-10 北京忆恒创源科技有限公司 Hot plug testing device
CN111143106A (en) * 2019-12-31 2020-05-12 苏州浪潮智能科技有限公司 Repair method, device, equipment and medium for dual-port SSD

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110012546A1 (en) * 2009-07-20 2011-01-20 Hong Fu Jin Precision Industry (Shenzhen) Co.,Ltd. Power control circuit for hard disk drive
US20150091475A1 (en) * 2013-09-27 2015-04-02 Seagate Technology Llc Efficient energy recovery in disk drive during power loss
US20150248920A1 (en) * 2014-02-28 2015-09-03 Kyocera Document Solutions Inc. Storage apparatus, image forming apparatus, abnormality detecting method by instantaneous power failure of hard disk, and abnormality recovery method thereof
CN106815117A (en) * 2017-01-22 2017-06-09 郑州云海信息技术有限公司 A kind of method that server realizes vibration monitoring
CN110874293A (en) * 2018-08-29 2020-03-10 北京忆恒创源科技有限公司 Hot plug testing device
CN111143106A (en) * 2019-12-31 2020-05-12 苏州浪潮智能科技有限公司 Repair method, device, equipment and medium for dual-port SSD

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
俞惠: "《SSD固态硬盘的电源管理集成方案》", 《集成电路应用》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114141280A (en) * 2021-10-14 2022-03-04 苏州浪潮智能科技有限公司 Method and circuit for preventing solid state disk input power supply from shaking and mistakenly touching
CN114141280B (en) * 2021-10-14 2024-01-12 苏州浪潮智能科技有限公司 Method and circuit for preventing solid state disk input power from shaking and touching by mistake

Also Published As

Publication number Publication date
CN112214094B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
US8578182B2 (en) Power lock-up setting method performed by baseboard management controller and electronic apparatus using the same
CN105739668A (en) Power management method and power management system of notebook computers
CN112214094B (en) Method and equipment for coping with power supply jitter of hard disk
US20190363560A1 (en) Method for Determining Charger, Related Device, and System
CN115658113A (en) Server self-starting method and device, readable storage medium and electronic equipment
CN103747242B (en) A kind of method of automatic detection picture pick-up device and checkout equipment
JP4450692B2 (en) USB connection system, USB device, and host
JP2007334731A (en) Usb equipment, host device and usb connection system
CN110501554B (en) Detection method and device for installation of memory chip
CN109120999B (en) Method, system, device and storage medium for handling exception of CEC system
CN103870564A (en) Data updating method and electronic equipment
CN109992437B (en) Processing method, device and equipment for hard disk flash break and storage medium
WO2019227769A1 (en) Method and apparatus for controlling storage device, and electronic device
CN105100344A (en) Hot plug processing method for user recognition module card, and mobile terminal
CN114624569A (en) Sensor circuit abnormality detection method, circuit, device, intelligent device, and medium
CN113781939A (en) Method and system for recovering abnormal display of display screen and storage device
CN110851328B (en) Method for detecting abnormal power failure of password card in PKCS #11 application
CN111539044A (en) Server power firmware write protection control method, device, equipment and storage medium
CN113032182B (en) Method and equipment for recovering computer system from abnormity
KR101351703B1 (en) Terminal device and power control device
US7243220B2 (en) Networking apparatus and method capable of wake-on-LAN after improper shutdown
CN105208192A (en) Storage card state control method of terminal and device
CN106300559B (en) Mobile terminal-based charger protection recovery control method and system
CN110737318A (en) intelligent power supply management system
CN111328155B (en) Data transmission method, device, storage medium and electronic equipment

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