WO2021072917A1 - 一种raid的写洞保护方法、系统及存储介质 - Google Patents
一种raid的写洞保护方法、系统及存储介质 Download PDFInfo
- Publication number
- WO2021072917A1 WO2021072917A1 PCT/CN2019/121096 CN2019121096W WO2021072917A1 WO 2021072917 A1 WO2021072917 A1 WO 2021072917A1 CN 2019121096 W CN2019121096 W CN 2019121096W WO 2021072917 A1 WO2021072917 A1 WO 2021072917A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- log
- striped
- raid
- data
- data block
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1076—Parity data used in redundant arrays of independent storages, e.g. in RAID systems
- G06F11/1096—Parity calculation or recalculation after configuration or reconfiguration of the system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1076—Parity data used in redundant arrays of independent storages, e.g. in RAID systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1076—Parity data used in redundant arrays of independent storages, e.g. in RAID systems
- G06F11/1084—Degraded mode, e.g. caused by single or multiple storage removals or disk failures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1456—Hardware arrangements for backup
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
Definitions
- the invention relates to the technical field of computer data storage, in particular to a RAID write hole protection method, system and storage medium.
- RAID Redundant Array Of Independent Disks
- RAID5 and RAID6 have a higher comprehensive value in terms of available capacity and performance, and are the most widely used.
- the stripe includes multiple conventional data blocks and a parity data block, and each data block is stored in a different RAID member disk, such as a stripe.
- a different RAID member disk such as a stripe.
- the data blocks of the failed member disk can be calculated based on other member disks. For example, if member disk 1 fails, it can be based on the regular data blocks in member disks 2 to 4 and member disk 5.
- the check data block in the restores the data block in the No. 1 member disk. After one member disk fails, and before repairing, RAID5 is in a degraded state.
- RAID6 Compared with RAID5, which allows one member disk to fail, a strip of RAID6 has two parity data blocks, and at most two member disks are allowed to fail. The reason for the "write hole” problem is the same as that of RAID5, so I won’t repeat it. .
- the purpose of the present invention is to provide a RAID write hole protection method, system and storage medium to avoid the RAID write hole problem.
- the present invention provides the following technical solutions:
- a RAID write hole protection method including:
- each data block to be written in the strip includes the data block to be written to the failed member disk;
- the log area is used to perform data repair.
- the method further includes: saving related information of the backup operation to form a striped log;
- said using the log area to perform data restoration includes:
- Each valid strip log is determined by the associated information of each strip log in the log area, and data restoration is performed based on the determined each valid strip log.
- the saved associated information includes at least: the strip sequence number and the log number of the strip log;
- the determination of each valid striped log through the associated information of each striped log in the log area includes:
- each striped log in the log area is traversed, and for each striped log with the same strip sequence number, the striped log with the largest log number is taken as the effective striped log.
- the saved associated information includes at least: the strip sequence number, log number, and strip log check value of the strip log;
- the determination of each valid striped log through the associated information of each striped log in the log area includes:
- the striped log with the largest log number is taken as the effective striped log.
- the saved associated information includes at least: the strip serial number, log number, strip log check value, and log version number of the strip log;
- the method further includes: updating the log area version number in the overall information recorded in the log area;
- the determination of each valid striped log through the associated information of each striped log in the log area includes:
- the striped log with the largest log number is taken as the effective striped log.
- the performing data repair based on each of the determined valid strip logs includes:
- each data block to be written is written to the corresponding healthy member disk to complete data repair.
- the preset log area includes:
- a space of a preset size is divided from each member disk of the RAID, and the set log area is formed by each divided space.
- the preset log area includes:
- the log area is set by a solid state disk other than the RAID member disk.
- a RAID write hole protection system including:
- the log area setting module is used to set the log area in advance, and set the log area to the active state after the RAID is degraded;
- the first judging module is configured to judge whether the data block of the failed member disk of the RAID in the stripe is parity data each time before the stripe write operation is performed when the log area is in the enabled state Piece;
- the second judgment module is configured to judge whether each data block to be written in the stripe includes the data block to be written to the failed member disk;
- trigger the first backup module if not included, trigger the second backup module;
- the first backup module is configured to back up data blocks to be written to the failed member disk in the log area
- the second backup module is configured to calculate the data block of the failed member disk according to the RAID algorithm and perform backup in the log area, or back up each data block to be written in the log area;
- the data repair module is configured to use the log area to perform data repair when the degraded RAID is started after a failure.
- a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, implements the steps of the RAID write hole protection method described in any one of the above items.
- the application of the technical solution provided by the embodiment of the present invention does not involve communication between multiple controllers, that is, the solution of the present application can be applied to a single-controller scenario or a multiple-controller scenario.
- the log area is preset. After the RAID is degraded, the log area is set to the enabled state, and the corresponding backup operation is performed before the stripe write operation is performed each time, thereby avoiding the write hole problem.
- the backup is an overall backup, that is, the data blocks of the failed member disk can be obtained directly through the log area, and the data is correct.
- the data blocks of other healthy member disks can be read, combined with the data blocks of the failed member disks that were backed up, to calculate the correct check data block to avoid errors in the check data block. If each data block to be written is backed up, that is, the data block to be written to a healthy member disk is backed up, indicating that the write operation does not involve a failed member disk, you can directly backup each data block to be written Write to the corresponding healthy member disk so that the data of each healthy member disk is correct data. Therefore, the solution of the present application avoids the write hole problem of RAID.
- Figure 1 is an implementation flow chart of a RAID write hole protection method in the present invention
- Figure 2 is a schematic diagram of the structure of a RAID write hole protection system in the present invention.
- the core of the present invention is to provide a RAID write hole protection method, which avoids the RAID write hole problem.
- Figure 1 is a flowchart of an implementation of a RAID write hole protection method in the present invention.
- the RAID write hole protection method may include the following steps:
- Step S101 Pre-set a log area, and set the log area to an enabled state after the RAID is degraded.
- the log area can be set based on each member disk of the RAID, or other hard disks other than the RAID member disks can be used as the log space.
- the preset log area may be specifically: a space of a preset size is divided from each member disk of the RAID, and the set log area is formed by each divided space.
- a space is divided from each hard disk in the RAID, and these spaces can constitute the set log area.
- the set log area is in the inactive state.
- the log area needs to be set to the enabled state. It is understandable that after the RAID is degraded, a log area that can be used is composed of the corresponding space of each healthy disk, so as to perform data backup in the subsequent steps based on the log area.
- the log area is set based on each member disk of the RAID, which has low cost and is convenient for implementation of the solution.
- solid state disks other than RAID member disks may also be used to set the log area, for example, a higher-performance NVME solid state disk, a 3D NAND solid state disk with higher performance and lifespan, etc. may be used.
- Step S102 When the log area is in the enabled state, each time before performing a stripe write operation, it is determined whether the data block in the stripe of the failed member disk of the RAID is a parity data block. If not, step S103 is executed.
- each regular data block in the data block to be written can be written to the corresponding healthy member disk.
- the stripe write operation can be directly started.
- Step S103 Determine whether each data block to be written in the stripe includes the data block to be written to the failed member disk. If it is included, step S104 is executed, and if it is not included, step S105 is executed.
- the data block in the stripe of the failed member disk of the RAID is not a parity data block, indicating that it is a regular data block, but every time a stripe write operation is performed, the regular data involved in the stripe write operation Blocks can be different.
- a strip includes data blocks No. 1 to No. 5, of which No. 1 to No. 4 are regular data blocks, which are sequentially stored in member disks No. 1 to No. 4, and No. 5 is a checksum.
- the data block is stored in the No. 5 member disk.
- the stripe write operation needs to write data blocks No. 1, No. 2, and No. 3 to the corresponding member disk, and assuming that the invalid member disk is No. 1, then you can It is determined that each data block to be written includes the data block to be written to the failed member disk.
- the stripe write operation needs to write data blocks No. 2 and No. 4 to the corresponding member disks, and assuming that the failed member disk is No. 1, you can determine each The data block to be written does not include the data block to be written to the failed member disk.
- Step S104 Back up the data blocks to be written to the failed member disk in the log area.
- the stripe write operation needs to write data blocks No. 1, No. 2 and No. 3 into the corresponding member disks, that is, the data blocks to be written are No. 1, No. 2 and No. 3, of which No. 1
- the data block is the data block to be written to the failed member disk, and the data block No. 1 is backed up in the log area.
- Step S105 Calculate the data block of the failed member disk according to the RAID algorithm and perform backup in the log area, or back up each data block to be written in the log area.
- Step S105 discloses two backup methods after step S105 is triggered. In actual applications, which one is specifically selected can be selected according to actual needs, and can also be switched at any time. No matter which one is selected, subsequent data restoration can be achieved.
- a strip includes data blocks 1 to 5, of which numbers 1 to 4 are regular data blocks, which are sequentially stored in member disks 1 to 4, and number 5 is the check data block stored in 5.
- No. member in the plate For example, when a stripe write operation is performed, the stripe write operation needs to write data blocks No. 1, No. 2, and No. 5 into the corresponding member disks. Assuming that the invalid member disk is No. 4, it indicates that each is waiting. The written data block does not include the data block to be written to the failed member disk.
- a backup method is based on the RAID algorithm, which is to calculate the data block of the failed member disk based on the data block No. 1, No. 2 and No. 5 to be written, combined with the No. 3 data block, that is, calculate the No. 4 The data block of the member disk, and then the calculated data block of the No. 4 member disk is backed up in the log area.
- Another backup method is to directly back up each data block to be written in the log area.
- the data blocks No. 1, 2, and 5 to be written are directly backed up in the log area.
- the stripe writing operation can be performed this time. That is, for any stripe writing operation, after determining the data block that needs to be backed up for the stripe writing operation and completing the backup, the current stripe writing operation can be executed.
- every time a data block is backed up in the log area it may also include: saving the associated information of the backup operation to form a striped log.
- each valid stripe log can be determined from the associated information of each stripe log in the log area, and data can be restored based on the determined valid stripe logs.
- Associated information refers to the relevant parameter data generated when the data block is backed up, and the specific items included can be set and adjusted as needed.
- each data block in this backup and the corresponding associated information constitute a striped log.
- the saved associated information includes at least: the strip sequence number and the log number of the striped log.
- each striped log in the log area is traversed, and for each striped log with the same strip sequence number, the striped log with the largest log number is taken as the effective striped log.
- one or more write operations may be performed, that is, there may be multiple stripe logs that are for the same stripe, so the log number and stripe The serial number is used to distinguish.
- the stripe serial number refers to the serial number of the stripe targeted by the stripe log in the RAID, that is, the corresponding stripe and the start and end sectors of the corresponding member disk can be found according to the stripe serial number .
- the log number in this embodiment is an incremental number, so as to identify the sequence of each striped log for the same strip, that is, when the strip sequence numbers are the same, the striped log with the largest log number is the valid log.
- other non-incremental log numbers can also be used, and the sequence of each striped log for the same strip can be distinguished, which does not affect the implementation of the present invention.
- the saved associated information includes at least: the strip sequence number, the log number, and the strip log check value of the strip log;
- determining each valid striped log through the associated information of each striped log in the log area may specifically include the following two steps:
- the first step traverse the associated information of each striped log in the log area, and filter the incomplete striped logs according to the striped log check value in each associated information;
- the second step For each striped log with the same strip sequence number after filtering, the striped log with the largest log number is taken as the effective striped log.
- the associated information also includes the stripe log check value, so that it can be determined based on the stripe log check value whether the data block in the stripe log is complete, and the used check algorithm can choose the public check value.
- Check algorithm such as CRC32 check algorithm. Because the stripe log check value is added to the associated information in this embodiment, each incomplete stripe log is filtered, which is conducive to timely detection of stripe log abnormalities, which in turn is conducive to the accuracy of data repair.
- the saved associated information includes at least: the strip sequence number, log number, strip log check value, and log version number of the strip log;
- step S106 after step S106, it also needs to include: updating the log area version number in the overall information recorded in the log area. That is, the version number of the log area needs to be updated after the repair is completed.
- determining each valid striped log through the associated information of each striped log in the log area may specifically include the following three steps:
- the first step traverse the associated information of each striped log in the log area, and filter each striped log whose log version number does not match the version number of the log area in the current log area;
- the second step filter each incomplete strip log according to the strip log check value in each associated information
- the third step Regarding the filtered striped logs with the same strip sequence number, the striped log with the largest log number is taken as the effective striped log.
- the RAID may still be in a degraded state, that is, the staff may not be able to restore the failed disk to the healthy disk in time. Therefore, the RAID needs to continue to be Write hole protection is performed in the degraded state, that is, the log area will continue to back up the data block to generate the corresponding striped log. Therefore, in order to distinguish which striped logs have been used before and which have not been used, in this embodiment, the log version number is included in the associated information, and the log version number needs to be the same as the log in the overall information. Use in conjunction with the district version number.
- log area version number is used in conjunction with the log version number of each striped log to determine which striped logs are unused striped logs. The description here is not used, that is, data repair has not been performed based on the striped log.
- the log area is enabled, and 16 striped write operations are performed, and 16 striped logs are backed up in the log area accordingly.
- the log version number of each striped log is, for example, 001
- the version number of the log area is also 001.
- data repair is performed based on these 16 striped logs.
- the version number of the log area is updated, for example, changed to 002.
- 20 stripe write operations are performed, and 20 stripe logs are backed up in the log area, and the log of each stripe log
- the version numbers are both 002.
- the specific process can be: first you can change the log version Each striped log whose number does not match the log area version number in the current log area is filtered, that is, 16 striped logs with log version number 001 are filtered out, and then the striped log check value in each associated information is filtered out. , Filter each incomplete striped log in the remaining 20 striped logs, for example, filter 3 incomplete striped logs, leaving 17 striped logs.
- the striped log with the largest log number is taken as the effective striped log. For example, there are 3 striped logs in the 17 striped logs. The strip sequence numbers with logs are the same, and the strip sequence numbers of the remaining 14 strip logs are different, and finally 15 valid strip logs can be determined. After repairing with these 15 striped logs, the version number of the log area can be adjusted to 003.
- the log area version number is updated after each repair, so as to cooperate with the log version number to determine which striped logs have been used.
- the version number of the log area when updated, it is incrementally updated, that is, by one.
- other update methods can also be used, as long as the log area version number is different from the version number of each historical log area after the update, for example, the value of the log area version number can be increased by 2 each time, another example is , You can use a larger random number to update and so on.
- the associated information may also include other parameters, for example, the log size of the striped log may also be included, and the log size represents the continuous occupied space size of the striped log. It should be noted that because the striped log is composed of backed up data blocks and corresponding associated information, the log size includes the backed up data blocks and associated information, that is, the size of the entire striped log. For another example, the associated information may also include the member disk number, data length, and so on.
- the overall information in the log area can also include other parameters.
- the overall information also includes: the enabled status of the log area, the size of the log space, the start address of the striped log, and the size of the striped log space. , The number of striped log alignment areas and log area check value, etc., so that the staff can quickly and conveniently learn the status of the log area based on the overall information.
- the enabled status of the log area is used to indicate whether the log area is enabled, that is, after the RAID is degraded, the log area is enabled, and it is not enabled if it is not degraded.
- the RAID type is not RAID5 or RAID6, it is not enabled.
- the striped log space is a fixed value, and the striped log space plus the space occupied by the overall information is the log space size.
- the start address of the striped log refers to the start address of the first striped log.
- the size of the striped log space is divided by the number of striped log alignment areas to get the size of each log alignment area.
- the stripe log space size is 2G
- the preset number of stripe log alignment areas is 1024, for example, then the size of each log alignment area is 2M.
- the meaning of 2M means that the 2M space is used to store one or more There are two striped logs, but there will be no striped logs that cross this 2M space, that is, the head of each log alignment area is the start and end position of a certain striped log. In this way, the start address of each log alignment area is aligned with the start address of the corresponding striped log, so that the striped log can be located and searched more quickly.
- the log area check value can realize the verification of the data integrity of the log area.
- Step S106 When the degraded RAID is started after a failure, the log area is used to perform data repair.
- the data can be repaired according to each striped log in the log area.
- the data repairing method used can be different.
- each valid stripe log can usually be determined through the associated information of each stripe log in the log area, and based on the determined individual stripe logs. Effective striped logs for data repair. After the repair is completed, the overall information of the log area can be reinitialized, and specifically, the version number of the log area can be updated.
- each data block to be written is backed up in the striped log, that is, when the data block to be written to a healthy member disk is backed up, it indicates that the striped log corresponds to
- the write operation does not involve the failed member disk, you can directly write each data block of the backup to the corresponding healthy member disk, so that the data of each healthy member disk is the correct data, so that the correct data is determined based on the correct healthy member disk
- the data block of the failed member disk is naturally correct, thus avoiding the write hole problem.
- the log area takes up a lot of space.
- the backup is an overall backup, that is, the data blocks of the failed member disks can be obtained directly through the striped log, so the write hole problem can also be avoided.
- the correct check data block can be calculated, and the check data block can be written into the check disk to make the check
- the data on the disk is accurate data. After that, if you want to obtain the data block of the failed member disk, it can be accurately calculated through each healthy member disk.
- the application can also obtain correct data on the failed member disk.
- performing data repair based on each valid strip log determined may specifically include:
- Step 1 For any valid striped log in the log area, when the striped log backs up the data blocks of the failed member disk, based on the backup data in the striped log and the read data of each member disk Calculate the check block data from the data, and use the calculated check block data to repair the check disk data;
- Step 2 For any valid striped log in the log area, when the striped log backs up each data block to be written, write each data block to be written to the corresponding healthy member disk to complete Data repair.
- this implementation manner can perform data verification and repair of the verification disk based on the backup data. That is, read the data blocks of each other healthy member disk, and combine the data blocks of the failed member disks backed up in the striped log to calculate the correct check data block.
- the calculated check block data can be directly written into the check disk, so that the data block of the failed member disk can be accurately determined from the data block of each healthy member disk in the future. , Realize write hole protection.
- the check data block can also be read from the check disk first. If the calculated check data block is the same as the read check data If the blocks are inconsistent, it means that the check data block on the check disk is wrong, and event recording can be performed. After recording, the calculated check block data is written to the check disk.
- the data block of the failed disk can be calculated based on the data blocks backed up in the striped log and the data blocks of other member disks, which is marked as A. Read the data blocks of the strip on all healthy member disks and then calculate the data blocks of the failed disk, denoted as B. If A and B are different, it means that the data block on the healthy member disk is wrong.
- the data block is written to the corresponding healthy member disk to complete the data repair.
- the reason for the error is the data error of the check disk.
- the application of the technical solution provided by the embodiment of the present invention does not involve communication between multiple controllers, that is, the solution of the present application can be applied to a single-controller scenario or a multiple-controller scenario.
- the log area is preset. After the RAID is degraded, the log area is set to the enabled state, and the corresponding backup operation is performed before the stripe write operation is performed each time, thereby avoiding the write hole problem.
- the backup is an overall backup, that is, the data blocks of the failed member disk can be obtained directly through the log area, and the data is correct.
- the data blocks of other healthy member disks can be read, combined with the data blocks of the failed member disks that were backed up, to calculate the correct check data block to avoid errors in the check data block. If each data block to be written is backed up, that is, the data block to be written to a healthy member disk is backed up, indicating that the write operation does not involve a failed member disk, you can directly backup each data block to be written Write to the corresponding healthy member disk so that the data of each healthy member disk is correct data.
- the embodiment of the present invention also provides a RAID write hole protection system, which can be cross-referenced with the above.
- FIG. 2 is a schematic structural diagram of a RAID write hole protection system in the present invention, including:
- the log area setting module 201 is used to set the log area in advance, and set the log area to an active state after the RAID is degraded;
- the first judgment module 202 is configured to judge whether the data block of the failed member disk of the RAID in the stripe is a parity data block each time before performing a stripe write operation when the log area is in the enabled state;
- the second judging module 203 is used to judge whether each data block to be written in the strip includes the data block to be written to the failed member disk;
- trigger the first backup module 204 if not included, trigger the second backup module 205;
- the first backup module 204 is configured to back up data blocks to be written to the failed member disk in the log area;
- the second backup module 205 is configured to calculate the data block of the failed member disk according to the RAID algorithm and perform backup in the log area, or back up each data block to be written in the log area;
- the data repair module 206 is configured to use the log area to repair data when the degraded RAID is started after a failure.
- a striped log generation module is further included, which is used to: each time a data block is backed up in the log area, save the associated information of the backup operation to form a stripe.
- the data repair module 206 is specifically configured to: when the degraded RAID is started after a failure, determine each valid striped log through the associated information of each striped log in the log area, and Perform data repair based on each valid stripe log determined.
- the associated information saved by the log generation module includes at least: the strip sequence number and the log number of the strip log;
- the data repair module 206 is specifically used for:
- the associated information of each striped log in the log area is traversed, and for each striped log with the same strip sequence number, the striped log with the largest log number is taken as the valid Striped log.
- the associated information saved by the log generation module includes at least: the strip sequence number, log number, and strip log check value of the strip log;
- the data repair module 206 is specifically used for:
- the associated information of each striped log in the log area is traversed, and the incomplete striped logs are filtered according to the striped log check value in each associated information ;
- the striped log with the largest log number is taken as the effective striped log.
- the associated information saved by the log generation module includes at least: the strip sequence number, log number, strip log check value, and log version number of the strip log;
- the log area After the log area is used for data restoration, it also includes a log area version number update module, which is used to restore the log in the overall information recorded in the log area after the data restoration module 206 uses the log area to perform data restoration. Update the district version number;
- the data repair module 206 is specifically used for:
- the striped log with the largest log number is taken as the effective striped log.
- the data repair module 206 is specifically used for:
- the log area setting module 201 is specifically configured to:
- a space of a preset size is divided from each member disk of the RAID, and the set log area is formed by each divided space.
- the log area setting module 201 is specifically configured to:
- the log area is set by a solid state disk other than the RAID member disk.
- the embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
- a computer program is stored on the computer-readable storage medium.
- the computer program is executed by a processor, the RAID The steps of the write hole protection method.
- the computer-readable storage medium mentioned here includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, Or any other form of storage medium known in the technical field.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (10)
- 一种RAID的写洞保护方法,其特征在于,包括:预先设定日志区,并在RAID降级之后,将所述日志区设置为启用状态;在所述日志区为启用状态下,每次在执行条带写入操作之前,均判断所述RAID的失效成员盘在该条带中的数据块是否为校验数据块;如果不是校验数据块,则判断该条带的各个待写入的数据块中是否包括待写入所述失效成员盘的数据块;如果包括,则在所述日志区中备份待写入所述失效成员盘的数据块;如果不包括,则根据RAID算法计算出所述失效成员盘的数据块并在所述日志区中进行备份,或者在所述日志区中备份各个待写入的数据块;在降级后的所述RAID经过故障之后启动时,利用所述日志区进行数据修复。
- 根据权利要求1所述的RAID的写洞保护方法,其特征在于,每次在所述日志区中进行数据块的备份时,还包括:保存该次备份操作的关联信息以构成一个条带日志;相应的,所述利用所述日志区进行数据修复,包括:通过所述日志区中的各个条带日志的关联信息确定出每一个有效的条带日志,并基于确定出的各个有效的条带日志进行数据修复。
- 根据权利要求2所述的RAID的写洞保护方法,其特征在于,保存的关联信息中至少包括:该条带日志的条带序号以及日志编号;相应的,所述通过所述日志区中的各个条带日志的关联信息确定出每一个有效的条带日志,包括:遍历所述日志区中的各个条带日志的关联信息,并且针对具有相同的条带序号的各个条带日志,将日志编号最大的条带日志作为有效的条带日志。
- 根据权利要求2所述的RAID的写洞保护方法,其特征在于,保存的关联信息中至少包括:该条带日志的条带序号、日志编号以及条带日志校验值;相应的,所述通过所述日志区中的各个条带日志的关联信息确定出每一个有效的条带日志,包括:遍历所述日志区中的各个条带日志的关联信息,并根据各个关联信息中的条带日志校验值,将不完整的各个条带日志进行过滤;针对过滤后的具有相同的条带序号的各个条带日志,将日志编号最大的条带日志作为有效的条带日志。
- 根据权利要求2所述的RAID的写洞保护方法,其特征在于,保存的关联信息中至少包括:该条带日志的条带序号、日志编号、条带日志校验值以及日志版本号;在利用所述日志区进行数据修复之后,还包括:将所述日志区中记录的总体信息中的日志区版本号进行更新;相应的,所述通过所述日志区中的各个条带日志的关联信息确定出每一个有效的条带日志,包括:遍历所述日志区中的各个条带日志的关联信息,将日志版本号不符合当前的所述日志区中的日志区版本号的各个条带日志进行过滤;根据各个关联信息中的条带日志校验值,将不完整的各个条带日志进行过滤;针对过滤后的具有相同的条带序号的各个条带日志,将日志编号最大的条带日志作为有效的条带日志。
- 根据权利要求2至5任一项所述的RAID的写洞保护方法,其特征在于,所述基于确定出的各个有效的条带日志进行数据修复,包括:针对日志区中的任意一个有效的条带日志,当该条带日志备份的是失效成员盘的数据块时,基于该条带日志中的备份数据以及读取到的各个成员盘的数据计算出检验块数据,并利用计算出的所述校验块数据进行校验盘的数据修复;针对日志区中的任意一个有效的条带日志,当该条带日志备份的是各个待写入的数据块时,将各个待写入的数据块写入相应的健康成员盘中完成数据修复。
- 根据权利要求1所述的RAID的写洞保护方法,其特征在于,所述 预先设定日志区,包括:从所述RAID的每块成员盘中均划分出预设大小的空间,并通过划分出的各个空间构成设定的所述日志区。
- 根据权利要求1所述的RAID的写洞保护方法,其特征在于,所述预先设定日志区,包括:利用所述RAID成员盘之外的固态盘设定所述日志区。
- 一种RAID的写洞保护系统,其特征在于,包括:日志区设定模块,用于预先设定日志区,并在RAID降级之后,将所述日志区设置为启用状态;第一判断模块,用于在所述日志区为启用状态下,每次在执行条带写入操作之前,均判断所述RAID的失效成员盘在该条带中的数据块是否为校验数据块;如果不是校验数据块,则触发第二判断模块;所述第二判断模块,用于判断该条带的各个待写入的数据块中是否包括待写入所述失效成员盘的数据块;如果包括,则触发第一备份模块,如果不包括,则触发第二备份模块;所述第一备份模块,用于在所述日志区中备份待写入所述失效成员盘的数据块;所述第二备份模块,用于根据RAID算法计算出所述失效成员盘的数据块并在所述日志区中进行备份,或者在所述日志区中备份各个待写入的数据块;数据修复模块,用于在降级后的所述RAID经过故障之后启动时,利用所述日志区进行数据修复。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述的RAID的写洞保护方法的步骤。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/642,643 US11650880B2 (en) | 2019-10-18 | 2019-11-27 | Write hole protection method and system for raid, and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910995233.2A CN110795273B (zh) | 2019-10-18 | 2019-10-18 | 一种raid的写洞保护方法、系统及存储介质 |
CN201910995233.2 | 2019-10-18 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021072917A1 true WO2021072917A1 (zh) | 2021-04-22 |
Family
ID=69439329
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/121096 WO2021072917A1 (zh) | 2019-10-18 | 2019-11-27 | 一种raid的写洞保护方法、系统及存储介质 |
Country Status (3)
Country | Link |
---|---|
US (1) | US11650880B2 (zh) |
CN (1) | CN110795273B (zh) |
WO (1) | WO2021072917A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024113687A1 (zh) * | 2022-11-29 | 2024-06-06 | 苏州元脑智能科技有限公司 | 一种数据恢复方法及相关装置 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112181298B (zh) * | 2020-09-25 | 2022-05-17 | 杭州宏杉科技股份有限公司 | 阵列访问方法、装置、存储设备及机器可读存储介质 |
CN113626248B (zh) * | 2021-06-30 | 2023-07-18 | 苏州浪潮智能科技有限公司 | 一种raid中条带数据不一致的修复方法和系统 |
CN113791731A (zh) * | 2021-08-26 | 2021-12-14 | 深圳创云科软件技术有限公司 | 一种解决存储磁盘阵列Write Hole的处理方法 |
CN115599607B (zh) * | 2022-11-29 | 2023-06-16 | 苏州浪潮智能科技有限公司 | 一种raid阵列的数据恢复方法及相关装置 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104035830A (zh) * | 2014-06-24 | 2014-09-10 | 浙江宇视科技有限公司 | 一种数据恢复方法和装置 |
CN104407821A (zh) * | 2014-12-12 | 2015-03-11 | 浪潮(北京)电子信息产业有限公司 | 一种实现raid重构的方法及装置 |
CN104881242A (zh) * | 2014-02-28 | 2015-09-02 | 中兴通讯股份有限公司 | 数据写入方法及装置 |
CN106062721B (zh) * | 2014-12-31 | 2018-11-16 | 华为技术有限公司 | 一种将数据写入存储系统的方法和存储系统 |
CN109725831A (zh) * | 2017-10-27 | 2019-05-07 | 伊姆西Ip控股有限责任公司 | 管理存储系统的方法、系统和计算机程序产品 |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090300282A1 (en) * | 2008-05-30 | 2009-12-03 | Promise Technology, Inc. | Redundant array of independent disks write recovery system |
CN102023809B (zh) * | 2009-09-21 | 2012-10-17 | 成都市华为赛门铁克科技有限公司 | 存储系统、从存储系统读取数据的方法及写入数据的方法 |
US8839028B1 (en) * | 2011-12-23 | 2014-09-16 | Emc Corporation | Managing data availability in storage systems |
CN102968361A (zh) * | 2012-11-19 | 2013-03-13 | 浪潮电子信息产业股份有限公司 | 一种raid数据自修复的方法 |
CN104407813B (zh) * | 2014-11-20 | 2019-02-19 | 上海宝存信息科技有限公司 | 一种基于固态存储介质的raid系统及方法 |
CN107273046B (zh) * | 2017-06-06 | 2019-08-13 | 华中科技大学 | 一种基于固态盘阵列的数据处理方法及系统 |
CN110413205B (zh) * | 2018-04-28 | 2023-07-07 | 伊姆西Ip控股有限责任公司 | 用于向磁盘阵列进行写入的方法、设备和计算机可读存储介质 |
CN110413439B (zh) * | 2018-04-28 | 2023-10-20 | 伊姆西Ip控股有限责任公司 | 用于检测数据的不完整写入的方法、设备和计算机可读介质 |
-
2019
- 2019-10-18 CN CN201910995233.2A patent/CN110795273B/zh active Active
- 2019-11-27 US US17/642,643 patent/US11650880B2/en active Active
- 2019-11-27 WO PCT/CN2019/121096 patent/WO2021072917A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104881242A (zh) * | 2014-02-28 | 2015-09-02 | 中兴通讯股份有限公司 | 数据写入方法及装置 |
CN104035830A (zh) * | 2014-06-24 | 2014-09-10 | 浙江宇视科技有限公司 | 一种数据恢复方法和装置 |
CN104407821A (zh) * | 2014-12-12 | 2015-03-11 | 浪潮(北京)电子信息产业有限公司 | 一种实现raid重构的方法及装置 |
CN106062721B (zh) * | 2014-12-31 | 2018-11-16 | 华为技术有限公司 | 一种将数据写入存储系统的方法和存储系统 |
CN109725831A (zh) * | 2017-10-27 | 2019-05-07 | 伊姆西Ip控股有限责任公司 | 管理存储系统的方法、系统和计算机程序产品 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024113687A1 (zh) * | 2022-11-29 | 2024-06-06 | 苏州元脑智能科技有限公司 | 一种数据恢复方法及相关装置 |
Also Published As
Publication number | Publication date |
---|---|
US11650880B2 (en) | 2023-05-16 |
CN110795273B (zh) | 2021-06-15 |
US20220350703A1 (en) | 2022-11-03 |
CN110795273A (zh) | 2020-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021072917A1 (zh) | 一种raid的写洞保护方法、系统及存储介质 | |
US9189311B2 (en) | Rebuilding a storage array | |
JP5768587B2 (ja) | ストレージシステム、ストレージ制御装置およびストレージ制御方法 | |
US8700951B1 (en) | System and method for improving a data redundancy scheme in a solid state subsystem with additional metadata | |
JP2959901B2 (ja) | 記憶装置の冗長アレイおよびオンライン再構成方法 | |
CN102184129B (zh) | 磁盘阵列的容错方法和装置 | |
US8356292B2 (en) | Method for updating control program of physical storage device in storage virtualization system and storage virtualization controller and system thereof | |
JPWO2006123416A1 (ja) | ディスク故障復旧方法及びディスクアレイ装置 | |
JP4792490B2 (ja) | 記憶制御装置及びraidグループの拡張方法 | |
TWI295021B (en) | Storage system and method for handling bad storage device data therefor | |
US8041891B2 (en) | Method and system for performing RAID level migration | |
JP2005122338A (ja) | スペアディスクドライブをもつディスクアレイ装置及びデータスペアリング方法 | |
JP2016512365A (ja) | 不揮発性メモリシステムにおける同期ミラーリング | |
CN104035830A (zh) | 一种数据恢复方法和装置 | |
JP2008052547A (ja) | 記憶制御装置及び記憶制御装置の障害回復方法 | |
US7958432B2 (en) | Verification of non volatile storage storing preserved unneeded data | |
US7360018B2 (en) | Storage control device and storage device error control method | |
WO2012089152A1 (zh) | 一种文件系统内实现独立磁盘冗余阵列保护的方法及装置 | |
TW201525687A (zh) | 檔案系統的日誌子系統寫入方法、錯誤追蹤方法及處理器 | |
WO2024113685A1 (zh) | 一种raid阵列的数据恢复方法及相关装置 | |
CN108874312B (zh) | 数据存储方法以及存储设备 | |
WO2021098041A1 (zh) | 存储集群bbu故障时的节点模式调整方法及相关组件 | |
KR20140086223A (ko) | 디스크 어레이의 패리티 재동기화 장치 및 방법 | |
US20070036055A1 (en) | Device, method and program for recovering from media error in disk array device | |
EP2613258A1 (en) | Automatic remapping in redundant array of independent disks and related raid |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19949354 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19949354 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19949354 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31.10.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19949354 Country of ref document: EP Kind code of ref document: A1 |