CN104731527A - Three-strip state conversion method - Google Patents
Three-strip state conversion method Download PDFInfo
- Publication number
- CN104731527A CN104731527A CN201510115469.4A CN201510115469A CN104731527A CN 104731527 A CN104731527 A CN 104731527A CN 201510115469 A CN201510115469 A CN 201510115469A CN 104731527 A CN104731527 A CN 104731527A
- Authority
- CN
- China
- Prior art keywords
- correcting
- band
- eleting codes
- pillar location
- mirror image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 21
- 230000008859 change Effects 0.000 claims description 19
- 230000007704 transition Effects 0.000 claims description 8
- 238000012795 verification Methods 0.000 claims description 6
- 230000005012 migration Effects 0.000 abstract description 4
- 238000013508 migration Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 235000014676 Phragmites communis Nutrition 0.000 description 1
- 238000002679 ablation Methods 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Controls And Circuits For Display Device (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
The invention provides a three-strip state conversion method which includes the steps that the states of three strips are changed, and the states of the three strips are used for indicating the current logic strip and the position relation of the logic strip; an erasure correcting code bitmap is made to indicate data blocks, for forming an erasure correcting code strip, at the position of the changed erasure correcting code strip and the position of a mirror strip. According to the three-strip state conversion method, the system expenses caused by data migration are lowered, and the performance of a three-strip system is improved.
Description
Technical field
The present invention relates to technical field of memory, more specifically, relate to striping technical field of memory.
Background technology
Three banding technique refer to each band for logical layer, it is inner realizes by three logic strips compositions, if the data inconsistence problems (write hole problem) caused for solving in traditional RAID technique failure in the too low and data writing process of the little write performance existed.See Fig. 1, three logic strips are respectively M band, RS band and N band, wherein:
1, M band (mirror image band): the data on this band use copy mechanism to protect.Mirror image band is used for depositing small letter data, in order to promote the performance of reading and writing data; In addition, the write of mirror image band does not cover the data on correcting and eleting codes band, therefore avoids the data caused due to node failure in ablation process inconsistent.When the small letter of mirror image band run up to full band or system start conversion that mirror image bar takes correcting and eleting codes band to the space vacateed mirror image band and take time, mirror image band can be converted to correcting and eleting codes band.
2, RS band (correcting and eleting codes band): the data on this band use the protection of Reed – Solomon encoding mechanism.
3, N band (empty band): the not band of store data.Of short duration when empty band is the write of full band deposits place, and after writing into, its state changes correcting and eleting codes band immediately into.The existence of empty band makes data write the data do not covered on original mirror image band and correcting and eleting codes band, guarantees the problem that there will not be data inconsistent.
In addition, have the protection level of the data be not less than on correcting and eleting codes band in order to ensure the data on mirror image band, the copy corresponding to the data on mirror image band is stored on the vertical bar band (or claiming replica node) at the check block place of this band.
Although possess above-mentioned advantage, but existing three strap system do not mention the concrete mode of State Transferring, if adopt the mode valid data of a band being migrated to another band, then due to the data bandwidth outside occupying volume and CPU time, thus cause efficiency lower, and then the performance of three strap system can be affected.
Summary of the invention
For solving the problem, according to one embodiment of present invention, a kind of three band state transition methods are provided, comprise:
Change three band states, wherein three band states are used to indicate current logic strip and position relationship thereof; And the correcting and eleting codes pillar location after making correcting and eleting codes bitmap indicate change and which data block on mirror image pillar location form correcting and eleting codes band.
In said method, removing forms the data block of correcting and eleting codes band, and the correcting and eleting codes pillar location after change and other data blocks on mirror image pillar location form mirror image band.
In said method, when performing mirror image bar and taking the conversion of correcting and eleting codes band to:
Exchange mirror image pillar location and correcting and eleting codes pillar location; And, make correcting and eleting codes bitmap indicate the correcting and eleting codes pillar location after exchanging and which data block on mirror image pillar location to form correcting and eleting codes band.
In said method, the data block on the correcting and eleting codes pillar location corresponding with 1 in described correcting and eleting codes bitmap, and the data block on the mirror image pillar location corresponding with 0 in described correcting and eleting codes bitmap forms correcting and eleting codes band.
In said method, indicate before which data block forms correcting and eleting codes band making described correcting and eleting codes bitmap, also obtain the mirror image band before exchange writes data, calculation check mirror image band before this verification write is exchanged.
In said method, when the empty band that full band writes is transformed into correcting and eleting codes band:
Empty pillar location is changed to correcting and eleting codes pillar location, and makes another two positions be respectively mirror image pillar location and empty pillar location; And the data block on the correcting and eleting codes pillar location after making correcting and eleting codes bitmap indicate change forms correcting and eleting codes band.
In said method, described three band states comprise:
Correcting and eleting codes pillar location is primary importance, mirror image pillar location is the second place and empty pillar location is the 3rd position;
Mirror image pillar location is primary importance, correcting and eleting codes pillar location is the second place and empty pillar location is the 3rd position;
Empty pillar location is primary importance, mirror image pillar location is the second place and correcting and eleting codes pillar location is the 3rd position; And
Empty pillar location is primary importance, correcting and eleting codes pillar location is the second place and mirror image pillar location is the 3rd position.
In said method, the bitmap of 2bit is used to represent described three band states.
Three band state transition methods provided by the invention only revise three band states and correcting and eleting codes bitmap, just can realize, without Data Migration, conversion operations without data cover, reducing the system overhead that Data Migration causes, improving the performance of three strap system.
Accompanying drawing explanation
Referring to accompanying drawing, embodiments of the present invention is further illustrated, wherein:
Fig. 1 is the schematic diagram of three ribbon structures;
Fig. 2 is the process flow diagram of three band state transition methods according to an embodiment of the invention;
Fig. 3 is the schematic diagram of three band State Transformer according to an embodiment of the invention;
Fig. 4 (a) and 4 (b) are the schematic diagram of mirror image band write operation according to an embodiment of the invention;
Fig. 5 (a)-5 (c) is that mirror image band is transformed into the schematic diagram of correcting and eleting codes band according to an embodiment of the invention;
Fig. 6 (a)-6 (c) is that mirror image band is transformed into the schematic diagram of correcting and eleting codes band in accordance with another embodiment of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with accompanying drawing, by specific embodiment, the present invention is described in more detail.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
According to one embodiment of present invention, a kind of three band state transition methods are provided.
Generally, the method comprises: change three band states, and wherein three band states are used to indicate current logic strip and position relationship thereof; And the correcting and eleting codes pillar location after making correcting and eleting codes bitmap indicate change and which data block on mirror image pillar location form correcting and eleting codes band.
Existing composition graphs 2 describes this three bands state transition method in detail, it should be noted that, each step of the method described in instructions not necessarily is necessary, but can omit or replace one or more step according to practical situation, and its order also can change.
The first step: change three band states
Three band states are used to indicate when comprising which three logic strip in first three band, and the position relationship between these three logic strips.Herein, the numbering of three pillar locations is designated as C, B, A, for three ribbon structures shown in Fig. 1, position C at bottom, position B at middle and position A topmost, three band states in Fig. 1 can be expressed as RS M N, indicate correcting and eleting codes (RS) pillar location at position C, mirror image (M) pillar location at position B, and empty (N) pillar location is at position A.Should be understood that logic strip position is not herein equal to logic strip.
According to the principle of three banding technique, owing to only having allowed an effective correcting and eleting codes band at most in synchronization three band, only allowed a mirror image band and had an empty band at least at most, then consider the logic strip combination that synchronization may occur at diverse location, can obtain 14 three band states as shown in table 1, wherein last state ERR represents that band is unavailable.
Table 1
If represent above-mentioned three band states in the form of a bitmap, then at least need to represent with 4 positions (bit).
In one embodiment, when not considering state ERR, can simplify the state set of above-mentioned table 1, only representing all states with one of four states.That is, the bitmap of 2bit is used just can to represent all three band states.
Specifically, for position C B A, this one of four states is respectively RS M N, M RS N, NRS M and N M RS.The reason of simplifying as this one of four states is as follows:
For the virgin state N N N of table 1, the data on its every bar logic strip are 0, because its verification is also 0 when data are 0, therefore N N N can be expressed as other state, as N NRS etc.For state RS M N, if carry out mirror-write respectively to three bands in this condition, mirror image band be transformed into correcting and eleting codes band, and full correcting and eleting codes band writes (i.e. the empty band of completely band write is transformed into correcting and eleting codes band) three kinds of operations, then according to the principle of three banding technique, these three kinds of operations correspondingly can cause three kinds of following states: RS M N, M RS N and N N RS.Wherein, for the N state N RS of appearance two N (i.e. empty pillar location), due to when data are all 0, empty band and mirror image band are of equal value, therefore N N RS can be designated as M N RS or N M RS.In one embodiment, N state M RS can be adopted to represent N state N RS; In another embodiment, state M N RS also can be adopted to represent N state N RS, it should be noted that, the three band state representation that embodiment hereinafter all adopts RS and M adjacent.In like manner, other states (except ERR) in table 1 all can be expressed as the one in these four kinds of states.
Therefore, the bitmap of 2bit just can describe the band state transfer problem that three bands relate to when full correcting and eleting codes band is write or mirror image band is transformed into correcting and eleting codes band completely, as shown in table 2.
Table 2
In other examples, also can use n (n be greater than 2 positive integer) bitmap of individual bit is as three band state bitmaps, wherein indicate three current band states with 2 bit, a remaining n-2 bit can reserve for other use.
Show based on above-mentioned four kinds of state RS M N, M RS N, N M RS and N RS M, Fig. 3 and be transformed into correcting and eleting codes band at execution mirror-write, mirror image band, or after full correcting and eleting codes band write operation, which kind of state is these four kinds of states be transformed into respectively.As shown in Figure 3, wherein+M represents mirror image band write operation ,+MF represents that mirror image band is transformed into correcting and eleting codes band, and+RS represents the write operation of full correcting and eleting codes band, can be initially any one state.For example, if perform the conversion that mirror image bar takes correcting and eleting codes band under state RS M N, then Status Change is that M RS N is (namely when performing mirror image bar and taking the conversion of correcting and eleting codes band to, mirror image pillar location and correcting and eleting codes pillar location are exchanged), three band state bitmaps become 01 (see table 2) from 00, to indicate the logic strip after conversion and position relationship thereof; If perform the write operation of full correcting and eleting codes band in this condition, then Status Change is that N M RS is (namely when performing the write operation of full correcting and eleting codes band, it is empty that pillar location changes to correcting and eleting codes pillar location, the position adjacent with correcting and eleting codes pillar location is mirror image pillar location, and another position is empty pillar location, should understand, here it is adjacent in the textual representation of three band states that " adjacent " is only intended to explanation, not refer to physically adjacent), three band state bitmaps change into 10 from 00.Such representation is more more efficient than the mode of employing 14 kinds of states.
Second step: amendment correcting and eleting codes bitmap is to indicate correcting and eleting codes band
In order to realize writing and mirror image bar takes in the conversion of correcting and eleting codes band actual Data Migration does not occur at full correcting and eleting codes band, to improve system performance, this method uses correcting and eleting codes bitmap (i.e. RS bitmap) to indicate which data block on logic strip position to form the correcting and eleting codes band of logic.Based on above-mentioned four kinds of states, correcting and eleting codes bitmap can be used to be formed correcting and eleting codes band to indicate which data block on correcting and eleting codes pillar location and mirror image pillar location, and other data blocks on these two logic strip positions form mirror image band.
According to above-mentioned four kinds of state RS M N, M RS N, N M RS and N RS M, the conversion of correcting and eleting codes band is taken to for mirror image bar, after the exchange performing mirror image pillar location and correcting and eleting codes pillar location (see the first step), correcting and eleting codes bitmap is made to indicate the correcting and eleting codes pillar location after exchanging and which data block on mirror image pillar location to form correcting and eleting codes band.Such as, be three bands of N+M for size, adopt the correcting and eleting codes bitmap of N+M bit, wherein, the data block on the correcting and eleting codes pillar location corresponding with 1 and form correcting and eleting codes band with the data block on 0 corresponding mirror image pillar location.
In one embodiment, before execution mirror image bar takes the conversion of correcting and eleting codes band to, when performing the write operation of mirror image band, as shown in Fig. 4 (a) He 4 (b), need a mirror image bitmap (i.e. M bitmap) to carry out rotating mirror and there is effective mirror image data as in which data block of band.Such as, there is effective mirror image data as data block corresponding on band in 1 rotating mirror, and the data block of 0 instruction correspondence does not exist effective mirror image data.Specifically, when performing mirror image bar and taking the conversion of correcting and eleting codes band to, before change three band state, effective mirror image data can be obtained, according to the partial data calculation check on mirror image data and correcting and eleting codes band, verification is write mirror image band (herein according to mirror image bitmap, check block is described as data block together with data block, and according to method provided by the invention, check block is always positioned on same logic strip), and revise mirror image bitmap to indicate the data block at mirror image data and verification place.Now, mirror image bitmap instruction data block and correcting and eleting codes band on partial data block form conversion after correcting and eleting codes band.Then, exchange correcting and eleting codes pillar location and mirror image pillar location, and revise correcting and eleting codes bitmap and formed correcting and eleting codes band with which data block on the logic strip position after indicating exchange.
According to above-mentioned four kinds of state RS M N, M RS N, N M RS and N RS M, for the write operation (i.e. the empty band of completely band write is transformed into correcting and eleting codes band) of full correcting and eleting codes band, empty pillar location is changed to correcting and eleting codes pillar location, two other positions are made to be respectively mirror image pillar location and empty pillar location (for the present embodiment, mirror image pillar location and correcting and eleting codes pillar location are expressed as adjacent in three band states); And the data block on the correcting and eleting codes pillar location after making correcting and eleting codes bitmap indicate change forms correcting and eleting codes band.
Below in conjunction with three concrete examples, three band state transition methods provided by the invention are described.
Example one, mirror image bar take the conversion first of correcting and eleting codes band to.
1, see Fig. 5 (a), correcting and eleting codes band is full 0, and mirror image band newly writes data D2 ', D4 ' and D5 ', when first three ribbon state is RS M N.
2, before execution mirror image bar takes the conversion of correcting and eleting codes band to, the D2 ', the D4 ' that newly write according to mirror image band and D5 ' calculation check, and write mirror image band, as shown in Fig. 5 (b).
3, see Fig. 5 (c), change three band states, change to M RS N by three band states from RS M N.In addition, amendment correcting and eleting codes bitmap (RS bitmap), obtain 1010111010001000, its instruction forms correcting and eleting codes band by the grey data block of Fig. 5 (c), and the non-grey data block of mirror image pillar location and correcting and eleting codes pillar location forms mirror image band.
Example two, after the conversion of example one, there is mirror image band and write the conversion taking correcting and eleting codes band with mirror image bar to.
1, see Fig. 6 (a), D1 has newly been write " and D4 " to mirror image band.
2, according to the new data block on current mirror image band and the partial data block on correcting and eleting codes band, calculate new verification (P1 ", P2 ", P3 ", P4 "), write current mirror image band, as shown in Fig. 6 (b).
3, see Fig. 6 (c), band state M RS N is changed to RS M N, and correcting and eleting codes bitmap is revised as 1001110111111111, formed the correcting and eleting codes band after conversion with instruction by the grey data block of Fig. 6 (c), and the non-grey data block of mirror image pillar location and correcting and eleting codes pillar location forms mirror image band.
Example three, after the conversion of example two, there is full correcting and eleting codes band write.
Directly write sky band (namely writing sky pillar location), empty pillar location and correcting and eleting codes pillar location are exchanged, state changes to N M RS from RS M N, abandons the data on former mirror image band and former correcting and eleting codes band simultaneously.
Be to be understood that, although this instructions describes according to each embodiment, but not each embodiment only comprises an independently technical scheme, this narrating mode of instructions is only for clarity sake, those skilled in the art should by instructions integrally, technical scheme in each embodiment also through appropriately combined, can form other embodiments that it will be appreciated by those skilled in the art that.
The foregoing is only the schematic embodiment of the present invention, and be not used to limit scope of the present invention.Any those skilled in the art, the equivalent variations done under the prerequisite not departing from design of the present invention and principle, amendment and combination, all should belong to the scope of protection of the invention.
Claims (8)
1. three band state transition methods, comprising:
Change three band states, wherein three band states are used to indicate current logic strip and position relationship thereof; And
Correcting and eleting codes pillar location after making correcting and eleting codes bitmap indicate change and which data block on mirror image pillar location form correcting and eleting codes band.
2. method according to claim 1, wherein, removing forms the data block of correcting and eleting codes band, and the correcting and eleting codes pillar location after change and other data blocks on mirror image pillar location form mirror image band.
3. method according to claim 1 and 2, wherein, when performing mirror image bar and taking the conversion of correcting and eleting codes band to:
Exchange mirror image pillar location and correcting and eleting codes pillar location; And
Correcting and eleting codes bitmap is made to indicate the correcting and eleting codes pillar location after exchanging and which data block on mirror image pillar location to form correcting and eleting codes band.
4. method according to claim 3, wherein, the data block on the correcting and eleting codes pillar location corresponding with 1 in described correcting and eleting codes bitmap, and the data block on the mirror image pillar location corresponding with 0 in described correcting and eleting codes bitmap forms correcting and eleting codes band.
5. method according to claim 3, wherein, indicate before which data block forms correcting and eleting codes band making described correcting and eleting codes bitmap, also obtain the mirror image band before exchange writes data, calculation check mirror image band before this verification write is exchanged.
6. method according to claim 1 and 2, wherein, when the empty band that full band writes is transformed into correcting and eleting codes band:
Empty pillar location is changed to correcting and eleting codes pillar location, and makes another two positions be respectively mirror image pillar location and empty pillar location; And
Data block on correcting and eleting codes pillar location after making correcting and eleting codes bitmap indicate change forms correcting and eleting codes band.
7. method according to claim 1 and 2, wherein, described three band states comprise:
Correcting and eleting codes pillar location is primary importance, mirror image pillar location is the second place and empty pillar location is the 3rd position;
Mirror image pillar location is primary importance, correcting and eleting codes pillar location is the second place and empty pillar location is the 3rd position;
Empty pillar location is primary importance, mirror image pillar location is the second place and correcting and eleting codes pillar location is the 3rd position; And
Empty pillar location is primary importance, correcting and eleting codes pillar location is the second place and mirror image pillar location is the 3rd position.
8. method according to claim 7, wherein, uses the bitmap of 2bit to represent described three band states.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510115469.4A CN104731527B (en) | 2015-03-17 | 2015-03-17 | A kind of three band state transition methods |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510115469.4A CN104731527B (en) | 2015-03-17 | 2015-03-17 | A kind of three band state transition methods |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104731527A true CN104731527A (en) | 2015-06-24 |
CN104731527B CN104731527B (en) | 2018-09-07 |
Family
ID=53455461
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510115469.4A Expired - Fee Related CN104731527B (en) | 2015-03-17 | 2015-03-17 | A kind of three band state transition methods |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104731527B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040153479A1 (en) * | 2002-11-14 | 2004-08-05 | Mikesell Paul A. | Systems and methods for restriping files in a distributed file system |
CN101866307A (en) * | 2010-06-24 | 2010-10-20 | 杭州华三通信技术有限公司 | Data storage method and device based on mirror image technology |
CN103645859A (en) * | 2013-11-19 | 2014-03-19 | 华中科技大学 | Disk array caching method for virtual SSD and SSD isomerous mirror image |
CN104040515A (en) * | 2011-09-30 | 2014-09-10 | 英特尔公司 | Presentation of direct accessed storage under a logical drive model |
-
2015
- 2015-03-17 CN CN201510115469.4A patent/CN104731527B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040153479A1 (en) * | 2002-11-14 | 2004-08-05 | Mikesell Paul A. | Systems and methods for restriping files in a distributed file system |
CN101866307A (en) * | 2010-06-24 | 2010-10-20 | 杭州华三通信技术有限公司 | Data storage method and device based on mirror image technology |
CN104040515A (en) * | 2011-09-30 | 2014-09-10 | 英特尔公司 | Presentation of direct accessed storage under a logical drive model |
CN103645859A (en) * | 2013-11-19 | 2014-03-19 | 华中科技大学 | Disk array caching method for virtual SSD and SSD isomerous mirror image |
Non-Patent Citations (1)
Title |
---|
华山: "RAID技术综述", 《计算机技术》 * |
Also Published As
Publication number | Publication date |
---|---|
CN104731527B (en) | 2018-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104272262B (en) | Physical Page, logical page (LPAGE) and code word are corresponding | |
CN103440205B (en) | A kind of set top box data storage method and device | |
CN103152395B (en) | A kind of storage means of distributed file system and device | |
CN106708653B (en) | Mixed tax big data security protection method based on erasure code and multiple copies | |
CN104503706A (en) | Data storing method and data reading method based on disk array | |
US20130132800A1 (en) | Method and apparatus for allocating erasure coded data to disk storage | |
CN106407050A (en) | Data storage method | |
CN105339907A (en) | Synchronous mirroring in non-volatile memory systems | |
CN104052576A (en) | Data recovery method based on error correcting codes in cloud storage | |
CN110058953B (en) | Method, apparatus, and storage medium for changing type of storage system | |
CN101183565A (en) | Data verification method for storage medium | |
CN103729151B (en) | A kind of fail data restorative procedure based on modified model correcting and eleting codes | |
CN105356892B (en) | The method and system of network code | |
CN103106124B (en) | Intersection reconstruction method based on erasure code cluster memory system | |
WO2024001126A1 (en) | Erasure code fusion method and system, electronic device and nonvolatile readable storage medium | |
CN104615504A (en) | Method and device for achieving data protection | |
CN105808170A (en) | RAID6 (Redundant Array of Independent Disks 6) encoding method capable of repairing single-disk error by minimum disk accessing | |
CN113258936B (en) | Dual coding construction method based on cyclic shift | |
CN104268097A (en) | Metadata processing method and system | |
CN105206307A (en) | Chip restoration method and device | |
CN108733307B (en) | Storage management method, apparatus and computer readable medium | |
CN110600070B (en) | Coding and repairing method for improving repairing performance of solid state disk array system | |
US11269521B2 (en) | Method, device and computer program product for processing disk unavailability states | |
CN104731527A (en) | Three-strip state conversion method | |
CN104731526B (en) | The method and device that a kind of discontented band is write |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180907 |
|
CF01 | Termination of patent right due to non-payment of annual fee |