Hard disk state determination method and device, computer equipment and readable medium

By implementing reliability management and applying status configuration tables for hard drives in the storage pool, the problem of inaccurate hard drive status determination is solved, achieving more efficient and accurate hard drive status identification and improving the reliability and performance of the storage system.

CN121880109APending Publication Date: 2026-04-17DAWNING INT INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DAWNING INT INFORMATION IND CO LTD
Filing Date
2024-10-17
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in determining the actual state of hard drives, which affects the reliability and stability of storage pools.

Method used

By performing reliability management on the current state of the target hard disk in the storage pool, the actual state of the hard disk is determined using the hard disk state configuration table, including the state configuration at different operating stages. This simplifies the algorithm process and improves the accuracy and efficiency of state determination.

Benefits of technology

It improves the accuracy of hard drive status determination, prevents data loss, optimizes storage pool capacity planning, enhances hard drive reliability and storage performance, promptly handles hard drive anomalies, and improves the stability and utilization of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880109A_ABST
    Figure CN121880109A_ABST
Patent Text Reader

Abstract

The invention relates to a hard disk state determination method and device, computer equipment and a readable medium. The method comprises the steps that according to the current state of a target hard disk in a storage pool, reliability management is conducted on the target hard disk, a management result is determined, the actual state of the target hard disk is determined from a hard disk state configuration table according to the management result, and the target hard disk is any hard disk existing in the storage pool at the current moment or in the historical time period; the hard disk state configuration table comprises a plurality of states configured for the hard disk in advance in different operation stages. According to the method, after the current state of the target hard disk in the storage pool is obtained, the real state of the target hard disk is determined by conducting reliability management on the target hard disk, and therefore the precision of the determined actual state of the hard disk is improved.
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 method, apparatus, computer device, and readable medium for determining the status of a hard disk. Background Technology

[0002] With the development of storage technology, storage pools are widely used in storage systems. As the physical carrier of business data, the reliability of the storage pool has gradually become one of the indicators for measuring the security and reliability of business data. Therefore, determining the reliability of the storage pool before storing business data is particularly important.

[0003] In related technologies, a storage pool consists of multiple hard drives. The storage system mainly determines the reliability of the storage pool by real-time monitoring of the operating status of each hard drive in the storage pool and taking the current status of the hard drive as its actual status.

[0004] However, the accuracy of the hard drive's actual condition determined by related technologies is relatively low. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, computer device, and readable medium for determining the status of a hard disk, which can improve the accuracy of the determined actual status of the hard disk.

[0006] In a first aspect, embodiments of this application provide a method for determining the status of a hard disk, the method comprising:

[0007] Based on the current status of the target hard drive in the storage pool, perform reliability management on the target hard drive and determine the management result; the target hard drive is any hard drive that exists in the storage pool at the current moment or within a historical time period.

[0008] Based on the management results, the actual status of the target hard drive is determined from the hard drive status configuration table; the hard drive status configuration table includes multiple statuses under different operating stages pre-configured for the hard drive.

[0009] The technical solution in this application embodiment performs reliability management on the target hard drive based on its current state in the storage pool to determine the management result, and then determines the actual state of the target hard drive from the hard drive status configuration table based on the management result. The target hard drive is any hard drive present in the storage pool at the current time or within a historical time period. The hard drive status configuration table includes multiple states pre-configured for different operating stages of the hard drive. This method improves the accuracy of the determined actual state of the hard drive by performing reliability management on the target hard drive after obtaining its current state in the storage pool. Furthermore, this method does not require complex algorithms, thus reducing the complexity of determining the accurate hard drive state and improving the speed and efficiency of determining the accurate hard drive state. In addition, this method can obtain accurate actual hard drive states, and based on this, it can further prevent data loss on the hard drives, plan the storage capacity of the storage pool, and maintain the stability of the storage system based on the actual state of each hard drive. Moreover, after obtaining the current state of any hard drive in the storage pool, this method can promptly handle and respond to abnormal problems occurring on the target hard drive, thereby improving the reliability, storage performance, and utilization of the hard drive. Based on this, it can improve the reliability, stability, and storage performance of the storage pool to which the hard drive belongs.

[0010] In one embodiment, before performing reliability management on the target hard disk based on its current state in the storage pool, the method further includes:

[0011] Obtain the hard drive type of the target hard drive;

[0012] Obtain the current status of the target hard drive based on its type.

[0013] The technical solution in this application embodiment obtains the hard drive type of the target hard drive and obtains the current state of the target hard drive based on the hard drive type. The above method can obtain the current state of the target hard drive without complex algorithms, thereby improving the speed and efficiency of obtaining the current state of the target hard drive.

[0014] In one embodiment, obtaining the current state of the target hard drive based on the hard drive type includes:

[0015] If the hard drive type is a newly added hard drive, then obtain the storage system identifier of the target hard drive;

[0016] If the storage system identifier matches the identifier of the storage system to which the storage pool belongs, then the system used status in the hard disk status configuration table will be determined as the current status.

[0017] If the storage system identifier does not match the identifier, then the used status of other systems in the hard disk status configuration table will be determined as the current status;

[0018] If the storage system identifier is empty, the unused system status in the hard disk status configuration table will be determined as the current status.

[0019] In the technical solution of this application embodiment, if the hard disk type is a newly added hard disk, the storage system identifier of the target hard disk is obtained. If the storage system identifier is consistent with the identifier of the storage system to which the storage pool belongs, the system used status in the hard disk status configuration table is determined as the current status. If the storage system identifier is inconsistent with the identifier, the other system used status in the hard disk status configuration table is determined as the current status. If the storage system identifier is empty, the system unused status in the hard disk status configuration table is determined as the current status. The above method can obtain the storage system identifier of the target hard disk when the target hard disk type is a newly added hard disk, and determine the current status of the target hard disk based on the storage system identifier of the target hard disk. This process is relatively simple, thereby reducing the speed and efficiency of obtaining the current status. At the same time, the above method can obtain the current status of the target hard disk in a corresponding manner when the target hard disk type is a newly added hard disk. Since this process is relatively simple, it can improve the wide applicability of obtaining the current status in this scenario.

[0020] In one embodiment, obtaining the current state of the target hard drive based on the hard drive type includes:

[0021] If the hard drive type is a disconnected hard drive, set the disconnected status in the hard drive status configuration table as the current status;

[0022] If the hard drive type is a faulty hard drive, the fault status in the hard drive status configuration table will be set as the current status;

[0023] If the hard drive type is a sub-healthy hard drive, the sub-healthy status in the hard drive status configuration table will be set as the current status.

[0024] In the technical solution of this application embodiment, if the hard drive type is a disconnected hard drive, the disconnected status in the hard drive status configuration table is determined as the current status; if the hard drive type is a faulty hard drive, the faulty status in the hard drive status configuration table is determined as the current status; if the hard drive type is a sub-healthy hard drive, the sub-healthy status in the hard drive status configuration table is determined as the current status. The above method can directly determine the current status of the target hard drive from the hard drive status configuration table according to the type of the target hard drive. This can reduce the amount of data that needs to be processed to determine the current status of the hard drive and improve the speed and efficiency of determining the current status of the hard drive.

[0025] In one embodiment, based on the current state of the target hard drive in the storage pool, reliability management of the target hard drive is performed, and the management result is determined, including:

[0026] If the current status is either "system in use" or "system in use", then the target hard drive will be authorized, and the authorization result will be obtained.

[0027] If the current status is that other systems are already in use, then the target hard drive will be formatted and authorized to obtain a comprehensive processing result.

[0028] If the current status is disconnected, check whether the target hard drive has been inserted back into the storage pool within a preset time period to obtain the first detection result;

[0029] If the current state is a fault state, then if the remaining storage space in the storage pool is less than or equal to a preset space threshold, check whether the target hard drive has come back online within a preset time period to obtain a second detection result; if the remaining storage space is greater than the space threshold, perform data reconstruction processing on the target hard drive to obtain a first reconstruction result.

[0030] If the current state is sub-healthy, then if the remaining storage space is greater than the space threshold, the data in the target hard drive will be reconstructed to obtain the second reconstruction result.

[0031] The technical solution in this application embodiment, if the current state is a system used state or a system unused state, then authorization processing is performed on the target hard drive to obtain an authorization processing result; if the current state is another system used state, then formatting and authorization processing are performed on the target hard drive to obtain a comprehensive processing result; if the current state is a disconnected state, then it is detected whether the target hard drive has been inserted back into the storage pool within a preset time period to obtain a first detection result; if the current state is a fault state, then if the remaining storage space in the storage pool is less than or equal to a preset space threshold, it is detected whether the target hard drive has been re-connected within a preset time period to obtain a second detection result; if the remaining storage space is greater than the space threshold, the data in the target hard drive is reconstructed to obtain a first reconstruction result; if the current state is a sub-healthy state, then if the remaining storage space is greater than the space threshold, the data in the target hard drive is reconstructed to obtain a second reconstruction result. The above method can perform reliability management for hard drives in different current states, making the hard drive reliability management method more widely applicable, and allowing for corresponding reliability management methods in different scenarios, thereby improving the accuracy of reliability management in various scenarios.

[0032] In one embodiment, the hard disk status configuration table includes normal status, orphaned status, and removed status; based on the management results, the actual status of the target hard disk is determined from the hard disk status configuration table, including:

[0033] If the management result is an authorized processing result or a comprehensive processing result, then the normal state will be determined as the actual state;

[0034] If the management result is the first detection result and the first detection result is not inserted back into the storage pool, then the actual status is determined based on the isolated state;

[0035] If the management result is the first detection result and the first detection result indicates that the device has been inserted back into the storage pool, or if the management result is the second detection result, then the normal state will be determined as the actual state.

[0036] If the management process results in a second reconstruction, then the removed state will be determined as the actual state.

[0037] In the technical solutions of this application embodiment, if the management result is an authorization processing result or a comprehensive processing result, the normal state is determined as the actual state; if the management result is a first detection result and the first detection result is not inserted back into the storage pool, the actual state is determined based on the isolated state; if the management result is a first detection result and the first detection result is inserted back into the storage pool, or if the management result is a second detection result, the normal state is determined as the actual state; if the management processing is a second reconstruction result, the removed state is determined as the actual state. The above method can obtain the actual state of the target hard drive based on the reliability management results corresponding to the target hard drive in different scenarios, thereby improving the accuracy of the obtained hard drive state. Furthermore, this process can determine the hard drive state through the hard drive state configuration table, which can also improve the speed and efficiency of accurately determining the hard drive state.

[0038] In one embodiment, the method further includes:

[0039] Responding to a storage pool expansion request;

[0040] Authorize the expansion hard drive and determine the normal status in the hard drive status configuration table as the actual status of the expansion hard drive to complete the expansion of the storage pool.

[0041] The technical solution in this application embodiment responds to the storage pool expansion request, authorizes the expansion hard drive, and determines the normal status in the hard drive status configuration table as the actual status of the expansion hard drive to complete the storage pool expansion. In the above method, when there is a storage pool expansion requirement, the expansion hard drive can be authorized to improve the availability of the expansion hard drive added to the storage pool, and the actual status of the expansion hard drive can also be obtained to provide reference information for subsequently determining the accuracy and reliability of the storage pool.

[0042] Secondly, embodiments of this application provide a method for determining the status of a hard disk, the method comprising:

[0043] The reliability management module is used to perform reliability management on the target hard drive based on the current status of the target hard drive in the storage pool and determine the management result; the target hard drive can be any hard drive in the storage pool at the current moment or within a historical time period.

[0044] The determination module is used to determine the actual status of the target hard drive from the hard drive status configuration table based on the management results; the hard drive status configuration table includes multiple statuses under different operating stages pre-configured for the hard drive.

[0045] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the embodiments of the first aspect described above.

[0046] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.

[0047] Fifthly, embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.

[0048] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0049] Figure 1 This is an application environment diagram of a hard disk status determination method in one embodiment;

[0050] Figure 2 This is a flowchart illustrating a method for determining the status of a hard disk in one embodiment;

[0051] Figure 3 This is a flowchart illustrating a method for determining the hard disk status in another embodiment;

[0052] Figure 4 This is a flowchart illustrating a method for determining the hard disk status in another embodiment;

[0053] Figure 5 This is a flowchart illustrating a method for determining the hard disk status in another embodiment;

[0054] Figure 6 This is a flowchart illustrating a method for determining the hard disk status in another embodiment;

[0055] Figure 7 This is a structural block diagram of a hard disk status determination device in one embodiment;

[0056] Figure 8This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0058] In the field of data storage, storage pools are widely used in storage systems. As the physical carrier of business data, the reliability of the storage pool has gradually become one of the indicators for measuring the security and reliability of business data. Therefore, determining the reliability of the storage pool before storing business data is particularly important. In related technologies, a storage pool consists of multiple hard drives. The storage system mainly determines the reliability of the storage pool by real-time monitoring of the operating status of each hard drive in the storage pool and directly using the current status of the hard drives as the actual status of the hard drives. However, the actual status of the hard drives determined by related technologies has a relatively low accuracy.

[0059] The hard disk status determination method provided in this application embodiment is applicable to... Figure 1 The application system shown includes multiple storage systems, each of which can consist of multiple storage pools, and each storage pool can consist of multiple hard drives. Optionally, the model and capacity of each hard drive can be the same or different, and this embodiment does not limit this. Optionally, the hard drives can be mechanical hard drives, solid-state drives, hybrid hard drives, or external hard drives, etc., and this embodiment does not limit the specific form of the hard drives. The storage system can be, but is not limited to, computer equipment, database systems, or servers. The computer equipment can be personal computers, laptops, tablets, smartphones, smartwatches, or other electronic devices with storage functions. Figure 1 The example illustrates this by using an application system comprising four storage systems (Storage System 1, Storage System 2, Storage System 3, and Storage System 4), each of which is a server. The following embodiment uses any one of the storage systems within the application system as the executing entity for the hard disk status determination method to describe the specific process of the method.

[0060] like Figure 2 The diagram shown is a flowchart illustrating the hard disk status determination method provided in this application embodiment. This method can be implemented through the following steps:

[0061] S100. Based on the current status of the target hard drive in the storage pool, perform reliability management on the target hard drive and determine the management result. The target hard drive is any hard drive present in the storage pool at the current time or within a historical time period.

[0062] Specifically, the storage system can perform reliability management on the target hard drive based on the current state of the target hard drive in any storage pool within the current storage system, and determine the management result of the target hard drive. Here, the current storage system and the executing entity are the same storage system.

[0063] In one embodiment, the method for determining the management result of a target hard drive based on its current state in any storage pool within the storage system through reliability management can be as follows: An algorithm model is pre-trained, and the current state of the target hard drive is input into the algorithm model. The algorithm model outputs a reliability management strategy for the target hard drive, and then reliability management is performed on the target hard drive according to the reliability management strategy to determine the management result. Optionally, the reliability management strategy may include the specific process of reliability management of the target hard drive and related management parameters.

[0064] In another embodiment, the method of determining the management result of the target hard disk by performing reliability management on the target hard disk based on the current state of the target hard disk in any storage pool within the storage system can also be to search for the current state of the target hard disk in the mapping relationship between different states and different management strategies, determine the management strategy corresponding to the state that matches the current state in the mapping relationship as the reliability management strategy of the target hard disk, and then perform reliability management on the target hard disk according to the reliability management strategy to determine the management result of the target hard disk.

[0065] It should be noted that the target hard drive mentioned above refers to any hard drive existing in the storage pool at the current moment or within a historical time period; any hard drive existing in the storage pool within a historical time period means that the hard drive is currently outside the storage pool, but is within the storage pool at any moment within the historical time period. Optionally, the historical time period can be any time period prior to the current moment.

[0066] S200. Based on the management results, determine the actual status of the target hard drive from the hard drive status configuration table. The hard drive status configuration table includes various statuses pre-configured for different operating stages of the hard drive.

[0067] In practical applications, the storage system can find the management result in the mapping relationship between different management results and different status identifiers, and then obtain the status identifier corresponding to the management result that matches the management result in the mapping relationship, and retrieve the status corresponding to the status identifier from the hard disk status configuration table as the actual status of the target hard disk.

[0068] The various states of the hard drive configuration at different operational stages can include different operational states of the hard drive in any storage system throughout its entire lifecycle. In this embodiment, determining the corresponding state in the hard drive state configuration table as the actual state of the target hard drive can be understood as changing the current state of the target hard drive to the corresponding state in the hard drive state configuration table, thus obtaining the actual state of the target hard drive.

[0069] The technical solution in this application embodiment performs reliability management on the target hard drive based on its current state in the storage pool to determine the management result, and then determines the actual state of the target hard drive from the hard drive status configuration table based on the management result. The target hard drive is any hard drive present in the storage pool at the current time or within a historical time period. The hard drive status configuration table includes multiple states pre-configured for different operating stages of the hard drive. This method improves the accuracy of the determined actual state of the hard drive by performing reliability management on the target hard drive after obtaining its current state in the storage pool. Furthermore, this method does not require complex algorithms, thus reducing the complexity of determining the accurate hard drive state and improving the speed and efficiency of determining the accurate hard drive state. In addition, this method can obtain accurate actual hard drive states, and based on this, it can further prevent data loss on the hard drives, plan the storage capacity of the storage pool, and maintain the stability of the storage system based on the actual state of each hard drive. Moreover, after obtaining the current state of any hard drive in the storage pool, this method can promptly handle and respond to abnormal problems occurring on the target hard drive, thereby improving the reliability, storage performance, and utilization of the hard drive. Based on this, it can improve the reliability, stability, and storage performance of the storage pool to which the hard drive belongs.

[0070] In one embodiment, before performing the steps in S100 above, as follows: Figure 3 As shown, the above method may further include:

[0071] S110. Obtain the hard drive type of the target hard drive.

[0072] S120. Obtain the current status of the target hard drive based on the hard drive type.

[0073] Specifically, the storage system can monitor any hard drive in any storage pool within itself, obtain the hard drive type of the target hard drive, and obtain the current status of the target hard drive based on the hard drive type.

[0074] In one embodiment, the current state of the target hard disk can be obtained by the storage system searching for the hard disk type in the mapping relationship between different states and different types, and determining the state corresponding to the type that matches the hard disk type in the mapping relationship as the current state of the target hard disk.

[0075] In another embodiment, the current state of the target hard drive can be obtained based on the hard drive type by having the storage system send the hard drive type of the target hard drive to a third-party device, which then generates the current state of the target hard drive based on the hard drive type and feeds the current state back to the storage system.

[0076] The technical solution in this application embodiment obtains the hard drive type of the target hard drive and obtains the current state of the target hard drive based on the hard drive type. The above method can obtain the current state of the target hard drive without complex algorithms, thereby improving the speed and efficiency of obtaining the current state of the target hard drive.

[0077] In some scenarios, where the target hard drive is a newly added hard drive to the storage system, the process of obtaining the corresponding current state for this type of hard drive is described below. In one embodiment, in Figure 3 On the basis of, such as Figure 4 As shown, the step in S120 above, which obtains the current status of the target hard drive based on the hard drive type, can be implemented in the following way:

[0078] S121. If the hard disk type is a newly added hard disk, then obtain the storage system identifier of the target hard disk.

[0079] Specifically, if the target hard drive is a newly added hard drive, the storage system identifier can be read from the target hard drive.

[0080] In practical applications, the storage system identifier can be stored in the boot sector of the target hard disk, which can be any storage area in the target hard disk; in the embodiments of this application, the boot sector can be the first 4K storage area in the target hard disk.

[0081] S122. If the storage system identifier is consistent with the identifier of the storage system to which the storage pool belongs, then the system used status in the hard disk status configuration table is determined as the current status.

[0082] Specifically, the storage system can compare the storage system identifier of the target hard disk with the identifier of the storage system. If the storage system identifier matches the identifier of the storage system, the system used status in the hard disk status configuration table is determined as the current status.

[0083] It should be noted that the above-mentioned system used state can represent the old state; when the current state of the target hard drive is system used state, it means that the target hard drive has been used in the historical time period of its storage system.

[0084] Optionally, the aforementioned storage system identifier and identifier can be represented by at least one of letters, numbers, and / or special characters.

[0085] S123. If the storage system identifier is inconsistent with the identifier, then the used status of other systems in the hard disk status configuration table shall be determined as the current status.

[0086] In addition, the storage system can compare the storage system identifier of the target hard drive with the identifier of the storage system. If the storage system identifier does not match the identifier of the storage system, the system will determine the status of other systems already used in the hard drive status configuration table as the current status.

[0087] It should be noted that the "Other Systems Used" status mentioned above can represent the "foreign" status; when the current status of the target hard drive is "Other Systems Used", it means that the target hard drive has been used in other storage systems outside its own storage system during a historical period.

[0088] S124. If the storage system identifier is empty, then the unused system status in the hard disk status configuration table is determined as the current status.

[0089] Specifically, the storage system can determine whether the storage system identifier is empty. If it is, it will set the unused system status in the hard disk status configuration table as the current status.

[0090] It should be noted that the above-mentioned unused system state can represent the new state; when the current state of the target hard disk is the unused system state, it means that the target hard disk has not been used in the historical time period of its storage system.

[0091] In the technical solution of this application embodiment, if the hard disk type is a newly added hard disk, the storage system identifier of the target hard disk is obtained. If the storage system identifier is consistent with the identifier of the storage system to which the storage pool belongs, the system used status in the hard disk status configuration table is determined as the current status. If the storage system identifier is inconsistent with the identifier, the other system used status in the hard disk status configuration table is determined as the current status. If the storage system identifier is empty, the system unused status in the hard disk status configuration table is determined as the current status. The above method can obtain the storage system identifier of the target hard disk when the target hard disk type is a newly added hard disk, and determine the current status of the target hard disk based on the storage system identifier of the target hard disk. This process is relatively simple, thereby reducing the speed and efficiency of obtaining the current status. At the same time, the above method can obtain the current status of the target hard disk in a corresponding manner when the target hard disk type is a newly added hard disk. Since this process is relatively simple, it can improve the wide applicability of obtaining the current status in this scenario.

[0092] In other scenarios, where the target hard drive is a lost, faulty, or suboptimal hard drive, the process for obtaining the corresponding current status of such hard drives is described below. In one embodiment, in Figure 3 On the basis of, such as Figure 5As shown, the steps described above for obtaining the current status of the target hard drive based on its type can be implemented in the following ways:

[0093] S150. If the hard drive type is a disconnected hard drive, set the disconnected status in the hard drive status configuration table as the current status.

[0094] In practical applications, if the storage system determines that the target hard drive is a disconnected hard drive, it can set the disconnected status in the hard drive status configuration table as the current status of the target hard drive.

[0095] It should be noted that the above-mentioned disconnected state can refer to the missing state; when the current state of the target hard drive is disconnected, it means that the target hard drive is a disconnected hard drive in its storage pool, that is, a data disk.

[0096] S160. If the hard drive type is a faulty hard drive, set the fault status in the hard drive status configuration table as the current status.

[0097] At the same time, if the storage system determines that the target hard drive is a faulty hard drive, it can set the fault status in the hard drive status configuration table as the current status of the target hard drive.

[0098] It should be noted that the above fault status can represent the failed status; when the current status of the target hard drive is faulty, it means that the target hard drive is a faulty hard drive in its storage pool.

[0099] S170. If the hard drive type is a sub-healthy hard drive, set the sub-healthy status in the hard drive status configuration table as the current status.

[0100] In addition, if the storage system determines that the target hard drive is a sub-healthy hard drive, it can set the sub-healthy status in the hard drive status configuration table as the current status of the target hard drive.

[0101] It should be noted that the above-mentioned sub-healthy state can refer to a subhealthy state; when the current state of the target hard drive is sub-healthy, it means that the target hard drive is a sub-healthy hard drive in its storage pool.

[0102] In the technical solution of this application embodiment, if the hard drive type is a disconnected hard drive, the disconnected status in the hard drive status configuration table is determined as the current status; if the hard drive type is a faulty hard drive, the faulty status in the hard drive status configuration table is determined as the current status; if the hard drive type is a sub-healthy hard drive, the sub-healthy status in the hard drive status configuration table is determined as the current status. The above method can directly determine the current status of the target hard drive from the hard drive status configuration table according to the type of the target hard drive. This can reduce the amount of data that needs to be processed to determine the current status of the hard drive and improve the speed and efficiency of determining the current status of the hard drive.

[0103] The process of determining the management result by performing reliability management on the target hard drive based on the current state of the target hard drive in the storage pool is described below. In one embodiment, the steps in S100 above can be implemented in the following way:

[0104] If the current status is either "system in use" or "system in use," then the target hard drive is authorized, and an authorization result is obtained. If the current status is "other system in use," then the target hard drive is formatted and authorized, and a comprehensive result is obtained. If the current status is "disconnected," then it is checked whether the target hard drive has been reinserted into the storage pool within a preset time period, and a first detection result is obtained. If the current status is "faulty," then if the remaining storage space in the storage pool is less than or equal to a preset space threshold, it is checked whether the target hard drive has been reconnected within a preset time period, and a second detection result is obtained. If the remaining storage space is greater than the space threshold, then the data in the target hard drive is reconstructed, and a first reconstruction result is obtained. If the current status is "sub-healthy," then if the remaining storage space is greater than the space threshold, then the data in the target hard drive is reconstructed, and a second reconstruction result is obtained.

