CN102609224B - Redundant array of independent disk system and initializing method thereof - Google Patents
Redundant array of independent disk system and initializing method thereof Download PDFInfo
- Publication number
- CN102609224B CN102609224B CN201210035448.8A CN201210035448A CN102609224B CN 102609224 B CN102609224 B CN 102609224B CN 201210035448 A CN201210035448 A CN 201210035448A CN 102609224 B CN102609224 B CN 102609224B
- Authority
- CN
- China
- Prior art keywords
- band
- bitmap
- value
- region
- read
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 230000001360 synchronised effect Effects 0.000 claims abstract description 79
- 230000008569 process Effects 0.000 claims description 14
- 238000011423 initialization method Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 239000000976 ink Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005111 flow chemistry technique Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000002618 waking effect Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses an RAID5 (Redundant array of independent disk) system and an initializing method thereof, relating to the field of computer systems and memory; a method disclosed by the invention comprises the following steps: establishing a primary bitmap; when initializing each strip orderly, reading the value of an area corresponding bit which a to-be-initialized strip belongs to from the primary bitmap; when the synchronization of the area is determined, continuing to initialize a next strip orderly; when the area is determined asynchronous, finding a secondary bitmap corresponding to the area, and reading the value of a to-be-initialized strip corresponding bit from the secondary bitmap; when the synchronization of the strip is determined, continuing to initialize a next strip orderly; when the strip is determined asynchronous or the secondary bitmap corresponding to the area is not found, processing synchronous checking calculation to the to-be-initialized strip so that the to-be-initialized strip is synchronized, and continuing to initialize a next strip orderly. The RAID can be put into use at once after an establishing procedure by the application technical proposal.
Description
Technical field
The present invention relates to computer system and field of storage, be specifically related to a kind of RAID5 (RedundantArrays of Inexpensive Disks, raid-array) system and initial method thereof.
Background technology
For RAID5 (the Redundant Arrays of InexpensiveDisks with redundancy check information, raid-array) system, when RAID5 newly creates, each member is coiled data and can not be ensured that strip data is conforming. and the inconsistency of data makes system cannot according to normal flow processing host I/O request, the checking data obtained may be wrong, first must carry out consistency initializing work when therefore the RAID5 of these ranks creates.Typical initialization mode is all member's dishes of format, all members is coiled data and writes zero, can ensure the even parity check of RAID5 itemize data fit.
But RAID5 initialization task must travel through all data of member's dish, and this is a job very consuming time, and the increase of capacity along with disk, the time of wait will be longer.Before initialization completes in addition, RAID5 cannot respond host side I/O request, otherwise the data write may be initialised, operation covers, or produces error in data, and therefore in initialization procedure, RAID5 cannot respond I/O request, cannot meet the demand of plug and play.How to complete the work of RAID5 system initialization fast, and for host side can with becoming a urgent problem.
Current RAID5 has two kinds of WriteModes: read rewrite and reconstruct write.Read rewriting to be generally used for fritter and to write, reconstruct is write and is generally used for bulk and writes.Rewriting for reading, needing the participation of old checking data, so, if strip data is originally inconsistent, read to rewrite owing to relying on original proof test value, through recalculating, the result of mistake can be produced, band or inconsistent, lose the effect of redundancy.And if be reconstructed and write, do not need old proof test value to participate in calculating, so new result is consistent, even if original strip data is inconsistent, writes through reconstruct and become consistent yet.If the first time write request of band arrives, just allow it do reconstruct and write, first time adopts each self-corresponding WriteMode after writing.That is deliberately need not do initialization, namely can come into operation after establishment.
Like this, just need record to write or the region of synchronous mistake, what adopt at present is bitmap mark mode, namely utilizes the synchronous situation of the corresponding record band in bitmap.Such as, synchronously, then the value of the position in the corresponding bitmap of this band is 1 to a certain band.If band is asynchronous, then the value of the position in the corresponding bitmap of band is 0.
Obviously, the synchronous situation of the correspondence band in above-mentioned bitmap has a lot of restriction in actual use.Suppose each band 4KB, for the disk of 2TB, the bitmap being common to recording synchronism situation approximately needs 62MB, if bitmap is all placed in internal memory, can consume very large internal memory, particularly have the system of multiple RAID5.And if be only placed on a part of bitmap page in internal memory, to wait when using degaussing dish requests for page again, and original Page swap-out in internal memory, be the reduction of the consumption of internal memory like this, but increase the request of disk, very large affects write performance, particularly for random write.
Summary of the invention
Technical matters to be solved by this invention is, provides a kind of RAID5 system and initial method thereof, can come into operation after making to create.
In order to solve the problem, the invention discloses a kind of raid-array RAID5 system initialization method, comprising:
Create the one-level bitmap of synchronous regime for recording each region in RAID5, wherein, each in the one-level bitmap created records the synchronous regime in a region respectively, and a described region comprises multiple continuous strip;
During each band of sequence initializes, from described one-level bitmap, read the current value wanting corresponding position, the region belonging to initialized band, when determining that this region synchronously according to read value, continue to carry out sequence initializes to next band;
When determining that this region is asynchronous according to read value, find the secondary bitmap that this region is corresponding, the current value wanting the corresponding position of initialized band is read from found secondary bitmap, when determining that this band synchronously according to read value, continue to carry out sequence initializes to next band, when determining that this band is asynchronous according to read value, initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime, continue again to carry out sequence initializes to next band, search less than secondary bitmap corresponding to this region, then want initialized band to carry out synchronization check calculating to current, make current wanted initialized band synchronous, continue to carry out sequence initializes to next band.
Preferably, said method, in above-mentioned initialization procedure, also records initialization and completes position.
Preferably, said method also comprises: in above-mentioned initialization procedure, receive write request, if the position of the band at the write request place received is less than recorded initialization complete position, then selects to read to rewrite or reconstruct WriteMode according to application scenarios and carry out write operation.
Preferably, in said method, if the band bitmap at the write request place received is greater than recorded initialization complete position, then search the secondary bitmap that the region belonging to band at write request place is corresponding, if find this secondary bitmap, from found secondary bitmap, then read the value of the corresponding position of band at received write request place, corresponding WriteMode is selected to carry out write operation according to read value, if search less than secondary bitmap corresponding to the region belonging to the band at write request place, free memory block is then utilized to create this secondary bitmap, in the secondary bitmap created, each only records the synchronous regime of a band in this region, again the band at write request place is reconstructed and writes, the value of corresponding for this band in created secondary bitmap position is arranged to value corresponding to synchronous regime.
Preferably, in said method, corresponding WriteMode is selected to carry out the process of write operation according to read value as follows:
When determining that this band synchronously according to the value read, select to read to rewrite or reconstruct WriteMode according to application scenarios and carry out write operation;
When determining that this band is asynchronous according to the value read, select re-writing mode to carry out write operation, after write operation terminates, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime.
Preferably, in said method, when each band recorded in described secondary bitmap is all synchronous, then the value of corresponding for region corresponding for this secondary bitmap in described one-level bitmap position is arranged to value corresponding to synchronous regime, and discharges this memory block shared by secondary bitmap.
Preferably, said method also comprises: when internal memory use exceedes setting ratio, the memory block shared by secondary bitmap that release does not upgrade for a long time.
The invention also discloses a kind of raid-array (RAID5) system, comprising:
First module, creates the one-level bitmap of the synchronous regime for recording each region in RAID5, and wherein, each in the one-level bitmap created records the synchronous regime in a region respectively, and a described region comprises multiple continuous strip;
Second module, during each band of sequence initializes, reads the current value wanting corresponding position, the region belonging to initialized band from described one-level bitmap;
3rd module, when determining that this region synchronously according to read value, continues to carry out sequence initializes to next band, when determining that this region is asynchronous according to read value, find the secondary bitmap that this region is corresponding, the current value wanting the corresponding position of initialized band is read from found secondary bitmap, when determining that this band synchronously according to read value, continue to carry out sequence initializes to next band, when determining that this band is asynchronous according to read value, initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime, continue to carry out sequence initializes to next band, search less than secondary bitmap corresponding to this region, then initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, continue to carry out sequence initializes to next band.
Preferably, in said system, described 3rd module, in initialization procedure, also records initialization and completes position; Now, this system also comprises:
Four module, in above-mentioned initialization procedure, receives write request, if the position of the band at the write request place received is less than recorded initialization complete position, then selects to read to rewrite or reconstruct WriteMode according to application scenarios and carries out write operation, if the band bitmap at the write request place received is greater than recorded initialization complete position, then search the secondary bitmap that the region belonging to band at write request place is corresponding, if find this secondary bitmap, from found secondary bitmap, then read the value of the corresponding position of band at received write request place, corresponding WriteMode is selected to carry out write operation according to read value, if search less than secondary bitmap corresponding to the region belonging to the band at write request place, free memory block is then utilized to create this secondary bitmap, in the secondary bitmap created, each only records the synchronous regime of a band in this region, again the band at write request place is reconstructed and writes, the value of corresponding for this band in created secondary bitmap position is arranged to value corresponding to synchronous regime.
Preferably, in said system, described four module, each band recorded in described secondary bitmap is all synchronous, then the value of corresponding for region corresponding for this secondary bitmap in described one-level bitmap position is arranged to value corresponding to synchronous regime, and discharges this memory block shared by secondary bitmap.
Technical scheme, proposes a kind of bitmap mode of record band synchronous situation newly, can come into operation, and the bitmap mode committed memory resource that technical scheme provides is less after making RAID establishment.
Accompanying drawing explanation
Fig. 1 is sequence initializes process flow diagram in the present embodiment;
Fig. 2 is write request process flow diagram in the present embodiment;
Fig. 3 be in the present embodiment the cycle write with a brush dipped in Chinese ink process flow diagram.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, hereafter will be described in further detail technical solution of the present invention by reference to the accompanying drawings.It should be noted that, when not conflicting, the feature in the embodiment of the application and embodiment can combine arbitrarily mutually.
Embodiment 1
In the present embodiment, applicant proposes in linux kernel on software PLC basis, bitmap can be adopted to go to mark the synchronous regime (such as write or the value of position in bitmap that the region of synchronous mistake is corresponding is 1) in each region, synchronous regime corresponding according to mark again selects suitable WriteMode (rewrite as read or reconstruct and write), thus improves the initialized efficiency of RAID.
Wherein, the bitmap mark mode adopted in the present embodiment, be in bitmap one for marking the synchronous regime of multiple continuous strip, this is the division of a coarseness, is equivalent in bitmap one for marking the Synchronization Status Message in the region that multiple continuous strip forms.Suppose, one in bitmap for marking the Synchronization Status Message of 16 continuous strips, so for the disk of 2TB, its bitmap size, less than 4MB, like this, all can be placed on message bit pattern in internal memory, mutual with what reduce with disk, decrease memory consumption simultaneously.Due to the status information whether mark 16 bands are synchronous of in bitmap, write or initialization when these 16 bands all reconstruct, this position in bitmap is 1 (initial value is 0) by.In order to represent the synchronous regime of the band more segmented, when to a bar with write request time, first check the value of the position of region corresponding in bitmap belonging to this band, if this value puts 1, just illustrate that 16 bands in this region are all synchronized, the band namely receiving write request is synchronous; If the value of the position that the region belonging to this band is corresponding in bitmap does not put 1, just distribute a memory block, have 16 positions at least, this memory block is for creating secondary bitmap, representing the state of each band, is then exactly operate position corresponding in memory block.Until these 16 all put 1, just position corresponding for bitmap is arranged 1, then this memory block is discharged, certainly, to limit the quantity of these memory blocks, in order to avoid excessive use internal memory, if reach maximum quantity, just need Exchange rings, discharge the memory block be replaced out, to new request dispatching memory block.This replaces algorithm has a lot of realization, as long as rationally all right.In addition, preferably in scheme, the memory block entered the earliest is swapped out, because if all write, just should not suffer at internal memory, also in internal memory, just illustrate and do not ask for a long time, so to swap out or reasonably.
And for the memory block be assigned with, when needing the operations such as fast finding deletion, RBTree can be adopted to manage, the serial number (can calculate) of the diagram page in place of the position that memory block is corresponding is as key word, can efficient searching be carried out, add, the operations such as deletion.
And when considering extreme, because Exchange rings, have bitmap record and lose, but can not affect the correctness of data, that section of band is equivalent to do not have initialization, if there is write request, once will reconstructs again and write.And also have sequence initializes thread, so, to finally showing that whole RAID5 is synchronized.
Below in conjunction with Fig. 1, the detailed process of declaration order initialization thread, this process comprises the steps: step 100, create the one-level bitmap of the synchronous regime for recording each region in RAID5, and be initialized as 0, wherein, each in the one-level bitmap created records the synchronous regime in a region respectively, and a region comprises multiple continuous strip;
It should be noted that, above-mentioned steps 100 operates when creating RAID and completes.
Step 200, inquires about current sector of wanting initialized band to comprise and whether reaches greatest measure, if so, then show that sequence initializes is complete, this flow process of result, otherwise enter step 300;
Step 300, reads current correspondence position, region of wanting belonging to initialized band, determines that whether this region is synchronous, if so, directly return step 200 and carry out initialization to next band, otherwise enter step 400 from one-level bitmap;
In the present embodiment, when region correspondence position 1 in one-level bitmap, then all reconstructed before showing each band that this region comprises and write, the region namely comprising these bands is synchronous.
Step 400, searches the secondary bitmap that this region is corresponding, if find, enter step 500, otherwise want initialized band to carry out synchronization check calculating to current, make current wanted initialized band synchronous, return step 200 and continue to carry out sequence initializes to next band.
Step 500, the current value wanting the corresponding position of initialized band is read from found secondary bitmap, judge that whether this band is synchronous according to read value, if, return step 200 to continue to carry out sequence initializes to next band, otherwise want initialized band to carry out synchronization check calculating to current, make current wanted initialized band synchronous, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime, then returns step 200 and continue to carry out sequence initializes to next band.
Some scheme, in the initialized process of said sequence, also records initialization and completes position, be recorded as place_seqinit.
Record initialization completes position, mainly initialized while, can carry out write operation, i.e. initialization thread and write thread and can run simultaneously.
Composition graphs 2 more below, illustrate that data concrete in initialization procedure write flow process, this process comprises the steps:
A) judge whether the position of the band at write request place is less than place_seqinit, if so, illustrate that sequence initializes has been crossed, select to read to rewrite or reconstruct WriteMode according to actual conditions, otherwise enter step b).
In this step, select to read to rewrite still to reconstruct WriteMode according to actual conditions, mainly refer to select suitable WriteMode, namely according to the quantity that disk will be read according to this area routine, which kind of mode is read dish quantity and just which is adopted less, improves performance to reduce read operation.Such as, when the number of disks that will read of write request is excessive, reconstruct WriteMode can be selected, when the number of disks that will read of write request is less, then can selects and read rewrite method.
B) value of the corresponding position of band affiliated area at write request place in one-level bitmap is read, judge that whether this band affiliated area is synchronous according to read value, if, illustrate that the band in whole region is all synchronized, directly select to read to rewrite or reconstruct to write according to actual conditions, otherwise enter step c).
C) judge whether the secondary bitmap that this band affiliated area is corresponding exists, if existed, enter steps d), otherwise enter step e);
D) value of band corresponding position in write request place in secondary bitmap is read, when judging that this band is synchronous according to read value, if, directly select to carry out reading to rewrite or reconstruct to write according to actual conditions, when judging that this band is asynchronous according to read value, this band is reconstructed and writes, and the value of corresponding for write request place band in secondary bitmap position is set to value corresponding to synchronous regime.If each band recorded in secondary bitmap is all synchronous, then the value of corresponding for region corresponding for this secondary bitmap in described one-level bitmap position is arranged to value corresponding to synchronous regime, and discharges this memory block shared by secondary bitmap.
E) be that this band creates secondary bitmap corresponding to affiliated area by memory block, and this band is reconstructed writes, the value of corresponding for write request place band in created secondary bitmap position is set to value corresponding to synchronous regime, wherein, in the secondary bitmap created, each only records the synchronous regime of a band in this region.
In some scheme, also consider the problem of resource-constrained, therefore when creating secondary bitmap, first check whether the quantity of memory block reaches greatest measure.If do not reach greatest measure, just distribute corresponding memory block to create secondary bitmap, be initialized as 0.If the quantity of memory block reaches greatest measure, then find out a memory block and discharge, create secondary bitmap to new request dispatching memory block, be initialized as 0.Wherein, during releasing memory block, can discharge by those memory blocks shared by secondary bitmap not upgrading (namely) for a long time of Dou.In addition, also can carry out releasing memory block according to resource utilization, the memory block quantity namely used and the ratio of memory block total quantity reach certain setting value, just can start releasing memory block.
In addition, the operation due to message bit pattern is all carry out in the buffer, just carries out real disk operating if desired.But the situation likely power-off occurring in this process or restart, bitmap record will be lost, and will produce bitmap record and the different situation of reality.Even if but bitmap record is different with reality, because bitmap is later than actual conditions, midway power-off is restarted, and that section of band is equivalent to do not have initialization, once will reconstruct again and write, can ensure the correctness of data.Not very high to requirement of real-time, if synchronous write gets back to disk, very large performance loss can be brought.So, need the impact considering performance, a message bit pattern can be set and periodically write back disk.Here go to realize by a thread, can arrange the time of waking up, the cycle that is shown in Fig. 3 writes with a brush dipped in Chinese ink the process of bitmap.Because the bitmap page is many, so, allow thread only inquire about the page of some each time.Check this collection of page whether having scanned sufficient amount, scanned and just exited, otherwise just inquire about a page.If the page is not labeled as dirty page, just stops the operation to this page, inquire about the next page.If be labeled as dirty page, just this page is write back disk.Know the dirty mark of this page.
Embodiment 2
The present embodiment introduces a kind of RAID5 system, at least comprises the first module, the second module and the 3rd module.Introduce the function of each module below.
First module, creates the one-level bitmap of the synchronous regime for recording each region in RAID5, and wherein, each in the one-level bitmap created records the synchronous regime in a region respectively, and a region comprises multiple continuous strip;
Second module, during each band of sequence initializes, reads the current value wanting corresponding position, the region belonging to initialized band from one-level bitmap;
3rd module, when determining that this region synchronously according to read value, continues to carry out sequence initializes to next band, when determining that this region is asynchronous according to read value, search the secondary bitmap that this region is corresponding, the current value wanting the corresponding position of initialized band is read from found secondary bitmap, when determining that this band synchronously according to read value, continue to carry out sequence initializes to next band, when determining that this band is asynchronous according to read value, initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime, continue to carry out sequence initializes to next band, search less than secondary bitmap corresponding to this region, then initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, continue to carry out sequence initializes to next band.
In addition, above-mentioned 3rd module, in initialization procedure, can also record initialization and complete position.Simultaneously the Main Function that record initialization completes position can carry out write operation initialized, and namely two-wire journey is run.Now, said system can increase a four module, and this module, in initialization procedure, receives write request, if the position of the band at the write request place received is less than recorded initialization complete position, then selects to read to rewrite or reconstruct WriteMode according to application scenarios and carry out write operation.If the band bitmap at the write request place received is greater than recorded initialization complete position, then search the secondary bitmap that the region belonging to band at write request place is corresponding, if find this secondary bitmap, from found secondary bitmap, then read the value of the corresponding position of band at received write request place, corresponding WriteMode is selected to carry out write operation according to read value, if search less than secondary bitmap corresponding to the region belonging to the band at write request place, free memory block is then utilized to create this secondary bitmap, in the secondary bitmap created, each only records the synchronous regime of a band in this region, again the band at write request place is reconstructed and writes, the value of corresponding for this band in created secondary bitmap position is arranged to value corresponding to synchronous regime.The detailed process of write operation and establishment secondary bitmap see embodiment 1, can not repeat them here.
Also have in some schemes, four module, when each band recorded in secondary bitmap is all synchronous, the value of corresponding for region corresponding for this secondary bitmap in one-level bitmap position is arranged to value corresponding to synchronous regime, and discharges this memory block shared by secondary bitmap.
In preferred version, also consider four module, can when internal memory use exceed setting ratio, the memory block shared by secondary bitmap that release does not upgrade for a long time, to improve resource utilization.
The all or part of step that one of ordinary skill in the art will appreciate that in said method is carried out instruction related hardware by program and is completed, and described program can be stored in computer-readable recording medium, as ROM (read-only memory), disk or CD etc.Alternatively, all or part of step of above-described embodiment also can use one or more integrated circuit to realize.Correspondingly, each module/unit in above-described embodiment can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.The application is not restricted to the combination of the hardware and software of any particular form.
The above, be only preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. a raid-array RAID5 system initialization method, is characterized in that, the method comprises:
Create the one-level bitmap of synchronous regime for recording each region in RAID5, wherein, each in the one-level bitmap created records the synchronous regime in a region respectively, and a described region comprises multiple continuous strip;
During each band of sequence initializes, from described one-level bitmap, read the current value wanting corresponding position, the region belonging to initialized band, when determining that this region synchronously according to read value, continue to carry out sequence initializes to next band;
When determining that this region is asynchronous according to read value, find the secondary bitmap that this region is corresponding, the current value wanting the corresponding position of initialized band is read from found secondary bitmap, when determining that this band synchronously according to read value, continue to carry out sequence initializes to next band, when determining that this band is asynchronous according to read value, initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime, continue again to carry out sequence initializes to next band, search less than secondary bitmap corresponding to this region, then want initialized band to carry out synchronization check calculating to current, make current wanted initialized band synchronous, continue to carry out sequence initializes to next band.
2. the method for claim 1, is characterized in that, in above-mentioned initialization procedure, also records initialization and completes position.
3. method as claimed in claim 2, it is characterized in that, the method also comprises: in above-mentioned initialization procedure, receive write request, if the position of the band at the write request place received is less than recorded initialization complete position, then selects to read to rewrite or reconstruct WriteMode according to application scenarios and carry out write operation.
4. method as claimed in claim 3, is characterized in that,
If the band bitmap at the write request place received is greater than recorded initialization complete position, then search the secondary bitmap that the region belonging to band at write request place is corresponding, if find this secondary bitmap, from found secondary bitmap, then read the value of the corresponding position of band at received write request place, corresponding WriteMode is selected to carry out write operation according to read value, if search less than secondary bitmap corresponding to the region belonging to the band at write request place, free memory block is then utilized to create this secondary bitmap, in the secondary bitmap created, each only records the synchronous regime of a band in this region, again the band at write request place is reconstructed and writes, the value of corresponding for this band in created secondary bitmap position is arranged to value corresponding to synchronous regime.
5. method as claimed in claim 4, is characterized in that, selects corresponding WriteMode to carry out the process of write operation as follows according to read value:
When determining that this band synchronously according to the value read, select to read to rewrite or reconstruct WriteMode according to application scenarios and carry out write operation;
When determining that this band is asynchronous according to the value read, select re-writing mode to carry out write operation, after write operation terminates, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime.
6. the method as described in any one of claim 1 to 5, is characterized in that,
When each band recorded in described secondary bitmap is all synchronous, then the value of corresponding for region corresponding for this secondary bitmap in described one-level bitmap position is arranged to value corresponding to synchronous regime, and discharges this memory block shared by secondary bitmap.
7. method as claimed in claim 6, it is characterized in that, the method also comprises:
When internal memory use exceedes setting ratio, the memory block shared by secondary bitmap that release does not upgrade for a long time.
8. a raid-array RAID5 system, is characterized in that, this system comprises:
First module, creates the one-level bitmap of the synchronous regime for recording each region in RAID5, and wherein, each in the one-level bitmap created records the synchronous regime in a region respectively, and a described region comprises multiple continuous strip;
Second module, during each band of sequence initializes, reads the current value wanting corresponding position, the region belonging to initialized band from described one-level bitmap;
3rd module, when determining that this region synchronously according to read value, continues to carry out sequence initializes to next band, when determining that this region is asynchronous according to read value, find the secondary bitmap that this region is corresponding, the current value wanting the corresponding position of initialized band is read from found secondary bitmap, when determining that this band synchronously according to read value, continue to carry out sequence initializes to next band, when determining that this band is asynchronous according to read value, initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, the value of corresponding for this band in described secondary bitmap position is arranged to value corresponding to synchronous regime, continue to carry out sequence initializes to next band, search less than secondary bitmap corresponding to this region, then initialized band is wanted to carry out synchronization check calculating to current, make current wanted initialized band synchronous, continue to carry out sequence initializes to next band.
9. system as claimed in claim 8, is characterized in that, described 3rd module, in initialization procedure, also records initialization and completes position; Now, this system also comprises:
Four module, in above-mentioned initialization procedure, receives write request, if the position of the band at the write request place received is less than recorded initialization complete position, then selects to read to rewrite or reconstruct WriteMode according to application scenarios and carries out write operation, if the band bitmap at the write request place received is greater than recorded initialization complete position, then search the secondary bitmap that the region belonging to band at write request place is corresponding, if find this secondary bitmap, from found secondary bitmap, then read the value of the corresponding position of band at received write request place, corresponding WriteMode is selected to carry out write operation according to read value, if search less than secondary bitmap corresponding to the region belonging to the band at write request place, free memory block is then utilized to create this secondary bitmap, in the secondary bitmap created, each only records the synchronous regime of a band in this region, again the band at write request place is reconstructed and writes, the value of corresponding for this band in created secondary bitmap position is arranged to value corresponding to synchronous regime.
10. system as claimed in claim 8 or 9, is characterized in that,
Described four module, each band recorded in described secondary bitmap is all synchronous, then the value of corresponding for region corresponding for this secondary bitmap in described one-level bitmap position is arranged to value corresponding to synchronous regime, and discharges this memory block shared by secondary bitmap.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210035448.8A CN102609224B (en) | 2012-02-16 | 2012-02-16 | Redundant array of independent disk system and initializing method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210035448.8A CN102609224B (en) | 2012-02-16 | 2012-02-16 | Redundant array of independent disk system and initializing method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102609224A CN102609224A (en) | 2012-07-25 |
CN102609224B true CN102609224B (en) | 2015-03-11 |
Family
ID=46526631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210035448.8A Active CN102609224B (en) | 2012-02-16 | 2012-02-16 | Redundant array of independent disk system and initializing method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102609224B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI533316B (en) * | 2013-03-18 | 2016-05-11 | 慧榮科技股份有限公司 | Error correction method and memory device |
CN105867841B (en) * | 2016-03-24 | 2019-01-15 | 浙江宇视科技有限公司 | A kind of data re-establishing method and device |
CN111158596A (en) * | 2019-12-28 | 2020-05-15 | 天地伟业技术有限公司 | Rapid raid initialization method |
CN113835641B (en) * | 2021-09-28 | 2023-07-25 | 苏州浪潮智能科技有限公司 | Stripe initialization control method, device, equipment and storage medium |
CN115098046B (en) * | 2022-08-26 | 2023-01-24 | 苏州浪潮智能科技有限公司 | Disk array initialization method, system, electronic device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7103716B1 (en) * | 2003-06-26 | 2006-09-05 | Adaptec, Inc. | RAID 6 disk array with prime number minus one disks |
US7711897B1 (en) * | 2005-06-10 | 2010-05-04 | American Megatrends, Inc. | Method, system, apparatus, and computer-readable medium for improving disk array performance |
CN101840360A (en) * | 2009-10-28 | 2010-09-22 | 创新科存储技术有限公司 | Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system |
CN102023902A (en) * | 2010-12-28 | 2011-04-20 | 创新科存储技术有限公司 | Disc array reconstruction method |
-
2012
- 2012-02-16 CN CN201210035448.8A patent/CN102609224B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7103716B1 (en) * | 2003-06-26 | 2006-09-05 | Adaptec, Inc. | RAID 6 disk array with prime number minus one disks |
US7711897B1 (en) * | 2005-06-10 | 2010-05-04 | American Megatrends, Inc. | Method, system, apparatus, and computer-readable medium for improving disk array performance |
CN101840360A (en) * | 2009-10-28 | 2010-09-22 | 创新科存储技术有限公司 | Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system |
CN102023902A (en) * | 2010-12-28 | 2011-04-20 | 创新科存储技术有限公司 | Disc array reconstruction method |
Also Published As
Publication number | Publication date |
---|---|
CN102609224A (en) | 2012-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102937882B (en) | To effective access with the memory device using bitmap | |
CN103577121B (en) | A kind of highly reliable linear file access method based on Nand Flash | |
CN110114758A (en) | The specific aim of memory is removed | |
CN102779096B (en) | Page, block and face-based three-dimensional flash memory address mapping method | |
CN105760113B (en) | High-speed processing apparatus and file management method based on nand flash memory | |
CN101515276B (en) | Method for write operation of file data, and recovery method and recovery system for file data | |
CN105867840B (en) | Flash memory component and nonvolatile semiconductor memory component | |
CN101609420A (en) | Realize method and the redundant arrays of inexpensive disks and the controller thereof of rebuilding of disc redundant array | |
CN102609224B (en) | Redundant array of independent disk system and initializing method thereof | |
CN112130768A (en) | Disk array online capacity expansion method and device and computer readable storage medium | |
CN101482802A (en) | Expansion method and device for redundant array of independent disks 5 | |
CN103514249A (en) | Method and system for automatic data reduction and storage device | |
JP2016503927A (en) | Storage system and cache control method | |
CN109558457A (en) | A kind of method for writing data, device, equipment and storage medium | |
CN104182176A (en) | Rapid dilatation method for RAID 5 (redundant array of independent disks) | |
CN105630413B (en) | A kind of synchronization write-back method of data in magnetic disk | |
CN111858189B (en) | Offline processing of storage disks | |
CN116301669A (en) | High-speed storage system partitioning method and system based on FPGA | |
CN111913664B (en) | Data writing method and device | |
CN102609223B (en) | Redundant array of independent disk system and initializing method thereof | |
CN101169705B (en) | Method for implementing file class mirror-image under multiple hard disk based on nude file system | |
CN110504002A (en) | A kind of hard disc data conformance test method and device | |
JP2003131818A (en) | Configuration of raid among clusters in cluster configuring storage | |
CN115237351B (en) | NAND block dynamic remapping and read-write command processing method and storage device | |
CN110515771A (en) | A kind of object storage device setting method, system, equipment and computer media |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |