CN113032201B - Hard disk bad track detection method - Google Patents
Hard disk bad track detection method Download PDFInfo
- Publication number
- CN113032201B CN113032201B CN202110561927.2A CN202110561927A CN113032201B CN 113032201 B CN113032201 B CN 113032201B CN 202110561927 A CN202110561927 A CN 202110561927A CN 113032201 B CN113032201 B CN 113032201B
- Authority
- CN
- China
- Prior art keywords
- swing arm
- hard disk
- area
- time
- detection
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/2221—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention discloses a hard disk bad track detection method, which comprises the following steps: equally dividing the sector of each hard disk partition into a plurality of detection areas; reading the data of the hard disk partition, and transmitting the data of the hard disk partition by a magnetic arm arranged in the hard disk; recording a plurality of detection areas required by each swing arm as swing arm areas; recording the time spent by each swing arm and the corresponding needed swing arm area of each swing arm; after a certain period, dividing the time of the last swing arm of each swing arm area by the time of the previous swing arm to obtain a time comparison value; if the time contrast value exceeds a certain threshold value, the swing arm area is judged to be an abnormal swing arm area; and reading data from the detection areas of the abnormal swing arm areas, and if any one detection area cannot read the data, judging that the detection area is a bad track detection area. The method and the device can quickly and conveniently detect the specific bad track hard disk sector, thereby better performing early warning and avoiding data loss.
Description
Technical Field
The invention relates to the technical field of computer hard disks, in particular to a method for detecting a bad track of a hard disk.
Background
Many existing computer operating systems or computer application programs are installed on a mechanical hard disk, and once the mechanical hard disk is damaged, an operating system fails to start and a blue screen is caused, or an application program fails to start and runs abnormally, and more seriously, stored data is lost, so that enterprises or users bring serious economic loss or policy risk.
At present, the space of the hard disk is developed to an SSD (solid state disk) and an NVMEN (network video disk) solid state disk, so that the performance of the hard disk is continuously improved, but the cost performance of the traditional mechanical hard disk is the highest in comparison analysis (cost performance) of capacity and price. Although the performance of the mechanical hard disk is low, the mechanical hard disk is still a place for storing mass data (in the current internet environment).
Therefore, a large amount of data is stored in the mechanical hard disk, and the data is more and more important, so it is very necessary to find the abnormal/bad track of the hard disk in time.
Disclosure of Invention
In order to solve one of the above problems, the present invention provides a method for detecting a bad track of a hard disk, which can quickly and conveniently detect a specific bad track hard disk sector, thereby better performing early warning and avoiding data loss.
In order to solve the technical problems, the invention provides the following technical scheme: a hard disk bad track detection method comprises the following steps:
step S1, equally dividing a plurality of block detection areas for the sector of each hard disk partition, and labeling a unique identifier for each block detection area; generally, a user partitions the hard disk of each computer;
step S2, reading the data of the hard disk partition, and transmitting the data of the hard disk partition by a magnetic arm arranged in the hard disk; the magnetic arm is used for conveying data once every time the magnetic arm swings, the data required every time the magnetic arm swings is stored in a plurality of detection areas, the detection areas required every time the magnetic arm swings are recorded as swing arm areas, each swing arm area is named, and each swing arm area is inconsistent; recording the time spent by each swing arm and the corresponding needed swing arm area of each swing arm;
step S3, after a certain period, comparing the swing arm time spent before and after each swing arm area in time sequence, specifically: dividing the last swing arm time of each swing arm area by the previous swing arm time to obtain a time comparison value; judging whether the time contrast value exceeds a certain threshold value, and if not, not processing; if the time contrast value exceeds a certain threshold value, the swing arm area is judged to be an abnormal swing arm area;
step S4, data is read from the detection areas in the abnormal swing arm area, and if any one of the detection areas cannot read the data, it is determined that the detection area is a bad track detection area.
Further, the method for detecting the bad track of the hard disk is characterized by further comprising the step of S5, outputting a unique identifier corresponding to the detection area of the bad track, and giving an alarm to the detection area of the bad track.
After the technical scheme is adopted, the invention at least has the following beneficial effects: the invention analyzes the change condition of the swing arm time of the hard disk, records and compares the change condition, analyzes and predicts the possibility of the hard disk generating problems in time and judges the possibility of the hard disk generating abnormity in advance.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for detecting a bad track of a hard disk.
Detailed Description
It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict, and the present application is further described in detail with reference to the drawings and specific embodiments.
Example 1
The implementation detects the bad track of the hard disk by the magnetic arm principle of the hard disk, is convenient and quick, and does not need a specific tool to detect the bad track of the hard disk. The magnetic arm principle of the hard disk is a fixed technology built in the hard disk, namely when hard disk data are read, the magnetic arm swings once to convey data (the data are output to the outside) once, the magnetic arm swings circularly (the magnetic arm is equivalent to a vehicle for transporting goods, the hard disk is equivalent to a warehouse, goods in the warehouse are equivalent to hard disk data, a truck fixedly transports a certain amount of goods, the goods need to be circularly transported to the outside), specific bad track sectors can be obtained by detecting and recording time and carrying out data comparison through built-in functions, convenience and rapidness are achieved, the possibility of magnetic disk problem occurrence can be analyzed and predicted in time, and the possibility of magnetic disk abnormality occurrence is judged in advance.
As shown in fig. 1, the present embodiment provides a method for detecting a bad track of a hard disk, including the following steps:
step S1, equally dividing a plurality of block detection areas for the sector of each hard disk partition, and labeling a unique identifier for each block detection area; (in the swing arm area below, the size of the detection area set here is smaller than or equal to that of the swing arm area, that is, each swing arm area will contain one or more detection areas); for example, the hard disk of the computer is divided into 4 partitions, the sector of each partition is divided into 1000 detection areas, each detection area can be labeled with a unique identifier according to numerical sequence (actually, the unique identifier can be labeled in various ways), according to the standard built in each hard disk, the swing arm area required by each swing arm of the magnetic arm may include 1 detection area or more than one detection area, and after all, the specifications of each hard disk (mechanical hard disk) are different;
step S2, reading the data of the hard disk partition, and transmitting the data of the hard disk partition by a magnetic arm arranged in the hard disk; the magnetic arm is used for conveying data once every time the magnetic arm swings, the data required every time the magnetic arm swings is stored in a plurality of detection areas, the detection areas required every time the magnetic arm swings are recorded as swing arm areas, each swing arm area is named, and each swing arm area is inconsistent; recording the time spent by each swing arm and the corresponding needed swing arm area of each swing arm;
step S3, after a certain period, comparing the swing arm time spent before and after each swing arm area in time sequence, specifically: dividing the last swing arm time of each swing arm area by the previous swing arm time to obtain a time comparison value; judging whether the time contrast value exceeds a certain threshold value, and if not, not processing; if the time contrast value exceeds a certain threshold value, the swing arm area is judged to be an abnormal swing arm area; wherein, the specific time of the certain period may be one day, one month, one year, or the like; preferentially, a certain period of the embodiment is set to be one year, because the hard disk is more or less aged after being used for one year, and therefore, the swing arm time spent before and after each swing arm area is different (the same swing arm area, the swing arm time before one year and the swing arm time after one year are different); obviously, in a certain period, different hard disks (different types and processes of hard disks) need to be set properly;
for example, if the time contrast value exceeds a certain threshold, the certain threshold is set to 2, that is, the time of the swing arm of a certain swing arm area at the next time is 2 times that of the previous time, and the obvious time difference between the previous time and the next time is large, the swing arm area needs to be determined as an abnormal swing arm area; the certain threshold value can be determined according to the actual service life of the disk, and can be 2 or 3, and because the hard disk has certain aging after a certain service life, the swing arm time is correspondingly slowed down;
step S4, reading data from the detection areas of the abnormal swing arm area, and if any detection area can not read the data, judging that the detection area is a bad track detection area;
and step S5, outputting the unique identifier corresponding to the detection area of the bad track, and alarming the detection area of the bad track.
The invention analyzes the change condition of the swing arm time of the hard disk, records and compares the change condition, analyzes and predicts the possibility of the hard disk generating problems in time and judges the possibility of the hard disk generating abnormity in advance.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various equivalent changes, modifications, substitutions and alterations can be made herein without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110561927.2A CN113032201B (en) | 2021-05-24 | 2021-05-24 | Hard disk bad track detection method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110561927.2A CN113032201B (en) | 2021-05-24 | 2021-05-24 | Hard disk bad track detection method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113032201A CN113032201A (en) | 2021-06-25 |
| CN113032201B true CN113032201B (en) | 2021-09-21 |
Family
ID=76455521
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110561927.2A Expired - Fee Related CN113032201B (en) | 2021-05-24 | 2021-05-24 | Hard disk bad track detection method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113032201B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117854580B (en) * | 2024-03-06 | 2024-05-31 | 深圳玖合精工科技有限公司 | Method, device, equipment and storage medium for rapidly detecting hard disk bad track |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5923891A (en) * | 1997-03-14 | 1999-07-13 | Diva Systems Corporation | System for minimizing disk access using the computer maximum seek time between two furthest apart addresses to control the wait period of the processing element |
| JP2005353265A (en) * | 2004-06-10 | 2005-12-22 | Samsung Electronics Co Ltd | Actuator latch device of disk drive, latch assembly, hard disk drive, swing arm locking and unlocking method |
| CN1716428A (en) * | 2004-07-01 | 2006-01-04 | 华为技术有限公司 | Hard disk detection device and method |
| CN103019885A (en) * | 2012-11-26 | 2013-04-03 | 大唐移动通信设备有限公司 | Method and system for monitoring embedded Linux-based hard disc bad track |
| EP3745270A1 (en) * | 2018-04-10 | 2020-12-02 | Wangsu Science & Technology Co., Ltd. | Method and device for processing bad tracks of disk and computer storage medium |
-
2021
- 2021-05-24 CN CN202110561927.2A patent/CN113032201B/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5923891A (en) * | 1997-03-14 | 1999-07-13 | Diva Systems Corporation | System for minimizing disk access using the computer maximum seek time between two furthest apart addresses to control the wait period of the processing element |
| JP2005353265A (en) * | 2004-06-10 | 2005-12-22 | Samsung Electronics Co Ltd | Actuator latch device of disk drive, latch assembly, hard disk drive, swing arm locking and unlocking method |
| CN1716428A (en) * | 2004-07-01 | 2006-01-04 | 华为技术有限公司 | Hard disk detection device and method |
| CN103019885A (en) * | 2012-11-26 | 2013-04-03 | 大唐移动通信设备有限公司 | Method and system for monitoring embedded Linux-based hard disc bad track |
| EP3745270A1 (en) * | 2018-04-10 | 2020-12-02 | Wangsu Science & Technology Co., Ltd. | Method and device for processing bad tracks of disk and computer storage medium |
Non-Patent Citations (1)
| Title |
|---|
| 计算机数据的抢救与恢复策略;董自上;《职业》;20190925;第122-123页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113032201A (en) | 2021-06-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Botezatu et al. | Predicting disk replacement towards reliable data centers | |
| CN100481019C (en) | Apparatus, system, and method for predicting storage device failure | |
| US7627786B2 (en) | Tracking error events relating to data storage drives and/or media of automated data storage library subsystems | |
| EP1924994B1 (en) | Method and apparatus for detecting the onset of hard disk failures | |
| CN108536548B (en) | Disk bad sector processing method, device and computer storage medium | |
| US8751862B2 (en) | System and method to support background initialization for controller that supports fast rebuild using in block data | |
| US20100157766A1 (en) | Predicting cartridge failure from cartridge memory data | |
| Lu et al. | Perseus: A {Fail-Slow} detection framework for cloud storage systems | |
| US5751947A (en) | Magnetic disk apparatus having inspection function of recording medium and method of inspecting recording medium in magnetic disk apparatus | |
| US7206151B2 (en) | System, method and computer program product for tape failure detection | |
| US11449376B2 (en) | Method of determining potential anomaly of memory device | |
| CN104078071A (en) | Data archive system and quality inspection method | |
| CN105068901A (en) | Method for detecting magnetic disc | |
| CN107179968A (en) | Information-storing device, fault prediction device and failure prediction method | |
| CN113032201B (en) | Hard disk bad track detection method | |
| US20080010509A1 (en) | Sector-oriented hardware defect compression based on format information | |
| CN111597088A (en) | Data warehouse data monitoring method, warehouse system and electronic equipment | |
| Tsai et al. | A study of soft error consequences in hard disk drives | |
| KR20060113551A (en) | Method and apparatus for time correlating defects found on hard disks | |
| US20070005542A1 (en) | Apparatus, system, and method for regulating error reporting | |
| JP2004118397A (en) | Failure occurrence prediction system for magnetic disk device | |
| JP2880701B2 (en) | Disk subsystem | |
| JP2010066801A (en) | Log recording system, module monitoring means, trace log managing means, recording method, program, and storage medium | |
| KR20110039416A (en) | Method, apparatus and system for storing data for interrupted write recovery | |
| US6229743B1 (en) | Method of a reassign block processing time determination test for storage device |
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 | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210921 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |