Detailed Description
The embodiment of the invention provides a disk array fault-tolerant processing method and device and a fault-tolerant system, which can relatively effectively reduce the calculation complexity of disk fault tolerance and improve the implementability.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Generally, indexes for measuring the multi-disk fault-tolerant method mainly include updating complexity, calculation complexity, disk space redundancy, load balance, adaptability of the number of disks and the like. The updating complexity is a primary index for measuring the multi-disk fault-tolerant method, and refers to the number of times of disk operations required when one disk data block is updated, and the higher the updating complexity is, the lower the writing performance of the disk array is; the calculation complexity refers to calculating the check block according to the disk data block and recovering the implementation cost of the data block according to the check block, and is an important index for measuring the multi-disk fault-tolerant method, and the higher the calculation complexity is, the higher the implementation cost is, the lower the implementation possibility is in practical application; the redundancy of the disk space refers to the ratio of the check block to the total disk space, and the lower the redundancy is, the higher the effective data utilization rate of the disk space is; the load balancing means that the loads of all the disks are the same as much as possible in the data writing, data reading and data reconstruction processes, so that system bottlenecks are avoided, and the efficiency of the multi-disk fault-tolerant system can be improved by using the multi-disk fault-tolerant method of load balancing; the adaptability of the number of the disks refers to the adaptability of the multi-disk fault-tolerant method to the disk arrays with different numbers of disks, good adaptability can adapt to the disk arrays with any number of disks, poor adaptability can only adapt to the disk arrays with the number of disks with specific requirements, and the adaptability of the number of the disks also determines the practicability of the multi-disk fault-tolerant method.
The technical scheme of the embodiment of the invention fully considers the factors. The following is a detailed description of specific embodiments.
First, in the embodiment of the present invention, for convenience of description, a fault-tolerant coding matrix M (hereinafter referred to as a matrix M) is introduced, in which data blocks stored in (p-1) × p storage units of a disk array are mapped to (p-1) × p matrix elements in the matrix M.
The disk array mentioned in the embodiment of the present invention may be a redundant array of inexpensive disks, and may of course be other disk arrays with similar structures and operation manners.
The following description will take the example of fault-tolerant encoding of (p-1) × p data blocks stored in the disk array based on the matrix M.
In practical applications, the matrix M may include: p columns of data blocks and 2 columns of check blocks, i.e. comprising p × (p +2) matrix elements (which may be referred to as elements for short below). The front p columns of the matrix M are data block columns (data columns for short), and the back two columns are check block columns (check columns for short); the 0 th row of the matrix M is set as a virtual row, the virtual row is introduced to simplify fault-tolerant calculation, and the data blocks of the virtual row can be all 0; namely: the data blocks of the 1 st to p-1 st rows of the first p columns of the matrix M are data blocks stored by a disk array (p-1) x p storage units.
For convenience of description, the element in the ith row and the jth column in the matrix M is denoted by C (i, j), and the memory cell in the disk array storing the element C (i, j) in the ith row and the jth column of the matrix M is denoted by S (i, j). Further, if C (i, j) is a data block, D (i, j) may be used hereinafter; if C (i, j) is a parity block, P (i, j) may be used as follows. The check block refers to check data used for checking the data block.
In an application scenario, to implement multi-disk fault tolerance of a disk array, data blocks in each 1 column of a matrix M may be stored in different disks, respectively, where a failure of a disk in the disk array is also associated with a data block failure in a data column corresponding to the matrix M.
For convenience of understanding, the following takes as an example that a data block stored in (5-1) × 5 storage units of the disk array is mapped to (5-1) × p elements in a matrix M, and in this case, the matrix M includes 5 × (5+2) matrix elements, which may be specifically shown in table 1, but is not limited thereto:
TABLE 1
0 |
0 |
0 |
0 |
0 |
C(0,5) |
C(0,6) |
C(1,0) |
C(1,1) |
C(1,2) |
C(1,3) |
C(1,4) |
C(1,5) |
C(1,6) |
C(2,0) |
C(2,1) |
C(2,2) |
C(2,3) |
C(2,4) |
C(2,5) |
C(2,6) |
C(3,0) |
C(3,1) |
C(3,2) |
C(3,3) |
C(3,4) |
C(3,5) |
C(4,6) |
C(4,0) |
C(4,1) |
C(4,2) |
C(4,3) |
C(4,4) |
C(4,5) |
C(4,6) |
In the matrix M shown in table 1, columns 0 to 4 are data columns, columns 5 to 6 are check columns, a row 0 is a virtual row, and columns 1 to 4 are non-virtual rows. The data blocks in the 1 st to 4 th rows of the first 5 columns of the matrix M are data blocks stored in the disk array (5-1) × 5 storage units. For example, C (1, 0) represents an element in row 1, column 0 in the matrix M shown in table 1, and C (1, 0) is a data block and thus may be represented by D (1, 0); c (1, 5) represents the element in row 1, column 5 in the matrix M shown in table 1, and C (1, 5) is a check block, and thus may be represented by P (1, 5), and so on.
For convenience of visualization, the data blocks of the matrix M may also be mapped to points on a complex plane, and a specific mapping method may be to map the data blocks in the same column to a concentric circle, and map the data blocks in the same row to the same radial direction of concentric circles with different radii.
For example, the matrix M includes 5 × 5 data blocks (including data blocks of five virtual rows), and the mapping relationship between the 5 × 5 data blocks and the complex plane can be as shown in fig. 1-a. The 5 concentric circles of the complex plane sequentially represent the data blocks of the 0 th, 1 st, 2 nd, 3 th and 4 th columns of the matrix M, and the data blocks of each row of the matrix M are respectively mapped to the same radial direction of the 5 concentric circles.
In the embodiment of the present invention, the matrix M includes two columns of check columns, where 1 column of check blocks is used to implement horizontal check of the data block, and therefore may be referred to as a horizontal check block; the parity chunks in 1 column are used to implement the diagonal parity of the data chunk, and therefore may be referred to as diagonal parity chunks. For convenience of reference, a check column including a horizontal check block in the matrix M is hereinafter referred to as a horizontal check column, and a check column including a diagonal check block in the matrix M is hereinafter referred to as a diagonal check column.
In the following, the case where the p-th column of the matrix M is a horizontal parity column and the p + 1-th column is an oblique parity column will be specifically described, but the present invention is not limited thereto.
For convenience of description, a check group participating in horizontal check may be called a horizontal check group, where one horizontal check group includes p data blocks and one horizontal check block in the same row of the matrix M; the check packets participating in the diagonal check may be referred to as diagonal check packets, where one diagonal check packet includes p data blocks of different rows of the matrix M, one horizontal check block, and one diagonal check block.
In an application scenario, the data blocks in the first P columns of the matrix M may be used to generate the check blocks in the last two columns. The fault-tolerant coding method comprises the following steps: with data blocks n (1 ≦ n ≦ P-1) in each row of the 0 th column of the matrix M as fixed points, first, an exclusive-or check may be performed in a direction with a slope of 0 in a (P-1) × P matrix (a sub-matrix of the matrix M, i.e., the 1 st to P-1 th rows of the P column before the matrix M), without rotating the radial direction but checking directly, and the generated check blocks are sequentially P-1 elements of the P th column of the matrix M, and then an exclusive-or check may be performed in a direction with a slope of negative 1 (or in a direction with other slopes other than 0) in a P × (P +1) matrix (a sub-matrix of the matrix M, which may be the 0 th to P-1 th rows before the matrix M), i.e., a radial check after rotating once clockwise, and the generated check blocks are sequentially P-1 elements of the P +1 th column of the matrix M.
The algebraic description of the fault-tolerant coding method described above may be as follows:
in a matrix M including P columns of data blocks and 2 columns of check blocks, the fault-tolerant coding of each check block corresponding to the pth column (horizontal check column) is as follows:
<math>
<mrow>
<msub>
<mi>C</mi>
<mrow>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
</mrow>
</msub>
<mo>=</mo>
<munderover>
<mi>⊕</mi>
<mrow>
<mi>k</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mrow>
<mi>p</mi>
<mo>-</mo>
<mn>1</mn>
</mrow>
</munderover>
<msub>
<mi>C</mi>
<mrow>
<mi>i</mi>
<mo>,</mo>
<mi>k</mi>
</mrow>
</msub>
<mo>,</mo>
<mrow>
<mo>(</mo>
<mn>1</mn>
<mo>≤</mo>
<mi>i</mi>
<mo>≤</mo>
<mi>p</mi>
<mo>-</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
</mrow>
</math> (formula 1)
The fault-tolerant coding strategy of each check block in the p +1 th column (oblique check column) is as follows:
<math>
<mrow>
<msub>
<mi>C</mi>
<mrow>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<munderover>
<mi>⊕</mi>
<mrow>
<mi>k</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mi>p</mi>
</munderover>
<msub>
<mi>C</mi>
<mrow>
<msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>+</mo>
<mi>nk</mi>
<mo>)</mo>
</mrow>
<mi>p</mi>
</msub>
<mo>,</mo>
<mi>k</mi>
</mrow>
</msub>
<mo>,</mo>
<mrow>
<mo>(</mo>
<mn>1</mn>
<mo>≤</mo>
<mi>i</mi>
<mo>≤</mo>
<mi>p</mi>
<mo>-</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
</mrow>
</math> (formula 2)
Wherein, the formula 2 (i + nk)pDenotes taking the modulus of p for (i + n × k), n being a rotation coefficient, where n may be a positive or negative integer. In order to simplify the fault-tolerant calculation process, the embodiment of the present invention is described by taking the rotation coefficient n as 1 as an example.
When the rotation coefficient n is 1, generating strategies of the check blocks of the diagonal check columns are as follows:
<math>
<mrow>
<msub>
<mi>C</mi>
<mrow>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<munderover>
<mi>⊕</mi>
<mrow>
<mi>k</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mi>p</mi>
</munderover>
<msub>
<mi>C</mi>
<mrow>
<msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>+</mo>
<mi>k</mi>
<mo>)</mo>
</mrow>
<mi>p</mi>
</msub>
<mo>,</mo>
<mi>k</mi>
</mrow>
</msub>
<mo>,</mo>
<mrow>
<mo>(</mo>
<mn>1</mn>
<mo>≤</mo>
<mi>i</mi>
<mo>≤</mo>
<mi>p</mi>
<mo>-</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
</mrow>
</math> (formula 3)
According to the fault-tolerant coding strategy shown in formula 1, p-1 horizontal check blocks corresponding to the data blocks in each row can be simply generated by using all the data blocks in each row of the matrix M; according to the fault-tolerant encoding strategy shown in formula 3, p-1 oblique check blocks can be simply generated, and the generated check blocks are written into corresponding storage units of the disk array.
The writing position of each check block to the storage unit of the disk array may be a default, or may be calculated according to a preset writing strategy. When one or more disks of the data block of the storage matrix M in the disk array fail, the damaged data block on the failed disk can be recovered by using the corresponding check block stored in the disk array.
Furthermore, in order to improve the redundancy of the disk space of the disk array as much as possible, the column number p of the data blocks of the matrix M is more than or equal to 3.
Referring to fig. 1-b, an embodiment of the present invention provides a method for processing a disk array fault tolerance, which may include:
110. reading p data blocks of a first horizontal check packet stored in a disk array, wherein the first horizontal check packet comprises: a first horizontal check block and p data blocks, p being a positive integer;
in an application scenario, a row number and a column number of p data blocks of a first horizontal check group corresponding to a fault-tolerant coding matrix M may be obtained first, where p data blocks C of the first horizontal check groupi,kThe row number of (a) is i, and the value of the column number k is p integers from 0 to p-1 respectively; and then reading p data blocks of the first horizontal check group from the corresponding storage unit of the disk array according to the corresponding relation between the matrix elements of each row and column of the fault-tolerant coding matrix M and the storage unit of the disk array.
120. Obtaining the first horizontal check block by performing exclusive-or operation on the read p data blocks of the first horizontal check group;
in one application scenario, the first horizontal check block is obtained by using equation 1.
130. Reading p data blocks of a first oblique check group stored in a disk array, wherein the first oblique check group comprises a first horizontal check block, a first oblique check block and p data blocks;
in an application scenario, a row number and a column number of p data blocks of a first diagonal check group corresponding to a fault-tolerant coding matrix M may be obtained first, where the p data blocks of the first diagonal check group
The value of the approximate column number k is p integers from 0 to p-1, the line number is (i + nk)
pThe rotation coefficient n can be a positive integer or a negative integer; and then reading p data blocks of the first slant check group from the corresponding storage unit of the disk array according to the corresponding relation between the matrix elements of each row and column of the fault-tolerant coding matrix M and the storage unit of the disk array.
140. And performing exclusive-or operation on the first horizontal check block and the read p data blocks of the first diagonal check group to obtain the first diagonal check block.
In one application scenario, the first horizontal check block is obtained by using equation 2.
150. And writing the obtained first horizontal check block and the obtained first oblique check block into corresponding storage units of the disk array.
Therefore, double-disk fault tolerance of the disk array can be realized by performing horizontal fault-tolerant coding and oblique fault-tolerant coding on the data blocks, and compared with the conventional disk fault-tolerant coding methods such as RAID6 and the like, Galois field transformation is not required in the embodiment of the invention, so that the computation complexity of fault-tolerant coding and fault recovery can be greatly simplified; and has a low data block update cost.
For ease of understanding, the matrix M shown in table 1 is described as an example, wherein the parity chunks in the pth column of the matrix M are generated based on formula 1, and the parity chunks in the pth +1 column of the matrix M are generated based on formula 3.
Based on the fault-tolerant encoding strategy shown in formula 1, each check block in the pth column of the generated matrix M may be as follows:
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,5</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,4</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,5</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2</mn>
<mo>,</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,4</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,5</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3</mn>
<mo>,</mo>
<mn>0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3</mn>
<mo>,</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3</mn>
<mo>,</mo>
<mn>2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,4</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,5</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4</mn>
<mo>,</mo>
<mn>0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4</mn>
<mo>,</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4</mn>
<mo>,</mo>
<mn>2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,4</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
based on the fault-tolerant encoding strategy shown in formula 3, the generated check blocks in the p +1 th column of the matrix M may be as follows:
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,6</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>0,4</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,5</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,6</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>0,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,4</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,5</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,6</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>0,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,4</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,5</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
<math>
<mrow>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,6</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>0,1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>1,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>2,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>3,4</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>C</mi>
<mrow>
<mo>(</mo>
<mn>4,5</mn>
<mo>)</mo>
</mrow>
</mrow>
</math>
based on the fault-tolerant coding strategies of formula 1 and formula 3, in the matrix M shown in fig. 1, for example, the data blocks C (1, 0), C (1, 1), C (1, 2), C (1, 3), C (1, 4) and the horizontal check blocks C (1, 5) in the 1 st row belong to the same horizontal check group; the data blocks C (1, 0), C (2, 1), C (3, 2), C (4, 3), C (0, 4), and the horizontal check block C (1, 5) and the diagonal check block C (1, 6) belong to the same diagonal check group, and so on.
And writing the generated horizontal check blocks C (1, 5), C (2, 5), C (3, 5) and C (4, 5) and the diagonal check blocks C (1, 6), C (2, 6), C (3, 6) and C (4, 6) into corresponding storage units of the disk array. Wherein, the check block of the virtual row (row 0) may not be written into the disk array.
Further, to reduce the risk of failure, the data blocks and check blocks belonging to the same check group may be stored in different disks (or different sectors) to reduce the probability of being damaged at the same time.
For example, if 1 diagonal parity packet includes 6 data blocks, 1 horizontal parity block, and 1 diagonal parity block, at this time, 8(6+1+1) disks may be used to store 6 data blocks and 2 parity blocks, respectively. When 1 or 2 disks in 6 disks storing 6 data blocks fail, the damaged data blocks can be simply and quickly recovered by using the data blocks or check blocks stored in the rest disks; when 1 or 2 disks in two disks storing 2 check blocks fail, the damaged check blocks can be simply recovered according to the fault-tolerant coding strategies shown in formula 1 and formula 3.
Therefore, by adopting the disk fault-tolerant encoding method of the embodiment of the invention, double-disk fault tolerance of the disk array can be realized by performing horizontal fault-tolerant encoding and oblique fault-tolerant encoding on the data blocks, and compared with the existing disk fault-tolerant encoding methods such as RAID6, the scheme of the embodiment of the invention does not need Galois field transformation, and can greatly simplify the computation complexity of fault-tolerant encoding and fault recovery.
Furthermore, the horizontal check block also participates in the fault-tolerant coding of the oblique check block, the coding strength is relatively strong, and the fault-tolerant capability is further improved.
Further, an embodiment of the present invention further provides a method for recovering a data block based on the fault-tolerant coding method, which may include:
determining an oblique check block and a horizontal check block of an oblique check group to which a first data block belongs and a row number and a column number of other data blocks corresponding to a fault-tolerant coding matrix M according to the row number and the column number of the first data block to be recovered corresponding to the fault-tolerant coding matrix M, wherein the fault-tolerant coding matrix M comprises p columns of data blocks and two columns of check blocks;
reading an oblique check block, a horizontal check block and other data blocks of an oblique check group to which a first data block belongs from a corresponding storage unit of the disk array according to the corresponding relation between matrix elements of each row and column of the fault-tolerant coding matrix M and the storage unit of the disk array;
performing exclusive-or operation on the read data block and the check block to obtain a first data block;
and writing the obtained first data block into a corresponding storage unit of the disk array.
Based on the fault-tolerant encoding method and different disk fault conditions, the embodiment of the invention provides different data recovery schemes. The first to third embodiments of the present invention respectively aim at recovery of a disk failure of a single-column matrix element of a storage matrix M; the fourth to seventh embodiments of the present invention respectively address recovery of simultaneous failure of disks of two rows of matrix elements of the storage matrix M.
The first embodiment,
The present embodiment mainly aims at a recovery process of a disk failure of a single-column data block of a storage matrix M in a disk array, wherein a damaged data block is referred to as D (i, j) as an example below.
Referring to fig. 2, a method for recovering a disk failure according to a first embodiment of the present invention may include:
201. and determining the row number y of the diagonal check block in the diagonal check group to which D (i, j) belongs in the matrix M.
In practical applications, the way of determining the line number y may be: y is (i + (p-j))% p, although other mathematical means may be used to determine the row number y, and the invention is not limited thereto.
The diagonal check block is located in a diagonal check column (p +1 th column) of the matrix M.
202. The diagonal parity block P (y, P +1) and the horizontal parity block P (y, P) are read.
The horizontal check block P (y, P) and the diagonal check block P (y, P +1) belong to the same diagonal check group, and the horizontal check block P (y, P) and the diagonal check block P (y, P +1) are located on the same row of the matrix M.
In a specific implementation, the diagonal parity block P (y, P +1) and the horizontal parity block P (y, P) may be read from a storage unit in which the diagonal parity block P (y, P +1) and the horizontal parity block P (y, P) are stored in the disk array.
203. And reading other data blocks except D (i, j) in the slant check packet to which the slant check block P (y, P +1) belongs.
And reading other data blocks except for D (i, j) in the slant check packet to which the slant check block P (y, P +1) belongs from the corresponding storage unit of the disk array.
204. And performing exclusive or on all the read data blocks and the check block to obtain D (i, j).
It can be understood that, according to the fault-tolerant encoding rule, the exclusive or operation is performed on all the read data blocks, the diagonal parity block P (y, P +1), and the horizontal parity block P (y, P), and the result is the data block D (i, j).
205. And writing the obtained data block D (i, j) into a corresponding storage unit of the disk array.
Further, in order to better understand the above technical solution, the following further description will be given by taking the damaged data block as D (2, 1) in the matrix M shown in table 1 as an example.
First, a row number y of the diagonal parity chunks in the matrix M in the diagonal parity packet to which D (2, 1) belongs is determined, where y ═ (i + (p-j))% p ═ 2+ (5-1))% 5 ═ 1.
From equation 3, it can be inferred that: the diagonal check group to which D (2, 1) belongs comprises: d (1, 0), D (2, 1), D (3, 2), D (4, 3), D (0, 4), P (1, 5) and P (1, 6).
Then, the diagonal parity block P (1, 6) and the horizontal parity block P (1, 5), and other data blocks except D (2, 1) in the diagonal parity packet are read from the disk array, and other data blocks include: d (1, 0), D (3, 2), and D (4, 3), where D (0, 4) is a data block of a virtual row, and a default value (usually 0) is directly adopted, and no reading is required.
And performing exclusive-or operation on the read data block and the check block together to obtain D (2, 1).
Wherein, <math>
<mrow>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>2,1</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>1,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>3,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>4,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>0,4</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>1,5</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>1,6</mn>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
and finally writing the obtained data block D (2, 1) into a corresponding storage unit of the disk array.
The above-mentioned flow is a flow for recovering a single data block by using the diagonal check block, and similarly, a single data block can be recovered by using the horizontal check block, which is not described herein again.
It can be understood that by analogy with the above recovery method for a single data block, when a disk failure occurs in a single row of data blocks of the storage matrix M in the disk array, each damaged data block in the row can be recovered one by one, and details are not described here.
The technical scheme shows that by adopting the disk fault-tolerant encoding method provided by the embodiment of the invention, the fault tolerance of a single disk (a disk storing a single-column number of blocks) of a disk array can be rapidly realized, and compared with the existing disk fault-tolerant encoding methods such as RAID6 and the like, the method provided by the embodiment of the invention does not need Galois field transformation, and can greatly simplify the calculation complexity of fault recovery.
Example II,
The present embodiment mainly aims at a recovery process of a disk failure of a parity block of an oblique parity row of a storage matrix M in a disk array, where a damaged oblique parity block is P (i, P +1) as an example below.
Referring to fig. 3, a method for recovering a disk failure according to a second embodiment of the present invention may include:
301. let the variable k be 0;
302. determining the row number M of the element of the k column of the matrix M in the diagonal check group to which the diagonal check block P (i, P +1) to be recovered belongs;
the determination method of the row number m is as follows: m ═ i + k)% p. The elements of the k-th column of matrix M in the check group to which p (i, p +1) belongs may be data blocks (when k ≦ p-1) or horizontal check blocks (when k ≦ p).
303. Reading matrix elements C (m, k) from the disk array;
304. calculating the exclusive or value of all read matrix elements;
305. let the variable k be k + 1;
306. judging whether the variable k is less than or equal to p, if yes, returning to the step 302; if not, go to step 307.
At this time, when the variable k is greater than p, it indicates that the horizontal check block and all data blocks of the diagonal check group have been read, and the xor value calculated by using all the read matrix elements is the value of the diagonal check block C (i, p + 1).
307. And taking the calculated exclusive OR value as a slant check block to be recovered as C (i, p +1), and writing the slant check block into a corresponding storage unit of the disk array.
It is understood that step 304 may also be executed between step 306 and step 307, that is, the horizontal check block P (i, P) and all data blocks belonging to the diagonal check group to which the diagonal check block P (i, P +1) belongs are read first, and then the xor value of the read horizontal check block P (i, P) and all data blocks is calculated to obtain that the diagonal check block to be recovered is C (i, P + 1).
The embodiment also provides a method for recovering a disk failure, which may include:
reading a horizontal check block P (i, P) and all data blocks belonging to a diagonal check group to which a diagonal check block P (i, P +1) to be recovered belongs from the disk array;
performing exclusive-or calculation on the read horizontal check block P (i, P) and all data blocks;
and writing the calculation result into a corresponding storage unit of the disk array as a slant check block P (i, P + 1).
Further, in order to better understand the above technical solution, the following further description will be given by taking the damaged data block as P (2, 6) in the matrix M shown in table 1 as an example.
From equation 3, it can be inferred that: the diagonal check packet to which P (2, 6) belongs includes: d (2, 0), D (3, 1), D (4, 2), D (0, 3), D (1, 4), P (2, 5) and P (2, 6).
First, reading the horizontal parity block P (2, 5) and all data blocks belonging to the diagonal parity packet to which the diagonal parity block P (2, 6) to be recovered belongs from the disk array, including: d (2, 0), D (3, 1), D (4, 2), D (1, 4), where D (0, 3) is a data block of the virtual row, and a default value (usually 0) is directly adopted, and no reading is required.
And performing exclusive-or operation on all data blocks and check blocks of the diagonal check group to which the P (2, 6) belongs to obtain P (2, 6), and writing the P (2, 6) into a corresponding storage unit of the disk array.
Wherein, <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>2,6</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>2,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>3,1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>4,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>0,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>1,4</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>2,5</mn>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
the above-mentioned flow is a flow for recovering a single oblique check block, and it can be understood that, by analogy with the recovery mode of the above-mentioned single oblique check block, when a disk failure occurs in a storage matrix M oblique check column check block in a disk array, each damaged check block of the column can be recovered one by one, which is not described herein again.
Example III,
The present embodiment mainly aims at a recovery process of a disk failure of a parity block of a horizontal parity column of a storage matrix M in a disk array, where a damaged horizontal parity block is P (i, P) as an example below.
Referring to fig. 4, a method for recovering a disk failure according to a third embodiment of the present invention may include:
401. reading all data blocks belonging to a horizontal check group to which a horizontal check block P (i, P) to be recovered belongs from the disk array;
402. performing exclusive-or calculation on all the read data blocks;
403. and writing the calculation result into a corresponding storage unit of the disk array as a horizontal check block P (i, P) to be recovered.
Further, for better understanding of the above technical solutions, the following takes the example that the damaged horizontal parity check block is P (1, 5) in the matrix M shown in table 1, and further description is made.
From equation 1, it can be inferred that: the horizontal check packet to which P (1, 5) belongs includes: d (1, 0), D (1, 1), D (1, 2), D (1, 3), D (1, 4) and P (1, 5).
First, reading all data blocks belonging to the horizontal check group belonging to the horizontal check block P (1, 5) to be recovered from the disk array, including: d (1, 0), D (1, 1), D (1, 2), D (1, 3) and D (1, 4);
and performing exclusive-or operation on all the read data blocks to obtain a horizontal check block P (1, 5), and writing the P (1, 5) into a corresponding storage unit of the disk array.
Wherein, <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>1,5</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>1,0</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>1,1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>1,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>1,3</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>1,4</mn>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
the above-mentioned flow is a flow for recovering a single horizontal check block, and it can be understood that, by analogy with the recovery mode of the single horizontal check block, when a disk failure occurs in a horizontal check column check block of the storage matrix M in the disk array, each damaged check block of the column can be recovered one by one, which is not described herein again.
In the above embodiments, the first to third embodiments are directed to recovery of a disk failure of a single-column data block or a check block of the storage matrix M, and the following specifically describes recovery of a disk simultaneous failure of two columns of matrix elements of the storage matrix M by using a specific embodiment. Wherein, two columns of matrix elements to be restored may be: the device comprises a horizontal check block, a row of data blocks, an oblique check block, a row of data blocks, two rows of data blocks or two rows of check blocks.
Example four,
The embodiment is mainly directed to recovery of simultaneous failure of a disk of a parity block of a horizontal parity column of a storage matrix M and a disk of a data block storing a single data column in a disk array. In the following, the damaged data column is taken as the jth column of the matrix M as an example.
Referring to fig. 5, a method for recovering a disk failure according to a fourth embodiment of the present invention may include:
501. determining the row number y of a diagonal check block in a diagonal check group to which the virtual data block D (0, j) belongs in a matrix M;
in practical applications, the way of determining the line number y may be: y ═ (i + (p-j))% p, i ═ 0.
502. Reading a slant check block P (y, P + 1);
503. reading other data blocks except D (y, j) on a y row where the oblique check block P (y, P +1) is located in the matrix M and other data blocks of the check group to which P (y, P +1) belongs;
504. performing exclusive-or operation on all read data blocks and the oblique check block P (y, P +1) to obtain a data block D (y, j);
the result of the exclusive-or operation is the data block D (y, j) to be recovered.
505. And writing the obtained data block D (y, j) into a corresponding storage unit of the disk array.
506. Determining the row number y of the diagonal check block in the diagonal check group to which D (y, j) belongs in the matrix M, where the manner of determining the row number y may be: y ═ y + (p-j))% p.
507. Judging whether the determined line number y is 0, if not, returning to the step 502; if yes, go to step 508.
It can be understood that when the determined row number y is not 0, it indicates that there is a data block to be recovered in the jth column of the matrix M, so that the process returns to step 502 to continue recovering the data block, and if it is 0, it indicates that the recovery of the data block in the jth column of the matrix M is completed, so that the process proceeds to step 508 to further recover the check block in the horizontal check column of the matrix M.
508. And restoring the check blocks of the horizontal check columns according to the data blocks of the jth column and the data blocks of other data columns of the restored matrix M, and writing the restored check blocks into corresponding storage units of the disk array.
After recovering the data blocks in the jth column of the matrix M, the check blocks in the horizontal check columns of the matrix M can be recovered one by one according to the method in the third embodiment.
It can be understood that, the above-mentioned flow takes the example of recovering all the damaged data blocks in the jth column first and then recovering all the damaged check blocks in the horizontal check column as an example, and it is needless to say that after recovering one damaged data block in the jth column, the recovered data block may be used to recover the damaged horizontal check block belonging to the horizontal check group to which the data block belongs, and so on, the damaged data blocks in the jth column and the damaged check blocks in the horizontal check column may be recovered one by one.
Compared with the conventional disk fault tolerance encoding methods such as RAID6 and the like, the method provided by the embodiment of the invention does not need Galois field transformation, and can greatly simplify the computational complexity of fault recovery.
Example V,
The embodiment is mainly directed to recovery of simultaneous failure of disks of two columns of data blocks of a storage matrix M in a disk array. In the following, the damaged data block is taken as the data block in the mth column and the nth column of the matrix M, where M < n is taken as an example.
Referring to fig. 6-a, a method for recovering a disk failure according to a fifth embodiment of the present invention may include:
601. the diagonal parity block P (0, P +1) of the corresponding virtual row is acquired.
Specifically, all the parity blocks stored in the disk array are read, and exclusive or operation is performed on all the read parity blocks to obtain the diagonal parity block P (0, P +1) corresponding to the virtual row.
The data blocks and check blocks of the virtual row of the matrix M are not stored, and therefore, all the check blocks stored in the read disk array do not include the horizontal check block P (0, P) and the diagonal check block P (0, P +1) corresponding to the virtual row.
It can be inferred from equation 1 and equation 3 that: p (0, P +1) is equal to the exclusive or value of all check blocks (total (P-1) × 2) of the non-virtual rows of the pth and pth +1 columns of the matrix M, and P (0, P +1) is obtained in preparation for subsequent data block recovery.
602. And determining the row number y of the diagonal check block in the diagonal check group to which the virtual data block D (0, M) belongs in the matrix M.
In practical applications, the way of determining the line number y may be:
y=(i+(p-j))%p=(0+(p-m))%p。
603. reading the horizontal check block P (y, P), the diagonal check block P (y, P +1) and other data blocks except D (y, n) in the diagonal check packet from the disk array.
604. And performing exclusive-or operation on the P (y, P +1) and the P (y, P) and all the read data blocks to obtain a data block D (y, n), and writing the obtained D (y, n) into a corresponding storage unit of the disk array.
As can be inferred from equation 1 and equation 3: the exclusive or operation of P (y, P +1) and P (y, P) with respect to all the read data blocks results in D (y, n).
Steps 603 and 604 can be regarded as slant recovery data.
605. And reading the check block P (y, P) and other data blocks except D (y, m) on the row y.
606. And exclusive-ORing the P (y, P) and other data blocks except the D (y, m) on the y row to obtain D (y, m), and writing the obtained D (y, m) into corresponding storage units of the disk array.
As can be inferred from equation 1: the exclusive or operation of the other data blocks on the y row except for D (y, m) and P (y, P) results in D (y, m).
Steps 605 and 606 may be considered as horizontal recovery data, among others.
607. And determining the row number y of the data block of the nth column of the matrix M in the diagonal check group to which the D (y, M) belongs.
In practical applications, the way of determining the line number y may be: and y is (y + (n-M))% p, and then the row number y of the data block in the nth column of the matrix M in the diagonal check group to which the D (y, M) belongs is determined.
For example, if D (y, M) is specifically D (3, M), it is determined that the row number y of the data block in the nth column of the matrix M in the diagonal parity check packet to which D (3, M) belongs is (y + (n-M))% p is (3+ (n-M))% p.
608. And judging whether the determined line number y is 0, if not, returning to the step 602, and if so, indicating that the data recovery is finished and ending the process.
In this example, the data block recovery is performed with the dummy data block of the data row with a smaller sequence number (mth column) in row 0 as the start point of the data block recovery, but it is needless to say that the data block recovery may be performed with the defective data disk with a larger sequence number (nth column) as the start point of the data block recovery.
Furthermore, in order to increase the recovery speed of the damaged data blocks, the virtual data blocks on the two damaged data columns can be simultaneously selected for parallel recovery.
For better understanding, the technical solution of the present embodiment is further described in detail by specific examples.
For example, the matrix M shown in table 1 is still used as an example, wherein a disk storing the column 2 data block and a disk storing the column 3 data block fail at the same time are used as an example for explanation.
When data block recovery is performed, C (0, 2) may be selected as a start point of data block recovery, or C (0, 3) may be selected as a start point of data block recovery. Of course, the two data blocks can be simultaneously selected for data block parallel recovery, so as to improve the data block recovery speed.
Taking C (0, 2) as an example as a starting point of data recovery, the recovery process is specifically described as follows:
first, diagonal parity blocks of the corresponding virtual rows on the 6 th column are acquired.
The obtaining method may be that horizontal parity blocks C (1, 5), C (2, 5), C (3, 5), and C (4, 5), diagonal parity blocks C (1, 6), C (2, 6), C (3, 6), and C (4, 6) are read from the disk array, and the read parity blocks are subjected to an exclusive or operation, and the result is C (0, 6).
Then, starting from C (0, 2), data block C (1, 3) can be recovered diagonally using C (3, 6); the data block C (1, 2) can be horizontally restored using C (1, 5).
Then, the data block C (2, 3) is recovered obliquely by using C (1, 2) and C (4, 6); the data block C (2, 2) is recovered using the C (2, 3) and C (2, 5) levels.
Then, the data block C (3, 3) is diagonally restored using the data blocks C (2, 2) and C (0, 6); the data block C (3, 2) is restored horizontally with the data blocks C (3, 3) and C (3, 5).
Then, the data block C (4, 3) is diagonally restored using the data blocks C (3, 2) and C (1, 6); the data block C (4, 2) is restored horizontally with the data blocks C (4, 3) and C (4, 5), and since the data block C (0, 3) of the virtual row in the 3 rd column is always 0 and does not need to be stored, restoration is not needed.
To this end, all data blocks on the data disk D2 and the data disk D3 are returned to completion.
Referring to fig. 6-b, the recovery path of the data block can be represented as follows:
C(0,2)→C(1,3)→C(1,2)→C(2,3)→C(2,2)
→C(3,3)→C(3,2)→C(4,3)→C(4,2)→C(0,3)
and the recovery of the data blocks is to recover the data blocks by using the check blocks on the oblique check columns from the data blocks of the virtual rows, and then recover the data blocks by alternately using the check blocks on the horizontal check columns and the oblique check columns until all the data blocks are recovered.
The above example is described by taking the example that two damaged data columns are adjacent, but the data block recovery in the case that two damaged data columns are not adjacent is also similar.
Compared with the conventional disk fault-tolerance encoding methods such as RAID6 and the like, the method provided by the embodiment of the invention does not need Galois field transformation, and can greatly simplify the calculation complexity of fault recovery.
Example six,
The embodiment is mainly directed to recovery of simultaneous failure of a disk of a parity block of an oblique parity column of a storage matrix M and a disk of a data block storing a single data column in a disk array. In the following, the damaged data column is taken as the jth column of the matrix M as an example.
Referring to fig. 7, a method for recovering from a disk failure according to a sixth embodiment of the present invention may include:
701. let variable y be 1;
702. p (y, P), and the other data blocks in the k-th row except D (y, j) are read from the disk array.
703. Performing exclusive-or operation on the read P (y, P) and other data blocks except D (y, j) in the y-th row to obtain D (y, j);
704. and writing the obtained D (y, j) into a corresponding storage unit of the disk array.
705. Making the variable y equal to y +1, namely making the variable y add 1;
706. judging whether y is larger than p-1, if not, returning to the step 702; if yes, go to step 707.
It can be understood that when it is determined that y is not 0, it indicates that there is a data block to be recovered in the jth column of the matrix M, so the method returns to step 702 to continue recovering the data block, and if y is 0, it indicates that the recovery of the data block in the jth column of the matrix M is completed, so step 707 is executed to further recover the parity check block in the diagonal parity check column of the matrix M.
707. And recovering the oblique check blocks of the oblique check columns according to the data blocks of each data column of the matrix M and the check blocks of the horizontal check columns, and writing the recovered oblique check blocks into corresponding storage units of the disk array.
After recovering the data blocks in the jth column of the matrix M, the check blocks in the diagonal check columns of the matrix M can be recovered one by one according to the method in the second embodiment.
It can be understood that, the above-mentioned flow takes the example of recovering all the damaged data blocks in the jth column first and then recovering all the damaged check blocks in the diagonal check column as an example, and it is needless to say that after recovering one damaged data block in the jth column, the recovered data block may be used to recover the damaged diagonal check block belonging to the diagonal check group to which the data block belongs, and so on, the damaged data blocks in the jth column and all the damaged check blocks in the diagonal check column may be recovered one by one.
As can be seen from the above technical solutions, by using the disk fault-tolerant encoding method of the embodiments of the present invention, fault tolerance of dual disks (disks storing single-row data blocks and diagonal check blocks, respectively) of a disk array can be achieved, and compared with the existing disk fault-tolerant encoding methods such as RAID6, the method of the embodiments of the present invention does not need galois field transformation, and can greatly simplify the computational complexity of fault recovery.
Example seven,
The present embodiment is directed to recovery of simultaneous failure of a disk storing parity blocks of a diagonal check column and a disk storing parity blocks of a horizontal check column of a storage matrix M in a disk array.
Firstly, restoring each check block of the horizontal check column according to the method in the second embodiment;
then, each parity block of the diagonal parity column is recovered according to the method in the third embodiment.
Of course, it may also be selected to recover a damaged horizontal check block, and then recover the damaged diagonal check block belonging to the diagonal check group to which the horizontal check block belongs by using the recovered horizontal check block, and so on, recover all the damaged horizontal check blocks and diagonal check blocks one by one, and the specific recovery process is not described here again.
Further, an embodiment of the present invention further provides a data block updating method based on the fault-tolerant encoding method, which may include:
reading an original data block to be updated, an original horizontal check block of a horizontal check group to which the original data block belongs, and an original oblique check block of an oblique check group to which the original data block belongs from a disk array;
carrying out XOR operation on the original horizontal check block, the original data block and the corresponding new data block to obtain a new horizontal check block;
carrying out XOR operation on the original oblique check block, the original data block and the corresponding new data block to obtain a new oblique check block; or carrying out XOR operation on the original oblique check block, the original horizontal check block and the new horizontal check block to obtain a new oblique check block;
and updating the original data block, the original horizontal check block and the original oblique check block by using the new data block, the new horizontal check block and the new oblique check block.
Example eight,
The present embodiment is mainly directed to a method for updating data blocks in a disk array, wherein the original data block D updated by a new data block D (i, j) is used as the following step0(i, j) is an example.
Referring to fig. 8, a method for updating a data block according to an eighth embodiment of the present invention may include:
801. acquiring and judging whether the row number and the column number of a new data block D (i, j) to be written in the matrix M are equal, if so, executing a step 802; if not, go to step 807.
802. Reading original data block D from disk array0(i,j);
Wherein, the original data block D0(i, j) may also be referred to as data block D to be updated0(i,j)。
803. Reading original check block P from disk array0(i, P) and P0(i,p+1);
804. By using D0(i,j)、P0(i, P) and D (i, j) acquiring a new check block P (i, P);
wherein the new horizontal check block <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
805. Using P (i, P), P0(i, P +1) and P0(i, P) acquiring a new check block P (i, P + 1);
wherein, the new slant check block <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>+</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>+</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>)</mo>
</mrow>
<mo>;</mo>
</mrow>
</math>
806. Writing the new data block D (i, j), the new check block P (i, P) and P (i, P +1) into a corresponding storage unit of the disk array;
so far, the data block update process in the case of i ═ j ends.
807. Reading original data block D from disk array0(i, j) and the original parity chunk P0(i,p);
808. Determination of D0(i, j) the row number y of the original slant checking block in the belonged slant checking grouping;
wherein, the determination formula may be: y ═ i + (p-j))% p;
809. reading original check block P from disk array0(y,p+1);
810. By using D0(i,j)、P0(i, P) and D (i, j) obtain a new parity chunk P (i, P).
Wherein, <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>p</mi>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
811. by using D0(i,j)、P0(y, P +1) and D (i, j) obtain a new parity chunk P (y, P + 1).
Wherein, <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mi>y</mi>
<mo>,</mo>
<mi>p</mi>
<mo>+</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mi>y</mi>
<mo>,</mo>
<mi>p</mi>
<mo>+</mo>
<mn>1</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mi>i</mi>
<mo>,</mo>
<mi>j</mi>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
812. and writing the new data block D (i, j), the new check block P (i, P) and P (y, P +1) into corresponding storage units of the disk array.
So far, the data block update process in case i ≠ j ends.
For better understanding, the technical solution of the present embodiment is further described in detail by specific examples.
Case 1, i ═ j:
for example, still take the matrix M shown in table 1 as an example, wherein the new data block obtained is D (2, 2), and the original data block is D0(2, 2) will be described as an example.
First, since 2 is determined to be 2, the original data block D is read from the disk array0(2, 2) original level check Block P0(2, 5) and original slant check Block P0(2,6);
Then, the user can use the device to perform the operation,by using D0(2,2)、P0(2, 5) and D (3, 2) obtaining a new horizontal check block P (2, 5), wherein the new horizontal check block P <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>2,5</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>2,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>2,5</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>2,2</mn>
<mo>)</mo>
</mrow>
<mo>;</mo>
</mrow>
</math>
By using P (2, 5), P0(2, 5) and P0(2, 6) obtaining a new diagonal check block P (2, 6), wherein the new diagonal check block <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>2,6</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>2,5</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>2,5</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>2,6</mn>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
And finally, writing the new data blocks D (3, 2), the new check blocks P (3, 5) and P (1, 6) into corresponding storage units of the disk array, and ending the updating.
Case 2, i ≠ j:
for example, still take the matrix M shown in Table 1 as an example, wherein the new data block obtained is D (3, 2), and the original data block is D0(3, 2) will be described as an example.
First, it is judged that 3 ≠ 2, so the original data block D is read from the disk array0(3, 2) and the original check Block P0(3, 5); and determining D0(3, 2) row number y, y ═ i + (p-j))% p ═ 3+ (5-2))% 5 ═ 1 of the original diagonal check block in the attributed diagonal check packet;
then, the original slant check block P is read from the disk array0(1, 6) utilizing D0(3,2)、P0(3, 5) and D (3, 2) obtaining a new horizontal check block P (3, 5), wherein the new horizontal check block P <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>3,5</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>3,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>3,5</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>3,2</mn>
<mo>)</mo>
</mrow>
<mo>;</mo>
</mrow>
</math>
By using D0(3,2)、P0(3, 5) and D (3, 2) obtaining a new diagonal parity block P (1, 6), wherein the new diagonal parity block <math>
<mrow>
<mi>P</mi>
<mrow>
<mo>(</mo>
<mn>1,6</mn>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>3,2</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mrow>
<mo>(</mo>
<mn>1,6</mn>
<mo>)</mo>
</mrow>
<mo>⊕</mo>
<mi>D</mi>
<mrow>
<mo>(</mo>
<mn>3,2</mn>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mrow>
</math>
And finally, writing the new data blocks D (3, 2), the new check blocks P (3, 5) and P (1, 6) into corresponding storage units of the disk array, and ending the updating.
It can be understood that the above method is also applicable to the case of updating multiple data blocks, for example, the updating of multiple data blocks may be decomposed into multiple updating of a single data block, and when the updating of multiple data blocks is performed, the above method may be referred to, and details are not described here.
Optionally, it may also choose to update the original data block directly, then read out other data blocks of the horizontal check group to which the new data block belongs, and obtain the corresponding horizontal check block by using formula 1; and reading other data blocks and horizontal check blocks of the slant check group to which the new data block belongs, and obtaining corresponding slant check blocks by using a formula 3.
According to the technical scheme, the disk fault-tolerant encoding method disclosed by the embodiment of the invention does not need Galois field transformation, can realize lower data block updating cost and has extremely few data block reading and writing times.
In the above embodiments of the present invention, the fault tolerance of two disks is mostly taken as an example for explanation, and if the fault tolerance of more than 3 disks needs to be realized, the fault-tolerant encoding method provided by the embodiments of the present invention can be used to realize recovery of more damaged data blocks of the disks by increasing the check columns of the matrix M.
In addition, a disk in the embodiment of the present invention may also be regarded as a Storage node in a Storage Area Network (SAN), that is, the system and method for multi-disk fault tolerance in the embodiment of the present invention is applied to the SAN technology, and the fault-tolerant encoding and recovery method of the data block is the same as the above-mentioned embodiment. In addition, for fault tolerance of the distributed storage system, a single disk in the embodiment of the present invention is used as a network node in the distributed storage system, and the above embodiment of the present invention may be applied to the distributed storage system, and the method for fault-tolerant encoding and recovering of data blocks is the same as the above embodiment.
In order to better implement the technical solution of the embodiment of the present invention, a fault tolerant processing apparatus is further provided in the embodiment of the present invention.
Examples nine,
Referring to fig. 9-a, a fault tolerant processing apparatus 900 according to a ninth embodiment of the present invention may include: a first reading module 910, a first operation module 920, a second reading module 930, a second operation module 940 and a first writing module 950.
A first reading module 910, configured to read p data blocks of a first horizontal check packet stored in a disk array, where the first horizontal check packet includes: a first horizontal check block and p data blocks, p being a positive integer;
the first operation module 920 is configured to perform an exclusive or operation on the read p data blocks of the first horizontal check group to obtain the first horizontal check block.
In an application scenario, the first operation module 920 obtains the first horizontal check block by using formula 1.
The second reading module 930 is configured to read p data blocks of a first diagonal check packet stored in the disk array, where the first diagonal check packet includes a first horizontal check block, a first diagonal check block, and p data blocks.
A second operation module 940, configured to perform an exclusive or operation on the first horizontal check block and the read p data blocks of the first diagonal check group to obtain the first diagonal check block.
In an application scenario, the second operation module 940 obtains the first horizontal check block by using equation 2.
The first writing module 950 is configured to write the obtained first horizontal parity block and the obtained first diagonal parity block into corresponding storage units of the disk array.
In an application scenario, the first reading module 910 may include:
a first obtaining submodule for obtaining a first level checkP data blocks of the packet correspond to the row number and the column number in the fault-tolerant coding matrix M, wherein the p data blocks C of the first horizontal check packeti,kThe row number of (a) is i, and the value of the column number k is p integers from 0 to p-1 respectively;
and the first reading submodule is used for reading the p data blocks of the first horizontal check group from the corresponding storage unit of the disk array according to the corresponding relation between the matrix elements of each row and column of the fault-tolerant coding matrix M and the storage unit of the disk array.
The second reading module 930 may include:
a second obtaining submodule for obtaining that the p data blocks of the first slant check group correspond to the fault-tolerant code
The row number and the column number in the code matrix M, wherein the first slant checks p data blocks of the packet
The value of the column number k is p integers from 0 to p-1, the line number is (i + nk)
pThe rotation coefficient n can be a positive integer or a negative integer;
and the second reading submodule is used for reading the p data blocks of the first oblique check group from the corresponding storage unit of the disk array according to the corresponding relation between the matrix elements of each row and column of the fault-tolerant coding matrix M and the storage unit of the disk array.
In one application scenario, the rotation coefficient n is 1.
Referring to fig. 9-b, in an application scenario, the fault tolerant processing apparatus 900 may further include:
a determining module 960, configured to determine, according to a row number and a column number of a first data block to be recovered, which correspond to a fault-tolerant coding matrix M, an oblique check block, a horizontal check block of an oblique check group to which the first data block belongs, and a row number and a column number of other data blocks, which correspond to the fault-tolerant coding matrix M, where the fault-tolerant coding matrix M includes p columns of data blocks and two columns of check blocks;
a third reading module 970, configured to read, according to a corresponding relationship between a matrix element of each row and column of the fault-tolerant coding matrix M and a storage unit of the disk array, an oblique parity block, a horizontal parity block, and other data blocks of an oblique parity group to which the first data block belongs from the corresponding storage unit of the disk array;
a third operation unit 980, configured to perform an exclusive or operation on the data block read by the third read module 970 and the check block, so as to obtain a first data block;
a second writing module 990, configured to write the first data block obtained by the third operation unit 980 into a corresponding storage unit of the disk array.
Referring to fig. 9-c, in an application scenario, the fault tolerant processing apparatus 900 may further include:
a fourth reading module 9010, configured to read, from the disk array, an original data block to be updated, an original horizontal check block of a horizontal check group to which the original data block belongs, and an original diagonal check block of a diagonal check group to which the original data block belongs;
a fourth operation unit 9020, configured to perform an exclusive-or operation on the original horizontal check block, the original data block, and the corresponding new data block read by the fourth reading module 9010, to obtain a new horizontal check block;
a fifth operation unit 9030, configured to perform an exclusive-or operation on the original oblique check block, the original data block, and the corresponding new data block read by the fourth reading module 9010, to obtain a new oblique check block; or performing exclusive or operation on the new horizontal check block and the original oblique check block read by the fourth reading module to obtain a new oblique check block;
and the updating module 9040 is configured to update the original data block, the original horizontal check block, and the original diagonal check block with the new data block, the new horizontal check block, and the new diagonal check block.
It can be understood that the functions of the functional modules of the fault-tolerant processing apparatus 900 of this embodiment may be specifically implemented according to the method in the foregoing embodiment, and the specific implementation process may refer to the relevant description in the foregoing embodiment, which is not described herein again.
In order to better implement the technical solution of the embodiment of the present invention, an embodiment of the present invention further provides a data block recovery apparatus.
Examples ten,
Referring to fig. 10, a data block recovery apparatus 1000 according to a tenth embodiment of the present invention may include: a determination module 1010, a read module 1020, an operation module 1030, and a write module 1040.
The determining module 1010 is configured to determine, according to a row number and a column number of a first data block to be recovered, which correspond to a fault-tolerant coding matrix M, an oblique check block and a horizontal check block of an oblique check group to which the first data block belongs, and a row number and a column number of other data blocks, which correspond to the fault-tolerant coding matrix M, where the fault-tolerant coding matrix M includes p columns of data blocks and two columns of check blocks;
a reading module 1020, configured to read, from a corresponding storage unit of the disk array, an oblique parity block, a horizontal parity block, and other data blocks of an oblique parity group to which the first data block belongs according to a correspondence between matrix elements of each row and column of the fault-tolerant coding matrix M and the storage unit of the disk array;
an operation module 1030, configured to perform an exclusive or operation on the data block read by the reading module 1020 and the check block to obtain a first data block;
the writing module 1040 is configured to write the first data block obtained by the operation module 1030 into a corresponding storage unit of the disk array.
It can be understood that the functions of the functional modules of the data block recovery apparatus 1000 in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the relevant description in the foregoing embodiment, which is not described herein again.
In order to better implement the technical solution of the embodiment of the present invention, an apparatus for updating a data block is further provided in the embodiment of the present invention.
Examples eleven,
Referring to fig. 11, a data block updating apparatus 1100 according to an eleventh embodiment of the present invention may include: an obtaining module 1110, a reading module 1120, a first operation module 1130, a second operation module 1140 and an updating module 1150.
The obtaining module 1110 is configured to obtain a new data block.
The reading module 1120 is configured to read, from the disk array, an original data block to be updated, an original horizontal check block of a horizontal check group to which the original data block belongs, and an original diagonal check block of a diagonal check group to which the original data block belongs.
The first operation module 1130 is configured to perform an exclusive or operation on the original horizontal check block, the original data block, and the corresponding new data block to obtain a new horizontal check block.
A second operation module 1140, configured to perform an exclusive or operation on the original oblique parity block, the original data block, and the corresponding new data block to obtain a new oblique parity block; or carrying out XOR operation on the original oblique check block, the original horizontal check block and the new horizontal check block to obtain a new oblique check block.
An updating module 1150, configured to update the original data block, the original horizontal calibration block, and the original diagonal calibration block with the new data block, the new horizontal calibration block, and the new diagonal calibration block.
It can be understood that the functions of the functional modules of the data block updating apparatus 1100 in this embodiment may be specifically implemented according to the method in the foregoing embodiment, and the specific implementation process may refer to the relevant description in the foregoing embodiment, which is not described herein again.
In order to better implement the technical solution of the embodiment of the present invention, an apparatus for updating a data block is further provided in the embodiment of the present invention.
Examples twelve,
Referring to fig. 12, a fault tolerant system according to a twelfth embodiment of the present invention may include: a disk array 1210 and a fault tolerant processing device 1220.
The fault-tolerant processing device 1220 is configured to read p data blocks of a first horizontal check packet stored in the disk array 1210, where the first horizontal check packet includes: a first horizontal check block and p data blocks, p being a positive integer; performing exclusive-or operation on the read p data blocks of the first horizontal check group to obtain the first horizontal check block; reading p data blocks of a first diagonal check group stored in the disk array 1210, wherein the first diagonal check group comprises a first horizontal check block, a first diagonal check block and p data blocks; performing exclusive-or operation on the first horizontal check block and the read p data blocks of the first diagonal check group to obtain the first diagonal check block; and writing the obtained first horizontal check block and the obtained first diagonal check block into corresponding storage units of the disk array 1210.
In an application scenario, the fault-tolerant processing apparatus 1220 may obtain the first horizontal parity block based on formula 1, and obtain the first diagonal parity block based on formula 2.
It is to be understood that the fault-tolerant processing apparatus 1220 in this embodiment may include the fault-tolerant processing apparatus 900 in the ninth embodiment, and functions of each entity of the fault-tolerant system may be specifically implemented according to the method in the foregoing method embodiment, and a specific implementation process thereof may refer to relevant descriptions in the foregoing embodiment, which is not described herein again.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In summary, in the embodiments of the present invention, by performing horizontal fault-tolerant encoding and diagonal fault-tolerant encoding on a data block, double-disk fault tolerance of a disk array can be achieved, and compared with the existing disk fault-tolerant encoding methods such as RAID6, galois field transformation is not required in the embodiments of the present invention, and the computation complexity of fault-tolerant encoding and fault recovery can be greatly simplified; and has a low data block update cost.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The method, the device and the fault-tolerant system for processing the disk array fault tolerance provided by the embodiment of the invention are described in detail, a specific example is applied in the description to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, 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 invention.