CN-122019260-A - Data reconstruction method, apparatus, computer device, storage medium, and program product
Abstract
The present application relates to a data reconstruction method, apparatus, computer device, storage medium and program product. The method comprises the steps of sequentially carrying out data reconstruction on each fault disk in the disk array to obtain reconstruction data of each fault disk, and carrying out data reconstruction on the disk array based on the reconstruction data of each fault disk. And in the data reconstruction process, each time the data of one fault disk is reconstructed, the reconstructed data of the corresponding fault disk is stored in the hot spare disk inserted into the slot position of the last fault disk, and the slot position of the corresponding fault disk is released for inserting a new hot spare disk. By adopting the method, the reconstruction of the multi-disk data of the disk array can be completed under the condition of insufficient hot standby space.
Inventors
- CAO LONGJIE
- ZHOU HOUBING
- HE ZHEN
- LI RONGGUANG
- Mao xinrui
Assignees
- 曙光信息产业股份有限公司
- 曙光信息产业(北京)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241107
Claims (12)
- 1. A method of data reconstruction, the method comprising: Carrying out data reconstruction on each fault disk in the disk array in sequence to obtain reconstruction data of each fault disk, wherein each time the data reconstruction of one fault disk is carried out in the data reconstruction process, the reconstruction data of the corresponding fault disk is stored in a hot spare disk inserted into a slot position of the last fault disk, and the slot position of the corresponding fault disk is released for inserting a new hot spare disk; and carrying out data reconstruction on the disk array based on the reconstruction data of each fault disk.
- 2. The method of claim 1, wherein the sequentially reconstructing data for each failed disk in the disk array to obtain reconstructed data for each failed disk comprises: For any fault disk, acquiring a data strip corresponding to each fault data block in the fault disk; Determining user data fault blocks in the fault disk based on the positions of the fault data blocks in the data stripes; recovering the data in the user data fault block to obtain user repair data; and obtaining the reconstruction data of the fault disk based on the user repair data.
- 3. The method according to claim 2, wherein the obtaining the data stripe corresponding to each failed data block in the failed disk includes: acquiring original strips corresponding to the fault data blocks in the fault disks; And setting the fault data block in each original stripe as an invalid data block to obtain a data stripe corresponding to each fault data block.
- 4. The method according to claim 2, wherein recovering the data in the user data fault block to obtain user repair data comprises: for any user data fault block, acquiring normal data blocks except the user data fault block in a data band to which the user data fault block belongs; and decoding the data in each normal data block, and recovering to obtain the user repair data corresponding to the user data fault block.
- 5. The method of claim 2, wherein the user repair data comprises a plurality of user repair data, and wherein the obtaining reconstructed data for the failed disk based on the user repair data comprises: Writing each user repair data into a data block in a hot spare disk inserted into a slot position of the last fault disk to obtain a plurality of user data columns; Combining the user data columns according to the data column length threshold to obtain at least one reconstruction band; Encoding the user repair data in each reconstructed strip to obtain the verification data of each reconstructed strip; and determining the user repair data in each reconstructed stripe and the verification data of each reconstructed stripe as the reconstruction data of the fault disk.
- 6. The method of any of claims 1-5, wherein the reconstructing the data of the disk array based on the reconstructed data of each failed disk comprises: acquiring data strips corresponding to each fault data block in each fault disk; Removing fault data blocks in each data strip to obtain a plurality of strips to be recombined; Reorganizing the user data in each stripe to be reorganized to obtain reorganized data of the disk array; And determining the reconstruction data of the disk array according to the reconstruction data of each fault disk and the reconstruction data of the disk array.
- 7. The method of claim 6, wherein reorganizing the user data in each stripe to be reorganized to obtain reorganized data of the disk array, comprises: acquiring the number of user data columns in each stripe to be recombined; If the number of the user data columns is smaller than or equal to the data column length threshold, determining the user data in each stripe to be recombined as recombined user data; Encoding the reorganized user data to obtain reorganized check data; and obtaining the reorganized data of the disk array according to the reorganized user data and the reorganized check data.
- 8. The method of claim 6, wherein reorganizing the user data in each stripe to be reorganized to obtain reorganized data of the disk array, comprises: If the number of the user data columns in each stripe to be recombined is larger than a data column length threshold, dividing the user data in each stripe to be recombined into a first recombined user data set and a second recombined user data set, wherein the first recombined user data set and the second recombined user data set are matched with the data column length threshold; Encoding the user data in the first recombined user data set to obtain first recombined check data, and encoding the user data in the second recombined user data set to obtain second recombined check data; determining user data in the first reorganized user data set and user data in the second reorganized user data set as reorganized user data, and determining the first reorganized check data and the second reorganized check data as reorganized check data; and obtaining the reorganized data of the disk array according to the reorganized user data and the reorganized check data.
- 9. A data reconstruction apparatus, the apparatus comprising: The data acquisition module is used for sequentially carrying out data reconstruction on each fault disk in the disk array to obtain reconstruction data of each fault disk, wherein each time the data reconstruction of each fault disk is carried out in the data reconstruction process, the reconstruction data of the corresponding fault disk is stored in a hot spare disk inserted into a slot position of the last fault disk, and the slot position of the corresponding fault disk is released and used for inserting a new hot spare disk; And the data reconstruction module is used for reconstructing the data of the disk array based on the reconstruction data of each fault disk.
- 10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
- 11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
- 12. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.
Description
Data reconstruction method, apparatus, computer device, storage medium, and program product Technical Field The present application relates to the field of data processing technology, and in particular, to a data reconstruction method, apparatus, computer device, storage medium, and program product. Background In the storage field, the redundant array of independent disks (Redundant Array of INDEPENDENT DISKS, RAID) is a logical disk group obtained by combining a plurality of physical disks. In the related art, when a failed disk with abnormal state exists in a logical disk group, the data of the failed disk needs to be recovered by using the data of a normal disk, the recovered data is written into a hot spare disk, and then the data in the hot spare disk and the data of the normal disk are combined to be used as the data reconstruction of the failed disk. However, in the related art, during the data reconstruction process, there is a risk of insufficient hot standby space, so that the data reconstruction cannot be completed. Disclosure of Invention In view of the foregoing, it is desirable to provide a data reconstruction method, apparatus, computer device, storage medium, and program product that can complete data reconstruction in the event of insufficient hot standby space. In a first aspect, the present application provides a data reconstruction method, the method comprising: Carrying out data reconstruction on each fault disk in the disk array in sequence to obtain reconstruction data of each fault disk, wherein each time the data reconstruction of one fault disk is carried out in the data reconstruction process, the reconstruction data of the corresponding fault disk is stored in a hot spare disk inserted into a slot position of the last fault disk, and the slot position of the corresponding fault disk is released for inserting a new hot spare disk; and reconstructing data of the disk array based on the reconstruction data of each fault disk. In the technical scheme provided by the embodiment of the application, the data reconstruction is sequentially carried out on each fault disk in the disk array to obtain the reconstruction data of each fault disk, and the data reconstruction is carried out on the disk array based on the reconstruction data of each fault disk. And in the data reconstruction process, each time the data of one fault disk is reconstructed, the reconstructed data of the corresponding fault disk is stored in the hot spare disk inserted into the slot position of the last fault disk, and the slot position of the corresponding fault disk is released for inserting a new hot spare disk. In the process of carrying out disk-by-disk data reconstruction on the fault disk, each time the data reconstruction of one fault disk is completed, the slot position of the fault disk is released, so that the hot spare disk is continuously replenished while the dynamic hot spare disk is kept in the data reconstruction process of the whole disk array, the hot spare space is provided for the reconstructed data of each fault disk, the smooth completion of the data reconstruction of each fault disk is ensured, a new hot spare disk is still inserted after the data reconstruction of the last fault disk is completed, the hot spare disk is provided for the data reconstruction of the non-fault disk, the reconstructed data of the non-fault disk is stored conveniently, and the smooth completion of the data reconstruction of the whole disk array is ensured. In one embodiment, sequentially reconstructing data of each failed disk in the disk array to obtain reconstructed data of each failed disk, including: for any fault disk, acquiring a data strip corresponding to each fault data block in the fault disk; determining user data fault blocks in the fault disk based on the positions of the fault data blocks in the data stripes; recovering the data in the user data fault block to obtain user repair data; And obtaining reconstruction data of the fault disk based on the user repair data. In the technical scheme provided by the embodiment of the application, for any fault disk, user data and check data in the fault disk are determined based on the position of each fault data block in a data stripe, the user data is recovered preferentially to obtain user repair data, and the reconstruction data of the fault disk is obtained based on the user repair data. In the data reconstruction process, considering the risk that the insufficient hot standby space may cause incomplete reconstruction, under the condition of limited hot standby space, the reconstruction of the user data is preferentially ensured, the data reading efficiency of the front end IO of the data storage system in the data reconstruction stage is ensured, and then the non-user data, namely the check data, is reconstructed, so that the repeated encoding of the user data is avoided, and the calculation amount of EC encoding and decoding of single-disk reconstruction i