[0105] Specifically, when the storage system determines that the target hard drive is currently in a system-used or system-unused state, it can respond to a hard drive authorization command to perform authorization processing on the target hard drive. This ensures that the target hard drive added to the storage pool can pass control verification and prevent other unforeseen risks. It should be noted that the purpose of authorization processing is to prevent problems such as the accidental connection of hard drives from other storage systems or the connection of hard drives that do not meet the specifications of this storage system, thereby improving the reliability and stability of the storage pool. Authorization processing may involve writing the storage system identifier, hard drive identifier, and other information corresponding to the current storage system into the boot area of ​​the target hard drive. This other information may include the vendor identifier of the current storage system. It should be noted that the storage system identifier can be represented by `systemUuid`; the hard drive identifier can be represented by `diskId`; the vendor identifier is used to distinguish whether the target hard drive was purchased from the vendor to which the storage system belongs. In practical applications, the target hard drives in the storage pool must be purchased from the vendor to which the current storage system belongs. Optionally, the authorization processing result can be an authorization processing completion indicator; it should be noted that if the authorization processing is not completed, the overall processing result cannot be obtained.

[0106] Simultaneously, if the storage system determines that the target hard drive is currently in use by another system, it can respond to a hard drive formatting command by first formatting the target hard drive, and then performing authorization processing on the formatted target hard drive to obtain a comprehensive processing result. The formatting process can be understood as the process of deleting all data in the boot sector of the target hard drive. Optionally, the comprehensive processing result can be an indicator of authorization process completion; if authorization processing is incomplete, the comprehensive processing result cannot be obtained.

[0107] It should be noted that before formatting, the storage system can output a user confirmation message to instruct the user to confirm whether the target hard drive should be added to the storage pool. After receiving the user's confirmation, the system can perform formatting on the target hard drive. This can prevent hard drives that have been used in other storage systems in the past from being added to the current storage system due to operational errors.

[0108] Furthermore, if the storage system determines that the target hard drive is currently out of service, it can respond to a first detection command and detect whether the target hard drive has been reinserted into the storage pool within a preset time period, thus obtaining a first detection result. Optionally, the preset time period can be user-defined or determined based on historical experience. In this embodiment, the purpose of setting the preset time period is to prevent the target hard drive from being accidentally removed, thus avoiding unnecessary data reconstruction tasks and reducing data reconstruction overhead. Optionally, the first detection result can be either that the target hard drive has been reinserted into the storage pool within the preset time period or that the target hard drive has not been reinserted into the storage pool within the preset time period.

[0109] In this system, when the storage system determines that the target hard drive is currently in a faulty state, it can respond to a second detection command by checking whether the remaining storage space of the storage pool is less than or equal to a preset space threshold. If so, it indicates that the storage pool itself has exceeded its redundancy capacity, and the remaining storage space is insufficient to meet the storage space requirements for rebuilding the data on the target hard drive. In this case, it can continue to detect whether the target hard drive has come back online within a preset time period to obtain a second detection result. Optionally, the space threshold can be user-defined or determined based on historical experience. Here, "coming back online" refers to the target hard drive recovering from the fault and being usable normally. Optionally, the second detection result can be yes or no; a yes result indicates that the target hard drive has come back online within the preset time period.

[0110] In this embodiment of the application, if the storage pool itself has exceeded its redundancy capacity, the storage system can output a message to force repair the target hard drive, so as to notify the user to modify the target hard drive and bring it back online.

[0111] Simultaneously, if the storage system determines that the target hard drive is currently in a faulty state, it can check whether the remaining storage space of the storage pool is greater than the space threshold. If so, it indicates that the storage pool itself has not exceeded its redundancy capacity, and the remaining storage space can meet the storage space requirements for reconstructing the data in the target hard drive. In this case, the data in the target hard drive can be reconstructed to obtain the first reconstruction result. Alternatively, if the storage system determines that the target hard drive is currently in a sub-healthy state, it can check whether the remaining storage space of the storage pool is greater than the space threshold. If so, the data in the target hard drive is reconstructed to obtain the second reconstruction result. Optionally, both the first and second reconstruction results can include the result of the reconstruction process being completed; it should be noted that if the reconstruction process is not completed, the corresponding first or second reconstruction result cannot be obtained.

[0112] The technical solution in this application embodiment, if the current state is a system used state or a system unused state, then authorization processing is performed on the target hard drive to obtain an authorization processing result; if the current state is another system used state, then formatting and authorization processing are performed on the target hard drive to obtain a comprehensive processing result; if the current state is a disconnected state, then it is detected whether the target hard drive has been inserted back into the storage pool within a preset time period to obtain a first detection result; if the current state is a fault state, then if the remaining storage space in the storage pool is less than or equal to a preset space threshold, it is detected whether the target hard drive has been re-connected within a preset time period to obtain a second detection result; if the remaining storage space is greater than the space threshold, the data in the target hard drive is reconstructed to obtain a first reconstruction result; if the current state is a sub-healthy state, then if the remaining storage space is greater than the space threshold, the data in the target hard drive is reconstructed to obtain a second reconstruction result. The above method can perform reliability management for hard drives in different current states, making the hard drive reliability management method more widely applicable, and allowing for corresponding reliability management methods in different scenarios, thereby improving the accuracy of reliability management in various scenarios.

[0113] The process of determining the actual status of the target hard drive from the hard drive status configuration table based on the management results is described below. In one embodiment, the hard drive status configuration table includes normal status, isolated status, and removed status; the step in S200 of determining the actual status of the target hard drive from the hard drive status configuration table based on the management results may include:

[0114] If the management result is an authorization processing result or a comprehensive processing result, the normal state is determined as the actual state; if the management result is a first detection result and the first detection result is not inserted back into the storage pool, the actual state is determined according to the isolated state; if the management result is a first detection result and the first detection result is inserted back into the storage pool, or if the management result is a second detection result, the normal state is determined as the actual state; if the management processing is a second reconstruction result, the removal state is determined as the actual state.

[0115] Specifically, if the management result of the target hard drive is determined to be an authorization processing result or a comprehensive processing result, the storage system can determine the normal status (i.e., normal state) in the hard drive status configuration table as the actual status of the target hard drive. Optionally, a target hard drive in the normal state can be understood as a data disk in the storage pool that is functioning normally.

[0116] Optionally, if the storage system determines that the management result of the target hard drive is the first detection result and the first detection result indicates that the target hard drive has not been reinserted into the storage pool within a preset time period, it can determine the isolated state (i.e., isolated state) in the hard drive status configuration table as the actual state of the target hard drive. Alternatively, if the target hard drive has not been reinserted into the storage pool within the preset time period, the current state of the target hard drive can be changed to the isolated state. Furthermore, if the remaining storage space in the storage pool is greater than the space threshold, the data in the target hard drive can be reconstructed. After the reconstruction is completed, the isolated state of the target hard drive can be changed to the normal state in the hard drive status configuration table, i.e., the actual state of the target hard drive. If the remaining storage space in the storage pool is less than or equal to the space threshold, it indicates that the remaining storage space cannot meet the storage space requirements for reconstructing the data in the target hard drive. In this case, a target hard drive reinsertion message can be output to remind the user to reinsert the target hard drive into the storage pool. If, within the preset time period after outputting the target hard drive reinsertion message, a reinserted hard drive is detected in the storage pool and this hard drive is the target hard drive, the isolated state of the target hard drive can be changed to the normal state in the hard drive status configuration table, i.e., the actual state of the target hard drive.

[0117] During the reconstruction process, if the storage system detects a re-inserted hard drive in the storage pool that is the target hard drive, it can output a reconstruction stop message, prompting the user to confirm whether to stop the reconstruction process. If the user confirms the stop, the reconstruction process is immediately halted, and the orphaned status of the target hard drive is changed to the normal status in the hard drive status configuration table, i.e., the actual status of the target hard drive. Otherwise, the reconstruction process can continue, and after completion, the orphaned status of the target hard drive can be changed to the zombie status in the hard drive status configuration table, and then automatically changed to the ubad status in the hard drive status configuration table, i.e., the actual status of the target hard drive. Optionally, a target hard drive in the zombie status can be understood as a data disk that is not in the disk selection topology of the storage pool; a target hard drive in the ubad status can be understood as a faulty or disconnected idle disk.

[0118] In practical applications, the target hard drive that is changed to ubad status may be a hard drive that has been mistakenly removed from the storage pool. If such a hard drive is not reinserted into the storage pool within a preset time after being changed to ubad status, the storage system can reclaim the hard drive identifier in the boot sector of the target hard drive to revoke the authorization of the target hard drive and clear the pre-stored resource configuration information related to the target hard drive after the preset time after being changed to ubad status.

[0119] Meanwhile, if the storage system determines that the management result of the target hard drive is the first detection result and the target hard drive has been inserted back into the storage pool within a preset time period, or if the management result is the second detection result, the normal status in the hard drive status configuration table can be determined as the actual status of the target hard drive.

[0120] Additionally, if the storage system determines that the management result of the target hard drive is the second reconstruction result, it can first change the current state of the target hard drive to the "zombie" state in the hard drive status configuration table, and then automatically change the "zombie" state to the "removable" state in the hard drive status configuration table. Optionally, a target hard drive in the "removable" state can be understood as a hard drive in the storage pool that is to be removed.

[0121] During the process of automatically changing the target hard drive's zombie state to a removable state, the storage system can reclaim the hard drive identifier in the target hard drive's boot sector and clear pre-stored resource configuration information related to the target hard drive. Optionally, this resource configuration information may include identifiers of other hard drives in the storage pool corresponding to the business data stored on the target hard drive, and the vendor identifier of the storage system to which the target hard drive belongs.

[0122] It should be noted that, based on the accurate actual status of each hard drive in the storage pool, business requests can be responded to based on the actual status of each hard drive. At least one hard drive in normal status can be selected from the storage pool to process the corresponding business, which can be a data write operation or a data read operation.

[0123] In the technical solutions of this application embodiment, if the management result is an authorization processing result or a comprehensive processing result, the normal state is determined as the actual state; if the management result is a first detection result and the first detection result is not inserted back into the storage pool, the actual state is determined based on the isolated state; if the management result is a first detection result and the first detection result is inserted back into the storage pool, or if the management result is a second detection result, the normal state is determined as the actual state; if the management processing is a second reconstruction result, the removed state is determined as the actual state. The above method can obtain the actual state of the target hard drive based on the reliability management results corresponding to the target hard drive in different scenarios, thereby improving the accuracy of the obtained hard drive state. Furthermore, this process can determine the hard drive state through the hard drive state configuration table, which can also improve the speed and efficiency of accurately determining the hard drive state.

[0124] In some scenarios, the storage pool can be expanded. The process of expanding the storage pool is described below. In one embodiment, as follows... Figure 6 As shown, the above method may further include the following steps:

[0125] S300, responding to a storage pool expansion request.

[0126] During the lifecycle of the storage pool, there may be a need to expand its capacity at any time. When such a need arises, the storage system can automatically trigger an expansion request, and can also receive expansion requests input by the user. Optionally, the information carried in the expansion request may include the number, model, and manufacturer identification of the hard drives to be expanded. Furthermore, the corresponding hard drives to be expanded can be obtained based on the information carried in the expansion request, and at this time, the current status of the hard drives to be expanded can also be obtained. In this embodiment, the current status of the hard drives to be expanded can be a state where they are not added to the storage pool, i.e., a ready state, which indicates that the hard drive to be expanded is an idle disk that is not added to the storage pool.

[0127] S400: Authorize the expansion hard drive and determine the normal status in the hard drive status configuration table as the actual status of the expansion hard drive to complete the expansion of the storage pool.

[0128] Specifically, the storage system can authorize the expansion of the hard drive and determine the normal status in the hard drive status configuration table as the actual status of the expansion hard drive, so as to complete the expansion of the storage pool and improve the storage capacity and redundancy of the storage pool.

[0129] The technical solution in this application embodiment responds to the storage pool expansion request, authorizes the expansion hard drive, and determines the normal status in the hard drive status configuration table as the actual status of the expansion hard drive to complete the storage pool expansion. In the above method, when there is a storage pool expansion requirement, the expansion hard drive can be authorized to improve the availability of the expansion hard drive added to the storage pool, and the actual status of the expansion hard drive can also be obtained to provide reference information for subsequently determining the accuracy and reliability of the storage pool.

[0130] In one embodiment, this application also provides a method for determining the status of a hard disk, applied to a storage system, the method comprising the following steps:

