CN116501553B - Data recovery method, device, system, electronic equipment and storage medium - Google Patents
Data recovery method, device, system, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116501553B CN116501553B CN202310747986.8A CN202310747986A CN116501553B CN 116501553 B CN116501553 B CN 116501553B CN 202310747986 A CN202310747986 A CN 202310747986A CN 116501553 B CN116501553 B CN 116501553B
- Authority
- CN
- China
- Prior art keywords
- stripe
- block
- check
- data
- partition
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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)
- Computer Security & Cryptography (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
本发明提供一种数据恢复方法、装置、系统、电子设备及存储介质,涉及计算机技术领域,该方法包括:目标磁盘阵列中存在任一异常磁盘时,根据异常磁盘中异常数据块的落盘位置,读取目标数据块以及目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或第二条带的更新后的第二校验块,以对异常磁盘进行数据恢复;更新后的第二校验块根据第一条带的第一分区中数据块编码得到的第一分区校验码和第二条带的原始的第二校验块进行更新;更新后的第一校验块根据第一条带的第二分区中数据块编码得到的第二分区校验码和第二条带的原始的第二校验块进行更新。本发明实现降低数据恢复时所需要读取的数据块数量,提高数据恢复效率。
The invention provides a data recovery method, device, system, electronic equipment and storage medium, and relates to the field of computer technology. The method includes: when there is any abnormal disk in the target disk array, based on the location of the abnormal data block in the abnormal disk. , read the target data block and the updated first check block of the first stripe or the updated second check block of the second stripe in each stripe group of the target disk array to perform data processing on the abnormal disk. Recovery; the updated second check block is updated based on the first partition check code obtained by encoding the data block in the first partition of the first strip and the original second check block of the second strip; the updated The first check block is updated according to the second partition check code obtained by encoding the data block in the second partition of the first stripe and the original second check block of the second stripe. The invention reduces the number of data blocks that need to be read during data recovery and improves data recovery efficiency.
Description
技术领域Technical Field
本发明涉及计算机技术领域,尤其涉及一种数据恢复方法、装置、系统、电子设备及存储介质。The present invention relates to the field of computer technology, and in particular to a data recovery method, device, system, electronic equipment and storage medium.
背景技术Background Art
伴随着通讯技术和网络科技的迅速发展,数字化信息呈指数爆炸式增长,数据存储技术也因此迎来了巨大的挑战。存储系统中数据的可靠性问题以及存储系统的能耗问题越来越被人们所关注。现如今面对如此庞大的数据规模,存储系统中数据的可靠性和存储系统中包含的组件数量成反比关系,即存储系统组件数越多,那么存储系统中数据的可靠性就越低。因此,在大规模存储系统中,磁盘故障造成的数据可靠性下降是相当严重的问题,对此,对磁盘数据进行容错恢复是目前亟待解决的技术问题之一。With the rapid development of communication technology and network technology, digital information has exploded exponentially, and data storage technology has also ushered in huge challenges. The reliability of data in storage systems and the energy consumption of storage systems are increasingly being concerned by people. Nowadays, facing such a huge data scale, the reliability of data in the storage system is inversely proportional to the number of components contained in the storage system, that is, the more components in the storage system, the lower the reliability of data in the storage system. Therefore, in large-scale storage systems, the reduction in data reliability caused by disk failure is a very serious problem. In this regard, fault-tolerant recovery of disk data is one of the technical problems that need to be solved urgently.
相关技术,磁盘阵列中任意一个磁盘或两个磁盘中数据出现异常时,需要多次从磁盘阵列的剩余磁盘中读取所有数据块的数据进行数据恢复,但是在大条带数据恢复的情况下,需要取出的数据块较多,数据量太大,导致读取速度就会很慢,进而使得恢复速度很慢。In the related technology, when data in any one or two disks in a disk array is abnormal, it is necessary to read data of all data blocks from the remaining disks of the disk array for multiple times to recover the data. However, in the case of large-stripe data recovery, many data blocks need to be retrieved, and the amount of data is too large, resulting in a slow reading speed, which in turn makes the recovery speed very slow.
综上所述如何在大条带数据恢复场景下,降低数据恢复时所需要读取的数据块数量,以加快数据解码恢复的速度,是当前亟待解决的问题。In summary, how to reduce the number of data blocks that need to be read during data recovery in a large-strip data recovery scenario to speed up data decoding and recovery is a problem that needs to be solved urgently.
发明内容Summary of the invention
本发明提供一种数据恢复方法、装置、系统、电子设备及存储介质,用以解决现有技术中大条带数据恢复场景下,所需读取的数据块数量较多,导致数据恢复速度缓慢的缺陷,实现降低数据恢复时所需要读取的数据块数量,提高数据恢复效率。The present invention provides a data recovery method, device, system, electronic device and storage medium, which are used to solve the defect in the prior art that in a large-stripe data recovery scenario, a large number of data blocks need to be read, resulting in a slow data recovery speed, thereby reducing the number of data blocks that need to be read during data recovery and improving data recovery efficiency.
本发明提供一种数据恢复方法,包括:The present invention provides a data recovery method, comprising:
在目标磁盘阵列中存在任一异常磁盘的情况下,获取所述异常磁盘中异常数据块的落盘位置;In the case that there is any abnormal disk in the target disk array, obtaining the disk location of the abnormal data block in the abnormal disk;
根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标数据块以及目标校验块;According to the disk location of the abnormal data block, read the target data block and the target check block from the normal disk of the target disk array;
根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复;Performing data recovery on the abnormal disk according to the target data block and the target check block;
其中,所述正常磁盘为所述目标磁盘阵列中除所述异常磁盘之外的磁盘;Wherein, the normal disk is a disk in the target disk array except the abnormal disk;
所述目标校验块包括所述目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或每一所述条带组中第二条带的更新后的第二校验块;所述更新后的第二校验块是根据第一分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述更新后的第一校验块是根据第二分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述第一分区校验码是根据所述第一条带的第一分区中的数据块进行编码得到的,所述第二分区校验码是根据所述第一条带的第二分区中的数据块进行编码得到的。The target check block includes an updated first check block of the first stripe in each stripe group of the target disk array or an updated second check block of the second stripe in each stripe group; the updated second check block is updated according to the first partition check code and the original second check block of the second stripe; the updated first check block is updated according to the second partition check code and the original second check block of the second stripe; the first partition check code is encoded according to the data blocks in the first partition of the first stripe, and the second partition check code is encoded according to the data blocks in the second partition of the first stripe.
根据本发明提供的一种数据恢复方法,所述目标数据块包括第一数据块,所述第一数据块包括所述第二条带中除所述异常数据块之外的数据块;According to a data recovery method provided by the present invention, the target data block includes a first data block, and the first data block includes data blocks in the second stripe except the abnormal data block;
所述根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复,包括:The step of recovering data from the abnormal disk according to the target data block and the target check block includes:
对于每一所述条带组,根据所述第一数据块,对所述第二条带对应的所述异常数据块和所述第二条带的原始的第二校验块进行数据恢复;For each of the stripe groups, according to the first data block, data recovery is performed on the abnormal data block corresponding to the second stripe and the original second check block of the second stripe;
根据所述第二条带的原始的第二校验块以及所述目标校验块,对所述第一条带对应的所述异常数据块进行数据恢复。Data recovery is performed on the abnormal data block corresponding to the first stripe according to the original second check block of the second stripe and the target check block.
根据本发明提供的一种数据恢复方法,所述根据所述第一数据块,对所述第二条带对应的所述异常数据块和所述第二条带的原始的第二校验块进行数据恢复,包括:According to a data recovery method provided by the present invention, the data recovery of the abnormal data block corresponding to the second stripe and the original second check block of the second stripe is performed according to the first data block, including:
在所述正常磁盘中读取所述第二条带的原始的第一校验块;Reading an original first check block of the second stripe from the normal disk;
根据所述第一数据块以及所述第二条带的原始的第一校验块,对所述第二条带的原始的第一校验块对应的编码方程进行解码;Decoding a coding equation corresponding to the original first check block of the second stripe according to the first data block and the original first check block of the second stripe;
根据解码结果,对所述第二条带对应的所述异常数据块和所述第二条带的原始的第二校验块进行数据恢复。According to the decoding result, data recovery is performed on the abnormal data block corresponding to the second stripe and the original second check block of the second stripe.
根据本发明提供的一种数据恢复方法,根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标校验块,包括:According to a data recovery method provided by the present invention, according to the disk location of the abnormal data block, a target check block is read from a normal disk of the target disk array, comprising:
在所述第一条带对应的所述异常数据块的落盘位置属于所述第一分区的情况下,在所述正常磁盘中读取所述更新后的第二校验块;When the disk location of the abnormal data block corresponding to the first stripe belongs to the first partition, reading the updated second check block from the normal disk;
将所述更新后的第二校验块作为所述目标校验块。The updated second check block is used as the target check block.
根据本发明提供的一种数据恢复方法,所述根据所述第二条带的原始的第二校验块以及所述目标校验块,对所述第一条带对应的所述异常数据块进行数据恢复,包括:According to a data recovery method provided by the present invention, the data recovery of the abnormal data block corresponding to the first stripe according to the original second check block of the second stripe and the target check block includes:
根据所述第二条带的原始的第二校验块以及所述更新后的第二校验块,获取所述第一分区校验码;Obtaining the first partition check code according to the original second check block of the second stripe and the updated second check block;
根据所述第一分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复。Data recovery is performed on the abnormal data block corresponding to the first stripe according to the first partition check code.
根据本发明提供的一种数据恢复方法,所述目标数据块还包括第二数据块,所述第二数据块为所述第一分区中除所述异常数据块之外的数据块;According to a data recovery method provided by the present invention, the target data block further includes a second data block, and the second data block is a data block in the first partition except the abnormal data block;
所述根据所述第一分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复,包括:The step of recovering data of the abnormal data block corresponding to the first stripe according to the first partition check code includes:
根据所述第一分区校验码和所述第二数据块,对所述第一分区校验码的编码方程进行解码;Decoding a coding equation of the first partition check code according to the first partition check code and the second data block;
根据解码结果,对所述第一条带对应的所述异常数据块进行数据恢复。According to the decoding result, data recovery is performed on the abnormal data block corresponding to the first stripe.
根据本发明提供的一种数据恢复方法,所述更新后的第二校验块是基于如下步骤获取的:According to a data recovery method provided by the present invention, the updated second check block is obtained based on the following steps:
对所述第一分区校验码和所述第二条带的原始的第二校验块进行异或计算,得到所述更新后的第二校验块。An exclusive OR calculation is performed on the first partition check code and the original second check block of the second stripe to obtain the updated second check block.
根据本发明提供的一种数据恢复方法,所述根据所述第二条带的原始的第二校验块以及所述更新后的第二校验块,获取所述第一分区校验码,包括:According to a data recovery method provided by the present invention, obtaining the first partition check code according to the original second check block of the second stripe and the updated second check block includes:
将所述第二条带的原始的第二校验块与所述更新后的第二校验块进行异或计算,得到所述第一分区校验码。An XOR calculation is performed on the original second check block of the second stripe and the updated second check block to obtain the first partition check code.
根据本发明提供的一种数据恢复方法,根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标校验块,包括:According to a data recovery method provided by the present invention, according to the disk location of the abnormal data block, a target check block is read from a normal disk of the target disk array, comprising:
在所述第一条带对应的所述异常数据块的落盘位置属于所述第二分区的情况下,在所述正常磁盘中读取所述更新后的第一校验块;When the disk location of the abnormal data block corresponding to the first stripe belongs to the second partition, reading the updated first check block from the normal disk;
将所述更新后的第一校验块作为所述目标校验块。The updated first check block is used as the target check block.
根据本发明提供的一种数据恢复方法,所述根据所述第二条带的原始的第二校验块以及所述目标校验块,对所述第一条带对应的所述异常数据块进行数据恢复,包括:According to a data recovery method provided by the present invention, the data recovery of the abnormal data block corresponding to the first stripe according to the original second check block of the second stripe and the target check block includes:
根据所述第二条带的原始的第二校验块以及所述更新后的第一校验块,获取所述第二分区校验码;Acquire the second partition check code according to the original second check block of the second stripe and the updated first check block;
根据所述第二分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复。Data recovery is performed on the abnormal data block corresponding to the first stripe according to the second partition check code.
根据本发明提供的一种数据恢复方法,所述目标数据块还包括第三数据块,所述第三数据块为所述第二分区中除所述异常数据块之外的数据块;According to a data recovery method provided by the present invention, the target data block further includes a third data block, and the third data block is a data block in the second partition except the abnormal data block;
所述根据所述第二分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复,包括:The step of recovering the abnormal data block corresponding to the first stripe according to the second partition check code includes:
根据所述第二分区校验码和所述第三数据块,对所述第二分区校验码的编码方程进行解码;Decoding the encoding equation of the second partition check code according to the second partition check code and the third data block;
根据解码结果,对所述第一条带对应的所述异常数据块进行数据恢复。According to the decoding result, data recovery is performed on the abnormal data block corresponding to the first stripe.
根据本发明提供的一种数据恢复方法,所述更新后的第一校验块是基于如下步骤确定的:According to a data recovery method provided by the present invention, the updated first check block is determined based on the following steps:
对所述第二分区校验码和所述第二条带的原始的第二校验块进行异或计算,得到所述更新后的第一校验块。An exclusive OR calculation is performed on the second partition check code and the original second check block of the second stripe to obtain the updated first check block.
根据本发明提供的一种数据恢复方法,所述根据所述第二条带的原始的第二校验块以及所述更新后的第一校验块,获取所述第二分区校验码,包括:According to a data recovery method provided by the present invention, obtaining the second partition check code according to the original second check block of the second stripe and the updated first check block includes:
将所述第二条带的原始的第二校验块与所述更新后的第一校验块进行异或计算,得到所述第二分区校验码。An XOR calculation is performed on the original second check block of the second stripe and the updated first check block to obtain the second partition check code.
根据本发明提供的一种数据恢复方法,所述第一分区校验码是基于如下步骤获取的:According to a data recovery method provided by the present invention, the first partition check code is obtained based on the following steps:
对于每一所述条带组,获取所述第一条带的第一分区中各数据块的落盘位置;For each of the stripe groups, obtaining a disk location of each data block in the first partition of the first stripe;
根据所述第一分区中各数据块的落盘位置,以及所述第一分区中的各数据块,获取所述第一分区校验码。The first partition check code is obtained according to the disk location of each data block in the first partition and each data block in the first partition.
根据本发明提供的一种数据恢复方法,所述根据所述第一分区中各数据块的落盘位置,以及所述第一分区中的各数据块,获取所述第一分区校验码,包括:According to a data recovery method provided by the present invention, obtaining the first partition check code according to the disk location of each data block in the first partition and each data block in the first partition includes:
获取所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置;Obtaining disk drop positions corresponding to the original first check block of the first stripe and the original second check block of the first stripe respectively;
对所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置,以及所述第一分区中各数据块的落盘位置和所述第一分区中的各数据块进行编码,得到所述第一分区校验码。The disk locations corresponding to the original first check block of the first stripe and the original second check block of the first stripe, as well as the disk locations of each data block in the first partition and each data block in the first partition are encoded to obtain the first partition check code.
根据本发明提供的一种数据恢复方法,所述第一分区校验码的编码方程如下:According to a data recovery method provided by the present invention, the encoding equation of the first partition check code is as follows:
; ;
其中,为所述第一条带中的数据块数量,A为所述第一条带的条带编号;为所述第一条带的第一分区校验码;为所述第一条带的原始的第二校验块的落盘位置;为所述第一条带的原始的第一校验块的落盘位置;为所述第一条带的第一分区中各数据块的落盘位置;为所述第一条带的第一分区中的各数据块;为异或操作。in, is the number of data blocks in the first stripe, and A is the stripe number of the first stripe; is a first partition check code of the first stripe; The disk placement position of the original second verification block of the first strip; The disk placement position of the original first calibration block of the first strip; The disk location of each data block in the first partition of the first stripe; for each data block in the first partition of the first stripe; It is an XOR operation.
根据本发明提供的一种数据恢复方法,所述第二分区校验码是基于如下步骤获取的:According to a data recovery method provided by the present invention, the second partition check code is obtained based on the following steps:
对于每一所述条带组,获取所述第一条带的第二分区中各数据块的落盘位置;For each of the stripe groups, obtaining a disk location of each data block in the second partition of the first stripe;
根据所述第二分区中各数据块的落盘位置,以及所述第二分区中的各数据块,获取所述第二分区校验码。The second partition check code is obtained according to the disk location of each data block in the second partition and each data block in the second partition.
根据本发明提供的一种数据恢复方法,所述根据所述第二分区中各数据块的落盘位置,以及所述第二分区中的各数据块,获取所述第二分区校验码,包括:According to a data recovery method provided by the present invention, obtaining the second partition check code according to the disk location of each data block in the second partition and each data block in the second partition includes:
获取所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置;Obtaining disk drop locations corresponding to the original first check block of the first stripe and the original second check block of the first stripe respectively;
对所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置,以及所述第二分区中各数据块的落盘位置和所述第二分区中的各数据块进行编码,得到所述第二分区校验码。The disk locations corresponding to the original first check block of the first stripe and the original second check block of the first stripe, as well as the disk locations of each data block in the second partition and each data block in the second partition are encoded to obtain the second partition check code.
根据本发明提供的一种数据恢复方法,所述第二分区校验码的编码方程如下:According to a data recovery method provided by the present invention, the encoding equation of the second partition check code is as follows:
; ;
其中,为所述第一条带中的数据块数量,A为所述第一条带的条带编号;为所述第一条带的第二分区校验码;为所述第一条带的原始的第二校验块的落盘位置;为所述第一条带的原始的第一校验块的落盘位置;为所述第一条带的第二分区中各数据块的落盘位置;为所述第一条带的第二分区中的各数据块;为异或操作。in, is the number of data blocks in the first stripe, and A is the stripe number of the first stripe; is a second partition check code of the first stripe; The disk placement position of the original second verification block of the first strip; The disk placement position of the original first calibration block of the first strip; The disk location of each data block in the second partition of the first stripe; Each data block in the second partition of the first stripe; It is an XOR operation.
本发明还提供一种数据恢复装置,包括:The present invention also provides a data recovery device, comprising:
获取模块,用于在目标磁盘阵列中存在任一异常磁盘的情况下,获取所述异常磁盘中异常数据块的落盘位置;An acquisition module, used for acquiring a disk location of an abnormal data block in any abnormal disk when there is any abnormal disk in the target disk array;
读取模块,用于根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标数据块以及目标校验块;A reading module, configured to read a target data block and a target check block from a normal disk of the target disk array according to a disk location of the abnormal data block;
恢复模块,用于根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复;A recovery module, used for recovering data of the abnormal disk according to the target data block and the target check block;
其中,所述正常磁盘为所述目标磁盘阵列中除所述异常磁盘之外的磁盘;Wherein, the normal disk is a disk in the target disk array except the abnormal disk;
所述目标校验块包括所述目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或每一所述条带组中第二条带的更新后的第二校验块;所述更新后的第二校验块是根据第一分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述更新后的第一校验块是根据第二分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述第一分区校验码是根据所述第一条带的第一分区中的数据块进行编码得到的,所述第二分区校验码是根据所述第一条带的第二分区中的数据块进行编码得到的。The target check block includes an updated first check block of the first stripe in each stripe group of the target disk array or an updated second check block of the second stripe in each stripe group; the updated second check block is updated according to the first partition check code and the original second check block of the second stripe; the updated first check block is updated according to the second partition check code and the original second check block of the second stripe; the first partition check code is encoded according to the data blocks in the first partition of the first stripe, and the second partition check code is encoded according to the data blocks in the second partition of the first stripe.
本发明还提供一种数据恢复系统,包括目标磁盘阵列和磁盘控制器;The present invention also provides a data recovery system, comprising a target disk array and a disk controller;
所述磁盘控制器与所述目标磁盘阵列连接;The disk controller is connected to the target disk array;
所述磁盘控制器用于执行如上述任一项所述数据恢复方法。The disk controller is used to execute any of the data recovery methods described above.
本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一种所述数据恢复方法。The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned data recovery methods is implemented.
本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述数据恢复方法。The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the data recovery method described in any one of the above methods is implemented.
本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述数据恢复方法。The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned data recovery methods.
本发明提供的数据恢复方法、装置、系统、电子设备及存储介质,通过目标磁盘阵列的每一条带组中第一条带的第一分区中的数据块编码得到的第一分区校验码、第一条带的第二分区中的数据块编码得到的第二分区校验码,以及第二条带的原始的第二校验块,分别对第一条带的原始的第一校验块和第二条带的原始的第二校验块进行更新,得到第一条带的更新后的第一校验块和第二条带的更新后的第二校验块,以在目标磁盘阵列中存在任一异常磁盘,根据该异常磁盘中异常数据块的落盘位置,在目标磁盘阵列的正常磁盘中,读取少量的目标数据块以及更新后的第一校验块或更新后的第二校验块,即可实现异常磁盘的数据恢复,无需读取目标磁盘阵列的所有数据块和所有校验块,有效数据块读取数量,减少参与运算的分块数据量,进而提高数据解码速度和数据恢复效率。The data recovery method, device, system, electronic device and storage medium provided by the present invention respectively update the original first check block of the first stripe and the original second check block of the second stripe by encoding the first partition check code of the data block in the first partition of the first stripe in each stripe group of the target disk array, the second partition check code obtained by encoding the data block in the second partition of the first stripe, and the original second check block of the second stripe, so as to obtain the updated first check block of the first stripe and the updated second check block of the second stripe, so as to realize data recovery of the abnormal disk by reading a small amount of target data blocks and the updated first check block or the updated second check block in the normal disk of the target disk array according to the disk location of the abnormal data block in the abnormal disk, without reading all the data blocks and all the check blocks of the target disk array, and reducing the number of valid data blocks read, thereby reducing the amount of block data involved in the operation, thereby improving the data decoding speed and data recovery efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1是本发明提供的数据恢复方法的流程示意图;FIG1 is a schematic flow chart of a data recovery method provided by the present invention;
图2是本发明提供的数据恢复装置的结构示意图;FIG2 is a schematic diagram of the structure of a data recovery device provided by the present invention;
图3是本发明提供的数据恢复系统的结构示意图;FIG3 is a schematic diagram of the structure of a data recovery system provided by the present invention;
图4是本发明提供的电子设备的结构示意图。FIG. 4 is a schematic diagram of the structure of an electronic device provided by the present invention.
具体实施方式DETAILED DESCRIPTION
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
需要说明的是,本实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称的非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本发明实施例的限定。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备固有的其他步骤或单元。It should be noted that all expressions using "first" and "second" in this embodiment are intended to distinguish two non-identical entities or non-identical parameters with the same name. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, other steps or units inherent to a process, method, system, product or device that includes a series of steps or units.
需要说明的是,在存储的系统中,为了减少运算复杂度,保证数据不会溢出,本实施例中所称的编解码运算都是在伽罗华域中实现的。表现在硬件的实现中,加减法会通过异或运算来实现,而乘除法会用针对不同伽罗华域多项式的伽罗华乘除法实现,此处不做赘述。It should be noted that in the storage system, in order to reduce the complexity of operations and ensure that data does not overflow, the encoding and decoding operations referred to in this embodiment are all implemented in the Galois Field. In the hardware implementation, addition and subtraction will be implemented through XOR operations, and multiplication and division will be implemented using Galois multiplication and division for different Galois Field polynomials, which will not be described here.
下面结合图1-图4描述本发明的数据恢复方法、装置、系统、电子设备及存储介质。The data recovery method, device, system, electronic device and storage medium of the present invention are described below in conjunction with Figures 1 to 4.
如图1所示,为本实施例提供的数据恢复方法的流程示意图之一,该数据恢复方法包括如下步骤:As shown in FIG. 1 , it is a flowchart of a data recovery method provided in this embodiment. The data recovery method includes the following steps:
步骤101,在目标磁盘阵列中存在任一异常磁盘的情况下,获取所述异常磁盘中异常数据块的落盘位置;其中,所述正常磁盘为所述目标磁盘阵列中除所述异常磁盘之外的磁盘。Step 101, when there is any abnormal disk in the target disk array, obtain the disk location of the abnormal data block in the abnormal disk; wherein the normal disk is the disk in the target disk array except the abnormal disk.
此处的目标磁盘阵列是需要进行数据恢复的磁盘阵列,可以是RAID(RedundantArrays of Independent Disks,具有冗余能力的磁盘阵列)。The target disk array here is the disk array for which data recovery is required, which may be a RAID (Redundant Arrays of Independent Disks, a disk array with redundant capability).
其中,磁盘阵列是通过将多个独立磁盘组合一起,从而得到一个容量巨大的磁盘组。RAID是把相同的数据存储在多个硬盘的不同的地方的方法,通过把数据放在多个硬盘上,输入输出操作能以平衡的方式交叠,改良性能。因此,采用RAID存储技术,可以大大提高存储容量,提高系统输入输出的请求处理能力并且通过数据的分布式存储技术,并行访问手段和信息冗余技术提高数据的可靠性。Among them, a disk array is a disk group with huge capacity obtained by combining multiple independent disks together. RAID is a method of storing the same data in different places on multiple hard disks. By placing data on multiple hard disks, input and output operations can be overlapped in a balanced manner to improve performance. Therefore, the use of RAID storage technology can greatly increase storage capacity, improve the system's input and output request processing capabilities, and improve data reliability through distributed data storage technology, parallel access methods and information redundancy technology.
RAID主要利用数据条带、数据校验和镜像技术来获得较强的性能、更高的可靠性、较好的容错能力和较强的扩展性。根据不同的数据应用需求,可以运用或者组合运用这三种技术的策略和架构,所以按照不同的策略和架构,RAID可以被分为不同的等级,如RAID0、RAID1、RAID5、RAID6和RAID10等。RAID mainly uses data striping, data verification and mirroring technology to achieve stronger performance, higher reliability, better fault tolerance and stronger scalability. According to different data application requirements, the strategies and architectures of these three technologies can be used or combined. Therefore, according to different strategies and architectures, RAID can be divided into different levels, such as RAID0, RAID1, RAID5, RAID6 and RAID10.
其中,RAID0是最早出现的RAID模式,即采用数据分条技术进行数据存储。RAID0是组建磁盘阵列中最简单的一种形式,只需要2块以上的硬盘即可,成本低,可以提高整个磁盘的性能和吞吐量。RAID0没有提供冗余或错误修复能力,但实现成本是最低的。Among them, RAID0 is the earliest RAID mode, which uses data striping technology for data storage. RAID0 is the simplest form of disk array construction, requiring only two or more hard disks, with low cost, and can improve the performance and throughput of the entire disk. RAID0 does not provide redundancy or error repair capabilities, but the implementation cost is the lowest.
RAID0最简单的实现方式就是把N块同样的硬盘用硬件的形式通过智能磁盘控制器或用操作系统中的磁盘驱动程序以软件的方式串联在一起创建一个大的卷集。在使用中将数据依次写入到各块硬盘中,它的最大优点就是可以整倍地提高硬盘的容量。如使用了三块80GB的硬盘组建成RAID0模式,那么磁盘容量就会是240GB。其速度方面,和单独一块硬盘的速度完全相同。最大的缺点在于任何一块硬盘出现故障,整个系统将会受到破坏,可靠性仅为单独一块硬盘的1/N。The simplest way to implement RAID0 is to connect N identical hard disks in hardware through an intelligent disk controller or in software through the disk driver in the operating system to create a large volume set. During use, data is written to each hard disk in sequence. Its biggest advantage is that it can increase the capacity of the hard disk by multiples. If three 80GB hard disks are used to form a RAID0 mode, the disk capacity will be 240GB. Its speed is exactly the same as that of a single hard disk. The biggest disadvantage is that if any hard disk fails, the entire system will be damaged, and the reliability is only 1/N of that of a single hard disk.
RAID1称为磁盘镜像,原理是把一个磁盘的数据镜像到另一个磁盘上,也就是说数据在写入一块磁盘的同时,会在另一块闲置的磁盘上生成镜像文件,在不影响性能情况下最大限度的保证系统的可靠性和可修复性上,只要系统中任何一对镜像盘中至少有一块磁盘可以使用,甚至可以在一半数量的硬盘出现问题时系统都可以正常运行,当一块硬盘失效时,系统会忽略该硬盘,转而使用剩余的镜像盘读写数据,具备很好的磁盘冗余能力。虽然这样对数据来讲绝对安全,但是成本也会明显增加,磁盘利用率为50%,以四块80GB容量的硬盘来讲,可利用的磁盘空间仅为160GB。另外,出现硬盘故障的RAID系统不再可靠,应当及时的更换损坏的硬盘,否则剩余的镜像盘也出现问题,那么整个系统就会崩溃。更换新盘后原有数据会需要很长时间同步镜像,外界对数据的访问不会受到影响,只是这时整个系统的性能有所下降。因此,RAID1多用在保存关键性的重要数据的场合。RAID1 is called disk mirroring. The principle is to mirror the data of one disk to another disk. That is to say, when data is written to one disk, a mirror file will be generated on another idle disk. The reliability and repairability of the system can be guaranteed to the maximum extent without affecting the performance. As long as at least one disk in any pair of mirror disks in the system can be used, the system can operate normally even when half of the hard disks have problems. When a hard disk fails, the system will ignore the hard disk and use the remaining mirror disk to read and write data, which has good disk redundancy. Although this is absolutely safe for data, the cost will also increase significantly. The disk utilization rate is 50%. For four 80GB hard disks, the available disk space is only 160GB. In addition, the RAID system with hard disk failure is no longer reliable. The damaged hard disk should be replaced in time, otherwise the remaining mirror disk will also have problems, and the entire system will collapse. After replacing the new disk, the original data will take a long time to synchronize the mirror, and the outside world's access to the data will not be affected, but the performance of the entire system will be reduced at this time. Therefore, RAID1 is mostly used in occasions where critical and important data is stored.
RAID5,也即分布式奇偶校验的独立磁盘结构,其奇偶校验码存在于所有磁盘上,如p0代表第0个条带中的奇偶校验码。RAID5的读出效率很高,写入效率一般,块式的集体访问效率良好。因为奇偶校验码在不同的磁盘上,所以提高了可靠性。但是它对数据传输的并行性解决不好,而且控制器的设计也相当困难。对于RAID5来说,大部分数据传输只对一块磁盘操作,可进行并行操作。在RAID5中有写入损失,即每一次写操作,将产生四个实际的读和/或写操作,其中两次读旧的数据及奇偶信息,两次写新的数据及奇偶信息。RAID5, also known as an independent disk structure with distributed parity, has parity codes on all disks, such as p0 represents the parity code in the 0th stripe. RAID5 has high read efficiency, average write efficiency, and good block-based collective access efficiency. Because the parity codes are on different disks, reliability is improved. However, it does not solve the parallelism of data transmission well, and the design of the controller is also quite difficult. For RAID5, most data transmissions only operate on one disk and can be operated in parallel. There is write loss in RAID5, that is, each write operation will generate four actual read and/or write operations, two of which read the old data and parity information, and two write the new data and parity information.
其中,原始RAID5可采用里德所罗门码(Reed Solomon Code,RS)进行编码,具体编码计算公式为:Among them, the original RAID5 can be encoded using Reed Solomon Code (RS), and the specific encoding calculation formula is:
; ;
其中,为任一条带中的个数据块;为该条带中的第一校验块;为异或运算。in, For any band data blocks; is the first check block in the stripe; It is an XOR operation.
表1 原始RAID5中各分块数据的落盘分布表Table 1 The distribution table of each block data in the original RAID5
此外,正常的RAID运算中,会基于左旋不对齐的负载均衡算法的排布需求,对所有涉及的数据进行排布,然后进行编码落盘。如表1所示,为原始RAID5的落盘分布表。其中,行为每一条带所包含的数据块和校验块;列为每一磁盘所包含的数据块和校验块。In addition, in normal RAID operations, all data involved will be arranged based on the arrangement requirements of the left-handed non-aligned load balancing algorithm, and then encoded and stored on disk. Table 1 shows the original RAID5 storage distribution table. The rows are the data blocks and check blocks contained in each stripe; the columns are the data blocks and check blocks contained in each disk.
RAID6是带两种分布存储的奇偶校验码独立磁盘结构。它是对RAID5的扩展,主要是用于要求数据绝对不能出错的场合。由于引入了第二种奇偶校验值,所以需要N+2个磁盘,同时对控制器的设计变得十分复杂,进一步提升了磁盘阵列的数据可靠性。需要更多的空间来存储校验值,同时在写操作中具有更高的性能损失。RAID6 is an independent disk structure with two types of distributed storage parity codes. It is an extension of RAID5 and is mainly used in situations where data must not be wrong. Due to the introduction of the second parity value, N+2 disks are required, and the controller design becomes very complicated, further improving the data reliability of the disk array. More space is required to store the parity value, and there is a higher performance loss in the write operation.
其中,原始RAID6可采用里德所罗门码(Reed Solomon Code,RS)进行编码,具体计算公式为:Among them, the original RAID6 can be encoded using Reed Solomon Code (RS), and the specific calculation formula is:
; ;
其中,为任一条带中的第一校验块,为该条带中的第二校验块,为该条带中的数据块对应的落盘位置,如在第4个磁盘,则;为校验块对应的落盘位置。in, is the first check block in any stripe, is the second check block in the stripe, The disk location corresponding to the data block in the stripe, such as On the 4th disk, ; The disk location corresponding to the calibration block.
因此,为了降低成本的同时,提高数据可靠性,本实施例中目标磁盘阵列可以具体采用对原始RAID6或者原始RAID10等包含至少两个校验块的原始磁盘阵列进行改进的磁盘阵列,以下以改进的RAID6为例,对本实施例中的数据恢复方法展开描述。Therefore, in order to reduce costs and improve data reliability, the target disk array in this embodiment can specifically adopt a disk array that is improved on the original disk array such as the original RAID6 or the original RAID10 that contains at least two check blocks. The data recovery method in this embodiment is described below using the improved RAID6 as an example.
可选地,对目标磁盘阵列中的每一磁盘阵列进行监测;在监测到目标磁盘阵列中任一磁盘故障,即任一磁盘中出现异常数据块的情况下,确定该磁盘为异常磁盘,并获取该异常磁盘中异常数据块的落盘位置。Optionally, each disk array in the target disk array is monitored; when any disk failure in the target disk array is detected, that is, an abnormal data block appears in any disk, the disk is determined to be an abnormal disk, and the location of the abnormal data block in the abnormal disk is obtained.
此处,故障磁盘可以是一个或多个。Here, the failed disk can be one or more.
由于RAID6的设计是为了使得RAID组完成后,可以实现任意两个或一个的磁盘组中的错误,都可以被恢复,是当今通用存储产品应用最多的纠删方案。而RAID6的错误恢复需要读取除异常磁盘组外剩余的磁盘组中所有的数据进行计算,因此不同的实现方案所比较的性能主要集中在数据编解码的速度上。实际应用的场景中,RAID6虽然可以保证两个任意磁盘组中的错误恢复,但是按照实际场景的统计数据表示,单一错误的场景占了所有错误的比例高达99.75%,因此不管任何RAID的具体实现方案,核心的速度提升应该是针对单一错误场景的改善。因此,下文以故障磁盘为一个为例,对本实施例中的数据恢复方法展开描述。Since RAID6 is designed to ensure that after the RAID group is completed, errors in any two or one disk group can be recovered, it is the most widely used erasure scheme in general storage products today. However, RAID6 error recovery requires reading all data in the remaining disk groups except the abnormal disk group for calculation, so the performance comparison of different implementation schemes is mainly concentrated on the speed of data encoding and decoding. In actual application scenarios, although RAID6 can guarantee error recovery in two arbitrary disk groups, according to statistical data of actual scenarios, single error scenarios account for as much as 99.75% of all errors. Therefore, regardless of the specific implementation scheme of any RAID, the core speed improvement should be an improvement for single error scenarios. Therefore, the following takes a faulty disk as an example to describe the data recovery method in this embodiment.
步骤102,根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标数据块以及目标校验块。Step 102: Read a target data block and a target check block from a normal disk of the target disk array according to the disk location of the abnormal data block.
表2 原始RAID6中各分块数据的落盘分布表Table 2 The distribution table of each block data in the original RAID6
其中,所述目标校验块包括所述目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或每一所述条带组中第二条带的更新后的第二校验块;所述更新后的第二校验块是根据第一分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述更新后的第一校验块是根据第二分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述第一分区校验码是根据所述第一条带的第一分区中的数据块进行编码得到的,所述第二分区校验码是根据所述第一条带的第二分区中的数据块进行编码得到的。Wherein, the target check block includes an updated first check block of the first stripe in each stripe group of the target disk array or an updated second check block of the second stripe in each stripe group; the updated second check block is updated according to the first partition check code and the original second check block of the second stripe; the updated first check block is updated according to the second partition check code and the original second check block of the second stripe; the first partition check code is encoded according to the data block in the first partition of the first stripe, and the second partition check code is encoded according to the data block in the second partition of the first stripe.
需要说明的是,原始RAID6可以恢复两个的错误块,但是每次数据恢复,依然受限于对各个磁盘的大量数据进行读取时的速度限制。如表2所示,为原始RAID6中各分块数据的落盘分布表。It should be noted that the original RAID6 can recover two error blocks, but each data recovery is still limited by the speed limit of reading a large amount of data from each disk. As shown in Table 2, it is a disk distribution table of each block data in the original RAID6.
通过上述这种编码落盘方式,在任一磁盘为异常磁盘的情况下,针对包括k个数据块和第一校验块P和第一校验块q的每一条带,需要从剩余磁盘中读取所有分块数据,也即k-1个数据块和2个校验块,总共需读取k+1个分块数据,所需读取的数量较大,严重影响数据恢复效率。Through the above-mentioned encoding and disk-falling method, when any disk is an abnormal disk, for each strip including k data blocks and the first check block P and the first check block q , it is necessary to read all block data from the remaining disks, that is, k-1 data blocks and 2 check blocks, and a total of k+1 block data needs to be read. The number of required reads is large, which seriously affects the data recovery efficiency.
因此,在执行步骤102之前,本实施例以两个条带为一组对原始RAID6的编码落盘方式进行改进,以使得当单一磁盘发生错误时,数据读取量可以相比于原始RAID6至少减少25%,提升解码速度,从而提高数据恢复效率。Therefore, before executing step 102, this embodiment improves the encoding and disk-falling method of the original RAID6 with two stripes as a group, so that when an error occurs in a single disk, the data reading amount can be reduced by at least 25% compared to the original RAID6, thereby improving the decoding speed and thus improving the data recovery efficiency.
此处所称的条带组是按照条带编号,顺序将目标磁盘阵列的多个条带中每两个条带划分为一组,得到多个条带组。The stripe group referred to here is obtained by sequentially dividing every two stripes of the multiple stripes of the target disk array into a group according to the stripe numbers, thereby obtaining multiple stripe groups.
需要说明的是,在进行条带分组时,需要根据目标磁盘阵列的条带数量定义分组规则,以对条带进行精准分组,进而提高数据恢复效率。具体地,在目标磁盘阵列的条带数量为偶数时,将目标磁盘阵列的每两个条带分为一组,以得到不同条带组;此外,当目标磁盘阵列的条带数量为奇数时,将目标磁盘阵列的每两个条带分为一组,然后将最后剩余的一个条带分为一组,以得到不同条带组,并对包括两个条带的条带组使用改进的RAID6编码方法进行编码落盘,对包含一个条带的条带组使用原始RAID6的编码方法进行编码落盘。需要指出的是,对包含一个条带的条带组使用原始RAID6的编码方法进行编码落盘是指,包含一个条带的条带组不参与重新编码,按照原始编码方法进行编码。It should be noted that when performing stripe grouping, it is necessary to define grouping rules based on the number of stripes of the target disk array in order to accurately group the stripes and thereby improve data recovery efficiency. Specifically, when the number of stripes of the target disk array is an even number, every two stripes of the target disk array are grouped into a group to obtain different stripe groups; in addition, when the number of stripes of the target disk array is an odd number, every two stripes of the target disk array are grouped into a group, and then the last remaining stripe is grouped into a group to obtain different stripe groups, and the stripe group including two stripes is encoded and stored on disk using the improved RAID6 encoding method, and the stripe group including one stripe is encoded and stored on disk using the original RAID6 encoding method. It should be pointed out that using the original RAID6 encoding method to encode and store the stripe group including one stripe means that the stripe group including one stripe does not participate in re-encoding and is encoded according to the original encoding method.
每一条带组中的第一个条带称为第一条带(下文也称A条带),另一条带称为第二条带(下文也称B条带)。The first stripe in each stripe group is called the first stripe (hereinafter also referred to as the A stripe), and the other stripe is called the second stripe (hereinafter also referred to as the B stripe).
如表3所示,对于每一条带组,在进行数据块落盘时,可按照左旋不对齐的负载均衡方式对A条带中的数据块和B条带中的数据块进行落盘。As shown in Table 3, for each stripe group, when the data blocks are dropped to disk, the data blocks in stripe A can be allocated in a left-handed non-aligned load balancing manner. and data blocks in B stripe Carry out placement.
表3 每一条带组中各数据的落盘分布表之一Table 3. Distribution table of each data in each strip group.
接着,按照原始RAID6的编码方式编码得到各原始校验块,具体如表4所示。Next, the original check blocks are encoded according to the original RAID6 encoding method, as shown in Table 4.
表4 每一条带组中各数据的落盘分布表之二Table 4 The second table of the distribution of each data in each strip group
需要说明的是,表4中所示的各校验块的编码内容为原始编码内容,并非最终的编码内容。It should be noted that the coded content of each check block shown in Table 4 is the original coded content, not the final coded content.
接着,对每一条带分组中第一条带的数据块进行编码,得到第一分区校验码和第二分区校验码,以对第一条带的原始的第一校验块进行更新以及第二条带的原始的第二校验块进行更新。Next, the data blocks of the first stripe in each stripe group are encoded to obtain a first partition check code and a second partition check code, so as to update the original first check block of the first stripe and the original second check block of the second stripe.
可选地,根据每一条带中的数据块的落盘位置,将每一条带中的数据块划分为两部分,分别为第一分区的数据块和第二分区的数据块。Optionally, according to the disk location of the data blocks in each stripe, the data blocks in each stripe are divided into two parts, namely, the data blocks of the first partition and the data blocks of the second partition.
此处的划分方式可以是平均划分,或者按照预设长度进行划分,本实施例对此不做具体地限定。对于预设长度,其确定方式可以是,根据实际需求进行预先设置,或者根据每一条带中的数据块数量与校验块数量之间的比值进行确定,如,数据块数量与校验块数量的比值为整数时,直接将比值作为预设长度;当比值不为整数时,对比值进行向下取整,得到预设长度,本实施例对划分方式不做具体地限定。The division method here can be an average division, or division according to a preset length, which is not specifically limited in this embodiment. The preset length can be determined by presetting it according to actual needs, or by determining it according to the ratio between the number of data blocks and the number of check blocks in each strip, such as when the ratio of the number of data blocks to the number of check blocks is an integer, the ratio is directly used as the preset length; when the ratio is not an integer, the comparison value is rounded down to obtain the preset length, and this embodiment does not specifically limit the division method.
例如,按照平均划分的方式进行数据分区,第一条带的第一分区中各数据块可表征为,第二分区中各数据块可表征为。For example, if data is partitioned in an even manner, each data block in the first partition of the first stripe can be represented as , each data block in the second partition can be represented as .
然后,根据第一条带的第一分区中的数据块进行编码,得到第一分区校验码;并根据第一条带的第二分区中的数据块进行编码得到第二分区校验码,也即将第一条带的原始的第一校验块拆分为两个校验码。Then, the data block in the first partition of the first stripe is encoded to obtain the first partition check code; and the data block in the second partition of the first stripe is encoded to obtain the second partition check code, that is, the original first check block of the first stripe is split into two check codes.
在一些实施例中,第一分区校验码是基于如下步骤获取的:In some embodiments, the first partition check code is obtained based on the following steps:
对于每一所述条带组,获取所述第一条带的第一分区中各数据块的落盘位置;For each of the stripe groups, obtaining a disk location of each data block in the first partition of the first stripe;
根据所述第一分区中各数据块的落盘位置,以及所述第一分区中的各数据块,获取所述第一分区校验码。The first partition check code is obtained according to the disk location of each data block in the first partition and each data block in the first partition.
可选地,在对第一分区校验码机进行编码过程中,可对每一条带组执行如下步骤:Optionally, during the encoding of the first partition check code machine, the following steps may be performed for each stripe group:
首先,获取第一条带的第一分区中各数据块的落盘位置;接着,根据第一分区中各数据块的落盘位置,以及第一分区中的各数据块进行编码获取第一分区校验码。First, obtain the disk location of each data block in the first partition of the first stripe ; Then, according to the disk location of each data block in the first partition, and each data block in the first partition is encoded to obtain the first partition check code .
在一些实施例中,编码获取第一分区校验码的步骤具体包括:In some embodiments, the step of encoding to obtain the first partition check code specifically includes:
获取所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置;Obtaining disk drop positions corresponding to the original first check block of the first stripe and the original second check block of the first stripe respectively;
对所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置,以及所述第一分区中各数据块的落盘位置和所述第一分区中的各数据块进行编码,得到所述第一分区校验码。The disk locations corresponding to the original first check block of the first stripe and the original second check block of the first stripe, as well as the disk locations of each data block in the first partition and each data block in the first partition are encoded to obtain the first partition check code.
可选地,分别获取第一条带的原始的第一校验块对应的落盘位置和第一条带的原始的第二校验块对应的落盘位置。Optionally, obtain the disk location corresponding to the original first check block of the first stripe The disk location corresponding to the original second check block of the first stripe .
接着,将第一分区中各数据块的落盘位置与原始的第二校验块对应的落盘位置进行异或计算,得到各数据块对应的异常结果;并将第一条带的原始的第一校验块对应的落盘位置和第一条带的原始的第二校验块对应的落盘位置进行异常计算,得到校验块对应的异常结果,将各数据块对应的异常结果与校验块对应的异或结果进行相除后与各数据块对应相乘,得到各数据块对应的相乘结果,将各数据块对应的相乘结果进行异或计算,得到第一分区校验码。Next, the disk locations of each data block in the first partition are compared with the disk locations corresponding to the original second check blocks. Perform XOR calculation to obtain the abnormal results corresponding to each data block; and store the original first check block of the first stripe at the disk location corresponding to the original first check block of the first stripe. The disk location corresponding to the original second check block of the first stripe An abnormal calculation is performed to obtain an abnormal result corresponding to the check block, the abnormal result corresponding to each data block is divided by the XOR result corresponding to the check block, and then multiplied with each data block to obtain the multiplication result corresponding to each data block, and the multiplication result corresponding to each data block is XOR-calculated to obtain the first partition check code.
在一些实施例中,所述第一分区校验码的编码方程具体如下:In some embodiments, the encoding equation of the first partition check code is specifically as follows:
; ;
其中,为所述第一条带中的数据块数量,A为所述第一条带的条带编号;为所述第一条带的第一分区校验码;为所述第一条带的原始的第二校验块的落盘位置;为所述第一条带的原始的第一校验块的落盘位置;为所述第一条带的第一分区中各数据块的落盘位置;为所述第一条带的第一分区中的各数据块;为异或操作。in, is the number of data blocks in the first stripe, and A is the stripe number of the first stripe; is a first partition check code of the first stripe; The disk placement position of the original second verification block of the first strip; The disk placement position of the original first calibration block of the first strip; is the disk location of each data block in the first partition of the first stripe; for each data block in the first partition of the first stripe; It is an XOR operation.
本实施例提供的方法,通过将每一条带组中第一条带的原始的第一校验块划分成两个校验码,以对原始RAID6的校验块的编码方式进行改进,以便在目标磁盘阵列有一个磁盘出现数据块错误时,对该磁盘进行数据恢复可以比现有技术中少读取若干磁盘数据块,避免利用所有的磁盘数据,以减少参与运算的数据块,同时减少了部分数据读取,以进一步提高解码速度和数据恢复效率。The method provided in this embodiment improves the encoding method of the original RAID6 check block by dividing the original first check block of the first stripe in each stripe group into two check codes, so that when a data block error occurs on a disk in the target disk array, data recovery of the disk can read fewer disk data blocks than in the prior art, avoiding the use of all disk data to reduce the data blocks involved in the calculation, and at the same time reducing the reading of part of the data, so as to further improve the decoding speed and data recovery efficiency.
在一些实施例中,第二分区校验码是基于如下步骤获取的:In some embodiments, the second partition check code is obtained based on the following steps:
对于每一所述条带组,获取所述第一条带的第二分区中各数据块的落盘位置;For each of the stripe groups, obtaining a disk location of each data block in the second partition of the first stripe;
根据所述第二分区中各数据块的落盘位置,以及所述第二分区中的各数据块,获取所述第二分区校验码。The second partition check code is obtained according to the disk location of each data block in the second partition and each data block in the second partition.
可选地,首先,获取第一条带的第二分区中各数据块的落盘位置;接着,根据第二分区中各数据块的落盘位置,以及第二分区中的各数据块进行编码获取第二分区校验码。Optionally, first, obtain the disk location of each data block in the second partition of the first stripe ; Then, according to the disk location of each data block in the second partition, and each data block in the second partition is encoded to obtain the second partition check code .
在一些实施例中,所述根据所述第二分区中各数据块的落盘位置,以及所述第二分区中的各数据块,获取所述第二分区校验码,包括:In some embodiments, obtaining the second partition check code according to the disk location of each data block in the second partition and each data block in the second partition includes:
获取所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置;Obtaining disk drop positions corresponding to the original first check block of the first stripe and the original second check block of the first stripe respectively;
对所述第一条带的原始的第一校验块和所述第一条带的原始的第二校验块分别对应的落盘位置,以及所述第二分区中各数据块的落盘位置和所述第二分区中的各数据块进行编码,得到所述第二分区校验码。The disk locations corresponding to the original first check block of the first stripe and the original second check block of the first stripe, as well as the disk locations of each data block in the second partition and each data block in the second partition are encoded to obtain the second partition check code.
可选地,分别获取第一条带的原始的第一校验块对应的落盘位置和第一条带的原始的第二校验块对应的落盘位置。Optionally, obtain the disk location corresponding to the original first check block of the first stripe The disk location corresponding to the original second check block of the first stripe .
接着,将第二分区中各数据块的落盘位置与原始的第二校验块对应的落盘位置进行异或计算,得到各数据块对应的异常结果;Next, the disk location of each data block in the second partition is aligned with the disk location corresponding to the original second check block. Perform XOR calculation to obtain the abnormal results corresponding to each data block;
并将第一条带的原始的第一校验块对应的落盘位置和第一条带的原始的第二校验块对应的落盘位置进行异常计算,得到校验块对应的异常结果,将各数据块对应的异常结果与校验块对应的异或结果进行相除后与各数据块对应相乘,得到各数据块对应的相乘结果,将各数据块对应的相乘结果进行异或计算,得到第二分区校验码。And the disk location corresponding to the original first check block of the first stripe The disk location corresponding to the original second check block of the first stripe An abnormal calculation is performed to obtain an abnormal result corresponding to the check block, the abnormal result corresponding to each data block is divided by the XOR result corresponding to the check block, and then multiplied with each data block to obtain the multiplication result corresponding to each data block, and the multiplication result corresponding to each data block is XOR-calculated to obtain the second partition check code.
在一些实施例中,所述第二分区校验码的编码方程如下:In some embodiments, the encoding equation of the second partition check code is as follows:
; ;
其中,为所述第一条带中的数据块数量,A为所述第一条带的条带编号;为所述第一条带的第二分区校验码;为所述第一条带的原始的第二校验块的落盘位置;为所述第一条带的原始的第一校验块的落盘位置;为所述第一条带的第二分区中各数据块的落盘位置;为所述第一条带的第二分区中的各数据块;为异或操作。in, is the number of data blocks in the first stripe, and A is the stripe number of the first stripe; is a second partition check code of the first stripe; The disk placement position of the original second verification block of the first strip; The disk placement position of the original first calibration block of the first strip; The disk location of each data block in the second partition of the first stripe; Each data block in the second partition of the first stripe; It is an XOR operation.
本实施例提供的方法,通过将每一条带组中第一条带的原始的第一校验块划分成两个校验码,以对原始RAID6的校验块的编码方式进行改进,以便在目标磁盘阵列有一个磁盘出现数据块错误时,对该磁盘进行数据恢复可以比现有技术中少读取若干磁盘数据块,避免利用所有的磁盘数据,以减少参与运算的数据块,同时减少了部分数据读取,以进一步提高解码速度和数据恢复效率。The method provided in this embodiment improves the encoding method of the original RAID6 check block by dividing the original first check block of the first stripe in each stripe group into two check codes, so that when a data block error occurs on a disk in the target disk array, data recovery of the disk can read fewer disk data blocks than in the prior art, avoiding the use of all disk data to reduce the data blocks involved in the calculation, and at the same time reducing the reading of part of the data, so as to further improve the decoding speed and data recovery efficiency.
接着,根据第一条带的第二分区校验码和第二条带的原始的第二校验块对第一条带的原始的第一校验块进行重新编码,得到第一条带的更新后的第一校验块。所称的原始的第二校验块是基于原始RAID6对第二条带的所有数据块进行编码得到的。Next, the original first check block of the first stripe is re-encoded according to the second partition check code of the first stripe and the original second check block of the second stripe to obtain an updated first check block of the first stripe. The so-called original second check block is obtained by encoding all data blocks of the second stripe based on the original RAID6.
同理,根据第一条带的第一分区校验码和第二条带的原始的第二校验块对第二条带的原始的第二校验块进行重新编码,得到第二条带的更新后的第二校验块。Similarly, the original second check block of the second stripe is re-encoded according to the first partition check code of the first stripe and the original second check block of the second stripe to obtain an updated second check block of the second stripe.
所称的重新编码可以是进行异或编码或乘积编码等,本实施对此不做具体地限定。The so-called re-encoding may be XOR encoding or product encoding, etc., which is not specifically limited in this embodiment.
接着,基于左旋不对齐的负载均衡算法,将第二条带的更新后的第二校验块以及第一条带的更新后的第一校验块落盘至各磁盘中,即可得到改进的RAID6。Next, based on the left-handed unaligned load balancing algorithm, the updated second check block of the second stripe and the updated first check block of the first stripe are written to each disk, thereby obtaining an improved RAID6.
如表5所示,为采用异或编码,对第二条带的原始的第二校验块和第一条带的原始的第一校验块进行重新编码的落盘结果。As shown in Table 5, the original second check block of the second stripe and the original first check block of the first stripe are re-encoded and written to the disk using XOR coding.
表5 每一条带组中各数据的落盘分布表之三Table 5 The third table of the distribution of each data in each strip group
接着,在获取到异常数据块的落盘位置之后,可以根据异常数据块的落盘位置所在的不同分区,即可从目标磁盘阵列中除异常磁盘之外的磁盘中读取与异常数据块的落盘位置相对应的数据块作为目标数据块,以及与异常数据块的落盘位置相对应的目标校验块作为目标校验块。Next, after obtaining the disk location of the abnormal data block, the data block corresponding to the disk location of the abnormal data block can be read from the disks other than the abnormal disk in the target disk array as the target data block, and the target check block corresponding to the disk location of the abnormal data block can be read as the target check block.
需要说明的是,对于每一条带组,该条带组中的目标数据块的分块数量和目标校验块的分块数量之和远小于该条带组中除异常数据块之外的所有正常数据块的分块数量和校验块的分块数量之和。It should be noted that, for each stripe group, the sum of the number of blocks of the target data block and the number of blocks of the target check block in the stripe group is much smaller than the sum of the number of blocks of all normal data blocks except the abnormal data blocks and the number of blocks of the check blocks in the stripe group.
步骤103,根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复。Step 103: recover data from the abnormal disk according to the target data block and the target check block.
接着,在对每一条带组对应的异常磁盘的异常数据进行恢复时,可以根据目标数据块与目标校验块进行编码时的编码方式,也即改进的RAID6的编码方式对应的解码方式进行解码,根据解码结果对每一条带组对应的异常磁盘的异常数据进行恢复。Next, when recovering the abnormal data of the abnormal disk corresponding to each stripe group, the abnormal data of the abnormal disk corresponding to each stripe group can be recovered according to the encoding method when the target data block and the target check block are encoded, that is, the decoding method corresponding to the improved RAID6 encoding method, and the abnormal data of the abnormal disk corresponding to each stripe group can be recovered according to the decoding result.
本实施例提供数据恢复方法,通过目标磁盘阵列的每一条带组中第一条带的第一分区中的数据块编码得到的第一分区校验码、第一条带的第二分区中的数据块编码得到的第二分区校验码,以及第二条带的原始的第二校验块,分别对第一条带的原始的第一校验块和第二条带的原始的第二校验块进行更新,得到第一条带的更新后的第一校验块和第二条带的更新后的第二校验块,以在目标磁盘阵列中存在任一异常磁盘,根据该异常磁盘中异常数据块的落盘位置,在目标磁盘阵列的正常磁盘中,读取少量的目标数据块以及更新后的第一校验块或更新后的第二校验块,即可实现异常磁盘的数据恢复,无需读取目标磁盘阵列的所有数据块和所有校验块,有效数据块读取数量,减少参与运算的分块数据量,进而提高数据解码速度和数据恢复效率。The present embodiment provides a data recovery method, which obtains a first partition check code by encoding a data block in a first partition of a first stripe in each stripe group of a target disk array, a second partition check code by encoding a data block in a second partition of the first stripe, and an original second check block of the second stripe, respectively updating the original first check block of the first stripe and the original second check block of the second stripe to obtain an updated first check block of the first stripe and an updated second check block of the second stripe, so that if there is any abnormal disk in the target disk array, a small amount of target data blocks and an updated first check block or an updated second check block are read in a normal disk of the target disk array according to the disk location of the abnormal data blocks in the abnormal disk, so that data recovery of the abnormal disk can be achieved without reading all data blocks and all check blocks of the target disk array. The number of valid data blocks read can reduce the amount of block data involved in the operation, thereby improving the data decoding speed and data recovery efficiency.
在一些实施例中,所述目标数据块包括第一数据块,所述第一数据块包括所述第二条带中除所述异常数据块之外的数据块;In some embodiments, the target data block includes a first data block, and the first data block includes data blocks in the second stripe except the abnormal data block;
步骤103进一步,包括:Step 103 further includes:
对于每一所述条带组,根据所述第一数据块,对所述第二条带对应的所述异常数据块和所述第二条带的原始的第二校验块进行数据恢复;For each of the stripe groups, according to the first data block, data recovery is performed on the abnormal data block corresponding to the second stripe and the original second check block of the second stripe;
根据所述第二条带的原始的第二校验块以及所述目标校验块,对所述第一条带对应的所述异常数据块进行数据恢复。Data recovery is performed on the abnormal data block corresponding to the first stripe according to the original second check block of the second stripe and the target check block.
所称的第一数据块是每一条带组中第二条带中除异常磁盘的异常数据块之外的数据块,也即除异常磁盘之外的正常磁盘对应的第二条带中的数据块。例如,对于异常数据块为第二条带B中的第一个数据块,则第一数据块为第二条带B中除之外的剩余数据块,即目标数据块为。The so-called first data block is the data block in the second stripe of each stripe group except the abnormal data block of the abnormal disk, that is, the data block in the second stripe corresponding to the normal disk except the abnormal disk. For example, the abnormal data block is the first data block in the second stripe B. , then the first data block is the second stripe B except The remaining data blocks outside the target data block are .
可选地,在进行数据恢复过程中,对于每一条带组执行如下步骤:Optionally, during data recovery, the following steps are performed for each stripe group:
首先,在正常磁盘中读取该条带组的第二条带中的第一数据块;First, read the first data block in the second stripe of the stripe group in a normal disk;
然后,基于第一数据块,对原始RAID6的编码方程进行解码,根据解码结果对第二条带对应的异常数据块进行数据恢复,以及对第二条带的原始的第二校验块进行数据恢复。Then, based on the first data block, the original RAID6 encoding equation is decoded, and data recovery is performed on the abnormal data block corresponding to the second stripe according to the decoding result, and data recovery is performed on the original second check block of the second stripe.
在一些实施例中,对第二条带对应的异常数据块和第二条带的原始的第二校验块进行数据恢复的具体步骤包括:In some embodiments, the specific steps of recovering data of the abnormal data block corresponding to the second stripe and the original second check block of the second stripe include:
在所述正常磁盘中读取所述第二条带的原始的第一校验块;Reading an original first check block of the second stripe from the normal disk;
根据所述第一数据块以及所述第二条带的原始的第一校验块,对所述第二条带的原始的第一校验块对应的编码方程进行解码;Decoding a coding equation corresponding to the original first check block of the second stripe according to the first data block and the original first check block of the second stripe;
根据解码结果,对所述第二条带对应的所述异常数据块和所述第二条带的原始的第二校验块进行数据恢复。According to the decoding result, data recovery is performed on the abnormal data block corresponding to the second stripe and the original second check block of the second stripe.
对于任一条带中的原始的第一校验块的编码方程和原始的第二校验块的编码方程,其是采用原始RAID6编码方式进行编码得到,具体编码计算公式如下:For the original first check block in any stripe The encoding equation and the original second check block The coding equation is obtained by encoding using the original RAID6 coding method. The specific coding calculation formula is as follows:
; ;
其中,和分别为该条带中原始的第一校验块和原始的第二校验块的落盘位置;为该条带中各数据块的落盘位置;为该条带中的各数据块。in, and are the original first check blocks in the stripe and the original second check block The placement position of The disk location of each data block in the stripe; For each data block in the stripe.
可选地,对第二条带对应的异常数据块和原始的第二校验块进行数据恢复的步骤包括:Optionally, the step of recovering data of the abnormal data block corresponding to the second stripe and the original second check block includes:
首先,在正常磁盘中读取第二条带的原始的第一校验块,也即在数据落盘过程中按照上述原始RAID6编码方式编码形成的第一校验块。First, the original first check block of the second stripe is read from the normal disk, that is, the first check block encoded according to the original RAID6 encoding method in the process of data being written to the disk.
接着,根据第一数据块以及第二条带的原始的第一校验块,对RAID6的编码方程进行解码,以根据解码结果对第二条带对应的异常数据块进行数据恢复,以及对第二条带的原始的第二校验块进行数据恢复。Next, the encoding equation of RAID6 is decoded according to the first data block and the original first check block of the second stripe, so as to recover the abnormal data block corresponding to the second stripe according to the decoding result, and to recover the original second check block of the second stripe.
对于原始RAID6,在任意两个磁盘和为异常磁盘需要进行数据恢复时,假设用和分别表示和;相应地,对于任一条带共有k+2个分块数据(即k个数据块和两个校验块);因此,在进行数据恢复时,需要读取该条带中除和之外的剩余k个磁盘的数据,以获取除和这两个异常磁盘中的数据块外剩余的k个分块数据,具体解码公式如下:For the original RAID6, between any two disks and When data recovery is required for an abnormal disk, it is assumed that and Respectively and ; Accordingly, for any stripe, there are k + 2 block data (i.e., k data blocks and two check blocks); therefore, when performing data recovery, it is necessary to read all the data in the stripe except and The remaining k disks except and The specific decoding formula for the remaining k block data outside the data blocks in the two abnormal disks is as follows:
; ;
其中,为任一条带中的第个分块数据,也即该条带中的第个磁盘的分块数据;为该条带中的第个分块数据的落盘位置。in, For any band The data in the stripe is the Block data of each disk; For the first The disk location of each block of data.
相应地,在需要进行第二条带对应的异常数据块进行数据恢复,以及对第二条带的原始的第二校验块进行数据恢复也可参照上述解码公式进行解码,得到第二条带的原始的第二校验块和第二条带对应的异常数据块,如恢复条带B中的。Accordingly, when it is necessary to recover the abnormal data block corresponding to the second stripe and recover the original second check block of the second stripe, the decoding formula can be referred to to obtain the original second check block of the second stripe. The abnormal data blocks corresponding to the second stripe, such as the restored stripe B .
例如,对于第二条带B中的数据块发生异常需要进行数据恢复的情况下,可以假设第二条带的原始的第二校验块也发生异常,也即假设和两个磁盘发生错误(即当时,,即一直认为之后的一个磁盘也发生错误,当是最后一个磁盘时,则认为为第一个磁盘),数据恢复公式如下:For example, for the data block in the second stripe B If an exception occurs and data recovery is required, it can be assumed that the original second check block of the second stripe also has an exception. and Two disks have errors (that is, when hour, , that is, it has always been believed A subsequent disk also had an error. is the last disk, it is considered For the first disk), the data recovery formula is as follows:
; ;
根据上述公式,可知在进行第二条带对应的任一异常磁盘的异常数据块进行数据恢复时,仅需要读取k个磁盘的数据,相比于现有技术中在任一磁盘出现异常数据块时,需要进行剩余k+1个磁盘进行数据读取,本实施例仅需读取k个磁盘的数据,读盘量少了一个。According to the above formula, it can be known that when performing data recovery on an abnormal data block of any abnormal disk corresponding to the second stripe, it is only necessary to read data from k disks. Compared with the prior art, when an abnormal data block appears on any disk, it is necessary to read data from the remaining k+1 disks. In this embodiment, it is only necessary to read data from k disks, and the number of disks to be read is reduced by one.
本实施例提供的方法,通过根据第一数据块以及第二条带的原始的第一校验块进行解码,以对第二条带对应的异常数据块和第二条带的原始的第二校验块进行数据恢复,所需读取的数据盘数量至少减少一个,进而有效提高数据解码速度和数据恢复效率。The method provided in this embodiment performs decoding based on the first data block and the original first check block of the second stripe to recover the abnormal data block corresponding to the second stripe and the original second check block of the second stripe. The number of data disks required to be read is reduced by at least one, thereby effectively improving the data decoding speed and data recovery efficiency.
接着,在获取到第二条带的原始的第二校验块之后,可进一步地根据第二条带的原始的第二校验块与目标校验块,对第二条带的原始的第二校验块与目标校验块之间构建的编码方程进行解码得到第一分区校验码或第二分区校验码,以根据第一分区校验码对第一分区校验码对应的编码方程或根据第二分区校验码对第二分区校验码对应的编码方程进行解码,以根据解码结果对第一条带对应的异常数据块进行数据恢复。Then, after obtaining the original second check block of the second stripe, the coding equation constructed between the original second check block of the second stripe and the target check block can be further decoded according to the original second check block of the second stripe and the target check block to obtain the first partition check code or the second partition check code, so as to decode the coding equation corresponding to the first partition check code according to the first partition check code or decode the coding equation corresponding to the second partition check code according to the second partition check code, so as to recover the abnormal data block corresponding to the first stripe according to the decoding result.
本实施例提供的方法,针对每一条带组,通过读取该条带组中第二条带中除异常数据块之外的少量的数据块以及目标校验块,即可对每一条带组对应的异常数据块进行数据恢复,避免读取所有条带中的所有数据块和校验块所需消耗的数据读取时间,提高数据解码速度和数据恢复效率。The method provided in this embodiment can recover the abnormal data blocks corresponding to each stripe group by reading a small number of data blocks other than the abnormal data blocks and the target check blocks in the second stripe of the stripe group for each stripe group, thereby avoiding the data reading time consumed by reading all data blocks and check blocks in all stripes, thereby improving the data decoding speed and data recovery efficiency.
在一些实施例中,根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标校验块,包括:In some embodiments, according to the disk location of the abnormal data block, reading a target check block from a normal disk of the target disk array includes:
在所述第一条带对应的所述异常数据块的落盘位置属于所述第一分区的情况下,在所述正常磁盘中读取所述更新后的第二校验块;When the disk location of the abnormal data block corresponding to the first stripe belongs to the first partition, reading the updated second check block from the normal disk;
将所述更新后的第二校验块作为所述目标校验块。The updated second check block is used as the target check block.
可选地,将第一条带对应的异常数据块的落盘位置与第一条带的第一分区所包含的落盘位置和第二分区所包含的落盘位置进行匹配,在根据匹配结果,确定第一条带对应的异常数据块的落盘位置属于第一分区的情况下,在正常磁盘中读取更新后的第二校验块作为目标校验块,以根据更新后的第二校验块对异常磁盘快速进行数据恢复。Optionally, the disk landing position of the abnormal data block corresponding to the first stripe is matched with the disk landing position contained in the first partition of the first stripe and the disk landing position contained in the second partition. When it is determined based on the matching result that the disk landing position of the abnormal data block corresponding to the first stripe belongs to the first partition, the updated second check block is read in the normal disk as the target check block, so as to quickly recover data on the abnormal disk based on the updated second check block.
在一些实施例中,对第一条带对应的异常数据块进行数据恢复的步骤,进一步包括:In some embodiments, the step of recovering data of the abnormal data block corresponding to the first stripe further includes:
根据所述第二条带的原始的第二校验块以及所述更新后的第二校验块,获取所述第一分区校验码;Obtaining the first partition check code according to the original second check block of the second stripe and the updated second check block;
根据所述第一分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复。Data recovery is performed on the abnormal data block corresponding to the first stripe according to the first partition check code.
可选地,在获取到第二条带的原始的第二校验块以及更新后的第二校验块之后,可以进一步地根据第二条带的原始的第二校验块与更新后的第二校验块,对第二条带的原始的第二校验块与更新后的第二校验块之间构建的编码方程进行快速解码得到第一分区校验码。Optionally, after obtaining the original second check block and the updated second check block of the second stripe, the coding equation constructed between the original second check block and the updated second check block of the second stripe can be further quickly decoded based on the original second check block and the updated second check block of the second stripe to obtain the first partition check code.
此处的解码方式是与编码方式一一对应的,如在编码方式为异或编码的情况下,解码方式对应为异或解码;在编码方式为乘除编码的情况下,解码方式对应为乘除解码。The decoding method here corresponds to the encoding method one by one. For example, when the encoding method is XOR encoding, the decoding method corresponds to XOR decoding; when the encoding method is multiplication and division encoding, the decoding method corresponds to multiplication and division decoding.
在一些实施例中,所述更新后的第二校验块是基于如下步骤获取的:In some embodiments, the updated second check block is obtained based on the following steps:
对所述第一分区校验码和所述第二条带的原始的第二校验块进行异或计算,得到所述更新后的第二校验块,也即此处的更新后的第二校验块为,其中,和分别为第二条带B的原始的第二校验块和第一条带A的第一分区校验码。The first partition check code and the original second check block of the second stripe are XORed to obtain the updated second check block, that is, the updated second check block here is ,in, and They are the original second check block of the second stripe B and the first partition check code of the first stripe A respectively.
相应地,在一些实施例中,所述根据所述第二条带的原始的第二校验块以及所述更新后的第二校验块,获取所述第一分区校验码,包括:Accordingly, in some embodiments, obtaining the first partition check code according to the original second check block of the second stripe and the updated second check block includes:
将所述第二条带的原始的第二校验块与所述更新后的第二校验块进行异或计算,得到所述第一分区校验码。An XOR calculation is performed on the original second check block of the second stripe and the updated second check block to obtain the first partition check code.
可选地,将第二条带B的原始的第二校验块与更新后的第二校验块进行异或计算,即可得到第一条带A的第一分区校验码。Optionally, the original second check block of the second stripe B With the updated second check block Perform XOR calculation to get the first partition check code of the first stripe A. .
接着,在获取到第一分区校验码之后,可以根据第一分区校验码对第一分区校验码对应的编码方程进行解码,以根据解码结果对第一条带的第一分区对应的异常数据块进行快速数据恢复。Next, after the first partition check code is obtained, the coding equation corresponding to the first partition check code may be decoded according to the first partition check code, so as to quickly recover the abnormal data block corresponding to the first partition of the first stripe according to the decoding result.
在一些实施例中,在确定第一条带对应的异常数据块的落盘位置属于第一分区的情况下,所述目标数据块还包括第二数据块,所述第二数据块为所述第一分区中除所述异常数据块之外的数据块;In some embodiments, when it is determined that the disk location of the abnormal data block corresponding to the first stripe belongs to the first partition, the target data block further includes a second data block, which is a data block in the first partition except the abnormal data block;
所述根据所述第一分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复,包括:The step of recovering data of the abnormal data block corresponding to the first stripe according to the first partition check code includes:
根据所述第一分区校验码和所述第二数据块,对所述第一分区校验码的编码方程进行解码;Decoding a coding equation of the first partition check code according to the first partition check code and the second data block;
根据解码结果,对所述第一条带对应的所述异常数据块进行数据恢复。According to the decoding result, data recovery is performed on the abnormal data block corresponding to the first stripe.
可选地,在确定第一条带对应的异常数据块的落盘位置属于第一分区的情况下,从正常磁盘中读取第一条带的第一分区中除异常数据块之外的数据块,作为第二数据块。Optionally, when it is determined that the disk location of the abnormal data block corresponding to the first stripe belongs to the first partition, data blocks other than the abnormal data block in the first partition of the first stripe are read from a normal disk as second data blocks.
例如,磁盘阵列中的第一个磁盘为异常磁盘,则对于第二条带B,该磁盘的数据块发生错误需要恢复,对于第一条带A,该磁盘的异常数据块发生错误需要恢复;由于异常数据块的落盘位置属于第一分区,则需要读取第一条带A中除异常数据块之外的数据块作为第二数据块;其中,k为第一条带中数据块的数量。For example, if the first disk in the disk array is an abnormal disk, then for the second stripe B, the data block of the disk An error occurs and recovery is required. For the first stripe A, the abnormal data block of the disk An error occurred and recovery is required; due to abnormal data blocks The disk location belongs to the first partition, so it is necessary to read the first stripe A except for the abnormal data blocks. The data block outside is used as the second data block ; Where k is the number of data blocks in the first stripe.
接着,根据第一分区校验码和第二数据块,对第一分区校验码和第二数据块之间构建的编码方程进行解密,以根据解码结果对第一条带对应的异常数据块进行数据恢复,如恢复条带A中的。Next, according to the first partition check code and the second data block, the coding equation constructed between the first partition check code and the second data block is decrypted to recover the abnormal data block corresponding to the first stripe according to the decoding result, such as recovering the abnormal data block in stripe A. .
需要说明的是,对于第一分区对应的其他异常磁盘,如第个磁盘为异常磁盘,也可以按照上述方式进行数据恢复,此处不再赘述。It should be noted that for other abnormal disks corresponding to the first partition, such as If a disk is abnormal, data can be recovered in the above way, which will not be described here.
综上,本实施例提供的方法,对于每一条带组,按照第二条带的原始的第二校验块以及更新后的第二校验块,即可获取第一分区校验码,以根据第一分区校验码,即可对第一条带的第一分区对应的异常数据块进行数据恢复,避免对所有磁盘进行数据读取,整个解码过程中仅需读取第二条带的k+1个分块数据(也即k-1个第一数据块和一个更新后的第二校验块以及原始的第一校验块)以及第一条带的个分块数据(即个第二数据块),相应地,每一条带组的总数据读取量为,相比与现有技术中需要读取个磁盘的数据,读盘量减少25%,实现大大减少数据读取量,进而提高数据恢复效率。In summary, the method provided in this embodiment can obtain the first partition check code for each stripe group according to the original second check block and the updated second check block of the second stripe, so that the abnormal data block corresponding to the first partition of the first stripe can be recovered according to the first partition check code, avoiding data reading from all disks. In the entire decoding process, only k+1 block data of the second stripe (that is, k-1 first data blocks and an updated second check block and the original first check block) and the first stripe need to be read. Block data (i.e. The total data read amount of each stripe group is , compared with the prior art which requires reading The data of each disk can be read, and the disk reading volume can be reduced by 25%, which greatly reduces the data reading volume and thus improves the data recovery efficiency.
在一些实施例中,根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标校验块,包括:In some embodiments, according to the disk location of the abnormal data block, reading a target check block from a normal disk of the target disk array includes:
在所述第一条带对应的所述异常数据块的落盘位置属于所述第二分区的情况下,在所述正常磁盘中读取所述更新后的第一校验块;When the disk location of the abnormal data block corresponding to the first stripe belongs to the second partition, reading the updated first check block from the normal disk;
将所述更新后的第一校验块作为所述目标校验块。The updated first check block is used as the target check block.
可选地,将第一条带对应的异常数据块的落盘位置与第一条带的第一分区所包含的落盘位置和第二分区所包含的落盘位置进行匹配,在根据匹配结果,确定第一条带对应的异常数据块的落盘位置属于第二分区的情况下,在正常磁盘中读取更新后的第一校验块作为目标校验块,以根据更新后的第一校验块对异常磁盘快速进行数据恢复。Optionally, the disk landing position of the abnormal data block corresponding to the first stripe is matched with the disk landing position contained in the first partition of the first stripe and the disk landing position contained in the second partition. When it is determined based on the matching result that the disk landing position of the abnormal data block corresponding to the first stripe belongs to the second partition, the updated first check block is read in the normal disk as the target check block, so as to quickly perform data recovery on the abnormal disk based on the updated first check block.
在一些实施例中,对第一条带对应的异常数据块进行数据恢复的步骤,进一步包括:In some embodiments, the step of recovering data of the abnormal data block corresponding to the first stripe further includes:
根据所述第二条带的原始的第二校验块以及所述更新后的第一校验块,获取所述第二分区校验码;Acquire the second partition check code according to the original second check block of the second stripe and the updated first check block;
根据所述第二分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复。Data recovery is performed on the abnormal data block corresponding to the first stripe according to the second partition check code.
可选地,在获取到第二条带的原始的第二校验块以及更新后的第一校验块之后,可以进一步地根据第二条带的原始的第二校验块与更新后的第一校验块,对第二条带的原始的第二校验块与更新后的第一校验块之间构建的编码方程进行解码,快速恢复得到第二分区校验码。Optionally, after obtaining the original second check block and the updated first check block of the second stripe, the encoding equation constructed between the original second check block and the updated first check block of the second stripe can be further decoded according to the original second check block and the updated first check block of the second stripe to quickly recover the second partition check code. .
此处的解码方式是与编码方式一一对应的,如在编码方式为异或编码的情况下,解码方式对应为异或解码;在编码方式为乘除编码的情况下,解码方式对应为乘除解码,以提高编解码的适用性。The decoding method here corresponds to the encoding method one by one. For example, when the encoding method is XOR encoding, the decoding method corresponds to XOR decoding; when the encoding method is multiplication and division encoding, the decoding method corresponds to multiplication and division decoding, so as to improve the applicability of encoding and decoding.
在一些实例中,所述更新后的第一校验块是基于如下步骤确定的:In some examples, the updated first check block is determined based on the following steps:
对所述第二分区校验码和所述第二条带的原始的第二校验块进行异或计算,得到所述更新后的第一校验块。也即此处的更新后的第一校验块为,其中,和分别为第二条带B的原始的第二校验块和第一条带A的第二分区校验码。The second partition check code and the original second check block of the second stripe are XORed to obtain the updated first check block. That is, the updated first check block here is ,in, and They are the original second check block of the second stripe B and the second partition check code of the first stripe A respectively.
相应地,在一些实例中,所述根据所述第二条带的原始的第二校验块以及所述更新后的第一校验块,获取所述第二分区校验码,包括:Accordingly, in some examples, obtaining the second partition check code according to the original second check block of the second stripe and the updated first check block includes:
将所述第二条带的原始的第二校验块与所述更新后的第一校验块进行异或计算,得到所述第二分区校验码。An XOR calculation is performed on the original second check block of the second stripe and the updated first check block to obtain the second partition check code.
可选地,将第二条带B的原始的第二校验块与更新后的第一校验块进行异或计算,即可得到第一条带A的第二分区校验码。Optionally, the original second check block of the second stripe B With the updated first check block Perform XOR calculation to get the second partition check code of the first strip A. .
接着,在获取到第二分区校验码之后,可以根据第二分区校验码对第二分区校验码对应的编码方程进行解码,以根据解码结果对第一条带的第二分区对应的异常数据块进行快速数据恢复。Next, after the second partition check code is obtained, the encoding equation corresponding to the second partition check code may be decoded according to the second partition check code, so as to quickly recover the abnormal data block corresponding to the second partition of the first stripe according to the decoding result.
在一些实施例中,在确定第一条带对应的异常数据块的落盘位置属于第二分区的情况下,所述目标数据块还包括第三数据块,所述第三数据块为所述第二分区中除所述异常数据块之外的数据块;In some embodiments, when it is determined that the disk location of the abnormal data block corresponding to the first stripe belongs to the second partition, the target data block further includes a third data block, which is a data block in the second partition except the abnormal data block;
所述根据所述第二分区校验码,对所述第一条带对应的所述异常数据块进行数据恢复,包括:The step of recovering the abnormal data block corresponding to the first stripe according to the second partition check code includes:
根据所述第二分区校验码和所述第三数据块,对所述第二分区校验码的编码方程进行解码;Decoding the encoding equation of the second partition check code according to the second partition check code and the third data block;
根据解码结果,对所述第一条带对应的所述异常数据块进行数据恢复。According to the decoding result, data recovery is performed on the abnormal data block corresponding to the first stripe.
可选地,在确定第一条带对应的异常数据块的落盘位置属于第二分区的情况下,从正常磁盘中读取第一条带的第二分区中除异常数据块之外的数据块,作为第三数据块。Optionally, when it is determined that the disk location of the abnormal data block corresponding to the first stripe belongs to the second partition, data blocks other than the abnormal data block in the second partition of the first stripe are read from a normal disk as third data blocks.
例如,磁盘阵列中的第个磁盘为异常磁盘,则对于第二条带B,该磁盘的数据块发生错误需要恢复,对于第一条带A,该磁盘的异常数据块发生错误需要恢复;由于异常数据块落盘位置属于第一条带的第二分区,则需要读取第一条带A中除异常数据块之外的数据块作为第三数据块。For example, the first If a disk is an abnormal disk, then for the second stripe B, the data block of the disk An error occurs and recovery is required. For the first stripe A, the abnormal data block of the disk An error occurred and recovery is required; due to abnormal data blocks The disk location belongs to the second partition of the first stripe, so it is necessary to read the data blocks except the abnormal data blocks in the first stripe A. Data blocks other than As the third data block.
接着,根据第二分区校验码和第三数据块,对第二分区校验码和第三数据块之间构建的编码方程进行解码,以根据解码结果对第一条带对应的异常数据块进行数据恢复,如恢复条带A中的。Next, according to the second partition check code and the third data block, the coding equation constructed between the second partition check code and the third data block is decoded, so as to recover the abnormal data block corresponding to the first stripe according to the decoding result, such as recovering the abnormal data block in stripe A. .
需要说明的是,对于第二分区对应的其他异常磁盘,如第个磁盘为异常磁盘,也可以按照上述方式进行数据恢复,此处不再赘述。It should be noted that for other abnormal disks corresponding to the second partition, such as If a disk is abnormal, data can be recovered in the above way, which will not be described here.
综上,本实施例提供的方法,对于每一条带组,在第一条带对应的异常数据块属于第二分区的情况下,按照原始的第二校验块以及更新后的第一校验块,即可获取第二分区校验码,以根据第二分区校验码,即可对第一条带的第二分区对应的异常数据块进行数据恢复,避免对所有磁盘进行数据读取,整个解码过程中仅需读取第二条带的k个分块数据(也即k-1个第一数据块和一个原始的第一校验块)以及第一条带的个分块数据(即个第三数据块,以及一个更新后的第一校验块),相应地,每一条带组的总数据读取量为,相比与现有技术中需要读取个磁盘的数据,读盘量减少25%,实现大大减少数据读取量,进而提高数据恢复效率。In summary, the method provided in this embodiment, for each stripe group, when the abnormal data block corresponding to the first stripe belongs to the second partition, the second partition check code can be obtained according to the original second check block and the updated first check block, so that the abnormal data block corresponding to the second partition of the first stripe can be recovered according to the second partition check code, avoiding data reading from all disks. In the entire decoding process, only k block data of the second stripe (that is, k-1 first data blocks and one original first check block) and the first stripe need to be read. Block data (i.e. The total data read amount of each stripe group is , compared with the prior art which requires reading The data of each disk can be read, and the disk reading volume can be reduced by 25%, which greatly reduces the data reading volume and thus improves the data recovery efficiency.
需要说明的是,当第k+1和k+2个数据盘发生错误时,也可按照上述改进的RAID6的编解码方式进行数据恢复,所要读取的数据盘数据为2k个盘,此处不再赘述。It should be noted that when errors occur in the k+1th and k+2th data disks, data recovery can also be performed according to the above-mentioned improved RAID6 encoding and decoding method. The data disks to be read are 2k disks, which will not be repeated here.
以下以具体的实例,对本实施例中的数据恢复方法展开具体描述。The data recovery method in this embodiment is described in detail below with reference to a specific example.
例如,当目标磁盘阵列中的第一个磁盘发生错误时,对于每一条带组中的第二条带B,该磁盘的数据块发生错误需要恢复时,需要从除第一个磁盘之外的正常磁盘中读取第二条带B中除之外的数据块,也即第一数据块,以及第二条带的原始的第一校验块;接着,根据原始RAID6中在任意两个磁盘为异常磁盘需要进行数据恢复时的解码公式进行解码,以根据解码结果,恢复得到第二条带的原始的第二校验块和;对于每一条带组中的第一条带A,该磁盘的数据块发生错误需要恢复时,从正常磁盘中读取第二条带的更新后的第二校验块,与第二条带B的原始的第二校验块进行异或计算,得到第一分区校验码;接着,在正常磁盘中,读取第一条带A的第一分区中除异常数据块之外的数据块,也即第二数据块,根据第一分区校验码和第二数据块对第一分区校验码对应的编码方程进行解码,即可恢复异常数据块。For example, when an error occurs on the first disk in the target disk array, the data block of the disk is lost for the second stripe B in each stripe group. When an error occurs and recovery is required, the data in the second stripe B except the first disk needs to be read from a normal disk other than the first disk. The data blocks other than the first data block, that is, the first data block, and the original first check block of the second stripe; then, decoding is performed according to the decoding formula in the original RAID6 when any two disks are abnormal disks and data recovery is required, so as to recover the original second check block of the second stripe according to the decoding result and ; For the first stripe A in each stripe group, the data block of the disk When an error occurs and recovery is required, the updated second check block of the second stripe is read from the normal disk. , and the original second check block of the second stripe B Perform XOR calculation to get the first partition check code ; Then, in the normal disk, read the first partition of the first stripe A except for the abnormal data blocks The data block outside, that is, the second data block , according to the first partition check code and the second data block, the encoding equation corresponding to the first partition check code is decoded to recover the abnormal data block .
当目标磁盘阵列中的第个磁盘发生错误时,对于每一条带组中的第二条带B,该磁盘的数据块发生错误需要恢复时,需要从除第个磁盘之外的正常磁盘中读取第二条带B中除之外的数据块,也即第一数据块,以及第二条带的原始的第一校验块;接着,根据原始RAID6中在任意两个磁盘为异常磁盘需要进行数据恢复时的解码公式进行解码,以根据解码结果,恢复得到第二条带的原始的第二校验块和;对于每一条带组中的第一条带A,该磁盘的数据块发生错误需要恢复时,从正常磁盘中读取第一条带的更新后的第一校验块,与第二条带B的原始的第二校验块进行异或计算,得到第一分区校验码;接着,在正常磁盘中,读取第一条带A的第二分区中除异常数据块之外的数据块,也即第三数据块,根据第二分区校验码和第三数据块对第二分区校验码对应的编码方程进行解码,即可恢复异常数据块。When the target disk array When an error occurs on a disk, for the second stripe B in each stripe group, the data block of the disk When an error occurs and recovery is required, you need to Read the second stripe B from a normal disk other than the disk The data blocks other than the first data block, that is, the first data block, and the original first check block of the second stripe; then, decoding is performed according to the decoding formula in the original RAID6 when any two disks are abnormal disks and data recovery is required, so as to recover the original second check block of the second stripe according to the decoding result and ; For the first stripe A in each stripe group, the data block of the disk When an error occurs and recovery is required, the updated first check block of the first stripe is read from the normal disk. , and the original second check block of the second stripe B Perform XOR calculation to get the first partition check code ; Then, in the normal disk, read the second partition of the first stripe A except for the abnormal data blocks The data block outside, that is, the third data block , according to the second partition check code and the third data block, the encoding equation corresponding to the second partition check code is decoded to recover the abnormal data block .
由于RAID6的设计是为了使得RAID组完成后,可以实现任意两个或一个的磁盘组中的错误,都可以被恢复,是当今通用存储产品应用最多的纠删方案。而原始RAID6的错误恢复需要读取剩余所有的数据进行计算,导致数据恢复性能差,本实施例通过对每一条带组中的第一条带的原始的第一校验块以及第二条带的原始的第二校验块进行重新编码,当单一磁盘的数据块发生错误时,数据读取量可以减少25%,从而提升解码速度,进而提升数据恢复性能。Since RAID6 is designed to enable errors in any two or one disk group to be recovered after the RAID group is completed, it is the most widely used erasure scheme in current general storage products. However, the error recovery of the original RAID6 requires reading all the remaining data for calculation, resulting in poor data recovery performance. This embodiment re-encodes the original first check block of the first stripe and the original second check block of the second stripe in each stripe group. When an error occurs in a data block of a single disk, the data reading amount can be reduced by 25%, thereby improving the decoding speed and further improving the data recovery performance.
下面对本发明提供的数据恢复装置进行描述,下文描述的数据恢复装置与上文描述的数据恢复方法可相互对应参照。The data recovery device provided by the present invention is described below. The data recovery device described below and the data recovery method described above can be referred to each other.
如图2所示,本实施例提供一种数据恢复装置的结构示意图,该装置包括:As shown in FIG2 , this embodiment provides a schematic diagram of the structure of a data recovery device, which includes:
获取模块201用于在目标磁盘阵列中存在任一异常磁盘的情况下,获取所述异常磁盘中异常数据块的落盘位置;The acquisition module 201 is used to acquire the disk location of the abnormal data block in the abnormal disk when there is any abnormal disk in the target disk array;
读取模块202用于根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标数据块以及目标校验块;The reading module 202 is used to read the target data block and the target check block in the normal disk of the target disk array according to the disk location of the abnormal data block;
恢复模块203用于根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复;The recovery module 203 is used to recover data of the abnormal disk according to the target data block and the target check block;
其中,所述正常磁盘为所述目标磁盘阵列中除所述异常磁盘之外的磁盘;Wherein, the normal disk is a disk in the target disk array except the abnormal disk;
所述目标校验块包括所述目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或每一所述条带组中第二条带的更新后的第二校验块;所述更新后的第二校验块是根据第一分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述更新后的第一校验块是根据第二分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述第一分区校验码是根据所述第一条带的第一分区中的数据块进行编码得到的,所述第二分区校验码是根据所述第一条带的第二分区中的数据块进行编码得到的。The target check block includes an updated first check block of the first stripe in each stripe group of the target disk array or an updated second check block of the second stripe in each stripe group; the updated second check block is updated according to the first partition check code and the original second check block of the second stripe; the updated first check block is updated according to the second partition check code and the original second check block of the second stripe; the first partition check code is encoded according to the data blocks in the first partition of the first stripe, and the second partition check code is encoded according to the data blocks in the second partition of the first stripe.
本实施例提供的数据恢复装置,通过目标磁盘阵列的每一条带组中第一条带的第一分区中的数据块编码得到的第一分区校验码、第一条带的第二分区中的数据块编码得到的第二分区校验码,以及第二条带的原始的第二校验块,分别对第一条带的原始的第一校验块和第二条带的原始的第二校验块进行更新,得到第一条带的更新后的第一校验块和第二条带的更新后的第二校验块,以在目标磁盘阵列中存在任一异常磁盘,根据该异常磁盘中异常数据块的落盘位置,在目标磁盘阵列的正常磁盘中,读取少量的目标数据块以及更新后的第一校验块或更新后的第二校验块,即可实现异常磁盘的数据恢复,无需读取目标磁盘阵列的所有数据块和所有校验块,有效数据块读取数量,减少参与运算的分块数据量,进而提高数据解码速度和数据恢复效率。The data recovery device provided in the present embodiment updates the original first check block of the first stripe and the original second check block of the second stripe respectively through the first partition check code obtained by encoding the data blocks in the first partition of the first stripe in each stripe group of the target disk array, the second partition check code obtained by encoding the data blocks in the second partition of the first stripe, and the original second check block of the second stripe, so as to obtain the updated first check block of the first stripe and the updated second check block of the second stripe, so that if there is any abnormal disk in the target disk array, according to the disk location of the abnormal data blocks in the abnormal disk, a small amount of target data blocks and the updated first check block or the updated second check block are read in the normal disk of the target disk array, so as to realize data recovery of the abnormal disk, without reading all the data blocks and all the check blocks of the target disk array, and the number of valid data blocks read is reduced, thereby reducing the amount of block data involved in the operation, thereby improving the data decoding speed and data recovery efficiency.
如图3所示,本实施例还提供一种数据恢复系统,该系统包括目标磁盘阵列302和磁盘控制器301;目标磁盘阵列302与磁盘控制器301连接,以便磁盘控制器301通过执行数据恢复步骤,对目标磁盘阵列302中的异常磁盘进行数据恢复,具体数据恢复步骤参见图1所示,此处不做赘述。As shown in FIG3 , this embodiment further provides a data recovery system, which includes a target disk array 302 and a disk controller 301; the target disk array 302 is connected to the disk controller 301 so that the disk controller 301 recovers data on abnormal disks in the target disk array 302 by executing data recovery steps. The specific data recovery steps are shown in FIG1 and are not described in detail here.
图4示例了一种电子设备的实体结构示意图,如图4所示,该电子设备可以包括:处理器(processor)401、通信接口(Communications Interface)402、存储器(memory)403和通信总线404,其中,处理器401,通信接口402,存储器403通过通信总线404完成相互间的通信。处理器401可以调用存储器403中的逻辑指令,以执行数据恢复方法,该方法包括:在目标磁盘阵列中存在任一异常磁盘的情况下,获取所述异常磁盘中异常数据块的落盘位置;根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标数据块以及目标校验块;根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复;其中,所述正常磁盘为所述目标磁盘阵列中除所述异常磁盘之外的磁盘;所述目标校验块包括所述目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或每一所述条带组中第二条带的更新后的第二校验块;所述更新后的第二校验块是根据第一分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述更新后的第一校验块是根据第二分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述第一分区校验码是根据所述第一条带的第一分区中的数据块进行编码得到的,所述第二分区校验码是根据所述第一条带的第二分区中的数据块进行编码得到的。Figure 4 illustrates a schematic diagram of the physical structure of an electronic device. As shown in Figure 4, the electronic device may include: a processor (processor) 401, a communication interface (Communications Interface) 402, a memory (memory) 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404. The processor 401 can call the logic instructions in the memory 403 to execute the data recovery method, which includes: in the case that there is any abnormal disk in the target disk array, obtaining the disk location of the abnormal data block in the abnormal disk; according to the disk location of the abnormal data block, reading the target data block and the target check block in the normal disk of the target disk array; recovering the data of the abnormal disk according to the target data block and the target check block; wherein the normal disk is a disk other than the abnormal disk in the target disk array; the target check block includes an updated first check block of the first stripe in each stripe group of the target disk array or an updated second check block of the second stripe in each stripe group; the updated second check block is updated according to the first partition check code and the original second check block of the second stripe; the updated first check block is updated according to the second partition check code and the original second check block of the second stripe; the first partition check code is encoded according to the data block in the first partition of the first stripe, and the second partition check code is encoded according to the data block in the second partition of the first stripe.
此外,上述的存储器403中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the logic instructions in the above-mentioned memory 403 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
另一方面,本发明还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各方法所提供的数据恢复方法,该方法包括:在目标磁盘阵列中存在任一异常磁盘的情况下,获取所述异常磁盘中异常数据块的落盘位置;根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标数据块以及目标校验块;根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复;其中,所述正常磁盘为所述目标磁盘阵列中除所述异常磁盘之外的磁盘;所述目标校验块包括所述目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或每一所述条带组中第二条带的更新后的第二校验块;所述更新后的第二校验块是根据第一分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述更新后的第一校验块是根据第二分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述第一分区校验码是根据所述第一条带的第一分区中的数据块进行编码得到的,所述第二分区校验码是根据所述第一条带的第二分区中的数据块进行编码得到的。On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data recovery method provided by the above methods, the method comprising: in the case that there is any abnormal disk in the target disk array, obtaining the disk location of the abnormal data block in the abnormal disk; according to the disk location of the abnormal data block, in the normal disk of the target disk array, reading the target data block and the target check block; according to the target data block and the target check block, recovering data from the abnormal disk; wherein the normal disk is the target disk a disk in the disk array except the abnormal disk; the target check block includes an updated first check block of the first stripe in each stripe group of the target disk array or an updated second check block of the second stripe in each stripe group; the updated second check block is updated according to the first partition check code and the original second check block of the second stripe; the updated first check block is updated according to the second partition check code and the original second check block of the second stripe; the first partition check code is encoded according to the data block in the first partition of the first stripe, and the second partition check code is encoded according to the data block in the second partition of the first stripe.
又一方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的数据恢复方法,该方法包括:在目标磁盘阵列中存在任一异常磁盘的情况下,获取所述异常磁盘中异常数据块的落盘位置;根据所述异常数据块的落盘位置,在所述目标磁盘阵列的正常磁盘中,读取目标数据块以及目标校验块;根据所述目标数据块以及所述目标校验块,对所述异常磁盘进行数据恢复;其中,所述正常磁盘为所述目标磁盘阵列中除所述异常磁盘之外的磁盘;所述目标校验块包括所述目标磁盘阵列的每一条带组中第一条带的更新后的第一校验块或每一所述条带组中第二条带的更新后的第二校验块;所述更新后的第二校验块是根据第一分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述更新后的第一校验块是根据第二分区校验码和所述第二条带的原始的第二校验块进行更新得到的;所述第一分区校验码是根据所述第一条带的第一分区中的数据块进行编码得到的,所述第二分区校验码是根据所述第一条带的第二分区中的数据块进行编码得到的。On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the data recovery method provided by the above methods, the method comprising: in the case where there is any abnormal disk in the target disk array, obtaining the disk location of the abnormal data block in the abnormal disk; according to the disk location of the abnormal data block, reading the target data block and the target check block in the normal disk of the target disk array; recovering data from the abnormal disk according to the target data block and the target check block; wherein the normal disk is the disk in the target disk array other than the abnormal disk. disk; the target check block includes an updated first check block of the first stripe in each stripe group of the target disk array or an updated second check block of the second stripe in each stripe group; the updated second check block is updated according to the first partition check code and the original second check block of the second stripe; the updated first check block is updated according to the second partition check code and the original second check block of the second stripe; the first partition check code is encoded according to the data block in the first partition of the first stripe, and the second partition check code is encoded according to the data block in the second partition of the first stripe.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (22)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310747986.8A CN116501553B (en) | 2023-06-25 | 2023-06-25 | Data recovery method, device, system, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310747986.8A CN116501553B (en) | 2023-06-25 | 2023-06-25 | Data recovery method, device, system, electronic equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116501553A CN116501553A (en) | 2023-07-28 |
| CN116501553B true CN116501553B (en) | 2023-09-19 |
Family
ID=87320489
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310747986.8A Active CN116501553B (en) | 2023-06-25 | 2023-06-25 | Data recovery method, device, system, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116501553B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117312054B (en) * | 2023-10-30 | 2024-05-14 | 广州鼎甲计算机科技有限公司 | Target data recovery method and device of disk array and computer equipment |
| CN118069406B (en) * | 2024-04-16 | 2024-08-16 | 苏州元脑智能科技有限公司 | Stored data verification system and method |
| CN118778911B (en) * | 2024-09-12 | 2025-01-24 | 山东云海国创云计算装备产业创新中心有限公司 | Disk array data migration method, device, product, equipment and storage medium |
| CN119782031A (en) * | 2025-03-13 | 2025-04-08 | 山东云海国创云计算装备产业创新中心有限公司 | Disk abnormality processing method, device, equipment and storage medium |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102033716A (en) * | 2010-12-01 | 2011-04-27 | 北京同有飞骥科技股份有限公司 | Method for constructing energy-saving type disc array with double discs for fault tolerance |
| CN102520883A (en) * | 2011-12-12 | 2012-06-27 | 杭州华三通信技术有限公司 | Data access method and device thereof |
| CN108089892A (en) * | 2017-12-13 | 2018-05-29 | 深圳市创维软件有限公司 | A kind of method, apparatus of safety startup of system, set-top box and storage medium |
| CN111930552A (en) * | 2020-06-17 | 2020-11-13 | 深圳佰维存储科技股份有限公司 | Bad block data recovery method and device, storage medium and electronic equipment |
| CN114090345A (en) * | 2022-01-21 | 2022-02-25 | 苏州浪潮智能科技有限公司 | A disk array data recovery method, system, storage medium and device |
| CN114116297A (en) * | 2022-01-27 | 2022-03-01 | 苏州浪潮智能科技有限公司 | A data encoding method, device, equipment and medium |
| CN114153651A (en) * | 2022-02-09 | 2022-03-08 | 苏州浪潮智能科技有限公司 | A data encoding method, device, equipment and medium |
| US11314594B2 (en) * | 2020-03-09 | 2022-04-26 | EMC IP Holding Company LLC | Method, device and computer program product for recovering data |
| CN114610525A (en) * | 2022-03-18 | 2022-06-10 | 山东云海国创云计算装备产业创新中心有限公司 | Data updating method, system and storage medium for disk array |
| WO2022127289A1 (en) * | 2020-12-18 | 2022-06-23 | 苏州浪潮智能科技有限公司 | Method and system for performing check recovery based on gaussian elimination, device, and medium |
| CN114756402A (en) * | 2022-04-15 | 2022-07-15 | 山东云海国创云计算装备产业创新中心有限公司 | Method, system, device and medium for ensuring data security when RAID group updates data |
| CN115080303A (en) * | 2022-07-26 | 2022-09-20 | 苏州浪潮智能科技有限公司 | Encoding method, decoding method, device and medium for RAID6 disk array |
-
2023
- 2023-06-25 CN CN202310747986.8A patent/CN116501553B/en active Active
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102033716A (en) * | 2010-12-01 | 2011-04-27 | 北京同有飞骥科技股份有限公司 | Method for constructing energy-saving type disc array with double discs for fault tolerance |
| CN102520883A (en) * | 2011-12-12 | 2012-06-27 | 杭州华三通信技术有限公司 | Data access method and device thereof |
| CN108089892A (en) * | 2017-12-13 | 2018-05-29 | 深圳市创维软件有限公司 | A kind of method, apparatus of safety startup of system, set-top box and storage medium |
| US11314594B2 (en) * | 2020-03-09 | 2022-04-26 | EMC IP Holding Company LLC | Method, device and computer program product for recovering data |
| CN111930552A (en) * | 2020-06-17 | 2020-11-13 | 深圳佰维存储科技股份有限公司 | Bad block data recovery method and device, storage medium and electronic equipment |
| WO2022127289A1 (en) * | 2020-12-18 | 2022-06-23 | 苏州浪潮智能科技有限公司 | Method and system for performing check recovery based on gaussian elimination, device, and medium |
| CN114090345A (en) * | 2022-01-21 | 2022-02-25 | 苏州浪潮智能科技有限公司 | A disk array data recovery method, system, storage medium and device |
| CN114116297A (en) * | 2022-01-27 | 2022-03-01 | 苏州浪潮智能科技有限公司 | A data encoding method, device, equipment and medium |
| CN114153651A (en) * | 2022-02-09 | 2022-03-08 | 苏州浪潮智能科技有限公司 | A data encoding method, device, equipment and medium |
| CN114610525A (en) * | 2022-03-18 | 2022-06-10 | 山东云海国创云计算装备产业创新中心有限公司 | Data updating method, system and storage medium for disk array |
| CN114756402A (en) * | 2022-04-15 | 2022-07-15 | 山东云海国创云计算装备产业创新中心有限公司 | Method, system, device and medium for ensuring data security when RAID group updates data |
| CN115080303A (en) * | 2022-07-26 | 2022-09-20 | 苏州浪潮智能科技有限公司 | Encoding method, decoding method, device and medium for RAID6 disk array |
Non-Patent Citations (1)
| Title |
|---|
| RAID5磁盘阵列数据恢复;李清;;中国新通信(10);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116501553A (en) | 2023-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN116501553B (en) | Data recovery method, device, system, electronic equipment and storage medium | |
| CN112860475B (en) | Method, device, system and medium for recovering check block based on RS erasure code | |
| US11531593B2 (en) | Data encoding, decoding and recovering method for a distributed storage system | |
| CN114281270B (en) | A data storage method, system, device and medium | |
| CN109643258B (en) | Multi-node repair of erasure codes using high-rate minimal storage regeneration | |
| CN101625652B (en) | Multi-disk fault-tolerant system and methods for generating check block and recovering data block | |
| CN116501537B (en) | Disk array switching method, system, electronic device and storage medium | |
| CN115080303B (en) | Encoding method, decoding method, device and medium of RAID6 disk array | |
| CN113297001B (en) | RAID (redundant array of independent disks) coding and decoding method and coding and decoding circuit | |
| CN101719086B (en) | Fault-tolerant processing method and device of disk array and fault-tolerant system | |
| CN107656832A (en) | A kind of correcting and eleting codes method of low data reconstruction expense | |
| CN103577274A (en) | Management method and device of memory array | |
| CN106874140B (en) | Data storage method and device | |
| CN114610244A (en) | Method, system and equipment for degrading independent redundant disk array | |
| CN114115729B (en) | An Efficient Data Migration Method under RAID | |
| CN114610525A (en) | Data updating method, system and storage medium for disk array | |
| CN112000512A (en) | Data restoration method and related device | |
| CN114816278A (en) | Data migration method, system, equipment and storage medium of storage server | |
| CN103605582B (en) | Erasure code storage and reconfiguration optimization method based on redirect-on-write | |
| CN114895842A (en) | A TP-RAID encoding and decoding method, system, device and storage medium | |
| CN113258938A (en) | Construction method for rapidly repairing erasure codes in single-node fault | |
| CN114816837A (en) | Erasure code fusion method and system, electronic device and storage medium | |
| CN115113816A (en) | An erasure code data processing system, method, computer equipment and medium | |
| CN116248129A (en) | A fault-tolerant data segmentation compression method, recovery method, device and system | |
| CN115454712B (en) | A check code recovery method, system, electronic equipment and storage medium |
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 | ||
| CP03 | Change of name, title or address |
Address after: 215128 Building 9, No. 1, Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou, Jiangsu Province Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd. Country or region after: China Address before: 215128 Building 9, No. 1, Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou, Jiangsu Province Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Country or region before: China |