CN102866933A - Method for judging type of redundant array of independent disks (RAID) - Google Patents

Method for judging type of redundant array of independent disks (RAID) Download PDF

Info

Publication number
CN102866933A
CN102866933A CN201210321888XA CN201210321888A CN102866933A CN 102866933 A CN102866933 A CN 102866933A CN 201210321888X A CN201210321888X A CN 201210321888XA CN 201210321888 A CN201210321888 A CN 201210321888A CN 102866933 A CN102866933 A CN 102866933A
Authority
CN
China
Prior art keywords
raid
data
sector
hard disk
mft
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210321888XA
Other languages
Chinese (zh)
Other versions
CN102866933B (en
Inventor
高志鹏
阙永明
范鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Meiya Pico Information Co Ltd
Original Assignee
Xiamen Meiya Pico Information 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 Xiamen Meiya Pico Information Co Ltd filed Critical Xiamen Meiya Pico Information Co Ltd
Priority to CN201210321888.XA priority Critical patent/CN102866933B/en
Publication of CN102866933A publication Critical patent/CN102866933A/en
Application granted granted Critical
Publication of CN102866933B publication Critical patent/CN102866933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a method for judging a type of a redundant array of independent disks (RAID). The method comprises the following steps of: 1) reading data of same addresses in all hard disks in an RAID system; and 2) determining the type of the RAID according to relations between the data of the same addresses of the hard disks in various RAID types. The method has the beneficial effects that the blank of a technology for judging the type of the RAID in the field is filled, and the shortcomings of some types of RAID parameter analysis software are greatly overcome. By the technical scheme, the intelligence of an RAID recombination technology can be greatly improved, the time is shortened, the cost is reduced, and pressure of engineer is reduced; and more importantly, relatively high loss caused by wrong information supplied by a client can be avoided. Above all, the method is an important complementation for the blank technology in the field; and furthermore, multiple aspects of superiorities are realized, and the method has a broad market prospect.

Description

A kind of RAID type judgement method
Technical field
The present invention relates to the Computer Storage field, more particularly, relate to a kind of RAID type judgement method.
Background technology
The RAID restructuring belongs to a kind of of high-end data recovery technique, involves a wide range of knowledge, and is with high content of technology.But because the labor intensive resource is numerous, operation is loaded down with trivial details, cost is very high, and it is also considerable to charge.
In the RAID restructuring, analysis is most important link, and the RAID that notes our indication is for arrays commonly used such as RAID0, RAID1, RAID5, RAID6, JBOD.
Principle from RAID, its essence is to utilize many disks concurrent cooperation, reach the purpose of dilatation and increase handling capacity, so, RAID must have the data allocations mechanism of a cover very complex, should guarantee that data are written in the assigned address of designated disk according to the situation of agreement regulation, guarantee that again this agreement can not cause the loss of performance, even to play Optimal performance, strengthen the effect of security.
When the RAID system crash, its Organization of Data agreement of depending on for existence has not just existed.The abstraction interface of operating system identification RAID also will be disintegrated thereupon like this.RAID has been divided into one by one disk unit by a storage integral body this moment.No matter we are from any disk angle, and the data of the inside are all meaningless.
RAID restructuring is exactly according to the algorithm described in the RAID agreement, and utilize process simulation RAID style, thereby recover a kind of effective means of data, be a very important ring during disaster is saved.
Because the RAID kind is numerous, greatly increased and decreased the difficulty of automated analysis, so up to now, Manual analysis is still the mainstream technology in the RAID restructuring subject.
Even if having the software of automatic analysis, still have a subject matter to solve, that is exactly the identification of RAID kind, 80% RAID data are recovered the RAID type that the client did not know or judged mistakenly own storage system according to statistics, recover the slip-stick artist to data and cause misleading, greatly increased the analysis difficulty.
Chinese invention patent application 201010140518.7 discloses the method for a kind of remotely intelligently monitoring and analyzing RAID faults, adopt the distributed data processing pattern, local real time monitoring and the duty of predicting RAID, when sending now when unusual, local computer will be relevant with RAID parameter and the duty of RAID be sent to the Web service end, determined rank and the corresponding processing scheme of alarm by serve end program, and the fault solution that warning information and system produce automatically in time informed the user, the invention has the beneficial effects as follows: RAID breaks down or in time informs the user when unusual, the loss of avoiding factor data to lose bringing.For the user provides long-range intelligentized fault diagnosis and issue-resolution, help the user to locate fast fault, and effectively deal with problems rapidly.
The technical scheme of above-mentioned patented claim is to be based upon the basic enterprising line operate of determining the RAID type, if in the situation of indeterminate fault RAID type, carry out recovery operation, mislead easily data recovery slip-stick artist and do the judgement that makes mistake, and cause temporal waste.If attempt successively the various types of RAID of hypothesis, then need a large amount of time to operate.Particularly for the RAID of large buffer memory, recovering data often needs tens hours, perhaps up to a hundred hours.Attempt successively all kinds, the time that waste is a large amount of, and infeasible.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of robotization identification that can realize the RAID type is provided, and speed is exceedingly fast, can satisfy the RAID type judgement method that most of data are recovered practitioner's demands.
Technical scheme of the present invention is as follows:
A kind of RAID type judgement method, step is as follows:
1) reads the data of each hard disk identical address in the RAID system;
2) according in the various RAID types, the relation between the data of each identical location of hard disk is determined the RAID type.
As preferably, step 1) is specially: extract any hard disk in the RAID system, search non-full 0 sector more than, recording address also reads described sector to internal memory; In all the other hard disks, search the non-full 0 sector of identical address to internal memory, be kept at respectively regional S1, S2 in the internal memory, S3 ..., Sn.
As preferably, the scope of searching non-full 0 sector is whole disk size zone.
As preferably, step 2) in, if S1 XOR S2 XOR S3 ..., equal Sn, determine that then current RAID type is RAID5.
As preferably, step 1) is specially: search the MFT (MFT) in the hard disk, and the address of the file record array in the record MFT (MFT), the data of the address of file reading record array are to internal memory on each hard disk.
As preferably, the MFT (MFT) of searching in the hard disk is specially: extract any hard disk in the RAID system, four bytes of search 0x460x490x4C0x45, then search for continuously the zone of 32KB, if front four bytes of every KB are 0x460x490x4C0x45 in the zone of described 32KB, then stop search the record current address; The data of the file record array that reads are 1KB.
As preferably, step 2) be specially:
2.1) 0x2C skew place in the data that read obtains a unsigned int variable, be designated as a, b, c, d,
2.2) described integer variable is carried out the ascending power ordering;
2.3) judge after the ordering the unsigned int data whether be equal difference, and judge that whether it poorly satisfies 2 n power, if satisfied, determines that this RAID type is RAID0.
As preferably, step 2) in, get rid of S1, S2, S3 ..., a zone among the Sn data, remainder data is carried out XOR, if except other results in front data successively XOR of last data equal last data, and the data of getting rid of satisfy the Reed Solomon Coding computing of other data, determine that then this RAID type is RAID6.
As preferably, step 1) is specially: read at random a non-full 0 sector that above address is identical on each hard disk.
As preferably, if the non-full 0 sector of the identical address of each hard disk is fully equal, then this RAID type is RAID1.
As preferably, step 1) is specially: parallel search master guiding (MBR) sector on each hard disk, if find main guiding (MBR) sector at certain hard disk, then establishing this hard disk is 1 dialer of RAID system.
As preferably, step 2) be specially:
2.1) guide the 0x01D6 in (MBR) sector to extract 32 integers as the start address of extended partition from main;
2.2) guide the 0x01C6 of (EBR) sector to extract 32 integers as the start address of the DBR sector of first subregion from the extended partition of extended partition;
2.3) obtain the start address of its MFT (MFT) at the 0x30 place of dos boot record (DBR) sector of described subregion;
2.4) read successively MFT (MFT) record, if 32 integers that the 0x2C place of each record extracts are continuous integral number, this RAID type is JBOD.
Beneficial effect of the present invention is as follows:
RAID type judgement method of the present invention has been filled up in this area, about the blank of the technology of the judgement of RAID type, has greatly remedied the deficiency of some RAID parameter analysis software.
Adopt technical solutions according to the invention, can greatly increase the intelligent of RAID recombinant technique, save time, Cost reduction reduces slip-stick artist's pressure; Prior, the larger loss that provides error message to bring because of the client can be provided.
In sum, method of the present invention as in this area to the important supplement of blank technology, and possess many-sided superiority, have wide market outlook.
Embodiment
Below in conjunction with embodiment the present invention is further described in detail.
RAID kind commonly used has JBOD, RAID 0, RAID 1, RAID 5, RAID 6, RAID 10 and RAID 50 etc., and dissimilar RAID has separately different data storage rules.Therefore, the present invention judges at the storage rule to various types of RAID, thereby carries out the affirmation of the type of RAID.Step is as follows:
1) reads the data of each hard disk identical address in the RAID system;
2) according in the various RAID types, the relation between the data of each identical location of hard disk is determined the RAID type.
The determination methods of RAID5:
Step 1, extract any hard disk in the RAID system, search non-full 0 sector more than, the scope of searching non-full 0 sector is whole disk size zone; Recording address also reads described sector to internal memory; In all the other hard disks, search the non-full 0 sector of identical address to internal memory, be kept at respectively regional S1, S2 in the internal memory, S3 ..., Sn.
If step 2 S1 XOR S2 XOR S3 ..., equal Sn, determine that then current RAID type is RAID5.
Embodiment one
In the RAID system, extract any hard disk, in whole disk size zone, search 1000 non-full 0 sectors.Recording address also reads these sectors to internal memory;
Identical address at other disk reads 1000 non-zero sectors to internal memory.We use A, B, C, D region of memory ... expression.Such as 4 hard disks are arranged in the array, we just read respectively A, B, C, D ... in;
These data are carried out XOR, equal D if satisfy A XOR B XOR C, can determine that this array is RAID5, flow process is ended.
The determination methods of RAID0:
Step 1,
Search the MFT (MFT) in the hard disk, the address of the file record array in the record MFT (MFT), the data of the address of file reading record array are to internal memory on each hard disk.
The MFT (MFT) of searching in the hard disk is specially: extract any hard disk in the RAID system, four bytes of search 0x460x490x4C0x45, then search for continuously the zone of 32KB, if front four bytes of every KB are 0x460x490x4C0x45 in the zone of described 32KB, then stop search the record current address; The data of the file record array that reads are 1KB.
Step 2,
2.1) 0x2C skew place in the data that read obtains a unsigned int variable;
2.2) described integer variable is carried out the ascending power ordering;
2.3) judge after the ordering the unsigned int data whether be equal difference, and judge that whether it poorly satisfies 2 n power, if satisfied, determines that this RAID type is RAID0.
Embodiment two
Four bytes of search 0x460x490x4C0x45, namely MFT record mark is searched for successfully rear continuation search, if in the zone of 32KB, front 4 bytes among every KB all are 0x460x490x4C0x45 continuously, search stops, the record current address is in variables A, otherwise the continuation search.
All read the 1KB data to internal memory at the address of variable place of every disk.
0x2C skew place in the data that read obtains a unsigned int variable, and we are designated as a, b, c, d ...
These integer variables are done the ascending power ordering.
Judge whether these unsigned ints difference each other equates, whether its difference satisfies 2 inferior power, can determine that this RAID is RAID0 if satisfy.Be that 64, c is 96, d is 128 as example unit K B, a as 32, b take 4 dishes still, the poor each other of them is 32,32 to be again 25 powers, and condition satisfies so, and these 4 hard disks are RAID0 systems, and it is 32KB that this step draws RAID band block size simultaneously.
The determination methods of RAID6
Step 1, extract any hard disk in the RAID system, search non-full 0 sector more than, the scope of searching non-full 0 sector is whole disk size zone; Recording address also reads described sector to internal memory; In all the other hard disks, search the non-full 0 sector of identical address to internal memory, be kept at respectively regional S1, S2 in the internal memory, S3 ..., Sn.
Step 2, get rid of S1, S2, S3 ..., a zone among the Sn data, remainder data is carried out XOR, if except other results in front data successively XOR of last data equal last data, and the data of getting rid of satisfy the Reed Solomon Coding computing of other data, determine that then this RAID type is RAID6.
Embodiment three
In the RAID system, extract any hard disk, in whole disk size zone, search 1000 non-full 0 sectors.Recording address also reads these sectors to internal memory;
Identical address at other disk reads 1000 non-zero sectors to internal memory.We use A, B, C, D region of memory ... expression.Such as 4 hard disks are arranged in the array, we just read respectively A, B, C, D ... in;
And repeat the XOR step in the situation of a disk getting rid of.
For example A, B, C, D, E, F6 piece region of memory, we at first get rid of A, see namely whether B, C, D, E, F satisfy the XOR relation, if carry out step 10, see if not getting rid of B whether A, C, D, E, F satisfy the XOR relation, by that analogy.
Judge whether the data that exclude satisfy the reed solomon product code computing of other data, determine that if it is this array is RAID6.
The determination methods of RAID1
On each hard disk, read at random a non-full 0 sector that above address is identical.If the non-full 0 sector of the identical address of each hard disk is fully equal, then this RAID type is RAID1.
Embodiment four
If number of disks only has two, then randomly draw 10000 non-full 0 sectors and record their address.Extract altogether 10000 non-full 0 sectors at the same position place of another piece disk, relatively extract data, if fully equal, then would be RAID1.
The determination methods of JBOD
Step 1, on each hard disk parallel search master guiding (MBR) sector, if find main guiding (MBR) sector at certain hard disk, then establishing this hard disk is 1 dialer of RAID system.
Step 2,
2.1) guide the 0x01D6 in (MBR) sector to extract 32 integers as the start address of extended partition from main;
2.2) guide the 0x01C6 of (EBR) sector to extract 32 integers as the start address of the DBR sector of first subregion from the extended partition of extended partition;
2.3) obtain the start address of its MFT (MFT) at the 0x30 place of dos boot record (DBR) sector of described subregion;
2.4) read successively MFT (MFT) record, if 32 integers that the 0x2C place of each record extracts are continuous integral number, this RAID type is JBOD.
Embodiment five
If number of disks is greater than 2, then parallel search MBR sector in several hard disks if find the MBR sector in certain piece disk, supposes that then this disk is 1 dialer of RAID system.
0x01D6 extracts 32 integers as the start address of extended partition from MBR, extract 32 integers as the start address of the DBR sector of first subregion from the 0x01C6 of the EBR sector of extended partition, obtain the start address that its MFT shows at the 0x30 place of this subregion DBR sector.Read successively the MFT record, big or small 1KB judges whether 32 integers of the 0x2C place extraction of each record satisfy continuous integer characteristic, if satisfy, this RAID is JBOD.
Should be 0, second such as first record 0x2C place and be recorded as 1 ... continuously to N, just think that it satisfies the characteristic of JBOD always.
Above-described embodiment only is that the present invention is described, and is not as limitation of the invention.So long as according to technical spirit of the present invention, to above-described embodiment change, modification etc. all will drop in the scope of claim of the present invention.

Claims (12)

1. RAID type judgement method is characterized in that step is as follows:
1) reads the data of each hard disk identical address in the RAID system;
2) according in the various RAID types, the relation between the data of each identical location of hard disk is determined the RAID type.
2. RAID type judgement method according to claim 1 is characterized in that step 1) is specially: extract any hard disk in the RAID system, search non-full 0 sector more than, recording address also reads described sector to internal memory; In all the other hard disks, search the non-full 0 sector of identical address to internal memory, be kept at respectively regional S1, S2 in the internal memory, S3 ..., Sn.
3. RAID type judgement method according to claim 2 is characterized in that, the scope of searching non-full 0 sector is whole disk size zone.
4. RAID type judgement method according to claim 2 is characterized in that step 2) in, if S1 XOR S2 XOR S3 ..., equal Sn, determine that then current RAID type is RAID5.
5. RAID type judgement method according to claim 1, it is characterized in that, step 1) is specially: search the MFT (MFT) in the hard disk, the address of the file record array in the record MFT (MFT), the data of the address of file reading record array are to internal memory on each hard disk.
6. RAID type judgement method according to claim 5, it is characterized in that, the MFT (MFT) of searching in the hard disk is specially: extract any hard disk in the RAID system, four bytes of search 0x460x490x4C0x45, then search for continuously the zone of 32KB, if front four bytes of every KB are 0x460x490x4C0x45 in the zone of described 32KB, then stop search the record current address; The data of the file record array that reads are 1KB.
7. RAID type judgement method according to claim 5 is characterized in that step 2) be specially:
2.1) 0x2C skew place in the data that read obtains a unsigned int variable;
2.2) described integer variable is carried out the ascending power ordering;
2.3) judge after the ordering the unsigned int data whether be equal difference, and judge that whether it poorly satisfies 2 n power, if satisfied, determines that this RAID type is RAID0.
8. RAID type judgement method according to claim 2, it is characterized in that, step 2) in, get rid of S1, S2, S3 ..., a zone among the Sn data, remainder data is carried out XOR, if except other results in front data successively XOR of last data equal last data, and the data of getting rid of satisfy the Reed Solomon Coding computing of other data, determine that then this RAID type is RAID6.
9. RAID type judgement method according to claim 1 is characterized in that step 1) is specially: read at random a non-full 0 sector that above address is identical on each hard disk.
10. RAID type judgement method according to claim 9 is characterized in that, if the non-full 0 sector of the identical address of each hard disk is fully equal, then this RAID type is RAID1.
11. RAID type judgement method according to claim 1, it is characterized in that, step 1) is specially: parallel search master guiding (MBR) sector on each hard disk, if find main guiding (MBR) sector at certain hard disk, then establishing this hard disk is 1 dialer of RAID system.
12. RAID type judgement method according to claim 11 is characterized in that step 2) be specially:
2.1) guide the 0x01D6 in (MBR) sector to extract 32 integers as the start address of extended partition from main;
2.2) guide the 0x01C6 of (EBR) sector to extract 32 integers as the start address of the DBR sector of first subregion from the extended partition of extended partition;
2.3) obtain the start address of its MFT (MFT) at the 0x30 place of dos boot record (DBR) sector of described subregion;
2.4) read successively MFT (MFT) record, if 32 integers that the 0x2C place of each record extracts are continuous integral number, this RAID type is JBOD.
CN201210321888.XA 2012-09-03 2012-09-03 A kind of RAID type judgement method Active CN102866933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210321888.XA CN102866933B (en) 2012-09-03 2012-09-03 A kind of RAID type judgement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210321888.XA CN102866933B (en) 2012-09-03 2012-09-03 A kind of RAID type judgement method

