A method, apparatus and medium for handling abnormal RAID member disks
By reserving storage space in the RAID card, the I/O commands of abnormal RAID member disks are temporarily stored to other normal member disks, which solves the problem of wasted hot spare disk resources when RAID member disks are abnormal, reduces hardware costs and ensures data consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2022-11-04
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, when a RAID member disk fails, a hot spare disk is usually required for data recovery, which leads to a waste of hot spare disk resources and an increase in hardware costs.
Reserve some storage space in the RAID card to temporarily store the I/O commands of abnormal RAID member disks to other normal member disks, and restore the data to the original member disk after the member disk is successfully repaired, thus avoiding the use of hot spare disks.
The use of hot spare disks was reduced, hardware costs were lowered, and data inconsistency caused by power outages or restarts during the repair process was resolved.
Smart Images

Figure CN115562593B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of disk array storage, and in particular to a method, apparatus and medium for handling abnormal RAID member disks. Background Technology
[0002] A Redundant Array of Independent Disks (RAID) is a system that combines multiple independent hard drives (physical hard drives) in different ways to form a hard drive group (logical hard drive), thereby providing higher storage performance and data backup technology than a single hard drive. However, the hard drives mounted under a RAID card may occasionally fail, manifesting as I / O timeouts or errors when the RAID card performs read / write input / output (I / O) operations on some member drives. Currently, the common practice for handling RAID member drive failures is to add a hot spare drive during the RAID configuration process. When a RAID member drive fails, the RAID card removes the failed member drive, replaces it with the hot spare drive, and then uses an algorithm to restore the data from the failed member drive to the hot spare drive.
[0003] However, a failure of a RAID member disk does not mean that the RAID member disk is unusable. Hard drives have their own fault tolerance and recovery capabilities, and in most cases, these capabilities can restore the hard drive to normal operation. The role of a hot spare disk is essentially to create an additional backup within the RAID array. For example, a RAID array might normally allow the system and data to continue operating even if only one disk fails, but failing two disks would not.
[0004] Therefore, providing a method to reduce the use of hot spare disks is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, and medium for handling abnormal RAID member disks to reduce the use of hot spare disks.
[0006] To address the aforementioned technical problems, this application provides a method for handling abnormal RAID member disks, including:
[0007] Receive I / O commands from the host;
[0008] If the member disk corresponding to the I / O command malfunctions, initiate the member disk repair process.
[0009] Store the I / O commands sent by the host to the malfunctioning member disk to the disks of other normal member disks;
[0010] Once the faulty member disk is successfully repaired, the I / O commands stored on the disk of the normal member disk will be sent to the successfully repaired member disk.
[0011] Preferably, in the above-mentioned method for handling abnormal RAID member disks, whether the member disk corresponding to the I / O command has experienced an abnormality includes:
[0012] Send I / O commands to the corresponding member disks;
[0013] If a command execution error message is received from a member disk, or if no command execution message is received from a member disk after a preset time, it is determined that an abnormality has occurred in the member disk corresponding to the I / O command.
[0014] Preferably, in the above-described method for handling abnormal RAID member disks, ...
[0015] The process of initiating the member disk repair includes:
[0016] Restart the abnormal member disk;
[0017] If the abnormal member disk restarts successfully, then the abnormal member disk has been successfully repaired.
[0018] If the abnormal member disk fails to restart, control the restart of the uplink port corresponding to the abnormal member disk;
[0019] If the uplink port corresponding to the abnormal member disk restarts successfully, the abnormal member disk is successfully repaired.
[0020] If the uplink port corresponding to the abnormal member disk fails to restart, the repair of the abnormal member disk will fail.
[0021] Preferably, in the above-described method for handling abnormal RAID member disks, if the repair of the abnormal member disk fails, it further includes:
[0022] Start the hot spare disk;
[0023] Restore the data from the abnormal member disk to the hot spare disk;
[0024] Send I / O commands stored on the normal member disk to the hot spare disk.
[0025] Preferably, in the above-mentioned method for handling abnormal RAID member disks, storing the I / O commands issued by the host to the abnormal member disk to the disks of other normal member disks includes:
[0026] Based on preset rules, select the normal member disk that corresponds to the abnormal member disk;
[0027] I / O commands issued by the host to the malfunctioning member disk are stored on the disk of the normal member disk;
[0028] Write the storage address of the I / O command into the storage data management list.
[0029] Preferably, in the above-mentioned method for handling abnormal RAID member disks, selecting the backup member disks that are normally functioning corresponding to the abnormal member disks according to preset rules includes:
[0030] Based on the sorting of the abnormal member disks, select multiple normal member disks in sequence.
[0031] Preferably, in the above-described method for handling abnormal RAID member disks, the storage data management list is stored at the starting address of the corresponding member disk.
[0032] To address the aforementioned technical problems, this application also provides an abnormal RAID member disk processing device, comprising:
[0033] The receiving module is used to receive I / O commands issued by the host.
[0034] The startup repair module is used to initiate the member disk repair process if an abnormality occurs on the member disk corresponding to the I / O command.
[0035] The storage module is used to store I / O commands issued by the host to the abnormal member disk to the disks of other normal member disks;
[0036] The recovery storage module is used to send I / O commands stored on the disks of the normal member disks to the successfully repaired member disks after the abnormal member disks have been successfully repaired.
[0037] To address the aforementioned technical problems, this application also provides an abnormal RAID member disk processing device, comprising:
[0038] Memory, used to store computer programs;
[0039] The processor is used to implement the steps of the above-described abnormal RAID member disk handling method when executing a computer program.
[0040] To address the aforementioned technical problems, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described abnormal RAID member disk handling method.
[0041] The abnormal RAID member disk handling method provided in this application includes: receiving I / O commands from the host; if the member disk corresponding to the I / O command is abnormal, initiating the member disk repair process; storing the I / O commands sent by the host to the abnormal member disk to the disks of other normal member disks; and sending the I / O commands stored on the disks of normal member disks to the successfully repaired member disks after the abnormal member disk is successfully repaired. This method directly caches the I / O commands received by the RAID card during the repair process of the abnormal RAID member disk to the hard drives of other normal member disks. The RAID card only needs to reserve some storage space during RAID setup, and the RAID card can cache the I / O commands in this space. After the RAID card successfully repairs the abnormal member disk, it can restore the data stored in the reserved storage space to the abnormal member disk before the RAID was established. This method allows the RAID member disks to reserve some storage space to store data sent by the host to the abnormal RAID member disk in the event of an abnormal RAID member disk. During the repair process of the abnormal member disk, the data is temporarily cached to other normal member disks, avoiding data inconsistency problems caused by the member disks being unable to receive I / O commands.
[0042] In addition, this application also provides an apparatus and a medium that correspond to the above method and have the same effect. Attached Figure Description
[0043] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A flowchart illustrating an abnormal RAID member disk handling method provided in this application embodiment;
[0045] Figure 2 A structural diagram of an abnormal RAID member disk processing device provided in an embodiment of this application;
[0046] Figure 3 This is a structural diagram of another abnormal RAID member disk processing device provided in an embodiment of this application. Detailed Implementation
[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0048] The core of this application is to provide a method, device, and medium for handling abnormal RAID member disks.
[0049] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] RAID is a technology that combines multiple independent hard drives (physical hard drives) in different ways to form a hard drive group (logical hard drive), thereby providing higher storage performance and data backup technology than a single hard drive. However, the hard drives connected to the RAID card, i.e., the member drives, can occasionally fail. This manifests as I / O timeouts or I / O errors when the RAID card performs read / write I / O on some member drives. Currently, the common practice for dealing with member drive failures is to add a hot spare drive during the RAID setup process. When a member drive fails, the RAID card removes the failed member drive and replaces it with the hot spare drive. Then, using a suitable algorithm, the data on the failed member drive is recovered to the hot spare drive. However, a member drive failure does not mean that the RAID member drive is unusable. Hard drives have their own fault tolerance and recovery capabilities, and in most cases, these capabilities can restore the hard drive to normal operation.
[0051] If a member disk of the RAID array malfunctions—that is, if the RAID card experiences I / O timeouts or errors when reading or writing I / O to certain member disks—the RAID card can repair the malfunctioning member disk. During this repair process, the host will still send I / O commands to the RAID array. However, the malfunctioning member disk cannot receive the I / O commands sent by the host while the RAID card is repairing it. This involves caching the I / O commands during the repair process. Generally, the RAID card will cache the data sent by the host to the RAID array in the RAID card's memory or flash memory. However, this requires the RAID card to have a large amount of memory or flash memory, which increases the hardware cost of the RAID card.
[0052] To address the aforementioned issues, this embodiment provides a method for handling abnormal RAID member disks, such as... Figure 1As shown, it includes:
[0053] S11: Receive I / O commands from the host;
[0054] S12: If the member disk corresponding to the I / O command malfunctions, start the member disk repair process;
[0055] S13: Store the I / O commands issued by the host to the abnormal member disk to the disk of another normal member disk;
[0056] S14: After the abnormal member disk is successfully repaired, the I / O commands stored in the disk of the normal member disk will be sent to the successfully repaired member disk.
[0057] RAID member disks typically have sufficient hard drive storage for working storage. In this embodiment, a storage area is allocated to each RAID member disk to store I / O commands received when other RAID member disks malfunction. This allows RAID member disks to reserve some storage space to store data sent by the host to the malfunctioning RAID member disk in the event of a malfunction. This way, during the RAID card's repair process, the RAID card can only cache the data in the malfunctioning member disk. Furthermore, it can resolve the data inconsistency problem caused by data loss due to server power failure or RAID card restart.
[0058] Step S11 receives I / O commands from the host. This embodiment does not limit the type of I / O commands; they can be set according to actual conditions. After receiving an I / O command, if the corresponding member disk malfunctions, a repair process is initiated for the malfunctioning member disk. This embodiment does not limit the specific repair process; it can be set according to actual needs.
[0059] To prevent the loss of I / O commands that should have been sent to member disks during the repair process of abnormal member disks, the I / O commands sent by the host to the abnormal member disks are stored on the disks of other normal member disks. This embodiment does not restrict which member disk to send them to; the storage scheme can be set according to actual needs. When the abnormal member disk is successfully repaired, the I / O commands stored on the disks of normal member disks are sent to the successfully repaired member disks.
[0060] The abnormal RAID member disk handling method provided in this embodiment includes: receiving I / O commands from the host; if the member disk corresponding to the I / O command is abnormal, initiating the member disk repair process; storing the I / O commands sent by the host to the abnormal member disk to the disks of other normal member disks; and after the abnormal member disk is successfully repaired, sending the I / O commands stored on the disks of normal member disks to the successfully repaired member disks. This method directly caches the I / O commands received by the RAID card during the repair of abnormal RAID member disks to the hard drives of other normal member disks. The RAID card only needs to reserve some storage space during RAID setup; the RAID card can cache the I / O commands in this space, and after the RAID card successfully repairs the abnormal member disk, the RAID card can restore the data stored in the reserved storage space to the abnormal member disk before the RAID was established. This allows the RAID member disks to reserve some storage space to store data sent by the host to the RAID member disk in the event of a RAID member disk failure. During the RAID member disk failure repair process, the data is temporarily cached in other normal member disks with abnormal IDs. It can also solve the problem of data inconsistency caused by the loss of data cached on the RAID card in the event of server power failure or RAID card restart. If the member disk can be successfully repaired, there is no need to start the hot spare disk.
[0061] In the above embodiments, if the member disk corresponding to the I / O command malfunctions, the member disk repair process is initiated. This embodiment provides a determination scheme for whether the member disk corresponding to the I / O command malfunctions, including:
[0062] Send I / O commands to the corresponding member disks;
[0063] If a command execution error message is received from a member disk, or if no command execution message is received from a member disk after a preset time, it is determined that an abnormality has occurred in the member disk corresponding to the I / O command.
[0064] When the RAID card forwards I / O commands from the host, if it detects that the hard drive returns an I / O command execution error or the RAID card does not receive command execution information for an extended period, it determines that the member disk corresponding to the I / O command is malfunctioning. Preferably, a set number of retransmission attempts can be set; if the transmission fails after the set number of attempts, the member disk corresponding to the I / O command is considered malfunctioning. The RAID card retryes forwarding the RAID I / O command from the host to the hard drive. If the hard drive still returns an I / O command execution error or fails to receive command execution information from the member disk within a preset time, the member disk corresponding to the I / O command is considered malfunctioning.
[0065] This embodiment provides a preferred solution for repairing a member disk, which includes initiating the member disk repair process:
[0066] Restart the abnormal member disk;
[0067] If the abnormal member disk restarts successfully, then the abnormal member disk has been successfully repaired.
[0068] If the abnormal member disk fails to restart, control the restart of the uplink port corresponding to the abnormal member disk;
[0069] If the uplink port corresponding to the abnormal member disk restarts successfully, the abnormal member disk is successfully repaired.
[0070] If the uplink port corresponding to the abnormal member disk fails to restart, the repair of the abnormal member disk will fail.
[0071] The RAID card restarts the malfunctioning member disk. If the restart command fails, the restart is considered successful; otherwise, it is considered successful. If the malfunctioning member disk restarts successfully, I / O commands are reissued. If these commands are executed normally, the RAID member disk is considered recovered, and the cached I / O commands from other member disks are restored. If the restart command fails, the RAID card restarts the uplink port corresponding to the malfunctioning member disk. If this restart command fails, the uplink port restart is considered successful; otherwise, it is considered successful. If the uplink port restart is successful, I / O commands are reissued. If these commands are executed normally, the RAID member disk is considered recovered, and the cached I / O commands are restored. If all the above steps fail, the malfunctioning member disk repair fails. Preferably, the process of restarting the malfunctioning member disk and its corresponding uplink port is repeated multiple times; a successful restart is considered complete as long as it is completed at least once. This embodiment does not limit the number of restarts; the number can be set according to actual needs.
[0072] According to the above embodiments, if the repair of the abnormal member disk fails, the method further includes:
[0073] Start the hot spare disk;
[0074] Restore the data from the abnormal member disk to the hot spare disk;
[0075] Send I / O commands stored on the normal member disk to the hot spare disk.
[0076] The hot spare disk acts as a backup within a RAID array. If one disk in the RAID array fails, the hot spare disk takes its place. Simultaneously, using an XOR checksum algorithm, the data from the failed disk is preserved and stored on the hot spare. This effectively prevents the RAID from being damaged, allowing a new, identical disk to replace the failed one. After the hot spare replaces the faulty member disk, I / O commands stored on the healthy member disks are sent to the hot spare, ensuring it continues to function normally.
[0077] According to the above embodiments, storing I / O commands issued by the host to the malfunctioning member disk to the disks of other normal member disks includes:
[0078] Based on preset rules, select the normal member disk that corresponds to the abnormal member disk;
[0079] I / O commands issued by the host to the malfunctioning member disk are stored on the disk of the normal member disk;
[0080] Write the storage address of the I / O command into the storage data management list.
[0081] In this embodiment, 1GB to 8GB of storage space is allocated to each selected hard drive as the storage space for the member disk with RAID anomalies. This allocation is generally determined based on the overall RAID space and the RAID card's cache. The basic principle is that if the RAID card has a cache, the reserved space for storing the member disk with RAID anomalies should be consistent with the RAID card's cache size; if the RAID card does not have a cache, the reserved space for storing the member disk with RAID anomalies should be 0.5% of the overall RAID space, but the maximum cannot exceed 8GB and the minimum cannot be less than 1GB. It should be noted that the specific values mentioned here are for illustrative purposes only; in actual applications, thresholds can be set according to actual needs.
[0082] Plan the data space for abnormal member disks in the storage RAID and establish a storage data management list. When a member disk receives data from other abnormal member disks, store it in the pre-allocated storage space and record it in the storage data management list for easy management.
[0083] Preferably, the storage data management list is stored at the starting address of the corresponding member disk to facilitate timely retrieval of the storage data management list.
[0084] Based on the above embodiments, this embodiment provides a preferred solution, which selects the backup normal member disk corresponding to the abnormal member disk according to preset rules, including:
[0085] Based on the sorting of the abnormal member disks, select multiple normal member disks in sequence.
[0086] The reserved storage space for RAID member disks is sorted by hard drive slot. When a member disk in the RAID fails, its data is cached in this order. To prevent errors from occurring on member disks used for data storage, information is stored across multiple member disks. Correspondingly, after a failed member disk is successfully repaired or a hot spare disk is activated, and after the information temporarily stored on other member disks is sent to the recovered member disk or hot spare disk, the data stored on multiple member disks is invalidated, and the storage space is released.
[0087] In the above embodiments, the method for handling abnormal RAID member disks has been described in detail. This application also provides embodiments corresponding to the apparatus for handling abnormal RAID member disks. It should be noted that this application describes the embodiments of the apparatus from two perspectives: one is based on functional modules, and the other is based on hardware.
[0088] From the perspective of functional modules Figure 2 A structural diagram of an abnormal RAID member disk processing device provided in an embodiment of this application is shown below. Figure 2 As shown, it includes:
[0089] The receiving module 21 is used to receive I / O commands issued by the host;
[0090] Startup repair module 22 is used to start the member disk repair process if the member disk corresponding to the I / O command is abnormal;
[0091] Storage module 23 is used to store I / O commands issued by the host to the abnormal member disk to the disks of other normal member disks;
[0092] The recovery storage module 24 is used to send the I / O commands stored in the disk of the normal member disk to the successfully repaired member disk after the abnormal member disk is successfully repaired.
[0093] Specifically, receiving module 21 receives I / O commands from the host; if the member disk corresponding to the I / O command malfunctions, starting repair module 22 initiates the member disk repair process; storage module 23 stores the I / O commands sent by the host to the malfunctioning member disk to the disks of other normal member disks; recovery storage module 24, after the malfunctioning member disk is successfully repaired, sends the I / O commands stored on the disks of the normal member disks to the successfully repaired member disks. During the repair process of the RAID malfunctioning member disk, the I / O commands received by the RAID card are directly cached on the hard drives of other normal member disks. The RAID card only needs to reserve some storage space during RAID setup; the RAID card can cache I / O commands in this space, and after the RAID card successfully repairs the malfunctioning member disk, the RAID card can restore the data stored in the reserved storage space to the malfunctioning member disk before the RAID was established. Reserve some storage space on the RAID member disks to store data sent by the host to the malfunctioning member disk in the event of a RAID member disk failure. During the RAID member disk repair process, the data is temporarily cached on other normal member disks to avoid data inconsistency caused by member disks being unable to receive I / O commands.
[0094] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0095] Figure 3 A structural diagram of another abnormal RAID member disk processing device provided in the embodiments of this application is shown below. Figure 3 As shown, the abnormal RAID member disk processing device includes: a memory 30 for storing computer programs;
[0096] The processor 31 is used to execute a computer program to implement the steps of the method for obtaining user operation habit information as described in the above embodiment (abnormal RAID member disk handling method).
[0097] The abnormal RAID member disk processing device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.
[0098] The processor 31 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 31 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 31 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 31 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0099] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 30 is used to store at least the following computer program 301, which, after being loaded and executed by the processor 31, is capable of implementing the relevant steps of the abnormal RAID member disk handling method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, and the storage method may be temporary or permanent storage. The operating system 302 may include Windows, Unix, Linux, etc. The data 303 may include, but is not limited to, the data involved in implementing the abnormal RAID member disk handling method.
[0100] In some embodiments, the abnormal RAID member disk processing device may further include a display screen 32, an input / output interface 33, a communication interface 34, a power supply 35, and a communication bus 36.
[0101] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the abnormal RAID member disk handling device and may include more or fewer components than shown.
[0102] The abnormal RAID member disk processing device provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: an abnormal RAID member disk processing method, including: receiving I / O commands issued by the host; if the member disk corresponding to the I / O command is abnormal, initiating a member disk repair process; storing the I / O commands issued by the host to the abnormal member disk to the disks of other normal member disks; and when the abnormal member disk is successfully repaired, sending the I / O commands stored in the disks of normal member disks to the successfully repaired member disks. This method directly caches the I / O commands received by the RAID card during the repair of abnormal RAID member disks to the hard drives of other normal member disks. The RAID card only needs to reserve some storage space during RAID setup, and the RAID card can cache the I / O commands in this space. After the RAID card successfully repairs the abnormal member disk, it can restore the data stored in the reserved storage space to the abnormal member disk before the RAID was established. This allows the RAID member disks to reserve some storage space to store data sent by the host to the RAID member disk in the event of a RAID member disk failure. During the RAID member disk failure repair process, the data is temporarily cached in other normal member disks with abnormal IDs. It can also solve the problem of data inconsistency caused by data loss when the server is powered off or the RAID card is restarted.
[0103] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above embodiment of the abnormal RAID member disk handling method.
[0104] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0105] The computer-readable storage medium provided in this embodiment stores a computer program. When the processor executes the program, it can implement the following method: a method for handling abnormal RAID member disks, including: receiving I / O commands issued by the host; if the member disk corresponding to the I / O command is abnormal, initiating a member disk repair process; storing the I / O commands issued by the host to the abnormal member disk to the disks of other normal member disks; and after the abnormal member disk is successfully repaired, sending the I / O commands stored on the disks of normal member disks to the successfully repaired member disks. This method directly caches the I / O commands received by the RAID card during the repair of abnormal RAID member disks to the hard drives of other normal member disks. The RAID card only needs to reserve some storage space during RAID setup, and the RAID card can cache the I / O commands in this space. After the RAID card successfully repairs the abnormal member disk, it can restore the data stored in the reserved storage space to the abnormal member disk before the RAID was established. This allows the RAID member disks to reserve some storage space to store data sent by the host to the RAID member disk in the event of a RAID member disk failure. During the RAID member disk failure repair process, the data is temporarily cached in other normal member disks with abnormal IDs. It can also solve the problem of data inconsistency caused by data loss when the server is powered off or the RAID card is restarted.
[0106] The above provides a detailed description of the abnormal RAID member disk processing method, apparatus, and medium provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0107] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for handling abnormal RAID member disks, characterized in that, include: Receive I / O commands from the host; If the member disk corresponding to the I / O command malfunctions, the member disk repair process is initiated. The I / O commands issued by the host to the malfunctioning member disk are stored on the disks of other normal member disks; Once the abnormal member disk is successfully repaired, the I / O commands stored in the disk of the normal member disk will be sent to the successfully repaired member disk. The step of storing the I / O commands issued by the host to the malfunctioning member disk to the disks of other normal member disks includes: According to preset rules, the backup normal member disks corresponding to the abnormal member disks are selected; wherein, 1G to 8G of storage space is allocated in each selected hard disk as storage space for the member disk with RAID abnormality; if the RAID card has a cache, the space reserved for storing the member disk with RAID abnormality should be consistent with the cache size of the RAID card; if the RAID card does not have a cache, the space reserved for storing the member disk with RAID abnormality should be 0.5% of the total space of the RAID, but the maximum cannot be greater than 8G and the minimum cannot be less than 1G; The I / O commands issued by the host to the malfunctioning member disk are stored in the disk of the normal member disk; Write the storage address of the I / O command into the storage data management list; Specifically, selecting the backup normal member disk corresponding to the abnormal member disk according to preset rules includes: Based on the sorting of the abnormal member disks, select multiple normal member disks in sequence.
2. The method for handling abnormal RAID member disks according to claim 1, characterized in that, Whether the member disk corresponding to the I / O command has encountered an anomaly includes: Send the I / O command to the corresponding member disk; If a command execution error message is received from the member disk or if a command execution message is not received from the member disk after a preset time, it is determined that the member disk corresponding to the I / O command has malfunctioned.
3. The method for handling abnormal RAID member disks according to claim 2, characterized in that, The boot member disk repair process includes: Restart the abnormal member disk; If the abnormal member disk restarts successfully, then the abnormal member disk is successfully repaired. If the abnormal member disk fails to restart, control the restart of the uplink port corresponding to the abnormal member disk; If the uplink port corresponding to the abnormal member disk restarts successfully, the abnormal member disk is successfully repaired. If the uplink port corresponding to the abnormal member disk fails to restart, the repair of the abnormal member disk will fail.
4. The method for handling abnormal RAID member disks according to claim 3, characterized in that, If the abnormal member disk repair fails, it will also include: Start the hot spare disk; Restore the abnormal data from the member disk to the hot spare disk; The I / O commands stored in the normal member disk are sent to the hot spare disk.
5. The method for handling abnormal RAID member disks according to claim 1, characterized in that, The storage data management list is stored at the starting address of the corresponding member disk.
6. An abnormal RAID member disk processing device, characterized in that, include: The receiving module is used to receive I / O commands issued by the host. The startup repair module is used to initiate the member disk repair process if the member disk corresponding to the I / O command experiences an abnormality. A storage module is used to store the I / O commands issued by the host to the abnormal member disk to the disks of other normal member disks; The recovery storage module is used to send the I / O commands stored in the disk of the normal member disk to the successfully repaired member disk after the abnormal member disk is successfully repaired. The step of storing the I / O commands issued by the host to the malfunctioning member disk to the disks of other normal member disks includes: According to preset rules, the backup normal member disks corresponding to the abnormal member disks are selected; wherein, 1G to 8G of storage space is allocated in each selected hard disk as storage space for the member disk with RAID abnormality; if the RAID card has a cache, the space reserved for storing the member disk with RAID abnormality should be consistent with the cache size of the RAID card; if the RAID card does not have a cache, the space reserved for storing the member disk with RAID abnormality should be 0.5% of the total space of the RAID, but the maximum cannot be greater than 8G and the minimum cannot be less than 1G; The I / O commands issued by the host to the malfunctioning member disk are stored in the disk of the normal member disk; Write the storage address of the I / O command into the storage data management list; Specifically, selecting the backup normal member disk corresponding to the abnormal member disk according to preset rules includes: Based on the sorting of the abnormal member disks, select multiple normal member disks in sequence.
7. An abnormal RAID member disk processing device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the abnormal RAID member disk handling method as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the abnormal RAID member disk handling method as described in any one of claims 1 to 5.