CN117539386A - Disk array data processing method, device, equipment and storage medium - Google Patents

Disk array data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN117539386A
CN117539386A CN202311492746.4A CN202311492746A CN117539386A CN 117539386 A CN117539386 A CN 117539386A CN 202311492746 A CN202311492746 A CN 202311492746A CN 117539386 A CN117539386 A CN 117539386A
Authority
CN
China
Prior art keywords
disk
state
operation data
data
hot spare
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.)
Pending
Application number
CN202311492746.4A
Other languages
Chinese (zh)
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.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center 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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202311492746.4A priority Critical patent/CN117539386A/en
Publication of CN117539386A publication Critical patent/CN117539386A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Abstract

The invention relates to the technical field of computers, and discloses a method, a device, equipment and a storage medium for processing disk array data, wherein the method comprises the following steps: obtaining the disk states of all disks in the disk array, wherein the disk states comprise sub-health states; when the disk state of the disk is sub-health state, a corresponding hot spare disk is allocated for the disk, so that operation data in the disk are copied to the hot spare disk; obtaining a copy strategy for copying operation data in a disk to a hot standby disk; when the copy strategy is copy and replacement, the operation data in the disk is completely copied to the hot spare disk, then the disk is replaced, and the newly added disk is used as the hot spare disk; when the copy strategy is that the copy is not replaced, after the operation data in the disk is completely copied to the hot spare disk, establishing a mirror image between the disk and the hot spare disk; the invention can copy the operation data of a certain magnetic disk when the hidden danger of health condition exists, thereby reducing the probability of reconstructing the operation data and ensuring the operation data to have higher safety.

Description

Disk array data processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing disk array data.
Background
With the rapid development of electronic commerce and the internet, various storage systems have been developed, and a disk array is a disk group with a huge capacity formed by combining a plurality of independent disks. However, when a disk with a potential failure in the disk array operates normally, the potential failure can accumulate along with the running time, and once the potential failure bursts out, data is likely to be lost. When a disk failure is found, a data reconstruction must be performed. However, the process of data reconstruction consumes a lot of time, which results in that the I/O read-write performance of the storage system is greatly reduced.
Disclosure of Invention
In view of this, the present invention provides a method, apparatus, device and storage medium for processing data of a disk array, so as to solve the problem that when a disk in the existing disk array fails, the data must be reconstructed, but a great amount of time is consumed in the process of data reconstruction, resulting in that the I/O read/write performance of the storage system is greatly reduced.
In a first aspect, the present invention provides a method for processing data in a disk array, where the method includes obtaining a disk state of each disk in the disk array, where the disk state includes a sub-health state, where the sub-health state is used to characterize that a read-write performance of any partition in the disk is lower than a standard read-write performance; for any disk, when the disk state of the disk is sub-health, a corresponding hot spare disk is allocated for the disk, so that operation data in the disk are copied to the hot spare disk; obtaining a copy strategy for copying operation data in a disk to a hot standby disk, wherein the copy strategy comprises copying, replacing and copying without replacing; when the copy strategy is copy and replacement, the operation data in the disk is completely copied to the hot spare disk, then the disk is replaced, and the newly added disk is used as the hot spare disk; when the copy policy is that the copy is not replaced, after the operation data in the disk is completely copied to the hot spare disk, the mirror image between the disk and the hot spare disk is established. Through the process, the operation data of a certain magnetic disk can be copied when the hidden danger of health conditions exists in the magnetic disk, and the safety of the operation data is guaranteed before the magnetic disk fails, so that the probability of reconstructing the operation data is reduced, and the operation data has higher safety.
In some alternative embodiments, the disk states further include a failure state, the failure state being used to characterize the disk as failed or removed, and further comprising, before the operating data in the disk is completely copied to the hot spare disk:
if the disk state of the disk is changed from the sub-health state to the failure state, stopping copying the operation data to a copy task of the hot standby disk;
performing data reconstruction on the operation data which are not copied in the disk, so as to reconstruct the operation data which are not copied in the disk into a hot spare disk;
or, reconstructing the data of the operation data in the disk to reconstruct the operation data in the disk to the hot spare disk.
In some alternative embodiments, after the mirror image between the disk and the hot spare disk is established, the method includes:
if the disk state of the disk is changed from the sub-health state to the failure state, the disk is replaced by a hot spare disk, and the newly added disk is used as the hot spare disk.
In some alternative embodiments, after the operation data in the disk is completely copied to the hot spare disk, the mirroring between the disk and the hot spare disk is established, including:
obtaining copy information fed back by the hot standby disk based on a copy task;
when the copying information characterizes that the copying task is completed, a mirror image between the disk and the hot spare disk is established, and the disk is marked as a mirror image disk;
When the disk state of the disk is changed from the sub-health state to the failure state, the mirror image between the disk and the hot standby disk is canceled;
changing the disk mark of the disk from a mirror disk to a failure disk;
obtaining a replacement disk for replacing a disk marked as a failure disk;
replacing the disk marked as the failed disk based on the replacement disk;
reconstructing operation data of a disk in the hot standby disk to a replacement disk;
receiving reconstruction information fed back by a replacement disk based on data reconstruction;
when the reconstruction information represents that the operation data of the disk in the hot standby disk is completely reconstructed to the replacement disk, marking the replacement disk as a normal disk;
and initializing data of the hot standby space in the hot standby disk to restore the hot standby disk.
In some alternative embodiments, the disk state further comprises a health state, and when the disk state of the disk is a failure state, the method further comprises:
acquiring the last disk state of a disk;
and when the last disk state of the disk is a healthy state, reconstructing the operation data in the disk.
In some alternative embodiments, when the last disk state of the disk is a healthy state, reconstructing the operation data in the disk includes:
Obtaining the check data of the operation data of the disk for checking, wherein the check data is stored in other disks of the disk array;
and carrying out data reconstruction on the operation data in the disk based on the verification data, and storing the reconstructed operation data in the hot spare disk, the newly added disk or the replaced disk.
In some alternative embodiments, obtaining a disk state of each disk in a disk array includes:
acquiring read-write timeout time of each block in a magnetic disk;
when the read-write timeout time of the partition is greater than or equal to the timeout time threshold, determining that the disk state of the disk is a sub-health state;
when the disk state of the disk is determined to be sub-health state, performing cyclic read-write test on the blocks;
if the reading and writing of the blocks are successful in the target cycle times, determining that the disk state of the disk is a healthy state;
if the read-write of the partition fails within the target cycle times, determining that the disk state of the disk is a failure state.
In a second aspect, the present invention provides a disk array data processing apparatus, which mainly includes: the system comprises a state acquisition module, a disk allocation module, a strategy acquisition module, a data copying module and a data mirroring module; the system comprises a state acquisition module, a state judgment module and a state judgment module, wherein the state acquisition module is used for acquiring the disk state of each disk in the disk array, the disk state comprises a sub-health state, and the sub-health state is used for representing that the read-write performance of any block in the disk is lower than the standard read-write performance; the disk allocation module is used for allocating a corresponding hot spare disk for any disk when the disk state of the disk is a sub-health state so as to copy operation data in the disk to the hot spare disk; the strategy acquisition module is used for acquiring a copy strategy for copying operation data in the disk to the hot standby disk, wherein the copy strategy comprises copy and replacement and copy non-replacement; the data copying module is used for copying and replacing the operation data in the disk after the operation data in the disk are completely copied to the hot spare disk when the copying strategy is copying and replacing, and taking the newly added disk as the hot spare disk; and the data mirroring module is used for establishing mirroring between the magnetic disk and the hot spare disk after the operation data in the magnetic disk is completely copied to the hot spare disk when the copy policy is that the copy is not replaced. Through the process, the operation data of a certain magnetic disk can be copied when the hidden danger of health conditions exists in the magnetic disk, and the safety of the operation data is guaranteed before the magnetic disk fails, so that the probability of reconstructing the operation data is reduced, and the operation data has higher safety.
In a third aspect, the present invention provides a computer device comprising: the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the processing method of the disk array data in the first aspect or any corresponding embodiment of the first aspect is executed.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the method for processing disk array data according to the first aspect or any one of the embodiments corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for processing disk array data according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of an application environment of an embodiment of the present invention;
FIG. 3 is a schematic diagram of another application environment of an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another method for processing disk array data according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for processing disk array data according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for processing data of another disk array according to an embodiment of the present invention;
FIG. 7 is a logic diagram of processing disk array data according to an embodiment of the present invention;
FIG. 8 is a block diagram of a disk array data processing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first and second in the description and claims of the invention and in the above-mentioned figures are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The term "plurality" in the present invention may mean at least two, for example, two, three or more, and embodiments of the present invention are not limited.
According to an embodiment of the present invention, there is provided an embodiment of a method for processing disk array data, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that illustrated herein.
In this embodiment, a method for processing data of a disk array is provided, where the disk array includes a plurality of stripes, and each stripe includes a plurality of disks, where the disk array is a huge capacity disk group formed by combining a plurality of independent disks, and the disk array is a hard disk group (logical hard disk) formed by combining a plurality of independent disks (physical hard disks) in different manners, so as to provide higher storage performance than a single hard disk and provide data backup, so that data is cut into a plurality of sections, and concurrent operations are stored on the respective disks. The stripe is a set of blocks related to positions on different partitions of the disk array, is a unit for organizing the blocks on the different partitions, the blocks in the disk comprise data blocks and check blocks, operation data generated by read-write operation are stored in the data blocks, check data for checking other disks are stored in the check blocks, and the check data are obtained by operation data operation. The stripe comprises at least two check blocks and a plurality of data blocks, the check blocks and the data blocks are positioned in different magnetic discs, and each check block is positioned in a different magnetic disc from the magnetic disc from which the data block is removed. A partition is a partition of the physical storage medium on a disk, the granularity of which is used for data reconstruction by a disk array. FIG. 1 is a flowchart of a method for processing disk array data according to an embodiment of the present invention, as shown in FIG. 1, the flowchart includes the following steps:
Step S101, obtaining the disk states of all disks in the disk array, wherein the disk states comprise sub-health states, and the sub-health states are used for representing that the read-write performance of any block in the disk is lower than the standard read-write performance.
As described above, the disk states of the disks in the disk array are obtained, so that whether to copy, mirror and replace the operation data in the disk is determined based on the states of the disks.
In some alternative embodiments, when the disk is in operation, the collected information is updated to the database thereof in real time according to the actual working state of the disk, and the disk controller can judge whether the disk fails according to the collected information and inform the user. If a fault is predicted to occur, a valid report will be generated. By using the disk monitoring, analyzing and reporting technology, during the read-write process or idle state of the disk array, the disk array controller pulls up a thread, and the thread processes the disk state information or circularly inquires the disk state every other period of cycle time under the cycle time set by a timer. When the possible failure of the disk is predicted, corresponding precautions must be taken immediately to protect the data security in the single disk and the data security of the disk array.
In some optional embodiments, when acquiring the state of each disk in the disk array, the read-write timeout time of each partition in the disk may be acquired first; when the read-write timeout time of the blocks is greater than or equal to the timeout time threshold, namely the read-write performance of any block in the disk is lower than the standard read-write performance, determining the disk state of the disk as a sub-health state; when the disk state of the disk is determined to be sub-health state, performing cyclic read-write test on the blocks; if the reading and writing of the blocks are successful in the target cycle times, determining that the disk state of the disk is a healthy state; if the reading and writing of the partition fails within the target cycle times, determining that the disk state of the disk is a failure state, namely the failure state is used for representing that the disk has a fault or is removed.
Specifically, acquiring the read-write timeout time of read-write operation of each data block in a magnetic disk, and aiming at any data block, when the read-write timeout time of the read-write operation of the data block is greater than or equal to the timeout time threshold, if 362s, determining that the magnetic disk state of the magnetic disk is sub-health state, namely that health hidden danger exists, and performing cyclic read-write test on the data block at the moment before the read-write operation of the data block is completed; if the data block is successfully read and written in the target cycle times, determining that the disk state of the disk is a healthy state; if the data block fails to read and write within the target cycle times, determining that the disk state of the disk is a failure state.
Similarly, for any check block, when the read-write timeout time of the read-write operation of the check block is greater than or equal to the timeout time threshold, for example 362s, before the read-write operation of the check block is completed, determining that the disk state of the disk is sub-health, that is, that there is a health hidden danger, and at this time, performing a cyclic read-write test on the check block; if the verification block is successfully read and written in the target cycle times, determining that the disk state of the disk is a healthy state; if the verification block fails to read and write within the target cycle times, determining that the disk state of the disk is a failure state.
For example, if writing of a certain data block is particularly slow, the disk array does not wait for the completion of the writing of the data block (IO timeout time is 362 s), but marks the disk as a sub-healthy disk to indicate that the disk is in a sub-healthy state; meanwhile, in order to optimize the characteristic of the read performance of the disk array, if a certain block of one read IO is slower (the IO timeout time is 362 s), the disk array does not wait for the completion of the read of the data block, but marks the disk as a sub-health disk so as to indicate that the disk is in a sub-health state; in the process of marking the sub-health state, the disk drive can periodically try to read and write the data blocks, if the read and write are successful in the appointed times, the sub-health disk is marked as a healthy (normal) disk, if the read and write are failed in the appointed times, a fault disk event is reported to a service layer, and the disk state of the disk is determined to be a failure state.
Step S102, for any disk, when the disk state of the disk is sub-health, a corresponding hot spare disk is allocated to the disk, so as to copy the operation data in the disk to the hot spare disk.
As described above, by acquiring the disk states of the disks in the disk array, when the disk state of any disk is in the sub-health state, a corresponding hot spare disk is allocated to the disk, so that the data in the disk in the sub-health state is copied to the hot spare disk in time, and the time consumption of data reconstruction due to the failure of the disk is reduced.
In some optional embodiments, when a disk state of a disk in the disk array is a sub-health state, a hot spare disk in the disk array is allocated to the disk, so that operation data in the disk is stored in time, and a situation that IO read-write performance of a storage system is greatly reduced due to data reconstruction when the disk fails is avoided.
In some optional embodiments, when a disk state of a disk exists in the disk array and is in a sub-health state, other disks in a health state can be divided into a plurality of subarrays, then one subarray is used as a hot standby space, and the subarray is allocated to the disk in the sub-health state, so that the operation data in the disk can be stored in time, and the situation that the IO read-write performance of a storage system is greatly reduced due to the fact that the data reconstruction is performed when the disk fails is avoided.
Step S103, obtaining a copy strategy for copying operation data in the disk to the hot standby disk, wherein the copy strategy comprises copying, replacing and copying without replacing.
As described above, by acquiring the copy policy of copying the operation data in the disk to the hot spare disk, the operation data in the disk is copied and replaced or not replaced, so as to reduce the task amount and risk of data reconstruction when the disk fails.
In some alternative embodiments, when the disk works, the collected information can be updated to the own database in real time according to the actual working state of the disk, and the disk controller can judge the disk state of the disk according to the collected information and generate a monitoring analysis report so as to report the information that the disk is likely to fail, namely, the information that prompts the user that the disk is likely to fail. After the user obtains this information, the copy policy may be selected to copy and replace and copy not replace. Optionally, when the disk works, the collected information can be updated to the database in real time according to the actual working state of the disk, then the disk state of the disk is judged through the disk controller, and finally the copy strategy of copying and replacing or copying without replacement is automatically executed based on the disk state of the disk.
Step S104, the operation data in the magnetic disk is copied to the hot spare disk based on the copy strategy.
As above, the operation data in the disk is copied to the hot standby disk based on the copy strategy, so that the hot standby of the disk with sub-health state is realized, the probability of data reconstruction is reduced, and the data has higher security.
In some alternative embodiments, when the operation data in the disk is copied to the hot spare disk based on the copy policy, when the copy policy is copy and replacement, the operation data in the disk is completely copied to the hot spare disk and then replaced, and the newly added disk is used as the hot spare disk; when the copy policy is that the copy is not replaced, after the operation data in the disk is completely copied to the hot spare disk, the mirror image between the disk and the hot spare disk is established.
For example, referring to fig. 2, the array width of the disk array is 10, that is, the disk array includes disk 0-disk 7 and two hot-standby disks, the stripe width of the disk is 5, for example, the first stripe is disk 0-disk 4, including data blocks D1-D3, and check blocks P and Q, when disk 0 is in sub-health state, the operation data of disk 0 is copied to the hot-standby disk, and the newly added disk is used as the hot-standby disk. Optionally, when the disk 0 is in the sub-health state, the operation data of the disk 0 may be copied to the hot standby disk, then the disk in the sub-health state is replaced with a new disk, and finally the operation data of the disk 0 in the hot standby disk is copied to the new disk, thereby realizing the restoration of the hot standby space in the hot standby disk.
Further, referring to fig. 3, the array width of the disk array is 10, that is, the disk array includes disk 0-disk 9, and each disk includes sub-arrays 0-2, that is, 3 sub-arrays, and the hot spare disk of the disk array is disk 0-disk 3, and any sub-array of disk 0-disk 3 is used as the hot spare space of the disk, so as to be used as a copy of the operation data in the sub-health state disk and a reconstruction of the operation data of the failure disk. When the disk 8 is in a sub-health state, the operation data of the disk 8 can be copied to the hot standby space of the disk 0-3, and then when the replacement disk is inserted into the slot position of the disk 8, the operation data of the disk 8 in the hot standby space of the disk 0-3 can be copied to the replacement disk.
Specifically, the disk array may use the bitmap to mark the user data area, and when the reconfiguration occurs, the redundancy may be recovered by completing the reconfiguration of the user data area. Marking the area of the write operation as a user area (effective area) when the disk array receives the write operation; meanwhile, an effective area deleting interface is provided to delete the effective area according to the requirement, and the upper layer of the disk array calls the interface to delete the effective area when the volume is deleted and garbage is recovered. And simultaneously, the reconstruction task of the disk array scheduling is carried out according to the user area, and the array redundancy is recovered when the user data area is reconstructed to finish the array.
According to the processing method of the disk array data, firstly, the disk states of all the disks in the disk array are acquired so as to determine whether to copy, mirror and replace operation data in the disks based on the states of all the disks; by acquiring the disk state of each disk in the disk array, when the disk state of any disk is in a sub-health state, a corresponding hot standby disk is allocated for the disk, so that the data in the disk in the sub-health state is copied to the hot standby disk in time, and the time consumption of data reconstruction when the disk fails is reduced; the copy strategy of copying the operation data in the disk to the hot standby disk is obtained, so that the operation data in the disk is copied and replaced or not replaced, and the task amount and risk of data reconstruction when the disk fails are reduced; the operation data in the disk is copied to the hot standby disk based on the copy strategy, so that the hot standby of the disk with the sub-health state is realized, the probability of data reconstruction is reduced, and the data has higher security. Therefore, the invention can copy the operation data of a certain magnetic disk with hidden health status trouble, and ensure the safety of the operation data before the magnetic disk fails, thereby reducing the probability of reconstructing the operation data and ensuring the operation data to have higher safety.
In this embodiment, a method for processing disk array data is provided, and fig. 4 is a flowchart of a method for processing disk array data according to an embodiment of the present invention, as shown in fig. 4, where the flowchart includes the following steps:
step S401, obtaining a disk state of each disk in the disk array, wherein the disk state comprises a sub-health state, and the sub-health state is used for representing that the read-write performance of any block in the disk is lower than the standard read-write performance.
As described above, the disk states of the disks in the disk array are obtained, so that whether to copy, mirror and replace the operation data in the disk is determined based on the states of the disks.
Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S402, for any disk, when the disk state of the disk is sub-health, a corresponding hot spare disk is allocated to the disk, so as to copy the operation data in the disk to the hot spare disk.
As described above, by acquiring the disk states of the disks in the disk array, when the disk state of any disk is in the sub-health state, a corresponding hot spare disk is allocated to the disk, so that the data in the disk in the sub-health state is copied to the hot spare disk in time, and the time consumption of data reconstruction due to the failure of the disk is reduced.
Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S403, obtaining a copy policy of copying the operation data in the disk to the hot spare disk.
As described above, by acquiring the copy policy of copying the operation data in the disk to the hot spare disk, the operation data in the disk is copied and replaced or not replaced, so as to reduce the task amount and risk of data reconstruction when the disk fails.
Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
In step S404, when the copy policy is copy and replace, the operation data in the disk is completely copied to the hot spare disk and replaced.
When the copy strategy is copy and replacement, the operation data in the disk is completely copied to the hot spare disk, and then the disk with sub-health state is replaced by the hot spare disk, namely the replacement of the disk and the hot spare disk is realized, the loss of the operation data stored in the disk due to the failure of the disk is avoided, and the probability of data reconstruction is further increased.
Please refer to step S104 in the embodiment shown in fig. 2, which is not described herein.
Step S405, before the operation data in the disk is completely copied to the hot spare disk, if the disk state of the disk is changed from the sub-health state to the failure state, the copy task of the operation data to the hot spare disk is stopped.
If the disk state of the disk is changed from the sub-health state to the failure state before the operation data in the disk is completely copied to the hot spare disk, the copying task of the operation data to the hot spare disk is stopped, and recovery of the operation data after the copying is completed is timely performed.
And step S406, performing data reconstruction on the operation data which are not copied in the disk, so as to reconstruct the operation data which are not copied in the disk into the hot spare disk.
As described above, the operation data which is not copied in the disk is rebuilt to the hot standby disk by carrying out data rebuilding on the operation data which is not copied in the disk, so that the rebuilding data quantity of the operation data rebuilding in the disk is reduced, and the IO read-write performance of the storage system is prevented from greatly sliding down in the data rebuilding process.
In some optional embodiments, a partition where operation data that is not copied in a disk is located may be first obtained, and when the partition is a data partition, operation data in a check partition of another disk may be based on the stripe, and data in the partition may be reconstructed, and the operation data may be reconstructed to a hot spare disk. Optionally, the data reconstruction may be performed on the operation data in the disk, so as to reconstruct the operation data in the disk to the hot spare disk, that is, directly reconstruct the data of the whole disk.
According to the processing method of the disk array data, firstly, the disk states of all the disks in the disk array are acquired so as to determine whether to copy, mirror and replace operation data in the disks based on the states of all the disks; by acquiring the disk state of each disk in the disk array, when the disk state of any disk is in a sub-health state, a corresponding hot standby disk is allocated for the disk, so that the data in the disk in the sub-health state is copied to the hot standby disk in time, and the time consumption of data reconstruction when the disk fails is reduced; the copy strategy of copying the operation data in the disk to the hot standby disk is obtained, so that the operation data in the disk is copied and replaced or not replaced, and the task amount and risk of data reconstruction when the disk fails are reduced; when the copying strategy is copying and replacing, after the operation data in the disk is completely copied to the hot spare disk, replacing the disk with the sub-health state with the hot spare disk, namely, replacing the disk with the hot spare disk, thereby avoiding the loss of the operation data stored in the disk due to the failure of the disk and further increasing the probability of data reconstruction; before the operation data in the disk is completely copied to the hot spare disk, if the disk state of the disk is changed from the sub-health state to the failure state, stopping the copying task of copying the operation data to the hot spare disk, and timely recovering the operation data after the copying is completed; the operation data which is not copied in the disk is rebuilt to the hot spare disk by carrying out data rebuilding on the operation data which is not copied in the disk, so that the rebuilding data quantity of the operation data rebuilding in the disk is reduced, and the IO read-write performance of a storage system in the data rebuilding process is prevented from greatly sliding down. Therefore, the invention can copy the operation data of a certain magnetic disk with hidden health status trouble, and ensure the safety of the operation data before the magnetic disk fails, thereby reducing the probability of reconstructing the operation data and ensuring the operation data to have higher safety.
In this embodiment, a method for processing disk array data is provided, and fig. 5 is a flowchart of a method for processing disk array data according to an embodiment of the present invention, as shown in fig. 5, where the flowchart includes the following steps:
step S501, obtaining the disk states of all disks in the disk array, wherein the disk states comprise sub-health states, and the sub-health states are used for representing that the read-write performance of any block in the disk is lower than the standard read-write performance.
As described above, the disk states of the disks in the disk array are obtained, so that whether to copy, mirror and replace the operation data in the disk is determined based on the states of the disks.
Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S502, for any disk, when the disk state of the disk is sub-health state, a corresponding hot spare disk is allocated for the disk, so as to copy the operation data in the disk to the hot spare disk.
As described above, by acquiring the disk states of the disks in the disk array, when the disk state of any disk is in the sub-health state, a corresponding hot spare disk is allocated to the disk, so that the data in the disk in the sub-health state is copied to the hot spare disk in time, and the time consumption of data reconstruction due to the failure of the disk is reduced.
Please refer to step S102 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S503, obtaining a copy policy of copying the operation data in the disk to the hot spare disk.
As described above, by acquiring the copy policy of copying the operation data in the disk to the hot spare disk, the operation data in the disk is copied and replaced or not replaced, so as to reduce the task amount and risk of data reconstruction when the disk fails.
Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
In step S504, when the copy policy is that the copy is not replaced, after the operation data in the disk is completely copied to the hot spare disk, a mirror image between the disk and the hot spare disk is established.
When the copy policy is that the copy is not replaced, after the operation data in the disk is completely copied to the hot spare disk, the mirror image between the disk and the hot spare disk is established, so that the loss of the operation data stored in the disk due to the failure of the disk is avoided, and the probability of data reconstruction is further increased.
In step S505, if the disk state of the disk is changed from the sub-health state to the failure state, the disk is replaced with the hot spare disk, and the newly added disk is used as the hot spare disk.
If the disk state of the disk is changed from the sub-health state to the failure state, the disk is replaced by the hot spare disk, and the newly-added disk is used as the hot spare disk, namely the hot spare disk can always keep mirror image with the disk and does not replace the disk until the disk fails, and meanwhile, the newly-added disk is used as the hot spare disk, so that the hot spare capacity of the disk array is ensured, the consistency of the disk and the hot spare disk data is ensured due to the existence of the mirror image, the data needing to be rebuilt does not exist even if the disk fails, and in addition, the disk is replaced until the disk fails, so that the abrasion of the hot spare disk is reduced.
In some optional embodiments, after the operation data in the disk is completely copied to the hot spare disk, when a mirror image between the disk and the hot spare disk is established, copy information fed back by the hot spare disk based on a copy task may be acquired first; when the copying information characterizes that the copying task is completed, a mirror image between the disk and the hot spare disk is established, and the disk is marked as a mirror image disk; when the disk state of the disk is changed from the sub-health state to the failure state, the mirror image between the disk and the hot standby disk is canceled; changing the disk mark of the disk from a mirror disk to a failure disk; obtaining a replacement disk for replacing a disk marked as a failure disk; replacing the disk marked as the failed disk based on the replacement disk; reconstructing operation data of a disk in the hot standby disk to a replacement disk; receiving reconstruction information fed back by a replacement disk based on data reconstruction; when the reconstruction information represents that the operation data of the disk in the hot standby disk is completely reconstructed to the replacement disk, marking the replacement disk as a normal disk; and initializing data of the hot standby space in the hot standby disk to restore the hot standby disk.
According to the processing method of the disk array data, firstly, the disk states of all the disks in the disk array are acquired so as to determine whether to copy, mirror and replace operation data in the disks based on the states of all the disks; by acquiring the disk state of each disk in the disk array, when the disk state of any disk is in a sub-health state, a corresponding hot standby disk is allocated for the disk, so that the data in the disk in the sub-health state is copied to the hot standby disk in time, and the time consumption of data reconstruction when the disk fails is reduced; the copy strategy of copying the operation data in the disk to the hot standby disk is obtained, so that the operation data in the disk is copied and replaced or not replaced, and the task amount and risk of data reconstruction when the disk fails are reduced; when the copy strategy is that the copy is not replaced, after the operation data in the disk is completely copied to the hot spare disk, a mirror image between the disk and the hot spare disk is established, so that the loss of the operation data stored in the disk due to the failure of the disk is avoided, and the probability of data reconstruction is further increased; if the disk state of the disk is changed from the sub-health state to the failure state, the disk is replaced by the hot spare disk, and the newly-added disk is used as the hot spare disk, namely the hot spare disk can always keep mirror image with the disk and does not replace the disk until the disk fails, and meanwhile, the newly-added disk is used as the hot spare disk, so that the hot spare capacity of the disk array is ensured, the consistency of the disk and the hot spare disk data is ensured due to the existence of the mirror image, the data needing to be rebuilt does not exist even if the disk fails, and in addition, the disk is replaced until the disk fails, so that the abrasion of the hot spare disk is reduced. Therefore, the invention can copy the operation data of a certain magnetic disk with hidden health status trouble, and ensure the safety of the operation data before the magnetic disk fails, thereby reducing the probability of reconstructing the operation data and ensuring the operation data to have higher safety.
In this embodiment, a method for processing disk array data is provided, and fig. 6 is a flowchart of a method for processing disk array data according to an embodiment of the present invention, as shown in fig. 6, where the flowchart includes the following steps:
step S601, obtaining a disk state of each disk in the disk array.
As described above, the disk states of the disks in the disk array are obtained, so that whether to copy, mirror and replace the operation data in the disk is determined based on the states of the disks.
Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S602, for any disk, when the disk state of the disk is the failure state, obtaining the last disk state of the disk.
As described above, by acquiring the disk states of the disks in the disk array, when the disk state of any disk is the sub-failure state, the last disk state of the disk is acquired, and then whether the disk is changed to the failure state after the sub-health state or is changed from the health state to the sub-health state is determined.
Specifically, if the disk is changed to the failure state after the sub-health state, please refer to step S405 in the embodiment shown in fig. 5 in detail, which is not described herein again.
In step S603, when the last disk state of the disk is a healthy state, data reconstruction is performed on the operation data in the disk.
As described above, when the last disk state of the disk is a healthy state, the data reconstruction is performed on the operation data in the disk, so as to ensure the data security of the operation data in each disk in the disk array.
In some optional embodiments, when the last disk state of the disk is a healthy state, and when the operation data in the disk is reconstructed, the verification data of the operation data of the disk can be obtained first and verified, and the verification data is stored in other disks of the disk array; and carrying out data reconstruction on the operation data in the disk based on the verification data, and storing the reconstructed operation data in the hot spare disk, the newly added disk or the replaced disk.
In specific implementation, referring to fig. 7, when a disk in a healthy state in a disk array may fail, changing the disk state of the disk from the healthy state to a sub-healthy state, copying operation data in the sub-healthy state to a hot spare disk, and replacing the sub-healthy state disk when the copying is completed, wherein the disk state of the replaced hot spare disk is the healthy state; in the process of copying operation data in the sub-health state disk to the hot spare disk, if the disk suddenly fails, the uncopyed data is rebuilt to the hot spare disk or the replacement disk.
Further, after the operation data in the disk in the sub-health state is copied to the hot spare disk, the mirror image of the disk and the hot spare disk can be maintained, when the disk is removed or fails, the disk is in the failure state, the operation data copied in the hot spare disk is required to be copied to the replacement disk, and at the moment, the disk state of the hot spare disk after replacement is in the health state.
Further, when the disk state of the disk is changed from the healthy state to the invalid state, the operation data in the disk is required to be subjected to data reconstruction, and the reconstructed operation data is stored in the hot spare disk or the replacement disk, and at the moment, the disk state of the replacement hot spare disk or the replacement disk is the healthy state.
According to the processing method of the disk array data, firstly, the disk states of all the disks in the disk array are acquired so as to determine whether to copy, mirror and replace operation data in the disks based on the states of all the disks; the method comprises the steps of obtaining the disk state of each disk in a disk array, and obtaining the last disk state of the disk when the disk state of any disk is a sub-failure state, so as to judge whether the disk is changed into the failure state after being in the sub-health state or is directly changed into the sub-health state from the health state; when the last disk state of the disk is a healthy state, the data reconstruction is carried out on the operation data in the disk, so that the data security of the operation data in each disk in the disk array is ensured. Therefore, the invention can copy the operation data of a certain magnetic disk with hidden health status trouble, and ensure the safety of the operation data before the magnetic disk fails, thereby reducing the probability of reconstructing the operation data and ensuring the operation data to have higher safety.
The embodiment also provides a device for processing disk array data, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a processing apparatus for disk array data, as shown in fig. 8, including:
the information obtaining module 801 is configured to obtain a disk state of each disk in the disk array, where the disk state includes a sub-health state and a failure state, and the disk failure is used to characterize that the disk has a failure or is removed.
The information determining module 802 is configured to allocate, for any disk, a corresponding hot spare disk to the disk when the disk state of the disk is a sub-health state, so as to copy operation data in the disk to the hot spare disk.
The request directing module 803 is configured to obtain a copy policy for copying operation data in the disk to the hot spare disk, where the copy policy includes copy and replace and copy not replace.
And the data copying module 804 is configured to, when the copying policy is copying and replacing, completely copy the operation data in the disk to the hot spare disk, replace the disk, and use the newly added disk as the hot spare disk.
And the data mirroring module 805 is configured to, when the copy policy is that the copy is not replaced, establish a mirror image between the disk and the hot spare disk after the operation data in the disk is completely copied to the hot spare disk.
In some alternative embodiments, the data mirroring module 805 is further configured to replace the disk with a hot spare disk and use the newly added disk as the hot spare disk if the disk state of the disk is changed from the sub-health state to the failure state.
In some alternative embodiments, the data copy module 804 includes:
the copying task termination unit is used for stopping copying the operation data to the copying task of the hot spare disk if the disk state of the disk is changed from the sub-health state to the failure state;
the data reconstruction unit is used for reconstructing the data of the operation data which is not copied in the disk, so as to reconstruct the operation data which is not copied in the disk into the hot spare disk;
or, reconstructing the data of the operation data in the disk to reconstruct the operation data in the disk to the hot spare disk.
In some alternative embodiments, the data mirroring module 805 is further configured to:
obtaining copy information fed back by the hot standby disk based on a copy task;
when the copying information characterizes that the copying task is completed, a mirror image between the disk and the hot spare disk is established, and the disk is marked as a mirror image disk;
when the disk state of the disk is changed from the sub-health state to the failure state, the mirror image between the disk and the hot standby disk is canceled;
changing the disk mark of the disk from a mirror disk to a failure disk;
obtaining a replacement disk for replacing a disk marked as a failure disk;
replacing the disk marked as the failed disk based on the replacement disk;
reconstructing operation data of a disk in the hot standby disk to a replacement disk;
receiving reconstruction information fed back by a replacement disk based on data reconstruction;
when the reconstruction information represents that the operation data of the disk in the hot standby disk is completely reconstructed to the replacement disk, marking the replacement disk as a normal disk;
and initializing data of the hot standby space in the hot standby disk to restore the hot standby disk.
In some alternative embodiments, the data mirroring module 805 includes:
the state acquisition unit is used for acquiring the last disk state of the disk;
And the data reconstruction unit is used for reconstructing the data of the operation data in the disk when the state of the last disk of the disk is a healthy state.
Specifically, the method comprises the steps of obtaining check data for checking operation data of a disk, and storing the check data in other disks of a disk array; and carrying out data reconstruction on the operation data in the disk based on the verification data, and storing the reconstructed operation data in the hot spare disk, the newly added disk or the replaced disk.
In some alternative embodiments, the information acquisition module 801 includes:
the timeout acquisition unit is used for acquiring the read-write timeout time of each block in the magnetic disk;
the first state determining unit is used for determining that the disk state of the disk is a sub-health state when the read-write timeout time of the partition is greater than or equal to the timeout time threshold;
the circulation test unit is used for carrying out circulation read-write test on the partition blocks when the disk state of the disk is determined to be sub-health state;
the second state determining unit is used for determining that the disk state of the disk is a healthy state if the reading and writing of the blocks are successful in the target cycle times;
and the third state determining unit is used for determining that the disk state of the disk is a failure state if the reading and writing of the partition fail within the target cycle times.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The disk array data processing apparatus in this embodiment is presented in the form of a functional unit, where a unit refers to an ASIC (application specific integrated circuit) circuit, a processor and a memory that execute one or more software or firmware programs, and/or other devices that can provide the above functions.
The embodiment of the invention also provides computer equipment, which is provided with the processing device of the disk array data shown in the figure 8.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 9, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., determined as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 9.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, server clusters, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. A method for processing disk array data, the method comprising:
obtaining a disk state of each disk in a disk array, wherein the disk state comprises a sub-health state, and the sub-health state is used for representing that the read-write performance of any block in the disk is lower than the standard read-write performance;
for any one of the disks, when the disk state of the disk is a sub-health state, a corresponding hot spare disk is allocated for the disk, so that operation data in the disk are copied to the hot spare disk;
obtaining a copy strategy for copying operation data in the disk to the hot spare disk, wherein the copy strategy comprises copying, replacing and copying without replacing;
when the copy strategy is copy and replacement, the operation data in the disk is completely copied to the hot spare disk, then the disk is replaced, and the newly added disk is used as the hot spare disk;
And when the copy strategy is that the copy is not replaced, after the operation data in the disk is completely copied to the hot spare disk, establishing a mirror image between the disk and the hot spare disk.
2. The method of claim 1, wherein the disk state further comprises a failure state that characterizes the disk as failed or removed, and wherein prior to fully copying the operational data in the disk to the hot spare disk, further comprising:
if the disk state of the disk is changed from the sub-health state to the failure state, stopping copying the operation data to the copy task of the hot standby disk;
performing data reconstruction on the operation data which are not copied in the disk, so as to reconstruct the operation data which are not copied in the disk into the hot spare disk;
or, reconstructing the operation data in the disk to reconstruct the operation data in the magnetic disk to the hot spare disk.
3. The method of claim 2, wherein after the mirroring between the disk and the hot spare disk is established, comprising:
and if the disk state of the disk is changed from the sub-health state to the failure state, replacing the disk with the hot spare disk, and taking the newly-added disk as the hot spare disk.
4. The method of claim 2, wherein after the operating data in the disk is completely copied to the hot spare disk, creating a mirror between the disk and the hot spare disk comprises:
obtaining copy information fed back by the hot standby disk based on the copy task;
when the copying information characterizes that the copying task is completed, establishing a mirror image between the disk and the hot spare disk, and marking the disk as a mirror image disk;
when the disk state of the disk is changed from the sub-health state to the failure state, canceling the mirror image between the disk and the hot spare disk;
changing the disk mark of the disk from the mirror disk to a failure disk;
obtaining a replacement disk for replacing the disk marked as the failure disk;
replacing the disk marked as the invalid disk based on the replacement disk;
reconstructing operation data of the disk in the hot spare disk to the replacement disk;
receiving reconstruction information fed back by the replacement disk based on the data reconstruction;
when the reconstruction information characterizes that the operation data of the disk in the hot spare disk is completely reconstructed to the replacement disk, marking the replacement disk as a normal disk;
And initializing the data of the hot standby space in the hot standby disk to restore the hot standby disk.
5. The method of claim 2, wherein the disk state further comprises a health state, and wherein when the disk state of the disk is a failure state, the method further comprises:
acquiring a last disk state of the disk;
and when the state of the last magnetic disk of the magnetic disk is a healthy state, reconstructing the operation data in the magnetic disk.
6. The method of claim 5, wherein the reconstructing the operation data in the disk when the last disk state of the disk is a healthy state comprises:
obtaining check data for checking the operation data of the disk, wherein the check data are stored in other disks of the disk array;
and carrying out data reconstruction on the operation data in the disk based on the verification data, and storing the reconstructed operation data in the hot spare disk, the new disk or the replacement disk.
7. The method of claim 1, wherein the obtaining the disk state of each disk in the disk array comprises:
Acquiring the read-write timeout time of each block in the magnetic disk;
when the read-write timeout time of the block is greater than or equal to the timeout time threshold, determining that the disk state of the disk is a sub-health state;
when the disk state of the disk is determined to be sub-health state, performing a cyclic read-write test on the blocks;
if the reading and writing of the blocks are successful in the target cycle times, determining that the disk state of the disk is a healthy state;
if the read-write of the block fails in the target cycle times, determining that the disk state of the disk is a failure state.
8. A disk array data processing apparatus, the apparatus comprising:
the system comprises a state acquisition module, a state judgment module and a state judgment module, wherein the state acquisition module is used for acquiring the disk state of each disk in a disk array, the disk state comprises a sub-health state, and the sub-health state is used for representing that the read-write performance of any block in the disk is lower than the standard read-write performance;
the disk allocation module is used for allocating a corresponding hot spare disk for any disk when the disk state of the disk is a sub-health state so as to copy operation data in the disk to the hot spare disk;
The strategy acquisition module is used for acquiring a copy strategy for copying operation data in the disk to the hot spare disk, wherein the copy strategy comprises copy and replacement and copy non-replacement;
the data copying module is used for copying and replacing the operation data in the disk completely to the hot spare disk and then replacing the disk when the copying strategy is copying and replacing, and taking the newly added disk as the hot spare disk;
and the data mirroring module is used for establishing mirroring between the magnetic disk and the hot spare disk after the operation data in the magnetic disk is completely copied to the hot spare disk when the copy strategy is that the copy is not replaced.
9. A computer device, comprising:
a memory and a processor in communication with each other, the memory having stored therein computer instructions which, upon execution, cause the processor to perform the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202311492746.4A 2023-11-09 2023-11-09 Disk array data processing method, device, equipment and storage medium Pending CN117539386A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311492746.4A CN117539386A (en) 2023-11-09 2023-11-09 Disk array data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311492746.4A CN117539386A (en) 2023-11-09 2023-11-09 Disk array data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117539386A true CN117539386A (en) 2024-02-09

Family

ID=89781808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311492746.4A Pending CN117539386A (en) 2023-11-09 2023-11-09 Disk array data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117539386A (en)

Similar Documents

Publication Publication Date Title
US10459814B2 (en) Drive extent based end of life detection and proactive copying in a mapped RAID (redundant array of independent disks) data storage system
DE112019000213T5 (en) Storage systems with peer data recovery
CN100421080C (en) A method for improving writing data efficiency and subsystem and system implementing the same
US8099570B2 (en) Methods, systems, and computer program products for dynamic selective memory mirroring
DE112015005211T5 (en) SYSTEMS AND METHOD FOR MEMORY ERROR MANAGEMENT
CN110807064B (en) Data recovery device in RAC distributed database cluster system
CN107870731B (en) Management method of Redundant Array of Independent Disks (RAID) system and electronic equipment
DE112019000201T5 (en) STORAGE SYSTEMS WITH PEER DATA CLEANING
CN108959526B (en) Log management method and log management device
US20230127166A1 (en) Methods and systems for power failure resistance for a distributed storage system
CN104077375A (en) Method for handling error catalogs of nodes in CC-NUMA system and nodes
CN111124264A (en) Method, apparatus and computer program product for reconstructing data
JP2007133544A (en) Failure information analysis method and its implementation device
CN111124262A (en) Management method, apparatus and computer readable medium for Redundant Array of Independent Disks (RAID)
CN116107516B (en) Data writing method and device, solid state disk, electronic equipment and storage medium
EP2329384B1 (en) Memory management techniques selectively using mitigations to reduce errors
US11182252B2 (en) High availability state machine and recovery
CN112000513A (en) Computer and VPD data operation method, device and storage medium thereof
US10990312B2 (en) Method, apparatus, device and storage medium for processing data location of storage device
CN110046065A (en) A kind of storage array method for reconstructing, device, equipment and storage medium
CN109558068B (en) Data migration method and migration system
CN113360312A (en) Hard disk fault processing method, device, equipment and storage medium
CN115878052B (en) RAID array inspection method, inspection device and electronic equipment
CN115657965B (en) Method, device and medium for configuring metadata
CN111124251B (en) Method, apparatus and computer readable medium for I/O control

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