Method for managing hard disks, and computer device and storage medium
By receiving asynchronous event data from NVMe hard drives, the system controls the hard drives to be in read-only or non-writable state, and determines whether to remove the hard drives from the independent disk redundant array based on the event data. This solves the data storage error problem caused by NVMe hard drive errors and improves the reliability of the system.
Patent Information
- Application Number
- PCT/CN2025/097512
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-08
- Filing Date
- 2025-05-27
- Publication Date
- 2026-02-12
AI Technical Summary
When an NVMe hard drive fails, the database continues to use the faulty drive for data writing operations, leading to data storage errors and reduced system reliability.
It receives asynchronous event data from NVMe hard drives, controls the hard drives to be read-only or non-writable, and determines whether to remove the hard drive from the independent disk redundant array and switch to other hard drives for database use based on the event data.
It avoids data storage errors during hard drive failures, improves the reliability of the data storage system, and prevents data loss caused by prolonged restarts.
Smart Images

Figure CN2025097512_12022026_PF_FP_ABST
Abstract
Description
Method for managing hard disk, computer device and storage medium
[0001] Cross-reference to related applications
[0002] The present application claims priority from the Chinese patent application No. 202411083805.7 filed on August 08, 2024, and entitled "Method for managing hard disk, computer device and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to a method for managing hard disk, a computer device and a storage medium. BACKGROUND
[0004] At present, data storage systems with databases and non-volatile memory host controller interface (NVME) hard disks provided for the databases are widely used. In the working process of the data storage system with the NVME hard disks and the databases, sometimes, the NVME hard disks provided for the databases will have errors.
[0005] In the related art, when the NVME hard disks provided for the databases have errors, the NVME hard disks provided for the databases with errors are restarted. However, during the restart of the NVME hard disks with errors, the databases can still use the NVME hard disks provided for the databases with errors to complete database operations. If the databases use the NVME hard disks provided for the databases with errors to complete data write operations during the restart of the NVME hard disks, data will be written to the NVME hard disks provided for the databases with errors, resulting in data storage errors. The NVME hard disks with errors are restarted for a long time, and a large number of data storage errors can occur. The reliability of the data storage system with the databases and the NVME hard disks provided for the databases is reduced. How to improve the reliability of the data storage system with the databases and the NVME hard disks provided for the databases becomes a problem to be solved. SUMMARY
[0006] According to the embodiments disclosed in the present application, the present application provides a method for managing hard disk, comprising:
[0007] receive asynchronous event data of a target asynchronous event related to a target non-volatile memory host controller interface hard disk, the asynchronous event data of the target asynchronous event comprising: an asynchronous event type of the target asynchronous event, asynchronous event information of the target asynchronous event, wherein the asynchronous event data of the target asynchronous event is sent by a module for reporting non-volatile memory host controller interface hard disk asynchronous events in a case where a non-volatile memory host controller interface hard disk asynchronous event reporting function is enabled, and the target non-volatile memory host controller interface hard disk belongs to a target redundant array of independent disks;
[0008] control the target non-volatile memory host controller interface hard disk to be in a read-only state or a non-writable state;
[0009] determine, according to the asynchronous event data of the target asynchronous event, whether the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks;
[0010] when it is determined that the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks, delete the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks, and switch the non-volatile memory host controller interface hard disk provided to the target database from the target non-volatile memory host controller interface hard disk to another non-volatile memory host controller interface hard disk in the target redundant array of independent disks, the other non-volatile memory host controller interface hard disk being a non-volatile memory host controller interface hard disk in the target redundant array of independent disks other than the target non-volatile memory host controller interface hard disk.
[0011] In a second aspect, the present application provides a device for managing a hard disk, the device for managing a hard disk comprising:
[0012] a receiving unit configured to receive asynchronous event data of a target asynchronous event related to a target non-volatile memory host controller interface hard disk, the asynchronous event data of the target asynchronous event comprising: an asynchronous event type of the target asynchronous event, asynchronous event information of the target asynchronous event, wherein the asynchronous event data of the target asynchronous event is sent by a module for reporting non-volatile memory host controller interface hard disk asynchronous events in a case where a non-volatile memory host controller interface hard disk asynchronous event reporting function is enabled, and the target non-volatile memory host controller interface hard disk belongs to a target redundant array of independent disks;
[0013] a control unit configured to control the target non-volatile memory host controller interface hard disk to be in a read-only state or a non-writable state;
[0014] The determining unit is configured to determine whether the target non-volatile memory host controller interface hard disk needs to be removed from the target redundant array of independent disks according to the asynchronous event data of the target asynchronous event.
[0015] The deleting and switching unit is configured to delete the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks and switch the NVME hard disk provided for the target database from the target non-volatile memory host controller interface hard disk to other non-volatile memory host controller interface hard disks in the target redundant array of independent disks when it is determined that the target non-volatile memory host controller interface hard disk needs to be removed from the target redundant array of independent disks, the other non-volatile memory host controller interface hard disks being non-volatile memory host controller interface hard disks in the target redundant array of independent disks except the target non-volatile memory host controller interface hard disk.
[0016] In a third aspect, the present application provides a computer device, comprising a memory and a processor, the memory and the processor being communicatively connected with each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method of the first aspect or any of the corresponding implementation manners thereof.
[0017] In a fourth aspect, the present application provides a non-volatile computer readable storage medium, the non-volatile computer readable storage medium storing computer instructions, the computer instructions being used to make a computer execute the method of the first aspect or any of the corresponding implementation manners thereof.
[0018] In a fifth aspect, the present application provides a computer program product, comprising computer instructions, the computer instructions being used to make a computer execute the method of the first aspect or any of the corresponding implementation manners thereof.
[0019] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features and advantages of the present application will become apparent from the description, the drawings, and the claims. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0021] FIG. 1 is a schematic diagram of an example of an NVME hard disk constituting a redundant array of independent disks involved in the method for managing hard disks provided by the embodiments of the present application;
[0022] FIG. 2 is a flow diagram of a method for managing a hard disk according to an embodiment of the present application;
[0023] FIG. 3 is a flow diagram of another method for managing a hard disk according to an embodiment of the present application;
[0024] FIG. 4 is a flow diagram of an example of managing a hard disk according to an embodiment of the present application;
[0025] FIG. 5 is a block diagram of an apparatus for managing a hard disk according to an embodiment of the present application;
[0026] FIG. 6 is a block diagram of a computer device according to an embodiment of the present application;
[0027] FIG. 7 is a block diagram of a non-volatile computer-readable storage medium according to an embodiment of the present application;
[0028] FIG. 8 is a block diagram of a computer program product according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0030] It should be noted that the method for managing a hard disk provided by the embodiments of the present application involves NVME hard disks that can form a redundant array of independent disks (RAID). The method for managing a hard disk provided by the embodiments of the present application involves NVME hard disks that can work in a RAID mode.
[0031] In some embodiments, the method for managing a hard disk provided by the embodiments of the present application involves NVME hard disks that can form a redundant array of independent disks (RAID). The method for managing a hard disk provided by the embodiments of the present application involves NVME hard disks that can work in a RAID mode.
[0032] Referring to FIG. 1, an example of NVME hard disks forming a redundant array of independent disks according to the method for managing a hard disk provided by the embodiments of the present application is shown.
[0033] Figure 1 shows NVME hard disk 0, NVME hard disk 1, NVME hard disk 2, NVME hard disk 3, NVME hard disk 4, NVME hard disk 5, NVME hard disk 6, NVME hard disk 7 in a storage system to which the method for managing hard disks provided in the embodiments of the present application is applied. The NVME hard disk 0, the NVME hard disk 1, the NVME hard disk 2, the NVME hard disk 3, the NVME hard disk 4, the NVME hard disk 5, the NVME hard disk 6, and the NVME hard disk 7 are on a target server. The central processing unit (CPU) 0 of the target server can communicate with the CPU 1 of the target server through a Cache Coherent Interconnect for Accelerators (CCIX) protocol or an Ultra Path Interconnect (UPI) protocol. The CPU 0 of the target server is connected to a RAID card 0 on the target server through a Peripheral Component Interconnect express (PCIe) bus, and the CPU 1 of the target server is connected to a RAID card 1 on the target server through a PCIe bus. The RAID card 0 on the target server is connected to the NVME hard disk 0 through a peripheral component interconnect slot (PCI SLOT) 0, the RAID card 0 on the target server is connected to the NVME hard disk 1 through a PCI SLOT 1, the RAID card 0 on the target server is connected to the NVME hard disk 2 through a PCI SLOT 2, and the RAID card 0 on the target server is connected to the NVME hard disk 3 through a PCI SLOT 3. The RAID card 1 on the target server is connected to the NVME hard disk 4 through a PCI SLOT 4, the RAID card 1 on the target server is connected to the NVME hard disk 5 through a PCI SLOT 5, the RAID card 1 on the target server is connected to the NVME hard disk 6 through a PCI SLOT 6, and the RAID card 1 on the target server is connected to the NVME hard disk 7 through a PCI SLOT 3. The NVME hard disk 0, the NVME hard disk 1, the NVME hard disk 2, and the NVME hard disk 3 can form a RAID 10, for example, a software RAID 10, and the NVME hard disk 0, the NVME hard disk 1, the NVME hard disk 2, and the NVME hard disk 3 work in a RAID 10 mode. The NVME hard disk 4, the NVME hard disk 5, the NVME hard disk 6, and the NVME hard disk 7 can form another RAID 10, for example, a software RAID 10, and the NVME hard disk 4, the NVME hard disk 5, the NVME hard disk 6, and the NVME hard disk 7 work in a RAID 10 mode.
[0034] Referring to Figure 2, a flowchart of the method for managing hard disks provided in the embodiments of the present application is shown.
[0035] At step S201, asynchronous event data of a target asynchronous event related to a target NVME hard disk is received.
[0036] The target NVME hard disk can be any NVME hard disk. The target NVME hard disk can be on a target server.
[0037] In the embodiments of the present application, the target asynchronous event related to the target NVME hard disk can be any asynchronous event related to the target NVME hard disk.
[0038] The asynchronous event data of the target asynchronous event includes: an asynchronous event type of the target asynchronous event, asynchronous event information of the target asynchronous event. The asynchronous event information of the target asynchronous event is used to describe the target asynchronous event.
[0039] In some embodiments, the asynchronous event type of the target asynchronous event is an error event type.
[0040] The target asynchronous event is an error event.
[0041] In another embodiment, the asynchronous event type of the target asynchronous event is a SMART event type. The target asynchronous event is a SMART event.
[0042] In yet another embodiment, the target asynchronous event is a health status event. The asynchronous event information of the target asynchronous event is health information.
[0043] It should be noted that the error event type, the SMART event type, the health status event type and other asynchronous event types in the above examples are asynchronous event types agreed by the NVME protocol. The target asynchronous event related to the target NVME hard disk can also be a user-defined asynchronous event. The user can define the asynchronous event type through the Vendor specific type.
[0044] The asynchronous event data of the target asynchronous event related to the target NVME hard disk is sent by a module for reporting NVME hard disk asynchronous events in the case that the NVME hard disk asynchronous event reporting function is enabled.
[0045] In the embodiments of the present application, the target NVME hard disk belongs to a target redundant array of independent disks.
[0046] In the embodiments of the present application, the target server can be any server to which the method for managing hard disks provided by the embodiments of the present application is applied.
[0047] The target RAID can be a redundant array of independent disks composed of a plurality of NVME hard disks on the target server, or a redundant array of independent disks composed of a plurality of NVME hard disks that are external to the target server and communicatively connected to the target server.
[0048] The module for reporting NVME hard disk asynchronous events and the module for executing the method for managing hard disks provided by the embodiments of the present application can be implemented based on a software program and run on the target server.
[0049] In the embodiments of the present application, the NVME hard disk firmware for managing the functions of the NVME hard disk on the target server can report the error events related to the target NVME hard disk, the SMART events related to the target NVME hard disk, the custom asynchronous events related to the target NVME hard disk, and other asynchronous events related to the target NVME hard disk when the NVME hard disk asynchronous event reporting function is enabled. The NVME hard disk firmware for managing the functions of the NVME hard disk is a unit inherent in the storage system of the NVME hard disk provided to the database, and does not need to develop a new module to report the asynchronous events related to the target NVME hard disk, thereby improving the convenience of reporting the asynchronous events related to the target NVME hard disk.
[0050] In step S202, the target NVME hard disk is controlled to be in a read-only state or a non-writable state.
[0051] The target NVME hard disk is controlled to be in a read-only state or a non-writable state, so that data storage errors can be avoided when the target NVME hard disk fails to write data to the target NVME hard disk.
[0052] In step S202, the write request to the target NVME hard disk can not be sent to the hard disk controller of the target NVME hard disk or the hard disk controller of the target NVME hard disk can be prohibited from processing the write request to the target NVME hard disk. By controlling the target NVME hard disk to be in a read-only state or a non-writable state, the target NVME hard disk can be temporarily unable to write data. Thus, data storage errors can be prevented when the target NVME hard disk fails to write data to the target NVME hard disk.
[0053] In step S203, whether the target NVME hard disk needs to be deleted from the target RAID is determined according to the asynchronous event data of the target asynchronous event related to the target NVME hard disk.
[0054] The asynchronous event type of the target asynchronous event related to the target NVME hard disk and the asynchronous event information of the target asynchronous event related to the target NVME hard disk can be parsed from the asynchronous event data of the target asynchronous event related to the target NVME hard disk.
[0055] In one or more possible implementation manners, a plurality of asynchronous event types indicating that the target NVME hard disk needs to be deleted from the target independent disk redundancy array can be preset, and the plurality of asynchronous event types indicating that the target NVME hard disk needs to be deleted from the target independent disk redundancy array can include an error event type agreed by the NVME protocol and a user-defined error event type. In step S203, it can be judged whether the asynchronous event type of the target asynchronous event related to the target NVME hard disk is one of the preset asynchronous event types indicating that the target NVME hard disk needs to be deleted from the target independent disk redundancy array. If the asynchronous event type of the target asynchronous event related to the target NVME hard disk is one of the preset asynchronous event types indicating that the target NVME hard disk needs to be deleted from the target independent disk redundancy array, it can be determined that the target NVME hard disk needs to be deleted from the target independent disk redundancy array. If the asynchronous event type of the target asynchronous event related to the target NVME hard disk is not one of the preset asynchronous event types indicating that the target NVME hard disk needs to be deleted from the target independent disk redundancy array, it can be determined that the target NVME hard disk does not need to be deleted from the target independent disk redundancy array.
[0056] In another or more possible implementation manners, a plurality of asynchronous event types indicating that the target NVME hard disk needs to be deleted from the target RAID can be preset, and a plurality of asynchronous event types indicating that the target NVME hard disk can need to be deleted from the target RAID, for example, device state types, can be preset. If the asynchronous event type of the target asynchronous event is not one of the preset asynchronous event types indicating that the target NVME hard disk needs to be deleted from the target RAID, but the asynchronous event type of the target asynchronous event is one of the asynchronous event types indicating that the target NVME hard disk can need to be deleted from the target RAID, it can be determined whether the asynchronous event information of the target asynchronous event related to the target NVME hard disk satisfies a preset failure condition corresponding to the asynchronous event type indicating that the target NVME hard disk can need to be deleted from the target RAID. If the asynchronous event information of the target asynchronous event related to the target NVME hard disk satisfies the preset failure condition, it can be determined that the target NVME hard disk needs to be deleted from the target RAID. In some embodiments, the preset failure condition can include at least one of the following: an information item in the asynchronous event information of the target asynchronous event related to the target NVME hard disk is greater than a threshold corresponding to the preset failure condition, or the information item in the asynchronous event information of the target asynchronous event related to the target NVME hard disk is less than or equal to the threshold corresponding to the preset failure condition.
[0057] In step S204, when it is determined that the target NVME hard disk needs to be deleted from the target RAID, the target NVME hard disk is deleted from the target RAID, and the NVME hard disk provided to the target database is switched from the target NVME hard disk to another NVME hard disk in the target RAID.
[0058] In some embodiments, the target database is a TDSQL database.
[0059] When it is determined that the target NVME hard disk needs to be deleted from the target RAID, the target NVME hard disk can be deleted from the target RAID, which can include: when it is determined that the target NVME hard disk needs to be deleted from the target RAID, the target NVME hard disk is deleted from the target RAID.
[0060] It should be noted that deleting the target NVME hard disk from the target RAID can be referred to as kicking the target NVME hard disk.
[0061] The other NVME hard disk in the target RAID is an NVME hard disk in the target RAID other than the target NVME hard disk.
[0062] It should be noted that the other NVME hard disks in the target independent disk redundant array can be regarded as NVME hard disks that do not have faults at present.
[0063] When it is determined that the target NVME hard disk needs to be deleted from the target independent disk redundant array, the NVME hard disk provided for the target database is switched from the target NVME hard disk to the other NVME hard disk in the target independent disk redundant array. Thus, the NVME hard disk provided for the target database is changed from the target NVME hard disk to the other NVME hard disk in the target independent disk redundant array.
[0064] The NVME hard disk provided for the target database is switched from the target NVME hard disk to the other NVME hard disk in the target independent disk redundant array, so that the target database can complete database operations such as data writing and data reading through the other NVME hard disk in the target independent disk redundant array.
[0065] In step S204, when it is determined that the target NVME hard disk does not need to be deleted from the target independent disk redundant array, the target non-volatile memory host controller interface hard disk can be controlled to be in a readable and writable state.
[0066] The method for managing a hard disk provided by the embodiment of the present application receives asynchronous event data of a target asynchronous event related to a target NVME hard disk, controls the target NVME hard disk to be in a read-only state or a non-writable state, determines whether the target NVME hard disk needs to be deleted from a target independent disk redundant array according to the asynchronous event data of the target asynchronous event, deletes the target NVME hard disk from the target independent disk redundant array when it is determined that the target NVME hard disk needs to be deleted from the target independent disk redundant array, and switches the NVME hard disk provided for the target database from the target NVME hard disk to the other NVME hard disk in the target independent disk redundant array. Controlling the target NVME hard disk to be in a read-only state or a non-writable state can avoid data storage errors caused by writing data to the target NVME hard disk in the case that the target NVME hard disk has a fault. When the target NVME hard disk needs to be deleted from the target independent disk redundant array, the target NVME hard disk can be deleted from the target independent disk redundant array in a timely manner according to the asynchronous event data of the target asynchronous event related to the target NVME hard disk, and the NVME hard disk provided for the target database can be switched from the target NVME hard disk to the other NVME hard disk in the target independent disk redundant array in a timely manner. The target NVME hard disk does not need to be restarted, which avoids the case that the database uses the NVME hard disk provided for the database that has a fault to complete a database operation during the restart of the NVME hard disk, causes data storage errors, and improves the reliability of a data storage system with a database and an NVME hard disk provided for the database.
[0067] Referring to FIG. 3, a flowchart of another method for managing a hard disk provided by the embodiments of the present application is shown.
[0068] In step S301, asynchronous event data of a target asynchronous event related to a target NVME hard disk is received.
[0069] In one or more possible implementation manners, the method further comprises: during startup of the target server, starting an NVME hard disk asynchronous event reporting function by using an operating system of the target server after the operating system of the target server is entered. After the NVME hard disk asynchronous event reporting function is started, a module for reporting NVME hard disk asynchronous events reports asynchronous event data of a target asynchronous event related to the target NVME hard disk to a module for executing the method for managing a hard disk provided by the embodiments of the present application. Thus, once the target server is started, the module for reporting NVME hard disk asynchronous events can report NVME hard disk asynchronous events.
[0070] In step S302, the target NVME hard disk is controlled to be in a read-only state or a non-writable state.
[0071] Controlling the target NVME hard disk to be in a read-only state or a non-writable state can avoid data storage errors caused by writing data to the target NVME hard disk in the case of a failure of the target NVME hard disk.
[0072] In step S303, whether the target NVME hard disk needs to be deleted from the target redundant array of independent disks is determined according to the asynchronous event data of the target asynchronous event, a plurality of preset failure types, a plurality of preset error types, and a device state type.
[0073] The plurality of preset error types can include error event types agreed by an NVME protocol and user-defined error event types.
[0074] The asynchronous event type of the target asynchronous event related to the target NVME hard disk and the asynchronous event information of the target asynchronous event related to the target NVME hard disk can be parsed from the asynchronous event data of the target asynchronous event related to the target NVME hard disk.
[0075] The step S303 can include: determining whether the asynchronous event type of the target asynchronous event is one of the plurality of preset error types; when determining that the asynchronous event type of the target asynchronous event is one of the plurality of preset error types, determining that the target NVME hard disk needs to be deleted from the target redundant array of independent disks; when determining that the asynchronous event type of the target asynchronous event is not one of the plurality of preset error types, determining whether the asynchronous event type of the target asynchronous event is one of the plurality of preset faults; when determining that the asynchronous event type of the target asynchronous event is one of the plurality of preset fault types, determining that the target NVME hard disk needs to be deleted from the target redundant array of independent disks; when determining that the asynchronous event type of the target asynchronous event is not one of the plurality of preset fault types, determining whether the asynchronous event type of the target asynchronous event is a device state type; when determining that the asynchronous event type of the target asynchronous event is a device state type, determining whether the device state of the target NVME hard disk is a device abnormal state according to the asynchronous event information indicating the state of the target NVME hard disk in the asynchronous event data of the target asynchronous event; and when determining that the device state of the target NVME hard disk is a device abnormal state, determining that the target NVME hard disk needs to be deleted from the target redundant array of independent disks.
[0076] In one or more possible implementations, when determining that the asynchronous event type of the target asynchronous event related to the target NVME hard disk is a device state type, determining whether the device state of the target NVME hard disk is a device abnormal state according to the asynchronous event information indicating the state of the target NVME hard disk in the asynchronous event data of the target asynchronous event related to the target NVME hard disk includes: determining whether the asynchronous event information indicating the state of the target NVME hard disk satisfies a preset condition corresponding to the device abnormal state, the preset condition corresponding to the device abnormal state being one of: the asynchronous event information indicating the state of the target NVME hard disk being greater than a preset value corresponding to the device abnormal state, the asynchronous event information indicating the state of the target NVME hard disk being less than or equal to the preset value corresponding to the device abnormal state; and when determining that the asynchronous event information indicating the state of the target NVME hard disk satisfies the preset condition corresponding to the device abnormal state, determining that the device state of the target NVME hard disk is the device abnormal state.
[0077] In some embodiments, one of the asynchronous event information in the asynchronous event data of the target asynchronous event indicating the state of the target NVME hard disk is the temperature of the target NVME hard disk, the preset condition corresponding to the device abnormal state is that the temperature of the target NVME hard disk is higher than a temperature threshold, the preset value corresponding to the device abnormal state in the preset condition is the temperature threshold, and when it is determined that the temperature of the target NVME hard disk is greater than the temperature threshold, it is determined that the device state of the target NVME hard disk is the device abnormal state.
[0078] In the embodiments of the present application, the asynchronous event type of the target asynchronous event is determined to be one of the plurality of preset error types, it is determined whether the asynchronous event type of the target asynchronous event is one of the plurality of preset faults, and it is determined whether the device state of the target NVME hard disk is the device abnormal state, so that it can be more comprehensively determined whether the target NVME hard disk needs to be deleted from the target redundant array of independent disks.
[0079] In one or more possible implementations, a trigger instruction is sent to a tool for managing the target redundant array of independent disks running on the target server by using the target database, wherein the target database runs on the target server, and the trigger instruction is used to trigger the tool for managing the target redundant array of independent disks to delete the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks, and to switch the non-volatile memory host controller interface hard disk provided to the target database from the target non-volatile memory host controller interface hard disk to other non-volatile memory host controller interface hard disks in the target redundant array of independent disks.
[0080] In some embodiments, the tool for managing the target redundant array of independent disks can be MDADM. MDADM is a software tool for Linux systems for managing RAID (Redundant Array of Independent Disks) arrays. MDADM allows users to create, manage and monitor different levels of RAID such as RAID 0, RAID 1, RAID 5, RAID 6, etc. Through MDADM, users can add, delete, rebuild and repair RAID devices to improve data redundancy and performance. MDADM also provides a command line interface and configuration files to manage RAID devices, allowing users to easily perform related operations.
[0081] In one or more possible implementations, the target asynchronous event is a health status asynchronous event, receiving the asynchronous event data of the target asynchronous event related to the target NVME hard disk includes: receiving the asynchronous event data of the health status asynchronous event related to the target NVME hard disk sent by a baseboard management controller (BMC) of the target server, the asynchronous event data of the health status asynchronous event including: a health status event type and health status information of the target NVME hard disk; and determining whether the target NVME hard disk needs to be deleted from the target redundant array of independent disks according to the asynchronous event data of the target asynchronous event includes: determining whether the target NVME hard disk is in a health abnormal state according to the health status information of the target NVME hard disk; and determining that the target NVME hard disk needs to be deleted from the target redundant array of independent disks when it is determined that the target NVME hard disk is in the health abnormal state.
[0082] When the target asynchronous event related to the target non-volatile memory host controller interface hard disk is a health status asynchronous event, the asynchronous event information of the target asynchronous event is health status information of the target NVME hard disk.
[0083] When it is determined whether the target NVME hard disk is in a health abnormal state according to the health status information of the target NVME hard disk, it is determined whether an information item for comparing a preset value corresponding to the health abnormal state in the health status information of the target non-volatile memory host controller interface hard disk satisfies a preset condition corresponding to the health abnormal state, the preset condition corresponding to the health abnormal state being one of: the information item for comparing the preset value corresponding to the health abnormal state being greater than the preset value corresponding to the health abnormal state, and the information item for comparing the preset value corresponding to the health abnormal state being less than or equal to the preset value corresponding to the health abnormal state; and it is determined that the target non-volatile memory host controller interface hard disk is in the health abnormal state when it is determined that the information item for comparing the preset value corresponding to the health abnormal state satisfies the preset condition corresponding to the health abnormal state.
[0084] In some embodiments, the information item for comparing the preset value corresponding to the health abnormal state is
[0085] One of the following: a read error rate in health status information of the target nonvolatile memory host controller interface hard disk, a main shaft motor re-rotation to a specified speed in the health status information of the target nonvolatile memory host controller interface hard disk, a current to-be-mapped sector and an offline uncorrectable sector number in the health status information of the target nonvolatile memory host controller interface hard disk, and a seek error rate in the health status information of the target nonvolatile memory host controller interface hard disk. The preset value corresponding to the health abnormal state is one of the following: a preset read error rate, a preset main shaft motor re-rotation to a specified speed, a preset current to-be-mapped sector and offline uncorrectable sector number, and a preset seek error rate.
[0086] In the embodiment of the present application, the health status asynchronous event data related to the target NVME hard disk is sent to the module for executing the method for managing the hard disk provided in the embodiment of the present application by the backplane management controller of the target server. When it is determined that the target NVME hard disk is in a health abnormal state, it is determined that the target NVME hard disk needs to be deleted from the target redundant array of independent disks, and the target NVME hard disk is deleted from the target redundant array of independent disks. Thus, when the target NVME hard disk needs to be deleted from the target redundant array of independent disks due to the health abnormal state of the target NVME hard disk, the target NVME hard disk can be determined to be deleted from the target redundant array of independent disks in time according to the health status asynchronous event data related to the target NVME hard disk, the target NVME hard disk is deleted from the target redundant array of independent disks in time, and the NVME hard disk provided for the target database is switched from the target NVME hard disk to other NVME hard disks in the target redundant array of independent disks in time.
[0087] In step S304, when it is determined that the target NVME hard disk needs to be deleted from the target redundant array of independent disks, the target NVME hard disk is deleted from the target redundant array of independent disks, and the NVME hard disk provided for the target database is switched from the target NVME hard disk to other NVME hard disks in the target redundant array of independent disks.
[0088] Referring to FIG. 4, a flowchart of one example of the method for managing the hard disk in the embodiment of the present application is shown.
[0089] The target server is a server to which the method for managing the hard disk provided in the embodiment of the present application is applied. The target NVME hard disk belongs to a target redundant array of independent disks. The target redundant array of independent disks is a redundant array of independent disks composed of a plurality of NVME hard disks on the target server or a plurality of NVME hard disks outside the target server and communicatively connected to the target server. The module for reporting the NVME hard disk asynchronous event and the module for executing the method for managing the hard disk provided in the embodiment of the present application can run on the target server.
[0090] In this example, the method for managing hard disks provided by the embodiments of the present application is applied to the server after power-on. The operating system of the target server starts the NVME hard disk asynchronous event reporting function.
[0091] After receiving the asynchronous event data of the target asynchronous event related to the target NVME hard disk, the module for executing the method for managing hard disks provided by the embodiments of the present application controls the target NVME hard disk to be in a read-only state or a non-writable state.
[0092] In this example, the module for executing the method for managing hard disks provided by the embodiments of the present application can determine whether the asynchronous event type of the target asynchronous event is one of a plurality of preset error types. When it is determined that the asynchronous event type of the target asynchronous event is one of the plurality of preset error types, the target NVME hard disk is deleted from the target redundant array of independent disks, and the NVME hard disk providing the target database is switched from the target NVME hard disk to other NVME hard disks in the target redundant array of independent disks.
[0093] In this example, after receiving the asynchronous event data of the target asynchronous event related to the target NVME hard disk, the module for executing the method for managing hard disks provided by the embodiments of the present application can determine whether the asynchronous event type of the target asynchronous event is one of a plurality of preset failure types. When it is determined that the asynchronous event type of the target asynchronous event is one of the plurality of preset failure types, the target NVME hard disk is deleted from the target redundant array of independent disks, and the NVME hard disk providing the target database is switched from the target NVME hard disk to other NVME hard disks in the target redundant array of independent disks.
[0094] In this example, when the asynchronous event type of the target asynchronous event in the asynchronous event data of the target asynchronous event related to the target NVME hard disk is a device state type, the module for executing the method for managing hard disks provided by the embodiments of the present application can determine whether the device state of the target NVME hard disk is an abnormal device state according to the asynchronous event information indicating the state of the target NVME hard disk in the asynchronous event data of the target asynchronous event. When it is determined that the device state of the target NVME hard disk is an abnormal device state, the target NVME hard disk is deleted from the target redundant array of independent disks, and the NVME hard disk providing the target database is switched from the target NVME hard disk to other NVME hard disks in the target redundant array of independent disks.
[0095] In this example, when the asynchronous event type of the target asynchronous event in the asynchronous event data of the target asynchronous event related to the target NVME hard disk is a health state asynchronous event related to the target NVME hard disk, the module performing the method for managing a hard disk provided by the embodiment of the application can determine whether the target NVME hard disk is in a health abnormal state according to the health state information of the target NVME hard disk. When it is determined that the target NVME hard disk is in a health abnormal state, the target NVME hard disk is deleted from the target redundant array of independent disks, and the NVME hard disk provided to the target database is switched from the target NVME hard disk to other NVME hard disks in the target redundant array of independent disks.
[0096] The embodiment of the application provides a device for managing a hard disk. The device for managing a hard disk is used to implement the above-mentioned embodiments and preferred embodiments, and details are not repeated. As used below, the term "unit" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.
[0097] As shown in FIG. 5, the device for managing a hard disk includes:
[0098] The receiving unit 501 is configured to receive asynchronous event data of a target asynchronous event related to a target non-volatile memory host controller interface hard disk, the asynchronous event data of the target asynchronous event including: an asynchronous event type of the target asynchronous event, asynchronous event information of the target asynchronous event, wherein the asynchronous event data of the target asynchronous event is sent by a module for reporting non-volatile memory host controller interface hard disk asynchronous events in a case where a non-volatile memory host controller interface hard disk asynchronous event reporting function is started, and the target non-volatile memory host controller interface hard disk belongs to a target redundant array of independent disks;
[0099] The control unit 502 is configured to control the target non-volatile memory host controller interface hard disk to be in a read-only state or a non-writable state.
[0100] The determination unit 503 is configured to determine whether the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks according to the asynchronous event data of the target asynchronous event.
[0101] The deleting and switching unit 504 is configured to delete the target NVMe host controller interface hard disk from the target RAID when it is determined that the target NVMe host controller interface hard disk needs to be deleted from the target RAID, and switch the NVMe hard disk provided to the target database from the target NVMe host controller interface hard disk to another NVMe host controller interface hard disk in the target RAID, the other NVMe host controller interface hard disk being an NVMe host controller interface hard disk in the target RAID other than the target NVMe host controller interface hard disk.
[0102] In one or more possible implementations, the determining unit 503 is further configured to determine whether the asynchronous event type of the target asynchronous event is one of a plurality of preset error types; when it is determined that the asynchronous event type of the target asynchronous event is one of the plurality of preset error types, determine that the target NVMe host controller interface hard disk needs to be deleted from the target RAID; when it is determined that the asynchronous event type of the target asynchronous event is not one of the plurality of preset error types, determine whether the asynchronous event type of the target asynchronous event is one of a plurality of preset faults; when it is determined that the asynchronous event type of the target asynchronous event is one of the plurality of preset fault types, determine that the target NVMe host controller interface hard disk needs to be deleted from the target RAID; when it is determined that the asynchronous event type of the target asynchronous event is not one of the plurality of preset fault types, determine whether the asynchronous event type of the target asynchronous event is a device state type; when it is determined that the asynchronous event type of the target asynchronous event is the device state type, determine, according to asynchronous event information in the asynchronous event data of the target asynchronous event indicating a state of the target NVMe host controller interface hard disk, whether the device state of the target NVMe host controller interface hard disk is a device abnormal state; and when it is determined that the device state of the target NVMe host controller interface hard disk is the device abnormal state, determine that the target NVMe host controller interface hard disk needs to be deleted from the target RAID.
[0103] In one or more possible implementations, the determining unit 503 is further configured to determine whether the asynchronous event information indicating the state of the target NVM Express host controller interface hard disk satisfies a preset condition corresponding to the device abnormal state, the preset condition corresponding to the device abnormal state being one of: the asynchronous event information indicating the state of the target NVM Express host controller interface hard disk being greater than a preset value corresponding to the device abnormal state, the asynchronous event information indicating the state of the target NVM Express host controller interface hard disk being less than or equal to the preset value corresponding to the device abnormal state; and when it is determined that the asynchronous event information indicating the state of the target NVM Express host controller interface hard disk satisfies the preset condition corresponding to the device abnormal state, determine that the device state of the target NVM Express host controller interface hard disk is the device abnormal state.
[0104] In one or more possible implementations, the plurality of preset error types include: error event types agreed by a NVM Express host controller interface protocol, and user-defined error event types.
[0105] In one or more possible implementations, the deleting and switching unit 504 is further configured to send, by using a target database running on a target server, a trigger instruction to a tool running on the target server for managing a target Redundant Array of Independent Disks, the trigger instruction being used to trigger the tool for managing the target Redundant Array of Independent Disks to delete the target NVM Express host controller interface hard disk from the target Redundant Array of Independent Disks, and switch the NVM Express host controller interface hard disk provided to the target database from the target NVM Express host controller interface hard disk to another NVM Express host controller interface hard disk in the target Redundant Array of Independent Disks.
[0106] In one or more possible implementations, the receiving unit 501 is further configured to receive asynchronous event data of a health state asynchronous event related to the target NVM Express host controller interface hard disk sent by a baseboard management controller of a target server, the asynchronous event data of the health state asynchronous event including: a health state event type and health state information of the target NVM Express host controller interface hard disk; and the determining unit is further configured to determine, according to the health state information of the target NVM Express host controller interface hard disk, whether the target NVM Express host controller interface hard disk is in a health abnormal state; and when it is determined that the target NVM Express host controller interface hard disk is in the health abnormal state, determine that the target NVM Express host controller interface hard disk needs to be deleted from the target Redundant Array of Independent Disks.
[0107] In one or more possible implementations, the determining unit 503 is further configured to determine whether an information item in the health state information of the target NVMFC hard disk corresponding to the preset value for the health abnormal state meets a preset condition corresponding to the health abnormal state, the preset condition corresponding to the health abnormal state being one of the following conditions: the information item corresponding to the preset value for the health abnormal state is greater than the preset value for the health abnormal state, the information item corresponding to the preset value for the health abnormal state is less than or equal to the preset value for the health abnormal state; when it is determined that the information item corresponding to the preset value for the health abnormal state meets the preset condition corresponding to the health abnormal state, it is determined that the target NVMFC hard disk is in the health abnormal state.
[0108] In one or more possible implementations, the apparatus for managing hard disks further includes:
[0109] The starting unit is configured to, during startup of the target server, start, after an operating system of the target server is entered, the NVMFC hard disk asynchronous event reporting function by using the operating system of the target server.
[0110] In one or more possible implementations, the asynchronous event of the target asynchronous event is an asynchronous event agreed by the NVMFC protocol or an asynchronous event customized by a user.
[0111] In one or more possible implementations, the control unit 502 is further configured to not send a write request for the target NVMFC hard disk to a hard disk controller of the target NVMFC hard disk.
[0112] In one or more possible implementations, the target RAID includes one of the following: a plurality of NVMFC hard disks on the target server, a plurality of NVMFC hard disks outside the target server and communicatively connected to the target server.
[0113] In one or more possible implementations, the apparatus for managing hard disks further includes:
[0114] The recovery unit is configured to, when it is determined that the target NVMFC hard disk does not need to be deleted from the target RAID, control the target NVMFC hard disk to be in a readable and writable state.
[0115] In this embodiment, the apparatus is presented in the form of functional units. Here, the units refer to ASIC circuits, processors and memories executing one or more software or fixed programs, and / or other devices that can provide the above functions.
[0116] Further function description of each unit is the same as the corresponding embodiment described above, and will not be repeated here.
[0117] Referring to FIG. 6, a structural schematic diagram of a computer device provided by an embodiment of the present application is shown, which includes one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are communicatively connected with each other by using different buses, and can be installed on a common motherboard or in other manners as needed. The processor can process instructions executed in the computer device, including instructions stored in the memory or graphics information of a GUI stored in the memory for displaying on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, multiple processors and / or multiple buses can be used together with multiple memories and multiple storage devices, if necessary. Also, multiple computer devices can be connected, each providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0118] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a general array logic, or any combination thereof.
[0119] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0120] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely arranged with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0121] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid state disk; and the memory 20 can further include a combination of the above kinds of memories.
[0122] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected by a bus or other means.
[0123] The input device 30 can receive input digital or character information, and generate key signal input relating to user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibrating motor), etc. The display device includes, but is not limited to, a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device can be a touch screen.
[0124] The embodiments of the present application also provide a non-volatile computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium through network, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, which, when accessed and executed by the computer, the processor, or the hardware, implements the method shown in the above embodiments.
[0125] Part of the embodiments of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the existence form of the computer program instructions in the computer readable medium includes but is not limited to source files, executable files, installation package files, etc. Correspondingly, the execution mode of the computer program instructions by the computer includes but is not limited to: the computer directly executes the instructions, or the computer executes the corresponding compiled program after compiling the instructions, or the computer reads and executes the instructions, or the computer executes the corresponding installed program after reading and installing the instructions. Here, the computer readable medium can be any available non-volatile computer readable storage medium or communication medium accessible to the computer.
[0126] While embodiments of the application have been described in connection with the preferred embodiments of the various figures, those of ordinary skill in the art will appreciate that various modifications and variations of the preferred embodiments can be employed without departing from the spirit and scope of the application.
Claims
1. A method of managing a hard disk, characterized by, The method comprises: receiving asynchronous event data of a target asynchronous event related to a target non-volatile memory host controller interface hard disk, the asynchronous event data of the target asynchronous event comprising: an asynchronous event type of the target asynchronous event and / or asynchronous event information of the target asynchronous event, wherein the asynchronous event data of the target asynchronous event is sent by a software module for reporting asynchronous events of the non-volatile memory host controller interface hard disk in a case where an asynchronous event reporting function of the non-volatile memory host controller interface hard disk is enabled, and the target non-volatile memory host controller interface hard disk belongs to a target redundant array of independent disks; controlling the target non-volatile memory host controller interface hard disk to be in a read-only state or a non-writable state; determining, according to the asynchronous event data of the target asynchronous event, whether the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks; and in response to the target non-volatile memory host controller interface hard disk needing to be deleted from the target redundant array of independent disks, deleting the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks, and switching a non-volatile memory host controller interface hard disk provided to a target database from the target non-volatile memory host controller interface hard disk to another non-volatile memory host controller interface hard disk in the target redundant array of independent disks, the other non-volatile memory host controller interface hard disk being a non-volatile memory host controller interface hard disk in the target redundant array of independent disks other than the target non-volatile memory host controller interface hard disk.
2. The method of claim 1, wherein, The determining, according to the asynchronous event data of the target asynchronous event, whether the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks comprises: determining whether the asynchronous event type of the target asynchronous event is a preset error type in a plurality of preset error types; in response to the asynchronous event type of the target asynchronous event being a preset error type in the plurality of preset error types, determining that the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks; in response to the asynchronous event type of the target asynchronous event not being a preset error type in the plurality of preset error types, determining whether the asynchronous event type of the target asynchronous event is a preset failure type in a plurality of preset failure types; in response to the asynchronous event type of the target asynchronous event being a preset failure type in the plurality of preset failure types, determining that the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks; in response to the asynchronous event type of the target asynchronous event not being a preset failure type in the plurality of preset failure types, determining whether the asynchronous event type of the target asynchronous event is a device state type; in response to the asynchronous event type of the target asynchronous event being the device state type, determining, according to asynchronous event information indicating a state of the target non-volatile memory host controller interface hard disk in asynchronous event data of the target asynchronous event, whether a device state of the target non-volatile memory host controller interface hard disk is a device abnormal state; and in response to the device state of the target non-volatile memory host controller interface hard disk being the device abnormal state, determining that the target non-volatile memory host controller interface hard disk needs to be deleted from the target redundant array of independent disks.
3. The method of claim 2, wherein, The determining, according to asynchronous event information indicating a state of the target non-volatile memory host controller interface hard disk in asynchronous event data of the target asynchronous event, whether a device state of the target non-volatile memory host controller interface hard disk is a device abnormal state, comprises: determining whether the asynchronous event information indicating the state of the target non-volatile memory host controller interface hard disk satisfies a preset condition corresponding to the device abnormal state, the preset condition corresponding to the device abnormal state being at least one of the following conditions: the asynchronous event information indicating the state of the target non-volatile memory host controller interface hard disk being greater than a preset value corresponding to the device abnormal state, or the asynchronous event information indicating the state of the target non-volatile memory host controller interface hard disk being less than or equal to the preset value corresponding to the device abnormal state; and in response to the asynchronous event information indicating the state of the target non-volatile memory host controller interface hard disk satisfying the preset condition corresponding to the device abnormal state, determining that the device state of the target non-volatile memory host controller interface hard disk is the device abnormal state.
4. The method of claim 2, wherein, The plurality of preset error types include: error event types agreed by a non-volatile memory host controller interface protocol and user-defined error event types.
5. The method of claim 1, wherein, The deleting, in response to the target non-volatile memory host controller interface hard disk needing to be deleted from the target redundant array of independent disks, the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks, and switching, from the target non-volatile memory host controller interface hard disk, a non-volatile memory host controller interface hard disk providing a target database to another non-volatile memory host controller interface hard disk in the target redundant array of independent disks, comprises: sending, by the target database, a trigger instruction to a tool running on a target server for managing the target redundant array of independent disks, wherein the target database runs on the target server, and the trigger instruction is used to trigger the tool for managing the target redundant array of independent disks to delete the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks, and switch, from the target non-volatile memory host controller interface hard disk, a non-volatile memory host controller interface hard disk providing a target database to another non-volatile memory host controller interface hard disk in the target redundant array of independent disks.
6. The method of claim 1, wherein, The receiving asynchronous event data of a target asynchronous event related to the target NVMFC hard disk comprises: Receiving asynchronous event data of a health state asynchronous event related to the target NVMFC hard disk sent by a baseboard management controller of a target server, the asynchronous event data of the health state asynchronous event comprising: a health state event type and / or health state information of the target NVMFC hard disk; and According to the asynchronous event data of the target asynchronous event, determining whether the target NVMFC hard disk needs to be deleted from the target RAID, comprising: According to the health state information of the target NVMFC hard disk, determining whether the target NVMFC hard disk is in a health abnormal state; and In response to the target NVMFC hard disk being in a health abnormal state, determining that the target NVMFC hard disk needs to be deleted from the target RAID.
7. The method of claim 6, wherein, The determining whether the target NVMFC hard disk is in a health abnormal state according to the health state information of the target NVMFC hard disk comprises: Determining whether an information item for comparing a preset value corresponding to a health abnormal state in the health state information of the target NVMFC hard disk satisfies a preset condition corresponding to the health abnormal state, the preset condition corresponding to the health abnormal state being at least one of: the information item for comparing the preset value corresponding to the health abnormal state being greater than the preset value corresponding to the health abnormal state, the information item for comparing the preset value corresponding to the health abnormal state being less than or equal to the preset value corresponding to the health abnormal state; and In response to the information item for comparing the preset value corresponding to the health abnormal state satisfying the preset condition corresponding to the health abnormal state, determining that the target NVMFC hard disk is in a health abnormal state.
8. The method of claim 1, wherein, The method further comprises: During the startup of the target server, starting the asynchronous event reporting function of the NVMFC hard disk by using the operating system of the target server after entering the operating system of the target server.
9. The method of claim 1, wherein, The target asynchronous event is an asynchronous event agreed by the NVMFC protocol or an asynchronous event defined by a user.
10. The method of claim 1, wherein, The controlling the target NVMFC hard disk to be in a read-only state or a non-writable state comprises: Not sending a write request for the target NVMFC hard disk to a hard disk controller of the target NVMFC hard disk.
11. The method of claim 1, wherein, The target RAID comprises at least one of: a plurality of NVMFC hard disks on the target server, a plurality of NVMFC hard disks outside the target server and communicatively connected to the target server.
12. The method according to any one of claims 1-11, characterized in that, The method further comprises: in response to a determination that the target non-volatile memory host controller interface hard disk does not need to be removed from the target redundant array of independent disks, controlling the target non-volatile memory host controller interface hard disk to be in a read-write state.
13. The method of claim 1, wherein, The asynchronous event type further comprises at least one of an error event type, a SMART event type, and a health status event type.
14. The method of claim 13, wherein, The asynchronous event type further comprises a user-defined asynchronous event.
15. The method of claim 14, wherein, The method further comprises: defining the asynchronous event type by a Vendor specific type.
16. The method of claim 1, wherein, The target database is a distributed architecture structured query language database.
17. The method of claim 1, wherein, The removing the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks comprises: performing a kick-off of the target non-volatile memory host controller interface hard disk to remove the target non-volatile memory host controller interface hard disk from the target redundant array of independent disks.
18. A computer device, comprising: comprise: a memory and a processor, which are in communication connection with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the method in any one of claims 1 to 17.
19. A non-transitory computer readable storage medium, comprising: The non-volatile computer readable storage medium stores computer instructions for causing a computer to perform the method in any one of claims 1 to 17.
20. A computer program product, characterised in that, comprise computer instructions for causing a computer to perform the method in any one of claims 1 to 17.
Citation Information
Patent Citations
Hard disk fault processing method and device and distributed system
CN111158608A
Disk processing method and system and electronic equipment
CN114675791A
Hard disk fault processing method and device, equipment and storage medium
CN115793963A
Hard disk management method, computer equipment and storage medium
CN118642660A
Storage device and event notification method for storage device
US20170286205A1