[go: up one dir, main page]

CN104850359B - A kind of RAID array method for reconstructing and device - Google Patents

A kind of RAID array method for reconstructing and device Download PDF

Info

Publication number
CN104850359B
CN104850359B CN201510292039.XA CN201510292039A CN104850359B CN 104850359 B CN104850359 B CN 104850359B CN 201510292039 A CN201510292039 A CN 201510292039A CN 104850359 B CN104850359 B CN 104850359B
Authority
CN
China
Prior art keywords
data
stick
subcommand
reading failure
read
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.)
Active
Application number
CN201510292039.XA
Other languages
Chinese (zh)
Other versions
CN104850359A (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201510292039.XA priority Critical patent/CN104850359B/en
Publication of CN104850359A publication Critical patent/CN104850359A/en
Application granted granted Critical
Publication of CN104850359B publication Critical patent/CN104850359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention provides a kind of RAID array method for reconstructing, this method comprises: in redundancy check array reconstruction process, if returning to read error after issuing the read command for each disk stick, then it is directed to the stick of reading failure, the subcommand that several fragments read the stick data is re-issued, and these subcommands are set with the transparent transmission mark not being merged in block layer;After the operating result whole of the subcommand returns, region corresponding to the subcommand for reading failure, it is believed that its data is 0, and the data in region corresponding to these data and the successful subcommand of reading for 0 are constituted to the data splitting of the reading failure stick together;Verification data are obtained according to the data splitting of the reading failure stick and the data for being read as function stick, write order is issued by the verification data and the corresponding stick of reconstruction disk is written.The program is in array reconstruction process, in the case of encountering read error, reaches the availability of array by sacrificing least data integrity.

Description

A kind of RAID array method for reconstructing and device
Technical field
The present invention relates to the method and apparatus that technical field of memory more particularly to a kind of RAID array are rebuild.
Background technique
In existing RAID5 array reconstruction process, if the reconstruction order of a band meets with a reading when reading data disks Mistake can will rebuild the corresponding stick of disk and also identify that there are read errors, because of this block data invalid.Continue next item later The reconstruction of band has all been rebuild to all bands, rebuilds disk and array is added as data disks.It can restore RAID5 times as early as possible in this way Arrange the redundancy of most bands.
To this thing happens and rebuilds the RAID5 array of completion, original weight builds the stick of disc identifier read error, actually Magnetic disk media read-write itself is what there is no problem, only because data invalid, is preventing from reading data generation consistency problem In the case of, just identify as read error.There are two the bands of read error for RAID5, just constitutes bad band.If In reconstruction process, the read error that data disks occur is excessive, and will lead to reconstruction disk and also and then mark a large amount of sticks is read error.It rebuilds It completes, these are bad band there are two the band of read error record, can return to failure to read command.It is stored in video data Environment, this processing method may result in the multitude of video on array and can not all play back.
Summary of the invention
In view of this, the present invention provides a kind of RAID array method for reconstructing and device.
The method for reconstructing includes: in redundancy check array reconstruction process, if issuing the read command for each disk stick After return to read error, then be directed to reading failure stick, re-issue the subcommand that several fragments read the stick data, and right The grade subcommands set the transparent transmission mark not being merged in block layer;After the operating result of the subcommand all returns, for reading This is waited into the data for 0 and is read corresponding to successful subcommand if its data is 0 in region corresponding to the subcommand of failure The data in region constitute the data splitting of the reading failure stick together;According to the data splitting of the reading failure stick and it is read as The data of function stick obtain verification data, issue write order for the verification data and the corresponding stick of reconstruction disk is written.
Based on same design, a kind of RAID array reconstructing device of the invention, comprising: subcommand issues module, is used for In redundancy check array reconstruction process, if returning to read error after issuing the read command for each disk stick, lost for reading The stick lost re-issues the subcommand that several fragments read the stick data, and sets not the grade subcommands in block layer quilt Combined transparent transmission mark;Data splitting constructs module, for being lost after the operating result of the subcommand all returns for reading This is waited into the data for 0 and reads area corresponding to successful subcommand if its data is 0 in region corresponding to the subcommand lost The data in domain constitute the data splitting of the reading failure stick together;Correction verification module, for the group according to the reading failure stick It closes data and obtains verification data with the data for being read as function stick;Write order module writes the verification data for issuing write order Enter to rebuild the corresponding stick of disk.
Compared to the prior art, the present invention program is in redundancy check array reconstruction process, in the case of encountering read error, leads to Cross the availability for sacrificing least data integrity to reach array, enable the video monitoring data stored on Array Disk very Good is played back by user.
Detailed description of the invention
Fig. 1 is flow chart of the embodiment of the present invention.
Fig. 2 is that embodiment of the present invention illustrates figure.
Fig. 3 is apparatus of the present invention building-block of logic.
Specific embodiment
To solve the problems, such as that background technique is mentioned, the present invention provides a kind of scheme that new array is rebuild.The program is superfluous In remaining verification array reconstruction process, in the case of encountering read error, reach array by sacrificing least data integrity can With property, the video monitoring data stored on Array Disk is played back well by user.Below by way of specific implementation Example is described in detail.
It please join Fig. 1, the array method for reconstructing of the present embodiment includes the following steps:
S11, in redundancy check array reconstruction process, if after issuing the read command for each disk stick return read lose It loses, is then directed to the stick of reading failure, re-issues the subcommand that several fragments read the stick data, these subcommands are set to The transparent transmission mark not being merged in block layer;
S12, after the operating result of the subcommand all returns, region corresponding to the subcommand for reading failure, If its data is 0, the data in region corresponding to these data and the successful subcommand of reading for 0 are constituted into the reading together and are lost Lose the data splitting of stick;
S13, it according to the data splitting of the reading failure stick and the data of function stick is read as obtains verification data, issue and write The verification data, which are written, for order rebuilds the corresponding stick of disk.
It please join an array shown in Fig. 2, which is the RAID5 array formed with three pieces of disks, and Fig. 2 is with one Band is illustrated for rebuilding.
Array is initially made of disk 1, disk 2, disk 3.Array is added in 3 failure of later disk, one piece of HotSpare disk, as The reconstruction disk of array.
After RAID5 array, which receives a band, rebuilds order, read command is issued to data disks first, reads the reconstruction item Band corresponds to the data of stick on disk 1, disk 2;1 stick of disk fails since read error returns, and 2 stick of data disks, which returns, to be read Success, such as the step1 in Fig. 2.
For the stick of disk 1, original read command is split as multiple subcommands, the size of subcommand is by concrete application It determines, such as can be 512Byte, 4KB etc., and each subcommand is set to a transparent transmission mark, so that they will not be in block Layer is merged, these subcommands is then issued, such as the step2 of Fig. 2.
After these subcommands are performed, some possible subcommands read the fragment data success of stick, some subcommands are read The fragment data of stick is taken to fail;At this point, the data of the data area for the corresponding stick of subcommand for reading failure are set as 0 (this is done to ignore these to read failure, no longer guaranteeing the integrality of the area data), and read successfully with disk 1 The read data of subcommand are combined into the data splitting of 1 stick of disk together.The data for 1 stick of disk being combined into and it The preceding data for reading successful 2 stick of disk are verified together, the data of restoration and reconstruction disk.After the completion of verification, to reconstruction disk The order for issuing write check data, such as the step3 of Fig. 2.
After being write as the function reconstruction disk, then rebuilds order and return successfully.Rebuilding disk at this time would not be as in the prior art It is identified as read error, can thus guarantee the availability of band and array as far as possible, user can have when requiring playing back videos Good experience.
More preferably, it can be directed to the stick of 1 reading failure of disk, issue the order of write-in said combination data.It will be combined into The purpose that is written again of data be: 1) reading failure region is carried out writing zero reparation, can then be write if it is logistic bad track mistake It repairs, if it is true medium mistake, writes the bad sector Exchange rings that can trigger disk itself immediately or store product Bad block Exchange rings enable medium bad block to be mapped to the other good regions of hard disk, restore item and take normal condition to.2) write as function Afterwards, it is ensured that the consistency of band.In addition to this it is possible to which region corresponding to subcommand only for reading failure, issues The order of 0 data is written.This is also able to achieve both of the aforesaid purpose.
It should be noted that Fig. 2 is illustrated by taking the stick reading failure of a disk as an example.In fact, occurring two A or more than two disk stick reading failures, still can be handled with the method for the present invention.Such as the disk 2 in Fig. 2 As disk 1, reading failure also has occurred when reading in stick.At this point, can equally be operated with disk 1 to disk 2, i.e., will The read command for 2 stick of disk originally is split as multiple subcommands, and each subcommand is set to a transparent transmission mark, then These subcommands are issued with the valid data on 2 stick of reading disk as much as possible.For returning to the subcommand of reading failure, It is that its corresponding data is set as 0, that is, thinks that the data read are 0, then read the data that successful subcommand is read with other Data splitting is constituted together, then is verified to obtain verification data together with the data splitting of 1 stick of disk, issues reconstruction disk. It is rebuild on disk in this way without 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 devices.It please join Fig. 3, which includes: son Order issues module, data splitting building module, correction verification module and write order module.
Subcommand issues module, is used in redundancy check array reconstruction process, if issuing the reading for each disk stick Read error is returned after order, then is directed to the stick of reading failure, re-issues the subcommand that several fragments read the stick data, And the transparent transmission mark not being merged in block layer is set to the grade subcommands.
Data splitting construct module, for when the subcommand operating result all return after, for the son of reading failure This is waited into the data for 0 and reads the number in region corresponding to successful subcommand if its data is 0 in the corresponding region of order According to the data splitting for constituting the reading failure stick together.
Correction verification module, for obtaining check number with the data for being read as function stick according to the data splitting of the reading failure stick According to.
For issuing write order the corresponding stick of reconstruction disk is written in the verification data by write order module.
Write order module is also used to issue write order to the stick of the reading failure, the data splitting is written;Alternatively, It is also used to region corresponding to the subcommand to the reading failure, issues write order, data 0 are written.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.

Claims (6)

1. a kind of RAID array method for reconstructing, which is characterized in that this method comprises:
In redundancy check array reconstruction process, if returning to reading failure after issuing the read command for each disk stick, it is directed to The stick of reading failure re-issues the subcommand that several fragments read the stick data, and sets not subcommand in block layer quilt Combined transparent transmission mark;
After the operating result of the subcommand all returns, region corresponding to the subcommand for reading failure, if its data It is 0, the combination of the reading failure stick will be constituted together for the data in region corresponding to 0 data and the successful subcommand of reading Data;
Verification data are obtained according to the data splitting of the reading failure stick and the data for being read as function stick, issuing write order should It verifies data write-in and rebuilds the corresponding stick of disk;
Region corresponding to subcommand to the reading failure issues write order, and data 0 are written.
2. the method as described in claim 1, which is characterized in that the stick of the reading failure be one or more than one.
3. the method as described in claim 1, which is characterized in that the method also includes:
To the stick of the reading failure, write order is issued, the data splitting is written.
4. a kind of RAID array reconstructing device, which is characterized in that the device includes:
Subcommand issues module, is used in redundancy check array reconstruction process, if issuing the read command for each disk stick After return to reading failure, then be directed to reading failure stick, re-issue the subcommand that several fragments read the stick data, and right Subcommand sets the transparent transmission mark not being merged in block layer;
Data splitting construct module, for when the subcommand operating result all return after, for the subcommand of reading failure It corresponding region will be for the data in region corresponding to 0 data and the successful subcommand of reading together structure if its data is 0 At the data splitting of the reading failure stick;
Correction verification module, for obtaining verification data with the data for being read as function stick according to the data splitting of the reading failure stick;
For issuing write order the corresponding stick of reconstruction disk is written in the verification data by write order module;
The write order module, is also used to region corresponding to the subcommand to the reading failure, issues write order, and data are written 0。
5. device as claimed in claim 4, which is characterized in that the stick of the reading failure be one or more than one.
6. device as claimed in claim 4, which is characterized in that the method also includes:
The write order module is also used to issue write order to the stick of the reading failure, the data splitting is written.
CN201510292039.XA 2015-05-29 2015-05-29 A kind of RAID array method for reconstructing and device Active CN104850359B (en)

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 CN104850359A (en) 2015-08-19
CN104850359B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN111522505B (en) * 2020-04-03 2022-08-02 杭州宏杉科技股份有限公司 Data processing method and device in RAID reconstruction process

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100495313C (en) * 2007-10-19 2009-06-03 杭州华三通信技术有限公司 Method for realizing disk redundant array reconstruction and disk redundant array

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN104850359A (en) 2015-08-19

Similar Documents

Publication Publication Date Title
US8370715B2 (en) Error checking addressable blocks in storage
CN104484251B (en) A kind of processing method and processing device of hard disk failure
CN103718162B (en) Method and apparatus for flexible RAID in SSD
CN105573681B (en) Method and system for establishing RAID in SSD
US20150355971A1 (en) Failure domain based storage system data stripe layout
US20120072680A1 (en) Semiconductor memory controlling device
CN105453439B (en) System and method for combined error correction and erasure decoding of product codes
CN101984400B (en) RAID control method, device and system
CN102799533B (en) Method and apparatus for shielding damaged sector of disk
TWI559133B (en) Disk array system and data processing method
CN104850359B (en) A kind of RAID array method for reconstructing and device
KR20220120967A (en) STORAGE Controller , Operation Method thereof
US7689890B2 (en) System and method for handling write commands to prevent corrupted parity information in a storage array
CN104407815A (en) Method and device for processing bad sectors in RAID5 disk array
CN104407821B (en) A kind of method and device for realizing RAID reconstruction
US6584544B1 (en) Method and apparatus for preparing a disk for use in a disk array
US7730370B2 (en) Apparatus and method for disk read checking
US10275309B2 (en) Multi-layer integrated zone partition system error correction
US10574270B1 (en) Sector management in drives having multiple modulation coding
CN105094712B (en) A kind of data processing method and device
CN102385544B (en) Method and device for re-establishing disk
US20180107546A1 (en) Data storage system with virtual blocks and raid and management method thereof
CN104035840B (en) A kind of method and apparatus for recovering band read error
CN107728943A (en) It is a kind of to postpone to produce the method for verification CD and its corresponding data reconstruction method
CN102508747A (en) Method for accelerating recovery of failure disc

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