CN115562594A - Method, system and related device for constructing RAID card - Google Patents

Method, system and related device for constructing RAID card Download PDF

Info

Publication number
CN115562594A
CN115562594A CN202211554108.6A CN202211554108A CN115562594A CN 115562594 A CN115562594 A CN 115562594A CN 202211554108 A CN202211554108 A CN 202211554108A CN 115562594 A CN115562594 A CN 115562594A
Authority
CN
China
Prior art keywords
data
array
check
raid card
disk
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
CN202211554108.6A
Other languages
Chinese (zh)
Other versions
CN115562594B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211554108.6A priority Critical patent/CN115562594B/en
Publication of CN115562594A publication Critical patent/CN115562594A/en
Application granted granted Critical
Publication of CN115562594B publication Critical patent/CN115562594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The application provides a method for constructing a RAID card, which comprises the following steps: receiving an array creation task; analyzing the array creating task and determining array command parameters; determining the occupied capacity of the user data in the blocks according to the array command parameters; judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity; if yes, utilizing exclusive-or operation to generate internal check data of a disk array in the RAID card and global Q check data corresponding to the RAID card; the internal check data comprises data block internal check data and check block internal check data. The method and the device can improve data reliability and data safety, and simultaneously can not reduce the I/O performance and the disk utilization rate of the disk array. The application also provides a RAID card construction system, a computer readable storage medium, a storage device and a distributed storage system, which have the beneficial effects.

Description

