CN108984357A - A kind of hard disk localization method, device and computer readable storage medium - Google Patents

A kind of hard disk localization method, device and computer readable storage medium Download PDF

Info

Publication number
CN108984357A
CN108984357A CN201810775827.8A CN201810775827A CN108984357A CN 108984357 A CN108984357 A CN 108984357A CN 201810775827 A CN201810775827 A CN 201810775827A CN 108984357 A CN108984357 A CN 108984357A
Authority
CN
China
Prior art keywords
hard disk
drive
physical host
failure
faulty
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
CN201810775827.8A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810775827.8A priority Critical patent/CN108984357A/en
Publication of CN108984357A publication Critical patent/CN108984357A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a kind of hard disk localization method, device and computer readable storage mediums, comprising: physical host obtains the hard disk number for the hard disk being installed on itself;The hard disk number that judgement obtains is even number or odd number;If obtain hard disk number be even number, using dichotomy, and according to failure drive in the hard disk being installed on itself positioning failure hard disk.From the embodiment of the present invention, since physical host uses the positioning that dichotomy carries out faulty hard disk to the hard disk being installed on itself, therefore it avoids and connects one piece of complicated processes for intercutting hard disk for one piece in a manual manner, to realize the automatic positioning of faulty hard disk, and dramatically improve the location efficiency of faulty hard disk.

Description

A kind of hard disk localization method, device and computer readable storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of disk localization method, device and computer-readable deposit Storage media.
Background technique
Virtual storage area networks (Virtual Storage Area Network, VSAN) are one kind with server virtual It is developed based on change solution vSphere kernel, expansible distributed storage architecture.VSAN is in authentication test process In often will appear hard disk failure, thus generate include failure drive error information.
In the related technology, when needing according to failure drive positioning failure hard disk, often first hard disk is arranged under record system Then table successively plugs each piece of hard disk and restarts host, hard disk list changes under observing system, is out of order with final positioning hard Disk.
However, very expending people since this method needs plug hard disk one by one in a manual fashion Power cost and time cost.
Summary of the invention
In order to solve the above technical problem, the present invention provides a kind of hard disk localization method, device and computer-readable storages Medium, can be realized the automatic positioning of faulty hard disk, and improve the location efficiency of faulty hard disk.
In order to reach the object of the invention, the present invention provides a kind of hard disk localization methods, comprising:
Physical host obtains the hard disk number for the hard disk being installed on itself;
The hard disk number that the physical host judgement obtains is even number or odd number;
If the hard disk number obtained is even number, the physical host utilizes dichotomy, and according to failure drive in the peace Loaded on positioning failure hard disk in the hard disk on itself.
If the hard disk number obtained is odd number, further includes:
The physical host randomly chooses a hard disk from the hard disk being installed on itself;
The physical host judges whether the hard disk of selection is the faulty hard disk;
If the selected hard disk is not the faulty hard disk, the physical host utilizes the dichotomy, and according to The failure drive information it is described be installed on itself and in addition to the selected hard disk in remaining hard disk positioning described in Faulty hard disk.
The physical host utilizes dichotomy, and positioning failure is hard in the hard disk being installed on itself according to failure drive Disk, comprising:
The hard disk being installed on itself is divided into two groups by the physical host;
The physical host reads the drive of any one group hard disc;
It whether there is the failure drive in the drive that the physical host judgement obtains;
If there are the failure drive in the drive obtained, the physical host is by hard disk corresponding with the drive of acquisition It is divided into two groups, and reads the drive of any one group hard disc, until navigates to the faulty hard disk;
If the failure drive is not present in the drive obtained, the physical host will be corresponding with another group of drive hard Disk is divided into two groups, and reads the drive of any one group hard disc, until navigating to the failure drive.
The physical host judges whether the hard disk of selection is faulty hard disk, comprising:
The physical host obtains the drive of the selected hard disk;
The physical host judges whether the drive obtained and the failure drive are consistent;
If the drive obtained is consistent with the failure drive, determine that the selected hard disk is the faulty hard disk;
If the drive and the failure drive that obtain are inconsistent, determining the selected hard disk not is that the failure is hard Disk.
The physical host utilizes dichotomy, and the hard disk according to failure drive information on being installed on itself and except selection Positioning failure hard disk in remaining hard disk in addition, comprising:
The physical host is installed on that itself is upper and remaining hard disk is divided into two groups in addition to the hard disk of selection for described;
The physical host reads the drive of any one group hard disc;
It whether there is the failure drive in the drive that the physical host judgement obtains;
If there are the failure drive in the drive obtained, the physical host is by hard disk corresponding with the drive of acquisition It is divided into two groups, and reads the drive of any one group hard disc, until navigates to the faulty hard disk.
The present invention also provides a kind of physical hosts, comprising:
Module is obtained, for obtaining the hard disk number for the hard disk being installed on physical host;
Judgment module, for judging that the hard disk number obtained is even number or odd number;
Processing module, if the hard disk number for acquisition is even number, using dichotomy, and according to failure drive in the peace Loaded on positioning failure hard disk in the hard disk on physical host.
If the hard disk number obtained is odd number,
The processing module is also used to randomly choose a hard disk from the hard disk being installed on physical host;
The judgment module is also used to judge whether the hard disk of selection is the faulty hard disk;
The processing module, if being also used to the selected hard disk not is the faulty hard disk, using the dichotomy, And it is installed on physical host and remaining hard disk in addition to the selected hard disk according to the failure drive information described The middle positioning faulty hard disk.
The processing module is specifically used for:
The hard disk being installed on physical host is divided into two groups;
Read the drive of any one group hard disc;
Judge to whether there is the failure drive in the drive obtained;
If hard disk corresponding with the drive of acquisition is divided into two groups there are the failure drive in the drive obtained, and The drive for reading any one group hard disc, until navigating to the faulty hard disk;
If the failure drive is not present in the drive obtained, hard disk corresponding with another group of drive is divided into two groups, And the drive of any one group hard disc is read, until navigating to the failure drive.
The present invention also provides a kind of hard disk positioning devices, comprising: processor and memory, wherein store in memory There is the following instruction being executed by processor:
Obtain the hard disk number for the hard disk being installed on physical host;
The hard disk number that judgement obtains is even number or odd number;
If the hard disk number obtained is even number, physical host is installed on described using dichotomy, and according to failure drive On hard disk in positioning failure hard disk.
The present invention also provides a kind of computer readable storage medium, it is executable that computer is stored on the storage medium Instruction, the computer executable instructions are for executing following steps:
Obtain the hard disk number for the hard disk being installed on physical host;
The hard disk number that judgement obtains is even number or odd number;
If the hard disk number obtained is even number, physical host is installed on described using dichotomy, and according to failure drive On hard disk in positioning failure hard disk.
Compared with prior art, the present invention includes at least: physical host obtains the hard disk number for the hard disk being installed on itself; The hard disk number that judgement obtains is even number or odd number;If the hard disk number obtained is even number, using dichotomy, and according to faulty disk Symbol positioning failure hard disk in the hard disk being installed on itself.From technical solution provided by the invention as it can be seen that due to physical host The positioning of faulty hard disk is carried out to the hard disk being installed on itself using dichotomy, therefore avoids and connects for one piece in a manual manner One piece is intercutted the complicated processes of hard disk, to realize the automatic positioning of faulty hard disk, and dramatically improves failure The location efficiency of hard disk.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is a kind of flow diagram of hard disk localization method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram for testing environment provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of interface display of disk identifier of hard disk provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of physical host provided in an embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature can mutual any combination.
The embodiment of the present invention provides a kind of hard disk localization method, as shown in Figure 1, this method comprises:
Step 101, physical host obtain the hard disk number for the hard disk being installed on itself.
The hard disk number that step 102, physical host judgement obtain is even number or odd number.
If step 103, the hard disk number obtained are even numbers, physical host utilizes dichotomy, and is being pacified according to failure drive Loaded on positioning failure hard disk in the hard disk on itself.
Hard disk localization method provided by the embodiment of the present invention, physical host obtain the hard disk for the hard disk being installed on itself Number;The hard disk number that judgement obtains is even number or odd number;If the hard disk number obtained is even number, using dichotomy, and according to event Hinder drive positioning failure hard disk in the hard disk being installed on itself.From technical solution provided by the invention as it can be seen that due to physics Host uses dichotomy and carries out the positioning of faulty hard disk to the hard disk that is installed on itself, therefore avoids in a manual manner one Block connects one piece and intercuts the complicated processes of hard disk, to realize the automatic positioning of faulty hard disk, and dramatically improves The location efficiency of faulty hard disk.
Optionally, if the hard disk number obtained is odd number, further includes:
Step 104, physical host randomly choose a hard disk from the hard disk being installed on itself.
Step 105, physical host judge whether the hard disk of selection is faulty hard disk.
If the hard disk of step 106, selection is not faulty hard disk, physical host utilizes dichotomy, and according to failure drive Information positioning failure hard disk in remaining hard disk on being installed on itself and in addition to the hard disk of selection.
Optionally, physical host utilizes dichotomy, and positions event in the hard disk being installed on itself according to failure drive Hinder hard disk, comprising:
Step 103a, the hard disk being installed on itself is divided into two groups by physical host.
Step 103b, physical host reads the drive of any one group hard disc.
Step 103c, it whether there is failure drive in the drive that physical host judgement obtains.
If step 103d, there are failure drive in the drive obtained, physical host will be corresponding with the drive of acquisition hard Disk is divided into two groups, and reads the drive of any one group hard disc, until navigating to faulty hard disk.
Specifically, hard disk corresponding with the drive of acquisition is divided into two groups by physical host, and read any one group hard disc The corresponding hard disk of this group of drive newly obtained is being divided by drive again if there are failure drives in the drive newly obtained Two groups are continued to search, if failure drive is not present in the drive newly obtained, read the drive of another group hard disc, then It is divided into two groups in the corresponding hard disk of this group of drive newly obtained to be continued to search.
It should be noted that all using similar step 104,105 and if the hard disk quantity of hard disk to be grouped is odd number 106 treatment process randomly chooses a hard disk from wait be grouped in hard disk, then judges whether the hard disk of selection is that failure is hard Disk, and then be grouped again after the hard disk for determining selection is not faulty hard disk.
If failure drive step 103e, is not present in the drive obtained, physical host will be corresponding with another group of drive Hard disk is divided into two groups, and reads the drive of any one group hard disc, until navigating to failure drive.
Optionally, physical host judges whether the hard disk of selection is faulty hard disk, comprising:
Step 105a, physical host obtains the drive of the hard disk of selection.
Step 105b, physical host judges whether the drive obtained and failure drive are consistent.
If drive step 105c, obtained is consistent with failure drive, physical host determines that the hard disk of selection is that failure is hard Disk.
If the drive and failure drive that step 105d, obtain are inconsistent, physical host determines that the hard disk of selection is not event Hinder hard disk.
Optionally, physical host utilizes dichotomy, and according to failure drive information on being installed on itself and except selection Positioning failure hard disk in remaining hard disk other than hard disk, comprising:
Step 106a, physical host will be installed on itself and remaining hard disk is divided into two groups in addition to the hard disk of selection.
Step 106b, physical host reads the drive of any one group hard disc.
Step 106c, it whether there is failure drive in the drive that physical host judgement obtains.
If step 106d, there are failure drive in the drive obtained, physical host will be corresponding with the drive of acquisition hard Disk is divided into two groups, and reads the drive of any one group hard disc, until navigating to faulty hard disk.
Illustrate the hard disk localization method of the embodiment of the present invention in specific VSAN test environment below, wherein VSAN is surveyed Test ring border is made of three hosts, needs to install muti-piece hard disk again on every host, and it is vSAN that the hard disk on host, which cooperates, Memory capacity and read-write cache are provided, VSAN tests the schematic diagram of environment as shown in Fig. 2, completing test environment according to topological diagram It builds.Start to execute test, test when the error occurs, checks the relevant log information of test, will appear failure letter in log Breath, such as:
Disk naa.50000ae0fe564start FIO test.
Diskis not in healty state for 120seconds.
By the above fault message it is recognised that it is this block hard disk of naa.50000ae0fe564 that faulty hard disk, which is drive, therefore The position fixing process for hindering hard disk is as follows:
First test host on navigate to/vmfs/devices/disks catalogue under, execute ls order, can show at this time Disk identifier of hard disk all on host, schematic diagram of interface display are as shown in Figure 3 out.It can be located at firmly on read test host at this time The hard disk of the first half on disk backboard;It searches and whether within this range to need the hard disk that positions, if within this range, after resuming studies Take the hard disk of the first half of this range;If not in this range, on read test host hard drive backboard later half hard disk, Faulty hard disk is searched whether within this range.By constantly executing this process, until finding faulty hard disk.If hard disk is total When amount is n and n is odd number, then first selects one piece of hard disk and judge whether the hard disk is faulty hard disk, if it is determined that be not failure Hard disk, then judgement is grouped in n-1 faulty hard disk.
Detailed process can be designed as executable script, as follows:
The embodiment of the present invention also provides a kind of physical host, as shown in figure 4, the physical host 2 includes:
Module 21 is obtained, for obtaining the hard disk number for the hard disk being installed on physical host.
Judgment module 22, for judging that the hard disk number obtained is even number or odd number.
Processing module 23 is being installed if the hard disk number for acquisition is even number using dichotomy, and according to failure drive The positioning failure hard disk in the hard disk on physical host.
Optionally, if the hard disk number obtained is odd number, processing module 23 is also used to hard on physical host from being installed on A hard disk is randomly choosed in disk.
Judgment module 22 is also used to judge whether the hard disk of selection is faulty hard disk.
Processing module 23, if the hard disk for being also used to select is not faulty hard disk, using dichotomy, and according to failure drive Information positioning failure hard disk in remaining hard disk on being installed on physical host and in addition to the hard disk of selection.
Optionally, processing module 23 is specifically used for:
The hard disk being installed on physical host is divided into two groups.
Read the drive of any one group hard disc.
Judge to whether there is failure drive in the drive obtained.
If in the drive obtained, there are failure drives, hard disk corresponding with the drive of acquisition are divided into two groups, and read The drive of any one group hard disc, until navigating to faulty hard disk.
If failure drive is not present in the drive obtained, hard disk corresponding with another group of drive is divided into two groups, and read The drive for taking any one group hard disc, until navigating to failure drive.
Optionally, judgment module 22 is specifically used for:
Obtain the drive of the hard disk of selection.
Judge whether the drive obtained and failure drive are consistent.
If the drive obtained is consistent with failure drive, determine that the hard disk of selection is faulty hard disk.
If the drive and failure drive that obtain are inconsistent, determine that the hard disk of selection is not faulty hard disk.
Optionally, processing module 23 is specifically used for:
It will be installed on physical host and remaining hard disk be divided into two groups in addition to the hard disk of selection;
Read the drive of any one group hard disc.
Judge to whether there is failure drive in the drive obtained.
If in the drive obtained, there are failure drives, hard disk corresponding with the drive of acquisition are divided into two groups, and read The drive of any one group hard disc, until navigating to faulty hard disk.
Physical host provided by the embodiment of the present invention obtains the hard disk number for the hard disk being installed on itself;Judgement obtains Hard disk number be even number or odd number;If the hard disk number obtained is even number, installed using dichotomy, and according to failure drive The positioning failure hard disk in the hard disk on itself.From technical solution provided by the invention as it can be seen that since physical host uses two Point-score carries out the positioning of faulty hard disk to the hard disk that is installed on itself, therefore avoids and connect one piece in a manual manner and intercut for one piece The complicated processes of hard disk to realize the automatic positioning of faulty hard disk, and dramatically improve determining for faulty hard disk Position efficiency.
In practical applications, the acquisition module 21, judgment module 22 and processing module 23 can be by being located at physical host In central processing unit (Central Processing Unit, CPU), microprocessor (Micro Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or field programmable gate array (Field Programmable Gate Array, FPGA) etc. realize.
The embodiment of the present invention also provides a kind of hard disk positioning device, including memory and processor, wherein deposits in memory Contain the following instruction being executed by processor:
Obtain the hard disk number for the hard disk being installed on physical host.
The hard disk number that judgement obtains is even number or odd number.
If the hard disk number obtained is even number, using dichotomy, and according to failure drive on being installed on physical host Positioning failure hard disk in hard disk.
Optionally, if the hard disk number obtained is odd number, the following finger being executed by processor also is stored in memory It enables:
A hard disk is randomly choosed from the hard disk being installed on physical host.
Whether the hard disk for judging selection is faulty hard disk.
If the hard disk of selection is not faulty hard disk, physics is being installed on using dichotomy, and according to failure drive information The positioning failure hard disk in remaining hard disk on host and in addition to the hard disk of selection.
Optionally, the following instruction being executed by processor specifically is stored in memory:
The hard disk being installed on physical host is divided into two groups.
Read the drive of any one group hard disc.
Judge to whether there is failure drive in the drive obtained.
If in the drive obtained, there are failure drives, hard disk corresponding with the drive of acquisition are divided into two groups, and read The drive of any one group hard disc, until navigating to faulty hard disk.
If failure drive is not present in the drive obtained, hard disk corresponding with another group of drive is divided into two groups, and read The drive for taking any one group hard disc, until navigating to failure drive.
Optionally, the following instruction being executed by processor specifically is stored in memory:
Obtain the drive of the hard disk of selection.
Judge whether the drive obtained and failure drive are consistent.
If the drive obtained is consistent with failure drive, determine that the hard disk of selection is faulty hard disk.
If the drive and failure drive that obtain are inconsistent, determine that the hard disk of selection is not faulty hard disk.
Optionally, the following instruction being executed by processor specifically is stored in memory:
It will be installed on physical host and remaining hard disk be divided into two groups in addition to the hard disk of selection.
Read the drive of any one group hard disc.
Judge to whether there is failure drive in the drive obtained.
If in the drive obtained, there are failure drives, hard disk corresponding with the drive of acquisition are divided into two groups, and read The drive of any one group hard disc, until navigating to faulty hard disk.
The embodiment of the present invention also provides a kind of computer readable storage medium, and it is executable that computer is stored on storage medium Instruction, computer executable instructions are for executing following steps:
Obtain the hard disk number for the hard disk being installed on physical host.
The hard disk number that judgement obtains is even number or odd number.
If the hard disk number obtained is even number, using dichotomy, and according to failure drive on being installed on physical host Positioning failure hard disk in hard disk.
Optionally, if the hard disk number obtained is odd number, computer executable instructions are also used to execute following steps:
A hard disk is randomly choosed from the hard disk being installed on physical host.
Whether the hard disk for judging selection is faulty hard disk.
If the hard disk of selection is not faulty hard disk, physics is being installed on using dichotomy, and according to failure drive information The positioning failure hard disk in remaining hard disk on host and in addition to the hard disk of selection.
Optionally, computer executable instructions are specifically used for executing following steps:
The hard disk being installed on physical host is divided into two groups.
Read the drive of any one group hard disc.
Judge to whether there is failure drive in the drive obtained.
If in the drive obtained, there are failure drives, hard disk corresponding with the drive of acquisition are divided into two groups, and read The drive of any one group hard disc, until navigating to faulty hard disk.
If failure drive is not present in the drive obtained, hard disk corresponding with another group of drive is divided into two groups, and read The drive for taking any one group hard disc, until navigating to failure drive.
Optionally, computer executable instructions are specifically used for executing following steps:
Obtain the drive of the hard disk of selection.
Judge whether the drive obtained and failure drive are consistent.
If the drive obtained is consistent with failure drive, determine that the hard disk of selection is faulty hard disk.
If the drive and failure drive that obtain are inconsistent, determine that the hard disk of selection is not faulty hard disk.
Optionally, computer executable instructions are specifically used for executing following steps:
It will be installed on physical host and remaining hard disk be divided into two groups in addition to the hard disk of selection.
Read the drive of any one group hard disc.
Judge to whether there is failure drive in the drive obtained.
If in the drive obtained, there are failure drives, hard disk corresponding with the drive of acquisition are divided into two groups, and read The drive of any one group hard disc, until navigating to faulty hard disk.
Although disclosed herein embodiment it is as above, the content only for ease of understanding the present invention and use Embodiment is not intended to limit the invention.Technical staff in any fields of the present invention is taken off not departing from the present invention Under the premise of the spirit and scope of dew, any modification and variation, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (10)

1. a kind of hard disk localization method characterized by comprising
Physical host obtains the hard disk number for the hard disk being installed on itself;
The hard disk number that the physical host judgement obtains is even number or odd number;
If the hard disk number obtained is even number, the physical host utilizes dichotomy, and is installed on according to failure drive described Positioning failure hard disk in hard disk on itself.
2. hard disk localization method according to claim 1, which is characterized in that if the hard disk number obtained is odd number, also wrap It includes:
The physical host randomly chooses a hard disk from the hard disk being installed on itself;
The physical host judges whether the hard disk of selection is the faulty hard disk;
If the selected hard disk is not the faulty hard disk, the physical host utilizes the dichotomy, and according to described Failure drive information is installed on itself described and positions the failure in remaining hard disk in addition to the selected hard disk Hard disk.
3. hard disk localization method according to claim 1, which is characterized in that the physical host utilizes dichotomy, and root According to failure drive in the hard disk being installed on itself positioning failure hard disk, comprising:
The hard disk being installed on itself is divided into two groups by the physical host;
The physical host reads the drive of any one group hard disc;
It whether there is the failure drive in the drive that the physical host judgement obtains;
If hard disk corresponding with the drive of acquisition is divided by the physical host there are the failure drive in the drive obtained Two groups, and the drive of any one group hard disc is read, until navigating to the faulty hard disk;
If the failure drive is not present in the drive obtained, the physical host will hard disk corresponding with another group of drive point It is two groups, and reads the drive of any one group hard disc, until navigates to the failure drive.
4. hard disk localization method according to claim 2, which is characterized in that the physical host judges that the hard disk of selection is No is faulty hard disk, comprising:
The physical host obtains the drive of the selected hard disk;
The physical host judges whether the drive obtained and the failure drive are consistent;
If the drive obtained is consistent with the failure drive, the physical host determines that the selected hard disk is the failure Hard disk;
If the drive and the failure drive that obtain are inconsistent, it is described that the physical host, which determines the selected hard disk not, Faulty hard disk.
5. hard disk localization method according to claim 2, which is characterized in that the physical host utilizes dichotomy, and root According to failure drive information on being installed on itself and in addition to the hard disk of selection positioning failure hard disk in remaining hard disk, comprising:
The physical host is installed on that itself is upper and remaining hard disk is divided into two groups in addition to the hard disk of selection for described;
The physical host reads the drive of any one group hard disc;
It whether there is the failure drive in the drive that the physical host judgement obtains;
If hard disk corresponding with the drive of acquisition is divided by the physical host there are the failure drive in the drive obtained Two groups, and the drive of any one group hard disc is read, until navigating to the faulty hard disk.
6. a kind of physical host characterized by comprising
Module is obtained, for obtaining the hard disk number for the hard disk being installed on physical host;
Judgment module, for judging that the hard disk number obtained is even number or odd number;
Processing module is installed on using dichotomy, and according to failure drive described if the hard disk number for acquisition is even number Positioning failure hard disk in hard disk on the physical host.
7. physical host according to claim 6, which is characterized in that if the hard disk number obtained is odd number,
The processing module is also used to randomly choose a hard disk from the hard disk being installed on physical host;
The judgment module is also used to judge whether the hard disk of selection is the faulty hard disk;
The processing module, if being also used to the selected hard disk not is the faulty hard disk, using the dichotomy, and root According to the failure drive information it is described be installed on physical host and in addition to the selected hard disk in remaining hard disk it is fixed The position faulty hard disk.
8. physical host according to claim 6, which is characterized in that the processing module is specifically used for:
The hard disk being installed on physical host is divided into two groups;
Read the drive of any one group hard disc;
Judge to whether there is the failure drive in the drive obtained;
If in the drive obtained, there are the failure drives, hard disk corresponding with the drive of acquisition are divided into two groups, and read The drive of any one group hard disc, until navigating to the faulty hard disk;
If the failure drive is not present in the drive obtained, hard disk corresponding with another group of drive is divided into two groups, and read The drive for taking any one group hard disc, until navigating to the failure drive.
9. a kind of hard disk positioning device characterized by comprising processor and memory, wherein be stored in memory following The instruction that can be executed by processor:
Obtain the hard disk number for the hard disk being installed on physical host;
The hard disk number that judgement obtains is even number or odd number;
If the hard disk number obtained is even number, it is installed on physical host using dichotomy, and according to failure drive described Positioning failure hard disk in hard disk.
10. a kind of computer readable storage medium, which is characterized in that be stored with the executable finger of computer on the storage medium It enables, the computer executable instructions are for executing following steps:
Obtain the hard disk number for the hard disk being installed on physical host;
The hard disk number that judgement obtains is even number or odd number;
If the hard disk number obtained is even number, it is installed on physical host using dichotomy, and according to failure drive described Positioning failure hard disk in hard disk.
CN201810775827.8A 2018-07-16 2018-07-16 A kind of hard disk localization method, device and computer readable storage medium Pending CN108984357A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810775827.8A CN108984357A (en) 2018-07-16 2018-07-16 A kind of hard disk localization method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810775827.8A CN108984357A (en) 2018-07-16 2018-07-16 A kind of hard disk localization method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108984357A true CN108984357A (en) 2018-12-11

Family

ID=64549080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810775827.8A Pending CN108984357A (en) 2018-07-16 2018-07-16 A kind of hard disk localization method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108984357A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112349335A (en) * 2019-08-08 2021-02-09 佛山市顺德区顺达电脑厂有限公司 Method for locating hard disk physical installation position of cluster storage system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306244A (en) * 2011-07-29 2012-01-04 北京航星机器制造公司 Fault eliminating method based on evaluation of detecting points
CN102331066A (en) * 2011-05-25 2012-01-25 宁波奥克斯电气有限公司 Method for investigating indoor and outdoor communication fault points of VRV (Vacuum Reducer Valve) multi-connected air-condition unit
CN102968381A (en) * 2012-11-19 2013-03-13 浪潮电子信息产业股份有限公司 Method for improving snapshot performance by using solid state disk
US20130325254A1 (en) * 2012-05-30 2013-12-05 Universite Bordeaux 1 Method and device for detecting oscilatory failures in a position servocontrol subsystem of an aircraft control surface
CN103559135A (en) * 2013-11-15 2014-02-05 南京大学 Method and device for determining system failure mode
US9373416B2 (en) * 2013-08-23 2016-06-21 Nvidia Corporation Method and system for testing a memory
CN106325845A (en) * 2015-06-30 2017-01-11 四川效率源信息安全技术有限责任公司 Method for repairing front part normal and rear part abnormal fault of Seagate hard disk sector
CN107577545A (en) * 2016-07-05 2018-01-12 北京金山云网络技术有限公司 A kind of failed disk detection and restorative procedure and device
CN107943723A (en) * 2017-11-23 2018-04-20 郑州云海信息技术有限公司 A kind of hard disc of computer recognition methods and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102331066A (en) * 2011-05-25 2012-01-25 宁波奥克斯电气有限公司 Method for investigating indoor and outdoor communication fault points of VRV (Vacuum Reducer Valve) multi-connected air-condition unit
CN102306244A (en) * 2011-07-29 2012-01-04 北京航星机器制造公司 Fault eliminating method based on evaluation of detecting points
US20130325254A1 (en) * 2012-05-30 2013-12-05 Universite Bordeaux 1 Method and device for detecting oscilatory failures in a position servocontrol subsystem of an aircraft control surface
CN102968381A (en) * 2012-11-19 2013-03-13 浪潮电子信息产业股份有限公司 Method for improving snapshot performance by using solid state disk
US9373416B2 (en) * 2013-08-23 2016-06-21 Nvidia Corporation Method and system for testing a memory
CN103559135A (en) * 2013-11-15 2014-02-05 南京大学 Method and device for determining system failure mode
CN106325845A (en) * 2015-06-30 2017-01-11 四川效率源信息安全技术有限责任公司 Method for repairing front part normal and rear part abnormal fault of Seagate hard disk sector
CN107577545A (en) * 2016-07-05 2018-01-12 北京金山云网络技术有限公司 A kind of failed disk detection and restorative procedure and device
CN107943723A (en) * 2017-11-23 2018-04-20 郑州云海信息技术有限公司 A kind of hard disc of computer recognition methods and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112349335A (en) * 2019-08-08 2021-02-09 佛山市顺德区顺达电脑厂有限公司 Method for locating hard disk physical installation position of cluster storage system
CN112349335B (en) * 2019-08-08 2024-05-28 佛山市顺德区顺达电脑厂有限公司 Method for locating physical installation position of hard disk in cluster storage system

Similar Documents

Publication Publication Date Title
US10025695B2 (en) Enhancing GUI automation testing using video
US20140236916A1 (en) System and method for geolocation of social media posts
US20160196342A1 (en) Plagiarism Document Detection System Based on Synonym Dictionary and Automatic Reference Citation Mark Attaching System
CN104881443B (en) A kind of method and system of the migrating data between database
JP2014519097A (en) Method and system for recommending items
CN109918226A (en) A kind of silence error-detecting method, device and storage medium
CN108875061A (en) A kind of conformance test method and relevant apparatus of distributed file system
US9311644B2 (en) Item listing categorization system
CN109710709A (en) Interest point data processing method, device, electronic equipment and storage medium
US20160034861A1 (en) Method and apparatus of controlling network payment
CN110018920A (en) A kind of detection method, device and the equipment of page presentation exception
US20160162132A1 (en) Dynamically organizing applications based on a calendar event
CN107943723A (en) A kind of hard disc of computer recognition methods and system
US7603372B1 (en) Modeling file system operation streams
CN107728983A (en) Double screen operating method and equipment
CN110825569A (en) Hard disk stability test method and test system
CN106484719A (en) A kind of method of extended mobile phone storage and terminal
US20190188100A1 (en) Site recovery solution in a multi-tier storage environment
JP4579669B2 (en) Reliability verification program and reliability verification method
CN108984357A (en) A kind of hard disk localization method, device and computer readable storage medium
CN106528830B (en) A kind of method and apparatus for restoring file index catalogue
US20160364318A1 (en) Enhanced bug resolution
CN107273251A (en) A kind of method of testing of the racks of Rack in a production environment JBOD storages
CN104407806B (en) The amending method and device of RAID group hard disc information
CN104298739B (en) A kind of data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181211