CN101833422B - Data processing method and device for disk array - Google Patents

Data processing method and device for disk array Download PDF

Info

Publication number
CN101833422B
CN101833422B CN2010101221450A CN201010122145A CN101833422B CN 101833422 B CN101833422 B CN 101833422B CN 2010101221450 A CN2010101221450 A CN 2010101221450A CN 201010122145 A CN201010122145 A CN 201010122145A CN 101833422 B CN101833422 B CN 101833422B
Authority
CN
China
Prior art keywords
data
disk
solid state
hard disc
state hard
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
CN2010101221450A
Other languages
Chinese (zh)
Other versions
CN101833422A (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Symantec 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 Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN2010101221450A priority Critical patent/CN101833422B/en
Publication of CN101833422A publication Critical patent/CN101833422A/en
Application granted granted Critical
Publication of CN101833422B publication Critical patent/CN101833422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides data processing method and device for a disk array. The method comprises the following steps of: orderly reading each set of strip data in each non-fault disk into a first solid hard disk of which the preset storage capacity is at least two sets of strip data; while reading the strip data to the first solid hard disk, orderly reconstructing the read strip data in each set in the first solid hard disk, and writing the data acquired by reconstruction into a hot spare disk; and when the strip data in the first solid hard disk reaches a preset storage capacity, orderly reading the strip data in each set in each non-fault disk into the first solid hard disk to cover the reconstructed strip data in the first solid hard disk. By introducing multiple sets of strip data into the RAID5 disk array, when the disk array is in the degrading mode, the SSD hard disk is used as a cache for prefetching the data in the non-fault disk, thereby enhancing the reconstruction speed of the disk array and reducing the risk of second disk failure in the degrading mode.

Description

The data processing method of disk array and equipment
Technical field
The present invention relates to computer memory technical, relate in particular to a kind of data processing method and equipment of disk array.
Background technology
Redundant Arrays of Inexpensive Disks (Redundant Arrays of Inexpensive Disks; Be called for short RAID) be a kind of with polylith independently hard disk be combined to form an independent logic hard disk groups according to different modes, thereby the technology of the memory property higher than single hard disk is provided.For a RAID5 disk array, when member's hard disk breaks down in the RAID5 disk array, being damaged data and can being able to according to the data on the non-faulty disk recover and rebuilding on its faulty disk.
In the prior art; The RAID5 disk array is when carrying out the data reconstruction; Usually can with the band unit with the data in the non-failed disk by disk array controller; The sequence of operation of " the reading-rebuild " of carrying out successively according to circulating is carried out the reconstruction of data in the faulty disk successively, and the band of indication is the storage unit of the minimum that each disk is divided in the disk array here.Disk array controller reads out one group of strip data at every turn from non-faulty disk, have only and organize reading of strip data with just carrying out next after the present group strip data reconstruction completion of reading, and next group strip data is rebuild.But; The inventor finds in realizing process of the present invention: this data re-establishing method of prior art makes controller after every group of strip data rebuild completion; All need the regular hour to wait for next group data; Be not carry out continuously between adjacent twice reconstruction operation, have certain interval time, cause the reconstruction time lengthening of disk array this interval time; Especially when the data that need are rebuild are more, will badly influence the whole body reconstruction speed of disk array a plurality of interval times.
Summary of the invention
The embodiment of the invention provides a kind of data processing method and equipment of disk array, realizes the data reconstruction mode of more optimizing of disk array.
The embodiment of the invention provides a kind of data processing method of disk array, comprising:
Read respectively the organizing in strip data to the first solid state hard disc of each non-failed disk successively, the preset memory capacity of said first solid state hard disc is at least two group strip data;
Reading said strip data in said first solid state hard disc, strip data is rebuild and the data that will rebuild acquisition write in the HotSpare disk to respectively organizing of having read in said first solid state hard disc successively;
When the strip data in said first solid state hard disc reaches said preset memory capacity and exists when having accomplished the strip data of reconstruction; Be back to read each non-failed disk successively respectively organize the step in strip data to the first solid state hard disc, to cover the strip data of having accomplished reconstruction in said first solid state hard disc.
The embodiment of the invention provides a kind of Disk Array, comprises the disk array and first solid state hard disc, and said a plurality of disks are carried out the disk array controller of data processing and control, and said disk array controller comprises:
First data-reading unit, be used for reading successively said disk array each non-failed disk respectively organize strip data to said first solid state hard disc, the preset memory capacity of said first solid state hard disc is at least two group strip data;
The data reconstruction unit; Be used for reading said strip data in said first solid state hard disc in said first data-reading unit, strip data is rebuild and the data that will rebuild acquisition write in the HotSpare disk of disk array to respectively organizing of having read in said first solid state hard disc successively;
First data are read again and are got the unit; Being used for strip data when said first solid state hard disc reaches said preset memory capacity and exists when having accomplished the strip data of reconstruction; Be back to said first data-reading unit read each non-failed disk successively respectively organize the step in strip data to the first solid state hard disc, to cover the strip data of having accomplished reconstruction in said first solid state hard disc.
The data processing method of the disk array of the embodiment of the invention and equipment; Through in the RAID5 disk array, introducing solid state hard disc (the Solid State Disk that can hold many group strip data; Hereinafter to be referred as SSD), when member's hard disk of RAID5 disk array breaks down, with the buffer memory of SSD hard disk as the data reconstruction of looking ahead; Make in the process that the data of RAID5 disk array are rebuild; Can read many group strip data in advance to the SSD hard disk, carry out reading and reconstruction operation of data simultaneously, between twice reconstruction of adjacent ribbons data, need not the time of waiting for that data read; Thereby improved the whole reconstruction speed of disk array, reduced the risk that second disk lost efficacy under the degraded mode.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply; Obviously, the accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
The process flow diagram of the data processing method of the disk array that Fig. 1 provides for the embodiment of the invention one;
The process flow diagram of the data processing method of the disk array that Fig. 2 provides for the embodiment of the invention two;
Fig. 3 is the process flow diagram of read request response when data are rebuild in the embodiment of the invention;
Fig. 4 writes the process flow diagram of request response when rebuilding for data in the embodiment of the invention;
The process flow diagram of the data processing method of the disk array that Fig. 5 provides for the embodiment of the invention three;
The structural representation of the Disk Array that Fig. 6 provides for the embodiment of the invention four;
The structural representation of the Disk Array that Fig. 7 provides for the embodiment of the invention five.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The process flow diagram of the data processing method of the disk array that Fig. 1 provides for the embodiment of the invention one, as shown in Figure 1, this method comprises:
Step 100 reads respectively the organizing in strip data to the first solid state hard disc of each non-failed disk successively, and the preset memory capacity of first solid state hard disc is at least two group strip data;
Particularly, the embodiment of the invention is mainly used in the RAID5 disk array of data reconstruction processes.For a RAID5 disk array; Its inside comprises a plurality of member's disks; During the storage data; RAID5 with data and its corresponding checking information interleaved in the different members dish of forming RAID5, when one of them member's disk breaks down and after wherein data are damaged, the disk array controller of the concrete operations of each member's disk of control in the disk array; Can utilize the data that are damaged in data remaining in other several non-failed disk and the corresponding check information recovered failure disk, the function that these data are recovered is called the redundancy feature of RAID5 disk array.At this moment, the HotSpare disk of RAID5 disk array is with the failed disk that alternate data is damaged, and the data that are resumed also will be stored in this HotSpare disk successively.
In the present embodiment, in the RAID5 disk array, introduced a SSD hard disk, this SSD hard disk serves as the buffer memory of the need data reconstruction of reading in advance in the process of reconstruction of RAID5 disk array, and claims that in the present embodiment the SSD hard disk of this introducing is a SSD hard disk.Particularly; When member's disk of RAID5 disk array breaks down; The controller of this disk array will be in advance according to band alignment sequence of data in each non-failed disk; The strip data of respectively organizing in remaining each non-failed disk is read in the SSD hard disk successively, and the preset memory capacity of a SSD hard disk is at least two group strip data.One of indication group of strip data is in the RAID5 disk array here, the data of being stored in one group of stripe cell of all non-failed disk.
Need to prove; Because a SSD hard disk is the storage that unit carries out data with each the group strip data in the non-failed disk; Therefore in the present embodiment; When selecting to have a SSD hard disk of certain storage capacity, optimal scheme is that SSD hard disk that to choose preset memory capacity be integer group strip data is as a SSD hard disk, so that a SSD hard disk is when prestoring to each group strip data; The one SSD hard disk can just in time be stored the strip data of integer group, thereby avoids occurring storage space unnecessary in the SSD hard disk causes the wasting of resources because of being not used situation.
Step 101 is reading said strip data in said first solid state hard disc, and strip data is rebuild and the data that will rebuild acquisition write in the HotSpare disk to respectively organizing of having read in first solid state hard disc successively;
In the present embodiment; In order to improve the whole body reconstruction speed of RAID5 disk array; The time of shorten rebuilding, disk array controller read successively respectively organize strip data to a SSD hard disk in, with according to the strip data of respectively organizing that has read in the SSD hard disk corrupt data in the faulty disk being rebuild successively; Through a SSD hard disk to the prestoring of strip data, will reading and the reconstruction of strip data carried out synchronously to strip data.And every rebuild the data of a stripe cell in the former faulty disk according to one group of strip data in the SSD hard disk after, disk array controller will be rebuild the data that obtain and write in the HotSpare disk, so that the data that are damaged in the former fault disk are able to recover.And this HotSpare disk also will replace original failed disk, become new member's disk in the RAID5 disk array after the reconstruction.
Particularly, in order to enter into the process of reconstruction as early as possible, disk array controller can just begin according to this group strip data first group of data in the failed disk to be rebuild after first group of strip data intactly read in the SSD hard disk.And in this simultaneously; The one SSD hard disk does not stop the reading of strip data of respectively organizing in each non-failed disk; Promptly when disk array controller is rebuild first group of strip data in the SSD disk, in the non-failed disk second group, the 3rd group ... n group strip data still in turn is being read to a SSD hard disk.And because faster than the reconstruction time to the time for reading of strip data usually; Therefore; After disk array controller has been rebuild first group of strip data; Just Already in the SSD hard disk, disk array controller need not to wait for the time for reading of second group of strip data again, just can directly rebuild this second group of strip data for second group of strip data even the 3rd group, the 4th group strip data; Thereby realized need not between the reconstruction of two adjacent groups strip data time of waiting for that data read, improved the whole reconstruction speed of disk array.Promptly through in data in advance buffer memory to the SSD hard disk that needs are rebuild, make data reconstruction and read and can carry out simultaneously, especially when the data that need are rebuild are more, can improve whole reconstruction speed significantly.
Step 102 when the strip data in first solid state hard disc reaches preset memory capacity and exists when having accomplished the strip data of reconstruction, is back to step 100, to cover the strip data of having accomplished reconstruction in first solid state hard disc.
In the present embodiment; Only if the preset memory capacity of a SSD hard disk greater than in each non-failed disk the storage all strip data total volume, thereby in step 100, can be through reading each strip data in the non-failed disk successively; Strip data in all non-failed disk all is stored in the SSD hard disk; Otherwise all strip data can not disposablely all be buffered to a SSD hard disk in the non-failed disk, need be through reading just can be buffered and finish repeatedly.And in practical application; In order to save cost, a SSD hard disk can not have very big preset memory capacity usually, has reached maximum memory capacity but therefore work as a SSD hard disk; During one group strip data more than promptly can not holding again again; If after waiting for that all strip data of storing in the SSD hard disk are all accomplished reconstruction, from non-failed disk, read in strip data to the SSD hard disk, must can cause read waiting time once this moment again again.And further, less relatively if the preset memory capacity of a SSD hard disk is set up, after several groups of strip data of every reconstruction, all need read waiting time once, must still can cause the unnecessary increasing of entire system reconstruction time.
Therefore; In the present embodiment, the strip data of in a SSD hard disk, being stored reaches preset memory capacity, and when in a SSD hard disk, having the strip data of accomplishing reconstruction; Disk array controller will be back in the step 100; According to putting in order of the strip data in the same non-failed disk, read equally successively and respectively organize in strip data to the SSD hard disk, till the strip data of having rebuild with a SSD hard disk covers.And when this reads strip data; The strip data of not rebuilding in the one SSD hard disk still the data storage after in turn rebuilding and will rebuilding to HotSpare disk; Therefore; Read at this and to finish, reach after the preset memory capacity in the SSD hard disk, possibly have the strip data of accomplishing reconstruction in the SSD hard disk again and exist.Therefore; Disk array controller will be back in the step 100 again once more; From non-failed disk, read in new strip data to the SSD hard disk; To cover the strip data of accomplishing reconstruction new in the SSD hard disk, by that analogy, till all strip data in non-failed disk are all finished by reconstruction.
Thus; Disk array controller has just been accomplished the process of reconstruction to all data in the failed disk; And because in this step, the strip data that disk array controller is stored in each SSD hard disk reaches preset memory capacity, and exist when having accomplished the strip data of reconstruction; All will continue to read new strip data to the SSD hard disk from non-failed disk; Thereby make disk array controller in the process that the strip data in the SSD hard disk is rebuild, all need not to wait the time for reading of pending data between the reconstruction of any two groups of strip data, can realize the continuous execution that data are rebuild; Improve the whole reconstruction speed of disk array further, reduced the RAID disk array risk that second disk lost efficacy under degraded mode.
The data processing method of the disk array of present embodiment; Through in the RAID5 disk array, introducing the SSD hard disk that can hold many group strip data, when member's hard disk of RAID5 disk array breaks down, with the buffer memory of SSD hard disk as the data reconstruction of looking ahead; Make in the process that the data of RAID5 disk array are rebuild; Can read many group strip data in advance to the SSD hard disk, carry out reading and reconstruction operation of data simultaneously, between twice reconstruction of adjacent ribbons data, need not the time that certain wait data read; Thereby improved the whole reconstruction speed of disk array, reduced the risk that second disk lost efficacy under the degraded mode.
The process flow diagram of the data processing method of the disk array that Fig. 2 provides for the embodiment of the invention two, as shown in Figure 2, this method comprises:
Step 200; First mapping relations according to each a non-failed disk and a SSD hard disk; Read respectively the organizing in strip data to the SSD hard disk of each non-failed disk successively; And, read respectively the organizing in strip data to the two SSD hard disks of each non-failed disk successively according to second mapping relations of each non-failed disk and the 2nd SSD hard disk;
In the present embodiment; In order to make respectively organizing strip data and can more accurately read in the SSD hard disk in an orderly manner in each non-faulty hard disk; Between a SSD hard disk and each non-failed disk, mapping relations have in correspondence with each other been set up; In the present embodiment, claim that these mapping relations are first mapping relations.These first mapping relations are specially: several first storage unit that the memory capacity of a SSD hard disk is formed by dividing fifty-fifty, equates with each non-failed disk number, wherein each first storage unit are all corresponding with each non-failed disk respectively.After having set up first mapping relations; Disk array controller is when reading to each strip data in the non-failed disk in the one SSD hard disk successively; Will be in strict accordance with these first mapping relations, the data of the stripe cell of each non-failed disk are read in first corresponding with this non-failed disk in the SSD hard disk storage unit successively.Thus; Each non-failed disk all with a SSD hard disk in each first storage unit corresponding; Disk array controller carry out in the SSD hard disk respectively organize strip data read in and when swapping out; Be convenient to very much its management of respectively organizing strip data, make respectively organizing strip data and can accurately store in an orderly manner in the SSD hard disk of winning storing in the SSD hard disk.
Further; In the RAID5 of present embodiment disk array; Can also correspondence be provided with one become mirror with a SSD hard disk the 2nd SSD hard disk; Therefore in the present embodiment, when disk array controller when the data in the SSD hard disk are carried out any alter operation, all tackle the 2nd SSD hard disk and do same mirror image operation.Particularly; In this step; Disk array controller is in first mapping relations according to each a non-failed disk and a SSD hard disk; In the time of successively with respectively the organizing strip data and read in the SSD hard disk of each non-failed disk,, read respectively the organizing in strip data to the two SSD hard disks of each non-failed disk successively also simultaneously according to second mapping relations of each non-failed disk and the 2nd SSD hard disk.
Particularly, the preset memory capacity of the 2nd SSD hard disk equates that with the preset memory capacity of a SSD hard disk two SSD hard disks are mirror, and the data changes with time in data of storing in the 2nd SSD hard disk and the SSD hard disk is consistent.And likewise; The 2nd SSD hard disk has been set up the mutual second corresponding mapping relations with each non-failed disk; These second mapping relations are identical with first mapping relations; Be specially: the memory capacity of the 2nd SSD hard disk is divided fifty-fifty and formed several second storage unit that equate with each non-failed disk data, and wherein each second storage unit is all corresponding with each non-failed disk respectively.Thus; In the present embodiment, when a SSD hard disk of introducing breaks down, because consistent in the data of storing in the 2nd SSD hard disk and the SSD hard disk; Can carry out the operation that data are rebuild equally through the 2nd SSD hard disk, also guarantee safety of data on the SSD hard disk simultaneously.
Need to prove in addition; Because when setting up first mapping relations and second mapping relations; Need be a plurality of storage spaces that equate with non-failed disk quantity with a SSD hard disk and the 2nd SSD hard disk partition; Therefore, when choosing SSD hard disk with certain storage capacity and the 2nd SSD hard disk, optimal scheme is that to choose memory capacity be that the SSD hard disk of the integral multiple of non-failed disk number is a SSD hard disk; So that a SSD hard disk is according to first mapping relations and second mapping relations; When each group strip data is prestored, can not exist in a SSD hard disk and the 2nd SSD hard disk, because the situation of the wasting of resources that the unnecessary storage space of residue causes because of being not used occurs.
Step 201 is reading said strip data in the said SSD hard disk, and strip data is rebuild and the data that will rebuild acquisition write in the HotSpare disk to respectively organizing of having read in the SSD hard disk successively;
In the present embodiment; Though in the RAID5 disk array, introduce in the SSD hard disk; Also introduced the 2nd SSD hard disk that becomes mirror with a SSD hard disk, still, the strip data in the SSD hard disk has been rebuild; And will rebuild the data that obtain when writing in the HotSpare disk, but the strip data in the 2nd SSD hard disk is not carried out same reconstruction operation.Only breaking down and when causing corrupted data when a SSD hard disk; Just utilize the 2nd SSD hard disk; Carry out the process that data are rebuild with same method, the not reconstruction strip data in the 2nd SSD hard disk is rebuild, and the data that will rebuild acquisition write in the HotSpare disk.
Step 202 when the strip data in the SSD hard disk reaches preset memory capacity and exists when having accomplished the strip data of reconstruction, is back to step 200, to cover the strip data of accomplishing reconstruction in a SSD hard disk and the 2nd SSD hard disk.
Particularly; Because in the present embodiment, in the RAID5 disk array, introduce in the SSD hard disk, also introduced the 2nd SSD hard disk that becomes mirror with a SSD hard disk; And the preset memory capacity of the preset memory capacity of the 2nd SSD hard disk and a SSD hard disk equates; Therefore, reach preset memory capacity in the strip data of storing in the SSD hard disk, and when having the strip data of accomplishing reconstruction; The strip data of storing in the 2nd SSD hard disk has equally also reached preset memory capacity, and has the strip data of having accomplished reconstruction equally.So; For make the strip data of storing in the 2nd SSD hard disk at any time with a SSD hard disk in strip data be consistent; Disk array controller will return in the step 200 once more; Carry out synchronously and from non-failed disk, read the operation in new strip data to a SSD hard disk and the 2nd SSD hard disk; Covering the strip data of accomplishing reconstruction of the correspondence in a SSD hard disk and the SSD hard disk simultaneously, and in this process of reading, the reconstruction operation to the strip data of not rebuilding in the SSD hard disk in the step 201 is still synchronously being carried out.
The data processing method of the disk array of present embodiment; Through in the RAID5 disk array, introducing two SSD hard disks that can hold many group strip data; When member's hard disk of RAID5 disk array breaks down,, from non-failed disk, read strip data simultaneously to these two SSD hard disks according to the mapping relations of these two SSD hard disks and non-failed disk; Make in the process that the data of RAID5 disk array are rebuild; Can carry out reading and reconstruction operation of data synchronously, between twice reconstruction of part adjacent ribbons data, need not the time that certain wait data read, thereby improve the whole reconstruction speed of disk array; Reduced the risk that second disk lost efficacy under the degraded mode, and the mirror between two SSD hard disks has also guaranteed safety of data on the SSD hard disk simultaneously.
In embodiments of the present invention; In the process as if the reconstruction of corrupt data in the RAID5 disk array is realized faulty disk through employing SSD hard disk; This disk array receives the read-write requests that main frame sends; In embodiment three provided by the invention, disk array can be made normal response to the read-write requests of main frame equally.And because in present embodiment three; Introduced the buffer memory of SSD hard disk as the strip data in the non-failed disk of reading in advance; Therefore the data of working as the corresponding stripe cell of data to be read data perhaps to be written; When just in time being buffered to the SSD hard disk, disk array controller can also directly return data to be read to main frame from the SSD hard disk, perhaps directly data to be written is write in the SSD hard disk.Thus; Because the read or write speed of SSD hard disk is far longer than the read or write speed of RAID5 disk array self, in the buffer memory of SSD hard disk as the data reconstruction of looking ahead, with this SSD hard disk as the buffer memory that reads and writes data; From the SSD hard disk, directly carry out data write; Can when reaching the effect that improves the data reconstruction speed, improve the read or write speed of partial data, reduce reconstruction operation is handled the read-write requests ability to the RAID5 disk array under the degraded mode influence.To disk array in the present embodiment three when utilizing a SSD hard disk to carry out the data reconstruction, make detailed description below to the responding process of main frame read-write requests.
Fig. 3 is the process flow diagram of read request response when data are rebuild in the embodiment of the invention.As shown in Figure 3, the response process to the read request of main frame in the present embodiment comprises:
Step 300 receives the read request that main frame sends;
Whether step 301, the data to be read of judging read request corresponding to non-failed disk, if, execution in step 302, if not, execution in step 305;
When the RAID5 disk array receives the read request that main frame sends, at first will judge data to be read in this read request whether corresponding to the non-failed disk of this RAID5 disk array, promptly whether this read request is that main frame is operated the read request of non-failed disk.Since at main frame when the RAID5 disk array sends the read request instruction; In this read request instruction, can carry the address of reading of this read request usually; Therefore; Read the address according to this, it is the read operation of main frame to data in the non-failed disk of disk array that disk array controller will determine this read request at an easy rate, or main frame is to the read operation of data in the failed disk.According to the difference of the corresponding disk type of read request, the RAID5 disk array will be made different responses.
Step 302 judges whether the data to be read of read request are present in the SSD hard disk, if, execution in step 303, if not, execution in step 304;
When the read request that receives is the read request operation of main frame to non-failed disk; Be data to be read in the read request during corresponding to the non-failed disk of RAID5 disk array, disk array controller judges then whether the data to be read in this read request are present in the SSD hard disk.Because the read request described in the present embodiment is the disk array read request that main frame sends in data reconstruction processes, therefore, if when this read request be the read request operation to non-failed disk, the data to be read of this read request correspondence possibly be in two states.Data to be read possibly only not be present in the corresponding non-failed disk, also just in time have been read to a SSD hard disk, promptly are present in simultaneously in a SSD hard disk and the non-failed disk; Perhaps, these data to be read only are present in the non-failed disk, are not present in the SSD hard disk.For these two kinds of different data modes, in the present embodiment, disk array to the concrete response process of read request also with difference.
Step 303 is back to main frame with data to be read, process ends from a SSD hard disk;
If the data to be read in the read request are present in the SSD hard disk; Because the reading and writing data speed of SSD hard disk is far longer than data write speed in the RAID5 disk array; Therefore this moment data to be read are directly returned to main frame from a SSD hard disk; With this read request of response main frame, with improving the response speed of RAID5 disk array greatly to this read request.
Step 304 is back to main frame with data to be read, process ends from non-failed disk;
If the data to be read in the read request are not present in the SSD hard disk; Promptly these data to be read only are present in the non-failed disk; Also be not read to a SSD hard disk, possibly these data to be read finished, and in a SSD hard disk, correspondingly removed by reconstruction; Might these data to be read also do not rebuild yet, and be not read to a SSD hard disk yet.Therefore this moment, disk array will be back to main frame with data to be read from non-failed disk, and this operation response and RAID disk array be not when being in the process that data rebuild, and non-failed disk is to the response process unanimity of the read request of main frame.And disk array returns data to be read from non-failed disk after, the also corresponding end of this flow process.
Step 305 judges whether data to be read are rebuild and be stored in the HotSpare disk, if, execution in step 306, if not, execution in step 307;
If in above-mentioned steps 301; If receiving the read request of main frame transmission, the RAID5 disk array is read request operation to failed disk; When the corresponding data to be read of read request that promptly obtain through judgement are the corrupt data in the failed disk; At this moment, also there are two kinds of data modes in these data to be read.Might these data to be read be finished by reconstruction, promptly this corrupt data can be read to main frame by complete recovery and be stored in the HotSpare disk; Might these data to be read also do not rebuild, promptly this corrupt data does not also recover, so it can not be read to main frame yet.For these two kinds of different data modes, the concrete response process of disk array is also with different.
Step 306 is back to main frame with data to be read, process ends from HotSpare disk;
The corresponding data to be read of the read request that obtains receiving when judgement are rebuild and have been stored in the HotSpare disk; Promptly these data to be read are intactly recovered; At this moment; Disk array controller will be back to main frame with data to be read from HotSpare disk, this operation is equivalent to from former fault disk, return data to be read, and the responding process of this read request is also with corresponding end.
Step 307 is hung read request in the repeating transmission read request chained list process ends;
When the corresponding data to be read of read request that judgement obtains receiving are not also rebuild; Promptly these data to be read also are not resumed; At this moment; No matter whether the strip data in the non-faulty disk of this data correspondence to be read has been read to first solid state hard disc, the RAID5 disk array all can be hung this read request in the repeating transmission read request chained list of main frame, so that main frame resends the read request to these data to be read again behind setting-up time; Intactly recovered up to these data to be read, and can from HotSpare disk, be back to till the main frame.
Thus; Through judging the various distinct data states of the data to be read that read request is corresponding; And when data to be read are in distinct data states, read request is carried out different processing, make that working as read request is the read request operation to non-failed disk; And when data to be read just in time are present in the SSD hard disk; The RAID5 disk array directly returns to main frame with data to be read from a SSD hard disk, improved the response speed of the part read request of RAID5 disk array, has reduced the influence of reconstruction operation to the processing of the RAID5 disk array under degraded mode read request ability.
Fig. 4 writes the process flow diagram of request response when rebuilding for data in the embodiment of the invention.As shown in Figure 4, the request responding process of writing to main frame in the present embodiment comprises:
Step 400 receives the request of writing that main frame sends;
Whether step 401 judges the stripe cell of writing in the request to be written corresponding to non-failed disk, if, execution in step 402, if not, execution in step 409;
Consistent with the treatment scheme of read request; When the RAID5 disk array receive that main frame sends write request the time; At first will judge this and write stripe cell to be written in the request whether corresponding to the non-failed disk of this RAID5 disk array, promptly this whether write request be the read request operation of main frame to non-failed disk.Owing to send when writing request instruction to the RAID5 disk array at main frame; Be unit with the stripe cell normally, some disks are carried out writing of data, and write at this and can carry this in request instruction usually and write writing the address and writing of request into data; Therefore; Write the address according to this, disk array controller will determine this at an easy rate, and to write request be to be the write operation of main frame to the non-failed disk of disk array, still is the write operation of main frame to failed disk.According to the difference of writing the corresponding disk type of request, the RAID5 disk array will be made different responses.
Step 402 judges whether the data with existing in the stripe cell to be written is present in the SSD hard disk, if, execution in step 403, if not, execution in step 406;
When the request of writing that receives is the write solicit operation of main frame to non-failed disk; When promptly writing stripe cell to be written in the request corresponding to the non-failed disk of RAID5 disk array, disk array controller judges then whether the data with existing in this stripe cell to be written is present in the SSD hard disk.Because the request of writing described in the present embodiment is the disk array request of writing that main frame sends in data reconstruction processes; Therefore; If this write the request for to non-failed disk write solicit operation the time, this data with existing of writing in the stripe cell to be written in the request possibly be in two states.Data with existing in the stripe cell to be written possibly only not be present in the corresponding non-failed disk, also just in time has been read to a SSD hard disk, and promptly it is present in a SSD hard disk and the non-failed disk simultaneously; Perhaps, the data with existing in the stripe cell to be written only is present in the non-failed disk, is not present in the SSD hard disk.For these two kinds of different data modes, in the present embodiment, disk array to the concrete response process of writing request also with difference.
Step 403 judges whether the data with existing in the said stripe cell to be written has accomplished reconstruction, if, execution in step 404, if not, execution in step 405;
If the data with existing of writing in the stripe cell to be written in the request is present in the SSD hard disk; Promptly this is write the pairing need of request and carries out data updated when in data reconstruction processes, being buffered to a SSD hard disk; Because the strip data of buffer memory also can be divided in the SSD hard disk: accomplished the strip data of reconstruction and do not accomplished the strip data of rebuilding; And for different data modes, the concrete operation response of disk array is with different.Therefore; Obtain writing in the request in judgement to non-faulty disk; After data with existing in the stripe cell to be written has been present in the SSD hard disk, in this step, need judge also whether the data with existing in this stripe cell to be written has accomplished reconstruction in a SSD hard disk.
Step 404; According to the strip data corresponding in Data Update the one SSD hard disk to be written with stripe cell to be written; And upgrade in a SSD hard disk or the HotSpare disk and stripe cell corresponding check data to be written; And with the more new logo set of the strip data of the correspondence in the SSD hard disk, process ends;
If writing in the request to non-failed disk; Data with existing in the stripe cell to be written is present in the SSD hard disk and has accomplished when rebuilding, and shows that data corresponding with this stripe cell to be written in the faulty disk are finished by reconstruction and are stored in the HotSpare disk.At this moment; Disk array controller will be at first according to the strip data corresponding with stripe cell to be written in Data Update the one SSD hard disk to be written; With Data Update corresponding with stripe cell to be written in the SSD hard disk is the data of writing in the request to be written, in addition, because in the RAID5 disk array; Data are that interleaved is in each member's disk with its corresponding check data; For one group of strip data in one group of horizontal bar tape cell of RAID5 disk array, the checking data of this strip data possibly be stored in arbitrary member's disk, therefore; Change for arbitrary data in this group strip data all will cause the change of its corresponding check information.
Therefore; In the present embodiment; When the data with existing in the stripe cell to be written is present in the SSD hard disk and has accomplished reconstruction; Except being the data of writing in the request to be written with Data Update corresponding in the SSD hard disk, also needing correspondingly to upgrade the checking data of this group strip data, otherwise can produce the mistake of data with stripe cell to be written.Particularly, in the present embodiment, for strip data corresponding in the SSD hard disk with stripe cell to be written; And data corresponding with this strip data in the HotSpare disk, the checking data of these group data possibly be present in the SSD hard disk, promptly is present in the non-failed disk simultaneously; Also might be present in the HotSpare disk; In the failed disk before promptly being present in, therefore, when upgrading the checking data of these group data; Will be according to the memory location of strip data; To upgrading accordingly with stripe cell corresponding check data to be written in a SSD hard disk or the HotSpare disk, like this, just accomplished the RAID disk array at last this has been write the request responding process.
Further; After above-mentioned renewal operation is accomplished; The RAID5 disk array is also with in the SSD hard disk; The more new logo set of the strip data corresponding with the stripe cell to be written of writing request so that the RAID5 disk array in rebuilding flow process according to this new logo more in the SSD hard disk, with set in the non-failed disk more the strip data of new logo be updated to the strip data in the SSD hard disk; Completion writes the real data of non-failed disk, makes data and the data consistent in the non-failed disk in the SSD hard disk of winning.The detailed process of this operation will be described in detail in the reconstruction main flow of present embodiment.
Because the reading and writing data speed of SSD hard disk is far longer than data write speed in the RAID5 disk array; Therefore this moment is directly according to data to be written; Corresponding data in the SSD hard disk upgrades; With the response main frame this write request, will improve the RAID5 disk array greatly this will be write request responding speed.
Need to prove in addition; If in the present embodiment, when also having introduced the 2nd SSD hard disk simultaneously in the RAID5 disk, consistent for data in the data that guarantee the 2nd SSD hard disk and the SSD hard disk; In this step; The strip data corresponding in according to Data Update the one SSD hard disk to be written with stripe cell to be written, and in upgrading a SSD hard disk with stripe cell corresponding check data to be written the time, also simultaneously according to data to be written; Strip data to corresponding with stripe cell to be written in the 2nd SSD hard disk is upgraded, and to upgrading with stripe cell corresponding check data to be written in the 2nd SSD hard disk.
Step 405, according to the strip data corresponding in Data Update the one SSD hard disk to be written with stripe cell to be written, and the more new logo set of strip data that should correspondence, process ends;
If writing in the request to non-failed disk; But data with existing in the stripe cell to be written is present in the SSD hard disk accomplishes when rebuilding, show in the former faulty disk, with non-failed disk in the corresponding data of this stripe cell to be written also by reconstruction and be not stored in the HotSpare disk.At this moment; The RAID5 disk array equally will be according to the strip data corresponding with stripe cell to be written in Data Update the one SSD hard disk to be written; But different with in the step 404, this moment, the renewal to strip data corresponding in the SSD hard disk was divided into two kinds of situation:
First kind of situation; Do not comprise checking data in this group strip data in the one SSD hard disk; In such cases, the checking data of this group strip data should be present in the former fault disk that has damaged, but since this moment disk array controller the reconstruction of this group strip data is not also begun; Promptly these group strip data corresponding check data also are not able to recover by reconstruction, and are stored in the HotSpare disk.Therefore, it be data to be written that disk array controller only needs Data Update corresponding with stripe cell to be written in the SSD hard disk at this moment, and need not HotSpare disk is carried out any operation.After to this group strip data process of reconstruction in; Disk array controller will be according to the strip data in the SSD hard disk after upgrading; Rebuild the checking data in the former fault disk; And be stored in the HotSpare disk, nature checking data to this group strip data when rebuilding upgrades, and can not produce the mistake of data;
Another kind of situation comprises checking data in this group strip data in the one SSD hard disk, and in such cases, the checking data of this group strip data is present in a non-failed disk and the SSD hard disk.At this moment; So-called according to strip data corresponding in Data Update the one SSD hard disk to be written with stripe cell to be written can for; With Data Update corresponding with stripe cell to be written in the SSD hard disk is data to be written, and according to data to be written with upgrading with stripe cell corresponding check data to be written in the SSD hard disk.Thus; Strip data corresponding with stripe cell to be written in the one SSD hard disk has just obtained complete renewal; And after to this group strip data reconstruction operation in; According to data and the checking data corresponding with stripe cell to be written in the SSD hard disk after upgrading, the data of rebuilding in the HotSpare disk that obtains also will be the data in the former fault disk, and the mistake of data can not occur.
Further; No matter above-mentioned which kind of situation that is specially is operated in the renewal of strip data corresponding in the SSD hard disk; After upgrading operation and accomplishing, the RAID5 disk array is also with in the SSD hard disk, the more new logo set of the strip data corresponding with the stripe cell to be written of writing request; So that the RAID5 disk array in the main flow of rebuilding according to this new logo more in the SSD hard disk; With set in the non-failed disk more the strip data of new logo be updated to the strip data in the SSD hard disk, the real data of accomplishing non-failed disk write, and make data and the data consistent in the non-failed disk in the SSD hard disk of winning.The detailed process of this operation will be described in detail in the reconstruction main flow of present embodiment.
Equally; Because the reading and writing data speed of SSD hard disk is far longer than data write speed in the RAID5 disk array; Therefore this moment is directly according to data to be written; Corresponding data in the SSD hard disk upgrades, with the response main frame this write request, improved the RAID5 disk array greatly this write request responding speed.
Need to prove in addition,,, prevent to cause the situation of loss of data, in the RAID5 disk array, also introduced the 2nd SSD hard disk simultaneously because of SSD dish breaks down in order to guarantee the safety of data on the SSD dish if in the present embodiment.This moment is consistent for data in the data that guarantee the 2nd SSD hard disk and the SSD hard disk; In this step; In according to Data Update the one SSD hard disk to be written in the strip data corresponding with stripe cell to be written; Also, strip data corresponding with stripe cell to be written in the 2nd SSD hard disk is upgraded simultaneously according to data to be written.
Step 406 judges whether the data with existing in the unit to be written has accomplished reconstruction, if, execution in step 407, execution in step 408 if not;
If in above-mentioned steps 406; Judge the writing in the request that obtains to non-failed disk; Data with existing in the stripe cell to be written is not present in the SSD hard disk, and promptly the data with existing in this stripe cell to be written also is not buffered to a SSD hard disk, only in existence and the non-failed disk.The data with existing of the unit to be written in this non-failed disk also can be divided into two kinds at this moment, and a kind of is the data of having accomplished reconstruction, and a kind of is the data of not accomplishing reconstruction, and for different data modes, the concrete operation response of disk array is with different.Therefore; Obtain to the writing in the request of non-faulty disk, after the data with existing in the stripe cell to be written has been present in the SSD hard disk, in this step in judgement; Need judge also in the non-failed disk, whether the data with existing in the stripe cell to be written has accomplished reconstruction.
Step 407 according to the data of stripe cell to be written in the non-failed disk of Data Update to be written, and is upgraded in non-failed disk or the HotSpare disk and stripe cell corresponding check data to be written, process ends;
If writing in the request to non-failed disk; Data with existing in the stripe cell to be written also is not read to a SSD hard disk; Promptly only be present in the non-failed disk and accomplished when rebuilding, show that data corresponding with this stripe cell to be written in the faulty disk are finished by reconstruction and are stored in the HotSpare disk.At this moment; Disk array controller will be at first according to the strip data in the stripe cell to be written of the non-failed disk of Data Update to be written; With the Data Update in the stripe cell to be written of non-failed disk is the data of writing in the request to be written; And for fear of the mistake that causes this group strip data, simultaneously also according to data to be written, with upgrading with these stripe cell corresponding check data to be written in non-failed disk or the HotSpare disk.Like this, be to accomplish this to write the request responding process.
Step 408 is according to strip data corresponding with stripe cell to be written in the non-failed disk of Data Update to be written, process ends;
If writing in the request to non-failed disk; Data with existing in the stripe cell to be written also is not read to a SSD hard disk; And when also accomplish rebuilding, show in the former faulty disk, with non-failed disk in the corresponding data of this stripe cell to be written also by reconstruction and be not stored in the HotSpare disk.At this moment; The RAID5 disk array equally will be according to strip data corresponding with stripe cell to be written in the non-failed disk of Data Update to be written; But different with in the step 407, this moment, the renewal to strip data corresponding in the non-failed disk was divided into two kinds of situation equally: the checking data of the strip data that this is corresponding is present in the non-failed disk, perhaps; The checking data of the strip data that this is corresponding is present in the former fault disk, also is not able to recover by reconstruction.According to these two kinds of condition of different, disk array controller also will be according to data to be written, to upgrading with stripe cell corresponding check data to be written in the non-failed disk; Perhaps, only the stripe cell to be written in the non-failed disk is upgraded.At this moment, disk array has just been accomplished this deuterzooid and has been write the request responding operation, and can not cause the appearance of the error situation of any data.
Step 409 judges whether the corresponding data of stripe cell to be written are rebuild and be stored in the HotSpare disk, if, execution in step 410, if not, execution in step 411;
If in above-mentioned steps 401; If receiving the request of writing of main frame transmission, the RAID5 disk array is the solicit operation of writing to failed disk; When the stripe cell to be written of the request of writing that promptly obtains through judgement is the stripe cell in the failed disk; Two kinds of data modes of also existence of the data of storing in this stripe cell to be written at this moment.Data in might this stripe cell to be written are finished by reconstruction, and promptly these data are intactly recovered and are stored in the HotSpare disk, therefore when carrying out write operation, can upgrade accordingly these data; Data in yet might this stripe cell to be written are not also rebuild, and promptly this corrupt data also recovers, and therefore when carrying out write operation, can not upgrade these unrecovered data.For these two kinds of different data modes, the concrete response process of disk array is with different.
Step 410 according to the data of the stripe cell to be written in the Data Update HotSpare disk to be written, and is upgraded in the non-failed disk and unit to be written corresponding check data, process ends;
Rebuild and be stored in the HotSpare disk when the data of writing in the stripe cell to be written in the request that judgement obtains receiving, promptly the data in this stripe cell to be written are intactly recovered.At this moment; Disk array controller will be according to the data of writing in the request to be written; Data in the stripe cell to be written corresponding in the HotSpare disk are upgraded; With the Data Update in the stripe cell to be written of the correspondence in the HotSpare disk is data to be written, and this operation is equivalent to the Data Update to stripe cell to be written in the former fault disk.Further; Because in such cases; Stripe cell corresponding check data to be written must be present in the non-failed disk in the HotSpare disk, and therefore, disk array controller simultaneously also will be according to data to be written; Upgrade in non-failed disk or the HotSpare disk and stripe cell corresponding check data to be written, and process ends.
Step 411, the request of will writing are hung and to retransmit to write in the request chained list, so that main frame resends the request of writing to data to be written, process ends behind setting-up time.
In the faulty disk of the request of writing that judgement obtains receiving; Data in the stripe cell to be written are not also rebuild; Promptly this need data updated of writing request also is not resumed; At this moment, no matter whether the strip data in pairing, the non-faulty disk of data in this stripe cell to be written has been read to first solid state hard disc, this is write request and can not carry out.The RAID5 disk array can be write the repeating transmission of asking extension main frame with this and write in the request chained list; So that main frame resends the request of writing to this stripe cell to be written again behind setting-up time; Data in this stripe cell to be written are intactly recovered; And till can be in HotSpare disk it being upgraded, at this moment, originally write the request responding flow process also with corresponding end.
Thus; Write the various different conditions of the data of storing in the stripe cell to be written of request through judgement; And, carry out different processing to writing request when data in the stripe cell to be written during at different conditions, make to be the solicit operation of writing to non-failed disk when writing request; And when the data in the stripe cell to be written that needs to upgrade just in time are present in the SSD hard disk; The RAID5 disk array directly upgrades the respective strap data in the SSD hard disk, has improved the part of RAID5 disk array and has write request responding speed, has reduced the influence of reconstruction operation to the RAID5 disk array processing write requests ability under the degraded mode.
The process flow diagram of the data processing method of the disk array that Fig. 5 provides for the embodiment of the invention three.In the present embodiment, because disk array controller can be when data be rebuild, the read-write requests that the response main frame sends, therefore, it causes, and corresponding change has taken place in the reconstruction main flow to the strip data in the SSD hard disk in the present embodiment.As shown in Figure 5, the data processing method of the disk array of present embodiment comprises:
Step 500 according to first mapping relations of each a non-failed disk and a SSD hard disk, reads respectively the organizing in strip data to the SSD hard disk of each non-failed disk successively, and successively the more new logo of respectively organizing strip data that has read in the SSD hard disk is resetted;
Particularly, in the present embodiment, respectively the organize strip data of disk array controller in non-failed disk with each reads in the SSD hard disk, also will successively the more new logo of respectively organizing strip data that has read in the SSD hard disk be resetted.Particularly; In the present embodiment, will be more during new logo set corresponding identification be called first sign, corresponding identification is called second sign when resetting and renewal is identified at; This first the sign can be " 1 " or " 0 " or other numerical value, and second be designated and first the sign value corresponding.Thereby in the present embodiment, disk array controller whenever reads from non-failed disk in one group of strip data to the SSD hard disk, just simultaneously the more new logo of this group strip data in the SSD hard disk is changed to second sign.This operation can be regarded as respectively organizing strip data in the SSD hard disk, the initialization of the more new logo before data are rebuild.
Need to prove that in addition if in the present embodiment, also being provided with in the RAID5 disk array with a SSD hard disk is the 2nd SSD hard disk of mirror.Therefore also comprise in this step; In first mapping relations according to each a non-failed disk and a SSD hard disk; In the time of successively with respectively the organizing strip data and read in the SSD hard disk of each non-failed disk; Also according to second mapping relations of each non-failed disk and the 2nd SSD hard disk, read respectively the organizing in strip data to the two SSD hard disks of each non-failed disk successively, guarantee the consistent of data in data and the SSD hard disk in the 2nd SSD hard disk.
Step 501 is reading strip data in the said SSD hard disk, and strip data is rebuild and the data that will rebuild acquisition write in the HotSpare disk to respectively organizing of having read in the SSD hard disk successively;
Particularly, in the present embodiment, this step can comprise following several steps:
Step 5011 when reading strip data to a said SSD hard disk, is rebuild and will be rebuild the data that obtain to the one group of strip data that has read in the SSD hard disk and write in the HotSpare disk;
In this step and the foregoing description the strip data in the SSD hard disk is rebuild, and it is consistent to rebuild the operation steps that the data that obtain write in the HotSpare disk successively.Disk array controller first group of strip data is more intactly read to after the SSD hard disk; Just begin to carry out process of reconstruction to this group strip data; And; In the present embodiment, no matter whether introduced the 2nd SSD hard disk, only the strip data of storing in the SSD hard disk has been carried out data in this step and rebuild.
Step 5012 is judged the more strip data of new logo that whether had set in the SSD hard disk, if execution in step 5013 if not, is returned step 5011;
Particularly; Different with the data re-establishing method in the foregoing description is; In the present embodiment; Because when data were rebuild, the RAID5 disk array was in the process of writing solicit operation of response main frame, when the data in the stripe cell to be written that in writing request, needs to upgrade just in time are present in the SSD hard disk; The RAID5 disk array will directly upgrade the respective strap data in the SSD hard disk, and the more new logo set of this group strip data in the SSD hard disk is become first sign.Therefore this moment, corresponding strip data will produce the inconsistent situation of data in this group strip data in the SSD hard disk and the non-failed disk, thereby can cause the data in the non-failed disk to make a mistake.So; In the present embodiment; Mistake for fear of these data; After each reconstruction of accomplishing one group of strip data in the SSD hard disk, disk array controller all will be judged the more new logo of all strip data of storing in the SSD hard disk: upgrade the strip data that is designated first sign if exist in the one SSD hard disk this moment, disk array controller will be carried out and operate consistent in the respective strap data that make in the non-failed disk and the SSD hard disk accordingly; Do not upgrade the strip data that is designated first sign if do not exist in the one SSD hard disk this moment; Then show this moment all strip data in the one SSD hard disk with non-failed disk in all respective strap data all be consistent; Therefore; Disk array controller need not to carry out any operation, only needs next the group strip data in the SSD hard disk is upgraded, and promptly is back to step 5011.
Step 5013, with set in the SSD hard disk after more the strip data of new logo is updated in the non-failed disk in the corresponding stripe cell, the more new logo of this group strip data is resetted;
If after the reconstruction of one group of strip data in accomplishing a SSD hard disk; Disk array controller obtains existing in the SSD hard disk more new logo set to become the strip data of first sign through judgement; This disk array controller can be with this set in the SSD hard disk more the strip data of new logo be updated in the stripe cell corresponding in the non-failed disk, make in the non-failed disk with corresponding data of this group strip data and a SSD hard disk in be consistent.So far, the RAID5 disk array is just calculated to have accomplished veritably and is this time write the request operation response, in the non-failed disk that has been near completion to writing the updating data to be written of request.After this, the more new logo that disk array controller also will be organized strip data resets to second sign again, so that it recovers initial value, and successively next the group strip data in the SSD hard disk is upgraded.
Step 502 when the strip data in the SSD hard disk reaches preset memory capacity and exists when having accomplished the strip data of reconstruction, is back to step 500, to cover the strip data of accomplishing reconstruction in the SSD hard disk.
The strip data of in a SSD hard disk, storing reaches preset memory capacity; And exist when having accomplished the strip data of reconstruction; Disk array controller will be back in the step 500; Again from non-failed disk, read in new strip data to the SSD hard disk, to cover the strip data of having accomplished reconstruction in the SSD hard disk.
Need to prove in addition; If in the present embodiment, also be provided with in the RAID5 disk array with a SSD hard disk mirror-image the 2nd SSD hard disk, in this step, also should comprise; Be back to step 500; Again from non-failed disk, read in new strip data to the SSD hard disk, with cover in the SSD hard disk accomplish the strip data of reconstruction the time, disk array controller also equally synchronously reads in new strip data to the two SSD hard disks from non-failed disk; Covering the strip data of accomplishing reconstruction in the 2nd SSD hard disk, guarantee the consistent at any time of data in data and the SSD hard disk in the 2nd SSD hard disk with this.
The data processing method of the disk array of present embodiment; Through in the RAID5 disk array, introducing the SSD hard disk that can hold many group strip data, when member's hard disk of RAID5 disk array breaks down, with the buffer memory of SSD hard disk as the data reconstruction of looking ahead; Make in the process that the data of RAID5 disk array are rebuild; Can read many group strip data in advance to the SSD hard disk, carry out reading and reconstruction operation of data simultaneously, between twice reconstruction of adjacent ribbons data, need not the time that certain wait data read; Thereby improved the whole reconstruction speed of disk array, reduced the risk that second disk lost efficacy under the degraded mode; Further; In the present embodiment; The RAID5 disk array can also respond the read-write requests of main frame when carrying out the data reconstruction operation normally, and in the time of the data hit SSD hard disk of read-write; This read-write requests of response has also improved the reading and writing data request answer speed under the degraded mode from the SSD hard disk.
In addition, as if read-write requests flow process, in prior art with the response main frame when data are rebuild of RAID5 disk array in the present embodiment; In the RAID5 disk array, introduce a nonvolatile memory as the buffer memory that reads and writes data; To realize that RAID5 equipment responds the compared with techniques of the read-write requests of main frame quickly, because in the scheme of introducing nonvolatile memory, the cost of nonvolatile memory is higher; Cost performance is relatively low; And it is in the process of read-write requests of response main frame, reads and writes data accordingly with the stored in form of log-structured management, and this log-structured management is more complicated in realization.Therefore, though the reading and writing data speed when nonvolatile memory has improved the RAID5 disk array reconstruction is cost with the reconstruction time that increases system, has prolonged the RAID5 disk array and be in the time under the degraded mode.And the embodiment of the invention; Reading and writing data speed when not only part has improved the RAID5 disk array reconstruction; The most important thing is to increase substantially the system reconstructing speed of RAID5 disk array; Compare the scheme of nonvolatile memory, its advantage is more outstanding, is a kind of data processing method of RAID5 disk array under the reduction pattern of more optimizing.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of programmed instruction; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
The structural representation of the Disk Array that Fig. 6 provides for the embodiment of the invention four.As shown in Figure 6, the Disk Array of present embodiment comprises a redundant array of inexpensive disks 1 and a SSD hard disk 2, and this disk array is carried out the disk array controller 3 of data processing and control.Wherein, this redundant array of inexpensive disks 1 specifically can be a RAID5 disk array, and this disk array controller 3 comprises: data-reading unit 31, data reconstruction unit 32 and data are read again and are got unit 33.Wherein data-reading unit 31 is used for successively that the preset memory capacity of respectively organizing strip data to a SSD hard disk 2, the one SSD hard disks 2 of each non-failed disk of reading disk array 1 is at least two group strip data; Data reconstruction unit 32 be used for data-reading unit 31 read respectively organize strip data to a SSD hard disk in, strip data is rebuild and will rebuild the data that obtain writes in the HotSpare disk of redundant array of inexpensive disks 1 to respectively organizing of having read in the SSD hard disk 2 successively; When data are read again and to be got unit 33 and be used for strip data when a SSD hard disk 2 and reach preset memory capacity and existence and accomplished the strip data of reconstruction; To first data-reading unit 31 send read each non-failed disk successively respectively organize the operation in strip data to the SSD hard disk 2, to cover the strip data of accomplishing reconstruction in the SSD hard disk 2.
Wherein, the related all functions module of present embodiment, with and the related concrete course of work, the related content that can disclose with reference to the related embodiment of the disposal route of above-mentioned disk array repeats no more at this.
The Disk Array of present embodiment; Through in the RAID5 disk array, introducing the SSD hard disk that can hold many group strip data, when member's hard disk of RAID5 disk array breaks down, with the buffer memory of SSD hard disk as the data reconstruction of looking ahead; Make in the process that the data of RAID5 disk array are rebuild; Can read many group strip data in advance to the SSD hard disk, carry out reading and reconstruction operation of data simultaneously, between twice reconstruction of adjacent ribbons data, need not the time of waiting for that data read; Thereby improved the whole reconstruction speed of disk array, reduced the risk that second disk lost efficacy under the degraded mode.
Further; On the basis of technique scheme; In the Disk Array of present embodiment, data-reading unit 31 specifically is used for: according to first mapping relations of a plurality of non-failed disk and a SSD hard disk 2, read successively in many group strip data to the SSD hard disks 2; These first mapping relations comprise: several first storage unit that equate with the number of non-failed disk, a SSD hard disk is formed by division, each non-failed disk is corresponding with each first storage unit respectively.
The structural representation of the Disk Array that Fig. 7 provides for the embodiment of the invention five.As shown in Figure 7, on the basis of the foregoing description four, the disk array controller 3 in the Disk Array of present embodiment also comprises first judging unit 34, first data return unit 35 and second data are returned unit 36.
Wherein, First judging unit 34 is used for: the read request that receives main frame when Disk Array; And when judging data to be read in this read request, judge whether these data to be read are present in the SSD hard disk 2 corresponding to the non-failed disk of redundant array of inexpensive disks 1:
First data are returned unit 35 and are used for: if first judging unit 34 is judged data to be read and is present in a SSD hard disk 2, then from a SSD hard disk 2, data to be read are back to main frame;
Second data are returned unit 36 and are used for: if first judging unit 34 is judged data to be read and is not present in said first solid state hard disc, then from non-failed disk data to be read are back to main frame.
Further, the Disk Array of present embodiment can also comprise: second judging unit 37, first data updating unit 38 and second data updating unit 39.
Wherein, Second judging unit 37 is used for: the request of writing that receives main frame when Disk Array; And when judging this and writing stripe cell to be written in the request, judge whether data in the stripe cell to be written are present in the SSD hard disk 2 and whether have accomplished reconstruction corresponding to non-failed disk:
First data updating unit 38 is used for: if the data with existing that second judging unit 37 is judged stripe cell to be written is present in the SSD hard disk 2 and has accomplished reconstruction; Then according to the strip data corresponding in Data Update the one SSD hard disk 2 to be written with stripe cell to be written, and renewal and stripe cell corresponding check data to be written;
Second data updating unit 39 is used for: be present in the SSD hard disk 2 and completion reconstruction if second judging unit 37 is judged the data with existing of stripe cell to be written, then according to the strip data corresponding with stripe cell to be written in Data Update the one SSD hard disk to be written.
Further, the disk array controller 3 in the Disk Array of present embodiment can also comprise: more new logo set unit 310 and the 3rd data updating unit 311.Wherein, More new logo set unit 310 is used for when first data updating unit 38 and second data updating unit 39 are according to Data Update the one SSD hard disk 2 to be written strip data corresponding with stripe cell to be written, with the more new logo set of strip data corresponding in the SSD hard disk 2; 311 of the 3rd data updating unit are used for after one group of strip data that data reconstruction unit 32 has read a SSD hard disk 2 are at every turn rebuild, with set more the strip data of new logo be updated in the stripe cell corresponding in the non-failed disk.
Further, the Disk Array of present embodiment can also comprise the 2nd SSD hard disk 4, the two SSD hard disks 4 and 2 one-tenth mirrors of a SSD hard disk.Correspondingly, the disk array controller 3 in the present embodiment can also comprise the 4th data updating unit 312, is used for the renewal according to the strip data that a SSD hard disk 2 is stored, and the data of storage in the 2nd SSD hard disk 4 are carried out identical renewal operation.
Wherein, the related all functions module of present embodiment, with and the related concrete course of work, the related content that can disclose with reference to the related embodiment of the disposal route of above-mentioned disk array repeats no more at this.
The Disk Array of present embodiment; Through in the RAID5 disk array, introducing into two SSD hard disks that can hold many group strip data of mirror, when member's hard disk of RAID5 disk array breaks down, with the buffer memory of SSD hard disk as the data reconstruction of looking ahead; Make in the process that the data of RAID5 disk array are rebuild; Can read many group strip data in advance to the SSD hard disk, carry out reading and reconstruction operation of data simultaneously, between twice reconstruction of adjacent ribbons data, need not the time of waiting for that data read; Thereby improved the whole reconstruction speed of disk array, reduced the risk that second disk lost efficacy under the degraded mode; Further; In the present embodiment, the RAID5 disk array can also respond the read-write requests of main frame when carrying out the data reconstruction operation normally; And when working as the data hit SSD hard disk of read-write; This read-write requests of response also improved the reading and writing data request answer speed under the degraded mode, and the mirror of two SSD hard disks has also guaranteed the safety of the data in the non-failed disk from the SSD hard disk.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.

Claims (12)

1. the data processing method of a disk array is characterized in that, comprising:
Read respectively the organizing in strip data to the first solid state hard disc of each non-failed disk successively, the preset memory capacity of said first solid state hard disc is at least two group strip data;
Reading said strip data in said first solid state hard disc, the data that strip data rebuild and will rebuild acquisition to the corrupt data in the faulty disk of respectively organizing according to having read in said first solid state hard disc write in the HotSpare disk successively;
When the strip data in said first solid state hard disc reaches said preset memory capacity and exists when having accomplished the strip data of reconstruction, read respectively the organizing in strip data to the first solid state hard disc of each non-failed disk successively to cover the said strip data of having accomplished reconstruction in said first solid state hard disc.
2. the data processing method of disk array according to claim 1 is characterized in that, saidly reads respectively organizing in strip data to the first solid state hard disc of each non-failed disk successively and comprises:
First mapping relations according to each non-failed disk and said first solid state hard disc; Read successively and respectively organize in strip data to said first solid state hard disc; Said first mapping relations comprise: said first solid state hard disc is divided into the storage unit that equates with said non-failed disk number and first storage unit that forms, and each said non-failed disk is corresponding with said first storage unit respectively.
3. the data processing method of disk array according to claim 1 and 2 is characterized in that, also comprises:
When the read request that receives main frame, and when judging data to be read in the said read request, judge whether said data to be read are present in said first solid state hard disc corresponding to said non-failed disk;
If, then from said first solid state hard disc, said data to be read are back to said main frame, if not, then said data to be read are back to said main frame from said non-failed disk.
4. the data processing method of disk array according to claim 1 and 2 is characterized in that, also comprises:
When the request of writing that receives said main frame; And judge saidly when writing stripe cell to be written in the request, judge then whether data in the said stripe cell to be written are present in said first solid state hard disc and whether have accomplished reconstruction corresponding to said non-failed disk;
If the data with existing in the said stripe cell to be written is present in said first solid state hard disc and has accomplished reconstruction; Then according in said first solid state hard disc of said Data Update to be written with the corresponding strip data of said stripe cell to be written, and renewal and said stripe cell corresponding check data to be written;
If the data with existing in the said stripe cell to be written is present in said first solid state hard disc and accomplish and rebuild, then according in said first solid state hard disc of said Data Update to be written with the corresponding strip data of said stripe cell to be written.
5. the data processing method of disk array according to claim 4 is characterized in that:
Said according to strip data corresponding with said stripe cell to be written in said first solid state hard disc of said Data Update to be written the time, said method also comprises: with the more new logo set of strip data corresponding in said first solid state hard disc;
After each one group of strip data that has read in to said first solid state hard disc was rebuild, said method also comprised: with set the strip data of said more new logo be updated in the stripe cell corresponding in the said non-failed disk.
6. the data processing method of disk array according to claim 1 and 2 is characterized in that, also comprises:
According to renewal, the data of storing in second solid state hard disc are carried out identical renewal operation, so that said second solid state hard disc becomes mirror with said first solid state hard disc to the strip data of storing in said first solid state hard disc.
7. a Disk Array is characterized in that, comprises the disk array and first solid state hard disc, and said disk array is carried out the disk array controller of data processing and control, and said disk array controller comprises:
First data-reading unit, be used for reading successively said disk array each non-failed disk respectively organize strip data to said first solid state hard disc, the preset memory capacity of said first solid state hard disc is at least two group strip data;
The data reconstruction unit; Be used for reading said strip data in said first solid state hard disc in said first data-reading unit, strip data is rebuild and the data that will rebuild acquisition write in the HotSpare disk of said disk array to respectively organizing of having read in said first solid state hard disc successively;
Data are read again and are got the unit; Be used for strip data when said first solid state hard disc and reach said preset memory capacity and exist when having accomplished the strip data of reconstruction, send to said first data-reading unit and read respectively the organizing in strip data to the first solid state hard disc of each non-failed disk successively to cover the instruction of having accomplished the strip data of reconstruction in said first solid state hard disc.
8. Disk Array according to claim 7; It is characterized in that; Said first data-reading unit specifically is used for first mapping relations according to said each non-failed disk and said first solid state hard disc; Read said respectively the group in strip data to said first solid state hard disc successively; Said first mapping relations comprise: said first solid state hard disc is divided into the storage unit that equates with said non-failed disk number and first storage unit that forms, and each said non-failed disk is corresponding with each said first storage unit respectively.
9. according to claim 7 or 8 described Disk Arrays, it is characterized in that said disk array controller also comprises:
First judging unit is used for when receiving the read request of main frame, and when judging data to be read in the said read request corresponding to said non-failed disk, judges whether said data to be read are present in said first solid state hard disc;
First data are returned the unit, are used for then from said first solid state hard disc, said data to be read being back to said main frame if said first judgment unit judges goes out said data to be read and is present in said first solid state hard disc;
Second data are returned the unit, are used for then from said non-failed disk said data to be read being back to said main frame if said first judgment unit judges goes out said data to be read and is not present in said first solid state hard disc.
10. according to claim 7 or 8 described Disk Arrays, it is characterized in that said disk array controller also comprises:
Second judging unit; Be used for when the request of writing that receives said main frame; And judge saidly when writing stripe cell to be written in the request, judge whether data in the said stripe cell to be written are present in said first solid state hard disc and whether have accomplished reconstruction corresponding to said non-failed disk;
First data updating unit; Be used for if the data with existing that said second judgment unit judges goes out said stripe cell to be written is present in said first solid state hard disc and has accomplished reconstruction; Then according in said first solid state hard disc of said Data Update to be written with the corresponding strip data of said stripe cell to be written, and renewal and said stripe cell corresponding check data to be written;
Second data updating unit; Be used for if said second judgment unit judges data with existing that goes out said stripe cell to be written is present in said first solid state hard disc and accomplish and rebuild, then according in said first solid state hard disc of said Data Update to be written with the corresponding strip data of said stripe cell to be written.
11. Disk Array according to claim 10 is characterized in that, said disk array controller also comprises:
New logo set unit more; Be used for when said first data updating unit and second data updating unit are according to said first solid state hard disc of the said Data Update to be written strip data corresponding with said stripe cell to be written, with the more new logo set of strip data corresponding in said first solid state hard disc;
The 3rd data updating unit; Be used for after one group of strip data that said data reconstruction unit has read said first solid state hard disc is at every turn rebuild, with set the strip data of said more new logo be updated in the stripe cell corresponding in the said non-failed disk.
12., it is characterized in that according to claim 7 or 8 described Disk Arrays:
Said Disk Array also comprises second solid state hard disc, becomes mirror with said first solid state hard disc;
Said disk array controller also comprises the 4th data updating unit, is used for the renewal according to the strip data that said first solid state hard disc is stored, and the data of storing in said second solid state hard disc are carried out identical renewal operation.
CN2010101221450A 2010-03-08 2010-03-08 Data processing method and device for disk array Active CN101833422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101221450A CN101833422B (en) 2010-03-08 2010-03-08 Data processing method and device for disk array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101221450A CN101833422B (en) 2010-03-08 2010-03-08 Data processing method and device for disk array

Publications (2)

Publication Number Publication Date
CN101833422A CN101833422A (en) 2010-09-15
CN101833422B true CN101833422B (en) 2012-01-04

Family

ID=42717506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101221450A Active CN101833422B (en) 2010-03-08 2010-03-08 Data processing method and device for disk array

Country Status (1)

Country Link
CN (1) CN101833422B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682012A (en) * 2011-03-14 2012-09-19 成都市华为赛门铁克科技有限公司 Method and device for reading and writing data in file system
US8566530B2 (en) 2011-07-22 2013-10-22 International Business Machines Corporation Prefetching source tracks for destaging updated tracks in a copy relationship
US8631190B2 (en) 2011-07-22 2014-01-14 International Business Machines Corporation Prefetching data tracks and parity data to use for destaging updated tracks
US8650354B2 (en) 2011-07-22 2014-02-11 International Business Machines Corporation Prefetching tracks using multiple caches
CN102291298B (en) * 2011-08-05 2014-10-22 曾小荟 Efficient computer network communication method oriented to long message
CN103631528B (en) * 2012-08-21 2016-05-18 苏州捷泰科信息技术有限公司 Reading/writing method, system and read-write controller with solid state hard disc as buffer
US10346245B2 (en) * 2014-12-09 2019-07-09 Tsinghua University Data storage system and data storage method
CN104503781A (en) * 2014-12-10 2015-04-08 华为技术有限公司 Firmware upgrading method for hard disk and storage system
CN105302492A (en) * 2015-11-18 2016-02-03 浙江大华技术股份有限公司 RAID reconstruction method and device
CN107341013B (en) * 2017-06-26 2021-01-15 努比亚技术有限公司 Boot fault processing method and device and computer readable storage medium
CN108287662A (en) * 2017-12-08 2018-07-17 五八有限公司 Obtain method, equipment and the computer readable storage medium of equipment unique mark
CN110413454B (en) * 2018-04-28 2022-04-05 华为技术有限公司 Data reconstruction method and device based on storage array and storage medium
CN110555520A (en) * 2018-05-30 2019-12-10 北京三星通信技术研究有限公司 method for performing convolution operations, corresponding processing device and electronic device
CN112543922A (en) * 2019-07-22 2021-03-23 华为技术有限公司 Method and related device for improving reliability of storage system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7925918B2 (en) * 2007-02-27 2011-04-12 International Business Machines Corporation Rebuilding a failed disk in a disk array
CN101576833B (en) * 2009-06-26 2012-05-23 杭州华三通信技术有限公司 Data reconstruction method for Redundant Array of Independent Disks (RAID) and appliance thereof
CN101609420A (en) * 2009-07-17 2009-12-23 杭州华三通信技术有限公司 Realize method and the redundant arrays of inexpensive disks and the controller thereof of rebuilding of disc redundant array
CN101620517B (en) * 2009-08-04 2012-05-30 成都市华为赛门铁克科技有限公司 Data-writing method and data-writing device

Also Published As

Publication number Publication date
CN101833422A (en) 2010-09-15

Similar Documents

Publication Publication Date Title
CN101833422B (en) Data processing method and device for disk array
CN104503706B (en) A kind of data storage and read method based on disk array
JP4754852B2 (en) Storage control apparatus and method
CN102483686B (en) Data storage system and method for operating a data storage system
US9292228B2 (en) Selective raid protection for cache memory
US10120769B2 (en) Raid rebuild algorithm with low I/O impact
CN108701090A (en) To the non-volatile memory module framework for supporting memory error to correct
US20090204846A1 (en) Automated Full Stripe Operations in a Redundant Array of Disk Drives
CN104035830A (en) Method and device for recovering data
JPWO2013046463A1 (en) Nonvolatile semiconductor memory system
US20130304970A1 (en) Systems and methods for providing high performance redundant array of independent disks in a solid-state device
CN102184129A (en) Fault tolerance method and device for disk arrays
CN103534688A (en) Data recovery method, storage equipment and storage system
WO2015145552A1 (en) Nonvolatile memory device and storage device having nonvolatile memory device
CN102591746B (en) Data reconstruction method and storage equipment
CN103019623A (en) Memory disc processing method and device
US7133965B2 (en) Raid storage device
US20060259812A1 (en) Data protection method
CN103049407A (en) System, device and method for data storage
US8775735B2 (en) Storage system and operation method of a storage system
US9547554B2 (en) Mass storage device and method of operating the same to store parity data
US20090138656A1 (en) Method of skipping synchronization process for initialization of RAID1 device
US9087019B2 (en) Disk storage system with rebuild sequence and method of operation thereof
CN113625950B (en) Initialization method, system, equipment and medium for redundant array of independent disks
CN102385544B (en) Method and device for re-establishing disk

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
C56 Change in the name or address of the patentee

Owner name: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

Free format text: FORMER NAME: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee after: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee before: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220831

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China

Patentee before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.