Method, system and related device for constructing RAID card
Technical Field
The present application relates to the field of data storage, and in particular, to a method, a system, and a related apparatus for constructing a RAID card.
Background
In the field of storage, RAID storage techniques are employed to improve data reliability, data security, and I/O performance. A RAID array is composed of a large number of independent disks to form a large-capacity disk group, and can process host I/O requests in parallel to improve I/O performance. Currently, when a RAID5 array is used to store data, there are obvious problems of data reliability and data security. For example, a failure of one disk in a RAID5 array and a media error of another disk in the same array will cause data loss, in other words, when two disks fail simultaneously, the RAID5 array will directly lose data, and the data storage security thereof cannot be guaranteed.
Disclosure of Invention
The purpose of the application is to provide a method for constructing a RAID card, a system for constructing the RAID card, a computer readable storage medium, a storage device and a distributed storage system, which can effectively improve the data storage safety and reliability of a RAID5 array.
In order to solve the technical problem, the present application provides a method for constructing a RAID card, and the specific technical scheme is as follows:
receiving an array creation task;
analyzing the array creating task and determining array command parameters;
determining the occupied capacity of the user data in the blocks according to the array command parameters;
judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity;
if yes, generating internal check data of a disk array in the RAID card and global Q check data corresponding to the RAID card by utilizing XOR operation; the internal check data comprises data block internal check data and check block internal check data.
Optionally, if the capacity of the disk array cannot meet the sum of the occupied capacity and the check data capacity, the method further includes:
generating an abnormal error report, and adding a minimum block size meeting the sum of the user data and the check data in the abnormal error report; the exception error report is used for indicating that the exception exists in the array command parameter included in the array creating task.
Optionally, determining the occupied capacity of the user data in the partition according to the array command parameter includes:
and determining the occupied capacity of the user data in the blocks by using the RAID card controller according to the array command parameters.
Optionally, the generating internal check data of the disk array in the RAID card by using an exclusive or operation, and the global Q check data corresponding to the RAID card include:
and generating a corresponding P check block for each disk array in the RAID card, and generating global Q check block data of the RAID card by utilizing XOR operation.
Optionally, generating a corresponding P-check partition for each disk array in the RAID card, and generating global Q-check partition data of the RAID card by using an exclusive or operation includes:
generating P check blocks of single redundancy check corresponding to each disk array in the RAID card;
and generating corresponding global Q check block data for the RAID card by utilizing exclusive-or operation.
Optionally, generating a P check partition protected by single redundancy check data corresponding to each array includes:
and generating a P check block of single redundancy check corresponding to the array according to the XOR operation of the user data in the disk array.
Optionally, the generating, by using an exclusive-or operation, corresponding global Q-check block data for the RAID card includes:
and generating the global Q check block data according to the user data of all the disk arrays in the RAID card.
Optionally, the generating, by using an exclusive or operation, the corresponding global Q-check block data for the RAID card includes:
and generating the global Q check block data according to the user data of all the disk arrays in the RAID card and the P check block.
Optionally, when determining the occupied capacity of the user data in the block according to the array command parameter, the method further includes:
and determining the number of member disks of the disk array in the RAID card according to the data volume of the user data.
Optionally, after configuring, by using the RAID card controller, the member disks of each disk array in the RAID card according to the number of the member disks, the method further includes:
and determining a physical disk supporting the Q check block in the member disks.
Optionally, the method further includes:
and if the user data of the disk array is lost due to media errors, recovering the lost user data by using the internal check data.
Optionally, if the medium error occurs in a disk where the data is internally verified, the method further includes:
recovering the lost user data using the global Q-check partition.
Optionally, the method further includes:
and if the disk array has a fault member disk, recovering the data blocks on the fault member disk by using the internal verification data and the data blocks on the non-abnormal member disk.
The present application further provides a system for constructing a RAID card, including:
the task receiving module is used for receiving the array creation task;
the parameter determining module is used for analyzing the array creating task and determining array command parameters;
the capacity determining module is used for determining the occupied capacity of the user data in the blocks according to the array command parameters;
the judging module is used for judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity;
the verification data generation module is used for generating internal verification data of a disk array in the RAID card and global Q verification data corresponding to the RAID card by utilizing XOR operation when the judgment result of the judgment module is yes; the internal check data comprises data block internal check data and check block internal check data.
Optionally, the method further includes:
a report generating module, configured to generate an abnormal error report if the determination result of the determining module is negative, and add a minimum block size that meets the sum of the user data and the check data to the abnormal error report; the exception error report is used for indicating that the exception exists in the array command parameter included in the array creating task.
Optionally, the verification data generating module includes:
and the check data generation unit is used for generating a corresponding P check block for each disk array in the RAID card and generating global Q check block data of the RAID card by utilizing XOR operation.
Optionally, the check data generating unit is a unit configured to generate a P check block corresponding to single redundancy check of each disk array in the RAID card, and generate corresponding global Q check block data by using an exclusive or operation on the RAID card.
Optionally, the internal check data generating unit is a unit configured to generate a single redundancy check P check block corresponding to the array according to an exclusive or operation of user data in the disk array.
Optionally, the internal check data generating unit is a unit configured to generate the global Q-check block data according to user data of all disk arrays in the RAID card.
Optionally, the verification data generating unit includes:
and the global check subunit is used for generating the global Q check block data according to the user data of all the disk arrays in the RAID card and the P check block.
Optionally, the method further includes:
and the first failure recovery module is used for recovering the lost user data by utilizing the internal check data if the user data is lost by the disk array due to media errors.
Optionally, the method further includes:
and the second failure recovery module is used for recovering the lost user data by using the global Q check block if the medium error occurs in a disk where the internal check data is located.
Optionally, the method further includes:
and the third failure recovery module is used for recovering the data blocks on the failed member disk by using the internal check data and the data blocks on the non-abnormal member disk if the failed member disk occurs in the disk array.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as set forth above.
The present application further provides a storage device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when calling the computer program in the memory.
The application also provides a distributed storage system, which is composed of a plurality of storage devices.
The application provides a method for constructing a RAID card, which comprises the following steps: receiving an array creation task; analyzing the array creating task and determining array command parameters; determining the occupied capacity of the user data in the blocks according to the array command parameters; judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity or not; if yes, generating internal check data of a disk array in the RAID card and global Q check data corresponding to the RAID card by utilizing XOR operation; the internal check data comprises data block internal check data and check block internal check data.
When the disk array is created, the occupied capacity of the user data is determined according to the array command parameters obtained through analysis, whether the sum of the user data and the check data meets the occupied capacity is judged, and once the occupied capacity is met, the internal check data of the disk array and the global Q check data corresponding to the RAID card are generated. When an in-disk media error occurs, the user data lost due to the disk media error may be recovered using the data block internal check data. If the disk array has a fault disk, the data block of the fault disk can be obtained by using the exclusive OR operation of the internal check data of the check block and other data blocks, so that the data of the fault disk can be recovered. If the check data in the check blocks have faults, the check data in the check blocks can be restored by using the check data in the global Q check blocks. According to the method and the device, the check data inside the disk are added, and the data lost due to medium errors can be recovered through the check data inside the disk, so that the data reliability and the data safety are improved, and the I/O performance and the disk utilization rate of the disk array cannot be reduced.
The application also provides a system for constructing the RAID card, a computer readable storage medium, a storage device, and a distributed storage system, which have the above beneficial effects and are not described here again.
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 flowchart of a method for constructing a RAID card according to an embodiment of the present application;
fig. 2 is a schematic diagram of adding a global Q check partition in a RAID card according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating adding parity data inside a disk in a RAID5 array according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a system for constructing a RAID card according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a storage device according to an embodiment of the present application.
Detailed Description
Currently, typical RAID storage technologies include RAID5 and RAID6, and RAID6 can still maintain data integrity when two failed disks occur in an array, and such technologies with stronger security are widely used in contemporary storage systems, such as military, banking systems, and so on.
However, RAID6 technology requires two physical disks to provide parity redundancy data, whereas a RAID5 array requires only one physical disk to provide parity redundancy data, and obviously, the disk utilization of a RAID6 array is lower than that of a RAID5 array. Also, the performance of a RAID5 array is better than a RAID6 array, e.g., data transfer from cache to a RAID5 array is more efficient than transfer to a RAID6 array because transfer to a RAID5 array requires 2 operations: 1. and (2) transferring the effective data blocks, and transferring the check blocks. While a shift to a RAID6 array requires 3 operations: 1. transferring valid data blocks, 2 transferring the first check block, and 3 transferring the second check block. In order to solve the above-mentioned shortcomings of the RAID6 array, the industry proposes a hard RAID storage technology (i.e., RAID card technology) based on the original soft RAID storage technology of the RAID5 array, and adds a RAID card controller and a RAID card engine to the RAID card to provide higher-level control over the inside of the RAID array. The present application provides for large scale distributed storage systems based on the industry's use of hard RAID storage technology, which may be connected to host systems interconnected by one or more networks. If one or some portions of the distributed storage system become degraded or unavailable, the performance of the overall storage environment is not affected.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 some embodiments of the present application, but not all 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, fig. 1 is a flowchart of a method for constructing a RAID card according to an embodiment of the present application, where the method includes:
s101: receiving an array creation task;
s102: analyzing the array creating task and determining array command parameters;
s103: determining the occupied capacity of the user data in the blocks according to the array command parameters;
s104: judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity; if yes, entering S105;
s105: generating internal check data of a disk array in the RAID card and global Q check data corresponding to the RAID card by utilizing XOR operation; the internal check data comprises data block internal check data and check block internal check data.
The receiving of the array creating task is not limited herein, and the array creating task may be created by detecting an operation instruction of a user at a host and receiving an array creating task corresponding to the operation instruction issued by the host. Namely, a user can perform related operations of the disk array at the host end, and the operation instruction is analyzed as an array creation task after being detected so as to obtain the array command parameters. The method is not limited to analyzing the array creating task, and the array creating task may be analyzed by a driver in the firmware layer of the RAID card and the array command parameters may be determined.
Thereafter, the occupied capacity of user data in the partition needs to be determined. Specifically, the determination may be performed by the RAID card controller, and then the driver in the firmware layer of the RAID card may send the array command parameter to the RAID card controller.
And the RAID card controller determines the occupied capacity of the user data in the blocks according to the analyzed command parameters. Meanwhile, the disk information in the disk group corresponding to the occupied capacity can be determined, that is, the number of the member disks of the RAID card array is determined according to the data volume of the user data, so that the number of the member disks of the disk array in the RAID card is determined according to the data volume of the user data.
And then, capacity judgment is carried out, namely the occupied capacity needs to meet the sum of the user data and the check data, and meanwhile, the number of member disks needed by each RAID5 array and the global Q check block can be determined. It should be noted that the P parity block is the first parity block in the stripe, and is obtained by data block exclusive or operation. And the Q check block is a second check block in the strip and is matched with the P check block to recover two fault disk data in the disk array.
And when the occupied capacity meets the sum of the user data and the check data, generating the check data corresponding to the disk array and the check block data between the disks by utilizing XOR operation. Specifically, a corresponding P check block may be generated for each disk array in the RAID card, and the global Q check block data of the RAID card may be generated by using an exclusive or operation. And generating P check sub-blocks corresponding to single redundancy check of each disk array in the RAID card, and generating corresponding global Q check sub-block data by utilizing XOR operation on the RAID card. When generating the P check blocks, the single redundancy check P check blocks corresponding to the array may be generated according to the xor operation of the user data in the disk array. The global Q check sub-block can generate global Q check sub-block data according to the user data of all the disk arrays in the RAID card, and can also generate the global Q check sub-block data according to the user data of all the disk arrays in the RAID card and the P check sub-block.
In addition, after the internal check data of the disk array in the RAID card and the global Q check data corresponding to the RAID card are generated by the exclusive or operation, the user data and the check data may be written to the target physical disk.
It is easy to understand that, a member disk has a disk where a P check partition exists and a disk where a global Q check partition exists, and in order to improve data writing efficiency, a physical disk supporting the Q check partition may be determined in the member disk.
If the occupied capacity can not meet the sum of the user data and the check data, an abnormal error report can be generated; the exception error report is used to indicate that there is an exception to the array command parameters included in the array creation task. In particular, a minimum chunk size that satisfies the sum of the user data and the check data may also be added to the abnormal error report.
Referring to fig. 2, fig. 2 is a schematic diagram of adding global Q parity chunks to a RAID card according to an embodiment of the present application, in fig. 2, the RAID card is composed of three RAID5 arrays, and the RAID5 array 1 and the RAID5 array 2 are composed of 5 member disks, where there is single-redundancy parity data protection of one P parity chunk, and the single-redundancy parity data protection is used to store internal parity data of a disk array. The RAID5 No. 3 array is composed of 6 member disks, and a global Q check block is added. Each stripe is composed of a D1-D4 user data block, a P check block and a Q check block. In RAID5 No. 1-3 arrays, P-parity chunks are distributed across the respective RAID5 arrays, providing RAID5 array single parity protection. The data blocks D1-D4 store user data in respective RAID arrays. The data blocks D1-D4 and the P parity blocks of the RAID5 array are rotated between disk 1-disk 5.
The Q-parity chunks in RAID5 array No. 3 may be combined with each of RAID5 array No. 1, RAID5 array No. 2, and RAID5 array No. 3, i.e., the Q-parity chunks may provide double parity redundancy data protection for each of RAID5 array No. 1, RAID5 array No. 2, and RAID5 array No. 3. When the stripe is written in any one of the RAID5 array No. 1, the RAID5 array No. 2, and the RAID5 array No. 3, the RAID card controller generates Q parity block data by an exclusive or operation and writes the Q parity block data in the disk. The additional Q-parity chunk data may cover each stripe of the three RAID5 arrays. The number of disks storing double check redundancy data is low in the total number of disks. Therefore, the global Q check block is added in the RAID card of the storage system, so that the data reliability and the data security of the RAID5 array can be greatly improved, and the I/O performance and the disk utilization rate of the RAID5 array cannot be reduced.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating adding parity data in a RAID5 array according to an embodiment of the present application, where in fig. 3, the RAID5 array is an array including 5 disks, and P parity chunks 330 are distributed in each member disk. Each strip chunk consists of user data 310 (shown as 310 in fig. 3) and internal disk parity data 320, which is obtained by xor operation of the user data in the chunks. When an in-disk media error occurs, the user data lost due to the disk media error may be recovered using the added in-disk parity data. User data is storage data to be modified and accessed by a user, and strip blocks of each horizontal row in the RAID array form a strip (shown as 300 in FIG. 3). Each stripe is composed of a data block and a P check block 330, and the P check block data is obtained by XOR operation of other data blocks in the stripe. When a failure disk of the RAID5 array occurs, the data blocks of the failure disk are obtained by using the exclusive OR operation of the P check block data in the strips and other data blocks, so that the data of the failure disk is recovered. Meanwhile, the internal check data of the disk is added in the P check block in the embodiment, and if the medium error of the failed disk occurs in the P check block, the data of the P check block can be recovered through the internal check data in the Q check block.
It can also be seen from fig. 2 and fig. 3 that, in the present application, internal check data of a disk is added on the original basis of a RAID5 array, and the data of a failed disk can be recovered by the internal check data, and the present application can also be used to recover a media error of the disk, thereby effectively solving a data loss event caused by a media error of a failed disk in the RAID5 array and another disk in the same array, and not reducing the disk utilization rate and I/O storage performance of the RAID5 array. Therefore, when a RAID5 array component large-scale distributed system is obtained based on the method for constructing a RAID card according to the embodiment of the present application, when performance of one or some parts of the distributed storage system is degraded or unavailable, performance of the entire storage environment is not affected, and therefore the distributed storage system based on the RAID card constructed by the present application can ensure data availability and high I/O performance of the entire storage environment.
When the disk array is created, the occupied capacity of the user data is determined according to the array command parameters obtained through analysis, whether the sum of the user data and the check data meets the occupied capacity is judged, and once the occupied capacity is met, the internal check data of the disk array and the global Q check data corresponding to the RAID card are generated. When an in-disk media error occurs, the user data lost due to the disk media error may be recovered using the data block internal check data. If the disk array has a fault disk, the data block of the fault disk can be obtained by using the exclusive-or operation of the internal check data of the check block and other data blocks, so that the data of the fault disk can be recovered. If the check data in the check blocks have faults, the check data in the check blocks can be restored by using the check data in the global Q check blocks. According to the method and the device, the check data in the disk are added, and the data lost due to medium errors can be recovered through the check data in the disk, so that the data reliability and the data safety are improved, and the I/O performance of the disk array and the disk utilization rate cannot be reduced. In short, the internal check data may be used to recover the failure data or the lost data of the disk array, and the global Q check data may be used to recover not only the user data but also the internal check data.
Compared with the RAID6 array, the method and the device for storing the global Q check data of the RAID card do not need to configure corresponding Q check blocks for each disk array, and only need to configure one global Q check block for storing the global Q check data corresponding to the RAID card. Compared with a RAID6 array, the application effectively improves the utilization rate of the disk.
On the basis of the above embodiment, a specific application process of the present application may be as follows:
the first step is as follows: and the RAID card receives tasks for creating a plurality of RAID5 arrays issued by a user through a host.
The second step is that: and the driving program of the RAID card firmware layer analyzes command parameters which are issued by a user and used for creating a plurality of RAID5 arrays, and transmits the command parameters to the RAID card controller.
The third step: and the RAID card controller determines the occupied capacity of the user data in the blocks according to the analyzed command line parameters. And determines the specific disks needed in the set of disks.
The fourth step: the RAID card controller determines whether the block size specified by the user can accommodate the total amount of the required user data and the check data in the disk.
The fifth step: determine how many member disks are needed for each RAID5 array, and global Q-check blocking.
And a sixth step: the RAID card controller determines the specific member disks required for each array, and the partitions occupied by the user data and the disk internal check data in each partition of each disk.
The seventh step: the RAID card controller determines the physical disks that support Q parity chunking, and Q parity chunking across the RAID5 array.
Eighth step: both user data and verification data are written to selected physical disks.
The ninth step: when writing to a given RAID5 array, for example, when writing to RAID5 array No. 1, P-parity chunk data is generated and written to the P-parity chunk of RAID5 array No. 1, and Q-parity chunk data is generated and written to the global Q-parity chunk of RAID5 array No. 3.
The embodiment of the application provides that the internal check data of the disk is added on the RAID5 array in the RAID card, so that the data loss event caused by the medium error of one fault disk in the RAID5 array and the other disk in the same array is effectively solved. Meanwhile, the global Q check block is added in the RAID card of the storage system, so that the data reliability and the data security of the RAID5 array can be greatly improved, and the I/O performance and the disk utilization rate of the RAID5 array are ensured.
The following describes a RAID card construction system provided in an embodiment of the present application, and the RAID card construction system described below and the RAID card construction method described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a system for constructing a RAID card according to an embodiment of the present application, and the present application further provides a system for constructing a RAID card, including:
the task receiving module is used for receiving the array creation task;
the parameter determining module is used for analyzing the array creating task and determining array command parameters;
the capacity determining module is used for determining the occupied capacity of the user data in the blocks according to the array command parameters;
the judging module is used for judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity;
the verification data generation module is used for generating internal verification data of a disk array in the RAID card and global Q verification data corresponding to the RAID card by utilizing XOR operation when the judgment result of the judgment module is yes; the internal check data comprises data block internal check data and check block internal check data.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the report generation module is used for generating an abnormal error report when the judgment result of the judgment module is negative; the exception error report is used for indicating that the exception exists in the array command parameter included in the array creation task.
Based on the foregoing embodiment, as a preferred embodiment, the report generating module is further configured to add a minimum block size that satisfies a sum of the user data and the check data in the exception error report.
Based on the foregoing embodiment, as a preferred embodiment, the task receiving module is a module configured to detect an operation instruction of a user at a host, and receive an array creation task corresponding to the operation instruction and issued by the host.
Based on the foregoing embodiment, as a preferred embodiment, the parameter determining module is a module configured to analyze the array creation task by using a driver in a firmware layer of a RAID card, and determine an array command parameter.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the parameter sending unit is used for sending the array command parameters to the RAID card controller.
Based on the above embodiment, as a preferred embodiment, the capacity determining module is a module that determines the occupied capacity of the user data in the block according to the array command parameter by using the RAID card controller.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the disk information determining module is used for determining the disk information in the disk group corresponding to the occupied capacity.
Based on the above embodiment, as a preferred embodiment, the verification data generation module includes:
and the check data generation unit is used for generating a corresponding P check block for each disk array in the RAID card and generating global Q check block data of the RAID card by utilizing XOR operation.
Based on the foregoing embodiment, as a preferred embodiment, the check data generating unit is a unit configured to generate a P check block corresponding to a single redundancy check for each disk array in the RAID card, and generate corresponding global Q check block data by using an exclusive or operation on the RAID card.
Based on the foregoing embodiment, as a preferred embodiment, the internal check data generating unit is a unit configured to generate a P check block of a single redundancy check corresponding to the array according to an exclusive or operation of user data in the disk array.
Based on the foregoing embodiment, as a preferred embodiment, the internal check data generation unit is a unit configured to generate the global Q-check block data according to user data of all disk arrays in the RAID card.
Based on the above embodiment, as a preferred embodiment, the verification data generation unit includes:
and the global check subunit is used for generating the global Q-check block data according to the user data of all the disk arrays in the RAID card and the P-check blocks.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the data writing module is used for writing the user data and the internal verification data into a target physical disk.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the member disk determining module is used for determining the number of the member disks of the disk array in the RAID card according to the data volume of the user data.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the member disk configuration module is used for configuring the member disks of each disk array in the RAID card according to the number of the member disks by using the RAID card controller.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the disk determining submodule is used for determining a physical disk supporting the Q-check block in the member disk.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the first failure recovery module is used for recovering the lost user data by utilizing the internal check data if the user data is lost by the disk array due to media errors.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the second failure recovery module is used for recovering the lost user data by utilizing the global Q check block if the medium error occurs in a disk where the internal check data is located.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the third failure recovery module is used for recovering the data blocks on the failed member disk by utilizing the internal check data and the data blocks on the non-abnormal member disk if the failed member disk occurs in the disk array.
The present application further provides a computer-readable storage medium, on which a computer program is stored, which, when executed, can implement the steps provided by the above-mentioned embodiments. The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The present application further provides a storage device, which may include a memory and a processor, where the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the method provided in the foregoing embodiment may be implemented. Of course, the storage device may also include various network interfaces, power supplies, and the like. Referring to fig. 5, fig. 5 is a schematic structural diagram of a storage device according to an embodiment of the present disclosure, where the storage device according to the embodiment may include: a processor 2101 and a memory 2102.
Optionally, the storage device may also include a communication interface 2103, an input unit 2104, and a display 2105 and a communication bus 2106.
The processor 2101, the memory 2102, the communication interface 2103, the input unit 2104, the display 2105, and the like communicate with each other via the communication bus 2106.
In the embodiment of the present application, the processor 2101 may be a Central Processing Unit (CPU), an application specific integrated circuit (asic), a digital signal processor, an off-the-shelf programmable gate array (fpga) or other programmable logic device.
The processor may call a program stored in the memory 2102. In particular, the processor may perform the operations performed by the storage device in the above embodiments.
The memory 2102 stores one or more programs, which may include program code including computer operating instructions, and in this embodiment, at least one program for implementing the following functions is stored in the memory:
receiving an array creation task;
analyzing the array creating task and determining array command parameters;
determining the occupied capacity of the user data in the blocks according to the array command parameters;
judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity;
if yes, generating internal check data of a disk array in the RAID card and global Q check data corresponding to the RAID card by utilizing XOR operation; the internal check data comprises data block internal check data and check block internal check data.
In one possible implementation, the memory 2102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created during use of the computer.
Further, the memory 2102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid state storage device.
The communication interface 2103 may be an interface of a communication module, such as an interface of a GSM module.
The present application may also include a display 2105 and an input unit 2104, among others.
The structure of the storage device shown in fig. 5 does not constitute a limitation of the storage device in the embodiments of the present application, and in practical applications, the storage device may include more or less components than those shown in fig. 5, or some components may be combined.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, the present application can also make several improvements and modifications, and those improvements and modifications also fall into the protection scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.

Claims (17)

1. A method for constructing a RAID card is characterized by comprising the following steps:
receiving an array creation task;
analyzing the array creating task and determining array command parameters;
determining the occupied capacity of user data in the blocks according to the array command parameters;
judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity;
if yes, generating internal check data of a disk array in the RAID card and global Q check data corresponding to the RAID card by utilizing XOR operation; the internal check data comprises data block internal check data and check block internal check data.
2. The method of claim 1, wherein if the capacity of the disk array does not satisfy the sum of the occupied capacity and the check data capacity, further comprising:
generating an abnormal error report, and adding a minimum block size meeting the sum of the user data and the check data in the abnormal error report; the exception error report is used for indicating that the exception exists in the array command parameter included in the array creating task.
3. The method of claim 1, wherein determining the occupied capacity of user data in a block according to the array command parameter comprises:
and determining the occupied capacity of the user data in the blocks by using the RAID card controller according to the array command parameters.
4. The method according to claim 1, wherein generating internal check data of a disk array in the RAID card by using an exclusive or operation, and generating global Q check data corresponding to the RAID card includes:
and generating a corresponding P check block for each disk array in the RAID card, and generating global Q check block data of the RAID card by utilizing XOR operation.
5. The method of claim 1, wherein generating a corresponding P-parity chunk for each disk array in the RAID card, and generating global Q-parity chunk data for the RAID card using an exclusive or operation comprises:
generating P check blocks of single redundancy check corresponding to each disk array in the RAID card;
and generating corresponding global Q check block data by utilizing exclusive OR operation on the RAID card.
6. The method of claim 5, wherein generating the P-parity chunks for single redundancy check data protection for each array comprises:
and generating a P check block of single redundancy check corresponding to the array according to the XOR operation of the user data in the disk array.
7. The method of claim 5, wherein generating corresponding global Q-check chunk data for the RAID card using an XOR operation comprises:
and generating the global Q check block data according to the user data of all the disk arrays in the RAID card.
8. The method of claim 5, wherein generating corresponding global Q-check block data using an XOR operation on the RAID cards comprises:
and generating the global Q-check block data according to the user data of all the disk arrays in the RAID card and the P-check blocks.
9. The method of claim 1, wherein when determining the occupied capacity of the user data in the block according to the array command parameter, further comprising:
and determining the number of member disks of the disk array in the RAID card according to the data volume of the user data.
10. The method according to claim 9, wherein after configuring the member disks of each disk array in the RAID card according to the number of the member disks by using the RAID card controller, the method further comprises:
and determining a physical disk supporting the Q check block in the member disks.
11. The method of claim 1, wherein if the disk array loses user data due to a media error, further comprising:
recovering the lost user data using the internal parity data.
12. The method of claim 11, wherein if the media error occurs in a disk where data is internally verified, further comprising:
recovering the lost user data using the global Q-check block.
13. The method of building according to claim 1, further comprising:
and if the disk array has a fault member disk, recovering the data blocks on the fault member disk by using the internal check data and the data blocks on the non-abnormal member disk.
14. A RAID card construction system comprising:
the task receiving module is used for receiving the array creation task;
the parameter determining module is used for analyzing the array creating task and determining array command parameters;
the capacity determining module is used for determining the occupied capacity of the user data in the blocks according to the array command parameters;
the judging module is used for judging whether the capacity of the disk array meets the sum of the occupied capacity and the check data capacity;
the verification data generation module is used for generating internal verification data of a disk array in the RAID card and global Q verification data corresponding to the RAID card by utilizing XOR operation when the judgment result of the judgment module is yes; the internal check data comprises data block internal check data and check block internal check data.
15. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of a method of constructing a RAID card according to any one of the claims 1 to 13.
16. A storage device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for constructing a RAID card according to any one of claims 1 to 13 when calling the computer program in the memory.
17. A distributed storage system, characterized in that the distributed storage system is made up of several storage devices as claimed in claim 16.
CN202211554108.6A 2022-12-06 2022-12-06 Method, system and related device for constructing RAID card Active CN115562594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211554108.6A CN115562594B (en) 2022-12-06 2022-12-06 Method, system and related device for constructing RAID card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211554108.6A CN115562594B (en) 2022-12-06 2022-12-06 Method, system and related device for constructing RAID card

Publications (2)

Publication Number Publication Date
CN115562594A true CN115562594A (en) 2023-01-03
CN115562594B CN115562594B (en) 2023-03-24

Family

ID=84769713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211554108.6A Active CN115562594B (en) 2022-12-06 2022-12-06 Method, system and related device for constructing RAID card

Country Status (1)

Country Link
CN (1) CN115562594B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116027991A (en) * 2023-03-29 2023-04-28 苏州浪潮智能科技有限公司 RAID array management method and device, RAID card and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1655126A (en) * 2004-02-11 2005-08-17 鸿富锦精密工业(深圳)有限公司 Disk faulttolerant system and method
CN101055511A (en) * 2007-05-16 2007-10-17 华为技术有限公司 Memory array system and its data operation method
US20090210742A1 (en) * 2008-02-18 2009-08-20 Dell Products L.P. Methods, systems and media for data recovery using global parity for multiple independent RAID levels
CN103488432A (en) * 2013-09-16 2014-01-01 哈尔滨工程大学 Hybrid disk array, deferred write verification method for hybrid disk array, and data recovery method for hybrid disk array
CN104714758A (en) * 2015-01-19 2015-06-17 华中科技大学 Method for building array by adding mirror image structure to check-based RAID and read-write system
CN105022586A (en) * 2014-04-17 2015-11-04 中国移动通信集团公司 Method, device, and system for data processing
CN109739436A (en) * 2018-12-19 2019-05-10 河南创新科信息技术有限公司 RAID reconstruction method, storage medium and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1655126A (en) * 2004-02-11 2005-08-17 鸿富锦精密工业(深圳)有限公司 Disk faulttolerant system and method
CN101055511A (en) * 2007-05-16 2007-10-17 华为技术有限公司 Memory array system and its data operation method
US20090210742A1 (en) * 2008-02-18 2009-08-20 Dell Products L.P. Methods, systems and media for data recovery using global parity for multiple independent RAID levels
CN103488432A (en) * 2013-09-16 2014-01-01 哈尔滨工程大学 Hybrid disk array, deferred write verification method for hybrid disk array, and data recovery method for hybrid disk array
CN105022586A (en) * 2014-04-17 2015-11-04 中国移动通信集团公司 Method, device, and system for data processing
CN104714758A (en) * 2015-01-19 2015-06-17 华中科技大学 Method for building array by adding mirror image structure to check-based RAID and read-write system
CN109739436A (en) * 2018-12-19 2019-05-10 河南创新科信息技术有限公司 RAID reconstruction method, storage medium and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116027991A (en) * 2023-03-29 2023-04-28 苏州浪潮智能科技有限公司 RAID array management method and device, RAID card and storage medium
CN116027991B (en) * 2023-03-29 2023-09-19 苏州浪潮智能科技有限公司 RAID array management method and device, RAID card and storage medium

Also Published As

Publication number Publication date
CN115562594B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
KR101758544B1 (en) Synchronous mirroring in non-volatile memory systems
US8082465B1 (en) Auto-adapting cache memory system and method
US10025666B2 (en) RAID surveyor
US5581690A (en) Method and apparatus for preventing the use of corrupt data in a multiple disk raid organized storage system
EP0768605A2 (en) Reconstructing data blocks in a RAID array data storage system having storage device metadata and RAIDset metada
US20140372838A1 (en) Bad disk block self-detection method and apparatus, and computer storage medium
US8489916B2 (en) Multi-disk fault-tolerant system, method for generating a check block, and method for recovering a data block
US20090113235A1 (en) Raid with redundant parity
CN102024059B (en) Method and device for protecting redundant array of independent disk in file system
KR100711165B1 (en) Apparatus, method and recording medium for the control of storage
CN103534688A (en) Data recovery method, storage equipment and storage system
US20070101188A1 (en) Method for establishing stable storage mechanism
CN103513942A (en) Method and device for reconstructing independent redundancy array of inexpensive disks
CN108701005A (en) Data update technology
JP2006139478A (en) Disk array system
CN105468479A (en) Method and device for processing bad blocks of redundant array of independent disk (RAID)
CN115562594B (en) Method, system and related device for constructing RAID card
CN117111860B (en) IO processing method and device during disk array degradation and electronic equipment
CN116339644B (en) Method, device, equipment and medium for creating redundant array of independent disk
CN114415968B (en) Storage system and data writing method thereof
CN112328182B (en) RAID data management method, device and computer readable storage medium
JP3699473B2 (en) Disk array device
CN111897676A (en) File backup method and device based on database index
JP2004164675A (en) Disk array device
US11640337B2 (en) Data recovery of distributed data using redundant codes

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