CN113297000A - RAID (redundant array of independent disks) coding circuit and coding method - Google Patents

RAID (redundant array of independent disks) coding circuit and coding method Download PDF

Info

Publication number
CN113297000A
CN113297000A CN202110551258.0A CN202110551258A CN113297000A CN 113297000 A CN113297000 A CN 113297000A CN 202110551258 A CN202110551258 A CN 202110551258A CN 113297000 A CN113297000 A CN 113297000A
Authority
CN
China
Prior art keywords
data
parameter
check code
current
check
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110551258.0A
Other languages
Chinese (zh)
Other versions
CN113297000B (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.)
Inspur Computer Technology Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center 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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202110551258.0A priority Critical patent/CN113297000B/en
Publication of CN113297000A publication Critical patent/CN113297000A/en
Application granted granted Critical
Publication of CN113297000B publication Critical patent/CN113297000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1076Parity data used in redundant arrays of independent storages, e.g. in RAID systems
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/13Linear codes
    • H03M13/15Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes
    • H03M13/151Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes using error location or error correction polynomials
    • H03M13/1515Reed-Solomon codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Pure & Applied Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Error Detection And Correction (AREA)

Abstract

The application discloses RAID coding circuit and coding method, the circuit includes: the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in the current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1; and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data stripe of the data to be coded. On the premise of realizing RAID5, RAID6 can be realized quickly and in a lower area.

Description

RAID (redundant array of independent disks) coding circuit and coding method
Technical Field
The present disclosure relates to the field of storage technologies, and in particular, to a RAID encoding circuit and an encoding method.
Background
With the rapid development of communication technology and network technology, the digital information is exponentially and explosively increased, and the data storage technology is also greatly challenged. The reliability of data in memory systems and the power consumption of memory systems are of increasing concern. Now facing such a huge data scale, the reliability of data in a storage system is inversely proportional to the number of components contained in the storage system, i.e. the greater the number of components of the storage system, the lower the reliability of data in the storage system. In a large-scale storage system, data reliability degradation caused by disk failure is a serious problem, and researches on related fault-tolerant technologies are carried out. RAID (Redundant Arrays of Independent Disks) technology has been developed, and by using RAID storage technology, storage capacity can be greatly increased, request processing capability of system input and output is improved, and reliability of data is improved by a distributed storage technology of data, a parallel access means, and an information redundancy technology. Currently, RAID can be divided into different levels: RAID 0,1,5,6,10, generally implementing RAID6 in an actual circuit needs to be performed on the premise of implementing RAID5, so how to implement RAID6 quickly and with a lower area on the premise of implementing RAID5 is a problem to be solved.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a RAID encoding circuit and an encoding method, which can implement RAID6 quickly and with a relatively low area on the premise of implementing RAID 5. The specific scheme is as follows:
in a first aspect, the present application discloses a RAID encoding circuit, comprising:
the system comprises a first parameter module, a second parameter module and a third parameter module, wherein the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
Optionally, the method further includes:
the data stripe dividing module is used for dividing the data to be coded into a preset number of data stripes;
the Galois field conversion module is used for converting each data stripe into Galois field data to obtain the target data stripe corresponding to each data stripe;
correspondingly, the first encoding module is configured to perform an exclusive or operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, and store the new first check code to the first check code storage location.
Optionally, the method further includes:
the second parameter module is used for acquiring a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for carrying out coding operation on the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code and storing the new second check code to the second check code storage position.
Optionally, the first parameter module is further configured to obtain a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6, and determine data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
correspondingly, the first encoding module is further configured to perform encoding operation on the current second parity read from the second parity storage location and the data after the current second parameter operation to obtain a new second parity, and store the new second parity to the second parity storage location.
Optionally, the method further includes:
the data caching module is used for storing the target data strip of the data to be coded into a cache;
and the data reading module is used for reading the target data stripe from the cache and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
Optionally, the first parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000031
Determining a first check parameter corresponding to a current target data stripe of data to be coded in an RAID6 mode;
wherein alpha ispA code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relationqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000032
representing an exclusive or operation.
Optionally, the second parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000033
Determining to-be-encoded in RAID6 modeA second check parameter corresponding to a current target data stripe of the data;
wherein alpha ispA code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relationqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000034
representing an exclusive or operation.
In a second aspect, the present application discloses a RAID encoding method, including:
acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
Optionally, the method further includes:
dividing the data to be coded into a preset number of data stripes;
and converting each data stripe into Galois field data to obtain a target data stripe corresponding to each data stripe.
Optionally, the performing encoding operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code includes:
and performing XOR operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code.
It can be seen that the present application discloses a RAID encoding circuit, including: the system comprises a first parameter module, a second parameter module and a third parameter module, wherein the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1; and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded. Therefore, the code conversion from RAID5 to RAID6 can be realized only by the first parameter module, and RAID6 can be realized quickly and in a lower area on the premise of realizing RAID 5.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of a RAID encoding circuit structure disclosed in the present application;
FIG. 2 is a schematic diagram of a specific RAID encoding circuit encoding disclosed herein;
FIG. 3 is a schematic diagram of a RAID5 encoding circuit encoding according to the present disclosure;
FIG. 4 is a schematic diagram of a RAID6 encoding circuit encoding disclosed herein;
fig. 5 is a flowchart of a RAID encoding method disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, an embodiment of the present application discloses a RAID encoding circuit, including:
the first parameter module 11 is configured to obtain a first check parameter corresponding to a current target data stripe of data to be encoded in a current RAID mode, and determine data after first parameter operation by using the first check parameter and the current target data stripe; the first check parameter in the RAID6 mode is an encoding parameter corresponding to the first check code determined based on the vandermonde RS encoding relationship, and the first check parameter in the RAID5 mode is 1.
In a specific implementation manner, multiplication is performed by using the first check parameter and the current target data strip, so as to obtain data after the first parameter operation.
The first encoding module 12 is configured to perform encoding operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, and store the new first check code to the first check code storage location until a final first check code corresponding to the data to be encoded is determined based on the last target data strip of the data to be encoded.
In a specific embodiment, the circuit further comprises:
and the data stripe segmentation module is used for segmenting the data to be encoded into a preset number of data stripes.
The preset number is the number of data strips of the RAID.
And the Galois field conversion module is used for converting each data stripe into Galois field data to obtain the target data stripe corresponding to each data stripe.
Correspondingly, the first encoding module is configured to perform an exclusive or operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, and store the new first check code to the first check code storage location.
That is, the embodiment of the present application may perform encoding operation based on the data stripes of the galois field, so that the encoding efficiency may be improved.
It should be noted that, RAID5 only has one parity stripe (i.e., a first check code), and when encoding is performed, if data to be encoded is divided into n data stripes, the relationship between the data stripes and the first check code is expressed as:
Figure BDA0003075465440000051
wherein d is0,d1...dnRepresenting a data strip, p a first check code,
Figure BDA0003075465440000052
representing an exclusive or operation.
When RAID6 is realized, two check stripes, namely a first check code and a second check code, need to be supported simultaneously. In the present application, an RS (Reed-Solomon Code, Reed Solomon Code) Code is used to encode a first check Code and a second check Code, the RS Code has multiple implementation manners such as vandermonde and cauchy, and in consideration of characteristics of RAID6 and simplicity requirements of operation, the implementation manner of vandermonde is used in the embodiment of the present application, and if data to be encoded is divided into n data stripes, a relationship among the data stripes, the first check Code, and the second check Code is expressed as follows:
Figure BDA0003075465440000061
wherein d is0,d1...dnRepresenting a data stripe, p representing a first check code, q representing a second check code,
Figure BDA0003075465440000062
indicating an exclusive or operation and alpha an vandermonde parameter.
For convenience of operation and storage, the present embodiment encodes and stores the finite field by galois field processing. In addition, since the transmission of data in a circuit is generally based on byte, the galois field used in the embodiment of the present application is a finite field 0X11D of 8 bits, that is:
P(X)=x8+x4+x3+x2+1;
under the Galois field of finite field 0X11D, the definition for data can be represented as shown in Table one:
watch 1
Generating an element Polynomial representation Binary representation Numerical representation Derivation process
0 0 0000 0000 0
x^0 x^0 0000 0001 1
x^1 x^1 0000 0010 2
x^2 x^2 0000 0100 4
x^3 x^3 0000 1000 8
x^4 x^4 0001 0000 16
x^5 x^5 0010 0000 32
x^6 x^6 0100 0000 64
x^7 x^7 1000 0000 128
x^8 x^4+x^3+x^2+1 0001 1101 29 x^7*x=x^8mod P(x)
x^9 x^5+x^4+x^3+x 0011 1010 58 x^8*x=x^5+x^4+x^3+x
x^10 x^6+x^5+x^4+x^2 0111 0100 116 x^9*x=x^6+x^5+x^4+x^2
x^255 1 0000 0001 1
For example, when the exponent of the generated element is 10, it is represented as binary 01110100 by galois field primitive polynomial p (x) conversion described above. By this conversion, all data is converted into 8-bit binary numbers, and four arithmetic operations based on the 8-bit binary numbers are performed. Based on the situation of the galois field, it is known that both traditional RAIDs 5 and 6 can implement the ordinary data four-way operation through the galois field, but the coding of RAID6 based on the van der waals RS code proposed in the application needs to consider the corresponding exponential relationship, and when the four-way operation, especially multiplication, is involved, it needs to consider whether the data still conforms to the van der waals relationship after overflowing. To verify the applicability, the following calculation derivation is performed:
suppose there are two data stripes d0And d1Multiplication operation is needed, expansion is carried out according to 8-bit Galois field, and conversion is carried out by using RS code based on Van der Monte, and then:
Figure BDA0003075465440000071
since it is the multiplication that is most prone to overflow problems, do d0And d1The multiplication of (a) may result in:
d0*d1=A7B7α14
+(A7B6+A6B713
+...+
+A0B0α0
a of the above formula7B7,(A7B6+A6B7) Up to A0B0By parameter P14,P13,...,P0Then the above formula can be expressed as:
d0*d1=P14α14+P13α13+...+P2α2+P1α1+P0α0
based on table-query overflow term alpha14,α13,...,α8Of 8-bit binary representation, e.g. alpha8Expressed as α at 298=α4320Then, the above formula is substituted again, and then:
d0*d1=C7α7+C6α6+...+C2α2+C1α1+C0α0
wherein, C0,C1...C6,C7After splitting operation is performed through the first lookup table, P (X) is used8+x4+x3+x2+1 for α7,α6,...,α0The new parameters of (2). It can be known that the perfect adaptation of the vandermonde-based RS code requirement can complete four operations of RAID6, that is, the vandermonde-based RS code proposed in the present application can be used for encoding and decoding of RAID6, thereby implementing the operations of RAID 6.
In a specific embodiment, the RAID encoding circuit further comprises:
the second parameter module is used for acquiring a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for carrying out coding operation on the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code and storing the new second check code to the second check code storage position.
In another specific implementation, the first parameter module is further configured to obtain a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6, and determine data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
correspondingly, the first encoding module is further configured to perform encoding operation on the current second parity read from the second parity storage location and the data after the current second parameter operation to obtain a new second parity, and store the new second parity to the second parity storage location.
That is, in a specific embodiment, the first check code and the second check code may be determined serially by using the same parameter module and the encoding module, so as to reduce the circuit area. In order to increase the encoding speed, the first check code and the second check code can be respectively determined by different parameter modules and encoding modules in parallel.
In another specific embodiment, the RAID encoding circuit further includes:
and the data caching module is used for storing the target data strip of the data to be coded into a cache.
In a specific embodiment, the buffering mode may be buffer or FIFO (First Input First Output).
And the data reading module is used for reading the target data stripe from the cache and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
For example, referring to fig. 2, fig. 2 is a schematic diagram of a specific RAID encoding circuit encoding disclosed in the present application.
1. The data to be coded enters an RAID coding circuit, the RAID coding circuit firstly divides the data to be coded into a preset number of data strips, then each data strip is converted into Galois field data to obtain a target data strip corresponding to each data strip, the target data strip is temporarily stored in a buffer or FIFO mode, when a data reading module is idle, the data reading module respectively and simultaneously sends the target data strip to a data storage position corresponding to the current data strip and a first parameter module and a second parameter module, the first parameter module obtains a first check parameter corresponding to the current target data strip of the data to be coded in the current RAID mode, multiplication operation is carried out by utilizing the first check parameter and the current target data strip to obtain data after first parameter operation, the data after the first parameter operation is transmitted to the first coding module, the second parameter module obtains a second check parameter corresponding to the current target data strip of the data to be coded in the current RAID mode, and performing multiplication operation by using the second check parameter and the current target data strip to obtain data after second parameter operation, and transmitting the data after second parameter operation to the second coding module. For example, the current target data stripe is d0Transmitting data to d0The corresponding storage position, the first parameter module and the second parameter module. At the same time, the currently stored data is read from the storage positions of the first check code p and the second check code q, that is, the current first check code and the current second check code are transmitted to the first coding module and the second coding module.
2. And after the data after the first parameter operation and the data after the second parameter operation are respectively subjected to exclusive OR operation with the data stored in the current first check code read from the first check code storage position and the current second check code read from the second check code storage position in the first coding module and the second coding module, generating a new first check code and a new second check code, and then updating the data in the first check code storage position and the second check code storage position.
And the initial values of the first check code storage position and the second check code storage position are both 0, so that the check code determined by using the last target data strip of the data to be coded is the final check code corresponding to the data to be coded, and the coding of the data to be coded is completed.
It should be noted that the first check parameter in the RAID5 mode is 1, and the encoding can be completed by the first parameter module and the first encoding module, so as to obtain the corresponding first check code.
In a specific embodiment, the first parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000091
Determining a first check parameter corresponding to a current target data stripe of data to be coded in an RAID6 mode;
wherein alpha ispA code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relationqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000094
representing an exclusive or operation.
The second parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000092
Determining a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode;
wherein alpha ispA code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relationqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000095
representing an exclusive or operation.
The implementation process of the RAID encoding circuit provided in the present application is described below:
note that RAID5 is implemented as:
Figure BDA0003075465440000093
when encoding of RAID5 needs to be implemented, the operation mode is as shown in fig. 3, and fig. 3 is a schematic diagram of encoding of a RAID5 encoding circuit disclosed in the embodiment of the present application. 1. The data to be coded enters a RAID5 coding circuit, the RAID coding circuit firstly divides the data to be coded into a preset number of data strips, and temporarily stores the data strips to the data storage position and the coding module corresponding to the current data strip respectively and simultaneously when waiting for the data reading module to be idle in a buffer or FIFO mode and the like. At the same time, the now stored data is read from the location where the check code p is stored into the encoding module. 2. And after the data strip and the current check code read from the position for storing the check code p are subjected to XOR operation by the encoding module, the generated new check code is written into the position for storing the check code p, and the data at the position is updated.
The multiplexing of hardware circuits is realized, the minimum area is reached, and the maximum multiplexing optimization is realized, so that the same method needs to be set for encoding when RAID6 is used.
The RAID6 relationship may be expressed as:
Figure BDA0003075465440000101
the formula (1) can simply expand the second parity stripe q by the expression of RAID 5. Therefore, when the coding of formula (1) of RAID6 is realized, the RAID5 module is applied. Two encoding modules can be used for parallel operation, or just one encoding module can be used as in RAID5, and the values of p and q are calculated in two beats and then updated respectively. Because the formula (1) of the RS RAID6 coding is very similar to RAID5, q can be considered to be updated in the same way as p, so that the calculation and the update of p and q can be realized in parallel or in series by using the same circuit. For example, referring to fig. 4, fig. 4 is a schematic diagram of coding of a RAID6 coding circuit disclosed in an embodiment of the present application, which is used for implementing coding of formula (1) for implementing RAID 6. 1. The data to be coded enters a RAID6 coding circuit, the RAID6 coding circuit firstly divides the data to be coded into a preset number of data strips, and temporarily stores the data strips to the data storage position corresponding to the current data strip and two different coding modules at the same time when waiting for the data reading module to be idle in a buffer or FIFO mode and the like. At the same time, the data stored now are read from the positions where the check codes p and q are stored and sent to the two encoding modules respectively. 2. And after the data strip and the current check code p read from the position for storing the check code p are subjected to XOR operation in the corresponding coding module, the generated new check code is written into the position for storing the check code p, and the data at the position is updated. And after the data strip and the current check code q read from the position for storing the check code q are subjected to XOR operation in the corresponding coding module, the generated new check code is written into the position for storing the check code q, and the data at the position is updated.
Formula (2) of RS RAID6 is greatly different from RAID5, and different parameters and corresponding multiplications are added due to the xor operation compared with RAID 5. In order to set the same way to perform coding and implement circuit multiplexing, a parameter module is added in the embodiment, and the parameter module multiplies the data stripe by a parameter before performing exclusive-or operation, and the parameter can simultaneously satisfy the formulas (1) and (2) of RAID 6. So that formula (2) can complete the calculation update of p and q through additional multiplication operation and exclusive or operation based on the updated data stripe.
Let any stored data be dxThe corresponding check codes are p and q. The updated storage data is dx', their corresponding check codes are p ' and q '. And x is the number corresponding to the data stripe.
As can be seen from the encoding relationship of formula (1) in RAID6, the following relationship is satisfied:
Figure BDA0003075465440000111
let dx-dxIf Δ, the above formula can be updated as follows:
Figure BDA0003075465440000112
let the parameters of RS RAID6 corresponding to p and q be alpha respectivelypqThen multiply the above formula by alpha respectivelypqThe following relationships can be obtained:
Figure BDA0003075465440000113
Figure BDA0003075465440000114
and, based on alphapqThe corresponding RS RAID6 encoding relationship may be obtained:
Figure BDA0003075465440000115
(5) in the formula alphaxRefers to the coding coefficient corresponding to the stored data Δ.
Taking q' as an example, the following equations (3) and (5) are added, where the addition refers to the addition in the galois field, and the xor operation is performed:
Figure BDA0003075465440000116
the same principle (3) and (4) are added to obtain the relation formula of p'.
As defined above, in the above equation, p and q are check codes originally stored, and Δ is an increment of corresponding data to be stored, which may represent a change in data or a new data. Alpha is alphapqAnd alphaxExpressed as described above are the corresponding encoding coefficients, α in equation (2) of RAID6pqAre each alphan+1n+2,αxCoefficient values, e.g. alpha, for respective stripe data0All the parameters are definite parameters irrelevant to specific values of data and can be directly operated.
In a specific embodiment, the data stripes of the data to be encoded can be regarded as Δ, αxAnd the coding coefficient value corresponding to the current target data strip determined based on the Van der Monte RS coding relation.
Due to the fact that
Figure BDA0003075465440000121
And
Figure BDA0003075465440000122
to determine the parameters, through the above operation conversion, it can be known that the data update of p and q of RS RAID6 can be realized by adding the parameter calculation and then using the circuit in fig. 4. The circuit of fig. 2 can be obtained by adding the parameter module.
It can be seen that the RAID encoding circuit disclosed in the embodiment of the present application includes: the system comprises a first parameter module, a second parameter module and a third parameter module, wherein the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1; and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded. Therefore, the code conversion from RAID5 to RAID6 can be realized only by the first parameter module, and RAID6 can be realized quickly and in a lower area on the premise of realizing RAID 5.
Referring to fig. 5, an embodiment of the present application discloses a RAID encoding method, including:
step S11: acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
step S12: and carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
In a specific embodiment, the data to be encoded may be divided into a preset number of data stripes; and converting each data stripe into Galois field data to obtain a target data stripe corresponding to each data stripe.
Correspondingly, the encoding operation is performed on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, including:
and performing XOR operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code.
In a particular embodiment, the following may be used:
acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode through a first parameter module, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and performing coding operation on the current first check code read from the first check code storage position and the current data after the first parameter operation through a first coding module to obtain a new first check code, and storing the new first check code to the first check code storage position until a final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
Acquiring a second check parameter corresponding to a current target data stripe of data to be encoded in the RAID6 mode through a second parameter module, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for coding the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code, and storing the new second check code to the second check code storage position.
In another specific embodiment, the method can be used
Acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode through a first parameter module, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and performing coding operation on the current first check code read from the first check code storage position and the current data after the first parameter operation through a first coding module to obtain a new first check code, and storing the new first check code to the first check code storage position until a final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
Acquiring a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6 through a first parameter module, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
correspondingly, the first coding module is used for coding the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code, and the new second check code is stored to the second check code storage position.
In a specific embodiment, the target data stripe of the data to be encoded may be stored in a cache; and reading the target data stripe from the cache, and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
And, in particular embodiments, may be based on a formula
Figure BDA0003075465440000141
Determining a first check parameter corresponding to a current target data stripe of data to be coded in an RAID6 mode;
wherein alpha ispA code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relationqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000143
representing an exclusive or operation.
Based on the formula
Figure BDA0003075465440000142
Determining a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode;
wherein alpha ispFor determining based on Van der Monte RS coding relationshipsCorresponding to the first check code, aqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000144
representing an exclusive or operation.
Therefore, the method and the device for determining the data to be encoded in the RAID mode obtain a first check parameter corresponding to a current target data strip of the data to be encoded in the current RAID mode, and determine data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1; and carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded. Therefore, the code conversion from RAID5 to RAID6 can be realized only by replacing the first check code parameter, and RAID6 can be realized quickly and in a lower area on the premise of realizing RAID 5.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. For the method disclosed by the embodiment, the method corresponds to the circuit disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the circuit part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The RAID encoding circuit and the encoding method provided by the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A RAID encoding circuit comprising:
the system comprises a first parameter module, a second parameter module and a third parameter module, wherein the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
2. The RAID encoding circuit of claim 1, further comprising:
the data stripe dividing module is used for dividing the data to be coded into a preset number of data stripes;
the Galois field conversion module is used for converting each data stripe into Galois field data to obtain the target data stripe corresponding to each data stripe;
correspondingly, the first encoding module is configured to perform an exclusive or operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, and store the new first check code to the first check code storage location.
3. The RAID encoding circuit of claim 1, further comprising:
the second parameter module is used for acquiring a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for carrying out coding operation on the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code and storing the new second check code to the second check code storage position.
4. The RAID encoding circuit of claim 1,
the first parameter module is further configured to obtain a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6, and determine data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
correspondingly, the first encoding module is further configured to perform encoding operation on the current second parity read from the second parity storage location and the data after the current second parameter operation to obtain a new second parity, and store the new second parity to the second parity storage location.
5. The RAID encoding circuit of claim 1, further comprising:
the data caching module is used for storing the target data strip of the data to be coded into a cache;
and the data reading module is used for reading the target data stripe from the cache and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
6. The RAID encoding circuit of claim 2, wherein the first parameter module is specifically configured to:
based on the formula
Figure FDA0003075465430000021
Determining a first check parameter corresponding to a current target data stripe of data to be coded in an RAID6 mode;
wherein alpha ispA code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relationqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure FDA0003075465430000022
representing an exclusive or operation.
7. The RAID encoding circuit of claim 3, wherein the second parameter module is specifically configured to:
based on the formula
Figure FDA0003075465430000023
Determining a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode;
wherein alpha ispBased on the Van der Monte RS coding relationshipDetermining the value of the coding coefficient, alpha, corresponding to the first check codeqA code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relationxFor the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure FDA0003075465430000024
representing an exclusive or operation.
8. A RAID encoding method comprising:
acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
9. The RAID encoding method of claim 8, further comprising:
dividing the data to be coded into a preset number of data stripes;
and converting each data stripe into Galois field data to obtain a target data stripe corresponding to each data stripe.
10. The RAID encoding method of claim 9, wherein the performing an encoding operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code comprises:
and performing XOR operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code.
CN202110551258.0A 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method Active CN113297000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110551258.0A CN113297000B (en) 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110551258.0A CN113297000B (en) 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method

Publications (2)

Publication Number Publication Date
CN113297000A true CN113297000A (en) 2021-08-24
CN113297000B CN113297000B (en) 2022-12-23

Family

ID=77323110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110551258.0A Active CN113297000B (en) 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method

Country Status (1)

Country Link
CN (1) CN113297000B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986147A (en) * 2021-12-24 2022-01-28 苏州浪潮智能科技有限公司 RAID6 hardware acceleration circuit structure and RAID6 hardware acceleration implementation method
CN114415982A (en) * 2022-03-30 2022-04-29 苏州浪潮智能科技有限公司 Data storage method, device and equipment and readable storage medium
CN114416424A (en) * 2022-03-30 2022-04-29 苏州浪潮智能科技有限公司 RAID encoding and decoding method, device, equipment and readable storage medium
CN114442950A (en) * 2022-01-21 2022-05-06 山东云海国创云计算装备产业创新中心有限公司 Data recovery method, system, device and computer readable storage medium
CN115167787A (en) * 2022-09-06 2022-10-11 苏州浪潮智能科技有限公司 Data unloading method, system, equipment and computer readable storage medium
CN116028260A (en) * 2023-01-09 2023-04-28 海光信息技术股份有限公司 Data processing method, processing device and storage system
CN116312726A (en) * 2023-05-16 2023-06-23 苏州浪潮智能科技有限公司 Data storage method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848055A (en) * 2009-03-23 2010-09-29 华为技术有限公司 Method and device for correcting data
CN102023820A (en) * 2010-12-01 2011-04-20 北京同有飞骥科技股份有限公司 Method for constructing double-disk fault-tolerant vertical packet parallel access disk array
CN103577274A (en) * 2012-07-31 2014-02-12 国际商业机器公司 Management method and device of memory array
CN105335150A (en) * 2014-08-13 2016-02-17 苏宁云商集团股份有限公司 Quick coding and decoding method and system of erasure code data
CN106227463A (en) * 2016-07-11 2016-12-14 苏州科达科技股份有限公司 RAID model, reading and writing data and method for reconstructing thereof
CN107391046A (en) * 2017-08-02 2017-11-24 郑州云海信息技术有限公司 The method for writing data and device of a kind of RAID system
US20200250037A1 (en) * 2019-01-31 2020-08-06 EMC IP Holding Company, LLC In-Place RAID Conversion System and Method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848055A (en) * 2009-03-23 2010-09-29 华为技术有限公司 Method and device for correcting data
CN102023820A (en) * 2010-12-01 2011-04-20 北京同有飞骥科技股份有限公司 Method for constructing double-disk fault-tolerant vertical packet parallel access disk array
CN103577274A (en) * 2012-07-31 2014-02-12 国际商业机器公司 Management method and device of memory array
CN105335150A (en) * 2014-08-13 2016-02-17 苏宁云商集团股份有限公司 Quick coding and decoding method and system of erasure code data
CN106227463A (en) * 2016-07-11 2016-12-14 苏州科达科技股份有限公司 RAID model, reading and writing data and method for reconstructing thereof
CN107391046A (en) * 2017-08-02 2017-11-24 郑州云海信息技术有限公司 The method for writing data and device of a kind of RAID system
US20200250037A1 (en) * 2019-01-31 2020-08-06 EMC IP Holding Company, LLC In-Place RAID Conversion System and Method

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986147A (en) * 2021-12-24 2022-01-28 苏州浪潮智能科技有限公司 RAID6 hardware acceleration circuit structure and RAID6 hardware acceleration implementation method
CN114442950A (en) * 2022-01-21 2022-05-06 山东云海国创云计算装备产业创新中心有限公司 Data recovery method, system, device and computer readable storage medium
CN114442950B (en) * 2022-01-21 2024-01-23 山东云海国创云计算装备产业创新中心有限公司 Data recovery method, system, device and computer readable storage medium
WO2023184911A1 (en) * 2022-03-30 2023-10-05 苏州浪潮智能科技有限公司 Data storage method and apparatus, and device and non-volatile readable storage medium
CN114415982A (en) * 2022-03-30 2022-04-29 苏州浪潮智能科技有限公司 Data storage method, device and equipment and readable storage medium
CN114416424A (en) * 2022-03-30 2022-04-29 苏州浪潮智能科技有限公司 RAID encoding and decoding method, device, equipment and readable storage medium
CN114415982B (en) * 2022-03-30 2022-06-07 苏州浪潮智能科技有限公司 Data storage method, device and equipment and readable storage medium
CN114416424B (en) * 2022-03-30 2022-06-17 苏州浪潮智能科技有限公司 RAID encoding and decoding method, device, equipment and readable storage medium
CN115167787A (en) * 2022-09-06 2022-10-11 苏州浪潮智能科技有限公司 Data unloading method, system, equipment and computer readable storage medium
CN116028260A (en) * 2023-01-09 2023-04-28 海光信息技术股份有限公司 Data processing method, processing device and storage system
CN116028260B (en) * 2023-01-09 2024-02-27 海光信息技术股份有限公司 Data processing method, processing device and storage system
CN116312726B (en) * 2023-05-16 2023-08-15 苏州浪潮智能科技有限公司 Data storage method and device, electronic equipment and storage medium
CN116312726A (en) * 2023-05-16 2023-06-23 苏州浪潮智能科技有限公司 Data storage method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113297000B (en) 2022-12-23

Similar Documents

Publication Publication Date Title
CN113297000B (en) RAID (redundant array of independent disks) coding circuit and coding method
CN113296999B (en) RAID6 coding method and coding circuit
CN113297001B (en) RAID (redundant array of independent disks) coding and decoding method and coding and decoding circuit
CN101243664B (en) In-place transformations with applications to encoding and decoding various classes of codes
CN107086870B (en) Repair the MDS array code coding and coding/decoding method of more piece point failure
CN111240597B (en) Method, apparatus, device and computer readable storage medium for storing data
CN111858142A (en) Data processing method and device, electronic equipment and storage medium
CN105518996B (en) A kind of data decoding method based on binary field reed-solomon code
WO2023151290A1 (en) Data encoding method and apparatus, device, and medium
WO2016107377A1 (en) Data processing method and system based on quasi-cyclic ldpc
CN113687975A (en) Data processing method, device, equipment and storage medium
CN113505019A (en) Erasure code data and check recovery method, device, equipment and readable medium
CN114465627B (en) Data storage method, system, equipment and storage medium
JP7116374B2 (en) Reduced Latency Error Correction Decoding
US10164660B1 (en) Syndrome-based Reed-Solomon erasure decoding circuitry
CN111857549B (en) Method, apparatus and computer program product for managing data
KR20190059827A (en) One-sub-symbol linear repair schemes
CN108347250B (en) Fast coding method and apparatus suitable for small amount of redundant Reed-Solomon codes
CN115793984A (en) Data storage method and device, computer equipment and storage medium
CN114138543A (en) Data strip coding method, system, device and medium
CN114691414A (en) Check block generation method and data recovery method
CN112000509B (en) Erasure code encoding method, system and device based on vector instruction
CN108352845B (en) Method and device for encoding storage data
CN106302573B (en) Method, system and device for processing data by adopting erasure code
CN117950916B (en) High-reliability data backup method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240703

Address after: 2324, Building 1, Aosheng Building, No. 1166 Xinluo Street, High tech Zone, Jinan City, Shandong Province, 250000

Patentee after: Inspur Computer Technology Co.,Ltd.

Country or region after: China

Address before: 35th floor, S01 building, Inspur science and Technology Park, 1036 Inspur Road, Jinan area, Jinan pilot Free Trade Zone, Jinan City, Shandong Province

Patentee before: Shandong Yunhai guochuang cloud computing equipment industry innovation center Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right