CN105867841A - Data reconstruction method and apparatus - Google Patents

Data reconstruction method and apparatus Download PDF

Info

Publication number
CN105867841A
CN105867841A CN201610173584.1A CN201610173584A CN105867841A CN 105867841 A CN105867841 A CN 105867841A CN 201610173584 A CN201610173584 A CN 201610173584A CN 105867841 A CN105867841 A CN 105867841A
Authority
CN
China
Prior art keywords
target
described target
raid
band
bit position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610173584.1A
Other languages
Chinese (zh)
Other versions
CN105867841B (en
Inventor
石岩
许勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201610173584.1A priority Critical patent/CN105867841B/en
Publication of CN105867841A publication Critical patent/CN105867841A/en
Application granted granted Critical
Publication of CN105867841B publication Critical patent/CN105867841B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a data reconstruction method and apparatus. The method comprises: when a target RAID reaches a condition of recording a data variation record table, determining the size of a target basic region, which corresponds to the target RAID, in the data variation record table; determining whether a ratio of a bit number in the target basic region to a band number included by the target RAID is greater than or equal to 1:1; if no, applying for a target region with a target size from an extension region of the data variation record table, so as to make a ratio of a sum of the bit number of the target basic region and a bit number of the target region to the band number included by the target RAID reach 1:1; setting values of bits in the target basic region and the target region according to a data variation condition in each band included by the target RAID; and when data reconstruction needs to be performed, performing data reconstruction on a corresponding band according to the value of each bit of the target basic region and the target region. By applying the method and apparatus provided by the present invention, the data reconstruction efficiency can be improved.

Description

A kind of data re-establishing method and device
Technical field
The present invention relates to technical field of data processing, particularly relate to a kind of data re-establishing method and device.
Background technology
RAID (Redundant Arrays of Independent Disks, raid-array) by Multiple disk aggregations are together, it is possible to providing jumbo while, it is provided that higher access speed, more Availability and data redundancy protection well.Wherein, the disk in RAID is properly termed as this RAID Member's disk, each member's disk not only stores the data that outside is written in this disk, also deposits The data for recovering other member's disk are stored up.
During RAID is carried out data read-write operation, may deposit due to such as certain member's disk The a variety of causes such as extracted at bad track, certain member's disk by mistake, cause the situation of this member's disk off-line to occur, Now, if RAID remains able to be normally carried out data read-write operation (as RAID changes from normal condition For critical condition or degrading state), then outside it is possible to write data to RAID, so that RAID Data in the band of middle correspondence change, and therefore, the member's disk at off-line rejoins this After in RAID, it is required for the band that in this RAID, during off-line, data change and is again adding The member's disk entered carries out data reconstruction, the band that during i.e. needing to read each off-line, data change Data in other member's disk, and obtain each band successively rejoining according to reading the data come The data in member's disk in RAID.
In order to realize above-mentioned data reconstruction, the most conventional scheme is: fixing for each RAID distribution in advance The data variation record sheet of size, each bit (bit) position correspondence RAID in this data variation record sheet Actual one or more bands, have the data in band to there occurs change after member's disk off-line, Then by the bit position 1 in the data variation record sheet corresponding with this band;Wherein, data variation record sheet In the initial value of each bit position be 0;After member's disk of off-line rejoins RAID, become according to data Change record sheet, the condition having data to change is rebuild.
But practice finds, along with disk size single in RAID is increasing, bin number in RAID Also get more and more, if the data variation record sheet of the fixed size of each RAID distribution is too small, then data In change record sheet, 1 bit position needs corresponding 2 or more band, according to this data variation record When table carries out data reconstruction, may result in the situation that the band that need not rebuild is rebuild and occur, For example, it is assumed that 1 corresponding 3 band in bit position in data variation record sheet, if in these 3 bands only When having a band to need to rebuild, corresponding bit position also can be set to 1, in follow-up data process of reconstruction, 3 bands that this bit position is corresponding all can be carried out data reconstruction, cause data reconstruction inefficient;And If desired ensure the bit position in data variation record sheet and the 1:1 of the band number in RAID, then need root The maximum RAID number supported according to system expands the space to be preserved of data variation record sheet, causes system to provide Source is wasted.
Summary of the invention
The present invention provides a kind of data re-establishing method and device, to solve data in available data reconstruction model Rebuild data variation record sheet that is inefficient or that need reserved large space and cause asking of system resource waste Topic.
First aspect according to embodiments of the present invention, it is provided that a kind of data re-establishing method, including:
When target raid-array RAID reaches to record data variation record sheet condition, determine The size of target base region corresponding with described target RAID in data variation record sheet;
Judge in described target base region the ratio of the band number that bit position and described target RAID include whether More than or equal to 1:1;
If it is not, then apply for the target area of target sizes from the expansion area of data variation record sheet, so that The band number that the bit position sum of described target base region and described target area includes with described target RAID Ratio reach 1:1;
According to the data situation in each band that described target RAID includes to described target base region It is configured with the value of bit position in described target area;
When needs carry out data reconstruction, according to described target base region and each bit in described target area The value of position carries out data reconstruction to corresponding band.
Second aspect according to embodiments of the present invention, it is provided that a kind of data reconstruction device, including:
Determine unit, for reaching to record data variation record as target raid-array RAID During surface condition, determine the big of target base region corresponding with described target RAID in data variation record sheet Little;
Judging unit, for judging the bar that in described target base region, bit position includes with described target RAID Whether the ratio of band number is more than or equal to 1:1;
Application unit, for bit position in described judging unit judges described target base region and described mesh When the ratio of the band number that mark RAID includes is less than 1:1, Shen from the expansion area of data variation record sheet Please the target area of target sizes so that the bit position sum of described target base region and described target area The ratio of the band number included with described target RAID reaches 1:1;
Unit is set, the data situation pair in each band included according to described target RAID Described target base region is configured with the value of bit position in described target area;
Data reconstruction unit, for when needs carry out data reconstruction, according to described target base region and institute State the value of each bit position in target area and corresponding band is carried out data reconstruction.
The application embodiment of the present invention, when target RAID reaches to record data variation record sheet condition, really The size of target base region corresponding with target RAID in given data change record sheet, and when target is basic When the ratio of the band number that in district, bit position and target RAID include is less than 1:1, from data variation record sheet Expansion area in apply for the target area of target sizes, so that the bit position of target base region and target area The ratio of the band number that sum and target RAID include reaches 1:1, and then include according to target RAID Target base region is configured by the data situation in each band with the value of bit position in target area, When needs carry out data reconstruction, according to the value of bit position each with target area, target base region to corresponding Band carry out data reconstruction, with available data reconstruction model in be each RAID distribution fixed size number Compare according to the implementation of change record sheet, in the case of total size of data variation record sheet is identical, Better assure that the band number that in data variation record sheet corresponding for RAID, bit position and RAID include Ratio is 1:1, decreases the situation rebuilding the band being made without data reconstruction and occurs, carries High data reconstruction efficiency.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of a kind of data re-establishing method that the embodiment of the present invention provides;
Fig. 2 is the schematic flow sheet of the another kind of data re-establishing method that the embodiment of the present invention provides;
Fig. 3 is the structural representation of a kind of data reconstruction device that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the another kind of data reconstruction device that the embodiment of the present invention provides.
Detailed description of the invention
For the technical scheme making those skilled in the art be more fully understood that in the embodiment of the present invention, and make The above-mentioned purpose of the embodiment of the present invention, feature and advantage can become apparent from understandable, the most right In the embodiment of the present invention, technical scheme is described in further detail.
Refer to the flow process signal of a kind of data re-establishing method that Fig. 1, Fig. 1 provide for the embodiment of the present invention Figure, as it is shown in figure 1, this data re-establishing method may comprise steps of:
It should be noted that the executive agent of step 101~step 107 can be the storage supporting RAID Equipment, the processor of storage device, such as CPU (Center Process Unit, CPU) or RAID controller.For ease of describing, the executive agent with step 101~step 107 sets for storage below Illustrate as a example by Bei.
Step 101, when target RAID reach record data variation record sheet condition time, determine that data become Change the size of target base region corresponding with target RAID in record sheet.
In the embodiment of the present invention, target RAID is also not specific to a certain fixing RAID, but may refer to Arbitrary RAID of physical disk composition in storage device.
In the embodiment of the present invention, target RAID reaches to record data variation record sheet condition can include mesh Mark RAID occur member's disk off-line cause target RAID to be converted to critical condition by normal condition Or degrading state etc..
In the embodiment of the present invention, data variation record sheet can include base region and expansion area, wherein, base Local area includes maximum RAID number (being designated as Max herein) equivalent (the i.e. Max supported with system Individual) space, zonule, space, each zonule is fixed for the band that RAID corresponding to record includes In data situation (change or do not change);Expansion area is the region that each RAID shares, The data variation feelings for recording in the band that corresponding RAID includes can be applied for needing when Condition.
Alternatively, the size in the space, each zonule that the base region of data variation record sheet includes is identical.
In the embodiment of the present invention, when target RAID reaches to record data variation record sheet condition, storage Equipment can first determine that base region corresponding with this target RAID in data variation record sheet (claims herein For target base region) size.
Step 102, judge the ratio of the band number that bit position and target RAID include in this target base region Whether more than or equal to 1:1.If so, step 106 is gone to;Otherwise, step 103 is gone to.
In the embodiment of the present invention, when target RAID reaches to record data variation record sheet condition, storage On the one hand equipment may determine that target base region corresponding with this target RAID in data variation record sheet is big Little;On the other hand the band number that this target RAID includes can be calculated, and then, storage device can be sentenced In disconnected target base region, whether the ratio of the band number that bit position includes with target RAID is more than or equal to 1:1, I.e. determine whether target base region meets wanting of an actual band in bit position correspondence target RAID Ask.
Step 103, from the expansion area of data variation record sheet, apply for the target area of target sizes, with The ratio making the band number that the bit position sum of target base region and target area includes with target RAID reaches 1:1。
In the embodiment of the present invention, when the ratio of the band number that bit position and target RAID in target base region include When example is less than 1:1, a reality during i.e. target base region is unsatisfactory for bit position correspondence target RAID The requirement of band, storage device can apply for the district of target sizes from the expansion area of data variation record sheet Territory (referred to herein as target area), so that the bit position sum of target base region and target area and target The ratio of the band number that RAID includes reaches 1:1.
Wherein, target sizes (bit figure place) is size (bit figure place) and target RAID of target base region Including the difference of band number.
Data situation in step 104, each band included according to target RAID is basic to target District is configured with the value of the bit position in target area.
In the embodiment of the present invention, storage device is that target RAID is from the expansion area of data variation record sheet After having applied for the target area of target sizes, storage device can be according to each bar during member's disk off-line The value of target base region with the bit position in target area is configured by the data situation in band.
Such as, data can be there occurs that the value of bit position that the band of change is corresponding is set to by storage device Second preset value (such as 1);It is pre-that the value of the bit position that band that data do not change is corresponding is set to first If value (such as 0);Wherein, in data variation record sheet, the initial value of each bit position is 0.
Step 105, when needs carry out data reconstruction, according to each bit in target base region and target area The band that the value of position is corresponding carries out data reconstruction.
In the embodiment of the present invention, when needs carry out data reconstruction, the member's disk such as off-line rejoins Target RAID, storage device can determine need according to target base region with the value of each bit position in target area The band of data reconstruction to be carried out (band as corresponding in bit position that value is 1), and needs are carried out data The band rebuild carries out data reconstruction, the number in not offline member disk in the band rebuild the most as required According to the data drawn on this band off-line disk in rejoining target RAID, and these data are write Enter this correspondence position rejoining the off-line disk in target RAID.
Preferably, in embodiments of the present invention, storage device is to needing the band carrying out data reconstruction to carry out During data reconstruction, preferentially corresponding with the bit position of expansion area can be needed to carry out the condition of data reconstruction Carry out data reconstruction, and after this part band has been rebuild, discharge apllied expansion area (the most above-mentioned Target area).
In step 106, each band included according to target RAID, data situation is to target base region The value of middle bit position is configured.
In the embodiment of the present invention, bit in storage device determines the target base region that target RAID is corresponding When the ratio of the band number that position and target RAID include is more than or equal to 1:1, i.e. data variation record sheet In the base region corresponding with target RAID meet an actual bar in corresponding target RAID in bit position The requirement of band, storage device can need not additionally apply for region for target RAID from expansion area, and It it is the number that can directly use the bit position in target base region to come in each band that record object RAID includes According to situation of change.Such as, it is pre-that the value of the bit position that the band that data changed is corresponding is set to second If value;The value of the bit position that the band that data do not changed is corresponding is set to the first preset value.
Step 107, when needs carry out data reconstruction, according to the value of bit position each in target base region to right The band answered is rebuild.
In the embodiment of the present invention, when needs carry out data reconstruction, the member's disk such as off-line rejoins Target RAID, storage device can determine according to the value of bit position each in target base region to be needed to carry out data The band (band as corresponding in bit position that value is 1) rebuild, and to needing to carry out the band of data reconstruction Carry out data reconstruction.
Visible, in the method flow described by Fig. 1, by data variation record sheet is divided into substantially District and expansion area, base region includes the space, zonule of the maximum RAID number equivalent supported with system, Space, each zonule is fixed for the data situation in the band that RAID corresponding to record includes; Expansion area is the region that each RAID shares, and can apply for for recording corresponding RAID needs when Data situation in the band included, with available data reconstruction model are each RAID distribution is solid The implementation of the data variation record sheet of sizing is compared, identical in total size of data variation record sheet In the case of, better assure that in data variation record sheet corresponding for RAID, bit position includes with RAID The ratio of band number be 1:1, decrease the feelings that the band being made without data reconstruction is rebuild Condition occurs, and improves data reconstruction efficiency.
The flow process referring to the another kind of data re-establishing method that Fig. 2, Fig. 2 provide for the embodiment of the present invention is shown It is intended to, as in figure 2 it is shown, this data re-establishing method may comprise steps of:
It should be noted that the executive agent of step 201~step 211 can be the storage supporting RAID Equipment, the processor of storage device, such as CPU or RAID controller.For ease of describing, below with step Rapid 201~the executive agent of step 211 be to illustrate as a example by storage device.
Step 201, when target RAID reach record data variation record sheet condition time, determine that data become Change the size of target base region corresponding with target RAID in record sheet.
Step 202, the ratio judging the band number that in target base region, bit position and target RAID include are No more than or equal to 1:1.If so, step 203 is gone to;Otherwise, step 205 is gone to.
In step 203, each band included according to target RAID, data situation is to target base region The value of middle bit position is configured.
Step 204, when needs carry out data reconstruction, according to the value of bit position each in target base region to right The band answered is rebuild.
In the embodiment of the present invention, the implementing of step 201~step 204 may refer to above-mentioned steps 101~ Associated description in step 102 and step 106~step 107, the embodiment of the present invention does not repeats them here.
Step 205, judge data variation record sheet expansion area residue Free Region size the biggest In or equal to target sizes.If so, step 206 is gone to;Otherwise, step 208 is gone to.
In the embodiment of the present invention, target sizes (bit figure place) is the size (bit figure place) of target base region Difference with the band number that target RAID includes.
When storage device determines that the size of target base region corresponding to target RAID is less than target RAID bag During the band number included, storage device needs trial to be the district that target RAID applies for target sizes from expansion area Territory be used for data reconstruction, with ensure target base region with from expansion area application region bit position sum with The ratio of the band number that target RAID includes reaches 1:1.
Correspondingly, storage device can obtain the size of the residue Free Region of data variation record sheet, and Judge that whether the size of this residue Free Region is more than or equal to target sizes;The most then show expansion area In have enough residue Free Regions to ensure the proportional recording target RAID bag with bit position and band number 1:1 Data situation in each band included;Otherwise, show that expansion area does not has enough residue available areas Territory ensures to become with the data in each band that proportional recording target RAID of bit position and band number 1:1 includes Change situation, i.e. needs to reduce bit position and the ratio of band number, with 1:N (N be more than or equal to 2 from So number) each band of including of proportional recording target RAID in data situation.
Step 206, from the expansion area of data variation record sheet, apply for the target area of target sizes.
In the embodiment of the present invention, when the ratio of the band number that bit position and target RAID in target base region include Example, less than when having enough residue Free Regions in 1:1, and the expansion area of data variation record sheet, stores Equipment can apply for the target area of target sizes from the expansion area of data variation record sheet, so that target The ratio of the band number that the bit position sum of base region and target area includes with target RAID reaches 1:1.
It should be appreciated that in embodiments of the present invention, in above-mentioned 206, if the expansion of data variation record sheet The size of the residue Free Region of exhibition section is more than target sizes, then storage device is target from expansion area The size of the target area of RAID application can also be more than above-mentioned target sizes.
Alternatively, in embodiments of the present invention, storage device is from the expansion area of data variation record sheet When target RAID applies for the target area of target sizes, can be big according to " the total size/Max in expansion area " Little unit is applied for, applies for the district of " the total size/Max in expansion area " size from expansion area i.e. every time Territory, until meeting target base region and the bit position sum from the region of expansion area application and target RAID Including the ratio of band number reach the condition of 1:1.
Step 207, when needs carry out data reconstruction, according to each bit in target base region and target area The value of position carries out data reconstruction to corresponding band.
In the embodiment of the present invention, when needs carry out data reconstruction, the member's disk such as off-line rejoins Target RAID, storage device can determine need according to target base region with the value of each bit position in target area The band of data reconstruction to be carried out (band as corresponding in bit position that value is 1), and needs are carried out data The band rebuild carries out data reconstruction, the number in not offline member disk in the band rebuild the most as required According to the data drawn on this band off-line disk in rejoining target RAID, and these data are write Enter this correspondence position rejoining the off-line disk in target RAID.
Preferably, in embodiments of the present invention, storage device is to needing the band carrying out data reconstruction to carry out During data reconstruction, preferentially corresponding with the bit position of expansion area can be needed to carry out the condition of data reconstruction Carry out data reconstruction, and after this part band has been rebuild, discharge apllied expansion area (the most above-mentioned Target area).
The size of whole residue Free Regions of the expansion area of step 208, request for data change record sheet.
In the embodiment of the present invention, if the residue that storage device determines the expansion area of data variation record sheet can use The size in region be less than target sizes, then storage device can directly request for data change record sheet extension The size of whole residue Free Regions in district data in each band that record object RAID includes become Change situation.
Step 209, according to the size of target base region and the sizes of whole residue Free Regions of expansion area, Determine that target base region includes with target RAID with bit position sum in whole residue Free Regions of expansion area Target proportion 1:N of band number.
In the embodiment of the present invention, when the size of the residue Free Region of expansion area is less than target sizes, i.e. Whole residue Free Regions of expansion area are used to the data in each band that record object RAID includes During situation of change, still it is unable to reach the condition of the band number 1:1 that bit position includes with target RAID, this Time, need, according to target base region and the size of whole residue Free Regions of expansion area, to adjust and be used for remembering The bit position of the data situation in each band that record target RAID includes and the ratio of band number, by it It is adjusted to 1:N (N is the natural number more than or equal to 2, referred to herein as target proportion).
Wherein, N needs to meet following condition:
(band number/target base region that target RAID includes and the whole of expansion area remain available area to N=┌ The bit position sum in territory) ┐
Wherein, ┌ * ┐ is for round up to " * ", such as ┌ 1.9 ┐=2, ┌ 2 ┐=2, ┌ 2.1 ┐=3.
Alternatively, in embodiments of the present invention, the band number included when target RAID and target base region When being non-integer with the ratio of the bit position sum of whole residue Free Regions of expansion area, by target proportion After being taken as 1:N, remaining expansion area can be discharged so that it is revert to idle condition, for it Its RAID uses.
As an example it is assumed that the band number that target RAID includes is 600, target base region and expansion area The bit position sum of whole residue Free Regions be 400 (the bit position of target base region is 100, extension The bit position of whole residue Free Regions in district is 300), the band number that target RAID includes and target base Local area is 1.5 with the ratio of the bit position sum of whole residue Free Regions of expansion area, and now, N is 2 (N=┌ 1.5 ┐=2), i.e. target RAID need 300bit position to carry out data variation record altogether, thus, deposit Remaining expansion area (100bit position) can be discharged by storage equipment so that it is reverts to idle condition.
It should be noted that in embodiments of the present invention, can record in the gauge outfit of data variation record sheet The ratio (1:1 or 1:N) of bit position corresponding to target RAID and band number;Additionally, due to data note Two or more bands that possible corresponding target RAID in a bit position in record table includes, therefore may be used Band corresponding with the same bit position of data logger in target RAID to be properly termed as wide band.
Step 210, according to target proportion, and the data variation in each band of including of target RAID Target base region is configured by situation to the value of corresponding bit position in whole residue Free Regions of expansion area.
In the embodiment of the present invention, storage device determines bit position in data logger and includes with target RAID Band number target proportion after, each bit position in data logger can be determined according to this target proportion (the bit position including target base region and the bit position in the region applied for from expansion area) and target RAID Including the corresponding relation of band, and then, the data in each band that can include according to target RAID Target base region is carried out by situation of change to the value of corresponding bit position in whole residue Free Regions of expansion area Arrange.
As an example it is assumed that the bit position in data logger corresponding to N=2, i.e. target RAID and mesh The ratio of the band number that mark RAID includes is 1:2, then storage device can first determine that each bit position is corresponding Band, e.g., first bit position correspondence band 0 and band 1, second bit position correspondence band 2 and bar Band 3 ... k-th bit position correspondence band (2K-2) and band (2K-1) ...;Wherein, K is more than 2 Natural number.And then, storage device can be with monitoring objective RAID each band during member's disk off-line Data situation, and according to this data situation, the value of corresponding bit position is configured, example As, if band 2 is or/and the generation data in band 3 change, then the value of second bit position is set to 1;If band (2K-2) is or/and occur data to change, then by k-th bit position in band (2K-1) Value be set to 1;If band (2K-2) and band (2K-1) all do not occur data to change, then will The value of k-th bit position remains 0.
Step 211, when needs carry out data reconstruction, whole according to target base region and expansion area remain In remaining Free Region, the value of corresponding bit position carries out data reconstruction to corresponding band.
When needs carry out data reconstruction, the member's disk such as off-line rejoins target RAID, storage Equipment can be according to the value of each bit position in target base region and target area, and target proportion determines and needs The band of data reconstruction to be carried out (band as corresponding in bit position that value is 1), and needs are carried out data The band rebuild carries out data reconstruction, the number in not offline member disk in the band rebuild the most as required According to the data drawn on this band off-line disk in rejoining target RAID, and these data are write Enter this correspondence position rejoining the off-line disk in target RAID.
For example, it is assumed that N=2, if data variation record sheet corresponding to target RAID (includes that target is basic District and from expansion area the region of application) in the value of first bit position be 1, then the bar to target RAID Band 0 and band 1 carry out data reconstruction;If the value of k-th bit position is 1, then the bar to target RAID Band (2K-2) and band (2K-1) carry out data reconstruction.
Preferably, in embodiments of the present invention, storage device is to needing the band carrying out data reconstruction to carry out During data reconstruction, preferentially corresponding with the bit position of expansion area can be needed to carry out the condition of data reconstruction Carry out data reconstruction, and after this part band has been rebuild, discharge apllied expansion area.
Alternatively, when storage device discharges apllied expansion area, it is also possible to " the total size in expansion area / Max " unit discharge, the region the most often completing " the total size/Max in expansion area " size is corresponding After the data reconstruction of band, discharge this part expansion area apllied.
What deserves to be explained is, in embodiments of the present invention, storage device carries out data reconstruction to respective strap Afterwards, needing the value corresponding with this band is reset to the first preset value (such as 0), it is embodied in this Repeat no more.
Visible, in the method flow described by Fig. 2, by data variation record sheet is divided into substantially District and expansion area, base region includes the space, zonule of the maximum RAID number equivalent supported with system, Space, each zonule is fixed for the data situation in the band that RAID corresponding to record includes; Expansion area is the region that each RAID shares, and can apply for for recording corresponding RAID needs when Data situation in the band included, and the space of expansion area can be released after data reconstruction completes Put, it is contemplated that actual conditions do not have and has a large amount of RAID to need to carry out data variation record simultaneously Situation occurs, thus, it is only required to arrange the expansion area of a fair-sized for each RAID respectively, I.e. may be implemented in target RAID to need to carry out data variation record and have enough spaces to meet bit position and target Ratio 1:1 of RAID stripe number, reduces the situation rebuilding the band being made without data reconstruction Occur, each RAID must be respectively all reserve enough spaces and carry out data variation note in prior art The scheme of record is compared, and has been effectively saved space, it is to avoid system resource waste.
By above description it can be seen that in embodiments of the present invention, when target RAID reaches to record number During according to change record sheet condition, determine that target corresponding with target RAID in data variation record sheet is basic The size in district, and when the ratio of the band number that in target base region, bit position and target RAID include is less than During 1:1, from the expansion area of data variation record sheet, apply for the target area of target sizes, so that target The ratio of the band number that the bit position sum of base region and target area includes with target RAID reaches 1:1, And then the data situation in each band included according to target RAID is to target base region and target area In territory, the value of bit position is configured, when needs carry out data reconstruction, according to target base region and target In region, the value of each bit position carries out data reconstruction to corresponding band, with available data reconstruction model in be The implementation of the data variation record sheet of each RAID distribution fixed size is compared, at data variation record In the case of total size of table is identical, better assure that bit in data variation record sheet corresponding for RAID The ratio of the band number that position and RAID include is 1:1, decreases the band being made without data reconstruction The situation carrying out rebuilding occurs, and improves data reconstruction efficiency.
Refer to Fig. 3, the structural representation of a kind of data reconstruction device provided for the embodiment of the present invention, Wherein, this data reconstruction device can apply to the storage device in said method embodiment, such as Fig. 4 institute Showing, this data reconstruction device may include that
Determine unit 310, for reaching to record data variation as target raid-array RAID During record sheet condition, determine target base region corresponding with described target RAID in data variation record sheet Size;
Judging unit 320, is used for judging that in described target base region, bit position includes with described target RAID The ratio of band number whether more than or equal to 1:1;
Application unit 330, in described judging unit 320 judges described target base region bit position with When the ratio of the band number that described target RAID includes is less than 1:1, from the extension of data variation record sheet District applies for the target area of target sizes, so that described target base region and the bit of described target area The ratio of the band number that position sum includes with described target RAID reaches 1:1;
Unit 340 is set, the data variation feelings in each band included according to described target RAID Described target base region is configured by condition with the value of bit position in described target area;
Data reconstruction unit 350, for when needs carry out data reconstruction, according to described target base region The value of bit position each with described target area carries out data reconstruction to corresponding band.
In an alternative embodiment, described unit 340 is set, it is also possible to for when described judging unit 320 Judge in described target base region the ratio of the band number that bit position and described target RAID include more than or etc. When 1:1, according to data situation in each band that described target RAID includes to described target base In local area, the value of bit position is configured;
Described data reconstruction unit 350, it is also possible to for when needs carry out data reconstruction, according to described In target base region, the value of each bit position carries out data reconstruction to corresponding band.
In an alternative embodiment, described judging unit 320, it is also possible to be used for judging that described data variation is remembered Whether the size of the residue Free Region of the expansion area of record table is more than or equal to described target sizes;
When described judging unit 320, described application unit 330, can be specifically for judging that described data become When the size of the residue Free Region changing the expansion area of record sheet is more than or equal to described target sizes, from number Expansion area according to change record sheet is applied for the target area of target sizes.
In an alternative embodiment, described application unit 330, it is also possible to for when described judging unit 330 Judge that the size of residue Free Region of the expansion area of described data variation record sheet is less than described target sizes Time, apply for the size of whole residue Free Regions of the expansion area of described data variation record sheet;
Described determine unit 310, it is also possible to for the size according to described target base region and described extension The size of whole residue Free Regions in district, determines that described target base region remains with the whole of described expansion area Target proportion 1:N of the band number that bit position sum includes with described target RAID in remaining Free Region; N is the natural number more than or equal to 2;
Described unit 340 is set, it is also possible to for according to described target proportion, and described target RAID Including each band in the data situation whole residues to described target base region Yu described expansion area In Free Region, the value of corresponding bit position is configured;
Described data reconstruction unit 350, it is also possible to for when needs carry out data reconstruction, according to described In whole residue Free Regions of target base region and described expansion area, the value of corresponding bit position is to corresponding bar Band carries out data reconstruction.
Seeing also Fig. 4, the structure for the another kind of data reconstruction device of embodiment of the present invention offer is shown It is intended to, as shown in Figure 4, on the basis of embodiment illustrated in fig. 3, the data reconstruction device shown in Fig. 4 Can also include:
Releasing unit 360, is used for after the band that bit position each in described target area is corresponding has been rebuild, Discharge apllied described target area.
In said apparatus, the function of unit and the process that realizes of effect specifically refer in said method corresponding Step realize process, do not repeat them here.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part ginseng See that the part of embodiment of the method illustrates.Device embodiment described above is only schematically, The wherein said unit illustrated as separating component can be or may not be physically separate, makees The parts shown for unit can be or may not be physical location, i.e. may be located at a place, Or can also be distributed on multiple NE.Can select according to the actual needs part therein or The whole module of person realizes the purpose of the present invention program.Those of ordinary skill in the art are not paying creativeness In the case of work, i.e. it is appreciated that and implements.
As seen from the above-described embodiment, when target RAID reaches to record data variation record sheet condition, really The size of target base region corresponding with target RAID in given data change record sheet, and when target is basic When the ratio of the band number that in district, bit position and target RAID include is less than 1:1, from data variation record sheet Expansion area in apply for the target area of target sizes, so that the bit position of target base region and target area The ratio of the band number that sum and target RAID include reaches 1:1, and then include according to target RAID Target base region is configured by the data situation in each band with the value of bit position in target area, When needs carry out data reconstruction, according to the value of bit position each with target area, target base region to corresponding Band carry out data reconstruction, with available data reconstruction model in be each RAID distribution fixed size number Compare according to the implementation of change record sheet, in the case of total size of data variation record sheet is identical, Better assure that the band number that in data variation record sheet corresponding for RAID, bit position and RAID include Ratio is 1:1, decreases the situation rebuilding the band being made without data reconstruction and occurs, carries High data reconstruction efficiency.
Those skilled in the art, after considering specification and putting into practice invention disclosed herein, will readily occur to this Other embodiment of invention.The application is intended to any modification, purposes or the adaptability of the present invention Change, these modification, purposes or adaptations are followed the general principle of the present invention and include this Bright undocumented common knowledge in the art or conventional techniques means.Description and embodiments only by Being considered as exemplary, true scope and spirit of the invention are pointed out by claim below.
It should be appreciated that the invention is not limited in described above and illustrated in the accompanying drawings accurately Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present invention is only by institute Attached claim limits.

Claims (10)

1. a data re-establishing method, it is characterised in that including:
When target raid-array RAID reaches to record data variation record sheet condition, determine The size of target base region corresponding with described target RAID in data variation record sheet;
Judge in described target base region the ratio of the band number that bit position and described target RAID include whether More than or equal to 1:1;
If it is not, then apply for the target area of target sizes from the expansion area of data variation record sheet, so that The band number that the bit position sum of described target base region and described target area includes with described target RAID Ratio reach 1:1;
According to the data situation in each band that described target RAID includes to described target base region It is configured with the value of bit position in described target area;
When needs carry out data reconstruction, according to described target base region and each bit in described target area The value of position carries out data reconstruction to corresponding band.
Method the most according to claim 1, it is characterised in that described judgement described target base region Whether the ratio of the band number that middle bit position and described target RAID include, more than or equal to after 1:1, goes back Including:
In each band the most then included according to described target RAID, data situation is to described target In base region, the value of bit position is configured;
When needs carry out data reconstruction, according to the value of bit position each in described target base region to corresponding Band carries out data reconstruction.
Method the most according to claim 1 and 2, it is characterised in that described from data variation record Before the expansion area of table is applied for the target area of target sizes, also include:
Judge the expansion area of described data variation record sheet residue Free Region size whether more than or etc. In described target sizes;
If, it is determined that from the expansion area of data variation record sheet, apply for the mesh of target sizes described in Zhi Hanging The step in mark region.
Method the most according to claim 3, it is characterised in that the described data variation of described judgement is remembered Whether the size of the residue Free Region of the expansion area of record table, more than or equal to after described target sizes, goes back Including:
If it is not, then apply for the size of whole residue Free Regions of the expansion area of described data variation record sheet;
Size according to described target base region and the size of whole residue Free Regions of described expansion area, Determine that described target base region and bit position sum in whole residue Free Regions of described expansion area are with described Target proportion 1:N of the band number that target RAID includes;N is the natural number more than or equal to 2;
According to described target proportion, and the data variation feelings in each band of including of described target RAID Described target base region is entered by condition to the value of corresponding bit position in whole residue Free Regions of described expansion area Row is arranged;
When needs carry out data reconstruction, according to whole residues of described target base region Yu described expansion area In Free Region, the value of corresponding bit position carries out data reconstruction to corresponding band.
Method the most according to claim 1 and 2, it is characterised in that described according to described target base After the value of local area bit position each with described target area carries out data reconstruction to corresponding band, also wrap Include:
After the band that bit position each in described target area is corresponding has been rebuild, discharge apllied described Target area.
6. a data reconstruction device, it is characterised in that including:
Determine unit, for reaching to record data variation record as target raid-array RAID During surface condition, determine the big of target base region corresponding with described target RAID in data variation record sheet Little;
Judging unit, for judging the bar that in described target base region, bit position includes with described target RAID Whether the ratio of band number is more than or equal to 1:1;
Application unit, for bit position in described judging unit judges described target base region and described mesh When the ratio of the band number that mark RAID includes is less than 1:1, Shen from the expansion area of data variation record sheet Please the target area of target sizes so that the bit position sum of described target base region and described target area The ratio of the band number included with described target RAID reaches 1:1;
Unit is set, the data situation pair in each band included according to described target RAID Described target base region is configured with the value of bit position in described target area;
Data reconstruction unit, for when needs carry out data reconstruction, according to described target base region and institute State the value of each bit position in target area and corresponding band is carried out data reconstruction.
Device the most according to claim 6, it is characterised in that
Described unit is set, be additionally operable in described judging unit judges described target base region bit position with When the ratio of the band number that described target RAID includes is more than or equal to 1:1, according to described target RAID Including each band in data situation the value of bit position in described target base region is configured;
Described data reconstruction unit, is additionally operable to when needs carry out data reconstruction, basic according to described target In district, the value of each bit position carries out data reconstruction to corresponding band.
8. according to the device described in claim 6 or 7, it is characterised in that
Described judging unit, is additionally operable to judge the residue available area of the expansion area of described data variation record sheet Whether the size in territory is more than or equal to described target sizes;
Described application unit, specifically for judging the expansion of described data variation record sheet when described judging unit When the size of the residue Free Region of exhibition section is more than or equal to described target sizes, from data variation record sheet Expansion area in apply for the target area of target sizes.
Device the most according to claim 8, it is characterised in that
Described application unit, is additionally operable to when described judging unit judges the extension of described data variation record sheet When the size of the residue Free Region in district is less than described target sizes, apply for described data variation record sheet The size of whole residue Free Regions of expansion area;
Described determine unit, be additionally operable to the whole of the size according to described target base region and described expansion area The size of residue Free Region, determines that described target base region and the whole of described expansion area remain available area Target proportion 1:N of the band number that bit position sum and described target RAID include in territory;N is for being more than Or the natural number equal to 2;
Described unit is set, it is additionally operable to according to described target proportion, and described target RAID includes Data situation in each band remains available area to described target base region with the whole of described expansion area In territory, the value of corresponding bit position is configured;
Described data reconstruction unit, is additionally operable to when needs carry out data reconstruction, basic according to described target In whole residue Free Regions of district and described expansion area, the value of corresponding bit position is to corresponding band number According to reconstruction.
10. according to the device described in claim 6 or 7, it is characterised in that described device also includes:
Releasing unit, for after the band that bit position each in described target area is corresponding has been rebuild, releases Put apllied described target area.
CN201610173584.1A 2016-03-24 2016-03-24 A kind of data re-establishing method and device Active CN105867841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610173584.1A CN105867841B (en) 2016-03-24 2016-03-24 A kind of data re-establishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610173584.1A CN105867841B (en) 2016-03-24 2016-03-24 A kind of data re-establishing method and device

Publications (2)

Publication Number Publication Date
CN105867841A true CN105867841A (en) 2016-08-17
CN105867841B CN105867841B (en) 2019-01-15

Family

ID=56625645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610173584.1A Active CN105867841B (en) 2016-03-24 2016-03-24 A kind of data re-establishing method and device

Country Status (1)

Country Link
CN (1) CN105867841B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110349249A (en) * 2019-06-26 2019-10-18 华中科技大学 Real-time dense method for reconstructing and system based on RGB-D data
CN113741794A (en) * 2020-05-29 2021-12-03 浙江宇视科技有限公司 SMR disk array reconstruction method, system, device and computer medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196799A (en) * 2008-01-09 2008-06-11 杭州华三通信技术有限公司 Magnetic disk redundant array and its controller and synchronization process
CN101840360A (en) * 2009-10-28 2010-09-22 创新科存储技术有限公司 Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system
US20110314218A1 (en) * 2010-06-22 2011-12-22 Lsi Corporation Parity-based raid system configured to protect against data corruption caused by the occurrence of write holes
CN102609224A (en) * 2012-02-16 2012-07-25 浪潮(北京)电子信息产业有限公司 Redundant array of independent disk system and initializing method thereof
CN105302492A (en) * 2015-11-18 2016-02-03 浙江大华技术股份有限公司 RAID reconstruction method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196799A (en) * 2008-01-09 2008-06-11 杭州华三通信技术有限公司 Magnetic disk redundant array and its controller and synchronization process
CN101840360A (en) * 2009-10-28 2010-09-22 创新科存储技术有限公司 Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system
US20110314218A1 (en) * 2010-06-22 2011-12-22 Lsi Corporation Parity-based raid system configured to protect against data corruption caused by the occurrence of write holes
CN102609224A (en) * 2012-02-16 2012-07-25 浪潮(北京)电子信息产业有限公司 Redundant array of independent disk system and initializing method thereof
CN105302492A (en) * 2015-11-18 2016-02-03 浙江大华技术股份有限公司 RAID reconstruction method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110349249A (en) * 2019-06-26 2019-10-18 华中科技大学 Real-time dense method for reconstructing and system based on RGB-D data
CN113741794A (en) * 2020-05-29 2021-12-03 浙江宇视科技有限公司 SMR disk array reconstruction method, system, device and computer medium
CN113741794B (en) * 2020-05-29 2024-04-05 浙江宇视科技有限公司 SMR disk array reconstruction method, system, equipment and computer medium

Also Published As

Publication number Publication date
CN105867841B (en) 2019-01-15

Similar Documents

Publication Publication Date Title
US20060107097A1 (en) Data protection in a mass storage system
US20070283104A1 (en) Concurrent Hardware Selftest for Central Storage
US10229022B1 (en) Providing Raid-10 with a configurable Raid width using a mapped raid group
DE102005028827A1 (en) Flash memory device and method for defect block treatment
JP2014506342A (en) Controlled automatic recovery of data center services
JPS59180898A (en) Relieving system of defective bit
CN105448348B (en) A kind of chip restorative procedure and device
CN105867841A (en) Data reconstruction method and apparatus
US20140365837A1 (en) Test apparatus and method for testing server
CN106873903A (en) Date storage method and device
CN108597563A (en) Dynamic random group technology and system
CN109086008A (en) Data processing method of solid state disk and solid state disk
CN107678894A (en) A kind of internal storage testing method, apparatus and system
JPH0695966A (en) Cache testing method and microprocessor for performing method thereof
CN107832006A (en) More main frames share the multi-functional fdisk storage device of same expanding storage apparatus
CN116501259A (en) Disk group dual-activity synchronization method and device, computer equipment and storage medium
CN105159619B (en) The extended method and device of a kind of virtual memory
CN105957559A (en) Test system and testing device
TWI645411B (en) Method for testing array fuse of semiconductor apparatus
CN104750560B (en) A kind of information processing method and electronic equipment
JP2006349674A (en) Programming method for tester resource assignment
CN108595269B (en) Data processing method, instruction generation device and data read-write device
CN106096082A (en) A kind of based on deblocking and the collision checking method of parallel processing
JPS60100064A (en) Testing apparatus
CN101470660A (en) Method for system test through subsystem efficiency reference generator

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant