[go: up one dir, main page]

CN116795295B - Data processing methods and devices, storage media, and electronic equipment in disk arrays - Google Patents

Data processing methods and devices, storage media, and electronic equipment in disk arrays Download PDF

Info

Publication number
CN116795295B
CN116795295B CN202311030383.2A CN202311030383A CN116795295B CN 116795295 B CN116795295 B CN 116795295B CN 202311030383 A CN202311030383 A CN 202311030383A CN 116795295 B CN116795295 B CN 116795295B
Authority
CN
China
Prior art keywords
target
data
state
data block
stripe
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
Application number
CN202311030383.2A
Other languages
Chinese (zh)
Other versions
CN116795295A (en
Inventor
李幸远
程广亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202311030383.2A priority Critical patent/CN116795295B/en
Publication of CN116795295A publication Critical patent/CN116795295A/en
Application granted granted Critical
Publication of CN116795295B publication Critical patent/CN116795295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

本申请实施例提供了一种磁盘阵列中的数据处理方法及装置、存储介质、电子设备,其中,该方法应用于磁盘阵列控制器,包括:接收主机发送的目标操作指令;基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息,其中,目标子条带用于在磁盘阵列中对数据进行分块存储,目标状态信息包括数据块状态和校验块状态,数据块状态用于表示目标子条带中的数据块是否被使用,校验块状态用于表示目标子条带的冗余状态;基于目标状态信息响应目标操作指令,对目标子条带执行数据处理。通过本申请,解决了相关技术中在RAID系统中对数据的处理效率较低的问题,进而达到了提升了RAID系统任务的处理效率的效果。

Embodiments of the present application provide a data processing method and device, storage media, and electronic equipment in a disk array. The method is applied to a disk array controller and includes: receiving a target operation instruction sent by the host; Read the target status information of the target sub-stripe from the data status bitmap. The target sub-stripe is used to store data in blocks in the disk array. The target status information includes the data block status and the check block status. The data block The status is used to indicate whether the data blocks in the target sub-stripe are used, and the check block status is used to indicate the redundancy status of the target sub-stripe; based on the target status information, the target sub-stripe responds to the target operation instruction and performs data processing on the target sub-stripe. Through this application, the problem of low data processing efficiency in RAID systems in related technologies is solved, thereby achieving the effect of improving the processing efficiency of RAID system tasks.

Description

磁盘阵列中的数据处理方法及装置、存储介质、电子设备Data processing methods and devices, storage media, and electronic equipment in disk arrays

技术领域Technical field

本申请实施例涉及计算机领域,具体而言,涉及一种磁盘阵列中的数据处理方法及装置、存储介质、电子设备。Embodiments of the present application relate to the field of computers, specifically, to a data processing method and device, storage medium, and electronic equipment in a disk array.

背景技术Background technique

随着数据存储需求的不断增长,数据丢失和系统故障的风险也随之增加。为了保护数据的安全性和可靠性,RAID系统应运而生。RAID系统通过将数据分散存储在多个物理磁盘上,并采用冗余备份技术,从而提高了数据的容错能力和可靠性。RAID系统采用的不同级别具有不同的数据冗余管理方法和数据存储策略。例如,RAID 5/6/三校验使用了不同的校验数据生成算法,分别可以抵抗RAID系统中有1/2/3块盘磁盘发生故障的情况,并保证在这种情况下数据完整性不受影响。As data storage needs continue to grow, so does the risk of data loss and system failure. In order to protect the security and reliability of data, the RAID system came into being. The RAID system improves the fault tolerance and reliability of data by storing data dispersedly on multiple physical disks and using redundant backup technology. Different levels used by RAID systems have different data redundancy management methods and data storage strategies. For example, RAID 5/6/triple parity use different parity data generation algorithms, which can respectively resist the failure of 1/2/3 disks in the RAID system and ensure data integrity in this case. Not affected.

但现有的RAID系统支持读写等操作,但RAID系统无法知晓当前的存储设备上有哪些数据是主机写入的有效数据,哪些数据是未被使用的无效数据。RAID在处理数据写入时,需要更新条带中的数据块和校验块,需要执行数据更新。由于无法知晓条带中数据的有效性,可能需要读无效的数据块并参与计算,这就降低了操作效率。RAID系统在一致性同步、重构、迁移、扩容、一致性校验时,需要处理所有的条带数据,无法根据数据的有效行优化处理,效率较低。However, the existing RAID system supports operations such as reading and writing, but the RAID system cannot know which data on the current storage device is valid data written by the host, and which data is invalid data that has not been used. When RAID processes data writing, it needs to update the data blocks and parity blocks in the stripe, and needs to perform data updates. Since there is no way to know the validity of the data in the stripe, it may be necessary to read invalid data blocks and participate in calculations, which reduces operational efficiency. The RAID system needs to process all striped data during consistency synchronization, reconstruction, migration, capacity expansion, and consistency verification. It cannot optimize the processing based on the valid rows of data, and the efficiency is low.

针对上述技术问题,相关技术中尚未提出有效的解决方案。In response to the above technical problems, no effective solutions have been proposed in related technologies.

发明内容Contents of the invention

本申请实施例提供了一种磁盘阵列中的数据处理方法及装置、存储介质、电子设备,以至少解决相关技术中在RAID系统中对数据的处理效率较低的问题。Embodiments of the present application provide a data processing method and device, a storage medium, and an electronic device in a disk array to at least solve the problem of low data processing efficiency in a RAID system in related technologies.

根据本申请的一个实施例,提供了一种磁盘阵列中的数据处理方法,应用于磁盘阵列控制器,包括:接收主机发送的目标操作指令,其中,上述主机与上述磁盘阵列控制器连接,上述磁盘阵列控制器与磁盘阵列连接,上述磁盘阵列中包括多个磁盘,上述磁盘用于存储数据块;基于上述目标操作指令从数据状态位图中读取目标子条带的目标状态信息,其中,上述目标子条带用于在上述磁盘阵列中对数据进行分块存储,上述目标状态信息包括数据块状态和校验块状态,上述数据块状态用于表示上述目标子条带中的数据块是否被使用,上述校验块状态用于表示上述目标子条带的冗余状态;基于上述目标状态信息响应上述目标操作指令,对上述目标子条带执行数据处理。According to an embodiment of the present application, a data processing method in a disk array is provided, applied to a disk array controller, including: receiving a target operation instruction sent by a host, wherein the host is connected to the disk array controller, and the above The disk array controller is connected to the disk array. The disk array includes multiple disks, and the disks are used to store data blocks; based on the above target operation instructions, the target status information of the target substripe is read from the data status bitmap, where, The above target sub-stripe is used to store data in blocks in the above-mentioned disk array. The above-mentioned target status information includes a data block status and a check block status. The above-mentioned data block status is used to indicate whether the data block in the above-mentioned target sub-stripe is is used, and the above-mentioned check block status is used to represent the redundancy status of the above-mentioned target sub-stripe; based on the above-mentioned target status information, the above-mentioned target operation instruction is responded to, and the data processing is performed on the above-mentioned target sub-stripe.

根据本申请的另一个实施例,提供了一种磁盘阵列中的数据处理装置,包括:第一接收模块,用于接收主机发送的目标操作指令,其中,上述主机与上述磁盘阵列控制器连接,上述磁盘阵列控制器与磁盘阵列连接,上述磁盘阵列中包括多个磁盘,上述磁盘用于存储数据块;第一读取模块,用于基于上述目标操作指令从数据状态位图中读取目标子条带的目标状态信息,其中,上述目标子条带用于在上述磁盘阵列中对数据进行分块存储,上述目标状态信息包括数据块状态和校验块状态,上述数据块状态用于表示上述目标子条带中的数据块是否被使用,上述校验块状态用于表示上述目标子条带的冗余状态;第一响应模块,用于基于上述目标状态信息响应上述目标操作指令,对上述目标子条带执行数据处理。According to another embodiment of the present application, a data processing device in a disk array is provided, including: a first receiving module for receiving target operation instructions sent by a host, wherein the host is connected to the disk array controller, The above-mentioned disk array controller is connected to the disk array. The above-mentioned disk array includes a plurality of disks, and the above-mentioned disks are used to store data blocks; the first reading module is used to read the target sub-data from the data status bitmap based on the above-mentioned target operation instructions. Target status information of the stripe, wherein the above-mentioned target sub-stripe is used to store data in blocks in the above-mentioned disk array, the above-mentioned target status information includes a data block status and a check block status, and the above-mentioned data block status is used to represent the above-mentioned Whether the data blocks in the target sub-stripe are used, the above-mentioned check block status is used to indicate the redundancy status of the above-mentioned target sub-stripe; the first response module is used to respond to the above-mentioned target operation instruction based on the above-mentioned target status information, and to the above-mentioned The target substripe performs data processing.

在一个示例性实施例中,上述第一读取模块,包括:第一获取单元,用于获取上述目标操作指令中包括的数据块起始位置和数据块长度;第一确定单元,用于利用上述数据块起始位置和上述数据块长度确定上述目标子条带;第一读取单元,用于从上述数据状态位图中读取上述目标子条带的目标状态信息。In an exemplary embodiment, the above-mentioned first reading module includes: a first acquisition unit for acquiring the data block starting position and data block length included in the above-mentioned target operation instruction; a first determination unit for utilizing The starting position of the data block and the length of the data block determine the target sub-stripe; the first reading unit is used to read the target status information of the target sub-stripe from the data status bitmap.

在一个示例性实施例中,上述第一响应模块,包括:第二读取单元,用于在上述目标操作指令为从上述目标子条带中读取目标数据块的操作指令时,读取上述目标数据块的数据块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;第一响应单元,用于在上述目标数据块的数据块状态的状态值是第一预设值的情况下,响应上述目标操作指令,向上述主机反馈上述目标数据块为空的信息,其中,上述第一预设值用于表示上述目标数据块为空。In an exemplary embodiment, the above-mentioned first response module includes: a second reading unit, configured to read the above-mentioned The data block status of the target data block, wherein the above-mentioned target data block is a data block among a plurality of data blocks in the above-mentioned target sub-stripe; the first response unit is used for the status value of the data block status of the above-mentioned target data block to be In the case of the first preset value, in response to the target operation instruction, information that the target data block is empty is fed back to the host, where the first preset value is used to indicate that the target data block is empty.

在一个示例性实施例中,上述第一响应模块,包括:第二读取单元,用于在上述目标操作指令为从上述目标子条带中读取目标数据块的操作指令时,读取上述目标数据块的数据块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;第三读取单元,用于在上述目标数据块的数据块状态的状态值是第二预设值,且上述目标数据块处于异常磁盘中的情况下,读取上述校验块状态,其中,上述校验块状态用于表示上述目标子条带中包括的校验块的状态,上述第二预设值用于表示上述目标数据块中包括数据;第四读取单元,用于在上述校验块状态的状态值是第三预设值的情况下,读取上述校验块中的数据和上述目标子条带中状态值是上述第二预设值的数据块中的数据,其中,上述状态值是上述第二预设值的数据块均设置在正常磁盘中,上述第二预设值用于表示上述数据块中包括数据;第二响应单元,用于响应上述目标操作指令,将上述校验块中的数据和上述目标子条带中状态值是上述第二预设值的数据块中的数据发送至上述主机。In an exemplary embodiment, the above-mentioned first response module includes: a second reading unit, configured to read the above-mentioned The data block status of the target data block, wherein the above-mentioned target data block is a data block among a plurality of data blocks in the above-mentioned target sub-stripe; the third reading unit is used for the status value of the data block status of the above-mentioned target data block is the second preset value, and when the target data block is in the abnormal disk, read the check block status, where the check block status is used to represent the check block included in the target sub-stripe. status, the second preset value is used to indicate that the target data block includes data; the fourth reading unit is used to read the check block state when the status value of the check block status is the third preset value. The data in the check block and the data in the data block whose status value is the above-mentioned second preset value in the above-mentioned target sub-stripe, wherein the above-mentioned data block whose status value is the above-mentioned second preset value are both set in a normal disk, The above-mentioned second preset value is used to indicate that the above-mentioned data block includes data; the second response unit is used to respond to the above-mentioned target operation instruction, and the data in the above-mentioned check block and the status value in the above-mentioned target sub-stripe are the above-mentioned second The data in the data block of the preset value is sent to the above host.

在一个示例性实施例中,上述装置还包括:第二读取模块,用于在上述校验块状态的状态值是第四预设值的情况下,读取上述校验块中的数据和上述目标子条带中处于正常磁盘的数据块中的数据;第二响应模块,用于响应上述目标操作指令,将上述校验块中的数据和上述目标子条带中处于正常磁盘的数据块中的数据发送至上述主机。In an exemplary embodiment, the above-mentioned device further includes: a second reading module, configured to read the data in the above-mentioned check block and The data in the data blocks in the above-mentioned target sub-stripe that are in the normal disk; the second response module is used to respond to the above-mentioned target operation instruction and combine the data in the above-mentioned check block with the data blocks in the above-mentioned target sub-stripe that are in the normal disk. The data in is sent to the above host.

在一个示例性实施例中,上述第一响应模块,包括:第五读取单元,用于在上述目标操作指令为向上述目标子条带中写入上述数据的操作指令时,读取上述校验块状态,其中,上述校验块状态用于表示上述目标子条带中包括的校验块的状态;第六读取单元,用于在上述校验块状态的状态值是第三预设值的情况下,读取目标数据块的数据块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;第七读取单元,用于在上述目标数据块状态的状态值是第一预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第一预设值用于表示上述目标数据块为空,上述第二预设值用于表示上述其他数据块中包括数据;第三响应单元,用于响应上述目标操作指令,利用上述其他数据块将上述数据更新至上述目标子条带中。In an exemplary embodiment, the above-mentioned first response module includes: a fifth reading unit, configured to read the above-mentioned calibration when the above-mentioned target operation instruction is an operation instruction for writing the above-mentioned data into the above-mentioned target sub-stripe. a check block state, wherein the check block state is used to represent the state of the check block included in the target sub-stripe; the sixth reading unit is used to set the state value of the check block state to a third preset In the case of a value of When the status value of the state is the first preset value, read other data blocks in the target sub-stripe, where the other data blocks are data blocks in the target sub-stripe other than the target data block. , the status value of the data block status of the other data blocks is a second preset value, the first preset value is used to indicate that the target data block is empty, and the second preset value is used to indicate that the other data blocks include data; a third response unit, configured to respond to the above target operation instruction and update the above data to the above target sub-stripe using the above other data blocks.

在一个示例性实施例中,上述装置还包括:第三响应模块,用于在上述校验块状态的状态值是第四预设值的情况下,响应上述目标操作指令,利用上述目标数据块的数量将上述数据更新至上述目标子条带中。In an exemplary embodiment, the above device further includes: a third response module, configured to respond to the above target operation instruction and use the above target data block when the status value of the above check block status is a fourth preset value. The quantity updates the above data into the above target substripe.

在一个示例性实施例中,上述第一响应模块,包括:第八读取单元,用于在上述目标操作指令为向上述目标子条带中写入上述数据的操作指令时,读取上述校验块状态,其中,上述校验块状态用于表示上述目标子条带中包括的校验块的状态;第九读取单元,用于在目标数据块处于异常磁盘中,且上述校验块状态的状态值是第三预设值的情况下,读取目标数据块的数据块状态;第十读取单元,用于在上述目标数据块的数据块状态的状态值是第一预设值的情况下,读取上述校验块中的数据,其中,上述第一预设值用于表示上述目标数据块为空;第四响应单元,用于响应上述目标操作指令,利用上述校验块中的数据和上述数据更新上述校验块的校验状态。In an exemplary embodiment, the above-mentioned first response module includes: an eighth reading unit, configured to read the above-mentioned calibration when the above-mentioned target operation instruction is an operation instruction for writing the above-mentioned data into the above-mentioned target sub-stripe. Check block status, wherein the above check block status is used to represent the status of the check block included in the above target sub-stripe; the ninth reading unit is used to when the target data block is in an abnormal disk, and the above check block When the status value of the status is the third preset value, read the data block status of the target data block; the tenth reading unit is used to read the data block status of the target data block when the status value of the data block status is the first preset value. In the case of , read the data in the above-mentioned check block, wherein the above-mentioned first preset value is used to indicate that the above-mentioned target data block is empty; the fourth response unit is used to respond to the above-mentioned target operation instruction, using the above-mentioned check block The data in and the above data update the verification status of the above verification block.

在一个示例性实施例中,上述装置还包括:第三读取模块,用于在上述目标数据块状态的状态值是第二预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第二预设值用于表示上述其他数据块不为空;第四响应模块,用于响应上述目标操作指令,利用上述其他数据块将上述数据更新至上述目标子条带中。In an exemplary embodiment, the above-mentioned device further includes: a third reading module, configured to read other data in the above-mentioned target sub-stripe when the status value of the above-mentioned target data block status is a second preset value. Data block, wherein the other data blocks are data blocks in the target sub-stripe other than the target data block, the status value of the data block status of the other data blocks is a second preset value, and the second preset value The value is used to indicate that the above-mentioned other data blocks are not empty; the fourth response module is used to respond to the above-mentioned target operation instructions and use the above-mentioned other data blocks to update the above-mentioned data into the above-mentioned target sub-stripe.

在一个示例性实施例中,上述装置还包括:第一更新模块,用于在上述目标操作指令为向上述目标子条带中写入上述目标数据的操作指令时,读取上述校验块状态之后,在目标数据块处于异常磁盘中,且校验块状态的状态值是第四预设值的情况下,利用数据块对目标子条带进行更新。In an exemplary embodiment, the above-mentioned device further includes: a first update module, configured to read the above-mentioned check block status when the above-mentioned target operation instruction is an operation instruction for writing the above-mentioned target data into the above-mentioned target sub-stripe. Afterwards, when the target data block is in the abnormal disk and the status value of the check block status is the fourth preset value, the target sub-stripe is updated using the data block.

在一个示例性实施例中,第四读取模块,用于在上述目标操作指令为向上述目标子条带中写入上述目标数据的操作指令时,读取上述校验块状态之后,在上述目标子条带中包括异常磁盘,且上述目标数据块处于正常磁盘中的情况下,读取上述目标数据块的数据块状态;第五读取模块,用于在上述目标数据块的数据块状态的状态值是第一预设值的情况下,读取上述校验块中的数据;第二更新模块,用于利用上述校验块中的数据和上述目标数据更新上述校验块的校验状态。In an exemplary embodiment, the fourth reading module is configured to, when the target operation instruction is an operation instruction to write the target data to the target sub-stripe, after reading the check block status, When the target sub-stripe includes an abnormal disk and the above-mentioned target data block is in a normal disk, read the data block status of the above-mentioned target data block; the fifth reading module is used to read the data block status of the above-mentioned target data block. When the status value is the first preset value, read the data in the above-mentioned check block; the second update module is used to update the check of the above-mentioned check block using the data in the above-mentioned check block and the above-mentioned target data. state.

在一个示例性实施例中,上述装置还包括:第六读取模块,用于在上述目标子条带中包括异常磁盘,且上述目标数据块处于正常磁盘中的情况下,读取上述目标数据块的数据块状态之后,在上述目标数据块状态的状态值是第二预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第二预设值用于表示上述其他数据块不为空;第三更新模块,用于利用上述其他数据块将上述数据更新至上述目标子条带中。In an exemplary embodiment, the above-mentioned device further includes: a sixth reading module, configured to read the above-mentioned target data when the above-mentioned target sub-stripe includes an abnormal disk and the above-mentioned target data block is in a normal disk. After the data block status of the block, when the status value of the above-mentioned target data block status is the second preset value, read other data blocks in the above-mentioned target sub-stripe, wherein the above-mentioned other data blocks are the above-mentioned target sub-stripe. For data blocks in the band other than the target data block, the status value of the data block status of the other data blocks is a second preset value, and the second preset value is used to indicate that the other data blocks are not empty; third An update module, configured to update the above data to the above target sub-stripe using the above other data blocks.

在一个示例性实施例中,上述装置还包括:第四更新模块,用于在上述目标操作指令为向上述目标子条带中写入上述目标数据的操作指令时,读取上述校验块状态之后,在上述目标子条带中包括异常磁盘、上述目标数据块处于正常磁盘中,且上述校验块状态的状态值是第四预设值的情况下,将上述数据更新至上述目标子条带中。In an exemplary embodiment, the above-mentioned device further includes: a fourth update module, configured to read the above-mentioned check block status when the above-mentioned target operation instruction is an operation instruction for writing the above-mentioned target data into the above-mentioned target sub-stripe. Afterwards, when the target sub-stripe includes an abnormal disk, the target data block is in a normal disk, and the status value of the check block status is a fourth preset value, the above data is updated to the above-mentioned target sub-stripe. Belt.

在一个示例性实施例中,上述装置还包括:第七读取模块,用于接收主机发送的目标操作指令之后,在上述目标操作指令为重新构建目标数据块时,读取上述目标数据块的数据块状态和上述目标子条带的校验块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;第八读取模块,用于在上述目标数据块的数据块状态的状态值是第二预设值,且上述目标数据块的校验块状态的状态值是第三预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第二预设值用于表示上述其他数据块不为空;第一写入模块,用于利用上述其他数据块中的数据和上述目标数据块的校验块中的数据计算重新构建后的目标数据块,并将上述重新构建后的目标数据块中的数据写入上述磁盘阵列。In an exemplary embodiment, the above device further includes: a seventh reading module, configured to read the target data block after receiving the target operation instruction sent by the host when the target operation instruction is to reconstruct the target data block. The data block status and the check block status of the above-mentioned target sub-stripe, wherein the above-mentioned target data block is a data block among multiple data blocks in the above-mentioned target sub-stripe; the eighth reading module is used to read the above-mentioned target data block When the status value of the data block status is the second preset value, and the status value of the check block status of the above-mentioned target data block is the third preset value, read other data blocks in the above-mentioned target sub-stripe, Wherein, the other data blocks are data blocks other than the target data block in the target sub-stripe, and the status value of the data block status of the other data blocks is a second preset value, and the second preset value is used for Indicates that the above-mentioned other data blocks are not empty; the first writing module is used to calculate the reconstructed target data block using the data in the above-mentioned other data blocks and the data in the check block of the above-mentioned target data block, and write the above-mentioned reconstructed The data in the constructed target data block is written to the above disk array.

在一个示例性实施例中,上述装置还包括:第一确定模块,用于上述目标操作指令为重新构建上述目标数据块时,读取目标数据块的数据块状态和校验块状态之后,在上述目标数据块的数据块状态的状态值是第二预设值、上述目标数据块的校验块状态的状态值是第四预设值,且上述目标子条带中包括数据块状态的状态值是第一预设值的情况下,利用上述其他数据块重新确定上述目标子条带的校验数据块;第一修改模块,用于将重新确定的校验数据块的校验状态的状态值修改为第三预设值。In an exemplary embodiment, the above-mentioned device further includes: a first determination module, configured to, when the above-mentioned target operation instruction is to reconstruct the above-mentioned target data block, read the data block status and check block status of the target data block, and then The status value of the data block status of the above-mentioned target data block is a second preset value, the status value of the check block status of the above-mentioned target data block is a fourth preset value, and the above-mentioned target sub-stripe includes the status of the data block status. When the value is the first preset value, use the other data blocks to re-determine the check data block of the target sub-stripe; the first modification module is used to change the check status of the re-determined check data block to The value is modified to the third default value.

在一个示例性实施例中,上述装置还包括:第九读取模块,用于上述目标操作指令为重新构建上述目标数据块时,读取目标数据块的数据块状态和校验块状态之后,在上述目标数据块的数据块状态的状态值是第二预设值、上述目标数据块的校验块状态的状态值是第四预设值,且上述目标子条带中的其他数据块的数据块状态的状态值均是第二预设值的情况下,读取上述目标子条带中的所有数据块和校验数据块;第二写入模块,用于利用上述目标子条带中的所有数据块和校验数据块计算重新构建后的目标数据块,并将上述重新构建后的目标数据块中的数据写入上述磁盘阵列。In an exemplary embodiment, the above device further includes: a ninth reading module, configured to read the data block status and check block status of the target data block when the target operation instruction is to reconstruct the target data block, The status value of the data block status of the above-mentioned target data block is the second preset value, the status value of the check block status of the above-mentioned target data block is the fourth preset value, and the status value of other data blocks in the above-mentioned target sub-stripe is When the status values of the data block status are all the second preset values, read all data blocks and check data blocks in the above-mentioned target sub-stripe; the second writing module is used to use the above-mentioned target sub-stripe. Calculate the reconstructed target data block of all data blocks and parity data blocks, and write the data in the reconstructed target data block to the above disk array.

在一个示例性实施例中,上述装置还包括:第一迁移模块,用于接收主机发送的目标操作指令之后,在上述目标操作指令为迁移上述目标子条带中的数据块,且上述目标子条带中包括目标数据块的情况下,将上述目标数据块迁移至其他子条带中存储,其中,上述目标数据块是上述目标子条带中数据块状态的状态值为第二预设值的数据块;第一计算模块,用于利用上述目标数据块计算上述目标子条带的校验数据块;第二修改模块,用于在上述目标子条带中包括数据块状态的状态值为第一预设值的其他数据块的情况下,利用上述其他数据块修改上述校验数据块的校验值。In an exemplary embodiment, the above-mentioned apparatus further includes: a first migration module, configured to receive a target operation instruction sent by the host, and after the above-mentioned target operation instruction is to migrate the data blocks in the above-mentioned target sub-stripe, and the above-mentioned target sub-stripe When the stripe includes a target data block, the target data block is migrated to other sub-stripes for storage, wherein the target data block is a state value of the data block status in the target sub-stripe that is the second preset value. data block; the first calculation module is used to calculate the check data block of the above-mentioned target sub-stripe using the above-mentioned target data block; the second modification module is used to include the status value of the data block status in the above-mentioned target sub-stripe as In the case of other data blocks with the first preset value, the other data blocks are used to modify the check value of the check data block.

在一个示例性实施例中,上述装置还包括:第十读取模块,用于接收主机发送的目标操作指令之后,在确定上述磁盘阵列中增加磁盘,得到扩容后的子条带的情况下,读取上述目标子条带的数据块状态和校验块状态;第二迁移模块,用于在目标数据块的数据块状态的状态值是第二预设值的情况下,将上述目标数据块中的数据迁移至上述扩容后的子条带中;第二确定模块,用于利用上述扩容后的子条带中包括的数据块的数据块状态确定上述扩容后的子条带中的校验块的校验状态。In an exemplary embodiment, the above-mentioned device further includes: a tenth reading module, configured to, after receiving the target operation instruction sent by the host, determine that a disk is added to the above-mentioned disk array to obtain an expanded sub-stripe, Read the data block status and check block status of the above-mentioned target sub-stripe; the second migration module is used to transfer the above-mentioned target data block to the second migration module when the status value of the data block status of the target data block is a second preset value. The data in the expanded sub-stripe is migrated to the above-mentioned expanded sub-stripe; the second determination module is used to determine the checksum in the above-mentioned expanded sub-stripe using the data block status of the data blocks included in the above-mentioned expanded sub-stripe. The check status of the block.

在一个示例性实施例中,上述装置还包括:第十一读取模块,用于接收主机发送的目标操作指令之后,在上述目标操作指令为校验上述目标子条带的操作指令时,读取上述目标子条带中所有数据块的数据块状态;第一校验模块,用于在目标数据块的数据块状态的状态值是第二预设值,且上述目标子条带的校验块的校验状态的状态值是第四预设值的情况下,利用上述校验块和上述目标子条带中所有数据块对上述目标子条带进行一致性校验;第二校验模块,用于在目标数据块的数据块状态的状态值是第二预设值,且上述目标子条带的校验块的校验状态的状态值是第三预设值的情况下,利用上述校验块和数据块状态的状态值是第二预设值的数据块对上述目标子条带进行一致性校验。In an exemplary embodiment, the above device further includes: an eleventh reading module, configured to read the target operation instruction sent by the host when the target operation instruction is an operation instruction for verifying the target sub-stripe. Get the data block status of all data blocks in the target sub-stripe; the first verification module is used to set the status value of the data block status in the target data block to the second preset value, and the verification of the above-mentioned target sub-stripe When the status value of the block's check status is the fourth preset value, use the above-mentioned check block and all data blocks in the above-mentioned target sub-stripe to perform a consistency check on the above-mentioned target sub-stripe; the second verification module , used to use the above-mentioned method when the status value of the data block status of the target data block is the second preset value, and the status value of the check status of the check block of the target sub-stripe is the third preset value. The data block whose status value of the check block and data block status is the second preset value performs consistency check on the above-mentioned target sub-stripe.

在一个示例性实施例中,上述装置还包括:第五更新模块,用于基于上述目标状态信息响应上述目标操作指令,对上述目标数据执行数据操作之后,利用对上述目标子条带执行的数据操作对上述数据块状态和上述校验块状态进行更新。In an exemplary embodiment, the above-mentioned device further includes: a fifth update module, configured to respond to the above-mentioned target operation instruction based on the above-mentioned target status information, and after performing a data operation on the above-mentioned target data, utilize the data performed on the above-mentioned target sub-stripe. The operation updates the above-mentioned data block status and the above-mentioned check block status.

在一个示例性实施例中,上述装置还包括:第一获取模块,用于基于上述目标操作指令从数据状态位图中读取目标子条带的目标状态信息之前,获取上述磁盘阵列中多个子条带的状态,其中,一个上述子条带的状态中包括多个数据块状态和一个校验块状态,其中,多个上述数据块状态用于表示上述子条带中多个数据块的状态,上述校验块状态用于表示上述子条带中校验块的状态;第一生成模块,用于利用多个上述子条带的状态生成上述数据状态位图,并缓存上述数据状态位图。In an exemplary embodiment, the above-mentioned device further includes: a first acquisition module, configured to acquire multiple sub-stripes in the above-mentioned disk array before reading the target status information of the target sub-stripe from the data status bitmap based on the above-mentioned target operation instruction. The status of a stripe, wherein the status of one of the above-mentioned sub-stripes includes multiple data block statuses and a parity block status, where the multiple above-mentioned data block statuses are used to represent the status of multiple data blocks in the above-mentioned sub-stripe. , the above-mentioned check block status is used to represent the status of the check block in the above-mentioned sub-stripe; the first generation module is used to generate the above-mentioned data status bitmap using the status of multiple above-mentioned sub-stripes, and cache the above-mentioned data status bitmap .

在一个示例性实施例中,上述装置还包括:第一存储模块,用于利用多个上述子条带的状态生成上述数据状态位图,并缓存上述数据状态位图之后,在上述磁盘阵列停止工作时,将上述数据状态位图存储至上述磁盘阵列中的磁盘中,其中,上述磁盘中包括存储上述数据状态位图的预设数据区。In an exemplary embodiment, the above-mentioned device further includes: a first storage module, configured to generate the above-mentioned data status bitmap using the status of a plurality of the above-mentioned sub-stripes, and cache the above-mentioned data status bitmap, after the above-mentioned disk array stops During operation, the data status bitmap is stored in a disk in the disk array, wherein the disk includes a preset data area for storing the data status bitmap.

在一个示例性实施例中,上述装置还包括:第十二读取模块,用于在上述磁盘阵列停止工作时,将上述数据状态位图存储至上述磁盘阵列中的磁盘中之后,在上述磁盘阵列开启工作时,从上述预设数据区中读取上述数据状态位图。In an exemplary embodiment, the above-mentioned device further includes: a twelfth reading module, configured to store the above-mentioned data status bitmap into a disk in the above-mentioned disk array when the above-mentioned disk array stops working. When the array starts working, the above-mentioned data status bitmap is read from the above-mentioned preset data area.

在一个示例性实施例中,上述装置还包括:第一设置模块,用于基于上述目标操作指令从数据状态位图中读取目标子条带的目标状态信息之前,在对上述磁盘阵列执行初始化操作时,将上述磁盘阵列中多个子条带的数据块状态的状态值均设置为第一预设值,并将多个上述子条带的校验块状态的状态值均设置为第三预设值;第三修改模块,用于在接收上述主机发送的上述目标操作指令之后,基于上述目标操作指令的指令类型修改上述数据块状态的状态值;第四修改模块,用于基于修改后的数据块状态的状态值修改上述校验块状态的状态值。In an exemplary embodiment, the above device further includes: a first setting module, configured to read the target status information of the target substripe from the data status bitmap based on the above target operation instruction, and perform initialization on the above disk array before During operation, the status values of the data block status of multiple sub-stripes in the disk array are all set to the first preset value, and the status values of the check block status of the multiple sub-stripes are set to the third preset value. Set the value; the third modification module is used to modify the status value of the above-mentioned data block status based on the instruction type of the above-mentioned target operation instruction after receiving the above-mentioned target operation instruction sent by the above-mentioned host; the fourth modification module is used to modify the status value based on the modified The status value of the data block status modifies the status value of the above-mentioned check block status.

根据本申请的又一个实施例,还提供了一种磁盘阵列系统,包括主机、磁盘阵列控制器和磁盘阵列,其中,所述主机与所述磁盘阵列控制器连接,所述磁盘阵列控制器与磁盘阵列连接,所述磁盘阵列中包括多个磁盘,磁盘用于存储数据块,所述磁盘阵列控制器用于执行上述步骤。According to yet another embodiment of the present application, a disk array system is also provided, including a host, a disk array controller, and a disk array, wherein the host is connected to the disk array controller, and the disk array controller is connected to Disk array connection, the disk array includes multiple disks, the disks are used to store data blocks, and the disk array controller is used to perform the above steps.

根据本申请的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present application, a computer-readable storage medium is also provided. A computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the above methods when running. Steps in Examples.

根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present application, an electronic device is also provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above. Steps in method embodiments.

通过本申请,由于磁盘阵列控制器接收主机发送的目标操作指令,基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息,按照目标自条带中的数据块状态和校验块状态可以确定出数据块的有效性,从而可以对有效的数据块进行处理,无需关注无效的数据块。从而提升了RAID系统任务的处理效率。因此,可以解决相关技术中在RAID系统中对数据的处理效率较低的问题。Through this application, because the disk array controller receives the target operation instruction sent by the host, reads the target status information of the target sub-stripe from the data status bitmap based on the target operation instruction, and reads the target status information of the target sub-stripe according to the data block status and calibration in the target sub-stripe. Checking the block status can determine the validity of the data block, so that valid data blocks can be processed without paying attention to invalid data blocks. This improves the processing efficiency of RAID system tasks. Therefore, the problem of low data processing efficiency in the RAID system in related technologies can be solved.

附图说明Description of the drawings

图1是本申请实施例的一种磁盘阵列中的数据处理方法的移动终端的硬件结构框图;Figure 1 is a hardware structure block diagram of a mobile terminal of a data processing method in a disk array according to an embodiment of the present application;

图2是根据本申请实施例的磁盘阵列中的数据处理方法的流程图;Figure 2 is a flow chart of a data processing method in a disk array according to an embodiment of the present application;

图3是根据本申请实施例的RAID系统中一个子条带在磁盘上分布的基本结构图;Figure 3 is a basic structural diagram of a sub-stripe distributed on a disk in a RAID system according to an embodiment of the present application;

图4是根据本申请实施例的RAID系统的结构示意图;Figure 4 is a schematic structural diagram of a RAID system according to an embodiment of the present application;

图5是根据本申请实施例的数据状态位图的结构图;Figure 5 is a structural diagram of a data status bitmap according to an embodiment of the present application;

图6是根据本申请实施例的RAID组的结构示意图;Figure 6 is a schematic structural diagram of a RAID group according to an embodiment of the present application;

图7是根据本申请实施例的数据读取的整体流程图;Figure 7 is an overall flow chart of data reading according to an embodiment of the present application;

图8是根据本申请实施例的本实施例写入数据的流程图;Figure 8 is a flow chart of writing data according to this embodiment of the present application;

图9是根据本申请实施例的本实施例中存在损坏磁盘的情况下写入数据的流程图;Figure 9 is a flow chart of writing data in the case of a damaged disk in this embodiment according to the embodiment of the present application;

图10是根据本申请实施例的重新构建数据块的流程图;Figure 10 is a flow chart for reconstructing data blocks according to an embodiment of the present application;

图11是根据本申请实施例的对单个子条带的迁移流程图;Figure 11 is a flow chart of migrating a single sub-strip according to an embodiment of the present application;

图12是根据本申请实施例的扩容操作的流程图;Figure 12 is a flow chart of a capacity expansion operation according to an embodiment of the present application;

图13是根据本申请实施例的一致性校验操作流程图;Figure 13 is a flow chart of consistency verification operations according to an embodiment of the present application;

图14是根据本申请实施例的磁盘阵列中的数据处理装置的结构框图;Figure 14 is a structural block diagram of a data processing device in a disk array according to an embodiment of the present application;

图15是根据本申请实施例的电子设备的示意图。Figure 15 is a schematic diagram of an electronic device according to an embodiment of the present application.

具体实施方式Detailed ways

下文中将参考附图并结合实施例来详细说明本申请的实施例。The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

下面对本申请中的相关技术解释如下:The relevant technologies in this application are explained below:

RAID:Redundant Array of Independent Disks,磁盘冗余阵列。将多个磁盘设备组合起来,成为一个或多个存储阵列组,目的为提升性能、增加冗余以保护数据。RAID: Redundant Array of Independent Disks, redundant array of disks. Multiple disk devices are combined into one or more storage array groups to improve performance and add redundancy to protect data.

Stripe:条带,条带是RAID系统中将数据在多个硬盘上分块存储的一种方法。RAID系统将数据分割成多个块,然后将这些块依次存储到多个硬盘上。不同磁盘相同位置上存储的数据块被称为一个条带。Stripe: Stripe is a method of storing data in blocks on multiple hard drives in a RAID system. A RAID system divides data into multiple blocks and then stores these blocks on multiple hard drives in sequence. Data blocks stored in the same location on different disks are called a stripe.

RMW:Read-Construct-Write,读-重构-写,一种RAID系统中条带数据更新的方法,读取条带中被更新的数据和校验数据,然后计算新的校验数据,再将更新数据和校验数据写入磁盘。RMW: Read-Construct-Write, read-reconstruct-write, a method for updating stripe data in a RAID system. It reads the updated data and verification data in the stripe, then calculates the new verification data, and then Write update data and verification data to disk.

RCW:Read-Modify-Write,读-修改-写,一种RAID系统中条带数据更新的方法,读取条带中未被更新的数据盘,和被写入数据一起计算校验数据,再将更新数据和新生成的校验写入磁盘。RCW: Read-Modify-Write, read-modify-write, a method of updating stripe data in a RAID system. It reads the unupdated data disk in the stripe, calculates the check data together with the written data, and then Write updated data and newly generated parity to disk.

本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本申请实施例的一种磁盘阵列中的数据处理方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,其中,上述移动终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiments provided in the embodiments of this application can be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, FIG. 1 is a hardware structure block diagram of a mobile terminal of a data processing method in a disk array according to an embodiment of the present application. As shown in Figure 1, the mobile terminal may include one or more (only one is shown in Figure 1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. Persons of ordinary skill in the art can understand that the structure shown in Figure 1 is only illustrative, and it does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1 , or have a different configuration than shown in FIG. 1 .

存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的磁盘阵列中的数据处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the data processing methods in the disk array in the embodiment of the present application. The processor 102 runs the computer programs stored in the memory 104 , thereby executing various functional applications and data processing, that is, implementing the above method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.

传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet wirelessly.

在本实施例中提供了一种磁盘阵列中的数据处理方法,图2是根据本申请实施例的磁盘阵列中的数据处理方法的流程图,如图2所示,该流程包括如下步骤:This embodiment provides a data processing method in a disk array. Figure 2 is a flow chart of a data processing method in a disk array according to an embodiment of the present application. As shown in Figure 2, the process includes the following steps:

步骤S202,接收主机发送的目标操作指令,其中,主机与磁盘阵列控制器连接,磁盘阵列控制器与磁盘阵列连接,磁盘阵列中包括多个磁盘,磁盘用于存储数据块;Step S202: Receive the target operation instruction sent by the host, where the host is connected to the disk array controller, and the disk array controller is connected to the disk array. The disk array includes multiple disks, and the disks are used to store data blocks;

步骤S204,基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息,其中,目标子条带用于在磁盘阵列中对数据进行分块存储,目标状态信息包括数据块状态和校验块状态,数据块状态用于表示目标子条带中的数据块是否被使用,校验块状态用于表示目标子条带的冗余状态;Step S204: Read the target status information of the target sub-stripe from the data status bitmap based on the target operation instruction, where the target sub-stripe is used to store data in blocks in the disk array, and the target status information includes the data block status. and check block status, the data block status is used to indicate whether the data blocks in the target sub-stripe are used, and the check block status is used to indicate the redundancy status of the target sub-stripe;

步骤S206,基于目标状态信息响应目标操作指令,对目标子条带执行数据处理。Step S206: Respond to the target operation instruction based on the target status information and perform data processing on the target sub-stripe.

其中,上述步骤的执行主体可以为磁盘阵列控制器等,但不限于此。The execution subject of the above steps may be a disk array controller, but is not limited to this.

可选地,目标操作指令可以是RAID系统支持的IO操作指令,IO操作指令包括读取、写入、写零、丢弃等指令。Optionally, the target operation instruction may be an IO operation instruction supported by the RAID system. The IO operation instruction includes instructions such as read, write, write zero, discard, etc.

可选地,数据状态位图中记录了RAID系统在磁盘上存储数据的状态,RAID系统中存储的数据可分为两种:主机写入的用户数据块和RAID系统为了实现数据冗余生成的校验数据。而RAID系统是一个存储设备,其数存取只能按最小的单元操作,这里一个最小的单元即为一个数据块。RAID系统存放两种类型的数据块:用户数据块(简称为数据块)和校验数据块(简称为校验块),数据块大小为RAID系统中的最小数据单元,例如,数据块的大小为512B或者4kB。RAID系统中所有磁盘上相同位置的数据块组成一个子条带。一个子条带中包括多个数据块,根据RAID级别不同,可以包括1个或2个或3个校验块。RAID级别包括RAID5、RAID6、RAIDTP等。子条带是RAID系统中数据在物理硬盘上存储的基本单位。子条带是将数据在多个硬盘上分块存储的一种方法。RAID系统将数据分割成多个块,然后将这些块依次存储到多个硬盘上。例如,如果一个文件被分成4个块,而RAID系统有4个硬盘,那么第一个块将被存储在第一个硬盘上,第二个块将被存储在第二个硬盘上,以此类推。这样,文件的每个块都会被分配到不同的硬盘上进行存储,从而提高了数据读取和写入的速度。Optionally, the data status bitmap records the status of the RAID system storing data on the disk. The data stored in the RAID system can be divided into two types: user data blocks written by the host and generated by the RAID system to achieve data redundancy. Check data. The RAID system is a storage device, and its data access can only be operated according to the smallest unit. Here, a smallest unit is a data block. RAID systems store two types of data blocks: user data blocks (referred to as data blocks) and parity data blocks (referred to as parity blocks). The data block size is the smallest data unit in the RAID system, for example, the size of the data block is 512B or 4kB. Data blocks at the same location on all disks in a RAID system form a substripe. A substripe includes multiple data blocks, which may include 1, 2, or 3 parity blocks depending on the RAID level. RAID levels include RAID5, RAID6, RAIDTP, etc. A substripe is the basic unit of data storage on a physical hard drive in a RAID system. Substriping is a method of chunking data across multiple hard drives. A RAID system divides data into multiple blocks and then stores these blocks on multiple hard drives in sequence. For example, if a file is divided into 4 blocks and the RAID system has 4 hard drives, then the first block will be stored on the first hard drive and the second block will be stored on the second hard drive. analogy. In this way, each block of the file will be allocated to a different hard disk for storage, thereby increasing the speed of data reading and writing.

可选地,RAID系统中一个子条带在磁盘上分布的基本结构如图3所示,例如,以RAID5系统为例,由4块磁盘组成,因此一个子条带有三个位数据块,一个位校验块。如果是RAID6系统则需要两个校验数据块,RAID三校验系统则需要三个校验数据块。每个数据块的大小被称为条带单元大小。条带单元大小通常为64kB到1MB。Optionally, the basic structure of a sub-stripe distributed on the disk in the RAID system is shown in Figure 3. For example, taking the RAID5 system as an example, it consists of 4 disks, so a sub-stripe has three bit data blocks, one Bit parity block. If it is a RAID6 system, two parity data blocks are required, and a RAID three-parity system requires three parity data blocks. The size of each data block is called the stripe unit size. Stripe unit sizes are typically 64kB to 1MB.

可选地,RAID系统是一种存储设备,属于块设备类型。块设备只能通过最小的数据单元数据块来访问。每个数据块的大小通常为512字节或4KB,这个大小也被称为块大小或扇区大小。数据的访问是通过逻辑块地址(LBA)来进行的,LBA是对块设备上数据的逻辑编号。块设备上的每个块都被分配了一个唯一的LBA,从而允许主机访问特定的数据块。Optionally, a RAID system is a storage device and is of the block device type. Block devices can only be accessed through the smallest unit of data, the data block. The size of each data block is usually 512 bytes or 4KB. This size is also called the block size or sector size. Data is accessed through the logical block address (LBA), which is the logical number of the data on the block device. Each block on a block device is assigned a unique LBA, allowing the host to access specific blocks of data.

可选地,如图4所示,RAID系统包括主机、磁盘阵列控制器和磁盘阵列,其中,主机与磁盘阵列控制器连接,磁盘阵列控制器与磁盘阵列连接,磁盘阵列中包括多个磁盘,磁盘用于存储数据块。Optionally, as shown in Figure 4, the RAID system includes a host, a disk array controller and a disk array, where the host is connected to the disk array controller, the disk array controller is connected to the disk array, and the disk array includes multiple disks. Disks are used to store blocks of data.

主机,RAID系统的使用方,可以向RAID控制器发出以下操作命令:读取:读取RAID系统中一个或者多个连续的数据块;写入:向RAID系统写入一个或者多个连续的数据块;写零:向RAID系统中写入一个或者多个连续的全零数据块。该操作仅有写入命令,无数传输过程;丢弃:向RAID系统发送命令指示一个或者多个数据块已不再被使用。该操作无数据传输过程;启动或关闭:启动或者关闭RAID系统。以上操作的基本单位都是RAID系统中的最小数据单元,通常为512B或者4kB。The host, the user of the RAID system, can issue the following operation commands to the RAID controller: read: read one or more consecutive data blocks in the RAID system; write: write one or more consecutive data blocks to the RAID system Block; write zeros: Write one or more consecutive all-zero data blocks to the RAID system. This operation only has a write command and countless transmission processes; discard: Send a command to the RAID system to indicate that one or more data blocks are no longer used. There is no data transmission process in this operation; Start or shut down: Start or shut down the RAID system. The basic unit of the above operations is the smallest data unit in the RAID system, usually 512B or 4kB.

RAID控制器,执行主机发送的各种IO命令操作,完成数据在磁盘上的写入和读取,并根据RAID级别生成校验数据,实现数据的冗余保护。The RAID controller executes various IO command operations sent by the host, completes the writing and reading of data on the disk, and generates verification data based on the RAID level to achieve data redundancy protection.

缓存,用于存放RAID控制器运行时使用的临时数据,以及缓存数据状态位图。Cache, used to store temporary data used when the RAID controller is running, as well as the cache data status bitmap.

磁盘阵列,磁盘阵列中包括多个磁盘,多个磁盘组成了一个RAID组,用于存放用户数据和RAID控制器生成用于冗余保护的校验数据。也用于存放RAID组运行相关的一些数据。A disk array includes multiple disks. Multiple disks form a RAID group, which is used to store user data and the RAID controller generates verification data for redundancy protection. It is also used to store some data related to the operation of the RAID group.

可选地,基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息之前,上述方法还包括:获取磁盘阵列中多个子条带的状态,其中,一个子条带的状态中包括多个数据块状态和一个校验块状态,其中,多个数据块状态用于表示子条带中多个数据块的状态,校验块状态用于表示子条带中校验块的状态;利用多个子条带的状态生成数据状态位图,并缓存数据状态位图。在本实施例中,数据状态位图在RAID系统运行时存放于缓存中。例如,数据状态位图的结构如图5所示,对数据块和校验块分别设置状态位。其中,对于数据块,每一个数据块设置一个状态位;对于校验块,无论一个子条带中有几个校验块(RAID5、RAID 6、RAID 三校验分别有1、2、3个校验块),都只设置一个状态位。可选地,每个数据块状态位记录两种状态:状态1,用于表示数据块为未使用状态;状态2,用于表示数据块为已使用状态。每个校验块块状态位记录两种状态:状态1,用于表示校验数据为子条带中所有状态1数据块的校验和(简称为部分校验);状态2,用于表示校验数据为子条带中所有数据块的校验和(简称为全校验)。Optionally, before reading the target status information of the target substripe from the data status bitmap based on the target operation instruction, the above method further includes: obtaining the status of multiple substripes in the disk array, where the status of one substripe includes multiple data block states and a parity block state, where multiple data block states are used to represent the status of multiple data blocks in the sub-stripe, and the parity block state is used to represent the status of the parity blocks in the sub-stripe. Status; use the status of multiple sub-stripes to generate a data status bitmap and cache the data status bitmap. In this embodiment, the data status bitmap is stored in the cache when the RAID system is running. For example, the structure of the data status bitmap is shown in Figure 5. The status bits are set for the data block and the check block respectively. Among them, for data blocks, each data block is set with a status bit; for parity blocks, no matter how many parity blocks there are in a sub-stripe (RAID5, RAID 6, and RAID three parity have 1, 2, and 3 respectively) parity block), only one status bit is set. Optionally, each data block status bit records two states: state 1, used to indicate that the data block is in an unused state; state 2, used to indicate that the data block is in a used state. Each check block block status bit records two states: status 1, used to indicate that the check data is the checksum of all status 1 data blocks in the sub-stripe (referred to as partial check); status 2, used to indicate The check data is the checksum of all data blocks in the substripe (referred to as full checksum).

可选地,利用多个子条带的状态生成数据状态位图,并缓存数据状态位图之后,方法还包括:在磁盘阵列停止工作时,将数据状态位图存储至磁盘阵列中的磁盘中,其中,磁盘中包括存储数据状态位图的预设数据区。在本实施例中,在RAID组正常运行时,数据状态位图存放在RAID系统中的缓存中使用。当RAID组关闭时,数据状态位图需要做持久化存储。例如,通过以下方式存储数据状态位图:Optionally, after using the status of multiple sub-stripes to generate the data status bitmap and caching the data status bitmap, the method also includes: when the disk array stops working, storing the data status bitmap to a disk in the disk array, The disk includes a preset data area for storing data status bitmaps. In this embodiment, when the RAID group is running normally, the data status bitmap is stored in the cache in the RAID system for use. When the RAID group is closed, the data status bitmap needs to be stored persistently. For example, store the data status bitmap in the following way:

S1,RAID组在创建时在每块磁盘上预留空间,用于存放数据状态位图。如图6所示的RAID组由N个磁盘组成,每个磁盘上预留数据状态位图区。S1, when the RAID group is created, space is reserved on each disk to store the data status bitmap. The RAID group shown in Figure 6 consists of N disks, and a data status bitmap area is reserved on each disk.

S2,根据RAID组的级别,确定数据状态位图在多个磁盘上存放的份数,以保证RAID系统中出现坏盘时,数据状态位图依然能够被正确读取。例如,RAID5至少在两块磁盘上存放两份数据状态位图,RAID6至少在三块磁盘上存放三份数据状态位图,RAID三校验至少在四块磁盘上存放四份数据状态位图。S2, according to the level of the RAID group, determines the number of copies of the data status bitmap stored on multiple disks to ensure that when a disk failure occurs in the RAID system, the data status bitmap can still be read correctly. For example, RAID5 stores at least two data status bitmaps on two disks, RAID6 stores at least three data status bitmaps on three disks, and RAID three-parity stores four data status bitmaps on at least four disks.

S3,当RAID系统执行关闭操作时,将系统缓存中的数据状态位图写入磁盘上预留的数据区。S3, when the RAID system performs a shutdown operation, the data status bitmap in the system cache is written to the reserved data area on the disk.

S4,当RAID系统启动时,从磁盘上预留的预设数据区中读取数据状态位图到系统缓存中使用。S4, when the RAID system starts, the data status bitmap is read from the preset data area reserved on the disk and used in the system cache.

通过本申请,由于磁盘阵列控制器接收主机发送的目标操作指令,基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息,按照目标自条带中的数据块状态和校验块状态可以确定出数据块的有效性,从而可以对有效的数据块进行处理,无需关注无效的数据块。从而提升了RAID系统任务的处理效率。因此,可以解决相关技术中在RAID系统中对数据的处理效率较低的问题。Through this application, because the disk array controller receives the target operation instruction sent by the host, reads the target status information of the target sub-stripe from the data status bitmap based on the target operation instruction, and reads the target status information of the target sub-stripe according to the data block status and calibration in the target sub-stripe. Checking the block status can determine the validity of the data block, so that valid data blocks can be processed without paying attention to invalid data blocks. This improves the processing efficiency of RAID system tasks. Therefore, the problem of low data processing efficiency in the RAID system in related technologies can be solved.

在一个示例性实施例中,基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息,包括:获取目标操作指令中包括的数据块起始位置和数据块长度;利用数据块起始位置和数据块长度确定目标子条带;从数据状态位图中读取目标子条带的目标状态信息。在本实施例中,按照数据块长度从数据块起始位置开始查找,可以准确的出需要执行操作的目标子条带。In an exemplary embodiment, reading the target status information of the target sub-stripe from the data status bitmap based on the target operation instruction includes: obtaining the data block starting position and data block length included in the target operation instruction; using the data The block starting position and data block length determine the target substripe; the target status information of the target substripe is read from the data status bitmap. In this embodiment, by searching from the starting position of the data block according to the length of the data block, the target sub-stripe that needs to be operated can be accurately found.

在一个示例性实施例中,基于目标状态信息响应目标操作指令,对目标子条带执行数据处理,包括:在目标操作指令为从目标子条带中读取目标数据块的操作指令时,读取目标数据块的数据块状态,其中,目标数据块是目标子条带中多个数据块中的数据块;在目标数据块的数据块状态的状态值是第一预设值的情况下,响应目标操作指令,向主机反馈目标数据块为空的信息,其中,第一预设值用于表示目标数据块为空。在本实施例中,目标数据块为空表示目标数据块中没有存储数据,读出的数据是空,只需要向主机反馈全零的数据即可。需要说明的是,目标数据块可以是一个数据块,也可以是目标子条带中的多个数据块,具体包括的数量可以从目标操作指令中包括的数据块起始位置和数据块长度确定。读取其他数据块中的数据的方式和目标数据块的方式相同。In an exemplary embodiment, in response to the target operation instruction based on the target status information, performing data processing on the target sub-stripe includes: when the target operation instruction is an operation instruction to read the target data block from the target sub-stripe, read Get the data block status of the target data block, where the target data block is a data block among multiple data blocks in the target sub-stripe; when the status value of the data block status of the target data block is the first preset value, In response to the target operation instruction, information that the target data block is empty is fed back to the host, where the first preset value is used to indicate that the target data block is empty. In this embodiment, if the target data block is empty, it means that there is no data stored in the target data block. The read data is empty, and only all zero data needs to be fed back to the host. It should be noted that the target data block can be one data block or multiple data blocks in the target sub-stripe. The specific number can be determined from the starting position of the data block and the length of the data block included in the target operation instruction. . Data in other data blocks is read in the same way as the target data block.

在一个示例性实施例中,基于目标状态信息响应目标操作指令,对目标子条带执行数据处理,包括:在目标操作指令为从目标子条带中读取目标数据块的操作指令时,读取目标数据块的数据块状态,其中,目标数据块是目标子条带中多个数据块中的数据块;在目标数据块的数据块状态的状态值是第二预设值,且目标数据块处于异常磁盘中的情况下,读取校验块状态,其中,校验块状态用于表示目标子条带中包括的校验块的状态,第二预设值用于表示目标数据块中包括数据;在校验块状态的状态值是第三预设值的情况下,读取校验块中的数据和目标子条带中状态值是第二预设值的数据块中的数据,其中,状态值是第二预设值的数据块均设置在正常磁盘中,第二预设值用于表示数据块中包括数据;响应目标操作指令,将校验块中的数据和目标子条带中状态值是第二预设值的数据块中的数据发送至主机。在本实施例中,目标数据块的数据块状态的状态值是第二预设值则表示目标数据块中包括数据,需要进步一判断目标数据块是否在异常磁盘(例如,损坏的磁盘)上,在目标数据块处于异常磁盘中的情况下,进一步判断校验块的状态,按照校验块的状态判断是否需要读取出全部数据。第三预设值可以是1,用于表示校验块为目标子条带中所有状态为1的数据块的校验和,状态值为1的数据块用于表示数据块为空。在校验块的状态值为1时,只需要读取包括数据的数据块,并不需要读取全部的数据块,从而可以提高数据处理的效率。In an exemplary embodiment, in response to the target operation instruction based on the target status information, performing data processing on the target sub-stripe includes: when the target operation instruction is an operation instruction to read the target data block from the target sub-stripe, read Get the data block status of the target data block, where the target data block is a data block among multiple data blocks in the target sub-stripe; the status value of the data block status of the target data block is the second preset value, and the target data When the block is in the abnormal disk, the check block status is read, where the check block status is used to represent the status of the check block included in the target substripe, and the second preset value is used to represent the status of the check block included in the target data block. including data; when the status value of the check block status is the third preset value, read the data in the check block and the data in the data block in the target sub-stripe whose status value is the second preset value, Among them, the data blocks whose status value is the second preset value are all set in the normal disk, and the second preset value is used to indicate that the data block includes data; in response to the target operation instruction, the data in the check block and the target sub-strip are The data in the data block whose in-band status value is the second preset value is sent to the host. In this embodiment, if the status value of the data block status of the target data block is the second preset value, it means that the target data block contains data. It is necessary to further determine whether the target data block is on an abnormal disk (for example, a damaged disk). , when the target data block is in the abnormal disk, further determine the status of the check block, and determine whether all data needs to be read according to the status of the check block. The third preset value may be 1, which is used to indicate that the check block is the checksum of all data blocks with a status of 1 in the target sub-stripe, and a data block with a status value of 1 is used to indicate that the data block is empty. When the status value of the check block is 1, only the data block including the data needs to be read, and not all the data blocks need to be read, thereby improving the efficiency of data processing.

在一个示例性实施例中,上述方法还包括:在校验块状态的状态值是第四预设值的情况下,读取校验块中的数据和目标子条带中处于正常磁盘的数据块中的数据;响应目标操作指令,将校验块中的数据和目标子条带中处于正常磁盘的数据块中的数据发送至主机。在本实施例中,第四预设值可以是2,用于表示校验块为目标子条带中所有数据块的校验和。在校验块的状态值为2时,需要读取所有处于正常磁盘中的数据块,并不需要读取全部的数据块,从而可以提高数据处理的效率。In an exemplary embodiment, the above method further includes: when the status value of the check block status is a fourth preset value, reading the data in the check block and the data on the normal disk in the target substripe The data in the block; in response to the target operation command, send the data in the check block and the data in the data block of the normal disk in the target substripe to the host. In this embodiment, the fourth preset value may be 2, which is used to indicate that the check block is the check sum of all data blocks in the target sub-stripe. When the status value of the check block is 2, all data blocks in the normal disk need to be read, and not all data blocks need to be read, thereby improving the efficiency of data processing.

例如,如图7所示,是本实施例数据读取的整体流程图,包括以下步骤:For example, as shown in Figure 7, it is the overall flow chart of data reading in this embodiment, including the following steps:

S701,读取子条带(相当于上述中的目标子条带)中目标数据块的状态;S701, read the status of the target data block in the sub-stripe (equivalent to the target sub-stripe above);

S702,判断目标数据块的状态值;S702, determine the status value of the target data block;

S703,在目标数据块的状态值是1的情况下,返回全零给主机;S703, when the status value of the target data block is 1, return all zeros to the host;

S704,在目标数据块的状态值不是1(例如是2或者其他值),且子条带中存在损坏的磁盘的情况下,判断被读取的目标数据块是否在损坏的磁盘上;S704, when the status value of the target data block is not 1 (for example, 2 or other values) and there is a damaged disk in the substripe, determine whether the read target data block is on the damaged disk;

S705,在目标数据块不在损坏的磁盘上的情况下,从磁盘中读取目标数据块中的数据,并返回给主机;S705, when the target data block is not on the damaged disk, read the data in the target data block from the disk and return it to the host;

S706,在目标数据块在损坏的磁盘上的情况下,读取校验块的状态值;S706, when the target data block is on the damaged disk, read the status value of the check block;

S707,判断校验块的状态值;S707, determine the status value of the check block;

S708,校验块的状态值是1的情况下,从磁盘中读取校验块中的数据,并读取所有状态值为2的正常磁盘中数据块中的数据,状态值为2的数据块中包括数据;S708, when the status value of the check block is 1, read the data in the check block from the disk, and read the data in all data blocks in the normal disk with a status value of 2, and the data with a status value of 2. Blocks include data;

S709,将读取的数据返回至主机;S709, return the read data to the host;

S710,校验块的状态值不是1(是2或者其他值)的情况下,从磁盘中读取校验块的数据和所有正常磁盘中的数据块的数据,并将读取的数据返回至主机。S710, when the status value of the check block is not 1 (is 2 or other value), read the data of the check block and the data of all data blocks in the normal disk from the disk, and return the read data to host.

在一个示例性实施例中,基于目标状态信息响应目标操作指令,对目标子条带执行数据处理,包括:在目标操作指令为向目标子条带中写入数据的操作指令时,读取校验块状态,其中,校验块状态用于表示目标子条带中包括的校验块的状态;在校验块状态的状态值是第三预设值的情况下,读取目标数据块的数据块状态,其中,目标数据块是目标子条带中多个数据块中的数据块;在目标数据块状态的状态值是第一预设值的情况下,读取目标子条带中的其他数据块,其中,其他数据块是目标子条带中除目标数据块之外的数据块,其他数据块的数据块状态的状态值是第二预设值,第一预设值用于表示目标数据块为空,第二预设值用于表示其他数据块中包括数据;响应目标操作指令,利用其他数据块将数据更新至目标子条带中。在本实施例中,在执行写入数据的操作时,需要判断目标子条带中是否存在损坏的磁盘,在没有损坏的磁盘的情况下,通过判断校验块的状态值和数据块的状态值确定可以写入数据块的具体操作流程,从而可以提高数据的写入效率。例如,在校验块状态的状态值是第三预设值(例如是1),数据块的状态值也是1,则从目标子条带中读取状态值是2的数据块,对状态值是2的数据块执行RCW计算;在校验块状态的状态值是第四预设值(例如是2),数据块的状态值也是2,则从目标子条带中读取状态值是2的数据块,对状态值是2的数据块执行RCW计算,或者执行RMW计算;在校验块状态的状态值是第四预设值的情况下,对数据块执行RCW计算或者RMW计算。本实施例通过数据块的状态和校验块的状态确定需要执行的计算,并不需要对所有的数据块执行计算,从而可以有效的提高数据的处理效率。In an exemplary embodiment, responding to the target operation instruction based on the target status information and performing data processing on the target sub-stripe includes: when the target operation instruction is an operation instruction to write data to the target sub-stripe, read the calibration Check block status, where the check block status is used to represent the status of the check block included in the target sub-stripe; when the status value of the check block status is the third preset value, read the target data block Data block status, wherein the target data block is a data block among multiple data blocks in the target sub-stripe; when the status value of the target data block status is the first preset value, read the target sub-stripe Other data blocks, where the other data blocks are data blocks other than the target data block in the target sub-stripe, the status value of the data block status of the other data blocks is the second preset value, and the first preset value is used to represent The target data block is empty, and the second preset value is used to indicate that other data blocks include data; in response to the target operation instruction, other data blocks are used to update the data into the target sub-stripe. In this embodiment, when performing the operation of writing data, it is necessary to determine whether there is a damaged disk in the target sub-stripe. If there is no damaged disk, by judging the status value of the check block and the status of the data block. The value determines the specific operation process that can be written to the data block, thereby improving the efficiency of data writing. For example, if the status value of the check block status is the third preset value (for example, 1), and the status value of the data block is also 1, then the data block with the status value of 2 is read from the target substripe, and the status value is Perform RCW calculation on the data block that is 2; the status value in the check block status is the fourth preset value (for example, 2), and the status value of the data block is also 2, then the status value read from the target sub-stripe is 2 of the data block, perform RCW calculation or RMW calculation on the data block whose status value is 2; when the status value of the check block status is the fourth preset value, perform RCW calculation or RMW calculation on the data block. This embodiment determines the calculations that need to be performed based on the status of the data block and the status of the check block, and does not need to perform calculations on all data blocks, thereby effectively improving data processing efficiency.

例如,如图8所示,是本实施例写入数据的流程图,包括以下步骤:For example, as shown in Figure 8, it is a flow chart for writing data in this embodiment, including the following steps:

S801,读取目标子条带中校验块的状态值;S801, read the status value of the check block in the target sub-stripe;

S802,判断校验块的状态值;S802, determine the status value of the check block;

S803,在校验块的状态值是1的情况下,读取目标子条带中目标数据块的状态值;S803, when the status value of the check block is 1, read the status value of the target data block in the target substripe;

S804,判断目标数据块的状态值;S804, determine the status value of the target data block;

S805,在目标数据块的状态值是1的情况下,读取所有状态值为2的数据块,并对所有状态值为2的数据块执行RCW计算,并写入磁盘;S805, when the status value of the target data block is 1, read all data blocks with a status value of 2, perform RCW calculations on all data blocks with a status value of 2, and write them to the disk;

S806,在目标数据块的状态值不是1的情况下,仅读取所有状态值为2的数据块,并对所有状态值为2的数据块执行RCW计算,并写入磁盘;或者执行RMW计算,并写入磁盘;S806, when the status value of the target data block is not 1, only read all data blocks with a status value of 2, perform RCW calculation on all data blocks with a status value of 2, and write to the disk; or perform RMW calculation , and write to disk;

S807,根据规则更新目标子条带中的数据块的状态值和校验块的状态值。S807: Update the status value of the data block and the status value of the check block in the target sub-stripe according to the rules.

S808,在校验块的状态值不是1的情况下,对目标子条带中目标数据块执行RCW计算,并写入磁盘;或者执行RMW计算,并写入磁盘。S808: When the status value of the check block is not 1, perform RCW calculation on the target data block in the target substripe and write it to the disk; or perform RMW calculation and write it to the disk.

在一个示例性实施例中,基于目标状态信息响应目标操作指令,对目标子条带执行数据处理,包括:在目标操作指令为向目标子条带中写入数据的操作指令时,读取校验块状态,其中,校验块状态用于表示目标子条带中包括的校验块的状态;在目标数据块处于异常磁盘中,且校验块状态的状态值是第三预设值的情况下,读取目标数据块的数据块状态;在目标数据块的数据块状态的状态值是第一预设值的情况下,读取校验块中的数据,其中,第一预设值用于表示目标数据块为空;响应目标操作指令,利用校验块中的数据和数据更新校验块的校验状态。在本实施例中,在存在损坏的磁盘的情况下,通过判断目标数据块是否在损坏的磁盘上,并判断数据块的状态和校验块的状态执行对数据块的写入操作,并不需要对全部数据块执行操作,可以有效的提高数据的写入效率。In an exemplary embodiment, responding to the target operation instruction based on the target status information and performing data processing on the target sub-stripe includes: when the target operation instruction is an operation instruction to write data to the target sub-stripe, read the calibration Check block status, where the check block status is used to represent the status of the check block included in the target substripe; when the target data block is in the abnormal disk, and the status value of the check block status is the third preset value In this case, read the data block status of the target data block; when the status value of the data block status of the target data block is the first preset value, read the data in the check block, where the first preset value Used to indicate that the target data block is empty; in response to the target operation instruction, update the verification status of the verification block using the data and data in the verification block. In this embodiment, when there is a damaged disk, the writing operation of the data block is performed by judging whether the target data block is on the damaged disk, and judging the status of the data block and the status of the check block. Operations need to be performed on all data blocks, which can effectively improve data writing efficiency.

可选地,上述方法还包括:在目标数据块状态的状态值是第二预设值的情况下,读取目标子条带中的其他数据块,其中,其他数据块是目标子条带中除目标数据块之外的数据块,其他数据块的数据块状态的状态值是第二预设值,第二预设值用于表示其他数据块不为空;响应目标操作指令,利用其他数据块将数据更新至目标子条带中。Optionally, the above method also includes: when the status value of the target data block status is the second preset value, reading other data blocks in the target sub-stripe, where the other data blocks are in the target sub-stripe. Except for the target data block, the status value of the data block status of other data blocks is the second preset value, and the second preset value is used to indicate that other data blocks are not empty; in response to the target operation instruction, other data are utilized block updates data into the target substripe.

在一个示例性实施例中,在目标操作指令为向目标子条带中写入目标数据的操作指令时,读取校验块状态之后,上述方法还包括:在目标数据块处于异常磁盘中,且校验块状态的状态值是第四预设值的情况下,利用数据块对目标子条带进行更新。In an exemplary embodiment, when the target operation instruction is an operation instruction to write target data into the target sub-stripe, after reading the check block status, the above method further includes: when the target data block is in the abnormal disk, And when the status value of the check block status is the fourth preset value, the target sub-stripe is updated using the data block.

可选地,在目标操作指令为向目标子条带中写入数据的操作指令时,读取校验块状态之后,上述方法还包括:在目标子条带中包括异常磁盘,且数据块处于正常磁盘中的情况下,读取数据块的数据块状态;在目标数据块的数据块状态的状态值是第一预设值的情况下,读取校验块中的数据;利用校验块中的数据和目标数据更新校验块的校验状态。Optionally, when the target operation instruction is an operation instruction to write data into the target sub-stripe, after reading the check block status, the above method further includes: including the abnormal disk in the target sub-stripe, and the data block is in In the case of a normal disk, read the data block status of the data block; when the status value of the data block status of the target data block is the first preset value, read the data in the check block; use the check block The data in and target data update the verification status of the verification block.

可选地,在目标子条带中包括异常磁盘,且目标数据块处于正常磁盘中的情况下,读取目标数据块的数据块状态之后,上述方法还包括:在目标数据块状态的状态值是第二预设值的情况下,读取目标子条带中的其他数据块,其中,其他数据块是目标子条带中除目标数据块之外的数据块,其他数据块的数据块状态的状态值是第二预设值,第二预设值用于表示其他数据块不为空;利用其他数据块将数据更新至目标子条带中。Optionally, when the target sub-stripe includes an abnormal disk and the target data block is in a normal disk, after reading the data block status of the target data block, the above method further includes: in the status value of the target data block status is the second preset value, read other data blocks in the target sub-stripe, where the other data blocks are data blocks in the target sub-stripe other than the target data block, and the data block status of the other data blocks The status value of is a second preset value, and the second preset value is used to indicate that other data blocks are not empty; other data blocks are used to update data to the target sub-stripe.

可选地,在目标操作指令为向目标子条带中写入数据的操作指令时,读取校验块状态之后,上述方法还包括:在目标子条带中包括异常磁盘、目标数据块处于正常磁盘中,且校验块状态的状态值是第四预设值的情况下,将数据更新至目标子条带中。Optionally, when the target operation instruction is an operation instruction to write data into the target sub-stripe, after reading the check block status, the above method further includes: including the abnormal disk in the target sub-stripe, the target data block in In the case of a normal disk and the status value of the check block status is the fourth preset value, the data is updated to the target substripe.

例如,如图9所示,是本实施例中存在损坏磁盘的情况下,写入数据的流程图,包括以下步骤:For example, as shown in Figure 9, it is a flow chart for writing data when there is a damaged disk in this embodiment, including the following steps:

S901,读取目标子条带中校验块的状态值;S901, read the status value of the check block in the target sub-stripe;

S902,判断目标数据块是否在损坏的磁盘上;S902, determine whether the target data block is on the damaged disk;

S903,在目标数据块不在损坏的磁盘上的情况下,判断校验块的状态值;S903, when the target data block is not on the damaged disk, determine the status value of the check block;

S904,在校验块的状态值是1的情况下,读取目标子条带中数据块的状态值;S904, when the status value of the check block is 1, read the status value of the data block in the target substripe;

S905,判断数据块的状态值;S905, determine the status value of the data block;

S906,在数据块的状态值是1的情况下,读取校验块中的数据,并与需要写入的数据重新计算校验块,将需要写入的数据和新的校验块写入磁盘,并转至S908;S906, when the status value of the data block is 1, read the data in the check block, recalculate the check block with the data that needs to be written, and write the data that needs to be written and the new check block. disk and go to S908;

S907,在数据块的状态值不是1的情况下,读取状态值为2的数据块,对状态值为2的数据块执行RMW计算并写入磁盘,并转至S908;S907, when the status value of the data block is not 1, read the data block with the status value 2, perform RMW calculation on the data block with the status value 2 and write it to the disk, and go to S908;

S908,根据规则更新目标子条带中的数据块的状态值和校验块的状态值;S908: Update the status value of the data block and the status value of the check block in the target sub-stripe according to the rules;

S909,在校验块的状态值不是1的情况下,对目标子条带中数据块执行RMW计算,并写入磁盘,并转至S908;S909, when the status value of the check block is not 1, perform RMW calculation on the data block in the target substripe, write it to the disk, and go to S908;

S910,在目标数据块在损坏的磁盘上的情况下,判断校验块的状态值;S910, when the target data block is on the damaged disk, determine the status value of the check block;

S911,在校验块的状态值是1的情况下,读取目标子条带中目标数据块的状态;S911, when the status value of the check block is 1, read the status of the target data block in the target substripe;

S912,判断目标数据块的状态值;S912, determine the status value of the target data block;

S913,在目标数据块的状态值是1的情况下,读取校验块中的数据,并与需要写入的数据重新计算校验块,将需要写入的数据和新的校验块写入磁盘,并转至S908;S913, when the status value of the target data block is 1, read the data in the check block, recalculate the check block with the data that needs to be written, and write the data that needs to be written and the new check block. Insert the disk and go to S908;

S914,在目标数据块的状态值不是1的情况下,读取状态值为2的数据块,对状态值为2的数据块执行RMW计算并写入磁盘,并转至S908;S914, when the status value of the target data block is not 1, read the data block with the status value 2, perform RMW calculation on the data block with the status value 2 and write it to the disk, and go to S908;

S915,在校验块的状态值不是1的情况下,对目标子条带中数据块执行RCW计算,并写入磁盘,并转至S908。S915, if the status value of the check block is not 1, perform RCW calculation on the data block in the target substripe, write it to the disk, and go to S908.

在一个示例性实施例中,基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息之前,上述方法还包括:在对磁盘阵列执行初始化操作时,将磁盘阵列中多个子条带的数据块状态的状态值均设置为第一预设值,并将多个子条带的校验块状态的状态值均设置为第三预设值;在接收主机发送的目标操作指令之后,基于目标操作指令的指令类型修改数据块状态的状态值。在本实施例中,在初始化阶段,将所有的数据块和校验块均设置为1,不用向磁盘写入任何数据。In an exemplary embodiment, before reading the target status information of the target substripe from the data status bitmap based on the target operation instruction, the above method further includes: when performing an initialization operation on the disk array, converting multiple substripes in the disk array. The status values of the data block status of the strip are all set to the first preset value, and the status values of the check block status of multiple sub-stripes are set to the third preset value; after receiving the target operation command sent by the host , modify the status value of the data block status based on the instruction type of the target operation instruction. In this embodiment, during the initialization phase, all data blocks and parity blocks are set to 1, and no data is written to the disk.

在一个示例性实施例中,接收主机发送的目标操作指令之后,上述方法还包括:在目标操作指令为重新构建目标数据块时,读取目标数据块的数据块状态和目标子条带的校验块状态,其中,目标数据块是目标子条带中多个数据块中的数据块;在目标数据块的数据块状态的状态值是第二预设值,且目标数据块的校验块状态的状态值是第三预设值的情况下,读取目标子条带中的其他数据块,其中,其他数据块是目标子条带中除目标数据块之外的数据块,其他数据块的数据块状态的状态值是第二预设值,第二预设值用于表示其他数据块不为空;利用其他数据块中的数据和目标数据块的校验块中的数据计算重新构建后的目标数据块,并将重新构建后的目标数据块中的数据写入磁盘阵列。在本实施例中,通过确定重新构建的数据块的状态,可以对数据进行恢复处理,增加了数据处理的效率。In an exemplary embodiment, after receiving the target operation instruction sent by the host, the above method further includes: when the target operation instruction is to reconstruct the target data block, reading the data block status of the target data block and the calibration of the target sub-stripe. Check block status, wherein the target data block is a data block among multiple data blocks in the target sub-stripe; the status value of the data block status of the target data block is the second preset value, and the check block of the target data block When the status value of the status is the third preset value, read other data blocks in the target sub-stripe, where the other data blocks are data blocks in the target sub-stripe other than the target data block, and the other data blocks are The status value of the data block status is the second preset value. The second preset value is used to indicate that other data blocks are not empty; it is reconstructed using the data in other data blocks and the data in the check block of the target data block. The target data block after reconstruction, and the data in the reconstructed target data block is written to the disk array. In this embodiment, by determining the status of the reconstructed data block, the data can be restored, which increases the efficiency of data processing.

可选地,目标操作指令为重新构建目标数据块时,读取目标数据块的数据块状态和校验块状态之后,方法还包括:在目标数据块的数据块状态的状态值是第二预设值、目标数据块的校验块状态的状态值是第四预设值,且目标子条带中包括数据块状态的状态值是第一预设值的情况下,利用其他数据块重新确定目标子条带的校验数据块;将重新确定的校验数据块的校验状态的状态值修改为第三预设值。本实施例通过其他数据块重新确定出目标子条带的校验数据块,可以准确的确定出重新构建的数据块的状态。Optionally, when the target operation instruction is to reconstruct the target data block, after reading the data block status and the verification block status of the target data block, the method further includes: when the status value of the data block status of the target data block is the second predetermined value. If the set value, the status value of the check block status of the target data block is the fourth preset value, and the status value including the data block status in the target sub-stripe is the first preset value, use other data blocks to re-determine The check data block of the target sub-stripe; modify the status value of the check status of the redetermined check data block to the third preset value. In this embodiment, the verification data block of the target sub-stripe is re-determined through other data blocks, and the status of the reconstructed data block can be accurately determined.

可选地,目标操作指令为重新构建目标数据块时,读取目标数据块的数据块状态和校验块状态之后,方法还包括:在目标数据块的数据块状态的状态值是第二预设值、目标数据块的校验块状态的状态值是第四预设值,且目标子条带中的其他数据块的数据块状态的状态值均是第二预设值的情况下,读取目标子条带中的所有数据块和校验数据块;利用目标子条带中的所有数据块和校验数据块计算重新构建后的目标数据块,并将重新构建后的目标数据块中的数据写入磁盘阵列。Optionally, when the target operation instruction is to reconstruct the target data block, after reading the data block status and the verification block status of the target data block, the method further includes: when the status value of the data block status of the target data block is the second predetermined value. When the set value and the status value of the check block status of the target data block are the fourth preset value, and the status values of the data block status of other data blocks in the target sub-stripe are all the second preset value, read Get all data blocks and check data blocks in the target sub-stripe; use all data blocks and check data blocks in the target sub-stripe to calculate the reconstructed target data block, and add the reconstructed target data block to The data is written to the disk array.

例如,如图10所示,是本实施例中重新构建数据块的流程图,包括以下步骤:For example, as shown in Figure 10, it is a flow chart for reconstructing data blocks in this embodiment, including the following steps:

S1001,读取目标子条带中被重新构建的数据块的状态和校验块的状态;S1001, read the status of the reconstructed data block and the status of the check block in the target sub-stripe;

S1002,判断目标子条带中所有数据块的状态值;S1002, determine the status values of all data blocks in the target sub-stripe;

S1003,在目标子条带中的数据块的状态值不是1的情况下,判断校验块的状态值;S1003, when the status value of the data block in the target sub-stripe is not 1, determine the status value of the check block;

S1004,在校验块的状态值是1的情况下,从磁盘中读取目标子条带中状态值是2的数据块;S1004, when the status value of the check block is 1, read the data block with the status value 2 in the target substripe from the disk;

S1005,从磁盘中读取目标子条带中校验块的数据;S1005, read the data of the parity block in the target substripe from the disk;

S1006,按照目标子条带中校验块的数据和目标子条带中状态值是2的数据块,计算出被恢复的数据块,得到重新构建的数据块,并写入磁盘中;S1006: Calculate the recovered data block according to the data of the check block in the target sub-stripe and the data block with a status value of 2 in the target sub-stripe, obtain the reconstructed data block, and write it to the disk;

S1007,在校验块的状态值不是1的情况下,判断目标子条带中是否包括状态值是1的数据块;S1007, when the status value of the check block is not 1, determine whether the target sub-stripe includes a data block with a status value of 1;

S1008,在目标子条带中包括状态值是1的数据块的情况下,从磁盘中读取目标子条带中状态值是2的数据块;S1008, when the target sub-stripe includes a data block with a status value of 1, read the data block with a status value of 2 in the target sub-stripe from the disk;

S1009,重新计算目标子条带中校验块,并写入磁盘中;S1009, recalculate the check blocks in the target substripe and write them to the disk;

S1010,将目标子条带中校验块的状态值修改为1;S1010, modify the status value of the check block in the target sub-stripe to 1;

S1011,在目标子条带中不包括状态值是1的数据块的情况下,从磁盘中读取目标子条带中所有的数据块;S1011, if the target sub-stripe does not include data blocks with a status value of 1, read all data blocks in the target sub-stripe from the disk;

S1012,从磁盘中读取目标子条带中的校验块中的数据;S1012, read the data in the parity block in the target substripe from the disk;

S1013,利用从磁盘中读取目标子条带中所有的数据块、目标子条带中的校验块中的数据,计算出被恢复的数据块,得到重新构建的数据块,并写入磁盘中。S1013, read all the data blocks in the target sub-stripe and the data in the check block in the target sub-stripe from the disk, calculate the recovered data blocks, obtain the reconstructed data blocks, and write them to the disk middle.

在一个示例性实施例中,接收主机发送的目标操作指令之后,方法还包括:在目标操作指令为迁移目标子条带中的数据块,且目标子条带中包括目标数据块的情况下,将目标数据块迁移至其他子条带中存储,其中,目标数据块是目标子条带中数据块状态的状态值为第二预设值的数据块;利用目标数据块计算目标子条带的校验数据块;在目标子条带中包括数据块状态的状态值为第一预设值的其他数据块的情况下,利用其他数据块修改校验数据块的校验值。在本实施例中,迁移目标子条带中的数据块包括级别迁移,级别迁移指RAID5、RAID6、RAIDTP三种RAID级别之间的迁移。级别迁移仅影响校验数据块的个数。由于本实施例中所有的校验数据块只对应一个校验块状态,因此级别迁移不影响数据状态位图的结构。传统的RAID控制器处理级别迁移时,需要按迁移前后条带上数据块的变化状态,对数据块进行搬移,并计算条带新的校验数据。本实施例以子条带为最小处理单元,并根据子条带状态位信息,仅对有效数据进行处理,可以减小级别迁移过程中的数据搬移操作。In an exemplary embodiment, after receiving the target operation instruction sent by the host, the method further includes: when the target operation instruction is to migrate the data block in the target sub-stripe, and the target sub-stripe includes the target data block, Migrate the target data block to other sub-stripes for storage, where the target data block is a data block whose status value of the data block status in the target sub-stripe is the second preset value; use the target data block to calculate the value of the target sub-stripe. Verify the data block; when the target sub-stripe includes other data blocks whose status value of the data block status is the first preset value, use other data blocks to modify the check value of the verification data block. In this embodiment, the data blocks in the migration target sub-stripe include level migration, and level migration refers to migration between three RAID levels: RAID5, RAID6, and RAIDTP. Level migration only affects the number of check data blocks. Since all check data blocks in this embodiment only correspond to one check block status, level migration does not affect the structure of the data status bitmap. When a traditional RAID controller handles level migration, it needs to move the data blocks according to the changing status of the data blocks on the stripe before and after migration, and calculate new parity data for the stripe. In this embodiment, sub-stripes are used as the minimum processing unit, and only valid data is processed according to the sub-stripe status bit information, which can reduce data moving operations during the level migration process.

例如,如图11所示,是本实施例中对单个子条带的迁移流程图,包括以下步骤:For example, as shown in Figure 11, it is a migration flow chart of a single sub-stripe in this embodiment, including the following steps:

S1101,读取目标子条带中所有的数据块的状态;S1101, read the status of all data blocks in the target substripe;

S1102,判断所有的数据块中是否存在状态值是2的数据块;S1102, determine whether there is a data block with a status value of 2 among all data blocks;

S1103,所有的数据块中存在状态值是2的数据块的情况下,迁移状态值是2的数据块;S1103, if there is a data block with a status value of 2 in all data blocks, migrate the data block with a status value of 2;

S1104,使用所被迁移的数据块计算出校验块,并写入磁盘;S1104, use the migrated data blocks to calculate the check block and write it to the disk;

S1105,判断是否存在状态值是1的数据块;S1105, determine whether there is a data block with a status value of 1;

S1106,在存在状态值是1的数据块的情况下,修改检验块的状态值为1;S1106. If there is a data block with a status value of 1, modify the status value of the check block to 1;

S1107,在不存在状态值是1的数据块的情况下,修改检验块的状态值为2。S1107: If there is no data block with a status value of 1, modify the status value of the check block to 2.

在一个示例性实施例中,接收主机发送的目标操作指令之后,方法还包括:在确定磁盘阵列中增加磁盘,得到扩容后的子条带的情况下,读取目标子条带的数据块状态和校验块状态;在目标数据块的数据块状态的状态值是第二预设值的情况下,将目标数据块中的数据迁移至扩容后的子条带中;利用扩容后的子条带中包括的数据块的数据块状态确定扩容后的子条带中的校验块的校验状态。在本实施例中,扩容操作需要增加新的磁盘存储数据,因此导致每个子条带中数据块的个数增加,此扩容操作会改变数据状态位图的结构。扩容操作将使数据在RAID系统上重新排布,本实施例按照数据位状态位图,扩容操作可以仅搬移有用数据,减少扩容操作过程中的IO操作,提升扩容操作的效率。In an exemplary embodiment, after receiving the target operation instruction sent by the host, the method further includes: when it is determined that a disk is added to the disk array to obtain an expanded sub-stripe, reading the data block status of the target sub-stripe. and check the block status; when the status value of the data block status of the target data block is the second preset value, migrate the data in the target data block to the expanded sub-stripe; use the expanded sub-stripe The data block status of the data blocks included in the stripe determines the parity status of the parity blocks in the expanded sub-stripe. In this embodiment, the expansion operation requires the addition of new disk storage data, which results in an increase in the number of data blocks in each substripe. This expansion operation will change the structure of the data status bitmap. The expansion operation will rearrange data on the RAID system. In this embodiment, according to the data bit status bitmap, the expansion operation can only move useful data, reducing IO operations during the expansion operation and improving the efficiency of the expansion operation.

例如,如图12所示,是本实施例中扩容操作的流程图,包括以下步骤:For example, as shown in Figure 12, it is a flow chart of the capacity expansion operation in this embodiment, including the following steps:

S1201,读取扩容之前的数据块的状态;S1201, read the status of the data block before expansion;

S1202,判断是否存在状态值是2的数据块;S1202, determine whether there is a data block with a status value of 2;

S1203,在存在状态值是2的数据块的情况下,迁移所有状态值是2的数据块;S1203. If there are data blocks with a status value of 2, migrate all data blocks with a status value of 2;

S1204,使用被迁移的数据块计算出校验块,并写入磁盘;S1204, use the migrated data blocks to calculate the check block and write it to the disk;

S1205,修改扩容后子条带数据块的状态,将被迁移数据块的状态值设置为2,其他数据块的状态值设置为1;S1205, modify the status of the sub-stripe data block after expansion, set the status value of the migrated data block to 2, and set the status value of other data blocks to 1;

S1206,判断是否存在状态值是1的数据块;S1206, determine whether there is a data block with a status value of 1;

S1207,在存在状态值是1的数据块的情况下,修改扩容后子条带的校验块的状态值为1;S1207, if there is a data block with a status value of 1, modify the status value of the check block of the expanded sub-stripe to 1;

S1208,在不存在状态值是1的数据块的情况下,修改扩容后子条带的校验块的状态值为2。S1208: If there is no data block with a status value of 1, modify the status value of the check block of the expanded sub-stripe to 2.

在一个示例性实施例中,接收主机发送的目标操作指令之后,方法还包括:在目标操作指令为校验目标子条带的操作指令时,读取目标子条带中所有数据块的数据块状态;在目标数据块的数据块状态的状态值是第二预设值,且目标子条带的校验块的校验状态的状态值是第四预设值的情况下,利用校验块和目标子条带中所有数据块对目标子条带进行一致性校验;在目标数据块的数据块状态的状态值是第二预设值,且目标子条带的校验块的校验状态的状态值是第三预设值的情况下,利用校验块和数据块状态的状态值是第二预设值的数据块对目标子条带进行一致性校验。在本实施例中,根据数据位状态位图,一致性校验操作可以仅对有效数据进行校验,减少过程中的IO操作,提升一致性校验的效率。In an exemplary embodiment, after receiving the target operation instruction sent by the host, the method further includes: when the target operation instruction is an operation instruction for verifying the target sub-stripe, reading the data blocks of all data blocks in the target sub-stripe. Status; when the status value of the data block status of the target data block is the second preset value, and the status value of the check status of the check block of the target sub-stripe is the fourth preset value, the check block is used Perform consistency check on the target sub-stripe with all data blocks in the target sub-stripe; the status value of the data block status in the target data block is the second preset value, and the check block of the target sub-stripe is verified When the status value of the status is the third preset value, consistency check is performed on the target sub-stripe using the check block and the data block whose status value is the second preset value. In this embodiment, according to the data bit status bitmap, the consistency check operation can only check valid data, reducing IO operations in the process and improving the efficiency of consistency check.

例如,一致性校验操作以单个子条带为最小单元,如图13所示,包括以下步骤:For example, the consistency check operation takes a single sub-stripe as the smallest unit, as shown in Figure 13, and includes the following steps:

S1301,读取子条带中的所有数据块的状态;S1301, read the status of all data blocks in the substripe;

S1302,判断是否存在状态值是2的数据块;S1302, determine whether there is a data block with a status value of 2;

S1303,在存在状态值是2的数据块的情况下,判断校验块的状态值;S1303. If there is a data block with a status value of 2, determine the status value of the check block;

S1304,在校验块的状态值是2的情况下,从磁盘中读取校验块和所有数据块执行一致性校验;S1304, when the status value of the check block is 2, read the check block and all data blocks from the disk to perform consistency check;

S1305,在校验块的状态值不是2的情况下,从磁盘中读取校验块和状态值是2的数据块执行一致性校验;S1305, when the status value of the check block is not 2, read the check block and the data block with the status value of 2 from the disk to perform consistency check;

S1306,根据实际校验结果返回成功或失败;S1306, returns success or failure based on the actual verification result;

S1307,在不存在状态值是2的数据块的情况下,返回校验成功。S1307: If there is no data block with a status value of 2, a verification success is returned.

在一个示例性实施例中,基于目标状态信息响应目标操作指令,对目标子条带执行数据操作之后,方法还包括:利用对目标子条带执行的数据操作对数据块状态和校验块状态进行更新。In an exemplary embodiment, after responding to the target operation instruction based on the target status information and performing the data operation on the target sub-stripe, the method further includes: using the data operation performed on the target sub-stripe to compare the data block status and the check block status. Make an update.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

在本实施例中还提供了一种磁盘阵列中的数据处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a data processing device in a disk array, which is used to implement the above embodiments and preferred implementations. What has been described will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

图14是根据本申请实施例的磁盘阵列中的数据处理装置的结构框图,如图14所示,该装置包括:Figure 14 is a structural block diagram of a data processing device in a disk array according to an embodiment of the present application. As shown in Figure 14, the device includes:

第一接收模块1402,用于接收主机发送的目标操作指令,其中,主机与磁盘阵列控制器连接,磁盘阵列控制器与磁盘阵列连接,磁盘阵列中包括多个磁盘,磁盘用于存储数据块;The first receiving module 1402 is used to receive target operation instructions sent by the host, where the host is connected to the disk array controller, and the disk array controller is connected to the disk array. The disk array includes multiple disks, and the disks are used to store data blocks;

第一读取模块1404,用于基于目标操作指令从数据状态位图中读取目标子条带的目标状态信息,其中,目标子条带用于在磁盘阵列中对数据进行分块存储,目标状态信息包括数据块状态和校验块状态,数据块状态用于表示目标子条带中的数据块是否被使用,校验块状态用于表示目标子条带的冗余状态;The first reading module 1404 is used to read the target status information of the target sub-stripe from the data status bitmap based on the target operation instruction, where the target sub-stripe is used to store data in blocks in the disk array, and the target The status information includes data block status and check block status. The data block status is used to indicate whether the data blocks in the target sub-stripe are used, and the check block status is used to indicate the redundancy status of the target sub-stripe;

第一响应模块1406,用于基于目标状态信息响应目标操作指令,对目标子条带执行数据处理。The first response module 1406 is configured to respond to the target operation instruction based on the target status information and perform data processing on the target sub-stripe.

在一个示例性实施例中,上述第一读取模块,包括:In an exemplary embodiment, the above-mentioned first reading module includes:

第一获取单元,用于获取上述目标操作指令中包括的数据块起始位置和数据块长度;The first acquisition unit is used to acquire the starting position and data block length of the data block included in the above-mentioned target operation instruction;

第一确定单元,用于利用上述数据块起始位置和上述数据块长度确定上述目标子条带;A first determination unit configured to determine the target sub-stripe using the starting position of the data block and the length of the data block;

第一读取单元,用于从上述数据状态位图中读取上述目标子条带的目标状态信息。The first reading unit is used to read the target status information of the target sub-stripe from the data status bitmap.

在一个示例性实施例中,上述第一响应模块,包括:In an exemplary embodiment, the above-mentioned first response module includes:

第二读取单元,用于在上述目标操作指令为从上述目标子条带中读取目标数据块的操作指令时,读取上述目标数据块的数据块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;The second reading unit is configured to read the data block status of the target data block when the target operation instruction is an operation instruction to read the target data block from the target sub-stripe, wherein the target data block is the above-mentioned target data block. A data block among multiple data blocks in the target substripe;

第一响应单元,用于在上述目标数据块的数据块状态的状态值是第一预设值的情况下,响应上述目标操作指令,向上述主机反馈上述目标数据块为空的信息,其中,上述第一预设值用于表示上述目标数据块为空。The first response unit is configured to respond to the target operation instruction when the status value of the data block status of the target data block is the first preset value, and feedback information that the target data block is empty to the host, wherein, The first preset value is used to indicate that the target data block is empty.

在一个示例性实施例中,上述第一响应模块,包括:In an exemplary embodiment, the above-mentioned first response module includes:

第二读取单元,用于在上述目标操作指令为从上述目标子条带中读取目标数据块的操作指令时,读取上述目标数据块的数据块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;The second reading unit is configured to read the data block status of the target data block when the target operation instruction is an operation instruction to read the target data block from the target sub-stripe, wherein the target data block is the above-mentioned target data block. A data block among multiple data blocks in the target substripe;

第三读取单元,用于在上述目标数据块的数据块状态的状态值是第二预设值,且上述目标数据块处于异常磁盘中的情况下,读取上述校验块状态,其中,上述校验块状态用于表示上述目标子条带中包括的校验块的状态,上述第二预设值用于表示上述目标数据块中包括数据;The third reading unit is configured to read the check block status when the status value of the data block status of the target data block is the second preset value and the target data block is in an abnormal disk, wherein, The above-mentioned check block status is used to indicate the status of the check block included in the above-mentioned target sub-stripe, and the above-mentioned second preset value is used to indicate that the above-mentioned target data block includes data;

第四读取单元,用于在上述校验块状态的状态值是第三预设值的情况下,读取上述校验块中的数据和上述目标子条带中状态值是上述第二预设值的数据块中的数据,其中,上述状态值是上述第二预设值的数据块均设置在正常磁盘中,上述第二预设值用于表示上述数据块中包括数据;The fourth reading unit is configured to read the data in the check block and the status value in the target sub-stripe when the status value of the check block status is the third preset value. The data in the data blocks with set values, wherein the data blocks with the above-mentioned status value being the above-mentioned second preset value are all set in the normal disk, and the above-mentioned second preset value is used to indicate that the above-mentioned data block includes data;

第二响应单元,用于响应上述目标操作指令,将上述校验块中的数据和上述目标子条带中状态值是上述第二预设值的数据块中的数据发送至上述主机。The second response unit is configured to respond to the target operation instruction and send the data in the check block and the data block in the target sub-stripe whose status value is the second preset value to the host.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第二读取模块,用于在上述校验块状态的状态值是第四预设值的情况下,读取上述校验块中的数据和上述目标子条带中处于正常磁盘的数据块中的数据;The second reading module is used to read the data in the above-mentioned check block and the data blocks in the normal disk in the above-mentioned target sub-stripe when the status value of the above-mentioned check block status is the fourth preset value. The data;

第二响应模块,用于响应上述目标操作指令,将上述校验块中的数据和上述目标子条带中处于正常磁盘的数据块中的数据发送至上述主机。The second response module is configured to respond to the target operation instruction and send the data in the check block and the data in the data block of the normal disk in the target substripe to the host.

在一个示例性实施例中,上述第一响应模块,包括:In an exemplary embodiment, the above-mentioned first response module includes:

第五读取单元,用于在上述目标操作指令为向上述目标子条带中写入上述数据的操作指令时,读取上述校验块状态,其中,上述校验块状态用于表示上述目标子条带中包括的校验块的状态;The fifth reading unit is configured to read the check block status when the target operation instruction is an operation instruction to write the data to the target sub-stripe, wherein the check block status is used to represent the target The status of the parity blocks included in the substripe;

第六读取单元,用于在上述校验块状态的状态值是第三预设值的情况下,读取目标数据块的数据块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;The sixth reading unit is configured to read the data block status of the target data block when the status value of the check block status is the third preset value, wherein the target data block is in the target sub-stripe. data block in multiple data blocks;

第七读取单元,用于在上述目标数据块状态的状态值是第一预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第一预设值用于表示上述目标数据块为空,上述第二预设值用于表示上述其他数据块中包括数据;The seventh reading unit is configured to read other data blocks in the target sub-stripe when the status value of the target data block status is the first preset value, wherein the other data blocks are the target sub-stripes. For data blocks in the strip other than the above-mentioned target data block, the status values of the data block statuses of the above-mentioned other data blocks are the second preset value. The above-mentioned first preset value is used to indicate that the above-mentioned target data block is empty. The second default value is used to indicate that the other data blocks mentioned above include data;

第三响应单元,用于响应上述目标操作指令,利用上述其他数据块将上述数据更新至上述目标子条带中。The third response unit is configured to respond to the target operation instruction and update the data to the target sub-stripe using the other data blocks.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第三响应模块,用于在上述校验块状态的状态值是第四预设值的情况下,响应上述目标操作指令,利用上述目标数据块的数量将上述数据更新至上述目标子条带中。The third response module is configured to respond to the target operation instruction when the status value of the check block status is the fourth preset value, and update the data to the target sub-stripe using the number of the target data blocks. .

在一个示例性实施例中,上述第一响应模块,包括:In an exemplary embodiment, the above-mentioned first response module includes:

第八读取单元,用于在上述目标操作指令为向上述目标子条带中写入上述数据的操作指令时,读取上述校验块状态,其中,上述校验块状态用于表示上述目标子条带中包括的校验块的状态;The eighth reading unit is configured to read the check block status when the target operation instruction is an operation instruction to write the data to the target sub-stripe, wherein the check block status is used to represent the target The status of the parity blocks included in the substripe;

第九读取单元,用于在目标数据块处于异常磁盘中,且上述校验块状态的状态值是第三预设值的情况下,读取目标数据块的数据块状态;The ninth reading unit is used to read the data block status of the target data block when the target data block is in the abnormal disk and the status value of the above-mentioned check block status is the third preset value;

第十读取单元,用于在上述目标数据块的数据块状态的状态值是第一预设值的情况下,读取上述校验块中的数据,其中,上述第一预设值用于表示上述目标数据块为空;The tenth reading unit is configured to read the data in the check block when the status value of the data block status of the target data block is a first preset value, wherein the first preset value is used for Indicates that the above target data block is empty;

第四响应单元,用于响应上述目标操作指令,利用上述校验块中的数据和上述数据更新上述校验块的校验状态。The fourth response unit is configured to respond to the target operation instruction and update the verification status of the verification block using the data in the verification block and the data.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第三读取模块,用于在上述目标数据块状态的状态值是第二预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第二预设值用于表示上述其他数据块不为空;The third reading module is configured to read other data blocks in the target sub-stripe when the status value of the target data block status is the second preset value, wherein the other data blocks are the target sub-stripes. For data blocks in the strip other than the above-mentioned target data block, the status value of the data block status of the above-mentioned other data blocks is a second preset value, and the above-mentioned second preset value is used to indicate that the above-mentioned other data blocks are not empty;

第四响应模块,用于响应上述目标操作指令,利用上述其他数据块将上述数据更新至上述目标子条带中。The fourth response module is configured to respond to the above target operation instruction and update the above data to the above target sub-stripe using the above other data blocks.

在一个示例性实施例中,上述装置还包括:第一更新模块,用于在上述目标操作指令为向上述目标子条带中写入上述目标数据的操作指令时,读取上述校验块状态之后,在目标数据块处于异常磁盘中,且校验块状态的状态值是第四预设值的情况下,利用数据块对目标子条带进行更新。In an exemplary embodiment, the above-mentioned device further includes: a first update module, configured to read the above-mentioned check block status when the above-mentioned target operation instruction is an operation instruction for writing the above-mentioned target data into the above-mentioned target sub-stripe. Afterwards, when the target data block is in the abnormal disk and the status value of the check block status is the fourth preset value, the target sub-stripe is updated using the data block.

在一个示例性实施例中,第四读取模块,用于在上述目标操作指令为向上述目标子条带中写入上述目标数据的操作指令时,读取上述校验块状态之后,在上述目标子条带中包括异常磁盘,且上述目标数据块处于正常磁盘中的情况下,读取上述目标数据块的数据块状态;In an exemplary embodiment, the fourth reading module is configured to, when the target operation instruction is an operation instruction to write the target data to the target sub-stripe, after reading the check block status, When the target sub-stripe includes an abnormal disk and the above-mentioned target data block is in a normal disk, read the data block status of the above-mentioned target data block;

第五读取模块,用于在上述目标数据块的数据块状态的状态值是第一预设值的情况下,读取上述校验块中的数据;The fifth reading module is used to read the data in the above-mentioned check block when the status value of the data block status of the above-mentioned target data block is the first preset value;

第二更新模块,用于利用上述校验块中的数据和上述目标数据更新上述校验块的校验状态。The second update module is used to update the verification status of the verification block using the data in the verification block and the target data.

在一个示例性实施例中,上述装置还包括:第六读取模块,用于在上述目标子条带中包括异常磁盘,且上述目标数据块处于正常磁盘中的情况下,读取上述目标数据块的数据块状态之后,在上述目标数据块状态的状态值是第二预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第二预设值用于表示上述其他数据块不为空;In an exemplary embodiment, the above-mentioned device further includes: a sixth reading module, configured to read the above-mentioned target data when the above-mentioned target sub-stripe includes an abnormal disk and the above-mentioned target data block is in a normal disk. After the data block status of the block, when the status value of the above-mentioned target data block status is the second preset value, read other data blocks in the above-mentioned target sub-stripe, wherein the above-mentioned other data blocks are the above-mentioned target sub-stripe. For data blocks in the band other than the above-mentioned target data block, the status value of the data block status of the above-mentioned other data blocks is a second preset value, and the above-mentioned second preset value is used to indicate that the above-mentioned other data blocks are not empty;

第三更新模块,用于利用上述其他数据块将上述数据更新至上述目标子条带中。The third update module is used to update the above data into the above target sub-stripe using the above other data blocks.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第四更新模块,用于在上述目标操作指令为向上述目标子条带中写入上述目标数据的操作指令时,读取上述校验块状态之后,在上述目标子条带中包括异常磁盘、上述目标数据块处于正常磁盘中,且上述校验块状态的状态值是第四预设值的情况下,将上述数据更新至上述目标子条带中。The fourth update module is configured to include the abnormal disk, When the target data block is in a normal disk and the status value of the check block status is the fourth preset value, the data is updated to the target sub-stripe.

在一个示例性实施例中,上述装置还包括:第七读取模块,用于接收主机发送的目标操作指令之后,在上述目标操作指令为重新构建目标数据块时,读取上述目标数据块的数据块状态和上述目标子条带的校验块状态,其中,上述目标数据块是上述目标子条带中多个数据块中的数据块;In an exemplary embodiment, the above device further includes: a seventh reading module, configured to read the target data block after receiving the target operation instruction sent by the host when the target operation instruction is to reconstruct the target data block. The data block status and the check block status of the above-mentioned target sub-stripe, wherein the above-mentioned target data block is a data block among multiple data blocks in the above-mentioned target sub-stripe;

第八读取模块,用于在上述目标数据块的数据块状态的状态值是第二预设值,且上述目标数据块的校验块状态的状态值是第三预设值的情况下,读取上述目标子条带中的其他数据块,其中,上述其他数据块是上述目标子条带中除上述目标数据块之外的数据块,上述其他数据块的数据块状态的状态值是第二预设值,上述第二预设值用于表示上述其他数据块不为空;The eighth reading module is configured to: when the status value of the data block status of the target data block is the second preset value, and the status value of the check block status of the target data block is the third preset value, Read other data blocks in the above-mentioned target sub-stripe, wherein the above-mentioned other data blocks are data blocks in the above-mentioned target sub-stripe other than the above-mentioned target data block, and the status value of the data block status of the above-mentioned other data blocks is the th Two preset values, the above-mentioned second preset value is used to indicate that the above-mentioned other data blocks are not empty;

第一写入模块,用于利用上述其他数据块中的数据和上述目标数据块的校验块中的数据计算重新构建后的目标数据块,并将上述重新构建后的目标数据块中的数据写入上述磁盘阵列。The first writing module is used to calculate the reconstructed target data block using the data in the above-mentioned other data blocks and the data in the check block of the above-mentioned target data block, and convert the data in the above-mentioned reconstructed target data block into Write to the above disk array.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第一确定模块,用于上述目标操作指令为重新构建上述目标数据块时,读取目标数据块的数据块状态和校验块状态之后,在上述目标数据块的数据块状态的状态值是第二预设值、上述目标数据块的校验块状态的状态值是第四预设值,且上述目标子条带中包括数据块状态的状态值是第一预设值的情况下,利用上述其他数据块重新确定上述目标子条带的校验数据块;The first determination module is used when the target operation instruction is to reconstruct the target data block. After reading the data block status and the check block status of the target data block, the status value of the data block status of the target data block is the first. Two preset values, when the status value of the check block status of the target data block is the fourth preset value, and the status value including the data block status in the target sub-stripe is the first preset value, the above-mentioned Other data blocks re-determine the check data blocks of the above target sub-stripe;

第一修改模块,用于将重新确定的校验数据块的校验状态的状态值修改为第三预设值。The first modification module is configured to modify the status value of the redetermined verification status of the verification data block to a third preset value.

在一个示例性实施例中,上述装置还包括:第九读取模块,用于上述目标操作指令为重新构建上述目标数据块时,读取目标数据块的数据块状态和校验块状态之后,在上述目标数据块的数据块状态的状态值是第二预设值、上述目标数据块的校验块状态的状态值是第四预设值,且上述目标子条带中的其他数据块的数据块状态的状态值均是第二预设值的情况下,读取上述目标子条带中的所有数据块和校验数据块;In an exemplary embodiment, the above device further includes: a ninth reading module, configured to read the data block status and check block status of the target data block when the target operation instruction is to reconstruct the target data block, The status value of the data block status of the above-mentioned target data block is the second preset value, the status value of the check block status of the above-mentioned target data block is the fourth preset value, and the status value of other data blocks in the above-mentioned target sub-stripe is When the status values of the data block status are all the second preset value, read all data blocks and check data blocks in the above target sub-stripe;

第二写入模块,用于利用上述目标子条带中的所有数据块和校验数据块计算重新构建后的目标数据块,并将上述重新构建后的目标数据块中的数据写入上述磁盘阵列。The second writing module is used to calculate the reconstructed target data block using all data blocks and check data blocks in the target sub-stripe, and write the data in the reconstructed target data block to the disk. array.

在一个示例性实施例中,上述装置还包括:第一迁移模块,用于接收主机发送的目标操作指令之后,在上述目标操作指令为迁移上述目标子条带中的数据块,且上述目标子条带中包括目标数据块的情况下,将上述目标数据块迁移至其他子条带中存储,其中,上述目标数据块是上述目标子条带中数据块状态的状态值为第二预设值的数据块;In an exemplary embodiment, the above-mentioned apparatus further includes: a first migration module, configured to receive a target operation instruction sent by the host, and after the above-mentioned target operation instruction is to migrate the data blocks in the above-mentioned target sub-stripe, and the above-mentioned target sub-stripe When the stripe includes a target data block, the target data block is migrated to other sub-stripes for storage, wherein the target data block is a state value of the data block status in the target sub-stripe that is the second preset value. data block;

第一计算模块,用于利用上述目标数据块计算上述目标子条带的校验数据块;A first calculation module, configured to use the above target data block to calculate the check data block of the above target sub-stripe;

第二修改模块,用于在上述目标子条带中包括数据块状态的状态值为第一预设值的其他数据块的情况下,利用上述其他数据块修改上述校验数据块的校验值。The second modification module is configured to use the other data blocks to modify the check value of the check data block when the target sub-stripe includes other data blocks whose status value is the first preset value. .

在一个示例性实施例中,上述装置还包括:第十读取模块,用于接收主机发送的目标操作指令之后,在确定上述磁盘阵列中增加磁盘,得到扩容后的子条带的情况下,读取上述目标子条带的数据块状态和校验块状态;In an exemplary embodiment, the above-mentioned device further includes: a tenth reading module, configured to, after receiving the target operation instruction sent by the host, determine that a disk is added to the above-mentioned disk array to obtain an expanded sub-stripe, Read the data block status and check block status of the above target substripe;

第二迁移模块,用于在目标数据块的数据块状态的状态值是第二预设值的情况下,将上述目标数据块中的数据迁移至上述扩容后的子条带中;A second migration module, configured to migrate the data in the target data block to the expanded sub-stripe when the status value of the data block status of the target data block is a second preset value;

第二确定模块,用于利用上述扩容后的子条带中包括的数据块的数据块状态确定上述扩容后的子条带中的校验块的校验状态。The second determination module is configured to use the data block status of the data blocks included in the expanded sub-stripe to determine the check status of the check block in the expanded sub-stripe.

在一个示例性实施例中,上述装置还包括:第十一读取模块,用于接收主机发送的目标操作指令之后,在上述目标操作指令为校验上述目标子条带的操作指令时,读取上述目标子条带中所有数据块的数据块状态;In an exemplary embodiment, the above device further includes: an eleventh reading module, configured to read the target operation instruction sent by the host when the target operation instruction is an operation instruction for verifying the target sub-stripe. Get the data block status of all data blocks in the above target substripe;

第一校验模块,用于在目标数据块的数据块状态的状态值是第二预设值,且上述目标子条带的校验块的校验状态的状态值是第四预设值的情况下,利用上述校验块和上述目标子条带中所有数据块对上述目标子条带进行一致性校验;The first check module is used to set the status value of the data block status of the target data block to a second preset value, and the status value of the check status of the check block of the target sub-stripe to the target sub-stripe is a fourth preset value. In this case, use the above-mentioned check block and all data blocks in the above-mentioned target sub-stripe to perform consistency check on the above-mentioned target sub-stripe;

第二校验模块,用于在目标数据块的数据块状态的状态值是第二预设值,且上述目标子条带的校验块的校验状态的状态值是第三预设值的情况下,利用上述校验块和数据块状态的状态值是第二预设值的数据块对上述目标子条带进行一致性校验。The second check module is used to set the status value of the data block status of the target data block to a second preset value, and the status value of the check status of the check block of the target sub-stripe to a third preset value. In this case, consistency check is performed on the target sub-stripe using the data block whose status value is the second preset value of the above-mentioned check block and data block status.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第五更新模块,用于基于上述目标状态信息响应上述目标操作指令,对上述目标数据执行数据操作之后,利用对上述目标子条带执行的数据操作对上述数据块状态和上述校验块状态进行更新。The fifth update module is configured to respond to the above target operation instructions based on the above target status information, and after performing data operations on the above target data, use the data operations performed on the above target sub-stripes to update the above data block status and the above check block status. renew.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第一获取模块,用于基于上述目标操作指令从数据状态位图中读取目标子条带的目标状态信息之前,获取上述磁盘阵列中多个子条带的状态,其中,一个上述子条带的状态中包括多个数据块状态和一个校验块状态,其中,多个上述数据块状态用于表示上述子条带中多个数据块的状态,上述校验块状态用于表示上述子条带中校验块的状态;The first acquisition module is used to acquire the status of multiple sub-stripes in the above-mentioned disk array before reading the target status information of the target sub-stripe from the data status bitmap based on the above-mentioned target operation instruction, wherein one of the above-mentioned sub-stripes The status includes multiple data block statuses and a check block status, wherein the multiple data block statuses are used to represent the status of multiple data blocks in the above sub-stripe, and the above-mentioned check block status is used to represent the above-mentioned sub-stripe. The status of the check block;

第一生成模块,用于利用多个上述子条带的状态生成上述数据状态位图,并缓存上述数据状态位图。The first generation module is configured to generate the data status bitmap using the status of multiple sub-stripes, and cache the data status bitmap.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第一存储模块,用于利用多个上述子条带的状态生成上述数据状态位图,并缓存上述数据状态位图之后,在上述磁盘阵列停止工作时,将上述数据状态位图存储至上述磁盘阵列中的磁盘中,其中,上述磁盘中包括存储上述数据状态位图的预设数据区。The first storage module is used to generate the data status bitmap using the status of multiple sub-stripes, and after caching the data status bitmap, when the disk array stops working, store the data status bitmap to the disk. The disk in the array includes a preset data area for storing the data status bitmap.

在一个示例性实施例中,上述装置还包括:第十二读取模块,用于在上述磁盘阵列停止工作时,将上述数据状态位图存储至上述磁盘阵列中的磁盘中之后,在上述磁盘阵列开启工作时,从上述预设数据区中读取上述数据状态位图。In an exemplary embodiment, the above-mentioned device further includes: a twelfth reading module, configured to store the above-mentioned data status bitmap into a disk in the above-mentioned disk array when the above-mentioned disk array stops working. When the array starts working, the above-mentioned data status bitmap is read from the above-mentioned preset data area.

在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the above device further includes:

第一设置模块,用于基于上述目标操作指令从数据状态位图中读取目标子条带的目标状态信息之前,在对上述磁盘阵列执行初始化操作时,将上述磁盘阵列中多个子条带的数据块状态的状态值均设置为第一预设值,并将多个上述子条带的校验块状态的状态值均设置为第三预设值;The first setting module is configured to read the target status information of the target sub-stripe from the data status bitmap based on the above-mentioned target operation instruction, and when performing the initialization operation on the above-mentioned disk array, set the multiple sub-stripes in the above-mentioned disk array. The status values of the data block status are all set to the first preset value, and the status values of the check block status of the plurality of sub-stripes are set to the third preset value;

第三修改模块,用于在接收上述主机发送的上述目标操作指令之后,基于上述目标操作指令的指令类型修改上述数据块状态的状态值。The third modification module is configured to modify the status value of the data block status based on the instruction type of the target operation instruction after receiving the target operation instruction sent by the host.

第四修改模块,用于基于修改后的数据块状态的状态值修改上述校验块状态的状态值。The fourth modification module is used to modify the status value of the above-mentioned check block status based on the modified status value of the data block status.

根据本申请的又一个实施例,还提供了一种磁盘阵列系统,包括主机、磁盘阵列控制器和磁盘阵列,其中,所述主机与所述磁盘阵列控制器连接,所述磁盘阵列控制器与磁盘阵列连接,所述磁盘阵列中包括多个磁盘,磁盘用于存储数据块,所述磁盘阵列控制器用于执行上述步骤。According to yet another embodiment of the present application, a disk array system is also provided, including a host, a disk array controller, and a disk array, wherein the host is connected to the disk array controller, and the disk array controller is connected to Disk array connection, the disk array includes multiple disks, the disks are used to store data blocks, and the disk array controller is used to perform the above steps.

本申请的实施例还提供了一种电子设备,图15是根据本申请实施例的电子设备的示意图,如图15所示,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present application also provides an electronic device. Figure 15 is a schematic diagram of an electronic device according to an embodiment of the present application. As shown in Figure 15, it includes a memory and a processor. The memory stores a computer program. The processor is configured to run a computer program to perform the steps of any of the above method embodiments.

需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but is not limited to this: the above modules are all located in the same processor; or the above modules can be implemented in any combination. The forms are located in different processors.

本申请的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。Embodiments of the present application also provide a computer-readable storage medium that stores a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the computer-readable storage medium may include but is not limited to: USB flash drive, read-only memory (ROM), random access memory (Random Access Memory, RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.

本申请的实施例还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.

本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and exemplary implementations, and details will not be described again in this embodiment.

显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented using general-purpose computing devices, and they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. They may be implemented in program code executable by a computing device, such that they may be stored in a storage device for execution by the computing device, and in some cases may be executed in a sequence different from that shown herein. Or the described steps can be implemented by making them into individual integrated circuit modules respectively, or by making multiple modules or steps among them into a single integrated circuit module. As such, the application is not limited to any specific combination of hardware and software.

以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the principles of this application shall be included in the protection scope of this application.

Claims (27)

1. A method for processing data in a disk array, the method being applied to a disk array controller and comprising:
receiving a target operation instruction sent by a host, wherein the host is connected with the disk array controller, the disk array controller is connected with a disk array, the disk array comprises a plurality of disks, and the disks are used for storing data blocks;
reading target state information of a target sub-stripe from a data state bitmap based on the target operation instruction, wherein the target sub-stripe is used for storing data in a block mode in the disk array, the target state information comprises a data block state and a check block state, the data block state is used for indicating whether a data block in the target sub-stripe is used or not, and the check block state is used for indicating a redundancy state of the target sub-stripe;
Executing data processing on the target sub-band based on the target state information in response to the target operation instruction;
after receiving the target operation instruction sent by the host, the method further comprises:
under the condition that a disk is added in the disk array to obtain the sub-stripe after capacity expansion, reading the data block state and the check block state of the target sub-stripe;
under the condition that the state value of the data block state of the target data block is a second preset value, migrating the data in the target data block to the expanded sub-stripe;
determining the verification state of the verification block in the sub-stripe after capacity expansion by utilizing the data block state of the data block included in the sub-stripe after capacity expansion;
modifying the data block state of the data blocks in the sub-stripe after capacity expansion to set the data block state of the migrated target data block as the second preset value, and setting the state values of other data blocks in the sub-stripe after capacity expansion as the first preset value;
setting the state value of a check block in the sub-stripe after capacity expansion to the first preset value under the condition that the sub-stripe after capacity expansion comprises the other data blocks with the state values of the first preset value;
And setting the state value of the check block in the sub-stripe after capacity expansion to the second preset value under the condition that the other data blocks with the state values of the first preset value are not included in the sub-stripe after capacity expansion.
2. The method of claim 1, wherein reading target state information for a target sub-stripe from a data state bitmap based on the target operation instruction comprises:
acquiring a data block starting position and a data block length included in the target operation instruction;
determining the target sub-band by using the data block starting position and the data block length;
and reading the target state information of the target sub-band from the data state bitmap.
3. The method of claim 1, wherein performing data processing on the target sub-stripe in response to the target operation instruction based on the target state information comprises:
reading a data block state of a target data block when the target operation instruction is an operation instruction for reading the target data block from the target sub-stripe, wherein the target data block is a data block in a plurality of data blocks in the target sub-stripe;
And under the condition that the state value of the data block state of the target data block is a first preset value, responding to the target operation instruction, and feeding back information that the target data block is empty to the host, wherein the first preset value is used for indicating that the target data block is empty.
4. The method of claim 1, wherein performing data processing on the target sub-stripe in response to the target operation instruction based on the target state information comprises:
reading a data block state of a target data block when the target operation instruction is an operation instruction for reading the target data block from the target sub-stripe, wherein the target data block is a data block in a plurality of data blocks in the target sub-stripe;
reading the check block state when the state value of the data block state of the target data block is a second preset value and the target data block is in an abnormal disk, wherein the check block state is used for indicating the state of a check block included in the target sub-stripe, and the second preset value is used for indicating that the target data block includes data;
reading data in the check block and data in a data block with a state value of a second preset value in the target sub-band under the condition that the state value of the check block state is a third preset value, wherein the data block with the state value of the second preset value is arranged in a normal disk, and the second preset value is used for indicating that the data block comprises data;
And responding to the target operation instruction, and sending the data in the check block and the data in the data block with the state value of the second preset value in the target sub-band to the host.
5. The method according to claim 4, wherein the method further comprises:
reading data in the check block and data in a data block of a normal disk in the target sub-stripe under the condition that the state value of the check block state is a fourth preset value;
and responding to the target operation instruction, and sending the data in the check block and the data in the data block of the normal disk in the target sub-stripe to the host.
6. The method of claim 1, wherein performing data processing on the target sub-stripe in response to the target operation instruction based on the target state information comprises:
reading the check block state when the target operation instruction is an operation instruction for writing the data into the target sub-stripe, wherein the check block state is used for representing the state of a check block included in the target sub-stripe;
reading the data block state of a target data block under the condition that the state value of the check block state is a third preset value, wherein the target data block is a data block in a plurality of data blocks in the target sub-band;
Reading other data blocks in the target sub-stripe under the condition that the state value of the state of the target data block is a first preset value, wherein the other data blocks are data blocks except the target data block in the target sub-stripe, the state value of the state of the data block of the other data blocks is a second preset value, the first preset value is used for indicating that the target data block is empty, and the second preset value is used for indicating that the other data blocks comprise data;
and responding to the target operation instruction, and updating the data into the target sub-band by utilizing the other data blocks.
7. The method of claim 6, wherein the method further comprises:
and in the case that the state value of the check block state is a fourth preset value, responding to the target operation instruction, and updating the data into the target sub-band by utilizing the number of the target data blocks.
8. The method of claim 1, wherein performing data processing on the target sub-stripe in response to the target operation instruction based on the target state information comprises:
reading the check block state when the target operation instruction is an operation instruction for writing the data into the target sub-stripe, wherein the check block state is used for representing the state of a check block included in the target sub-stripe;
Reading the data block state of the target data block under the condition that the target data block is in an abnormal magnetic disk and the state value of the check block state is a third preset value;
reading data in the check block under the condition that a state value of a data block state of the target data block is a first preset value, wherein the first preset value is used for indicating that the target data block is empty;
and responding to the target operation instruction, and updating the verification state of the verification block by utilizing the data in the verification block and the data.
9. The method of claim 8, wherein the method further comprises:
reading other data blocks in the target sub-stripe when the state value of the target data block state is a second preset value, wherein the other data blocks are data blocks except the target data block in the target sub-stripe, and the state value of the data block state of the other data blocks is the second preset value, and the second preset value is used for indicating that the other data blocks are not empty;
and responding to the target operation instruction, and updating the data into the target sub-band by utilizing the other data blocks.
10. The method of claim 8, wherein, when the target operation instruction is an operation instruction to write the target data into the target sub-stripe, after reading the check block state, the method further comprises:
and under the condition that the target data block is in an abnormal disk and the state value of the check block state is a fourth preset value, updating the target sub-stripe by using the data block.
11. The method of claim 8, wherein after reading the check block status when the target operation instruction is an operation instruction to write the data into the target sub-stripe, the method further comprises:
reading a data block state of the data block under the condition that the target sub-stripe comprises an abnormal disk and the data block is in a normal disk;
reading data in the check block under the condition that the state value of the data block state of the target data block is a first preset value;
and updating the verification state of the verification block by utilizing the data in the verification block and the target data.
12. The method of claim 11, wherein, in the case where the target sub-stripe includes an abnormal disk and the target data block is in a normal disk, after reading the data block state of the target data block, the method further comprises:
Reading other data blocks in the target sub-stripe when the state value of the target data block state is a second preset value, wherein the other data blocks are data blocks except the target data block in the target sub-stripe, and the state value of the data block state of the other data blocks is the second preset value, and the second preset value is used for indicating that the other data blocks are not empty;
and updating the data into the target sub-band by using the other data blocks.
13. The method of claim 8, wherein after reading the check block status when the target operation instruction is an operation instruction to write the data into the target sub-stripe, the method further comprises:
and updating the data into the target sub-stripe under the condition that the target sub-stripe comprises an abnormal disk, the target data block is in a normal disk and the state value of the check block state is a fourth preset value.
14. The method of claim 1, wherein after receiving the target operation instruction sent by the host, the method further comprises:
when the target operation instruction is to reconstruct a target data block, reading a data block state of the target data block and a check block state of the target sub-stripe, wherein the target data block is a data block in a plurality of data blocks in the target sub-stripe;
Reading other data blocks in the target sub-stripe when the state value of the data block state of the target data block is a second preset value and the state value of the check block state of the target data block is a third preset value, wherein the other data blocks are data blocks except the target data block in the target sub-stripe, the state value of the data block state of the other data blocks is a second preset value, and the second preset value is used for indicating that the other data blocks are not null;
and calculating a reconstructed target data block by utilizing the data in the other data blocks and the data in the check block of the target data block, and writing the data in the reconstructed target data block into the disk array.
15. The method of claim 14, wherein the target operation instruction, when reconstructing the target data block, reads a data block state and a check block state of the target data block, the method further comprising:
when the state value of the data block state of the target data block is a second preset value, the state value of the check block state of the target data block is a fourth preset value, and the state value of the data block state included in the target sub-stripe is a first preset value, the check data block of the target sub-stripe is redetermined by utilizing the other data blocks;
And modifying the state value of the check state of the redetermined check data block into a third preset value.
16. The method of claim 14, wherein the target operation instruction, when reconstructing the target data block, reads a data block state and a check block state of the target data block, the method further comprising:
reading all data blocks and check data blocks in the target sub-stripe when the state value of the data block state of the target data block is a second preset value, the state value of the check block state of the target data block is a fourth preset value, and the state values of the data block states of other data blocks in the target sub-stripe are all the second preset values;
and calculating a reconstructed target data block by using all the data blocks and the check data blocks in the target sub-stripe, and writing the data in the reconstructed target data block into the disk array.
17. The method of claim 1, wherein after receiving the target operation instruction sent by the host, the method further comprises:
under the condition that the target operation instruction is to migrate the data block in the target sub-stripe and the target sub-stripe comprises the target data block, migrating the target data block to other sub-stripes for storage, wherein the target data block is a data block with a state value of a data block state in the target sub-stripe being a second preset value;
Calculating a check data block of the target sub-stripe by using the target data block;
and under the condition that the target sub-stripe comprises other data blocks with the state values of the data block states being the first preset values, modifying the check values of the check data blocks by using the other data blocks.
18. The method of claim 1, wherein after receiving the target operation instruction sent by the host, the method further comprises:
when the target operation instruction is an operation instruction for checking the target sub-stripe, reading the data block states of all data blocks in the target sub-stripe;
when the state value of the data block state of the target data block is a second preset value and the state value of the check state of the check block of the target sub-stripe is a fourth preset value, performing consistency check on the target sub-stripe by using the check block and all the data blocks in the target sub-stripe;
and under the condition that the state value of the data block state of the target data block is a second preset value and the state value of the check state of the check block of the target sub-stripe is a third preset value, carrying out consistency check on the target sub-stripe by utilizing the data block of which the state value of the check block and the data block state is the second preset value.
19. The method of claim 1, wherein after performing a data operation on the target sub-stripe in response to the target operation instruction based on the target state information, the method further comprises:
and updating the data block state and the check block state by using the data operation performed on the target sub-band.
20. The method of claim 1, wherein prior to reading target state information for a target sub-stripe from a data state bitmap based on the target operation instruction, the method further comprises:
acquiring states of a plurality of sub-stripes in the disk array, wherein the states of one sub-stripe comprise a plurality of data block states and a check block state, the plurality of data block states are used for representing the states of a plurality of data blocks in the sub-stripe, and the check block state is used for representing the states of check blocks in the sub-stripe;
generating the data state bitmap by using the states of the sub-stripes, and caching the data state bitmap.
21. The method of claim 20, wherein after generating the data state bitmap using the states of the plurality of sub-stripes and caching the data state bitmap, the method further comprises:
And when the disk array stops working, storing the data state bitmap into a disk in the disk array, wherein the disk comprises a preset data area for storing the data state bitmap.
22. The method of claim 21, wherein after storing the data state bitmap in a disk in the disk array while the disk array is inactive, the method further comprises:
and when the disk array is started to work, reading the data state bitmap from the preset data area.
23. The method of claim 1, wherein prior to reading target state information for a target sub-stripe from a data state bitmap based on the target operation instruction, the method further comprises:
when the initialization operation is executed on the disk array, setting the state values of the data block states of a plurality of sub-stripes in the disk array as first preset values, and setting the state values of the check block states of a plurality of sub-stripes as third preset values;
after receiving the target operation instruction sent by the host, modifying a state value of the data block state based on an instruction type of the target operation instruction;
Modifying the state value of the check block state based on the state value of the modified data block state.
24. A data processing apparatus in a disk array, comprising:
the first receiving module is used for receiving a target operation instruction sent by a host, wherein the host is connected with the disk array controller, the disk array controller is connected with the disk array, the disk array comprises a plurality of disks, and the disks are used for storing data blocks;
the first reading module is used for reading target state information of a target sub-stripe from a data state bitmap based on the target operation instruction, wherein the target sub-stripe is used for storing data in a block mode in the disk array, the target state information comprises a data block state and a check block state, the data block state is used for indicating whether a data block in the target sub-stripe is used or not, and the check block state is used for indicating a redundancy state of the target sub-stripe;
the first response module is used for responding to the target operation instruction based on the target state information and executing data processing on the target sub-band;
the device is also used for reading the data block state and the check block state of the target sub-stripe under the condition that the disk is added in the disk array after the target operation instruction sent by the host is received and the expanded sub-stripe is obtained; under the condition that the state value of the data block state of the target data block is a second preset value, migrating the data in the target data block to the expanded sub-stripe; determining the verification state of the verification block in the sub-stripe after capacity expansion by utilizing the data block state of the data block included in the sub-stripe after capacity expansion; modifying the data block state of the data blocks in the sub-stripe after capacity expansion to set the data block state of the migrated target data block as the second preset value, and setting the state values of other data blocks in the sub-stripe after capacity expansion as the first preset value; setting the state value of a check block in the sub-stripe after capacity expansion to the first preset value under the condition that the sub-stripe after capacity expansion comprises the other data blocks with the state values of the first preset value; and setting the state value of the check block in the sub-stripe after capacity expansion to the second preset value under the condition that the other data blocks with the state values of the first preset value are not included in the sub-stripe after capacity expansion.
25. A disk array system comprising a host, a disk array controller and a disk array, wherein the host is coupled to the disk array controller, the disk array controller is coupled to a disk array, the disk array comprises a plurality of disks for storing blocks of data, and the disk array controller is configured to perform the steps of the method of any one of claims 1 to 23.
26. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 23.
27. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 23 when the computer program is executed.
CN202311030383.2A 2023-08-16 2023-08-16 Data processing methods and devices, storage media, and electronic equipment in disk arrays Active CN116795295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311030383.2A CN116795295B (en) 2023-08-16 2023-08-16 Data processing methods and devices, storage media, and electronic equipment in disk arrays

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311030383.2A CN116795295B (en) 2023-08-16 2023-08-16 Data processing methods and devices, storage media, and electronic equipment in disk arrays

Publications (2)

Publication Number Publication Date
CN116795295A CN116795295A (en) 2023-09-22
CN116795295B true CN116795295B (en) 2023-11-17

Family

ID=88043911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311030383.2A Active CN116795295B (en) 2023-08-16 2023-08-16 Data processing methods and devices, storage media, and electronic equipment in disk arrays

Country Status (1)

Country Link
CN (1) CN116795295B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117149094B (en) * 2023-10-30 2024-02-09 苏州元脑智能科技有限公司 Method and device for determining data area state, disk array and storage system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5581690A (en) * 1993-06-29 1996-12-03 Digital Equipment Corporation Method and apparatus for preventing the use of corrupt data in a multiple disk raid organized storage system
CN101546249A (en) * 2008-03-26 2009-09-30 中兴通讯股份有限公司 On-line capacity expansion method for disk arrays
CN101566924A (en) * 2008-04-23 2009-10-28 中兴通讯股份有限公司 Data read-write method of disk array
WO2014010077A1 (en) * 2012-07-13 2014-01-16 富士通株式会社 Disk array control device, disk array control method, and disk array control program
CN105302492A (en) * 2015-11-18 2016-02-03 浙江大华技术股份有限公司 RAID reconstruction method and device
CN107885620A (en) * 2017-11-22 2018-04-06 华中科技大学 A kind of method and system for improving Solid-state disc array Performance And Reliability
CN112783689A (en) * 2021-02-08 2021-05-11 上海交通大学 Partial stripe write optimization method and device based on LRC coding
CN115202575A (en) * 2022-06-22 2022-10-18 联想(北京)有限公司 Data processing method and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5581690A (en) * 1993-06-29 1996-12-03 Digital Equipment Corporation Method and apparatus for preventing the use of corrupt data in a multiple disk raid organized storage system
CN101546249A (en) * 2008-03-26 2009-09-30 中兴通讯股份有限公司 On-line capacity expansion method for disk arrays
CN101566924A (en) * 2008-04-23 2009-10-28 中兴通讯股份有限公司 Data read-write method of disk array
WO2014010077A1 (en) * 2012-07-13 2014-01-16 富士通株式会社 Disk array control device, disk array control method, and disk array control program
CN105302492A (en) * 2015-11-18 2016-02-03 浙江大华技术股份有限公司 RAID reconstruction method and device
CN107885620A (en) * 2017-11-22 2018-04-06 华中科技大学 A kind of method and system for improving Solid-state disc array Performance And Reliability
CN112783689A (en) * 2021-02-08 2021-05-11 上海交通大学 Partial stripe write optimization method and device based on LRC coding
CN115202575A (en) * 2022-06-22 2022-10-18 联想(北京)有限公司 Data processing method and electronic equipment

Also Published As

Publication number Publication date
CN116795295A (en) 2023-09-22

Similar Documents

Publication Publication Date Title
US9910748B2 (en) Rebuilding process for storage array
CN102945201B (en) The non-volatile media log recording of verification msg set
US8209587B1 (en) System and method for eliminating zeroing of disk drives in RAID arrays
US7206991B2 (en) Method, apparatus and program for migrating between striped storage and parity striped storage
CN110531940A (en) Video file processing method and processing device
US8583984B2 (en) Method and apparatus for increasing data reliability for raid operations
CN111433746A (en) Reconstruction assistant using failed storage devices
US9405625B2 (en) Optimizing and enhancing performance for parity based storage
CN110089035B (en) Storage controller, data processing chip and data processing method
CN107436733A (en) Management by district method and management by district device
CN115098046A (en) Disk array initialization method, system, electronic device and storage medium
CN116339644B (en) Method, device, equipment and medium for creating redundant array of independent disks
CN116795295B (en) Data processing methods and devices, storage media, and electronic equipment in disk arrays
CN116501264B (en) A data storage method, device, system, equipment and readable storage medium
CN115657960B (en) Disk array initialization method, device, equipment and readable storage medium
US10740189B2 (en) Distributed storage system
CN107977285A (en) A kind of data modification method, device and the medium of correcting and eleting codes memory mechanism
US8418029B2 (en) Storage control device and storage control method
CN117234436B (en) Method, device, storage system and product for expanding capacity of disk array
US11487428B2 (en) Storage control apparatus and storage control method
CN116204137B (en) Distributed storage system, control method, device and equipment based on DPU
TW202433269A (en) Systems and methods of distributed parity calculation offloading
CN115454711A (en) Method, device and medium for recovering erasure correction data in distributed storage system
CN119473731B (en) Exception handling method, device, equipment and medium
CN118885132B (en) A data processing method, device, equipment, medium, product and system

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