CN105867841B - A kind of data re-establishing method and device - Google Patents

A kind of data re-establishing method and device Download PDF

Info

Publication number
CN105867841B
CN105867841B CN201610173584.1A CN201610173584A CN105867841B CN 105867841 B CN105867841 B CN 105867841B CN 201610173584 A CN201610173584 A CN 201610173584A CN 105867841 B CN105867841 B CN 105867841B
Authority
CN
China
Prior art keywords
target
raid
band
bit
data
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
CN201610173584.1A
Other languages
Chinese (zh)
Other versions
CN105867841A (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 kind of data re-establishing method and device, which comprises when target RAID reaches record data variation record surface condition, determines the size of target base region corresponding with the target RAID in data variation record sheet;Judge in the target base region whether the ratio of bit and the target RAID band number for including is greater than or equal to 1:1;If it is not, then applying for the target area of target sizes from the expansion area of data variation record sheet, so that the sum of position bit of the target base region and the target area and the ratio of the target RAID band number for including reach 1:1;The data situation in each band for including according to the target RAID is configured the target base region with bit in target area values;When needing to carry out data reconstruction, data reconstruction is carried out to corresponding band with bit of value each in the target area according to the target base region.Data reconstruction efficiency can be improved using the embodiment of the present invention.

Description

A kind of data re-establishing method and device
Technical field
The present invention relates to technical field of data processing more particularly to a kind of data re-establishing methods and device.
Background technique
RAID (Redundant Arrays of Independent Disks, raid-array) is by multiple magnetic Disk condenses together, and can provide higher access speed, preferably availability and data while providing large capacity Redundancy protecting.Wherein, the disk in RAID is properly termed as the member disk of the RAID, not only stores in each member disk outer Portion is written to the data in the disk, and the data for restoring other member disks are also stored.
To RAID carry out data read-write operation during, may due to such as certain member disk there are bad track, certain Member disk is by the accidentally a variety of causes such as extraction, and the situation for causing the member disk offline occurs, at this point, if RAID still is able to just Often carry out data read-write operation (such as RAID is converted to critical state or degrading state from normal condition), then it is external it is possible to Data are written in RAID, so that the data in RAID in corresponding band change, therefore, in offline member disk weight After being newly added in the RAID, need the band that changes for data during offline in the RAID rejoin at Data reconstruction is carried out in member's disk, that is, needs to read band that each offline period data change in other member disks Data, and according to read come data successively obtain each band in the data rejoined in the member disk in RAID.
In order to realize above-mentioned data reconstruction, currently used scheme are as follows: distribute the data of fixed size for each RAID in advance Change record sheet, an every bit (bit) position corresponds to the actual one or more bands of RAID in the data variation record sheet, treats as Member's disk has the data in band to be changed later offline, then will be in data variation record sheet corresponding with the band The position bit 1;Wherein, each bit of initial value is 0 in data variation record sheet;When offline member disk rejoins RAID Afterwards, according to data variation record sheet, the condition for there are data to change is rebuild.
However practice discovery, as disk size single in RAID is increasing, bin number is also more and more in RAID, if For each RAID distribution fixed size data variation record sheet it is too small, then in data variation record sheet 1 bit need to correspond to 2 or more bands when carrying out data reconstruction according to the data variation record sheet, may result in the item for not needing to rebuild The case where band is rebuild, for example, it is assumed that 1 bit correspondence, 3 bands in data variation record sheet, if 3 bands In only band when needing to rebuild, corresponding bit can also be set to 1, can be to the bit in follow-up data reconstruction process Corresponding 3 bands in position carry out data reconstruction, cause data reconstruction efficiency lower;And if desired guarantee data variation record sheet In the position bit and the 1:1 of the band number in RAID, then need according to system support it is maximum RAID number expand data variations remember The space to be preserved for recording table, causes system resource waste.
Summary of the invention
The present invention provides a kind of data re-establishing method and device, to solve data reconstruction efficiency in available data reconstruction model It is lower or the problem of need the data variation record sheet of reserved large space to cause system resource waste.
According to a first aspect of the embodiments of the present invention, a kind of data re-establishing method is provided, comprising:
When target raid-array RAID reaches record data variation record surface condition, determine that data variation is remembered Record the size of target base region corresponding with the target RAID in table;
Judge in the target base region whether the ratio of bit and the target RAID band number for including is greater than or waits In 1:1;
If it is not, then applying for the target area of target sizes from the expansion area of data variation record sheet, so that the target The sum of position the bit of base region and the target area and the ratio of the target RAID band number for including reach 1:1;
The data situation in each band for including according to the target RAID is to the target base region and the mesh Bit values are configured in mark region;
When needing to carry out data reconstruction, according to each bit of value pair in the target base region and the target area Corresponding band carries out data reconstruction.
According to a second aspect of the embodiments of the present invention, a kind of data reconstruction device is provided, comprising:
Determination unit, for when target raid-array RAID reach record data variation record surface condition when, Determine the size of target base region corresponding with the target RAID in data variation record sheet;
Judging unit, for judging in the target base region bit ratios with the target RAID band number for including Whether example is greater than or equal to 1:1;
Application unit, for judging bit and the target RAID packet in the target base region when the judging unit When the ratio of the band number included is less than 1:1, apply for the target area of target sizes from the expansion area of data variation record sheet, with Reach the sum of position bit of the target base region and the target area and the ratio of the target RAID band number for including 1:1;
Setting unit, the data situation in each band for including according to the target RAID is to the target base Local area is configured with bit in target area values;
Data reconstruction unit, for when needing to carry out data reconstruction, according to the target base region and the target area Each bit of value carries out data reconstruction to corresponding band in domain.
Data variation is determined when target RAID reaches record data variation record surface condition using the embodiment of the present invention The size of target corresponding with target RAID base region in record sheet, and in the target base region bit include with target RAID Band number ratio be less than 1:1 when, from the expansion area of data variation record sheet apply target sizes target area so that The ratio for the band number that the sum of position the bit of target base region and target area includes with target RAID reaches 1:1, and then according to mesh The data situation in each band that mark RAID includes is configured target base region with bit in target area values, When needing to carry out data reconstruction, corresponding band is counted with bit values each in target area according to target base region According to the implementation phase for the data variation record sheet in reconstruction, with available data reconstruction model being each RAID distribution fixed size Than better assuring that the corresponding data variation record sheet of RAID in the identical situation of total size of data variation record sheet The ratio of the middle bit band number for including with RAID is 1:1, reduces and rebuilds to the band for not needing to carry out data reconstruction The case where occur, improve data reconstruction efficiency.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of data re-establishing method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another data re-establishing method provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of data reconstruction device provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of another data reconstruction device provided in an embodiment of the present invention.
Specific embodiment
Technical solution in embodiment in order to enable those skilled in the art to better understand the present invention, and make of the invention real The above objects, features, and advantages for applying example can be more obvious and easy to understand, with reference to the accompanying drawing to technical side in the embodiment of the present invention Case is described in further detail.
Referring to Figure 1, Fig. 1 is a kind of flow diagram of data re-establishing method provided in an embodiment of the present invention, such as Fig. 1 institute Show, which may comprise steps of:
It should be noted that step 101~step 107 executing subject can be the storage equipment for supporting RAID, storage The processor of equipment, such as CPU (Center Process Unit, central processing unit) or RAID controller.For ease of description, It is illustrated so that step 101~step 107 executing subject is storage equipment as an example below.
Step 101, when target RAID reach record data variation record surface condition when, determine in data variation record sheet with The size of the corresponding target base region target RAID.
In the embodiment of the present invention, target RAID is simultaneously not specific to a certain fixed RAID, but may refer to object in storage equipment Manage any RAID of disk composition.
In the embodiment of the present invention, it may include sending out in target RAID that target RAID, which reaches record data variation record surface condition, Raw member disk is offline and target RAID is caused to be converted to critical state or degrading state etc. by normal condition.
In the embodiment of the present invention, data variation record sheet may include base region and expansion area, wherein include in base region The cell domain space for maximum RAID number (the being denoted as Max herein) equivalent (i.e. Max) supported with system, each cell domain space It is fixed for recording the data situation (change or do not change) in the band for including in corresponding RAID;Extension Area is the region that each RAID is shared, and can be applied when needed for recording the data in the band for including in corresponding RAID Situation of change.
Optionally, the size for each cell domain space for including in the base region of data variation record sheet is identical.
In the embodiment of the present invention, when target RAID reaches record data variation record surface condition, storage equipment can be first Determine the size of base region (referred to herein as target base region) corresponding with target RAID in data variation record sheet.
Step 102, judge the ratio of the bit band numbers for including with target RAID in the target base region whether be greater than or Equal to 1:1.If so, going to step 106;Otherwise, step 103 is gone to.
In the embodiment of the present invention, when target RAID reaches record data variation record surface condition, storage equipment is on the one hand It can determine target corresponding with target RAID base region size in data variation record sheet;On the other hand the mesh can be calculated The band number that mark RAID includes, in turn, storage equipment may determine that the bit bands for including with target RAID in target base region Whether several ratios is greater than or equal to 1:1, that is, determines whether target base region meets one in one bit corresponding target RAID The requirement of a practical band.
Step 103, the target area for applying for target sizes from the expansion area of data variation record sheet, so that target is basic The ratio for the band number that the sum of position the bit of area and target area includes with target RAID reaches 1:1.
In the embodiment of the present invention, when the ratio of the bit band numbers for including with target RAID in target base region is less than 1:1 When, i.e. the target base region requirement that is unsatisfactory for a practical band in one bit corresponding target RAID, storage equipment can be with The region (referred to herein as target area) for applying for target sizes from the expansion area of data variation record sheet, so that target is basic The ratio for the band number that the sum of position the bit of area and target area includes with target RAID reaches 1:1.
Wherein, target sizes (bit digit) are the size (bit digit) of target base region and the band that target RAID includes Several differences.
Data situation in step 104, each band for including according to target RAID is to target base region and target area The value of the position bit in domain is configured.
In the embodiment of the present invention, storage equipment is that target RAID has applied for target from the expansion area of data variation record sheet After the target area of size, storage equipment can be according to data situation of the member disk during offline in each band to mesh The value of mark base region and the position bit in target area is configured.
For example, corresponding bit of the value of band that storage equipment can be changed data is set as second and presets It is worth (such as 1);Corresponding bit of the value of the band that data do not change is set as the first preset value (such as 0);Wherein, data become Changing each bit of initial value in record sheet is 0.
Step 105, when needing to carry out data reconstruction, according to each bit of value pair in target base region and target area The band answered carries out data reconstruction.
In the embodiment of the present invention, when needing to carry out data reconstruction, such as offline member disk rejoins target RAID, Storage equipment can determine the band for needing to carry out data reconstruction according to bit of value each in target base region and target area (as being worth the corresponding band in the position bit for being 1), and data reconstruction is carried out to the band for needing to carry out data reconstruction, i.e., as needed Data in the band of reconstruction in not offline member disk obtain the band on rejoining the offline disk in target RAID Data, and write the data into the corresponding position of the offline disk rejoined in target RAID.
Preferably, in embodiments of the present invention, storage equipment carries out data reconstruction to the band for needing to carry out data reconstruction When, data reconstruction preferentially can be carried out to the condition for needing to carry out data reconstruction corresponding with the position the bit of expansion area, and in the portion After the completion of slitting band is rebuild, applied expansion area (i.e. above-mentioned target area) is discharged.
Data situation is to bit in target base region values in step 106, each band for including according to target RAID It is configured.
In the embodiment of the present invention, when storage equipment determines bit and target in the corresponding target base region target RAID It is when the ratio for the band number that RAID includes is greater than or equal to 1:1, i.e., corresponding with target RAID basic in data variation record sheet Area meets the requirement of a practical band in one bit corresponding target RAID, and storage equipment can not needed from expansion area In apply for region additionally for target RAID, but directly can record target RAID packet using the position bit in target base region The data situation in each band included.For example, setting second for corresponding bit of the value of band that data change Preset value;The first preset value is set by corresponding bit of the value of band that data do not change.
Step 107, when needing to carry out data reconstruction, according to bit values each in target base region to corresponding band It is rebuild.
In the embodiment of the present invention, when needing to carry out data reconstruction, such as offline member disk rejoins target RAID, Storage equipment can determine the band for needing to carry out data reconstruction (as value is 1 according to bit values each in target base region Bit corresponding bands), and data reconstruction is carried out to the band for needing to carry out data reconstruction.
As it can be seen that in the method flow described in Fig. 1, by the way that data variation record sheet is divided into base region and extension Area, includes the cell domain space for the maximum RAID several equivalent supported with system in base region, and each cell domain space is fixed for Record the data situation in the band for including in corresponding RAID;Expansion area is the region that each RAID is shared, and can needed Application is used to record the data situation in the band for including in corresponding RAID when wanting, in available data reconstruction model It is compared for each RAID implementation for distributing the data variation record sheet of fixed size, in the total size phase of data variation record sheet With in the case where, the ratio of the bit band numbers for including with RAID in the corresponding data variation record sheet of RAID is better assured that Example is 1:1, reduces the case where rebuilding to the band for not needing to carry out data reconstruction, improves data reconstruction effect Rate.
Fig. 2 is referred to, Fig. 2 is the flow diagram of another data re-establishing method provided in an embodiment of the present invention, such as Fig. 2 Shown, which may comprise steps of:
It should be noted that step 201~step 211 executing subject can be the storage equipment for supporting RAID, storage The processor of equipment, such as CPU or RAID controller.For ease of description, being with step 201~step 211 executing subject below It is illustrated for storage equipment.
Step 201, when target RAID reach record data variation record surface condition when, determine in data variation record sheet with The size of the corresponding target base region target RAID.
Step 202 judges whether the ratio of the bit band numbers for including with target RAID in target base region is greater than or waits In 1:1.If so, going to step 203;Otherwise, step 205 is gone to.
Data situation is to bit in target base region values in step 203, each band for including according to target RAID It is configured.
Step 204, when needing to carry out data reconstruction, according to bit values each in target base region to corresponding band It is rebuild.
In the embodiment of the present invention, the specific implementation of step 201~step 204 may refer to 101~step 102 of above-mentioned steps And the associated description in step 106~step 107, details are not described herein for the embodiment of the present invention.
Step 205 judges whether the size of remaining Free Region of the expansion area of data variation record sheet is greater than or equal to Target sizes.If so, going to step 206;Otherwise, step 208 is gone to.
In the embodiment of the present invention, target sizes (bit digit) are the size (bit digit) and target RAID of target base region Including band number difference.
When storage equipment determines the size of the corresponding target base region target RAID less than the band number that target RAID includes When, storage equipment needs to attempt to be used for data reconstruction from expansion area for the region of target RAID application target sizes, to guarantee mesh The ratio for the band number that mark base region includes with target RAID with the sum of the position bit in region applied from expansion area reaches 1:1.
Correspondingly, the size of the remaining Free Region of the available data variation record sheet of equipment is stored, and judges that this is surplus Whether the size of remaining Free Region is greater than or equal to target sizes;If so, showing there are enough remaining available areas in expansion area Domain guarantees the data situation in each band for including with the proportional recording target RAID of bit and band number 1:1;Otherwise, Show there is no enough remaining Free Regions to guarantee with bit and the proportional recording target RAID packet of band number 1:1 in expansion area The data situation in each band included, that is, need to reduce the ratio of bit He band number, and with 1:N, (N is more than or equal to 2 Natural number) proportional recording target RAID include each band in data situation.
Step 206, the target area for applying for target sizes from the expansion area of data variation record sheet.
In the embodiment of the present invention, when the ratio of the bit band numbers for including with target RAID in target base region is less than 1: 1, and when having enough remaining Free Regions in the expansion area of data variation record sheet, storage equipment can be recorded from data variation The target area for applying for target sizes in the expansion area of table, so that the sum of position the bit of target base region and target area and target The ratio for the band number that RAID includes reaches 1:1.
It should be appreciated that in embodiments of the present invention, in above-mentioned 206, if the residue of the expansion area of data variation record sheet The size of Free Region is greater than target sizes, then stores size of the equipment from expansion area for the target area of target RAID application Above-mentioned target sizes can be greater than.
Optionally, in embodiments of the present invention, storage equipment is target RAID from the expansion area of data variation record sheet When applying for the target area of target sizes, it can be applied according to the unit of " expansion area total size/Max " size, i.e., every time From expansion area apply " expansion area total size/Max " size region, until meet target base region with from expansion area apply The ratio for the band number that the sum of the position bit in region includes with target RAID reaches the condition of 1:1.
Step 207, when needing to carry out data reconstruction, according to each bit of value pair in target base region and target area Corresponding band carries out data reconstruction.
In the embodiment of the present invention, when needing to carry out data reconstruction, such as offline member disk rejoins target RAID, Storage equipment can determine the band for needing to carry out data reconstruction according to bit of value each in target base region and target area (as being worth the corresponding band in the position bit for being 1), and data reconstruction is carried out to the band for needing to carry out data reconstruction, i.e., as needed Data in the band of reconstruction in not offline member disk obtain the band on rejoining the offline disk in target RAID Data, and write the data into the corresponding position of the offline disk rejoined in target RAID.
Preferably, in embodiments of the present invention, storage equipment carries out data reconstruction to the band for needing to carry out data reconstruction When, data reconstruction preferentially can be carried out to the condition for needing to carry out data reconstruction corresponding with the position the bit of expansion area, and in the portion After the completion of slitting band is rebuild, applied expansion area (i.e. above-mentioned target area) is discharged.
Step 208, request for data change the size of all remaining Free Regions of the expansion area of record sheet.
In the embodiment of the present invention, if storage equipment determines the big of the remaining Free Region of the expansion area of data variation record sheet Be less than target sizes, then store equipment can the direct expansion area of request for data variation record sheet all remaining Free Regions Size be used to record data situation in each band that target RAID includes.
Step 209, according to the size of the size of target base region and all remaining Free Regions of expansion area, determine target The target proportion 1 of the sum of the bit band numbers for including with target RAID in all remaining Free Region of base region and expansion area: N。
In the embodiment of the present invention, when the size of the remaining Free Region of expansion area is less than target sizes, i.e., by expansion area All remaining Free Regions when being used to the data situation in each band that record target RAID includes, still can not reach The condition for the band number 1:1 for including with target RAID to bit, at this time, it may be necessary to according to the whole of target base region and expansion area The size of remaining Free Region, adjust for record the data situation in each band that target RAID includes the position bit and The ratio of band number is adjusted to 1:N (N is the natural number more than or equal to 2, referred to herein as target proportion).
Wherein, it is necessary to meet following condition by N:
N=┌ (the bit of all remaining Free Region of band number/target base region and expansion area that target RAID includes The sum of position) ┐
Wherein, ┌ * ┐ is to round up to " * ", such as 1.9 ┐=2 of ┌, 2.1 ┐=3 ┌ 2 ┐=2, ┌.
Optionally, in embodiments of the present invention, when the target RAID band number for including and target base region and expansion area It, can will be remaining after target proportion is taken as 1:N when all the ratio of the sum of position bit of residue Free Regions is non-integer Expansion area release, so that it is reverted to idle state, for other RAID use.
As an example it is assumed that the band number that target RAID includes is 600, whole residues of target base region and expansion area can With the sum of the position bit in region being 400, (position bit of target base region is 100, the position bit of all remaining Free Regions of expansion area For the sum of the position bit of all remaining Free Region of band number and target base region and expansion area that 300), target RAID includes Ratio be 1.5, at this point, N is 2 (1.5 ┐=2 N=┌), i.e. target RAID needs 300bit progress data variation notes altogether Record, thus, the release of remaining expansion area (100bit) can be made it revert to idle state by storage equipment.
It should be noted that in embodiments of the present invention, can recorde target RAID in the gauge outfit of data variation record sheet Corresponding bit with the ratio (1:1 or 1:N) of band number;Further, since one bit in data record sheet may correspond to Two or more bands that target RAID includes, therefore can be by same bit with data record sheet in target RAID Corresponding band is properly termed as wide band.
Data situation in step 210, each band for including according to target proportion and target RAID is to target base Local area is configured to corresponding bit of value in all remaining Free Region of expansion area.
In the embodiment of the present invention, storage equipment has determined the bit band numbers for including with target RAID in data record sheet Target proportion after, (the bit including target base region bit each in data record sheet can be determined according to the target proportion Position and the position bit in region applied from expansion area) and the corresponding relationship of the target RAID band that includes in turn can basis The data situation in each band that target RAID includes is in all remaining Free Region of target base region and expansion area Corresponding bit values are configured.
As an example it is assumed that N=2, the i.e. position bit in the corresponding data record sheet of target RAID include with target RAID The ratio of band number is 1:2, then each bit corresponding band, e.g., first bit corresponding items can first be determined by storing equipment Band 0 and band 1, second bit corresponding bands 2 and band 3 ... k-th bit corresponding bands (2K-2) and band (2K- 1)…;Wherein, K is the natural number greater than 2.In turn, storage equipment can be each during member disk is offline with monitoring objective RAID The data situation of band, and corresponding bit of value is configured according to the data situation, for example, if band 2 Or/and the generation data in band 3 change, then set 1 for second bit values;If band (2K-2) or/and band Data occur in (2K-1) to change, then set 1 for k-th bit values;If in band (2K-2) and band (2K-1) not Data occur to change, then k-th bit values are remained 0.
Step 211, when needing to carry out data reconstruction, according to all remaining Free Regions of target base region and expansion area In corresponding bit values to corresponding band progress data reconstruction.
When needing to carry out data reconstruction, such as offline member disk rejoins target RAID, and storage equipment can root (such as according to each bit of value in target base region and target area and the determining band for needing to carry out data reconstruction of target proportion The corresponding band in the position bit that value is 1), and data reconstruction is carried out to the band for needing to carry out data reconstruction, i.e., it rebuilds as needed Band in data in not offline member disk obtain the band in the number rejoined on the offline disk in target RAID According to, and write the data into the corresponding position of the offline disk rejoined in target RAID.
For example, it is assumed that N=2, if the corresponding data variation record sheet of target RAID (including target base region and from expansion area The region of middle application) in first bit values be 1, then data reconstruction is carried out to the band 0 of target RAID and band 1;If the K bit values are 1, then carry out data reconstruction to the band (2K-2) of target RAID and band (2K-1).
Preferably, in embodiments of the present invention, storage equipment carries out data reconstruction to the band for needing to carry out data reconstruction When, data reconstruction preferentially can be carried out to the condition for needing to carry out data reconstruction corresponding with the position the bit of expansion area, and in the portion After the completion of slitting band is rebuild, applied expansion area is discharged.
It optionally, can also be with the unit of " expansion area total size/Max " when storage equipment discharges applied expansion area It is discharged, i.e., after the data reconstruction of every corresponding band in region for completing " expansion area total size/Max " size, discharges institute Shen The part expansion area please.
It is worth noting that in embodiments of the present invention, after storage equipment carries out data reconstruction to respective strap, needing Value corresponding with the band is reset to the first preset value (such as 0), specific implementation repeats no more herein.
As it can be seen that in the method flow described in Fig. 2, by the way that data variation record sheet is divided into base region and extension Area, includes the cell domain space for the maximum RAID several equivalent supported with system in base region, and each cell domain space is fixed for Record the data situation in the band for including in corresponding RAID;Expansion area is the region that each RAID is shared, and can needed Application is used to record the data situation in the band for including in corresponding RAID when wanting, and the space of expansion area is in data It can be released after the completion of reconstruction, it is contemplated that be not in actual conditions while thering are a large amount of RAID to need to carry out data variation record The case where occur, thus, it is only required to which the expansion area that a fair-sized is arranged uses respectively for each RAID, can be realized in target RAID needs to carry out data variation and records the ratio 1:1 for having enough spaces to meet bit with target RAID stripe number, reduction pair The band the case where being rebuild for not needing to carry out data reconstruction, and must be respectively each RAID reserved in the prior art The scheme that enough spaces carry out data variation record is compared, and has been effectively saved space, has been avoided system resource waste.
By above description as can be seen that in embodiments of the present invention, being recorded when target RAID reaches record data variation When surface condition, the size of target corresponding with target RAID base region in data variation record sheet is determined, and work as target base region When the ratio of the middle bit band number for including with target RAID is less than 1:1, apply for mesh from the expansion area of data variation record sheet The target area for marking size, so that the band number that the sum of position the bit of target base region and target area includes with target RAID Ratio reaches 1:1, and then the data situation in each band for including according to target RAID is to target base region and target area Bit values are configured in domain, when needing to carry out data reconstruction, according to bit each in target base region and target area Value corresponding band is carried out to be that the data of each RAID distribution fixed size become in data reconstruction, with available data reconstruction model The implementation for changing record sheet is compared, and in the identical situation of total size of data variation record sheet, better assures that RAID The ratio of the bit band numbers for including with RAID is 1:1 in corresponding data variation record sheet, is reduced to not needing to count The case where being rebuild according to the band of reconstruction improves data reconstruction efficiency.
Fig. 3 is referred to, is a kind of structural schematic diagram of data reconstruction device provided in an embodiment of the present invention, wherein the number It can be applied to the storage equipment in above method embodiment according to reconstructing device, as shown in figure 4, the data reconstruction device can wrap It includes:
Determination unit 310, for reaching record data variation record surface condition as target raid-array RAID When, determine the size of target base region corresponding with the target RAID in data variation record sheet;
Judging unit 320, for judging the bit band numbers for including with the target RAID in the target base region Whether ratio is greater than or equal to 1:1;
Application unit 330, for judging bit and the target in the target base region when the judging unit 320 When the ratio for the band number that RAID includes is less than 1:1, apply for the target of target sizes from the expansion area of data variation record sheet Region, so that the band number that the sum of the position bit of the target base region and the target area includes with the target RAID Ratio reaches 1:1;
Setting unit 340, the data situation in each band for including according to the target RAID is to the mesh The value that base region is marked with bit in the target area is configured;
Data reconstruction unit 350, for when needing to carry out data reconstruction, according to the target base region and the target Each bit of value carries out data reconstruction to corresponding band in region.
In an alternative embodiment, the setting unit 340 can be also used for judging the mesh when the judging unit 320 When marking the ratio of bit and the target RAID band number for including in base region more than or equal to 1:1, according to the target Data situation is configured bit in target base region values in each band that RAID includes;
The data reconstruction unit 350 can be also used for when needing to carry out data reconstruction, according to the target base region In each bit of value to corresponding band carry out data reconstruction.
In an alternative embodiment, the judging unit 320 can be also used for the extension for judging the data variation record sheet Whether the size of the remaining Free Region in area is greater than or equal to the target sizes;
The application unit 330 can be specifically used for judging the data variation record sheet when the judging unit 320 When the size of the remaining Free Region of expansion area is greater than or equal to the target sizes, from the expansion area of data variation record sheet Apply for the target area of target sizes.
In an alternative embodiment, the application unit 330 can be also used for judging the number when the judging unit 330 When being less than the target sizes according to the size of the remaining Free Region of the expansion area of variation record sheet, apply for the data variation note Record the size of all remaining Free Region of the expansion area of table;
The determination unit 310 can be also used for the size according to the target base region and the whole of the expansion area The size of remaining Free Region determines the position bit in all remaining Free Region of the target base region and the expansion area With the target proportion 1:N for the band number for including with the target RAID;N is the natural number more than or equal to 2;
The setting unit 340 can be also used for each item for including according to the target proportion and the target RAID Data situation in band is to the target base region and corresponding bit in all remaining Free Region of the expansion area Value is configured;
The data reconstruction unit 350 can be also used for when needing to carry out data reconstruction, according to the target base region Data reconstruction is carried out to corresponding band to corresponding bit of value in all remaining Free Region of the expansion area.
Referring to Figure 4 together, it is the structural schematic diagram of another data reconstruction device provided in an embodiment of the present invention, such as schemes Shown in 4, on the basis of embodiment shown in Fig. 3, data reconstruction device shown in Fig. 4 can also include:
Releasing unit 360, for discharging institute Shen after the completion of bit corresponding band each in the target area is rebuild The target area please.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize the present invention program.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
As seen from the above-described embodiment, when target RAID reaches record data variation record surface condition, data variation is determined The size of target corresponding with target RAID base region in record sheet, and in the target base region bit include with target RAID Band number ratio be less than 1:1 when, from the expansion area of data variation record sheet apply target sizes target area so that The ratio for the band number that the sum of position the bit of target base region and target area includes with target RAID reaches 1:1, and then according to mesh The data situation in each band that mark RAID includes is configured target base region with bit in target area values, When needing to carry out data reconstruction, corresponding band is counted with bit values each in target area according to target base region According to the implementation phase for the data variation record sheet in reconstruction, with available data reconstruction model being each RAID distribution fixed size Than better assuring that the corresponding data variation record sheet of RAID in the identical situation of total size of data variation record sheet The ratio of the middle bit band number for including with RAID is 1:1, reduces and rebuilds to the band for not needing to carry out data reconstruction The case where occur, improve data reconstruction efficiency.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of data re-establishing method characterized by comprising
When target raid-array RAID is converted to critical state or degrading state by normal condition, determine that data become Change the size of target base region corresponding with the target RAID in record sheet, the base region is the maximum supported with system The cell domain space of RAID several equivalent, each cell domain space are fixed for recording the number in the band for including in corresponding RAID According to situation of change;
Judge in the target base region whether the ratio of bit and the target RAID band number for including is greater than or equal to 1: 1;
If it is not, then applying for the target area of target sizes from the expansion area of data variation record sheet, so that the target is basic The sum of position the bit of area and the target area and the ratio of the target RAID band number for including reach 1:1, the expansion area For each RAID share region, for recording the data situation in the band for including in corresponding RAID;
The data situation in each band for including according to the target RAID is to the target base region and the target area Bit values are configured in domain;
When needing to carry out data reconstruction, according to the target base region with bit of value each in the target area to corresponding Band carry out data reconstruction.
2. the method according to claim 1, wherein in the judgement target base region bit with it is described Whether the ratio for the band number that target RAID includes is greater than or equal to after 1:1, further includes:
If so, data situation is to bit in the target base region in each band for including according to the target RAID Value be configured;
When needing to carry out data reconstruction, data are carried out to corresponding band according to bit of value each in the target base region It rebuilds.
3. method according to claim 1 or 2, which is characterized in that the Shen from the expansion area of data variation record sheet It please be before the target area of target sizes, further includes:
Judge whether the size of the remaining Free Region of the expansion area of the data variation record sheet is greater than or equal to the target Size;
If so, determining the step for executing the target area for applying for target sizes from the expansion area of data variation record sheet Suddenly.
4. according to the method described in claim 3, it is characterized in that, the expansion area of the judgement data variation record sheet Whether the size of remaining Free Region is greater than or equal to after the target sizes, further includes:
If it is not, then applying for the size of all remaining Free Region of the expansion area of the data variation record sheet;
According to the size of the size of the target base region and all remaining Free Region of the expansion area, the target is determined Base region and the sum of bit in all remaining Free Regions of the expansion area and the mesh of the target RAID band number for including Mark ratio 1:N;N is the natural number more than or equal to 2;
The data situation in each band for including according to the target proportion and the target RAID is to the target base Local area is configured to corresponding bit of value in all remaining Free Region of the expansion area;
When needing to carry out data reconstruction, according to the target base region and phase in all remaining Free Region of the expansion area Bit values are answered to carry out data reconstruction to corresponding band.
5. method according to claim 1 or 2, which is characterized in that described according to the target base region and the target After each bit of value is to corresponding band progress data reconstruction in region, further includes:
After the completion of bit each in the target area corresponding bands are rebuild, the applied target area is discharged.
6. a kind of data reconstruction device characterized by comprising
Determination unit, for being converted to critical state or degrading state by normal condition as target raid-array RAID When, determine the size of target base region corresponding with the target RAID in data variation record sheet, the base region is and is The cell domain space for the maximum RAID several equivalent supported of uniting, each cell domain space, which is fixed for recording in corresponding RAID, includes Band in data situation;
Judging unit, for judging in the target base region that the ratio of bit and the target RAID band number for including is It is no to be greater than or equal to 1:1;
Application unit, for judging that bit include with the target RAID in the target base region when the judging unit When the ratio of band number is less than 1:1, apply for the target area of target sizes from the expansion area of data variation record sheet, so that institute It states the sum of position bit of target base region and the target area and the ratio of the target RAID band number for including reaches 1:1, The expansion area is the region that each RAID is shared, for recording the data situation in the band for including in corresponding RAID;
Setting unit, the data situation in each band for including according to the target RAID is to the target base region Value with bit in the target area is configured;
Data reconstruction unit, for when needing to carry out data reconstruction, according in the target base region and the target area Each bit of value carries out data reconstruction to corresponding band.
7. device according to claim 6, which is characterized in that
The setting unit is also used to judge in the target base region bit and the target RAID when the judging unit Including the ratio of band number be greater than or equal to 1:1 when, data situation in each band for including according to the target RAID Bit in target base region values are configured;
The data reconstruction unit is also used to when needing to carry out data reconstruction, according to each bit in the target base region Value carries out data reconstruction to corresponding band.
8. device according to claim 6 or 7, which is characterized in that
The judging unit, be also used to judge the remaining Free Region of the expansion area of the data variation record sheet size whether More than or equal to the target sizes;
The application unit, specifically for judging that the residue of expansion area of the data variation record sheet can when the judging unit When being greater than or equal to the target sizes with the size in region, apply for target sizes from the expansion area of data variation record sheet Target area.
9. device according to claim 8, which is characterized in that
The application unit is also used to judge that the residue of the expansion area of the data variation record sheet is available when the judging unit When the size in region is less than the target sizes, apply for all remaining Free Region of the expansion area of the data variation record sheet Size;
The determination unit is also used to the size according to the target base region and all remaining Free Region of the expansion area Size, determine the sum of bit and the target in all remaining Free Regions of the target base region and the expansion area The target proportion 1:N for the band number that RAID includes;N is the natural number more than or equal to 2;
The setting unit, the data being also used in each band for including according to the target proportion and the target RAID Situation of change sets the target base region to corresponding bit of value in all remaining Free Region of the expansion area It sets;
The data reconstruction unit is also used to when needing to carry out data reconstruction, according to the target base region and the extension Corresponding bit values carry out data reconstruction to corresponding band in all remaining Free Region in area.
10. device according to claim 6 or 7, which is characterized in that described device further include:
Releasing unit, for discharging applied described after the completion of bit corresponding band each in the target area is rebuild 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 CN105867841A (en) 2016-08-17
CN105867841B true 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)

Families Citing this family (2)

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

Citations (4)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8527698B2 (en) * 2010-06-22 2013-09-03 Lsi Corporation Parity-based raid system configured to protect against data corruption caused by the occurrence of write holes

Patent Citations (4)

* 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
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

Also Published As

Publication number Publication date
CN105867841A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
US7565569B2 (en) Data protection in a mass storage system
US10691187B2 (en) Persistent reservations for virtual disk using multiple targets
US7844775B2 (en) Distribution of data in a distributed shared storage system
JP6132766B2 (en) Controlled automatic recovery of data center services
CN105072182A (en) Load balancing method, load balancer and user terminal
JP2012524947A5 (en)
WO2019228560A3 (en) Managing blockchain-based centralized ledger systems
CN104378423B (en) Metadata cluster distributed memory system and reading, the method for write-in storage data
WO2013097674A1 (en) Distributed system and data operation method thereof
CN105955824A (en) Method and device for configuring virtual resource
CN102387179B (en) Distributed file system and node, storage method and storage controlling method
WO2020035095A3 (en) Asynchronous processing of blockchain blocks
EP1519271A3 (en) Disk array device,method of extending storage capacity and computer program
CN105867841B (en) A kind of data re-establishing method and device
JP2003208362A5 (en)
JP2013539134A5 (en)
CN104580381B (en) A kind of method that job task is performed in multinode network
CN106777164A (en) A kind of Data Migration cluster and data migration method
CN103812945A (en) Method for upgrading data and central server
CN106462503A (en) Asynchronously prefetching sharable memory pages
CN105897837A (en) Content distribution task submitting method and system
CN106776891A (en) A kind of method and apparatus of file storage
CN108156208A (en) A kind of dissemination method of application data, device and system
CN106569729A (en) Method and device for writing in data in distributed system
JP2005092862A5 (en)

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