CN104850359A - RAID array rebuilding method and device - Google Patents
RAID array rebuilding method and device Download PDFInfo
- Publication number
- CN104850359A CN104850359A CN201510292039.XA CN201510292039A CN104850359A CN 104850359 A CN104850359 A CN 104850359A CN 201510292039 A CN201510292039 A CN 201510292039A CN 104850359 A CN104850359 A CN 104850359A
- Authority
- CN
- China
- Prior art keywords
- data
- stick
- subcommand
- reading
- reading failure
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention provides an RAID array rebuilding method. The RAID array rebuilding method includes: in the process of redundant checking array rebuilding, if a reading error is returned after a reading order aiming at each disk strip block is issued, reissuing a plurality of suborders for reading data of the strip block in a fragmented manner aiming at the strip block in a reading failure, and disposing unvarnished transmission marks indicating that merging is not performed in a block layer on the suborders; after all operation results of the suborders are returned, considering data of areas corresponding to the suborders failed in reading to be 0, and enabling the data as 0 and data of areas corresponding to the suborders succeeded in reading to jointly form combined data of reading failure strip blocks; according to the combined data of the reading failure strip blocks and data of reading success strip blocks, acquiring checking data, and issuing a writing order to write the checking data into corresponding strip blocks of a rebuilt disk. By the RAID array rebuilding method, in the process of array rebuilding, under the circumstance of reading errors, array usability can be realized by sacrificing minimum data integrity.
Description
Technical field
The present invention relates to technical field of memory, particularly relate to the method and apparatus that a kind of RAID array is rebuild.
Background technology
In existing RAID5 array rebuild process, if the reconstruction order of a band meets with a read error when read data dish, stick corresponding for reconstruction dish also can be identified and there is read error, because this blocks of data is invalid.Proceed the reconstruction of next band afterwards, treat that all bands have all been rebuild, reconstruction dish adds array becomes data disks.The redundancy of the most band of RAID5 array can be recovered so as early as possible.
To the RAID5 array that this thing happens and rebuild, original weight builds the stick of disc identifier read error, and in fact magnetic disk media read-write itself is no problem, just due to data invalid, when preventing from reading data generation consistency problem, be just designated read error.There is the band of two read errors for RAID5, just constitute bad band.If in process of reconstruction, the read error that data disks occurs is too much, and it is read error that reconstruction dish can be caused also and then to mark a large amount of stick.Reconstruction completes, and these have the band of two read error records to be bad band, all can return failure to read command.At video data storage environment, this disposal route may cause the multitude of video on array all cannot playback.
Summary of the invention
In view of this, the invention provides a kind of RAID array method for reconstructing and device.
This method for reconstructing comprises: in redundancy check array rebuild process, if return read error after issuing the read command for each disk stick, then for the stick of reading failure, re-issue the subcommand that several bursts read this blocks of data, and put not at the merged transparent transmission mark of block layer to these subcommands; After the operating result of described subcommand all returns, for reading failure subcommand corresponding to region, if its data are 0, these data being 0 are formed together with reading the data in the region corresponding to successful subcommand the data splitting of described reading failure stick; Data splitting according to described reading failure stick obtains checking data with the data being read as merit stick, issues write order and corresponding stick is coiled in this checking data write reconstruction.
Based on same design, a kind of RAID array reconstructing device of the present invention, comprise: subcommand issues module, for in redundancy check array rebuild process, if return read error after issuing the read command for each disk stick, then for the stick of reading failure, re-issue the subcommand that several bursts read this blocks of data, and put not at the merged transparent transmission mark of block layer to these subcommands; Data splitting builds module, for after the operating result of described subcommand all returns, for reading failure subcommand corresponding to region, if its data are 0, these data being 0 are formed together with reading the data in the region corresponding to successful subcommand the data splitting of described reading failure stick; Correction verification module, obtains checking data for the data splitting according to described reading failure stick with the data being read as merit stick; Write order module, coils corresponding stick for issuing write order by this checking data write reconstruction.
Compared to prior art, the present invention program is in redundancy check array rebuild process, under running into read error situation, reaching the availability of array by sacrificing minimum data integrity, making the video monitoring data that Array Disk stores well can be carried out playback by user.
Accompanying drawing explanation
Fig. 1 is embodiment of the present invention process flow diagram.
Fig. 2 is embodiment of the present invention example key diagram.
Fig. 3 is apparatus of the present invention building-block of logic.
Embodiment
For solving the problem that background technology is mentioned, the invention provides a kind of scheme of new array rebuild.The program, in redundancy check array rebuild process, under running into read error situation, reaches the availability of array by sacrificing minimum data integrity, make the video monitoring data that Array Disk stores well can be carried out playback by user.Describe in detail below by way of specific embodiment.
Please refer to the drawing 1, the array rebuild method of the present embodiment comprises the steps:
S11, in redundancy check array rebuild process, if return reading failure after issuing the read command for each disk stick, then for the stick of reading failure, re-issue the subcommand that several bursts read this blocks of data, these subcommands are set to not at the merged transparent transmission mark of block layer;
S12, after the operating result of described subcommand all returns, for reading failure subcommand corresponding to region, if its data are 0, these data being 0 are formed together with reading the data in the region corresponding to successful subcommand the data splitting of described reading failure stick;
S13, obtain checking data according to the data splitting of described reading failure stick and the data that are read as merit stick, issue write order and corresponding stick is coiled in this checking data write reconstruction.
Shown in please refer to the drawing 2 one array, this array is a RAID5 array formed with three pieces of dishes, and Fig. 2 is redeveloped into example with an one band and is described.
Array is made up of disk 1, disk 2, disk 3 at first.Disk 3 fault afterwards, one piece of HotSpare disk adds array, as the reconstruction dish of array.
After RAID5 array receives a band reconstruction order, first read command is issued to data disks, read the data of this reconstruction band corresponding stick on disk 1, disk 2; Disk 1 stick returns failure due to read error, and data disks 2 stick returns and is read as merit, as the step1 in Fig. 2.
For the stick of disk 1, original read command is split as multiple subcommand, the size of subcommand is determined by embody rule, such as can be 512Byte, 4KB etc., and each subcommand is set to a transparent transmission mark, to make them can not be merged at block layer, then issue these subcommands, as the step2 of Fig. 2.
After these subcommands are performed, some subcommand possible reads the fragment data success of stick, and some subcommand reads the fragment data failure of stick; Now, the data of the data area of reading stick corresponding to failed subcommand are set to 0, and (this is done to ignore these reads unsuccessfully, no longer ensure the integrality of this area data), and and disk 1 read the data splitting that data that successful subcommand reads are combined into disk 1 stick in the lump.The data of this disk 1 stick be combined into verify together with reading the data of successful disk 2 stick before, the data of restoration and reconstruction dish.After having verified, reconstruction dish is issued to the order of write check data, as the step3 of Fig. 2.
After being write as this reconstruction dish of merit, then rebuild order and return successfully.Now reconstruction dish would not be identified as read error as in the prior art, so just can ensure the availability of band and array, the experience that user just can have when requiring playing back videos as far as possible.
More preferably, for the stick of disk 1 reading failure, the order of write combinations thereof data can be issued.By the object that the data be combined into write again be: 1) zero reparation is write to reading failure region, if logistic bad track mistake then can write reparation, if true medium mistake, write the bad block Exchange rings of bad sector Exchange rings or the storage products that can trigger disk itself immediately, make medium bad block be mapped to other good region of hard disk, recover bar and take normal condition to.2), after being write as merit, the consistance of band can be ensured.In addition, can also only for reading failure subcommand corresponding to region, issue the order of write 0 data.This also can realize aforementioned two objects.
It should be noted that, Fig. 2 is described for the stick reading failure of a disk.In fact, there is two or more disk stick reading failure, still can process by the inventive method.Such as disk 2 stick in Fig. 2 is the same with disk 1 when reading, and also there occurs reading failure.Now, equally can operate with disk 1 disk 2, be split as multiple subcommand by the original read command for disk 2 stick, and each subcommand is set to a transparent transmission mark, then issues these subcommands with the valid data on reading disk 2 stick as much as possible.For the subcommand returning reading failure, also be that the data of its correspondence are set to 0, namely think that the data read are 0, then read with other to form data splitting together with data that successful subcommand reads, carry out verification again and obtain checking data together with the data splitting of disk 1 stick, issue reconstruction dish.Such reconstruction dish also need not mark read error mark, ensure that the availability of band.
Based on same design, the present invention also provides a kind of RAID array reconstructing device.Please refer to the drawing 3, this device comprises: subcommand issues module, data splitting builds module, correction verification module and write order module.
Subcommand issues module, for in redundancy check array rebuild process, if return read error after issuing the read command for each disk stick, then for the stick of reading failure, re-issue the subcommand that several bursts read this blocks of data, and these subcommands are put not at the merged transparent transmission mark of block layer.
Data splitting builds module, for after the operating result of described subcommand all returns, for reading failure subcommand corresponding to region, if its data are 0, these data being 0 are formed together with reading the data in the region corresponding to successful subcommand the data splitting of described reading failure stick.
Correction verification module, obtains checking data for the data splitting according to described reading failure stick with the data being read as merit stick.
Write order module, coils corresponding stick for issuing write order by this checking data write reconstruction.
Write order module, also for the stick to described reading failure, issues write order, writes described data splitting; Or, also for the region corresponding to the subcommand to described reading failure, issue write order, write data 0.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.
Claims (8)
1. a RAID array method for reconstructing, is characterized in that, the method comprises:
In redundancy check array rebuild process, if return read error after issuing the read command for each disk stick, then for the stick of reading failure, re-issue the subcommand that several bursts read this blocks of data, and put not at the merged transparent transmission mark of block layer to these subcommands;
After the operating result of described subcommand all returns, for reading failure subcommand corresponding to region, if its data are 0, these data being 0 are formed together with reading the data in the region corresponding to successful subcommand the data splitting of described reading failure stick;
Data splitting according to described reading failure stick obtains checking data with the data being read as merit stick, issues write order and corresponding stick is coiled in this checking data write reconstruction.
2. the method for claim 1, is characterized in that, the stick of described reading failure is more than one or one.
3. the method for claim 1, is characterized in that, described method also comprises:
To the stick of described reading failure, issue write order, write described data splitting.
4. the method for claim 1, is characterized in that, described method also comprises:
To the region corresponding to the subcommand of described reading failure, issue write order, write data 0.
5. a RAID array reconstructing device, is characterized in that, this device comprises:
Subcommand issues module, for in redundancy check array rebuild process, if return read error after issuing the read command for each disk stick, then for the stick of reading failure, re-issue the subcommand that several bursts read this blocks of data, and put not at the merged transparent transmission mark of block layer to these subcommands;
Data splitting builds module, for after the operating result of described subcommand all returns, for reading failure subcommand corresponding to region, if its data are 0, these data being 0 are formed together with reading the data in the region corresponding to successful subcommand the data splitting of described reading failure stick;
Correction verification module, obtains checking data for the data splitting according to described reading failure stick with the data being read as merit stick;
Write order module, coils corresponding stick for issuing write order by this checking data write reconstruction.
6. the method for claim 1, is characterized in that, the stick of described reading failure is more than one or one.
7. the method for claim 1, is characterized in that, described method also comprises:
Described write order module, also for the stick to described reading failure, issues write order, writes described data splitting.
8. the method for claim 1, is characterized in that, described method also comprises:
Described write order module, also for the region corresponding to the subcommand to described reading failure, issues write order, write data 0.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510292039.XA CN104850359B (en) | 2015-05-29 | 2015-05-29 | A kind of RAID array method for reconstructing and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510292039.XA CN104850359B (en) | 2015-05-29 | 2015-05-29 | A kind of RAID array method for reconstructing and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104850359A true CN104850359A (en) | 2015-08-19 |
CN104850359B CN104850359B (en) | 2019-01-15 |
Family
ID=53850034
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510292039.XA Active CN104850359B (en) | 2015-05-29 | 2015-05-29 | A kind of RAID array method for reconstructing and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104850359B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106959912A (en) * | 2017-03-07 | 2017-07-18 | 杭州宏杉科技股份有限公司 | Disk detection method and device |
CN107731262A (en) * | 2017-09-29 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of storage disk bad block management method, device, equipment and readable storage medium storing program for executing |
CN111522505A (en) * | 2020-04-03 | 2020-08-11 | 杭州宏杉科技股份有限公司 | Data processing method and device in RAID reconstruction process |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101135955A (en) * | 2007-10-19 | 2008-03-05 | 杭州华三通信技术有限公司 | Method for realizing magnetic disc redundant array rebuilding and magnetic disc redundant array |
CN102184129A (en) * | 2011-04-27 | 2011-09-14 | 杭州华三通信技术有限公司 | Fault tolerance method and device for disk arrays |
CN102207895A (en) * | 2011-05-27 | 2011-10-05 | 杭州华三通信技术有限公司 | Data reconstruction method and device of redundant array of independent disk (RAID) |
US20130103902A1 (en) * | 2010-12-31 | 2013-04-25 | Huawei Technologies Co., Ltd. | Method and apparatus for implementing protection of redundant array of independent disks in file system |
CN104516679A (en) * | 2013-09-30 | 2015-04-15 | 杭州宏杉科技有限公司 | RAID (Redundant Array Of Independent Disk) data processing method and device |
-
2015
- 2015-05-29 CN CN201510292039.XA patent/CN104850359B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101135955A (en) * | 2007-10-19 | 2008-03-05 | 杭州华三通信技术有限公司 | Method for realizing magnetic disc redundant array rebuilding and magnetic disc redundant array |
US20130103902A1 (en) * | 2010-12-31 | 2013-04-25 | Huawei Technologies Co., Ltd. | Method and apparatus for implementing protection of redundant array of independent disks in file system |
CN102184129A (en) * | 2011-04-27 | 2011-09-14 | 杭州华三通信技术有限公司 | Fault tolerance method and device for disk arrays |
CN102207895A (en) * | 2011-05-27 | 2011-10-05 | 杭州华三通信技术有限公司 | Data reconstruction method and device of redundant array of independent disk (RAID) |
CN104516679A (en) * | 2013-09-30 | 2015-04-15 | 杭州宏杉科技有限公司 | RAID (Redundant Array Of Independent Disk) data processing method and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106959912A (en) * | 2017-03-07 | 2017-07-18 | 杭州宏杉科技股份有限公司 | Disk detection method and device |
CN106959912B (en) * | 2017-03-07 | 2020-03-24 | 杭州宏杉科技股份有限公司 | Disk detection method and device |
CN107731262A (en) * | 2017-09-29 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of storage disk bad block management method, device, equipment and readable storage medium storing program for executing |
CN111522505A (en) * | 2020-04-03 | 2020-08-11 | 杭州宏杉科技股份有限公司 | Data processing method and device in RAID reconstruction process |
CN111522505B (en) * | 2020-04-03 | 2022-08-02 | 杭州宏杉科技股份有限公司 | Data processing method and device in RAID reconstruction process |
Also Published As
Publication number | Publication date |
---|---|
CN104850359B (en) | 2019-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102708019B (en) | Method, device and system for hard disk data recovery | |
US8601348B2 (en) | Error checking addressable blocks in storage | |
CN103309775B (en) | A kind of fault-tolerance approach of high-reliability disk array | |
CN104484251B (en) | A kind of processing method and processing device of hard disk failure | |
CN104035830B (en) | A kind of data reconstruction method and device | |
CN105122213A (en) | Methods and apparatus for error detection and correction in data storage systems | |
CN102207895B (en) | Data reconstruction method and device of redundant array of independent disk (RAID) | |
CN102043685A (en) | RAID (redundant array of independent disk) system and data recovery method thereof | |
CN103034458B (en) | Method and the device of Redundant Array of Independent Disks (RAID) is realized in solid state hard disc | |
US11531590B2 (en) | Method and system for host-assisted data recovery assurance for data center storage device architectures | |
CN103389920A (en) | Self-detection method and device for bad blocks of magnetic disc | |
CN101984400B (en) | RAID control method, device and system | |
CN101916173A (en) | RAID (Redundant Array of Independent Disks) based data reading and writing method and system thereof | |
CN101840360A (en) | Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system | |
CN105468479B (en) | A kind of disk array RAID bad block processing methods and device | |
CN102508620A (en) | Method for processing RAID5 (Redundant Array of Independent Disks) bad sector | |
CN104850359A (en) | RAID array rebuilding method and device | |
CN104407821A (en) | Method and device for achieving RAID reconstitution | |
CN104407815A (en) | Method and device for treating bad sector in RAID5 disk array | |
US10574270B1 (en) | Sector management in drives having multiple modulation coding | |
US20150347224A1 (en) | Storage control apparatus and method therefor | |
TW201329701A (en) | Automatic remapping in redundant array of independent disks and related raid | |
CN105183590A (en) | Disk array fault tolerance processing method | |
CN105630417A (en) | RAID5 (Redundant Array Of Independent Disks) system and method for continuously writing data after failure of RAID5 system | |
CN104035886A (en) | Magnetic disk remapping method, magnetic disk remapping device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |