CN104536857A - Hard disk parameters acquiring method - Google Patents

Hard disk parameters acquiring method Download PDF

Info

Publication number
CN104536857A
CN104536857A CN201410817512.7A CN201410817512A CN104536857A CN 104536857 A CN104536857 A CN 104536857A CN 201410817512 A CN201410817512 A CN 201410817512A CN 104536857 A CN104536857 A CN 104536857A
Authority
CN
China
Prior art keywords
hard disk
parameter
operating terminal
praameter
raid card
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.)
Pending
Application number
CN201410817512.7A
Other languages
Chinese (zh)
Inventor
任少华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN201410817512.7A priority Critical patent/CN104536857A/en
Publication of CN104536857A publication Critical patent/CN104536857A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a hard disk parameters acquiring method. Parameters of at least two hard disks connected with a RAID card are acquired through an operation terminal. The hard disk parameters acquiring method is characterized by comprising the following steps: (1) sending a hard disk inquiry command by the operation terminal based on a DCDB sending method to a hard disk controller of the RAID card; (2) inquiring a port type and a equipment ID number of each hard disk by the hard disk controller based on the hard disk inquiry command; (3) judging whether the hard disk supports a SCSI protocol through the inquired port type and the equipment ID number of the hard disk based on a predetermined rule; (4) sending a parameter inquiring command to the hard disk by the operation terminal based on SCSI protocol through the RAID card when the hard disk supports the SCSI protocol; (5) feeding a parameter package to the operation terminal after the hard disk responding to the parameter inquiring command; (6) acquiring the parameters by analyzing the parameter package.

Description

Hard disk praameter acquisition methods
Technical field
The present invention relates to a kind of hard disk praameter acquisition methods.
Background technology
At present, hard disk is one of information storage medium main in computing machine, in daily use, often need polylith hard disk to be connected with computing machine fetch increasing information storage, in order to increase substantially the readwrite performance of hard disk, just need by RAID card polylith hard disk be connected with computing machine thus form hard disk redundancy array.
But in the prior art, directly reading by computing machine the hard disk praameter be connected with RAID card but becomes difficulty, the parameter that directly cannot obtain hard disk in the operating system of computing machine just cannot obtain behaviour in service and the reliability information of hard disk.
Summary of the invention
The present invention carries out to solve the problem, and object is to provide a kind of hard disk praameter acquisition methods.
The invention provides a kind of hard disk praameter acquisition methods, obtained respectively by the parameter of operating terminal pair at least two hard disks be connected with RAID card, it is characterized in that, specifically comprise the following steps: (1) operating terminal sends hard disk querying command in the hard disk controller in RAID card based on DCDB send mode; (2) hard disk controller inquires about connecter type and the device id number of each hard disk based on hard disk querying command; (3) judge whether hard disk supports SCSI agreement based on pre-defined rule by the connecter type of hard disk that inquires and device id number; (4) when being judged as YES, operating terminal sends parameter query order to hard disk based on SCSI agreement by RAID card; (5) hard disk response parameter querying command thus to operating terminal feedback parameter bag; And (6) analytic parameter bag thus obtain parameter.
In hard disk praameter acquisition methods provided by the invention, can also have such feature, wherein, hard disk is SAS hard disk or the SATA hard disc supporting SCSI agreement.
In hard disk praameter acquisition methods provided by the invention, can also have such feature, wherein, parameter comprises: the recovered number of Hard Disk Defect number, disk read-write number of times, disk read-write and fatal error number.
In hard disk praameter acquisition methods provided by the invention, such feature can also be had, further comprising the steps of: (7) operating terminal preserves parameter, as the first reduced parameter.(8) predetermined interval gets parms again as the second reduced parameter.(9) by the first reduced parameter and the second reduced parameter being contrasted, obtaining comparative information, based on comparative information, reliability evaluation being carried out to hard disk.
The effect of invention
According to hard disk praameter acquisition methods involved in the present invention, operating terminal sends querying command to the hard disk controller of RAID card, each hard disk is inquired about by hard disk controller, and the querying command result responded by each hard disk transfers to operating terminal thus judges connecter type and the device id number of each hard disk, judge whether each hard disk supports SCSI agreement according to connecter type and device id number, operating terminal is to supporting that the hard disk of SCSI agreement sends parameter query order, hard disk response parameter querying command thus to operating terminal feedback parameter bag, by resolving and then obtain the parameter of hard disk to parameter bag, so, hard disk praameter acquisition methods of the present invention achieves the parameter directly obtaining the hard disk be connected with RAID card on operating terminal.
Accompanying drawing explanation
Fig. 1 is the annexation figure of operating terminal in embodiments of the invention, RAID card and hard disk;
Fig. 2 is the process flow diagram of hard disk praameter acquisition methods in embodiments of the invention.
Embodiment
The technological means realized to make the present invention, creation characteristic, reach object and effect is easy to understand, following examples are specifically addressed hard disk praameter acquisition methods of the present invention by reference to the accompanying drawings.
Fig. 1 is the annexation figure of operating terminal in embodiments of the invention, RAID card and hard disk.
As shown in Figure 1, in the present embodiment, hard disk praameter acquisition methods, for obtaining the parameter of two hard disks 30 be connected with operating terminal 10 by RAID card 20, is comprised: the recovered number of Hard Disk Defect number, disk read-write number of times, disk read-write and fatal error number.RAID card 20 involved by the present embodiment comprises: application programming interface 21 and hard disk controller 22, and is only directed to the RAID card of Infineon Technologies Corp.'s production, the hard disk involved by the present embodiment, comprises the SATA hard disc of all SAS hard disks and support SCSI agreement.
Fig. 2 is the process flow diagram of hard disk praameter acquisition methods in embodiments of the invention.
As shown in Figure 2, the hard disk praameter acquisition methods in the present embodiment comprises the following steps:
Step S1, the application programming interface 21 in operating terminal 10 dynamic call RAID card 20, and by application programming interface 21 initialization, then enter step S2.
Step S2, hard disk is inquired about life based on DCMD send mode and is transferred to application programming interface 21 by operating terminal 10, then enters step S3.
Step S3, hard disk controller 22 inquires about connecter type and the device id number of two hard disks 30 based on the hard disk querying command that application programming interface 21 receives, and then enters step S4.
Step S4, two hard disks 30 respond hard disk querying command, thus by RAID card 20, corresponding connecter type and device id number are transferred to operating terminal 10, then enter step S5.
Step S5, operating terminal 10, by the connecter type of two hard disks 30 that receives and device id number, judges whether two hard disks 30 support SCSI agreement, when being judged as YES, enter step S6; When being judged as NO, enter into step S7.
Step S6, hard disk 30 sends error code to operating terminal 10, then enters done state.
Step S7, operating terminal 10 sends parameter query order to RAID card 20, then enters step S8.
Step S8, is sent to hard disk 30 by RAID card 20 by parameter query order, then enters step S9.
Step S9, hard disk 30 response parameter querying command, thus send parameter bag to operating terminal 10, then enter step S10.
Step S10, operating terminal 10 is resolved the parameter bag received by the data layout consulting SCSI instruction, obtains the parameter of hard disk 30, then enters step S11.
Step S11, carries out preserving as the first reduced parameter using above-mentioned parameter, then enters step S12.
Step S12, again obtains the current parameter of hard disk 30 as the second reduced parameter at predetermined interval, then enters step S13.
Step S13, by the first reduced parameter and the second reduced parameter being contrasted, obtains comparative information, thus carries out reliability evaluation to hard disk 30, then enters done state.
The effect of embodiment and effect
Hard disk praameter acquisition methods involved by the present embodiment, operating terminal sends querying command to the hard disk controller of RAID card, each hard disk is inquired about by hard disk controller, and the querying command result responded by each hard disk transfers to operating terminal thus judges connecter type and the device id number of each hard disk, judge whether each hard disk supports SCSI agreement according to connecter type and device id number, operating terminal is to supporting that the hard disk of SCSI agreement sends parameter query order, hard disk response parameter querying command thus to operating terminal feedback parameter bag, by resolving and then obtain the parameter of hard disk to parameter bag, so, hard disk praameter acquisition methods of the present invention achieves the parameter directly obtaining the hard disk connected by RAID card on operating terminal.
In hard disk praameter acquisition methods in the present embodiment, owing to first reduced parameter of preserving and the second reduced parameter again obtained after predetermined interval being contrasted, therefore can obtain the reliability evaluation of hard disk.
Above-mentioned embodiment is preferred case of the present invention, is not used for limiting the scope of the invention.
In hard disk praameter acquisition methods in the present embodiment, hard disk is SAS hard disk, and at hard disk praameter acquisition methods provided by the present invention, involved hard disk can also be the SATA hard disc supporting SCSI agreement.
In hard disk praameter acquisition methods in the present embodiment, hard disk is two, at hard disk praameter acquisition methods provided by the present invention, is also applicable to plural hard disk.

Claims (4)

1. a hard disk praameter acquisition methods, is obtained respectively by the parameter of operating terminal pair at least two hard disks be connected with RAID card, it is characterized in that, specifically comprise the following steps:
(1) described operating terminal sends in the hard disk controller in hard disk querying command to described RAID card based on DCDB send mode;
(2) described hard disk controller inquires about connecter type and the device id number of each described hard disk based on described hard disk querying command;
(3) judge whether described hard disk supports SCSI agreement based on pre-defined rule by the connecter type of described hard disk that inquires and device id number;
(4) when being judged as YES, described operating terminal sends parameter query order to described hard disk based on described SCSI agreement by described RAID card;
(5) described hard disk responds described parameter query order thus to described operating terminal feedback parameter bag; And
(6) resolve described parameter bag thus obtain described parameter.
2. hard disk praameter querying method according to claim 1, is characterized in that
Wherein, described hard disk is SAS hard disk or the SATA hard disc supporting described SCSI agreement.
3. hard disk praameter querying method according to claim 1, is characterized in that:
Wherein, described parameter comprises: the recovered number of Hard Disk Defect number, disk read-write number of times, disk read-write and fatal error number.
4. hard disk praameter querying method according to claim 1, is characterized in that, further comprising the steps of:
(7) described operating terminal preserves described parameter, as the first reduced parameter.
(8) predetermined interval obtains described parameter again as the second reduced parameter.
(9) by described first reduced parameter and described second reduced parameter are contrasted, obtain comparative information, based on described comparative information, reliability evaluation is carried out to described hard disk.
CN201410817512.7A 2014-12-19 2014-12-19 Hard disk parameters acquiring method Pending CN104536857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410817512.7A CN104536857A (en) 2014-12-19 2014-12-19 Hard disk parameters acquiring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410817512.7A CN104536857A (en) 2014-12-19 2014-12-19 Hard disk parameters acquiring method

Publications (1)

Publication Number Publication Date
CN104536857A true CN104536857A (en) 2015-04-22

Family

ID=52852387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410817512.7A Pending CN104536857A (en) 2014-12-19 2014-12-19 Hard disk parameters acquiring method

Country Status (1)

Country Link
CN (1) CN104536857A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183388A (en) * 2015-09-14 2015-12-23 北京华青融天技术有限责任公司 Obtaining method, device and system for hardware physics serial number
CN108121629A (en) * 2018-01-11 2018-06-05 郑州云海信息技术有限公司 A kind of server hard disc parameter testing method
CN109324951A (en) * 2018-09-18 2019-02-12 郑州云海信息技术有限公司 The acquisition methods and device of hard disk information in server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060040067A (en) * 2004-11-04 2006-05-10 삼성전자주식회사 Method for optimalizing channel parameter of harddisk drive and apparatus thterfor
CN101727293A (en) * 2008-10-23 2010-06-09 成都市华为赛门铁克科技有限公司 Method, device and system for setting solid state disk (SSD) memory
CN102208204A (en) * 2011-05-25 2011-10-05 深圳宝德科技集团股份有限公司 Method and device for detecting hard disks
CN102568522A (en) * 2011-12-31 2012-07-11 曙光信息产业股份有限公司 Hardware performance test method and device
CN103189834A (en) * 2012-07-16 2013-07-03 华为技术有限公司 Method, apparatus and system for determining drive
CN103514078A (en) * 2012-06-28 2014-01-15 鸿富锦精密工业(深圳)有限公司 Hard disk monitoring system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060040067A (en) * 2004-11-04 2006-05-10 삼성전자주식회사 Method for optimalizing channel parameter of harddisk drive and apparatus thterfor
CN101727293A (en) * 2008-10-23 2010-06-09 成都市华为赛门铁克科技有限公司 Method, device and system for setting solid state disk (SSD) memory
CN102208204A (en) * 2011-05-25 2011-10-05 深圳宝德科技集团股份有限公司 Method and device for detecting hard disks
CN102568522A (en) * 2011-12-31 2012-07-11 曙光信息产业股份有限公司 Hardware performance test method and device
CN103514078A (en) * 2012-06-28 2014-01-15 鸿富锦精密工业(深圳)有限公司 Hard disk monitoring system
CN103189834A (en) * 2012-07-16 2013-07-03 华为技术有限公司 Method, apparatus and system for determining drive

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183388A (en) * 2015-09-14 2015-12-23 北京华青融天技术有限责任公司 Obtaining method, device and system for hardware physics serial number
CN105183388B (en) * 2015-09-14 2019-02-12 北京华青融天技术有限责任公司 A kind of acquisition methods, device and the system of hard disc physical sequence number
CN108121629A (en) * 2018-01-11 2018-06-05 郑州云海信息技术有限公司 A kind of server hard disc parameter testing method
CN109324951A (en) * 2018-09-18 2019-02-12 郑州云海信息技术有限公司 The acquisition methods and device of hard disk information in server

Similar Documents

Publication Publication Date Title
EP2638469B1 (en) Detection and handling of alua preferences and state transitions by host
US20130198562A1 (en) Method and system for cluster wide adaptive i/o scheduling by a multipathing driver
US8756355B2 (en) Methods and structure for configuring a Serial Attached SCSI domain via a Universal Serial Bus interface of a Serial Attached SCSI expander
CN103268183A (en) Processing method and device for information report
US20150113312A1 (en) System and method for detecting server removal from a cluster to enable fast failover of storage
US10848960B2 (en) Method and system for interaction between AP and modem, and storage medium
CN104536857A (en) Hard disk parameters acquiring method
CN104063284B (en) The method and apparatus running application program
CN107861691B (en) Load balancing method and device of multi-control storage system
EP3365766A1 (en) Proactively tuning a storage array
JP2005149283A (en) Information processing system, control method therefor, and program
CN105247618A (en) Method and device for hard disk drive to execute application code
KR20150139546A (en) Removable storage device identity and configuration information
CN107944010B (en) Method and device for reading and writing files in distributed file system
US20170192851A1 (en) System and method of using performance-maintaining commands for generating a backup of unsupported file systems
CN111200654A (en) Client request error processing method and device
CN106557385B (en) Data snapshot method and storage device
CN115240759A (en) Solid state disk detection method, device, equipment and storage medium
CN104717080A (en) Detection method and system for broadband dialing faults
US8954780B1 (en) Systems and methods for transferring input/output operations within computer clusters
KR102362699B1 (en) Method for providing a file management service using a plurality of storage devices and Apparatus thereof
CN106599046B (en) Writing method and device of distributed file system
CN108009071B (en) Hadoop cluster test method
US20150074301A1 (en) Host bus driver verifying apparatus, host bus verification system, and computer product
US10152498B2 (en) Providing storage technology information to improve database performance

Legal Events

Date Code Title Description
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150422

WD01 Invention patent application deemed withdrawn after publication