Publications (2)

Publication Number Publication Date
CN102866933A true CN102866933A (en) 2013-01-09
CN102866933B CN102866933B (en) 2016-02-24

Family

ID=47445812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210321888.XA Active CN102866933B (en) 2012-09-03 2012-09-03 A kind of RAID type judgement method

Country Status (1)

Country Link
CN (1) CN102866933B (en)

Cited By (2)

* 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
CN109164987A (en) * 2018-08-29 2019-01-08 郑州云海信息技术有限公司 A kind of control method of magnetic disc array card, device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571820A (en) * 2009-05-27 2009-11-04 成都市华为赛门铁克科技有限公司 Redundancy protected method, device and system
CN101887387A (en) * 2010-04-07 2010-11-17 山东高效能服务器和存储研究院 Method for remotely intelligently monitoring and analyzing RAID faults
US20110066882A1 (en) * 2009-09-16 2011-03-17 International Business Machines Corporation Wear leveling of solid state disks based on usage information of data and parity received from a raid controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571820A (en) * 2009-05-27 2009-11-04 成都市华为赛门铁克科技有限公司 Redundancy protected method, device and system
US20110066882A1 (en) * 2009-09-16 2011-03-17 International Business Machines Corporation Wear leveling of solid state disks based on usage information of data and parity received from a raid controller
CN101887387A (en) * 2010-04-07 2010-11-17 山东高效能服务器和存储研究院 Method for remotely intelligently monitoring and analyzing RAID faults

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
CN105183388B (en) * 2015-09-14 2019-02-12 北京华青融天技术有限责任公司 A kind of acquisition methods, device and the system of hard disc physical sequence number
CN109164987A (en) * 2018-08-29 2019-01-08 郑州云海信息技术有限公司 A kind of control method of magnetic disc array card, device and electronic equipment

Also Published As

Publication number Publication date
CN102866933B (en) 2016-02-24

Similar Documents

Publication Publication Date Title
CN104536698A (en) Disk reconfiguration method based on RAID and related apparatus
CN101567211A (en) Method for improving usability of disk and disk array controller
JP2021535518A (en) Hard disk failure remedies, array controllers, and hard disks
CN101887351B (en) Fault-tolerance method and system for redundant array of independent disk
CN101097531A (en) Computer RAID array early-warning system and method
CN104461390A (en) Method and device for writing data into imbricate magnetic recording SMR hard disk
CN106980562A (en) A kind of hard disk monitoring method and device
CN110704287B (en) RAID card abnormal log collection method and system under Linux system and storage medium
CN103534688A (en) Data recovery method, storage equipment and storage system
CN105830041A (en) Metadata recovery method and apparatus
CN109032863A (en) Determination method, the system of a kind of NVMe solid state hard disk and its failure cause
CN106980468A (en) Trigger the method and device that RAID array is rebuild
CN104932830B (en) Information processing method and electronic equipment
US20060215456A1 (en) Disk array data protective system and method
CN103593275B (en) Disc information display methods and device
CN102866933A (en) Method for judging type of redundant array of independent disks (RAID)
CN102033717B (en) Data storage method and system based on RAID (Redundant Array of Inexpensive Disk)
CN105630657A (en) Temperature detection method and device
CN108845771A (en) Method, system and the associated component of RAID are configured in a kind of storage system
CN106708445A (en) Link selection method and device
CN104699564A (en) Automatic recovery method and device with Raid0 magnetic disc server
CN101419563A (en) Single board and method for enhancing reliability of the single board
CN101369238A (en) Exception monitoring and reset processing method for USB equipment
CN104572380B (en) A kind of method and apparatus for detecting disk
CN104050071A (en) Storage device failure early warning method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant