Disk array control method and device, target disk array and electronic equipment

By acquiring and switching the automatic managed state of the hard disk to the initialization state when the target input and output group in the target disk array is restarted, the problem of inability to operate when the hard disk is automatically managed state is solved, and normal operation of the hard disk is achieved.

CN120353398APending Publication Date: 2025-07-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510491215.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

When the target input and output group is restarted and the hard disk of the target slot is automatically managed in the excited state, it is impossible to operate the hard disk in the target slot after the target input and output group is restarted.

Method used

When the target input and output group in the target disk array is restarted, the hard disk automatically managed state of each slot in the target input and output group is obtained, and when the hard disk automatically managed state of the target slot is switched to the initial state.

Benefits of technology

The automatic managed state of the hard disk of the target slot read after the target input and output group is restarted is still in the excited state, so that the normal operation of the hard disk of the target slot can be achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353398A_ABST
    Figure CN120353398A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and device of a disk array, a target disk array and electronic equipment, and relates to the technical field of storage, and the control method comprises the steps that under the condition that a target input and output group in the target disk array is restarted, the hard disk automatic managed state of each slot position in the target input and output group is acquired; the target disk array comprises a plurality of input and output groups; the target input and output group is any one of the plurality of input and output groups; under the condition that the automatic management state of the hard disk of the target slot in the target input / output group is an excited state, switching the automatic management state of the hard disk of the target slot into an initialized state; the target slot position comprises at least one of the slot positions, and the technical problem that the hard disk in the target slot position cannot be operated after the target input and output group is restarted under the conditions that the target input and output group is restarted and the automatic management state of the hard disk in the target slot position in the target input and output group is an excited state is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular, to a control method, device, target disk array, and electronic device for a disk array. Background Art

[0002] In the related art, when a hard disk failure in any slot is detected and the faulty hard disk is replaced, the automatically managed state of the hard disk for that slot is switched to the excited state. At the same time, when the input / output group where the slot is located needs to be restarted due to a failure, the excited state of the slot is stored, resulting in the automatically managed state of the hard disk read after the input / output group is restarted still being the excited state, making it impossible to operate on the hard disks of each slot after the input / output group is restarted. Summary of the Invention

[0003] This application provides a control method, device, target disk array, and electronic device for a disk array, so as to at least solve the technical problem in the related art that when the target input / output group is restarted and the automatically managed state of the hard disk in the target slot of the target input / output group is the excited state, it is impossible to operate on the hard disk in the target slot after the target input / output group is restarted.

[0004] This application provides a control method for a disk array, including: when the target input / output group in the target disk array is restarted, obtaining the automatically managed state of the hard disks in each slot of the target input / output group; the target disk array includes multiple input / output groups; the target input / output group is any one of the multiple input / output groups; when the automatically managed state of the hard disk in the target slot of the target input / output group is the excited state, switching the automatically managed state of the hard disk in the target slot to the initialization state; the target slot includes at least one of each slot.

[0005] This application also provides a control device for a disk array, including: an obtaining module, configured to obtain the automatically managed state of the hard disks in each slot of the target input / output group when the target input / output group in the target disk array is restarted; the target disk array includes multiple input / output groups; the target input / output group is any one of the multiple input / output groups; a first switching module, configured to switch the automatically managed state of the hard disk in the target slot to the initialization state when the automatically managed state of the hard disk in the target slot of the target input / output group is the excited state; the target slot includes at least one of each slot.

[0006] This application also provides a target disk array, including: multiple input / output groups, and each input / output group includes at least one slot.

[0007] The present application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any one of the above disk array control methods when executing the computer program.

[0008] Through the present application, in the case where the target input / output group in the target disk array is restarted, the automatically managed state of the hard disks in each slot of the target input / output group can be obtained. In the case where the automatically managed state of the hard disk in the target slot of the target input / output group is in an activated state, the automatically managed state of the hard disk in the target slot is switched to an initialization state, so as to avoid that the automatically managed state of the hard disk in the target slot read after the target input / output group is restarted is still in an activated state, and further to realize that the automatically managed state of the hard disk in the target slot read after the target input / output group is restarted is in an initialization state, so as to operate on the hard disk in the target slot. Description of the Drawings

[0009] In order to more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0010] Figure 1 It is one of the flowcharts of a control method for a disk array provided by an embodiment of the present application;

[0011] Figure 2 It is the second flowchart of a control method for a disk array according to an embodiment of the present application;

[0012] Figure 3 It is a block diagram of a control device for a disk array according to an embodiment of the present application;

[0013] Figure 4 It is a schematic structural diagram of a target disk array according to an embodiment of the present application; Detailed Embodiments

[0014] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

[0015] It should be noted that in the description of this application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0016] To enable those skilled in the art of this technology to better understand the solution of this application, the following further details this application in conjunction with the accompanying drawings and specific embodiments.

[0017] An embodiment of this application provides a control method for a disk array. In combination with the execution flow of the control method for the disk array, the method is described in detail.

[0018] Specifically, Figure 1 is a flowchart of a control method for a disk array provided according to an embodiment of this application.

[0019] As Figure 1 shown, the control method for the disk array includes the following steps:

[0020] In step S110, when the target input / output group in the target disk array restarts, obtain the automatic management status of the hard disks in each slot of the target input / output group.

[0021] In actual execution, the target disk array may include multiple input / output groups, and the target input / output group may be any one of the multiple input / output groups.

[0022] In actual execution, each input / output group in the target disk array includes multiple slots, and each slot may correspond to inserting a hard disk.

[0023] In actual execution, each input / output group in the target disk array may include at least two nodes, and every two nodes are used to connect a hard disk.

[0024] In some embodiments, under the first target trigger condition, the target input / output group may restart.

[0025] In actual execution, the first target trigger condition may include obtaining a restart instruction for the target input / output group. When the restart instruction for the target input / output group is obtained, the target input / output group may restart.

[0026] In actual execution, the first target trigger condition may further include that the temperature is greater than the preset temperature value. When the temperature of the target input / output group is greater than the preset temperature value, the target input / output group can be restarted.

[0027] In some embodiments, hard disk automatic management (Automanage) can be performed on each slot of each input / output group. When a slot has been automatically managed by the hard disk, the hard disk automatic management status of this slot is the active state. In contrast, the hard disk automatic management status of a slot not automatically managed by the hard disk is the inactive state.

[0028] In some embodiments, based on the target event, the hard disk automatic management status of each slot in the target input / output group can be obtained.

[0029] In actual execution, when the target input / output group is restarted, the target event can be triggered to obtain the hard disk automatic management status of each slot in the target input / output group.

[0030] Step S120, when the hard disk automatic management status of the target slot in the target input / output group is the excitation state, switch the hard disk automatic management status of the target slot to the initialization state.

[0031] In actual execution, the target slot can include at least one of all slots. It can be understood that the target slot can be any one slot among all slots in the target input / output group, or any multiple slots among all slots in the target input / output group.

[0032] In some embodiments, before the target input / output group in the target disk array is restarted, under the second target trigger condition, the hard disk automatic management status of the target slot of the target input / output group becomes the active state.

[0033] In actual execution, the second target trigger condition may include that the hard disk of the target slot is switched from the offline state to the online state. It can be understood that before the target input / output group in the target disk array is restarted, when the hard disk of the target slot is switched from the offline state to the online state, the hard disk automatic management status of the target slot of the target input / output group becomes the active state.

[0034] In some embodiments, based on the target event, when the hard disk automatic management status of the target slot in the target input / output group is the excitation state, switch the hard disk automatic management status of the target slot to the initialization state.

[0035] In some embodiments, after switching the hard disk automatic management status of the target slot to the initialization state, when the hard disk of the target slot is re-plugged, the hard disk automatic management status of the target slot can be switched to the excitation state.

[0036] In some embodiments, hardware verification tests can be performed on the hard disks of each target slot. For each target slot, when the hard disk in the target slot passes the hardware verification test, the hard disk can be set as a spare hard disk.

[0037] According to the control method of the disk array provided by the embodiments of the present application, when the target input / output group in the target disk array restarts, the automatic management status of the hard disks in each slot of the target input / output group is obtained. When the automatic management status of the hard disk in the target slot in the target input / output group is in an active state, the automatic management status of the hard disk in the target slot is switched to the initialization state, so as to avoid that the automatic management status of the hard disk in the target slot read after the target input / output group restarts is still in the active state, and then realize that the automatic management status of the hard disk in the target slot read after the target input / output group restarts is in the initialization state, so as to operate on the hard disk in the target slot.

[0038] In some embodiments, after the automatic management status of the hard disk in the target slot is switched to the initialization state, for any target slot, when the hard disk in the target slot is switched from the offline state to the online state and the time in the offline state is greater than a preset threshold, the automatic management status of the hard disk in the target slot can be switched to the active state.

[0039] In actual execution, after the automatic management status of the hard disk in the target slot is switched to the initialization state, for any target slot, when the hard disk in the target slot fails and the failed hard disk is removed, it is determined that the hard disk in the target slot is in the offline state. Correspondingly, when the hard disk in the target slot is removed and a hard disk is inserted into the target slot, it is determined that the hard disk in the target slot is switched from the offline state to the online state.

[0040] In some embodiments, the hard disk in the target slot is switched from the offline state to the online state, which may include that the first hard disk in the target slot is in the offline state and after the time of the first hard disk in the offline state is greater than a preset threshold, the first hard disk is changed to the online state.

[0041] In actual execution, after the first hard disk in the first target slot is in the offline state and the time of the first hard disk in the offline state is greater than a preset threshold, the first hard disk can be reinserted into the first target slot to change the first hard disk to the online state.

[0042] In actual execution, after the first hard disk in the first target slot is in the offline state and the time of the first hard disk in the offline state is greater than a preset threshold, the first hard disk can be inserted into the second target slot to change the first hard disk to the online state, and the second target slot can be a slot belonging to the same target input / output group as the first target slot.

[0043] In some embodiments, when the hard disk in the target slot changes from the offline state to the online state, it may include that the first hard disk in the target slot is in the offline state, and after the time that the first hard disk is in the offline state is greater than a preset threshold, the second hard disk is changed to the online state.

[0044] In actual execution, the second hard disk may be a hard disk different from the first hard disk, and the second hard disk may be a hard disk that has never been inserted into the target input / output group.

[0045] In actual execution, when the first hard disk in the first target slot is in the offline state and the time that the first hard disk is in the offline state is greater than a preset threshold, the second hard disk may be inserted into the second target slot to change the second hard disk to the online state.

[0046] According to the control method of the disk array provided by the embodiments of the present application, after the automatic management state of the hard disk in the target slot is switched to the initialization state, for any target slot, when the hard disk in the target slot changes from the offline state to the online state and the time in the offline state is greater than a preset threshold, the automatic management state of the hard disk in the target slot can be switched to the excitation state, so as to obtain the automatic management state of the hard disks in each slot in the target input / output group when the target input / output group in the target disk array is restarted. When the automatic management state of the hard disk in the target slot in the target input / output group is the excitation state, the automatic management state of the hard disk in the target slot is switched to the initialization state to avoid that the automatic management state of the hard disk in the target slot read after the target input / output group is restarted is still the excitation state, and then to realize that the automatic management state of the hard disk in the target slot read after the target input / output group is restarted is the initialization state, so as to operate on the hard disk in the target slot.

[0047] In some embodiments, after the automatic management state of the hard disk in the target slot is switched to the initialization state, a hardware verification test can be performed on the current hard disk of each target slot; for any target slot, when the current hard disk in the target slot passes the hardware verification test and the identification information of the current hard disk was not stored in the configuration information of the target disk array before restarting, the information of the current hard disk is stored in the configuration information of the target disk array, and the information of the hard disk in the target slot before restarting in the configuration information is deleted.

[0048] In actual execution, the identification information of the current hard disk may include identification information such as the ID of the current hard disk and the hard disk number.

[0049] In some embodiments, after the hard disk in the target slot is switched from the offline state to the online state, or the automatically managed state of the hard disk in the target slot is switched to the initialization state, a hardware verification test can be performed on the current hard disk of each target slot.

[0050] In actual execution, the hardware verification test can include fault detection and verification checks. For example, fault detection is performed on the current hard disk of the target slot when the current hard disk of the target slot switched to the online state is not the same hard disk as the hard disk before the target slot was in the offline state. Verification checks are performed on the current hard disk of the target slot when the current hard disk of the target slot switched to the online state is the same hard disk as the hard disk before the target slot was in the offline state.

[0051] In some embodiments, for any target slot, when the current hard disk of the target slot fails the hardware verification test, the automatic management process of the hard disk for that target slot is terminated.

[0052] In actual execution, the configuration information of the target disk array can store the identification information of the hard disks in each slot of each input / output group in all the input / output groups of the target disk array.

[0053] In some embodiments, when the hard disk in the target slot is replaced with a new hard disk before the current hard disk restarts in the target input / output group, the identification information of the current hard disk was not stored in the configuration information of the target disk array before the restart.

[0054] In actual execution, for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk was not stored in the configuration information of the target disk array before the restart, the information of the hard disk in the target slot before the restart in the configuration information can be deleted, and the information of the current hard disk can be stored in the configuration information of the target disk array.

[0055] According to the disk array control method provided by the embodiments of the present application, after the automatically managed state of the hard disk in the target slot is switched to the initialization state, a hardware verification test can be performed on the current hard disk of each target slot; for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk was not stored in the configuration information of the target disk array before the restart, the information of the current hard disk is stored in the configuration information of the target disk array, and the information of the hard disk in the target slot before the restart in the configuration information is deleted, so as to update the configuration information of the target input / output group in the target disk array, facilitating the operation of the hard disks in the target input / output group.

[0056] In some embodiments, after performing a hardware verification test on the current hard disk of each target slot, for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk has been stored in the configuration information of the target disk array before restart, the information of the current hard disk is updated in the configuration information.

[0057] In some embodiments, for each target slot, when the hard disk of the target slot before restart is the same as the current hard disk of the target slot, the identification information of the current hard disk has been stored in the configuration information of the target disk array before the target input / output group restarts.

[0058] In some embodiments, for each target slot, when the hard disk of the second target slot before restart is the same as the current hard disk of the first target slot, the identification information of the current hard disk of the first target slot has been stored in the configuration information of the target disk array before the target input / output group restarts, where the first target slot and the second target slot belong to the same target input / output group.

[0059] In some embodiments, for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk has been stored in the configuration information of the target disk array before restart, the identification information of the current hard disk stored in the configuration information of the target disk array before restart can be copied and stored to the target slot corresponding to the current hard disk after restart, and the identification information of the current hard disk stored in the configuration information of the target disk array before restart is deleted to update the information of the current hard disk in the configuration information.

[0060] According to the control method of the disk array provided by the embodiments of the present application, after automatically switching the managed state of the hard disk of the target slot to the initialization state, a hardware verification test can be performed on the current hard disk of each target slot; for any target slot, after performing a hardware verification test on the current hard disk of each target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk has been stored in the configuration information of the target disk array before restart, the information of the current hard disk is updated in the configuration information to update the configuration information of the target input / output group in the target disk array, facilitating the operation of the hard disk of the target input / output group.

[0061] In some embodiments, the target attribute of the current hard disk can be set to standby so that the current hard disk can be used.

[0062] In actual execution, the target attribute can indicate whether the hard disk can be used.

[0063] In actual execution, the target attribute may include characters. For example, when the target attribute of the current hard disk is 1, it is determined that the target attribute of the current hard disk is spare, and when the target attribute of the current hard disk is 0, it is determined that the target attribute of the current hard disk is non-spare.

[0064] In some embodiments, after storing the information of the current hard disk in the configuration information of the target disk array, the current hard disk can be set as the spare hard disk of the target slot, and the current hard disk can be called to make the operation of the target disk array meet the target conditions.

[0065] According to the disk array control method provided by the embodiments of the present application, after automatically switching the managed state of the hard disk in the target slot to the initialization state, a hardware verification test can be performed on the current hard disk of each target slot; for any target slot, after performing a hardware verification test on the current hard disk of each target slot, when the current hard disk of the target slot passes the hardware verification test, the target attribute of the current hard disk can be set to spare so that the current hard disk can be used to make the operation of the target disk array meet the target conditions.

[0066] In some embodiments, after storing the information of the current hard disk in the configuration information of the target disk array and deleting the information of the hard disk in the target slot before restart in the configuration information, the target fault information can be marked as repaired; the target fault information is the fault information generated by the hard disk fault in the target slot before restart.

[0067] In actual execution, when the hard disk of the second target slot is the same as the current hard disk of the first target slot before the target input / output group restarts, the identification information of the current hard disk of the first target slot has been stored in the configuration information of the target disk array before the target input / output group restarts. After storing the information of the current hard disk of the first target slot in the configuration information of the target disk array and deleting the information of the hard disk in the second target slot before restart in the configuration information, the fault information generated by the hard disk fault in the second target slot before restart is deleted.

[0068] In actual execution, when the hard disk of the first target slot is the same as the current hard disk of the first target slot before the target input / output group restarts, the identification information of the current hard disk of the first target slot has been stored in the configuration information of the target disk array before the target input / output group restarts. The fault information generated by the hard disk fault in the first target slot before restart is deleted.

[0069] In actual execution, when the hard disks of all slots are different before the current hard disk of the first target slot and the target input / output group are restarted, the identification information of the current hard disk of the first target slot has been stored in the configuration information of the target disk array before the target input / output group is restarted. After storing the information of the current hard disk of the first target slot in the configuration information of the target disk array and deleting the information of the hard disk of the second target slot in the configuration information before restarting, the fault information generated due to the hard disk failure of the second target slot before restarting is deleted.

[0070] According to the disk array control method provided by the embodiments of the present application, when the automatic management state of the hard disk of the target slot is switched to the initialization state and the current hard disk of the target slot passes the hardware verification test, after storing the information of the current hard disk in the configuration information of the target disk array and deleting the information of the hard disk of the target slot in the configuration information before restarting, the target fault information can be marked as repaired, so that when the target disk array learns that the hard disk failure of the previous hard disk on the target slot has been repaired, the current hard disk of the target slot can be used.

[0071] In some embodiments, after storing the information of the current hard disk in the configuration information of the target disk array and deleting the information of the hard disk of the target slot in the configuration information before restarting, a first target record can be added to the system log of the target disk array; the first target record is used to indicate that the configuration of the target slot has been successfully completed.

[0072] In actual execution, the system log can be used to record the running information of the hard disks of each slot in each input / output group of the target disk array. The running information can include the running type (such as successful configuration, startup operation, pause operation, or running exception, etc.) and the running time, etc. For example, the system log can be used to record that the hard disk of the target slot runs abnormally due to a hard disk failure at 10:00 am.

[0073] In some embodiments, when the hard disk of the target slot fails before the target slot is restarted, the system log generates a fault record for the target slot. After replacing the faulty hard disk of the target slot with the current hard disk of the target slot, restarting the target input / output group, storing the information of the current hard disk in the configuration information of the target disk array, and deleting the information of the hard disk of the target slot in the configuration information before restarting, a first target record is added to the system log of the target disk array; the first target record is used to indicate that the configuration of the target slot has been successfully completed, that is, the first target record is used to indicate that the information of the previous faulty hard disk on the target slot has been reconfigured as the information of the current hard disk, and the current hard disk is different from the hard disks of all slots before the target input / output group is restarted.

[0074] According to the control method of the disk array provided by the embodiments of the present application, when the automatic management state of the hard disk in the target slot is switched to the initialization state and the current hard disk in the target slot passes the hardware verification test, after storing the information of the current hard disk in the configuration information of the target disk array and deleting the information of the hard disk in the target slot before restart in the configuration information, a first target record can be added to the system log of the target disk array to indicate that the target slot has been successfully configured, facilitating the use of the current hard disk in the target slot by the target disk array after the target slot has been successfully configured.

[0075] In some embodiments, after updating the information of the current hard disk in the configuration information, a second target record can be added to the system log of the target disk array; the second target record is used to indicate that the target slot has been successfully reconfigured.

[0076] In actual execution, when the hard disk in the target slot fails before the target input / output group restarts, the system log generates a fault record for the target slot. After setting the faulty hard disk in the target slot to the offline state and, after repairing the faulty hard disk, reinserting the repaired hard disk into the target slot so that the repaired hard disk is in the online state, a second target record can be added to the system log of the target disk array, and the second record can be used to indicate that the fault record for the target slot has been repaired.

[0077] In actual execution, when the hard disk in the first target slot fails before the target input / output group restarts, the system log generates a fault record for the first target slot. After setting the faulty hard disk in the first target slot to the offline state and, after repairing the faulty hard disk, inserting the repaired hard disk into the second target slot, the second target slot can be in the same target input / output group as the first target slot, or the second target slot can be in the same target disk array as the first target slot but not in the same input / output group. A second target record can be added to the system log of the target disk array, and the second record can be used to indicate that the information of the hard disk has been configured in the second target slot.

[0078] According to the control method of the disk array provided by the embodiments of the present application, when the automatic management state of the hard disk in the target slot is switched to the initialization state and the current hard disk in the target slot passes the hardware verification test, after updating the information of the current hard disk in the configuration information, a second target record can be added to the system log of the target disk array to indicate that the information of the hard disk has been successfully configured in the target slot, facilitating the use of the current hard disk in the target slot by the target disk array after the information of the hard disk has been successfully configured in the target slot.

[0079] To better understand the control method of the disk array provided by the embodiments of the present application, further explanations are provided below. It should be understood that the following discussions are merely exemplary.

[0080] The present application provides a control method for a disk array. The specific steps can be as Figure 2 shown:

[0081] Step S210, when the target input / output group in the target disk array restarts, obtain the automatic management status of the hard disks in each slot of the target input / output group.

[0082] In actual execution, the target disk array may include multiple input / output groups, and the target input / output group can be any one of the multiple input / output groups.

[0083] In actual execution, each input / output group in the target disk array includes multiple slots, and each slot can correspond to inserting a hard disk.

[0084] In some embodiments, under the first target trigger condition, the target input / output group can restart.

[0085] In actual execution, the first target trigger condition may include obtaining a restart instruction for the target input / output group. When the restart instruction for the target input / output group is obtained, the target input / output group can restart.

[0086] In actual execution, the first target trigger condition may further include that the temperature is greater than the temperature preset value. When the temperature of the target input / output group is greater than the temperature preset value, the target input / output group can restart.

[0087] In some embodiments, hard disk automatic management (Automanage) can be performed on each slot of each input / output group. When a slot has been automatically managed for the hard disk, the automatic management status of the hard disk in that slot is the active state. In contrast, the automatic management status of the hard disk in a slot that has not been automatically managed for the hard disk is the non-active state.

[0088] In some embodiments, based on the target event, obtain the automatic management status of the hard disks in each slot of the target input / output group.

[0089] In actual execution, when the target input / output group restarts, trigger the target event to obtain the automatic management status of the hard disks in each slot of the target input / output group.

[0090] In some embodiments, when the automatic management status of the hard disks in each slot of the target input / output group in the target disk array is in the active state, the target input / output group can broadcast the active state to all input / output groups in the target disk array based on the target communication protocol, so as to keep the data in the target disk array consistent.

[0091] Step S220, when the automatic management status of the hard disk in the target slot of the target input / output group is in the excited state, switch the automatic management status of the hard disk in the target slot to the initialization state.

[0092] In some embodiments, based on the target event, when the automatic management status of the hard disk in the target slot of the target input / output group is in the excited state, the automatic management status of the hard disk in the target slot can be switched to the initialization state.

[0093] In some embodiments, based on the pend event, when the automatic management status of the hard disk in the target slot of the target input / output group is in the excited state, the automatic management status of the hard disk in the target slot can be switched to the initialization state.

[0094] In some embodiments, after switching the automatic management status of the hard disk in the target slot to the initialization state, for any target slot, when the hard disk in the target slot is switched from the offline state to the online state and the time in the offline state is greater than the preset threshold, the automatic management status of the hard disk in the target slot can be switched to the excited state.

[0095] In actual execution, after switching the automatic management status of the hard disk in the target slot to the initialization state, for any target slot, when the hard disk in the target slot fails and the failed hard disk is removed, it is determined that the hard disk in the target slot is in the offline state. Correspondingly, when the hard disk in the target slot is removed and a hard disk is inserted into the target slot, it is determined that the hard disk in the target slot is switched from the offline state to the online state.

[0096] In some embodiments, the hard disk in the target slot is switched from the offline state to the online state, which may include that the first hard disk in the target slot is in the offline state, and after the time of the first hard disk in the offline state is greater than the preset threshold, the first hard disk is changed to the online state.

[0097] In actual execution, after the first hard disk in the first target slot is in the offline state and the time of the first hard disk in the offline state is greater than the preset threshold, the first hard disk can be reinserted into the first target slot to change the first hard disk to the online state.

[0098] In actual execution, after the first hard disk in the first target slot is in the offline state and the time when the first hard disk is in the offline state is greater than a preset threshold, the first hard disk can be inserted into the second target slot to change the first hard disk to the online state, and the second target slot can be a slot belonging to the same target input / output group as the first target slot.

[0099] In some embodiments, for the hard disk in the target slot to switch from the offline state to the online state, it may include that the first hard disk in the target slot is in the offline state and after the time when the first hard disk is in the offline state is greater than a preset threshold, changing the second hard disk to the online state.

[0100] In actual execution, the second hard disk can be a hard disk different from the first hard disk, and the second hard disk can be a hard disk that has never been inserted into the target input / output group.

[0101] In actual execution, after the first hard disk in the first target slot is in the offline state and the time when the first hard disk is in the offline state is greater than a preset threshold, the second hard disk can be inserted into the second target slot to change the second hard disk to the online state.

[0102] Step S230, perform a hardware verification test on the current hard disk of each target slot.

[0103] Step S240, for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk was not stored in the configuration information of the target disk array before restart, store the information of the current hard disk in the configuration information of the target disk array, and delete the information of the hard disk in the target slot before restart in the configuration information.

[0104] In actual execution, the identification information of the current hard disk can include identification information such as the ID of the current hard disk and the hard disk number.

[0105] In some embodiments, after the hard disk in the target slot switches from the offline state to the online state, or after the automatically managed state of the hard disk in the target slot switches to the initialization state, a hardware verification test can be performed on the current hard disk of each target slot.

[0106] In actual execution, the hardware verification test can include fault detection and verification checks. For example, when the current hard disk that switches to the online state in the target slot is not the same hard disk as the hard disk before the target slot was in the offline state, perform fault detection on the current hard disk of the target slot. When the current hard disk that switches to the online state in the target slot is the same hard disk as the hard disk before the target slot was in the offline state, perform a verification check on the current hard disk of the target slot.

[0107] In some embodiments, for any target slot, when the current hard disk of the target slot fails the hardware verification test, the automatic management process of the hard disk for the target slot is terminated.

[0108] In actual execution, the configuration information of the target disk array may store the identification information of the hard disks of each slot in each input / output group of all the input / output groups of the target disk array.

[0109] In some embodiments, when the current hard disk is the hard disk that replaces the hard disk of the target slot before the restart of the target input / output group, the identification information of the current hard disk is not stored in the configuration information of the target disk array before the restart.

[0110] In actual execution, for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk is not stored in the configuration information of the target disk array before the restart, the information of the hard disk in the target slot before the restart in the configuration information can be deleted, and the information of the current hard disk can be stored in the configuration information of the target disk array.

[0111] In some embodiments, after storing the information of the current hard disk in the configuration information of the target disk array and deleting the information of the hard disk in the target slot before the restart in the configuration information, the target fault information can be marked as repaired; the target fault information is the fault information generated by the hard disk fault in the target slot before the restart.

[0112] In actual execution, when the current hard disk of the first target slot is the same hard disk as the hard disk of the second target slot before the restart of the target input / output group, the identification information of the current hard disk of the first target slot is stored in the configuration information of the target disk array before the restart of the target input / output group. After storing the information of the current hard disk of the first target slot in the configuration information of the target disk array and deleting the information of the hard disk in the second target slot before the restart in the configuration information, the fault information generated by the hard disk fault in the second target slot before the restart is deleted.

[0113] In actual execution, when the current hard disk of the first target slot is the same hard disk as the hard disk of the first target slot before the restart of the target input / output group, the identification information of the current hard disk of the first target slot is stored in the configuration information of the target disk array before the restart of the target input / output group. The fault information generated by the hard disk fault in the first target slot before the restart is deleted.

[0114] In actual execution, when the hard disks of all slots are different before the current hard disk of the first target slot and the target input / output group are restarted, the identification information of the current hard disk of the first target slot has been stored in the configuration information of the target disk array before the target input / output group is restarted. After storing the information of the current hard disk of the first target slot in the configuration information of the target disk array and deleting the information of the hard disk of the second target slot in the configuration information before restarting, the fault information generated by the hard disk failure of the second target slot before restarting is deleted.

[0115] Step S250, add a first target record to the system log of the target disk array; the first target record is used to indicate that the target slot has been successfully configured.

[0116] In actual execution, the system log can be used to record the running information of the hard disks of each slot in each input / output group of the target disk array. The running information can include the running type (such as successful configuration, start running, pause running, or running abnormally, etc.) and the running time, etc. For example, the system log can be used to record that the hard disk of the target slot runs abnormally due to a hard disk failure at 10:00 am.

[0117] In some embodiments, when the hard disk of the target slot fails before the target slot is restarted, the system log generates a fault record for the target slot. After replacing the faulty hard disk of the target slot with the current hard disk of the target slot, restarting the target input / output group, storing the information of the current hard disk in the configuration information of the target disk array, and deleting the information of the hard disk of the target slot in the configuration information before restarting, a first target record is added to the system log of the target disk array; the first target record is used to indicate that the target slot has been successfully configured, that is, the first target record is used to indicate that the information of the previous faulty hard disk on the target slot has been reconfigured to the information of the current hard disk, and the current hard disk is different from the hard disks of all slots before the target input / output group is restarted.

[0118] Step S260, for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk has been stored in the configuration information of the target disk array before restarting, update the information of the current hard disk in the configuration information

[0119] In some embodiments, for each target slot, when the hard disk of the target slot before the current hard disk of the target slot and the target input / output group are restarted is the same hard disk, the identification information of the current hard disk has been stored in the configuration information of the target disk array before the target input / output group is restarted.

[0120] In some embodiments, for each target slot, when the hard disk of the second target slot is the same hard disk before the current hard disk of the first target slot and the target input / output group are restarted, the identification information of the current hard disk of the first target slot has been stored in the configuration information of the target disk array before the target input / output group is restarted, where the first target slot and the second target slot belong to the same target input / output group.

[0121] In some embodiments, for any target slot, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk has been stored in the configuration information of the target disk array before restarting, the identification information of the current hard disk stored in the configuration information of the target disk array before restarting can be copied and stored to the target slot corresponding to the current hard disk after restarting, and the identification information of the current hard disk stored before restarting in the configuration information of the target disk array can be deleted to update the information of the current hard disk in the configuration information.

[0122] Step S270, add a second target record to the system log of the target disk array; the second target record is used to indicate that the target slot has been successfully reconfigured

[0123] In actual execution, before the target input / output group is restarted, when the hard disk of the target slot fails, the system log generates a failure record for the target slot. After setting the failed hard disk of the target slot to the offline state and repairing the failed hard disk, inserting the repaired hard disk back into the target slot to make the repaired hard disk in the online state, a second target record can be added to the system log of the target disk array, and the second record can be used to indicate that the failure record for the target slot has been repaired.

[0124] In actual execution, before the target input / output group is restarted, when the hard disk of the first target slot fails, the system log generates a failure record for the first target slot. After setting the failed hard disk of the first target slot to the offline state and repairing the failed hard disk, inserting the repaired hard disk into the second target slot. The second target slot can be in the same target input / output group as the first target slot, or the second target slot can be in the same target disk array as the first target slot but not in the same input / output group. A second target record can be added to the system log of the target disk array, and the second record can be used to indicate that the information of this hard disk has been configured in the second target slot.

[0125] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0126] An embodiment of the present application further provides a control device for a disk array.

[0127] Figure 3 It is a block diagram of the control device for the disk array provided according to the embodiment of the present application.

[0128] As Figure 3 shown, the control device 300 of the disk array includes: an acquisition module 310 and a first switching module 320.

[0129] Among them, the acquisition module 310 is used to obtain the automatic management status of the hard disks in each slot in the target input / output group when the target input / output group in the target disk array restarts; the target disk array includes multiple input / output groups; the target input / output group is any one of the multiple input / output groups.

[0130] The first switching module 320 is used to switch the automatic management status of the hard disk in the target slot to the initialization status when the automatic management status of the hard disk in the target slot in the target input / output group is in the excitation state; the target slot includes at least one of each slot.

[0131] According to the control device of the disk array provided by the embodiment of the present application, when the target input / output group in the target disk array restarts, the automatic management status of the hard disks in each slot in the target input / output group is obtained. When the automatic management status of the hard disk in the target slot in the target input / output group is in the excitation state, the automatic management status of the hard disk in the target slot is switched to the initialization status, so as to avoid that the automatic management status of the hard disk in the target slot read after the target input / output group restarts is still in the excitation state, and then to realize that the automatic management status of the hard disk in the target slot read after the target input / output group restarts is in the initialization status, so as to operate on the hard disk in the target slot.

[0132] In some embodiments, the control device 300 of the disk array further includes a second switching module, which is used to switch the automatic management status of the hard disk in any target slot to the excitation state when the hard disk in the target slot changes from the offline state to the online state and the time in the offline state is greater than a preset threshold.

[0133] In some embodiments, the control device 300 of the disk array further includes:

[0134] a test module, which is used to perform a hardware verification test on the current hard disk in each target slot;

[0135] A storage module is configured to, for any target slot, store the information of the current hard disk in the configuration information of the target disk array and delete the information of the hard disk in the target slot before reboot, when the current hard disk in the target slot passes the hardware verification test and the identification information of the current hard disk is not stored in the configuration information of the target disk array before reboot.

[0136] In some embodiments, the control device 300 of the disk array further includes an update module, which is configured to, for any target slot, update the information of the current hard disk in the configuration information when the current hard disk in the target slot passes the hardware verification test and the identification information of the current hard disk is stored in the configuration information of the target disk array before reboot.

[0137] In some embodiments, the storage module can be configured to set the target attribute of the current hard disk to standby so that the current hard disk can be used.

[0138] In some embodiments, the control device 300 of the disk array further includes a marking module, which is configured to mark the target fault information as repaired; the target fault information is the fault information generated by the hard disk fault in the target slot before reboot.

[0139] In some embodiments, the control device 300 of the disk array further includes a log module, which is configured to add a first target record to the system log of the target disk array; the first target record is used to indicate that the configuration of the target slot has been successfully completed.

[0140] In some embodiments, the log module can also be configured to add a second target record to the system log of the target disk array; the second target record is used to indicate that the re-configuration of the second target slot has been successfully completed.

[0141] For the description of the features in the embodiments corresponding to the control device 300 of the disk array, reference can be made to the relevant description in the embodiments corresponding to the control method of the disk array, which will not be elaborated here one by one.

[0142] The embodiments of the present application further provide a target disk array.

[0143] Figure 4 It is a schematic structural diagram of the target disk array provided according to the embodiments of the present application.

[0144] As Figure 4 shown, the target disk array 400 includes a plurality of input / output groups 4i0 (i is a positive integer greater than 1), and each input / output group 4i0 includes at least one slot 4iq (q is a positive integer greater than 1).

[0145] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-described embodiments of the control method for a disk array.

[0146] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above-described embodiments of the control method for a disk array when running.

[0147] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disc that can store a computer program.

[0148] An embodiment of the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described embodiments of the control method for a disk array.

[0149] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described embodiments of the control method for a disk array.

[0150] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.

[0151] The above has introduced in detail a control method and program product for a disk array provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A control method for a disk array, characterized in that, Including the following steps: When the target input / output group in the target disk array restarts, obtain the automatic management status of the hard disks in each slot of the target input / output group; The target disk array includes multiple input / output groups; the target input / output group is any one of the multiple input / output groups; When the automatic management status of the hard disk in the target slot of the target input / output group is in an activated state, switch the automatic management status of the hard disk in the target slot to the initialization state; the target slot includes at least one of the various slots.

2. The control method of the disk array according to claim 1, characterized in that After switching the automatic management status of the hard disk in the target slot to the initialization state, the method further includes: For any one of the target slots, when the hard disk in the target slot switches from the offline state to the online state and the time in the offline state is greater than a preset threshold, switch the automatic management status of the hard disk in the target slot to the activated state.

3. The control method of the disk array according to claim 1 or 2, characterized in that, After switching the automatic management status of the hard disk in the target slot to the initialization state, the method further includes: Perform a hardware verification test on the current hard disk of each target slot; For any one of the target slots, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk was not stored in the configuration information of the target disk array before restart, store the information of the current hard disk in the configuration information of the target disk array and delete the information of the hard disk in the target slot before restart in the configuration information.

4. The control method of the disk array according to claim 3, characterized in that, After performing the hardware verification test on the current hard disk of each target slot, the method further includes: For any one of the target slots, when the current hard disk of the target slot passes the hardware verification test and the identification information of the current hard disk was stored in the configuration information of the target disk array before restart, update the information of the current hard disk in the configuration information.

5. The control method of the disk array according to claim 3, wherein When storing the information of the current hard disk in the configuration information of the target disk array, it includes: Set the target attribute of the current hard disk to standby so that the current hard disk can be used.

6. The control method of the disk array according to claim 3, wherein After storing the information of the current hard disk in the configuration information of the target disk array and deleting the information of the hard disk in the target slot before restart in the configuration information, the method further includes: Mark the target fault information as repaired; the target fault information is the fault information generated by the hard disk fault in the target slot before restart.

7. The control method of the disk array according to claim 3, characterized in that, After storing the information of the current hard disk in the configuration information of the target disk array and deleting the information of the hard disk in the target slot before restart in the configuration information, the method further includes: Add a first target record to the system log of the target disk array; the first target record is used to indicate that the configuration of the target slot has been successfully completed.

8. The control method of the disk array according to claim 4, characterized in that, After updating the information of the current hard disk in the configuration information, the method further includes: Add a second target record to the system log of the target disk array; the second target record is used to indicate that the target slot has been successfully reconfigured.

9. A control device for a disk array, characterized in that Comprising: An acquisition module, configured to acquire the automatic management status of the hard disks in each slot in the target input / output group when the target input / output group in the target disk array restarts; The target disk array includes a plurality of input / output groups; the target input / output group is any one of the plurality of input / output groups; A first switching module, configured to switch the automatic management status of the hard disk in the target slot to the initialization status when the automatic management status of the hard disk in the target slot in the target input / output group is in the activated state; the target slot includes at least one of the respective slots.

10. A target disk array, characterized in that, It includes a plurality of input / output groups, and each input / output group includes at least one slot.

11. An electronic device, characterized in that, Comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the steps of the control method of the disk array according to any one of claims 1-8.