WO2015176388A1 - Hard disk health status processing method and apparatus - Google Patents

Hard disk health status processing method and apparatus Download PDF

Info

Publication number
WO2015176388A1
WO2015176388A1 PCT/CN2014/083458 CN2014083458W WO2015176388A1 WO 2015176388 A1 WO2015176388 A1 WO 2015176388A1 CN 2014083458 W CN2014083458 W CN 2014083458W WO 2015176388 A1 WO2015176388 A1 WO 2015176388A1
Authority
WO
WIPO (PCT)
Prior art keywords
hard disk
tested
detection
parameter
health status
Prior art date
Application number
PCT/CN2014/083458
Other languages
French (fr)
Chinese (zh)
Inventor
吴军
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015176388A1 publication Critical patent/WO2015176388A1/en

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/18Error detection or correction; Testing, e.g. of drop-outs

Definitions

  • the present invention relates to the field of communications, and in particular to a method and an apparatus for processing a health condition of a hard disk.
  • Hard disks are a common storage medium in the field of communication and IT, and are widely used as storage media.
  • High-performance disk arrays are indispensable storage components in their production environments. Due to its specific physical structure, after the hard disk is shipped from the factory and used, the use of the hard disk will cause the loss of the hard disk, and the performance of the hard disk will be greatly affected. In order to use the hard disk safely and effectively, it is necessary to detect the hard disk from time to time.
  • a method for detecting a hardware failure of a hard disk is proposed.
  • the method reads a parameter into a hard disk register, reads a return value, and compares it with a standard value of the index parameter to determine whether the standard is met.
  • the parameters of the hard disk tested by this method are relatively simple, and it is not possible to test different types of hard disks or hard disks of different manufacturers.
  • a relatively similar device for detecting the quality of the hard disk is also proposed, and the device includes a SMART attribute detecting module and a data processor connected by a computer hard disk or an external computer hard disk to realize the hard disk not detected by the computer. Good or bad.
  • the method can roughly detect the quality of the hard disk, the method needs to rely on the external SMART attribute detection module and the data processor, and can not conveniently check the hard disk.
  • the detection method for detecting the hard disk has a problem that the detection of the hard disk parameter is single, the detection of the hard disk is not strong, and the detection device is not simple, and the detection result is not refined.
  • the present invention provides a method and a device for processing a health condition of a hard disk, so as to at least solve the detection method for detecting a hard disk in the related art, the detection of the hard disk parameter is single, the detection of the hard disk is not targeted, and the detecting device is not simple. The problem is not refined.
  • a method for processing a health condition of a hard disk including: obtaining identification information for identifying the hard disk to be tested from a hard disk to be tested; and waiting for the identification information according to a driver interface
  • the hard disk parameters of the hard disk are tested for detection; and the health status of the hard disk to be tested is determined according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter.
  • determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter comprising: calculating a deviation value between the detection value and the standard value; The deviation value determines the health status of the hard disk to be tested.
  • the method further includes: displaying a health status of the hard disk to be tested.
  • displaying the health status of the hard disk to be tested comprises: displaying at least one of the following: the parameter name, the parameter test value, the parameter standard value, and the parameter deviation value in a form of a list.
  • the method further includes: storing identifier information of the hard disk to be tested, a hard disk parameter of the hard disk to be tested, and the hard disk The standard value of the parameter.
  • the identifier information includes at least one of the following: an interface type of the hard disk, and a manufacturer of the hard disk.
  • a device for processing a hard disk health condition including: an obtaining module, configured to obtain identification information for identifying the hard disk to be tested from a hard disk to be tested; and a detecting module configured to be driven according to the driving
  • the program interface is configured to detect the hard disk parameter of the hard disk to be tested corresponding to the identifier information
  • the determining module is configured to determine the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter.
  • the determining module includes: a calculating unit configured to calculate a deviation value of the detected value and the standard value; and a determining unit configured to determine a health condition of the hard disk to be tested according to the deviation value.
  • the device further comprises: a display module, configured to display the health status of the hard disk to be tested.
  • the device further includes: a storage module, configured to store identification information of the hard disk to be tested, a hard disk parameter of the hard disk to be tested, and a standard value of the hard disk parameter.
  • the identification information of the hard disk to be tested is obtained from the hard disk to be tested, and the hard disk parameters of the hard disk to be tested corresponding to the identification information are detected according to the driver interface; And the standard value corresponding to the hard disk parameter, determining the health status of the hard disk to be tested, and solving the detection method for detecting the hard disk in the related art, detecting that the hard disk parameter is single, detecting the hard disk is not targeted, and detecting the device It is not easy, and the detection result is not refined. Furthermore, it is possible to detect the personalized hard disk, make the detection operation of the hard disk convenient, and improve the scalability of the hard disk detection.
  • FIG. 1 is a flow chart of a method for processing a health condition of a hard disk according to an embodiment of the present invention
  • FIG. 2 is a block diagram showing a configuration of a device for processing a health condition of a hard disk according to an embodiment of the present invention
  • FIG. 4 is a block diagram of a preferred configuration of a hard disk health condition processing apparatus according to an embodiment of the present invention
  • FIG. 5 is a block diagram of a preferred configuration of a hard disk health condition processing apparatus according to an embodiment of the present invention
  • 2 is a block diagram of a hard disk detecting apparatus according to a preferred embodiment of the present invention
  • FIG. 7 is a flowchart of a hard disk detecting processing method according to a preferred embodiment of the present invention
  • FIG. 8 is a hard disk according to a preferred embodiment of the present invention.
  • FIG. 9 is a flowchart of the hard disk drive upgrade process in the hard disk detection device according to a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for processing a health condition of a hard disk according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps: Step S102: The identification information of the hard disk is used to identify the hard disk to be tested. For example, the identification information may be multiple.
  • Step S104 an interface type of the hard disk, a manufacturer of the hard disk
  • Step S104 according to the driver interface, The hard disk parameter of the hard disk to be tested corresponding to the identification information is detected.
  • Step S106 Determine the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter.
  • the personalization parameter is detected by the method, and the detection method for detecting the hard disk in the related technology is effectively solved.
  • the detection of the hard disk parameter is single, the detection of the hard disk is not targeted, and the detection device is not simple, and the detection result is not
  • the refinement problem achieves the effect of being able to detect the personalized hard disk, making the detection operation of the hard disk convenient and improving the scalability of the hard disk detection.
  • determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter may be performed in various manners, for example, the detected detection value may be directly put out, and the standard value corresponding to the detection value is .
  • the deviation value of the detected value and the standard value may be calculated first; and the health condition of the hard disk to be tested is determined according to the deviation value.
  • the health status of the hard disk to be tested may be determined according to the value of a single detection parameter (for example, may be a parameter for identifying the critical performance of the hard disk), and may of course be a comprehensive consideration of each parameter.
  • the corresponding display form and the corresponding display item may be selected according to specific needs. For example, at least one of the following hard disks may be displayed in the form of a list: Parameter name, parameter test value , parameter standard value, parameter deviation value. It is to be noted that the information about the hard disk to be tested needs to be stored before the identification information of the hard disk to be tested is obtained from the hard disk to be tested. For example, the identification information of the hard disk to be tested and the hard disk of the hard disk to be tested need to be stored. The standard value of the parameters and hard disk parameters.
  • a hard disk health condition processing device is provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
  • 2 is a structural block diagram of a hard disk health condition processing apparatus according to an embodiment of the present invention. As shown in FIG.
  • the apparatus includes an acquisition module 22, a detection module 24, and a determination module 26.
  • the apparatus will be described below.
  • the obtaining module 22 is configured to obtain identification information for identifying the hard disk to be tested from the hard disk to be tested
  • the detecting module 24 is connected to the obtaining module 22, and is configured to determine the hard disk to be tested corresponding to the identification information according to the driver interface.
  • the hard disk parameter is detected;
  • the determining module 26 is connected to the detecting module 24, and is configured to determine the health status of the hard disk to be tested according to the detected value obtained by the detecting and the standard value corresponding to the hard disk parameter.
  • FIG. 3 is a block diagram showing a preferred structure of the determining module 26 in the hard disk health processing apparatus according to the embodiment of the present invention. As shown in FIG.
  • the determining module 26 includes: a calculating unit 32 and a determining unit 34. Be explained.
  • the calculating unit 32 is configured to calculate a deviation value of the detected value and the standard value;
  • the determining unit 34 is connected to the calculating unit 32, and is configured to determine the health condition of the hard disk to be tested according to the deviation value.
  • 4 is a block diagram of a preferred structure of a hard disk health processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes a display module 42 in addition to all the modules shown in FIG. Be explained.
  • the display module 42 is connected to the above determining module 26 and configured to display the health status of the hard disk to be tested.
  • FIG. 5 is a block diagram of a preferred structure of a hard disk health processing apparatus according to an embodiment of the present invention.
  • the apparatus includes a storage module 52 in addition to all the modules shown in FIG. Module 52 is described.
  • the storage module 52 is connected to the obtaining module 22, and is configured to store the identification information of the hard disk to be tested, the hard disk parameter of the hard disk to be tested, and the standard value of the hard disk parameter.
  • a hard disk detection processing method is provided, which is capable of conveniently detecting the health of a single hard disk of a disk array and using a parameter list. The test results are given in the form, and the method supports the detection of the SAS hard disk, the SATA hard disk, the Fibre Channel hard disk, and the SCSI hard disk.
  • FIG. 6 is a structural block diagram of a hard disk detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG.
  • the hard disk detecting apparatus may include the following parts: a data cord, a hard disk power cord, a hard disk power switch, and a power unit. It is the same as the corresponding function in the related art.
  • the hard disk discovery and adaptation unit has the same functions as the above-mentioned acquisition module 22, and the functions of the hard disk drive unit and the hard disk detection unit and the functions of the above detection module 24 Similarly, the built-in database unit has the same function as the above-described storage module 52, and the LED display unit has the same function as the above-described display module 42.
  • the data cable the connection between the data interface of the hard disk detection device and the data interface of the hard disk, is used for data transmission, wherein one end of the data cable can have several sockets, respectively connected to SAS, SATA, and optical fibers. Channel hard disk, SCSI interface, etc.
  • Hard disk power cable the connection between the power output interface of the hard disk detection device and the power connector of the hard disk, used to supply power to the hard disk.
  • C. Hard disk power switch After the switch is turned on, power is supplied to the hard disk connected to the hard disk detecting device. Otherwise, after the switch is turned off, the hard disk detecting device stops supplying power to the connected hard disk.
  • D. Hard disk discovery and adaptation unit After the hard disk connected to the hard disk detection device is powered on, the unit can automatically discover the hard disk, identify the interface type of the hard disk, the manufacturer, and then trigger the hard disk detection unit (G) to work.
  • Hard disk drive unit which provides the operation interface function of the hard disk to the hard disk discovery and adaptation unit (D) and the hard disk detection unit (G).
  • the unit is also responsible for Trigger the hard disk discovery and adaptation unit (D) work.
  • F. LED display unit which provides the hard disk detecting unit (G) with an output parameter list result to the interface function of the LED screen of the hard disk detecting device of the present invention.
  • Hard disk detection unit which is triggered by the hard disk discovery and adaptation unit (D).
  • the built-in database unit H
  • Read the parameter list of the corresponding manufacturer and then call the interface function of the hard disk operation provided by the hard disk drive unit (E) to detect various parameters in the parameter list, and read the test return value, and use the return value with the parameter list.
  • the standard value in the calculation is calculated, and the deviation value is obtained.
  • the display function provided by the LED display unit (F) is called, and the test result is displayed on the LED screen of the hard disk detecting device of the present invention in the form of a parameter list, and the output items include: Parameter name, standard value, test value, deviation value.
  • H Built-in database unit, which is used to store the parameter list of each manufacturer.
  • I the software upgrade unit, mainly to complete the following aspects: (1) import the manufacturer's parameter list into the built-in database unit (H); (2) responsible for the hard disk discovery and adaptation unit (D), hard disk drive unit (E), LED display unit (F), hard disk detection unit (G), software upgrade of the built-in database unit (H); (3) responsible for the upgrade of the Linux operating system.
  • J the power unit, responsible for supplying power to the hard disk detection device.
  • the hard disk detection method is implemented as follows: After the tested hard disk is powered on, the hard disk discovery and adaptation unit first discovers the hard disk, and automatically identifies the interface type and manufacturer of the hard disk, and then triggers the hard disk detecting unit to work. And the interface type and manufacturer of the hard disk are passed as parameters to the hard disk detecting unit, the hard disk detecting unit reads the parameter list of the corresponding manufacturer from the built-in database, and then calls the hard disk operation interface function provided by the hard disk drive unit to detect the parameter in the parameter list.
  • Step S702 Connecting a data interface of the hard disk detecting device And the data interface of the hard disk; Step S704, connecting the power output interface of the hard disk detecting device to the power interface of the hard disk; Step S706, turning on the hard disk power switch (C) of the hard disk detecting device, at which time the hard disk drive unit (E) triggers the hard disk discovery and Adaptation unit (D); Step S708, the hard disk discovery and adaptation unit (D) calls the hard disk operation interface function provided by the hard disk drive unit (E) to discover the hard disk, and identifies the interface type of the hard disk, the manufacturer, and then triggers the hard disk detection.
  • the unit (G) works and passes the interface type of the hard disk and the manufacturer as parameters to the hard disk detection unit (G).
  • the processing of the hard disk discovery and adaptation unit is as follows. As shown in FIG. 8, the process includes the following steps: Step S802: Powering on the hard disk, triggering hard disk scanning Step S804, discovering a new hard disk; Step S806, reading the hard disk ID (polling related driver), if the hard disk ID is not read, proceeding to step S808, otherwise proceeding to step S810; Step S808, determining a capture error and displaying Step S810, mounting the hard disk to the /dev directory; Step S812, triggering the hard disk detecting unit (G), and transmitting the hard disk ID and the mounting point to the hard disk detecting unit (G).
  • Step S710 the hard disk detecting unit (G) reads out the parameter list of the corresponding manufacturer from the built-in database; Step S712, the hard disk detecting unit (G) calls the hard disk operation interface function provided by the hard disk drive unit, detects the parameter in the parameter list and reads the return value; step S714, the hard disk detecting unit (G) obtains the return value in step S712.
  • the standard values in the parameter list are compared to calculate the deviation value; in step S716, the hard disk detection unit (G) calls the interface function provided by the LED display unit, and outputs the test result to the LED display in the form of a parameter list in the form of a parameter list.
  • the output items include: parameter name, standard value, test value, and deviation value.
  • the hard disk power switch (C) and the hard disk power interface (B) are directly powered or powered off; while the hard disk power switch (C) is used to power on the hard disk, the hard disk discovery and adaptation can be triggered.
  • Unit (D) works; Hard Disk Discovery and Adaptation Unit (D) Calls the hard disk drive interface function provided by the hard disk drive unit (E) to discover the hard disk, and identifies the interface type of the hard disk, the manufacturer, and then triggers the hard disk detection unit (G) Work, and pass the interface type of the hard disk, the manufacturer as a parameter to the hard disk detection unit (G); the hard disk detection unit reads the parameter list of the corresponding manufacturer from the built-in database unit (H), and then calls the hard disk drive unit (E)
  • the provided hard disk operation interface function detects the parameters in the parameter list and reads the return value, and then compares the return value with the standard value in the parameter list to calculate the deviation value, and finally calls the interface function provided by the LED display unit (F).
  • FIG. 9 is a flowchart of a hard disk drive upgrade process in a hard disk detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG.
  • the process includes the following steps: Step S902, connecting a serial port of the device; Step S904, pre-doing
  • the driver installation package is passed to the device, and the installation package includes at least the following files: a hard disk parameter table file, a driver library file, an installation file; step S906, running the installation file; step S908, importing the parameter table into the built-in database unit (H) Step S910, copying the driver library file to the Linux system directory; Step S912, registering each driver function in the driver library file to the hard disk drive unit (E).
  • the hard disk detecting method of the above embodiments and the preferred embodiment not only overcomes the inconveniences of operation and poor scalability in the prior art, but also can automatically identify the manufacturer and the interface type and detect the hard disk accordingly.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the detection method for detecting the hard disk has a single parameter for detecting the hard disk, the detection of the hard disk is not strong, and the detecting device is not
  • the problem is that the detection result is not refined, and the detection of the personalized hard disk is achieved, so that the detection operation of the hard disk is convenient and the expansion of the hard disk detection is improved.

Abstract

Provided are a hard disk health status processing method and apparatus, wherein the method comprises: obtaining from a hard disk to be detected identification information for identifying the hard disk to be detected; detecting, according to a driver interface, the hard disk parameters of the hard disk to be detected corresponding to the identification information; determining the health status of the hard disk according to detection values resulting from the detection and standard values corresponding to the hard disk parameters. The problems existing in the detection methods for hard disk detection in related arts are addressed, such as undiversified hard disk parameters being detected, high aimlessness in hard disk detection, inconvenient detection apparatuses and unrefined detection results, and thus such an effect is achieved that personalized hard disks can be detected so as to facilitate detection operations for hard disks and improve the extensibility of hard disk detection.

Description

硬盘健康状况处理方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种硬盘健康状况处理方法及装置。 背景技术 硬盘是通讯及 IT领域中一种常见, 并被广泛使用的一种存储介质, 硬盘在其生产 环境中, 高性能磁盘阵列是不可或缺的存储组件。 由于有其具体的物理结构, 因而在 硬盘出厂并被使用之后,对硬盘使用会导致硬盘的损耗,硬盘的性能会受到较大影响。 为了安全有效地使用硬盘, 需要时常对硬盘进行检测。 下面对相关技术中所采用的一 些硬盘检测方法进行说明。 在相关技术中, 提出了一种硬盘硬件故障的检测方法, 该方法通过向硬盘寄存器 写入参数, 读取返回值, 与指标参数的标准值进行比较, 判断是否符合标准。 采用该 方法测试的硬盘参数较为单一, 并不能对不同类型的硬盘或是不同厂商的硬盘进行测 试。 另外, 在相关技术中, 还提出了一种较为相近的检测硬盘好坏的装置, 该装置包 括电脑硬盘或外接电脑硬盘连接起来的 SMART属性检测模块和数据处理器来实现不 通过电脑检测出硬盘的好坏。 虽然该方法可以粗略地检测出硬盘的好坏, 但是该方法 需要依托外连的 SMART属性检测模块和数据处理器, 并不能方便地实现对硬盘的检  TECHNICAL FIELD The present invention relates to the field of communications, and in particular to a method and an apparatus for processing a health condition of a hard disk. BACKGROUND OF THE INVENTION Hard disks are a common storage medium in the field of communication and IT, and are widely used as storage media. High-performance disk arrays are indispensable storage components in their production environments. Due to its specific physical structure, after the hard disk is shipped from the factory and used, the use of the hard disk will cause the loss of the hard disk, and the performance of the hard disk will be greatly affected. In order to use the hard disk safely and effectively, it is necessary to detect the hard disk from time to time. Some hard disk detection methods used in the related art will be described below. In the related art, a method for detecting a hardware failure of a hard disk is proposed. The method reads a parameter into a hard disk register, reads a return value, and compares it with a standard value of the index parameter to determine whether the standard is met. The parameters of the hard disk tested by this method are relatively simple, and it is not possible to test different types of hard disks or hard disks of different manufacturers. In addition, in the related art, a relatively similar device for detecting the quality of the hard disk is also proposed, and the device includes a SMART attribute detecting module and a data processor connected by a computer hard disk or an external computer hard disk to realize the hard disk not detected by the computer. Good or bad. Although the method can roughly detect the quality of the hard disk, the method needs to rely on the external SMART attribute detection module and the data processor, and can not conveniently check the hard disk.
因此, 在相关技术中对硬盘进行检测的检测方法存在检测硬盘参数单一, 检测硬 盘的针对性不强, 以及检测装置不简便, 检测结果不细化的问题。 发明内容 本发明提供了一种硬盘健康状况处理方法及装置, 以至少解决在相关技术中对硬 盘进行检测的检测方法存在检测硬盘参数单一, 检测硬盘的针对性不强, 以及检测装 置不简便, 检测结果不细化的问题。 根据本发明的一个方面, 提供了一种硬盘健康状况处理方法, 包括: 从待测硬盘 中获取用于标识所述待测硬盘的标识信息; 依据驱动程序接口, 对所述标识信息对应 的待测硬盘的硬盘参数进行检测; 依据检测获得的检测值以及所述硬盘参数对应的标 准值, 确定所述待测硬盘的健康状况。 优选地, 依据检测获得的所述检测值以及所述硬盘参数对应的所述标准值, 确定 所述待测硬盘的健康状况包括: 计算所述检测值和所述标准值的偏差值; 依据所述偏 差值确定所述待测硬盘的健康状况。 优选地, 在依据检测获得的所述检测值以及所述硬盘参数对应的所述标准值, 确 定所述待测硬盘的健康状况之后, 还包括: 对所述待测硬盘的健康状况进行显示。 优选地, 对所述待测硬盘的健康状况进行显示包括: 以列表的形式显示所述待测 硬盘的以下至少之一: 参数名称、 参数测试值、 参数标准值、 参数偏差值。 优选地, 在从所述待测硬盘中获取用于标识所述待测硬盘的标识信息之前, 还包 括: 存储所述待测硬盘的标识信息、 所述待测硬盘的硬盘参数以及所述硬盘参数的标 准值。 优选地, 所述标识信息包括以下至少之一: 所述硬盘的接口类型、 所述硬盘的厂 商。 根据本发明的另一方面, 提供了一种硬盘健康状况处理装置, 包括: 获取模块, 设置为从待测硬盘中获取用于标识所述待测硬盘的标识信息; 检测模块, 设置为依据 驱动程序接口, 对所述标识信息对应的待测硬盘的硬盘参数进行检测; 确定模块, 设 置为依据检测获得的检测值以及所述硬盘参数对应的标准值, 确定所述待测硬盘的健 康状况。 优选地, 所述确定模块包括: 计算单元, 设置为计算所述检测值和所述标准值的 偏差值; 确定单元, 设置为依据所述偏差值确定所述待测硬盘的健康状况。 优选地, 该装置还包括: 显示模块, 设置为对所述待测硬盘的健康状况进行显示。 优选地, 该装置还包括: 存储模块, 设置为存储所述待测硬盘的标识信息、 所述 待测硬盘的硬盘参数以及所述硬盘参数的标准值。 通过本发明, 采用从待测硬盘中获取用于标识所述待测硬盘的标识信息; 依据驱 动程序接口, 对所述标识信息对应的待测硬盘的硬盘参数进行检测; 依据检测获得的 检测值以及所述硬盘参数对应的标准值, 确定所述待测硬盘的健康状况, 解决了在相 关技术中对硬盘进行检测的检测方法存在检测硬盘参数单一,检测硬盘的针对性不强, 以及检测装置不简便, 检测结果不细化的问题, 进而达到了能够对个性化硬盘进行检 测, 使得对硬盘的检测操作方便和提高硬盘检测扩展性的效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的硬盘健康状况处理方法的流程图; 图 2是根据本发明实施例的硬盘健康状况处理装置的结构框图; 图 3是根据本发明实施例的硬盘健康状况处理装置中确定模块 26的优选结构框 图; 图 4是根据本发明实施例的硬盘健康状况处理装置的优选结构框图一; 图 5是根据本发明实施例的硬盘健康状况处理装置的优选结构框图二; 图 6是根据本发明优选实施方式的硬盘检测装置的结构框图; 图 7是根据本发明优选实施方式的硬盘检测处理方法的流程图; 图 8是根据本发明优选实施方式的硬盘发现及适配单元的处理流程图; 图 9是根据本发明优选实施方式的硬盘检测装置中硬盘驱动升级处理的流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在本实施例中提供了一种硬盘健康状况处理方法, 图 1是根据本发明实施例的硬 盘健康状况处理方法的流程图, 如图 1所示, 该流程包括如下步骤: 步骤 S102, 从待测硬盘中获取用于标识待测硬盘的标识信息, 例如, 该标识信息 可以多种, 例如, 可以包括以下至少之一: 硬盘的接口类型、 硬盘的厂商; 步骤 S104,依据驱动程序接口,对标识信息对应的待测硬盘的硬盘参数进行检测; 步骤 S106, 依据检测获得的检测值以及硬盘参数对应的标准值, 确定待测硬盘的 健康状况。 通过上述步骤, 依据标识信息对硬盘进行标识, 并且依据标识信息对应的待测硬 盘地硬盘参数进行检测, 相对于相关技术中的硬盘检测装置只能对硬盘的单一参数进 行检测, 并不能依据硬盘的个性化参数进行检测, 通过该方法, 不仅有效地解决了在 相关技术中对硬盘进行检测的检测方法存在检测硬盘参数单一, 检测硬盘的针对性不 强, 以及检测装置不简便, 检测结果不细化的问题, 进而达到了能够对个性化硬盘进 行检测, 使得对硬盘的检测操作方便和提高硬盘检测扩展性的效果。 优选地, 依据检测获得的检测值以及硬盘参数对应的标准值, 确定待测硬盘的健 康状况可以采用多种方式, 例如, 可以直接摆出检测出的检测值, 以及该检测值对应 的标准值。 另外, 为了更为方便明显地区别两者的区别, 可以先计算检测值和标准值 的偏差值; 依据偏差值确定待测硬盘的健康状况。 需要说明的是, 待测硬盘的健康状 况可以是依据单个检测参数的值来确定 (例如, 可以是某个用于标识硬盘关键性性能 的参数), 当然也可以是各个参数综合考虑的结果。 在依据检测获得的检测值以及硬盘参数对应的标准值, 确定待测硬盘的健康状况 之后, 还包括: 对待测硬盘的健康状况进行显示。对待测硬盘的健康状况进行显示时, 也可以依据具体需要选择相应的显示形式, 以及相应的显示项目, 例如, 可以以列表 的形式显示待测硬盘的以下至少之一: 参数名称、 参数测试值、 参数标准值、 参数偏 差值。 需要指出的是, 在从待测硬盘中获取用于标识待测硬盘的标识信息之前, 需要对 待测硬盘的相关信息进行了存储, 例如, 需要存储待测硬盘的标识信息、 待测硬盘的 硬盘参数以及硬盘参数的标准值。 在待测硬盘不在存储的列表之内时, 可以先对该存 储的硬盘的相关信息进行升级处理, 即将需要测试的硬盘的相关硬盘参数存储到该待 测列表中。 在本实施例中还提供了一种硬盘健康状况处理装置, 该装置用于实现上述实施例 及优选实施方式, 已经进行过说明的不再赘述。 如以下所使用的, 术语 "模块"可以 实现预定功能的软件和 /或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来 实现, 但是硬件, 或者软件和硬件的组合的实现也是可能并被构想的。 图 2是根据本发明实施例的硬盘健康状况处理装置的结构框图, 如图 2所示, 该 装置包括获取模块 22、 检测模块 24和确定模块 26, 下面对该装置进行说明。 获取模块 22, 设置为从待测硬盘中获取用于标识待测硬盘的标识信息; 检测模块 24, 连接至上述获取模块 22, 设置为依据驱动程序接口, 对标识信息对应的待测硬盘 的硬盘参数进行检测; 确定模块 26, 连接至上述检测模块 24, 设置为依据检测获得的 检测值以及硬盘参数对应的标准值, 确定待测硬盘的健康状况。 图 3是根据本发明实施例的硬盘健康状况处理装置中确定模块 26的优选结构框 图, 如图 3所示, 该确定模块 26包括: 计算单元 32和确定单元 34, 下面对该确定模 块 26进行说明。 计算单元 32, 设置为计算检测值和标准值的偏差值; 确定单元 34, 连接至上述计 算单元 32, 设置为依据偏差值确定待测硬盘的健康状况。 图 4是根据本发明实施例的硬盘健康状况处理装置的优选结构框图一, 如图 4所 示, 该装置除包括图 2所示的所有模块外, 还包括显示模块 42, 下面对该装置进行说 明。 显示模块 42, 连接至上述确定模块 26, 设置为对待测硬盘的健康状况进行显示。 图 5是根据本发明实施例的硬盘健康状况处理装置的优选结构框图二, 如图 5所 示, 该装置除包括图 2所示的所有模块外, 还包括存储模块 52, 下面对该存储模块 52 进行说明。 存储模块 52, 连接至上述获取模块 22, 设置为存储待测硬盘的标识信息、待测硬 盘的硬盘参数以及硬盘参数的标准值。 针对相关技术中缺少一种便携的硬盘检测设备的问题, 在本实施例中提供了一种 硬盘检测处理方法, 该方法能够方便的对磁盘阵列的单个硬盘的健康度进行检测, 并 以参数列表的形式给出测试结果, 并且该方法支持对 SAS硬盘、 SATA硬盘、 光纤通 道硬盘、 SCSI硬盘的检测, 上述硬盘通过软线连接到本发明装置并上电后, 该装置可 以自动发现并辨别所连硬盘的接口类型、 生产厂家, 然后依据厂家提供的参数列表, 自动检测各项参数指标, 并同厂家提供的标准值进行比较, 最后在该装置的 LED显示 屏幕上以参数列表的形式显示出各种参数的测试值、 标准值、 偏差值。 下面对该硬盘检测方法的处理进行说明, 下面先对该硬盘检测装置的结构进行了 简单说明。 图 6是根据本发明优选实施方式的硬盘检测装置的结构框图,如图 6所示, 该硬盘检测装置可以包括以下几个部分: 其中, 数据软线, 硬盘电源线, 硬盘电源开 关以及电源单元与相关技术中的对应功能较为相同。 硬盘发现及适配单元与上述获取 模块 22的功能相当, 硬盘驱动单元与硬盘检测单元的功能与上述检测模块 24的功能 相当, 内置数据库单元与上述存储模块 52功能相当, LED显示单元与上述显示模块 42功能相当。 Therefore, in the related art, the detection method for detecting the hard disk has a problem that the detection of the hard disk parameter is single, the detection of the hard disk is not strong, and the detection device is not simple, and the detection result is not refined. SUMMARY OF THE INVENTION The present invention provides a method and a device for processing a health condition of a hard disk, so as to at least solve the detection method for detecting a hard disk in the related art, the detection of the hard disk parameter is single, the detection of the hard disk is not targeted, and the detecting device is not simple. The problem is not refined. According to an aspect of the present invention, a method for processing a health condition of a hard disk is provided, including: obtaining identification information for identifying the hard disk to be tested from a hard disk to be tested; and waiting for the identification information according to a driver interface The hard disk parameters of the hard disk are tested for detection; and the health status of the hard disk to be tested is determined according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter. Preferably, determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter, comprising: calculating a deviation value between the detection value and the standard value; The deviation value determines the health status of the hard disk to be tested. Preferably, after determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter, the method further includes: displaying a health status of the hard disk to be tested. Preferably, displaying the health status of the hard disk to be tested comprises: displaying at least one of the following: the parameter name, the parameter test value, the parameter standard value, and the parameter deviation value in a form of a list. Preferably, before the identification information of the hard disk to be tested is obtained from the hard disk to be tested, the method further includes: storing identifier information of the hard disk to be tested, a hard disk parameter of the hard disk to be tested, and the hard disk The standard value of the parameter. Preferably, the identifier information includes at least one of the following: an interface type of the hard disk, and a manufacturer of the hard disk. According to another aspect of the present invention, a device for processing a hard disk health condition is provided, including: an obtaining module, configured to obtain identification information for identifying the hard disk to be tested from a hard disk to be tested; and a detecting module configured to be driven according to the driving The program interface is configured to detect the hard disk parameter of the hard disk to be tested corresponding to the identifier information, and the determining module is configured to determine the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter. Preferably, the determining module includes: a calculating unit configured to calculate a deviation value of the detected value and the standard value; and a determining unit configured to determine a health condition of the hard disk to be tested according to the deviation value. Preferably, the device further comprises: a display module, configured to display the health status of the hard disk to be tested. Preferably, the device further includes: a storage module, configured to store identification information of the hard disk to be tested, a hard disk parameter of the hard disk to be tested, and a standard value of the hard disk parameter. According to the present invention, the identification information of the hard disk to be tested is obtained from the hard disk to be tested, and the hard disk parameters of the hard disk to be tested corresponding to the identification information are detected according to the driver interface; And the standard value corresponding to the hard disk parameter, determining the health status of the hard disk to be tested, and solving the detection method for detecting the hard disk in the related art, detecting that the hard disk parameter is single, detecting the hard disk is not targeted, and detecting the device It is not easy, and the detection result is not refined. Furthermore, it is possible to detect the personalized hard disk, make the detection operation of the hard disk convenient, and improve the scalability of the hard disk detection. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flow chart of a method for processing a health condition of a hard disk according to an embodiment of the present invention; FIG. 2 is a block diagram showing a configuration of a device for processing a health condition of a hard disk according to an embodiment of the present invention; FIG. 4 is a block diagram of a preferred configuration of a hard disk health condition processing apparatus according to an embodiment of the present invention; FIG. 5 is a block diagram of a preferred configuration of a hard disk health condition processing apparatus according to an embodiment of the present invention; 2 is a block diagram of a hard disk detecting apparatus according to a preferred embodiment of the present invention; FIG. 7 is a flowchart of a hard disk detecting processing method according to a preferred embodiment of the present invention; FIG. 8 is a hard disk according to a preferred embodiment of the present invention. Flowchart of the processing of the discovery and adaptation unit; FIG. 9 is a flowchart of the hard disk drive upgrade process in the hard disk detection device according to a preferred embodiment of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. In this embodiment, a method for processing a health condition of a hard disk is provided. FIG. 1 is a flowchart of a method for processing a health condition of a hard disk according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps: Step S102: The identification information of the hard disk is used to identify the hard disk to be tested. For example, the identification information may be multiple. For example, at least one of the following may be included: an interface type of the hard disk, a manufacturer of the hard disk; Step S104, according to the driver interface, The hard disk parameter of the hard disk to be tested corresponding to the identification information is detected. Step S106: Determine the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter. Through the foregoing steps, the hard disk is identified according to the identification information, and the hard disk parameter of the hard disk to be tested corresponding to the identification information is detected, and the hard disk detecting device in the related art can only detect the single parameter of the hard disk, and cannot be based on the hard disk. The personalization parameter is detected by the method, and the detection method for detecting the hard disk in the related technology is effectively solved. The detection of the hard disk parameter is single, the detection of the hard disk is not targeted, and the detection device is not simple, and the detection result is not The refinement problem achieves the effect of being able to detect the personalized hard disk, making the detection operation of the hard disk convenient and improving the scalability of the hard disk detection. Preferably, determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter may be performed in various manners, for example, the detected detection value may be directly put out, and the standard value corresponding to the detection value is . In addition, in order to more clearly distinguish the difference between the two, the deviation value of the detected value and the standard value may be calculated first; and the health condition of the hard disk to be tested is determined according to the deviation value. It should be noted that the health status of the hard disk to be tested may be determined according to the value of a single detection parameter (for example, may be a parameter for identifying the critical performance of the hard disk), and may of course be a comprehensive consideration of each parameter. After determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter, the method further includes: displaying the health status of the hard disk to be tested. When the health status of the hard disk to be tested is displayed, the corresponding display form and the corresponding display item may be selected according to specific needs. For example, at least one of the following hard disks may be displayed in the form of a list: Parameter name, parameter test value , parameter standard value, parameter deviation value. It is to be noted that the information about the hard disk to be tested needs to be stored before the identification information of the hard disk to be tested is obtained from the hard disk to be tested. For example, the identification information of the hard disk to be tested and the hard disk of the hard disk to be tested need to be stored. The standard value of the parameters and hard disk parameters. When the hard disk to be tested is not in the stored list, the related information of the stored hard disk may be upgraded, and the relevant hard disk parameters of the hard disk to be tested are stored in the to-be-tested list. In the embodiment, a hard disk health condition processing device is provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used hereinafter, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable. 2 is a structural block diagram of a hard disk health condition processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes an acquisition module 22, a detection module 24, and a determination module 26. The apparatus will be described below. The obtaining module 22 is configured to obtain identification information for identifying the hard disk to be tested from the hard disk to be tested, and the detecting module 24 is connected to the obtaining module 22, and is configured to determine the hard disk to be tested corresponding to the identification information according to the driver interface. The hard disk parameter is detected; the determining module 26 is connected to the detecting module 24, and is configured to determine the health status of the hard disk to be tested according to the detected value obtained by the detecting and the standard value corresponding to the hard disk parameter. FIG. 3 is a block diagram showing a preferred structure of the determining module 26 in the hard disk health processing apparatus according to the embodiment of the present invention. As shown in FIG. 3, the determining module 26 includes: a calculating unit 32 and a determining unit 34. Be explained. The calculating unit 32 is configured to calculate a deviation value of the detected value and the standard value; the determining unit 34 is connected to the calculating unit 32, and is configured to determine the health condition of the hard disk to be tested according to the deviation value. 4 is a block diagram of a preferred structure of a hard disk health processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes a display module 42 in addition to all the modules shown in FIG. Be explained. The display module 42 is connected to the above determining module 26 and configured to display the health status of the hard disk to be tested. 5 is a block diagram of a preferred structure of a hard disk health processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, the apparatus includes a storage module 52 in addition to all the modules shown in FIG. Module 52 is described. The storage module 52 is connected to the obtaining module 22, and is configured to store the identification information of the hard disk to be tested, the hard disk parameter of the hard disk to be tested, and the standard value of the hard disk parameter. In the present embodiment, a hard disk detection processing method is provided, which is capable of conveniently detecting the health of a single hard disk of a disk array and using a parameter list. The test results are given in the form, and the method supports the detection of the SAS hard disk, the SATA hard disk, the Fibre Channel hard disk, and the SCSI hard disk. After the hard disk is connected to the device of the present invention through a flexible cable and powered on, the device can automatically discover and identify the device. Connect the interface type of the hard disk, the manufacturer, and then automatically check each parameter index according to the parameter list provided by the manufacturer, and compare it with the standard value provided by the manufacturer. Finally, display the parameter list on the LED display screen of the device. Test values, standard values, and deviation values for various parameters. The processing of the hard disk detecting method will be described below. First, the structure of the hard disk detecting device will be briefly described. FIG. 6 is a structural block diagram of a hard disk detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 6, the hard disk detecting apparatus may include the following parts: a data cord, a hard disk power cord, a hard disk power switch, and a power unit. It is the same as the corresponding function in the related art. The hard disk discovery and adaptation unit has the same functions as the above-mentioned acquisition module 22, and the functions of the hard disk drive unit and the hard disk detection unit and the functions of the above detection module 24 Similarly, the built-in database unit has the same function as the above-described storage module 52, and the LED display unit has the same function as the above-described display module 42.
A、 数据软线, 该硬盘检测装置的数据接口同硬盘的数据接口之间的连线, 用于 数据传输, 其中, 该数据软线的一端可以有若干个插口, 分别接 SAS、 SATA、 光纤通 道硬盘、 SCSI接口等。 A. The data cable, the connection between the data interface of the hard disk detection device and the data interface of the hard disk, is used for data transmission, wherein one end of the data cable can have several sockets, respectively connected to SAS, SATA, and optical fibers. Channel hard disk, SCSI interface, etc.
B、 硬盘电源线, 硬盘检测装置的电源输出接口同硬盘的电源接口之间的连线, 用于给硬盘供电。 B. Hard disk power cable, the connection between the power output interface of the hard disk detection device and the power connector of the hard disk, used to supply power to the hard disk.
C、 硬盘电源开关, 打开该开关后, 给硬盘检测装置所连接的硬盘供电, 反之, 关闭该开关后, 硬盘检测装置停止给所连接的硬盘供电。 D、 硬盘发现及适配单元, 硬盘检测装置所连接的硬盘上电后, 该单元能够自动 发现硬盘, 并辨别出硬盘的接口类型、 生产厂商, 然后触发硬盘检测单元 (G) 工作。 C. Hard disk power switch. After the switch is turned on, power is supplied to the hard disk connected to the hard disk detecting device. Otherwise, after the switch is turned off, the hard disk detecting device stops supplying power to the connected hard disk. D. Hard disk discovery and adaptation unit. After the hard disk connected to the hard disk detection device is powered on, the unit can automatically discover the hard disk, identify the interface type of the hard disk, the manufacturer, and then trigger the hard disk detection unit (G) to work.
E、 硬盘驱动单元, 该单元给硬盘发现及适配单元 (D) 和硬盘检测单元 (G) 提 供硬盘的操作接口函数, 另外, 当硬盘检测装置所连接的硬盘上电后, 该单元还负责 触发硬盘发现及适配单元 (D) 工作。 F、 LED显示单元, 该单元给硬盘检测单元(G)提供输出参数列表结果到本发明 硬盘检测装置的 LED屏的接口函数。 E. Hard disk drive unit, which provides the operation interface function of the hard disk to the hard disk discovery and adaptation unit (D) and the hard disk detection unit (G). In addition, when the hard disk connected to the hard disk detection device is powered on, the unit is also responsible for Trigger the hard disk discovery and adaptation unit (D) work. F. LED display unit, which provides the hard disk detecting unit (G) with an output parameter list result to the interface function of the LED screen of the hard disk detecting device of the present invention.
G、 硬盘检测单元, 该单元被硬盘发现及适配单元(D)所触发, 收到硬盘发现及 适配单元(D)传过来的硬盘信息(接口类型和生产厂商)后, 从内置数据库单元(H) 读取相应厂商的参数列表, 然后调用硬盘驱动单元 (E) 所提供的硬盘操作的接口函 数检测参数列表中的各项参数, 并读取测试返回值, 用该返回值同参数列表中的标准 值进行计较计算, 得出偏差值, 最后调用 LED显示单元 (F) 提供的显示函数, 把测 试结果以参数列表的形式显示在本发明硬盘检测装置的 LED屏上, 输出项包括: 参数 名称、 标准值、 测试值、 偏差值。 G. Hard disk detection unit, which is triggered by the hard disk discovery and adaptation unit (D). After receiving the hard disk information (interface type and manufacturer) transmitted by the hard disk discovery and adaptation unit (D), the built-in database unit (H) Read the parameter list of the corresponding manufacturer, and then call the interface function of the hard disk operation provided by the hard disk drive unit (E) to detect various parameters in the parameter list, and read the test return value, and use the return value with the parameter list. The standard value in the calculation is calculated, and the deviation value is obtained. Finally, the display function provided by the LED display unit (F) is called, and the test result is displayed on the LED screen of the hard disk detecting device of the present invention in the form of a parameter list, and the output items include: Parameter name, standard value, test value, deviation value.
H、 内置数据库单元, 该单元用于存储各生产厂商的参数列表。 I、 软件升级单元, 主要完成以下几个方面的工作: (1 )把厂商的参数列表导入到 内置数据库单元 (H) 中; (2) 负责硬盘发现及适配单元 (D)、 硬盘驱动单元 (E)、 LED显示单元 (F)、 硬盘检测单元 (G)、 内置数据库单元 (H) 的软件的升级; (3 ) 负责完成 linux操作系统的升级。 J、 电源单元, 负责给硬盘检测装置供电。 基于上述硬盘检测装置的架构, 该硬盘检测方法实施如下: 被测硬盘上电后, 首 先由硬盘发现及适配单元发现硬盘, 并自动辨别硬盘的接口类型和厂商, 然后触发硬 盘检测单元工作, 并把硬盘的接口类型和厂商作为参数传递给硬盘检测单元, 硬盘检 测单元从内置数据库中读出相应厂商的参数列表, 然后调用硬盘驱动单元所提供的硬 盘操作接口函数, 检测参数列表中的参数并读取返回值, 然后以该返回值同参数列表 中的标准值进行比较, 算出偏差值, 最后调用 LED显示单元提供的接口函数, 以参数 列表的形式把测试结果输出到 LED显示屏上。下面对该方法的流程进行说明, 图 7是 根据本发明优选实施方式的硬盘检测处理方法的流程图, 如图 7所示, 该流程包括如 下步骤: 步骤 S702, 连接硬盘检测装置的数据接口和硬盘的数据接口; 步骤 S704, 连接硬盘检测装置的电源输出接口同硬盘的电源接口; 步骤 S706, 打开硬盘检测装置的硬盘电源开关 (C), 此时硬盘驱动单元 (E) 触 发硬盘发现及适配单元 (D); 步骤 S708, 硬盘发现及适配单元 (D) 调用硬盘驱动单元 (E) 提供的硬盘操作 接口函数发现硬盘,并辨别出硬盘的接口类型、生产厂商,然后触发硬盘检测单元(G) 工作, 并把硬盘的接口类型、 生产厂商作为参数传递给硬盘检测单元 (G)。 处理时可 以采用以下方式, 图 8是根据本发明优选实施方式的硬盘发现及适配单元的处理流程 图, 如图 8所示, 该流程包括如下步骤: 步骤 S802, 硬盘上电, 触发硬盘扫描; 步骤 S804, 发现新硬盘; 步骤 S806, 读取硬盘 ID (轮询相关驱动), 在没有读取到硬盘 ID的情况下, 进 入步骤 S808, 否则进入步骤 S810; 步骤 S808, 确定捕获错误并显示在 LED屏上; 步骤 S810, 把硬盘挂载到 /dev目录下; 步骤 S812,触发硬盘检测单元(G),并把硬盘 ID和挂载点传给硬盘检测单元(G)。 步骤 S710, 硬盘检测单元 (G) 从内置数据库中读出相应厂商的参数列表; 步骤 S712, 硬盘检测单元 (G) 调用硬盘驱动单元所提供的硬盘操作接口函数, 检测参数列表中的参数并读取返回值; 步骤 S714, 硬盘检测单元(G)用步骤 S712得到的返回值同参数列表中的标准值 进行比较, 算出偏差值; 步骤 S716, 硬盘检测单元(G)调用 LED显示单元提供的接口函数, 以参数列表 的形式把测试结果以参数列表的形式输出到 LED显示屏上, 输出项包括: 参数名称、 标准值、 测试值、 偏差值。 在该硬盘检测方法中, 直接通过硬盘电源开关(C)和硬盘电源接口 (B )给硬盘 供电或断电; 通过硬盘电源开关 (C) 给硬盘上电的同时, 能触发硬盘发现及适配单 元 (D) 工作; 硬盘发现及适配单元 (D) 调用硬盘驱动单元 (E) 提供的硬盘操作接 口函数发现硬盘, 并辨别出硬盘的接口类型、 生产厂商, 然后触发硬盘检测单元 (G) 工作, 并把硬盘的接口类型、 生产厂商作为参数传递给硬盘检测单元 (G); 硬盘检测 单元从内置数据库单元(H)中读出相应厂商的参数列表, 然后调用硬盘驱动单元(E) 所提供的硬盘操作接口函数, 检测参数列表中的参数并读取返回值, 然后以该返回值 同参数列表中的标准值进行比较, 算出偏差值, 最后调用 LED显示单元 (F) 提供的 接口函数, 以参数列表的形式把测试结果输出到 LED显示屏上; 软件升级单元能把厂 商的参数列表导入到内置数据库单元 (H) 中, 还可以完成系统中其他组件的升级工 作。 图 9是根据本发明优选实施方式的硬盘检测装置中硬盘驱动升级处理的流程图, 如图 9所示, 该流程包括如下步骤: 步骤 S902, 连接设备的串口; 步骤 S904,把预先做好的驱动的安装包传入设备,该安装包中至少包含以下文件: 硬盘参数表文件, 驱动程序库文件, 安装文件; 步骤 S906, 运行安装文件; 步骤 S908, 把参数表导入内置数据库单元 (H); 步骤 S910, 把驱动程序库文件拷贝到 Linux系统目录下; 步骤 S912, 把驱动程序库文件中的各个驱动函数注册到硬盘驱动单元 (E)。 通过上述实施例及优选实施方式的硬盘检测方法, 不仅克服了现有技术中的操作 不方便、 扩展性差缺点, 能够有效自动识别生产厂家和接口类型并据此检测硬盘, 取 得了硬盘健康度检测方面的进步, 达到了实用、 便捷的效果, 节省了出现问题后查找 错误的时间和人力, 提高了生产环境的可靠性。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技术人 员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的任何 修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。 工业实用性 如上所述, 通过本发明实施例及优选实施方式可以达到以下目的: 在相关技术中 对硬盘进行检测的检测方法存在检测硬盘参数单一, 检测硬盘的针对性不强, 以及检 测装置不简便, 检测结果不细化的问题, 进而达到了能够对个性化硬盘进行检测, 使 得对硬盘的检测操作方便和提高硬盘检测扩展性的效果。 H. Built-in database unit, which is used to store the parameter list of each manufacturer. I, the software upgrade unit, mainly to complete the following aspects: (1) import the manufacturer's parameter list into the built-in database unit (H); (2) responsible for the hard disk discovery and adaptation unit (D), hard disk drive unit (E), LED display unit (F), hard disk detection unit (G), software upgrade of the built-in database unit (H); (3) Responsible for the upgrade of the Linux operating system. J, the power unit, responsible for supplying power to the hard disk detection device. Based on the architecture of the hard disk detection device, the hard disk detection method is implemented as follows: After the tested hard disk is powered on, the hard disk discovery and adaptation unit first discovers the hard disk, and automatically identifies the interface type and manufacturer of the hard disk, and then triggers the hard disk detecting unit to work. And the interface type and manufacturer of the hard disk are passed as parameters to the hard disk detecting unit, the hard disk detecting unit reads the parameter list of the corresponding manufacturer from the built-in database, and then calls the hard disk operation interface function provided by the hard disk drive unit to detect the parameter in the parameter list. And read the return value, and then compare the return value with the standard value in the parameter list, calculate the deviation value, and finally call the interface function provided by the LED display unit, and output the test result to the LED display in the form of a parameter list. The following is a flowchart of the method for processing a hard disk according to a preferred embodiment of the present invention. As shown in FIG. 7, the process includes the following steps: Step S702: Connecting a data interface of the hard disk detecting device And the data interface of the hard disk; Step S704, connecting the power output interface of the hard disk detecting device to the power interface of the hard disk; Step S706, turning on the hard disk power switch (C) of the hard disk detecting device, at which time the hard disk drive unit (E) triggers the hard disk discovery and Adaptation unit (D); Step S708, the hard disk discovery and adaptation unit (D) calls the hard disk operation interface function provided by the hard disk drive unit (E) to discover the hard disk, and identifies the interface type of the hard disk, the manufacturer, and then triggers the hard disk detection. The unit (G) works and passes the interface type of the hard disk and the manufacturer as parameters to the hard disk detection unit (G). The processing of the hard disk discovery and adaptation unit according to the preferred embodiment of the present invention is as follows. As shown in FIG. 8, the process includes the following steps: Step S802: Powering on the hard disk, triggering hard disk scanning Step S804, discovering a new hard disk; Step S806, reading the hard disk ID (polling related driver), if the hard disk ID is not read, proceeding to step S808, otherwise proceeding to step S810; Step S808, determining a capture error and displaying Step S810, mounting the hard disk to the /dev directory; Step S812, triggering the hard disk detecting unit (G), and transmitting the hard disk ID and the mounting point to the hard disk detecting unit (G). Step S710, the hard disk detecting unit (G) reads out the parameter list of the corresponding manufacturer from the built-in database; Step S712, the hard disk detecting unit (G) calls the hard disk operation interface function provided by the hard disk drive unit, detects the parameter in the parameter list and reads the return value; step S714, the hard disk detecting unit (G) obtains the return value in step S712. The standard values in the parameter list are compared to calculate the deviation value; in step S716, the hard disk detection unit (G) calls the interface function provided by the LED display unit, and outputs the test result to the LED display in the form of a parameter list in the form of a parameter list. The output items include: parameter name, standard value, test value, and deviation value. In the hard disk detection method, the hard disk power switch (C) and the hard disk power interface (B) are directly powered or powered off; while the hard disk power switch (C) is used to power on the hard disk, the hard disk discovery and adaptation can be triggered. Unit (D) works; Hard Disk Discovery and Adaptation Unit (D) Calls the hard disk drive interface function provided by the hard disk drive unit (E) to discover the hard disk, and identifies the interface type of the hard disk, the manufacturer, and then triggers the hard disk detection unit (G) Work, and pass the interface type of the hard disk, the manufacturer as a parameter to the hard disk detection unit (G); the hard disk detection unit reads the parameter list of the corresponding manufacturer from the built-in database unit (H), and then calls the hard disk drive unit (E) The provided hard disk operation interface function detects the parameters in the parameter list and reads the return value, and then compares the return value with the standard value in the parameter list to calculate the deviation value, and finally calls the interface function provided by the LED display unit (F). Output the test result to the LED display in the form of a parameter list; the software upgrade unit can set the manufacturer's parameter column Introduced into the built-in database means (H), the system may also complete the upgrade other components. FIG. 9 is a flowchart of a hard disk drive upgrade process in a hard disk detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 9, the process includes the following steps: Step S902, connecting a serial port of the device; Step S904, pre-doing The driver installation package is passed to the device, and the installation package includes at least the following files: a hard disk parameter table file, a driver library file, an installation file; step S906, running the installation file; step S908, importing the parameter table into the built-in database unit (H) Step S910, copying the driver library file to the Linux system directory; Step S912, registering each driver function in the driver library file to the hard disk drive unit (E). The hard disk detecting method of the above embodiments and the preferred embodiment not only overcomes the inconveniences of operation and poor scalability in the prior art, but also can automatically identify the manufacturer and the interface type and detect the hard disk accordingly. It has made progress in the detection of hard disk health, achieving practical and convenient effects, saving time and manpower for finding errors after problems occur, and improving the reliability of the production environment. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention. Industrial Applicability As described above, the following objects can be achieved by the embodiments and the preferred embodiments of the present invention: In the related art, the detection method for detecting the hard disk has a single parameter for detecting the hard disk, the detection of the hard disk is not strong, and the detecting device is not The problem is that the detection result is not refined, and the detection of the personalized hard disk is achieved, so that the detection operation of the hard disk is convenient and the expansion of the hard disk detection is improved.

Claims

权 利 要 求 书 Claim
1. 一种硬盘健康状况处理方法, 包括: 从待测硬盘中获取用于标识所述待测硬盘的标识信息; A method for processing a health condition of a hard disk, comprising: obtaining identification information for identifying the hard disk to be tested from a hard disk to be tested;
依据驱动程序接口,对所述标识信息对应的待测硬盘的硬盘参数进行检测; 依据检测获得的检测值以及所述硬盘参数对应的标准值, 确定所述待测硬 盘的健康状况。  And determining, according to the driver interface, the hard disk parameter of the hard disk to be tested corresponding to the identifier information; determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter.
2. 根据权利要求 1所述的方法, 其中, 依据检测获得的所述检测值以及所述硬盘 参数对应的所述标准值, 确定所述待测硬盘的健康状况包括: 计算所述检测值和所述标准值的偏差值; The method according to claim 1, wherein determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter comprises: calculating the detection value and The deviation value of the standard value;
依据所述偏差值确定所述待测硬盘的健康状况。  Determining the health status of the hard disk to be tested according to the deviation value.
3. 根据权利要求 1所述的方法, 其中, 在依据检测获得的所述检测值以及所述硬 盘参数对应的所述标准值, 确定所述待测硬盘的健康状况之后, 还包括: 对所述待测硬盘的健康状况进行显示。 The method according to claim 1, wherein after determining the health status of the hard disk to be tested according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter, the method further includes: The health status of the hard disk to be tested is displayed.
4. 根据权利要求 1所述的方法,其中,对所述待测硬盘的健康状况进行显示包括: 以列表的形式显示所述待测硬盘的以下至少之一:参数名称、参数测试值、 参数标准值、 参数偏差值。 The method of claim 1 , wherein displaying the health status of the hard disk to be tested comprises: displaying at least one of the following: the parameter name, the parameter test value, and the parameter in a form of a list. Standard value, parameter deviation value.
5. 根据权利要求 1所述的方法, 其中, 在从所述待测硬盘中获取用于标识所述待 测硬盘的标识信息之前, 还包括: 存储所述待测硬盘的标识信息、 所述待测硬盘的硬盘参数以及所述硬盘参 数的标准值。 The method of claim 1 , before the obtaining the identification information of the hard disk to be tested from the hard disk to be tested, further comprising: storing identifier information of the hard disk to be tested, The hard disk parameters of the hard disk to be tested and the standard values of the hard disk parameters.
6. 根据权利要求 1至 5中任一项所述的方法, 其中, 所述标识信息包括以下至少 之一: The method according to any one of claims 1 to 5, wherein the identification information comprises at least one of the following:
所述硬盘的接口类型、 所述硬盘的厂商。  The interface type of the hard disk, the manufacturer of the hard disk.
7. 一种硬盘健康状况处理装置, 包括: 获取模块, 设置为从待测硬盘中获取用于标识所述待测硬盘的标识信息; 检测模块, 设置为依据驱动程序接口, 对所述标识信息对应的待测硬盘的 硬盘参数进行检测; 确定模块,设置为依据检测获得的检测值以及所述硬盘参数对应的标准值, 确定所述待测硬盘的健康状况。 A device for processing a hard disk health condition, comprising: an obtaining module, configured to obtain, from the hard disk to be tested, identification information for identifying the hard disk to be tested; The detecting module is configured to detect, according to the driver interface, the hard disk parameter of the hard disk to be tested corresponding to the identification information, and the determining module is configured to determine, according to the detection value obtained by the detection and the standard value corresponding to the hard disk parameter, The health of the hard disk to be tested.
8. 根据权利要求 7所述的装置, 其中, 所述确定模块包括: 计算单元, 设置为计算所述检测值和所述标准值的偏差值; The device according to claim 7, wherein the determining module comprises: a calculating unit, configured to calculate a deviation value of the detected value and the standard value;
确定单元, 设置为依据所述偏差值确定所述待测硬盘的健康状况。  The determining unit is configured to determine the health status of the hard disk to be tested according to the deviation value.
9. 根据权利要求 7所述的装置, 其中, 还包括: 显示模块, 设置为对所述待测硬盘的健康状况进行显示。 9. The device according to claim 7, further comprising: a display module configured to display a health status of the hard disk to be tested.
10. 根据权利要求 7所述的装置, 其中, 还包括: 存储模块, 设置为存储所述待测硬盘的标识信息、 所述待测硬盘的硬盘参 数以及所述硬盘参数的标准值。 The device according to claim 7, further comprising: a storage module, configured to store identification information of the hard disk to be tested, a hard disk parameter of the hard disk to be tested, and a standard value of the hard disk parameter.
PCT/CN2014/083458 2014-05-20 2014-07-31 Hard disk health status processing method and apparatus WO2015176388A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410213771.9A CN105097042A (en) 2014-05-20 2014-05-20 Method and apparatus for processing health condition of hard disk
CN201410213771.9 2014-05-20

Publications (1)

Publication Number Publication Date
WO2015176388A1 true WO2015176388A1 (en) 2015-11-26

Family

ID=54553293

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/083458 WO2015176388A1 (en) 2014-05-20 2014-07-31 Hard disk health status processing method and apparatus

Country Status (2)

Country Link
CN (1) CN105097042A (en)
WO (1) WO2015176388A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119344A (en) * 2019-04-10 2019-08-13 河南文正电子数据处理有限公司 Hard disk health status analysis method based on S.M.A.R.T parameter
US10963325B2 (en) 2016-04-22 2021-03-30 Hewlett-Packard Development Company, L.P. Determining the health of a storage drive

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893168A (en) * 2016-03-29 2016-08-24 深圳市硅格半导体股份有限公司 Health condition analysis method and device for hard disk
CN105843721B (en) * 2016-06-01 2018-08-28 北京蓝光引力网络股份有限公司 A kind of systematic parameter detection method of USB flash disk, device and a kind of USB flash disk
CN106875980A (en) * 2017-02-17 2017-06-20 紫光华山信息技术有限公司 Method for testing hard disk and device
CN107705819A (en) * 2017-09-21 2018-02-16 深圳市致存微电子企业(有限合伙) A kind of storage chip sorting technique, sorter and categorizing system
CN109524054A (en) * 2018-11-16 2019-03-26 郑州云海信息技术有限公司 A kind of more hard disk types automatic positioning test method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249887B1 (en) * 1998-09-21 2001-06-19 William G. Gray Apparatus and method for predicting failure of a disk drive
CN102568522A (en) * 2011-12-31 2012-07-11 曙光信息产业股份有限公司 Hardware performance test method and device
CN102591591A (en) * 2011-12-19 2012-07-18 杭州瑞网广通信息技术有限公司 Disk detection system, disk detection method and network storage system
CN103578568A (en) * 2012-07-24 2014-02-12 苏州捷泰科信息技术有限公司 Method and apparatus for testing performances of solid state disks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249887B1 (en) * 1998-09-21 2001-06-19 William G. Gray Apparatus and method for predicting failure of a disk drive
CN102591591A (en) * 2011-12-19 2012-07-18 杭州瑞网广通信息技术有限公司 Disk detection system, disk detection method and network storage system
CN102568522A (en) * 2011-12-31 2012-07-11 曙光信息产业股份有限公司 Hardware performance test method and device
CN103578568A (en) * 2012-07-24 2014-02-12 苏州捷泰科信息技术有限公司 Method and apparatus for testing performances of solid state disks

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10963325B2 (en) 2016-04-22 2021-03-30 Hewlett-Packard Development Company, L.P. Determining the health of a storage drive
CN110119344A (en) * 2019-04-10 2019-08-13 河南文正电子数据处理有限公司 Hard disk health status analysis method based on S.M.A.R.T parameter
CN110119344B (en) * 2019-04-10 2023-09-01 深圳市科新精密电子有限公司 Hard disk health state analysis method based on S.M.A.R.T. parameters

Also Published As

Publication number Publication date
CN105097042A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
WO2015176388A1 (en) Hard disk health status processing method and apparatus
CN106681751B (en) Unified firmware management system and management method and computer readable medium
TWI450103B (en) Remote management systems and methods for servers, and computer program products thereof
US9563442B2 (en) Baseboard management controller and method of loading firmware
CA2818232C (en) Automated searching for solutions to support self-diagnostic operations of web-enabled devices
TWI594600B (en) Network switch and method of updating a device using a network switch
US7487372B2 (en) Remote power sensing for hard disk bridge controller
US20130031277A1 (en) Method for identifying version type of windows operating system on a host by a usb device
CN109101381A (en) Configuration file update method, system, electronic equipment and storage medium
US20090234942A1 (en) Apparatus, system, and method for testing embedded device
US9703937B2 (en) Method to prevent operating system digital product key activation failures
EP2650781A2 (en) Method for detecting hardware
TW201423385A (en) Test system and method for computer
TWI488116B (en) Electronic systems and related management methods thereof
CN103546586A (en) Internet Protocol (IP) address matching system and method
US8370532B1 (en) Techniques for portable device data archiving
CN104239174A (en) BMC (baseboard management controller) remote debugging system and method
US20070162684A1 (en) Apparatus and method to configure, format, and test, a data storage subsystem product
WO2020000657A1 (en) Method and apparatus for establishing operation and maintenance monitoring connection, terminal device, and medium
CN105786659A (en) Remote debugging method and server
JP2009193358A (en) Information processor
US20100121909A1 (en) Storage apparatus and on-line client service system, software and method thereof
CN104317645B (en) A kind of method and device of Application Instance listening port
CN111193818A (en) Method, system, equipment and medium for obtaining IP address
TW201631930A (en) Apparatus, method and non-transitory computer-readable medium for out-of-band network port status detection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14892451

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14892451

Country of ref document: EP

Kind code of ref document: A1