[0131] (1) Obtain the hard disk type of the target hard disk in any storage pool in the storage system; the target hard disk is any hard disk in the storage pool;

[0132] (2) If the hard disk type is a newly added hard disk, then obtain the storage system identifier of the target hard disk; if the storage system identifier is consistent with the identifier of the storage system to which the storage pool belongs, then determine the system used status in the hard disk status configuration table as the current status of the target hard disk; if the storage system identifier is inconsistent with the identifier, then determine the other system used status in the hard disk status configuration table as the current status of the target hard disk; if the storage system identifier is empty, then determine the system unused status in the hard disk status configuration table as the current status of the target hard disk; if the hard disk type is a disconnected hard disk, determine the disconnected status in the hard disk status configuration table as the current status of the target hard disk; if the hard disk type is a faulty hard disk, determine the fault status in the hard disk status configuration table as the current status of the target hard disk; if the hard disk type is a sub-healthy hard disk, determine the sub-healthy status in the hard disk status configuration table as the current status of the target hard disk.

[0133] (3) Based on the current status of the target hard disk in the storage pool, perform reliability management on the target hard disk and determine the management result; the target hard disk is any hard disk existing in the storage pool at the current time or within a historical time period;

[0134] Step (3) above can be achieved through the following steps:

[0135] (31) If the current state is either the system is in a used state or the system is in an unused state, then the target hard disk is granted an authorization, and the authorization result is obtained;

[0136] (32) If the current state is that other systems are already in use, then the target hard disk is formatted and authorized to obtain the comprehensive processing result;

[0137] (33) If the current state is disconnected, check whether the target hard disk has been inserted back into the storage pool within a preset time period to obtain the first detection result;

[0138] (34) If the current state is a fault state, then if the remaining storage space of the storage pool is less than or equal to the preset space threshold, check whether the target hard disk has come back online within the preset time period to obtain the second detection result; if the remaining storage space is greater than the space threshold, reconstruct the data in the target hard disk to obtain the first reconstruction result.

[0139] (35) If the current state is sub-healthy, the data in the target hard disk will be reconstructed if the remaining storage space is greater than the space threshold, and a second reconstruction result will be obtained.

[0140] (4) If the management result is an authorization processing result or a comprehensive processing result, the normal status in the hard disk status configuration table shall be determined as the actual status of the target hard disk; if the management result is a first detection result and the first detection result is not inserted back into the storage pool, the actual status of the target hard disk shall be determined according to the isolated status in the hard disk status configuration table; if the management result is a first detection result and the first detection result is inserted back into the storage pool, or if the management result is a second detection result, the normal status in the hard disk status configuration table shall be determined as the actual status of the target hard disk; if the management processing is a second reconstruction result, the removal status in the hard disk status configuration table shall be determined as the actual status of the target hard disk.

[0141] (5) Responding to storage pool expansion requests;

[0142] (6) Authorize the expansion hard disk and determine the normal status in the hard disk status configuration table as the actual status of the expansion hard disk to complete the expansion of the storage pool.

[0143] For details of the execution process of (1) to (6) above, please refer to the description of the above embodiments. The implementation principle and technical effect are similar, and will not be repeated here.

[0144] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0145] Based on the same inventive concept, this application also provides a hard disk state determination apparatus for implementing the hard disk state determination method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the hard disk state determination apparatus provided below can be found in the limitations of the hard disk state determination method described above, and will not be repeated here.

[0146] In one embodiment, Figure 7 This is a schematic diagram of a hard disk status determination device in one embodiment of this application. The hard disk status determination device provided in this embodiment can be applied to a storage system. Figure 7 As shown, the hard disk status determination device of this application embodiment may include: a reliability management module 11 and a determination module 12, wherein:

[0147] The reliability management module 11 is used to perform reliability management on the target hard disk based on the current status of the target hard disk in the storage pool and determine the management result; the target hard disk is any hard disk existing in the storage pool at the current time or within a historical time period.

[0148] The determination module 12 is used to determine the actual status of the target hard disk from the hard disk status configuration table based on the management results; the hard disk status configuration table includes multiple statuses under different operating stages pre-configured for the hard disk.

[0149] The hard disk status determination device provided in this application embodiment can be used to execute the technical solutions in the above-described hard disk status determination method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0150] In one embodiment, the hard disk status determination device further includes: an acquisition module, wherein:

[0151] The acquisition module is used to obtain the hard drive type of the target hard drive and obtain the current status of the target hard drive based on the hard drive type.

[0152] The hard disk status determination device provided in this application embodiment can be used to execute the technical solutions in the above-described hard disk status determination method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0153] In one embodiment, the acquisition module includes: a first acquisition unit, which is specifically used for:

[0154] If the hard drive type is a newly added hard drive, then obtain the storage system identifier of the target hard drive;

[0155] If the storage system identifier matches the identifier of the storage system to which the storage pool belongs, then the system used status in the hard disk status configuration table will be determined as the current status.

[0156] If the storage system identifier does not match the identifier, then the used status of other systems in the hard disk status configuration table will be determined as the current status;

[0157] If the storage system identifier is empty, the unused system status in the hard disk status configuration table will be determined as the current status.

[0158] The hard disk status determination device provided in this application embodiment can be used to execute the technical solutions in the above-described hard disk status determination method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0159] In one embodiment, the acquisition module further includes a second acquisition unit, which is specifically used for:

[0160] If the hard drive type is a disconnected hard drive, set the disconnected status in the hard drive status configuration table as the current status;

[0161] If the hard drive type is a faulty hard drive, the fault status in the hard drive status configuration table will be set as the current status;

[0162] If the hard drive type is a sub-healthy hard drive, the sub-healthy status in the hard drive status configuration table will be set as the current status.

[0163] The hard disk status determination device provided in this application embodiment can be used to execute the technical solutions in the above-described hard disk status determination method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0164] In one embodiment, the reliability management module 11 is specifically used for:

[0165] If the current status is either "system in use" or "system in use", then the target hard drive will be authorized, and the authorization result will be obtained.

[0166] If the current status is that other systems are already in use, then the target hard drive will be formatted and authorized to obtain a comprehensive processing result.

[0167] If the current status is disconnected, check whether the target hard drive has been inserted back into the storage pool within a preset time period to obtain the first detection result;

[0168] If the current state is a fault state, then if the remaining storage space in the storage pool is less than or equal to a preset space threshold, check whether the target hard drive has come back online within a preset time period to obtain a second detection result; if the remaining storage space is greater than the space threshold, perform data reconstruction processing on the target hard drive to obtain a first reconstruction result.

[0169] If the current state is sub-healthy, then if the remaining storage space is greater than the space threshold, the data in the target hard drive will be reconstructed to obtain the second reconstruction result.

[0170] The hard disk status determination device provided in this application embodiment can be used to execute the technical solutions in the above-described hard disk status determination method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0171] In one embodiment, the hard disk status configuration table includes normal status, orphaned status, and removed status; the determination module 12 is specifically used for:

[0172] If the management result is an authorized processing result or a comprehensive processing result, then the normal state will be determined as the actual state;

[0173] If the management result is the first detection result and the first detection result is not inserted back into the storage pool, then the actual status is determined based on the isolated state;

[0174] If the management result is the first detection result and the first detection result indicates that the device has been inserted back into the storage pool, or if the management result is the second detection result, then the normal state will be determined as the actual state.

[0175] If the management process results in a second reconstruction, then the removed state will be determined as the actual state.

[0176] The hard disk status determination device provided in this application embodiment can be used to execute the technical solutions in the above-described hard disk status determination method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0177] In one embodiment, the hard disk status determination device further includes: a request response module and an authorization processing module, wherein:

[0178] The request and response module is used to respond to storage pool expansion requests;

[0179] The authorization processing module is used to authorize the expansion hard drive and determine the normal status in the hard drive status configuration table as the actual status of the expansion hard drive in order to complete the expansion of the storage pool.

[0180] The hard disk status determination device provided in this application embodiment can be used to execute the technical solutions in the above-described hard disk status determination method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0181] For specific limitations regarding the hard disk status determination device, please refer to the limitations of the hard disk status determination method above, which will not be repeated here. Each module in the aforementioned hard disk status determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0182] In one embodiment, a computer device is also provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides processing power. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores a hard disk status configuration table and the actual status of each hard disk in the system. The network interface communicates with external endpoints via a network connection. When executed by the processor, the computer program implements a hard disk status determination method.

[0183] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0184] In one embodiment, a computer device is also provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the technical solution in the above-described embodiment of the hard disk status determination method of this application. The implementation principle and technical effect are similar, and will not be repeated here.

[0185] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the technical solution of the hard disk state determination method described above in this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0186] In one embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the technical solution of the hard disk state determination method described above in this application. Its implementation principle and technical effects are similar and will not be repeated here.

[0187] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0188] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0189] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for determining the status of a hard disk, characterized in that, The method includes: Based on the current status of the target hard drive in the storage pool, reliability management is performed on the target hard drive, and the management result is determined; the target hard drive is any hard drive existing in the storage pool at the current moment or within a historical time period. Based on the management results, the actual status of the target hard disk is determined from the hard disk status configuration table; the hard disk status configuration table includes multiple statuses under different operating stages pre-configured for the hard disk.

2. The method according to claim 1, characterized in that, Before performing reliability management on the target hard disk based on its current state in the storage pool, the method further includes: Obtain the hard drive type of the target hard drive; The current status of the target hard drive is obtained based on the hard drive type.

3. The method according to claim 2, characterized in that, The step of obtaining the current status of the target hard drive based on the hard drive type includes: If the hard drive type is a newly added hard drive, then obtain the storage system identifier of the target hard drive; If the storage system identifier matches the identifier of the storage system to which the storage pool belongs, then the system used status in the hard disk status configuration table is determined as the current status; If the storage system identifier is inconsistent with the identifier, then the other system used status in the hard disk status configuration table is determined as the current status; If the storage system identifier is empty, then the unused system status in the hard disk status configuration table is determined as the current status.

4. The method according to claim 2, characterized in that, The step of obtaining the current status of the target hard drive based on the hard drive type includes: If the hard drive type is a disconnected hard drive, the disconnected status in the hard drive status configuration table is determined as the current status; If the hard drive type is a faulty hard drive, the fault status in the hard drive status configuration table is determined as the current status; If the hard drive type is a sub-healthy hard drive, the sub-healthy status in the hard drive status configuration table is determined as the current status.

5. The method according to any one of claims 1-4, characterized in that, The step of performing reliability management on the target hard drive based on its current state in the storage pool and determining the management result includes: If the current state is either a system in use state or a system in use state, then the target hard disk is authorized to obtain the authorization result; If the current state is that other systems are already in use, then the target hard drive is formatted and authorized to obtain a comprehensive processing result; If the current state is a disconnected state, then it is detected whether the target hard drive has been inserted back into the storage pool within a preset time period to obtain the first detection result; If the current state is a fault state, then if the remaining storage space of the storage pool is less than or equal to a preset space threshold, it is detected whether the target hard disk has come back online within the preset time period to obtain a second detection result; if the remaining storage space is greater than the space threshold, the data in the target hard disk is reconstructed to obtain a first reconstruction result. If the current state is a sub-healthy state, then if the remaining storage space is greater than the space threshold, the data in the target hard disk will be reconstructed to obtain a second reconstruction result.

6. The method according to any one of claims 1-4, characterized in that, The hard disk status configuration table includes normal status, orphaned status, and removed status; determining the actual status of the target hard disk from the hard disk status configuration table based on the management result includes: If the management result is an authorization processing result or a comprehensive processing result, then the normal state is determined as the actual state; If the management result is the first detection result and the first detection result is that the storage pool has not been inserted back, then the actual state is determined based on the isolated state; If the management result is the first detection result and the first detection result indicates that the storage pool has been inserted back into the storage pool, or if the management result is the second detection result and the second detection result indicates that the normal state is determined as the actual state; If the management process results in a second reconstruction, then the removal state is determined as the actual state.

7. The method according to any one of claims 1-4, characterized in that, The method further includes: In response to the storage pool's expansion request; The expansion hard drive is authorized, and the normal status in the hard drive status configuration table is determined as the actual status of the expansion hard drive, so as to complete the expansion of the storage pool.

8. A hard disk status determination device, characterized in that, The device includes: The reliability management module is used to perform reliability management on the target hard drive based on the current status of the target hard drive in the storage pool and determine the management result; the target hard drive is any hard drive existing in the storage pool at the current time or within a historical time period; The determination module is used to determine the actual status of the target hard disk from the hard disk status configuration table based on the management results; the hard disk status configuration table includes multiple statuses under different operating stages pre-configured for the hard disk.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.

10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.