Solid state disk management method, device and equipment, medium and product
By implementing two-layer monitoring and preset fault detection strategies in distributed storage systems, the problem of rapid redundant protection in the event of SSD failure is solved, and timely identification of the healthy state of SSD and security protection of data is achieved.
Patent Information
- Application Number
- CN202510200150.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-24
AI Technical Summary
The prior art is difficult to identify the healthy status of solid-state drives in a timely and accurate manner, resulting in the inability to quickly and efficiently redundant protection when the SSD disk fails, increasing the risk of data loss.
By implementing two-layer monitoring in a distributed storage system, the service layer is first detected abnormally and determine the abnormal solid-state drive and its type; then the abnormal solid-state drive is detected by using preset fault detection strategies, determine the target protection strategy and perform redundant protection.
It realizes timely and accurate identification of the healthy status of the solid-state drive, ensures fast and efficient redundant protection of the faulty disk, and effectively avoids data loss problems.
Smart Images

Figure CN119724313A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a solid state hard disk management method, and also to a solid state hard disk management device, electronic equipment, non-volatile storage medium and computer program product. Background Art
[0002] Currently, a solid-state drive (SSD) usually deploys multiple DB (DataBase) partitions for OSD services. If an SSD disk fails, multiple OSDs will fail at the same time, and the impact is much greater than a normal disk failure.
[0003] In the related art, when continuous SSD disk failures occur in a short period of time in the storage system, or when SSD failures occur in a scenario close to a super fault domain, since the number of OSDs that fail is large, if the data water level of the cluster storage pool itself is not low, the data on all failed OSDs needs to be reconstructed, and the amount of reconstructed data is large. If the data on a batch of OSDs that fail first has not been reconstructed, the SSD disk that fails later is equivalent to a superimposed failure in a scenario where the data redundancy of the storage pool has been reduced, which will further reduce the redundancy of the data. This scenario will cause the risk of storage data loss to increase rapidly, and may even directly cause the system to super fault domain and cause data loss. For this scenario, the current common solution is usually to regularly detect the disk status and data redundancy status of the system, and to alarm the system health status when a disk abnormality is detected. However, this solution has high requirements on the accuracy of disk detection and the timeliness of staff processing. If the disk failure cannot be identified and processed in time, the data loss problem cannot be avoided.
[0004] Therefore, how to timely and accurately identify the health status of the solid-state drive in order to achieve fast and efficient redundant protection of the failed disk and avoid data loss is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0005] An object of the present invention is to provide a solid-state hard disk management method, which can timely and accurately identify the health status of the solid-state hard disk, help to achieve fast and efficient redundant protection of faulty disks, and effectively avoid data loss problems; another object of the present invention is to provide a solid-state hard disk management device, electronic device, non-volatile storage medium and computer program product, all of which have the above-mentioned beneficial effects.
[0006] In a first aspect, the present invention provides a solid state drive management method, which is applied to a distributed storage system, wherein the distributed storage system includes a service layer and a storage layer, wherein the storage layer is deployed with a plurality of object storage devices, and each of the object storage devices is deployed with a plurality of solid state drives, wherein the method includes:
[0007] Monitoring the service layer in the distributed storage system to determine whether there is an abnormality in the service layer;
[0008] When an abnormality exists in the service layer, an abnormal solid-state hard disk and an abnormal type of the solid-state hard disk are determined in the storage layer; the abnormal type of the solid-state hard disk includes an abnormality of the hard disk itself and / or expiration of the hard disk life;
[0009] When the abnormal type of the solid state hard disk is the abnormality of the hard disk itself, a preset fault detection strategy is used to perform fault detection on the abnormal solid state hard disk to obtain a fault detection result;
[0010] A target protection strategy is determined using the abnormality type of the solid state drive and the fault detection result, and the target protection strategy is used to perform redundant protection on the abnormal solid state drive.
[0011] The step of monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes:
[0012] Monitoring the read and write process of the object storage device of the service layer in the distributed storage system to determine whether an input and output congestion event is monitored;
[0013] If the input and output blocking event is monitored, it is determined that an abnormality exists in the service layer;
[0014] If the input / output congestion event is not monitored, it is determined that there is no abnormality in the service layer.
[0015] The step of monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes:
[0016] Monitoring the read and write process of the object storage device of the service layer in the distributed storage system to determine whether an error code is monitored;
[0017] If the error code is not monitored, it is determined that an abnormality exists in the service layer;
[0018] If the error code is monitored, determining the abnormal disk partition according to the error code;
[0019] If the storage medium to which the abnormal disk partition belongs is a solid state drive, it is determined that an abnormality exists in the service layer;
[0020] If the storage medium to which the abnormal disk partition belongs is not a solid-state hard disk, it is determined that there is no abnormality in the service layer.
[0021] The step of monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes:
[0022] The object storage device startup process of the service layer in the distributed storage system is monitored to determine whether a mount failure event is monitored; wherein the mount failure event includes a disk partition mount failure event and / or a file system mount failure event;
[0023] If the mount failure event is monitored, it is determined that an abnormality exists in the service layer;
[0024] If the mount failure event is not monitored, it is determined that there is no abnormality in the service layer.
[0025] The step of monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes:
[0026] Monitoring the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk removal event is monitored;
[0027] If the hard disk removal event is monitored, it is determined that an abnormality exists in the service layer;
[0028] If the hard disk removal event is not monitored, it is determined that there is no abnormality in the service layer.
[0029] The step of monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes:
[0030] Monitoring the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk life expiration signal is monitored;
[0031] If the hard disk life expiration signal is monitored, it is determined that the service layer is abnormal;
[0032] If the hard disk life expiration signal is not monitored, it is determined that there is no abnormality in the service layer.
[0033] The method of performing fault detection on the abnormal solid state drive using a preset fault detection strategy to obtain a fault detection result includes:
[0034] Collecting parameters of the abnormal solid state hard disk to obtain hard disk parameters; wherein the hard disk parameters include a combination of one or more of power-on time, wear degree, and data writing amount;
[0035] If all the hard disk parameters do not exceed the corresponding parameter thresholds, determining that the fault detection result is that the abnormal solid state hard disk has no fault;
[0036] If any of the hard disk parameters exceeds the corresponding parameter threshold, the fault detection result is determined to be that the abnormal solid state hard disk is faulty.
[0037] The method of performing fault detection on the abnormal solid state drive using a preset fault detection strategy to obtain a fault detection result includes:
[0038] Obtaining a hard disk log corresponding to the abnormal solid state hard disk in the system log;
[0039] If there is no hard disk error log in the hard disk log, determining that the fault detection result is that the abnormal solid state hard disk has no fault;
[0040] If the hard disk error log exists in the hard disk log, it is determined that the fault detection result is that the abnormal solid state hard disk has a fault.
[0041] The method of performing fault detection on the abnormal solid state drive using a preset fault detection strategy to obtain a fault detection result includes:
[0042] Determining whether abnormal error information about the abnormal solid state hard disk is received;
[0043] If no abnormal error information about the abnormal solid state hard disk is received, determining that the fault detection result is that the abnormal solid state hard disk has no fault;
[0044] If abnormal error information about the abnormal solid state hard disk is received, it is determined that the fault detection result is that the abnormal solid state hard disk is faulty.
[0045] Wherein, the solid state hard disk management method further includes:
[0046] When the fault detection result indicates that the abnormal solid state hard disk is faulty, determining the fault object storage device to which the abnormal solid state hard disk belongs;
[0047] Control the faulty object storage device to stop running.
[0048] Wherein, determining a target protection strategy by using the abnormal type of the solid state drive and the fault detection result, and performing redundant protection on the abnormal solid state drive by using the target protection strategy, includes:
[0049] Determine the abnormal scenario corresponding to the abnormal solid-state hard disk according to the abnormal type of the solid-state hard disk and the fault detection result; wherein the abnormal scenario includes a scenario of continuous hard disk failure in a short period of time and / or a scenario of hard disk expiration in a state close to a super fault domain; the scenario of continuous hard disk failure in a short period of time indicates that a preset number of solid-state hard disks in the distributed storage system fail within a preset time period; the scenario of hard disk expiration in a state close to a super fault domain indicates that the number of data reconstruction members in the object storage device to which the solid-state hard disk with expired life belongs is not less than the minimum redundancy number of the object storage device;
[0050] The target protection strategy is determined according to the abnormal scenario corresponding to the abnormal solid state drive, and the target protection strategy is used to perform redundant protection on the abnormal solid state drive.
[0051] Wherein, determining the abnormal scenario corresponding to the abnormal solid state drive according to the abnormal type of the solid state drive and the fault detection result includes:
[0052] If the abnormal type of the solid state hard disk is that the hard disk itself is abnormal, and the fault detection result is that the abnormal solid state hard disk is faulty, then obtaining the abnormal time node of the abnormal solid state hard disk;
[0053] If the time interval between the abnormal time node of the abnormal solid state hard disk and the abnormal time node of the historical abnormal solid state hard disk does not exceed the first time length, it is determined that the abnormal scenario is a scenario of continuous hard disk failure within the short period of time.
[0054] Wherein, determining the abnormal scenario corresponding to the abnormal solid state drive according to the abnormal type of the solid state drive and the fault detection result includes:
[0055] If the abnormal type of the solid state hard disk is that the hard disk has expired, determining the expired object storage device to which the abnormal solid state hard disk belongs;
[0056] If there is a placement group in the expired object storage device, it is determined that the abnormal scenario is a hard disk expiration scenario in the near super fault domain state.
[0057] Wherein, when the abnormal scenario is a scenario of continuous hard disk failures within a short period of time, redundant protection is performed on the abnormal solid-state hard disk using the target protection strategy, including:
[0058] An abnormal tag is set for all the object storage devices in the distributed storage system to block all write operations in all the object storage devices and output a first alarm prompt.
[0059] Wherein, when the abnormal scenario is the hard disk expiration scenario in the state close to the super fault domain, the target protection strategy is used to perform redundant protection on the abnormal solid state hard disk, including:
[0060] Determine the abnormal object storage device to which the abnormal solid state hard disk in the distributed storage system belongs;
[0061] An abnormal tag is set for the abnormal object storage device to block all write operations in the abnormal object storage device and output a second alarm prompt.
[0062] Wherein, determining the abnormal scenario corresponding to the abnormal solid state drive according to the abnormal type of the solid state drive and the fault detection result includes:
[0063] Determine a time point for obtaining the fault detection result;
[0064] When the interval duration between the time node and the current time node reaches a second duration, the abnormal scenario corresponding to the abnormal solid state drive is determined according to the abnormal type of the solid state drive and the fault detection result.
[0065] In a second aspect, the present invention further discloses a solid state drive management device, which is applied to a distributed storage system, wherein the distributed storage system includes a service layer and a storage layer, wherein the storage layer is deployed with a plurality of object storage devices, and each of the object storage devices is deployed with a plurality of solid state drives, wherein the device includes:
[0066] A monitoring module, used to monitor the service layer in the distributed storage system to determine whether there is an abnormality in the service layer;
[0067] A determination module, configured to determine an abnormal solid-state drive and an abnormal type of the solid-state drive at the storage layer when an abnormality exists at the service layer; the abnormal type of the solid-state drive includes an abnormality of the hard drive itself and / or expiration of the hard drive life;
[0068] A detection module, used for, when the abnormal type of the solid state hard disk is the abnormality of the hard disk itself, performing fault detection on the abnormal solid state hard disk using a preset fault detection strategy to obtain a fault detection result;
[0069] The protection module is used to determine a target protection strategy using the abnormal type of the solid state drive and the fault detection result, and to perform redundant protection on the abnormal solid state drive using the target protection strategy.
[0070] In a third aspect, the present invention further discloses an electronic device, comprising:
[0071] Memory for storing computer programs;
[0072] A processor is used to implement the steps of any one of the solid state drive management methods described above when executing the computer program.
[0073] In a fourth aspect, the present invention further discloses a non-volatile storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the solid-state hard disk management methods described above are implemented.
[0074] In a fifth aspect, the present invention further discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any one of the solid-state hard disk management methods described above.
[0075] The present invention provides a solid-state hard disk management method, which is applied to a distributed storage system. The distributed storage system includes a service layer and a storage layer. The storage layer is deployed with multiple object storage devices, and each of the object storage devices is deployed with multiple solid-state hard disks. The method includes: monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality; when the service layer has an abnormality, determining an abnormal solid-state hard disk and an abnormal type of the solid-state hard disk in the storage layer; the abnormal type of the solid-state hard disk includes an abnormality of the hard disk itself and / or expiration of the hard disk life; when the abnormal type of the solid-state hard disk is an abnormality of the hard disk itself, performing fault detection on the abnormal solid-state hard disk using a preset fault detection strategy to obtain a fault detection result; determining a target protection strategy using the abnormal type of the solid-state hard disk and the fault detection result, and performing redundant protection on the abnormal solid-state hard disk using the target protection strategy.
[0076] By applying the technical solution provided by the present invention, firstly, an abnormality detection is performed on the service layer in the distributed storage system to determine whether an abnormality problem of a solid-state hard disk may occur in the distributed storage system, and when an abnormality exists in the service layer, the abnormal solid-state hard disk and the abnormal type of the solid-state hard disk are determined in the storage layer. Thus, the abnormal solid-state hard disk can be re-detected for faults using a preset solid-state hard disk fault detection strategy to determine whether the abnormal solid-state hard disk is indeed faulty, thereby determining the target protection strategy corresponding to the abnormal solid-state hard disk according to the abnormal type of the solid-state hard disk and the fault detection result, and realizing redundant protection of the abnormal solid-state hard disk based on the target protection strategy. It can be seen that the technical solution realizes double-layer monitoring of the service layer and the storage layer in the distributed storage system, taking into account multiple situations such as the expiration of the hard disk life, the real hard disk failure, and the hard disk abnormal scenario, and can timely and accurately identify the health status of the solid-state hard disk, which helps to realize fast and efficient redundant protection of the faulty disk, and further avoid the problem of data loss.
[0077] The solid state drive management device, electronic device, non-volatile storage medium and computer program product provided by the present invention also have the above-mentioned technical effects, and the present invention will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present invention, the following briefly introduces the drawings required for describing the prior art and the embodiments of the present invention. Of course, the drawings related to the embodiments of the present invention described below are only part of the embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present invention.
[0079] Figure 1 A schematic diagram of the structure of a distributed storage system provided by an embodiment of the present invention;
[0080] Figure 2 A schematic diagram of a flow chart of a solid state hard disk management method provided by an embodiment of the present invention;
[0081] Figure 3 A schematic diagram of a flow chart of another solid state drive management method provided by an embodiment of the present invention;
[0082] Figure 4 A timing diagram of the interaction process in a scenario where a solid-state hard disk fails continuously within a short period of time provided by an embodiment of the present invention;
[0083] Figure 5 A schematic diagram of an algorithm processing flow of a Monitor provided by an embodiment of the present invention in a scenario where a solid state drive fails continuously within a short period of time;
[0084] Figure 6 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid state drive fails continuously within a short period of time due to an IO error;
[0085] Figure 7 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid state drive fails continuously within a short period of time due to IO jamming;
[0086] Figure 8 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid-state hard disk fails continuously within a short period of time due to a disk partition mounting failure;
[0087] Fig. 9 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid state drive fails continuously within a short period of time due to a DB mounting failure;
[0088] Fig.10 A schematic diagram of an algorithm processing flow of a Monitor provided by an embodiment of the present invention in a scenario where a solid state drive expires in a scenario close to a super failure;
[0089] Fig.11 A schematic diagram of the structure of a solid state drive management device provided by an embodiment of the present invention;
[0090] Fig.12 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0091] The core of the present invention is to provide a solid-state hard disk management method, which can timely and accurately identify the health status of the solid-state hard disk, help to achieve fast and efficient redundant protection of faulty disks, and effectively avoid data loss problems; another core of the present invention is to provide a solid-state hard disk management device, electronic device, non-volatile storage medium and computer program product, all of which have the above-mentioned beneficial effects.
[0092] In order to describe the technical solutions in the embodiments of the present invention more clearly and completely, the technical solutions in the embodiments of the present invention will be introduced below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0093] An embodiment of the present invention provides a solid state hard disk management method.
[0094] First, please refer to Figure 1 , Figure 1 A structural diagram of a distributed storage system provided by an embodiment of the present invention, the distributed storage system may include a storage layer, a service layer, and an interface layer, wherein a plurality of object storage devices are deployed in the storage layer, and a plurality of solid-state hard disks are deployed in each object storage device; wherein the interface layer is used to connect to each user device, the storage layer is used to implement distributed data storage, and the service layer is connected to the interface layer and the storage layer, and is used to execute the user business received by the interface layer using the storage data of the storage layer. The solid-state hard disk management method provided by an embodiment of the present invention is implemented based on the distributed storage system.
[0095] For further information, please refer to Figure 2 , Figure 2 This is a flow chart of a solid state drive management method provided by an embodiment of the present invention. The solid state drive management method may include the following S101 to S104.
[0096] S101: Monitor the service layer in the distributed storage system to determine whether there is an abnormality in the service layer.
[0097] This step aims to realize the service layer monitoring in the distributed storage system to determine whether there is any abnormality in its service layer. In the specific implementation process, it can be mainly to monitor the input and output services and / or storage object services running in the service layer, wherein the input and output services are the read and write services about the storage layer, and the storage object services are the startup services and running services about the storage layer. It can be understood that when the input and output services and storage object services in the storage system are abnormal, these abnormalities may be caused by the failure of the solid-state hard disk. Therefore, the input and output services and / or storage object services in the distributed storage system can be used to determine whether the storage system may have a solid-state hard disk abnormality problem. Based on this, the service layer of the distributed storage system can be monitored to obtain the input and output services and / or storage object services therein, thereby realizing the judgment of service layer abnormalities.
[0098] Furthermore, the following embodiments provide several different service layer abnormality judgment methods. It can be understood that in actual application scenarios, the following judgment methods can exist at the same time, or one or part of them can be selected and executed. The present invention does not limit this.
[0099] In one embodiment of the present invention, monitoring the service layer in a distributed storage system to determine whether there is an abnormality in the service layer may include: monitoring the read and write process of the object storage device in the service layer in the distributed storage system to determine whether an input and output blocking event is monitored; if an input and output blocking event is monitored, determining that there is an abnormality in the service layer; if no input and output blocking event is monitored, determining that there is no abnormality in the service layer. That is, in the read and write process of each object storage device in the storage layer, if an input and output blocking event (i.e., an IO stuck problem) is triggered, it can be considered that there is an abnormality in the service layer, otherwise, it is considered that there is no abnormality in the service layer.
[0100] In one embodiment of the present invention, the service layer in the distributed storage system is monitored to determine whether there is an abnormality in the service layer, including: monitoring the read and write process of the object storage device in the service layer of the distributed storage system to determine whether an error code is monitored; if no error code is monitored, determining that there is an abnormality in the service layer; if an error code is monitored, determining the abnormal disk partition according to the error code; if the storage medium to which the abnormal disk partition belongs is a solid-state hard disk, determining that there is an abnormality in the service layer; if the storage medium to which the abnormal disk partition belongs is not a solid-state hard disk, determining that there is no abnormality in the service layer. That is, in the read and write process for each object storage device in the storage layer, if the read and write operation returns an error code (an error code less than 0), and the abnormal disk partition corresponding to the read and write operation belongs to a solid-state hard disk (because it may also belong to other types of storage media), it can be considered that there is an abnormality in the service layer, otherwise, it is considered that there is no abnormality in the service layer.
[0101] In one embodiment of the present invention, the service layer in the distributed storage system is monitored to determine whether there is an abnormality in the service layer, including: monitoring the object storage device startup process of the service layer in the distributed storage system to determine whether a mount failure event is monitored; wherein the mount failure event includes a disk partition mount failure event and / or a file system mount failure event; if a mount failure event is monitored, it is determined that there is an abnormality in the service layer; if no mount failure event is monitored, it is determined that there is no abnormality in the service layer. That is to say, during the startup process of each storage object device in the distributed storage system, if a mount failure event is triggered, such as a disk partition mount failure event and / or a file system mount failure event, it can be considered that there is an abnormality in the service layer, otherwise, it is considered that there is no abnormality in the service layer.
[0102] In one embodiment of the present invention, the service layer in the distributed storage system is monitored to determine whether there is an abnormality in the service layer, including: monitoring the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk removal event is monitored; if a hard disk removal event is monitored, it is determined that there is an abnormality in the service layer; if a hard disk removal event is not monitored, it is determined that there is no abnormality in the service layer. That is to say, during the startup process of each storage object device in the distributed storage system, and / or during the read and write process of each object storage device, if a hard disk removal event (udev remove event) is triggered, it can be considered that there is an abnormality in the service layer, otherwise, it is considered that there is no abnormality in the service layer.
[0103] In one embodiment of the present invention, the service layer in the distributed storage system is monitored to determine whether there is an abnormality in the service layer, including: monitoring the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk life expiration signal is monitored; if a hard disk life expiration signal is monitored, it is determined that there is an abnormality in the service layer; if a hard disk life expiration signal is not monitored, it is determined that there is no abnormality in the service layer. That is to say, during the startup process of each storage object device in the distributed storage system, and / or during the read and write process of each object storage device, if a hard disk life expiration signal is detected, it can be considered that there is an abnormality in the service layer, otherwise, it is considered that there is no abnormality in the service layer.
[0104] S102: When an abnormality exists in the service layer, an abnormal solid state drive and an abnormal type of the solid state drive are determined in the storage layer; the abnormal type of the solid state drive includes an abnormality of the hard drive itself and / or expiration of the hard drive life.
[0105] This step aims to determine the abnormal SSD and the abnormal type of the SSD. That is, when it is determined that the service layer is abnormal, the abnormal SSD in the storage layer of the distributed storage system (i.e., the abnormal SSD exists, and the number of SSDs in the distributed storage system is not unique) and the abnormal type of the abnormal SSD can be further determined. Among them, the abnormal types of SSDs include abnormalities of the hard disk itself and expiration of the hard disk life. The abnormality of the hard disk itself means that the SSD itself has an abnormal problem, and the expiration of the hard disk life means that the SSD life expires and needs to be replaced with a new SSD.
[0106] S103: When the abnormal type of the solid state hard disk is the abnormality of the hard disk itself, a preset fault detection strategy is used to perform fault detection on the abnormal solid state hard disk to obtain a fault detection result.
[0107] This step is intended to achieve fault detection of abnormal solid-state hard drives. It is understandable that even if it is possible to determine whether there is an abnormal solid-state hard drive problem in the storage layer based on whether there is an abnormality in the service layer of the distributed storage system, and the abnormal solid-state hard drives in the distributed storage system can be determined, it is impossible to determine whether the abnormal solid-state hard drive really has a fault problem. For example, the solid-state hard drive abnormality will also be triggered in the disk replacement scenario, but this does not mean that the solid-state hard drive is faulty. Therefore, when it is determined that the abnormal type of the abnormal solid-state hard drive is an abnormality of the hard drive itself, a fault detection can be performed on the abnormal solid-state hard drive using a pre-set fault detection strategy to determine whether the abnormal solid-state hard drive really has a fault problem. It is understandable that the fault detection result is that the abnormal solid-state hard drive has a fault or the abnormal solid-state hard drive does not have a fault.
[0108] Furthermore, the following embodiments provide several different implementation methods for performing fault detection on abnormal solid-state hard drives using preset fault detection strategies. It can be understood that in actual application scenarios, the following detection methods may exist at the same time, or one or all of them may be selected and executed, and the present invention does not limit this.
[0109] In one embodiment of the present invention, a fault detection is performed on an abnormal solid-state hard disk using a preset fault detection strategy to obtain a fault detection result, which may include: collecting parameters of the abnormal solid-state hard disk to obtain hard disk parameters; wherein the hard disk parameters include a combination of one or more of power-on time, wear degree, and data write volume; if all hard disk parameters do not exceed the corresponding parameter threshold, the fault detection result is determined to be that the abnormal solid-state hard disk does not have a fault; if any hard disk parameter exceeds the corresponding parameter threshold, the fault detection result is determined to be that the abnormal solid-state hard disk has a fault. In other words, when the value of any type of hard disk parameter in the abnormal solid-state hard disk does not meet the corresponding threshold range (i.e., the above-mentioned parameter threshold), it can be determined that the abnormal solid-state hard disk has a fault, otherwise it can be considered that the abnormal solid-state hard disk does not have a fault. It should be noted that the specific values of the various parameter thresholds are determined by the performance of the solid-state hard disk itself, and do not affect the implementation of the present technical solution, and the present invention does not limit this.
[0110] In one embodiment of the present invention, a preset fault detection strategy is used to perform fault detection on an abnormal solid-state hard disk to obtain a fault detection result, which may include: obtaining a hard disk log corresponding to the abnormal solid-state hard disk in the system log; if there is no hard disk error log in the hard disk log, determining that the fault detection result is that the abnormal solid-state hard disk is not faulty; if there is a hard disk error log in the hard disk log, determining that the fault detection result is that the abnormal solid-state hard disk is faulty. In other words, when a hard disk error log appears in the system log of the storage system, it can be determined that the abnormal solid-state hard disk is faulty, otherwise it can be considered that the abnormal solid-state hard disk is not faulty. It can be understood that this process can be achieved by directly retrieving the system log for log analysis.
[0111] In one embodiment of the present invention, using a preset fault detection strategy to perform fault detection on an abnormal solid-state hard disk and obtaining a fault detection result may include: determining whether abnormal error information about the abnormal solid-state hard disk is received; if abnormal error information about the abnormal solid-state hard disk is not received, determining the fault detection result is that the abnormal solid-state hard disk does not have a fault; if abnormal error information about the abnormal solid-state hard disk is received, determining the fault detection result is that the abnormal solid-state hard disk has a fault. That is to say, in an actual operation scenario, if the execution subject (the main control module of the storage system) receives abnormal error information about the abnormal solid-state hard disk from any source, it can be determined that the abnormal solid-state hard disk has a fault, otherwise it can be considered that the abnormal solid-state hard disk does not have a fault.
[0112] In one embodiment of the present invention, the SSD management method may further include: when the fault detection result indicates that the abnormal SSD is faulty, determining the faulty object storage device to which the abnormal SSD belongs; and controlling the faulty object storage device to stop running.
[0113] It is understandable that when it is determined that the abnormal solid-state hard drive is indeed faulty, since the abnormal solid-state hard drive can no longer provide storage services, the faulty object storage device corresponding to the abnormal solid-state hard drive can be directly controlled to stop running, so as to effectively avoid data loss caused by the generation of new data but the inability to store it.
[0114] S104: Determine a target protection strategy using the abnormality type of the solid state drive and the fault detection result, and perform redundant protection on the abnormal solid state drive using the target protection strategy.
[0115] This step aims to achieve redundant protection of abnormal solid-state drives. Specifically, different protection strategies can be pre-set for different SSD abnormality types and fault detection results. Therefore, after determining the abnormality type and fault detection result of the abnormal solid-state drive, the corresponding target protection strategy can be determined by combining the two, so as to achieve redundant protection of the abnormal solid-state drive using the target protection strategy.
[0116] It can be seen that the SSD management method provided by the embodiment of the present invention first determines whether there may be an abnormal SSD problem in the distributed storage system by performing an abnormality detection on the service layer in the distributed storage system, and determines the abnormal SSD and the abnormal type of the SSD in the storage layer when there is an abnormality in the service layer. Thus, the abnormal SSD can be re-detected using the preset SSD fault detection strategy to determine whether the abnormal SSD is indeed faulty, thereby determining the target protection strategy corresponding to the abnormal SSD according to the SSD abnormality type and the fault detection result, and realizing redundant protection of the abnormal SSD based on the target protection strategy. It can be seen that the technical solution realizes double-layer monitoring of the service layer and the storage layer in the distributed storage system, taking into account multiple situations such as the expiration of the hard disk life, the real hard disk failure, and the hard disk abnormal scenario, and can timely and accurately identify the health status of the solid-state hard disk, which helps to realize fast and efficient redundant protection of the faulty disk, and further avoid the problem of data loss.
[0117] Based on the above embodiments:
[0118] In one embodiment of the present invention, a target protection strategy is determined using an abnormal type of a solid-state drive and a fault detection result, and redundant protection is performed on the abnormal solid-state drive using the target protection strategy, including: determining an abnormal scenario corresponding to the abnormal solid-state drive according to the abnormal type of the solid-state drive and the fault detection result; wherein the abnormal scenario includes a scenario of continuous hard disk failures in a short period of time and / or a scenario of hard disk expiration in a state approaching a super fault domain; a scenario of continuous hard disk failures in a short period of time indicates that a preset number of solid-state drives in a distributed storage system fail within a preset time period; a scenario of hard disk expiration in a state approaching a super fault domain indicates that the number of data reconstruction members in an object storage device to which the solid-state drive whose life has expired belongs is not less than the minimum redundancy number of the object storage device; a target protection strategy is determined according to the abnormal scenario corresponding to the abnormal solid-state drive, and redundant protection is performed on the abnormal solid-state drive using the target protection strategy.
[0119] Specifically, based on the SSD abnormality type and fault detection results, the abnormal scenario in which the abnormal SSD is currently located can be determined. The abnormal scenario mainly includes the scenario of continuous hard disk failure in a short period of time and the scenario of hard disk expiration in the state of approaching super fault domain. Therefore, the determination of the target protection strategy can be realized according to different abnormal scenarios (different abnormal scenarios correspond to different protection strategies). Furthermore, the following two embodiments respectively provide identification methods for the scenario of continuous hard disk failure in a short period of time and the scenario of hard disk expiration in the state of approaching super fault domain.
[0120] In one embodiment of the present invention, the abnormal scene corresponding to the abnormal solid-state hard disk is determined according to the abnormal type of the solid-state hard disk and the fault detection result, including: if the abnormal type of the solid-state hard disk is that the hard disk itself is abnormal, and the fault detection result is that the abnormal solid-state hard disk has a fault, then the abnormal time node of the abnormal solid-state hard disk is obtained; if the time interval between the abnormal time node of the abnormal solid-state hard disk and the abnormal time node of the historical abnormal solid-state hard disk does not exceed the first duration, then the abnormal scene is determined to be a scene of continuous hard disk failure in a short period of time. As described above, the scene of continuous hard disk failure in a short period of time is a problem that a distributed storage system has multiple (two in this embodiment, of course, more) solid-state hard disk failures in a short period of time. Therefore, the detection time interval between two adjacent abnormal solid-state hard disks can be referred to to achieve the identification of the scene of continuous hard disk failure in a short period of time. It should be noted that the specific value of the above-mentioned first duration does not affect the implementation of the present technical solution, and can be set by the technician according to the actual situation. For example, it can be set to 3 days, and the present invention does not limit this.
[0121] In one embodiment of the present invention, the abnormal scenario corresponding to the abnormal solid-state hard disk is determined according to the abnormal type of the solid-state hard disk and the fault detection result, including: if the abnormal type of the solid-state hard disk is the expiration of the hard disk life, then the expired object storage device to which the abnormal solid-state hard disk belongs is determined; if there is a placement group in the expired object storage device, then the abnormal scenario is determined to be a hard disk expiration scenario in the state of approaching super fault domain. That is to say, when the life of the solid-state hard disk expires, if there is a placement group in any storage object device to which it belongs, it can be considered that the current abnormal scenario is a hard disk expiration scenario in the state of approaching super fault domain, because when the life of the solid-state hard disk expires, if there is a placement group in the storage object device to which it belongs, it means that the number of members for data reconstruction in the storage object device is already at its corresponding minimum redundancy number (determined by the performance of the corresponding object storage device). If the solid-state hard disk abnormality occurs again or the solid-state hard disk that has expired is not replaced, it will inevitably cause the overall abnormality of the distributed storage system and cause data loss problems.
[0122] Furthermore, the following two embodiments respectively provide target protection strategies for the scenario of continuous hard disk failures in a short period of time and the scenario of hard disk expiration in the state of approaching super fault domain, so as to realize the redundant protection of abnormal solid state hard disks, which may specifically include:
[0123] When the abnormal scenario is a continuous hard disk failure scenario in a short period of time, redundant protection is performed on the abnormal solid-state hard disk using the target protection strategy, which may include: setting abnormal tags for all object storage devices in the distributed storage system to block all write operations in all object storage devices and outputting a first alarm prompt.
[0124] When the abnormal scenario is a hard disk expiration scenario in a state close to a super fault domain, redundant protection is performed on the abnormal solid-state hard disk using a target protection strategy, which may include: determining the abnormal object storage device to which the abnormal solid-state hard disk belongs in the distributed storage system; setting an abnormal tag for the abnormal object storage device to block all write operations in the abnormal object storage device, and outputting a second alarm prompt.
[0125] It should be noted that the above-mentioned write operations mainly include business write operations and data reconstruction operations in the distributed storage system.
[0126] In one embodiment of the present invention, determining the abnormal scenario corresponding to the abnormal solid-state hard disk based on the abnormal type of the solid-state hard disk and the fault detection result can include: determining the time node for obtaining the fault detection result; when the interval between the time node and the current time node reaches a second time length, determining the abnormal scenario corresponding to the abnormal solid-state hard disk based on the abnormal type of the solid-state hard disk and the fault detection result.
[0127] Specifically, after obtaining the fault detection result, you can enter the waiting state from the moment the fault detection result is obtained and continue for a preset time, that is, the above-mentioned second time, and then perform the step of determining the abnormal scene corresponding to the abnormal solid-state hard disk according to the abnormal type of the solid-state hard disk and the fault detection result. It can be understood that through this implementation method, a time window can be set aside for normal disk replacement and maintenance operations to effectively distinguish between disk replacement operations and hard disk failure scenarios, avoid false triggering of the redundant protection mechanism for abnormal solid-state hard disks, and ensure the accuracy of solid-state hard disk management. It should be noted that the specific value of the above-mentioned second time does not affect the implementation of the present technical solution, and can be set by technical personnel according to actual conditions. For example, it can be set to 10 minutes, and the present invention does not limit this.
[0128] An embodiment of the present invention provides another solid state drive management method.
[0129] First, the SSD management method provided by the present invention mainly includes three modules: SSD health status detection module, SSD abnormal scene recognition module, abnormal post-processing module, and the specific implementation functions of each module are as follows:
[0130] 1. Solid-state drive health status detection module: By calling this module, the specified solid-state drive is detected to determine whether the solid-state drive has any faults and whether it meets the standard of disk failure.
[0131] 2. SSD abnormal scenario identification module: This module is implemented in the service layer of the distributed storage system. It mainly senses whether specified abnormal scenarios have occurred in the relevant processes of business input and output services and storage object services. These abnormal scenarios may be caused by SSD failures. Therefore, after detecting the occurrence of these scenarios, it is necessary to call the SSD health status detection module to detect the specified SSD. If the SSD is detected to have indeed failed, the relevant command line can be called to report to the distributed storage system monitoring service (Monitor).
[0132] 3. Exception post-processing module: This module is mainly implemented in the Monitor and storage layers. It determines the specific exception situation based on the reported information in 2 and executes the corresponding processing logic.
[0133] For further information, please refer to Figure 3 , Figure 3 This is a flow chart of another solid state drive management method provided by an embodiment of the present invention. Based on the above functional modules, the specific implementation process of the solid state drive management method provided by the present invention is as follows:
[0134] 1. During the startup and operation process (mainly reading and writing process) of the storage object device, the following abnormality detection will be performed:
[0135] (1) During the startup process, whether there is a disk partition mounting failure or a file system mounting failure;
[0136] (2) Whether IO stuck during operation;
[0137] (3) Whether IO error occurs during operation;
[0138] (4) During the operation, whether the disk is dropped or pulled out, triggering the udev remove event;
[0139] (5) During operation, whether the solid-state drive reaches the end of its life.
[0140] 2. If an abnormality is detected according to step 1, it is necessary to determine whether the abnormality is due to the SSD itself (i.e. (1), (2), (3), (4) in step 1) or the SSD life has expired (i.e. (5) in step 1). If the abnormality is due to the SSD itself, the SSD health status detection module of the underlying software is called to detect the corresponding SSD to confirm whether the SSD is currently faulty. If the SSD life has expired, it can be directly reported to the Monitor.
[0141] 3. If the test result of calling the SSD health status detection module returns that the SSD is faulty, the relevant information (SSD information, object storage device information, etc.) can be reported to the Monitor, and the storage object service can be exited after reporting. Among them, the function of the SSD health status detection module mainly depends on:
[0142] (1) Determine whether the SSD's power-on time, wear, data write volume and other hard disk parameters exceed the limit;
[0143] (2) Determine whether there is any log information related to hardware error in the system log of the solid state drive;
[0144] (3) Determine whether there is any abnormal error information in the acquired solid state drive information.
[0145] 4. After receiving the reported information, Monitor records and updates the abnormal SSD and determines:
[0146] (1) Whether there are continuous and complete failures of the SSD within a short period of time: Set a short-term threshold (such as 3 days). If the SSD is continuously and completely damaged and cannot be repaired within this time range, and the service on the SSD can no longer be pulled up normally, then this failure scenario is met. If this failure scenario is triggered, it is usually because the SSD itself may have abnormal failure reasons (such as SSD software bugs, etc.), causing the SSD to reach the current abnormal failure frequency. Usually, when such reasons exist, other SSDs in the storage system may also be at risk of continuing to be damaged in a short period of time, which may cause the object storage device to exceed the fault domain and cause data loss problems.
[0147] (2) Is there a system in a state where the SSD lifespan expires while approaching the super fault domain state: The object storage device is currently in a state where it is approaching the super fault domain state, that is, some data in the current cluster has no redundancy, and any damage to any data will lead to a super fault domain state (for example, a cluster has already had several SSDs damaged, but data reconstruction has not yet been completed). Usually, the expiration of the SSD lifespan is a prediction, that is, when the lifespan reaches the expiration standard, the SSD will not be damaged immediately, and the services on the disk will not fail immediately. However, when an alarm appears that the SSD is about to be damaged while the cluster has no redundancy, it also means that the cluster currently has a super fault domain risk, which is essentially the same as the risk in the failure scenario (1).
[0148] 5. If it is a continuous SSD failure scenario, all object storage devices in the storage system will be marked with SSD abnormality tags, and write operations on all object storage devices, including business writes and data reconstruction, will be blocked, and an alarm will be reported; if the SSD life is about to expire in a super-fault domain scenario, the related object storage devices of the SSD whose life is expired (that is, the above-mentioned abnormal object storage devices) will be marked with SSD abnormality tags, and write operations on these object storage devices, including business writes and data reconstruction, will be blocked, and an alarm will be reported.
[0149] Furthermore, the following describes the processing flow of the two fault scenarios in detail:
[0150] 1. The solid-state drive fails continuously within a short period of time.
[0151] First, please refer to Figure 4 , Figure 4 The timing diagram of the interaction process in the scenario of continuous failure of solid state drives within a short period of time provided by the embodiment of the present invention is based on Figure 4It can be seen that the overall detection mechanism triggering action of continuous SSD failures in a short period of time is performed by the object storage service. When the object storage service senses an abnormality at the business process level, it calls the SSD health status detection module of the underlying software, and the SSD health status detection module is always in a passive call state. After that, based on the output results of the SSD health status detection module, it decides whether to report relevant information to the Monitor, and then the Monitor decides whether to block the write action in the distributed storage system and report an alarm. In the entire process, the object storage service triggers the mechanism, the underlying software performs a specific inspection of the hardware, and finally the Monitor makes the final decision.
[0152] For further information, please refer to Figure 5 , Figure 5 A schematic diagram of an algorithm processing flow of a Monitor provided by an embodiment of the present invention in a scenario where a solid-state hard disk fails continuously within a short period of time, and the implementation process is as follows:
[0153] (1) After receiving the reported information, the Monitor records the information, including the reported information and the time when the reported information was received.
[0154] (2) After recording the information, wait for 10 minutes before judging the fault scenario. The purpose is to leave a time window for normal disk replacement operation to distinguish between disk replacement operation and hard disk failure scenario. If it is a disk replacement operation, the udev remove event will be triggered when the solid-state hard disk is unplugged, reporting the solid-state hard disk abnormality; and when the solid-state hard disk is plugged back in, the udev add event will be triggered to report the elimination of the solid-state hard disk abnormality and delete the abnormal solid-state hard disk caused by the disk unplugging just recorded by the Monitor. This can prevent the normal operation and maintenance disk replacement process from accidentally triggering the redundant protection mechanism when the disk is unplugged.
[0155] (3) Determine the time interval for abnormal SSD reports. If it is the first SSD to report, the time interval is 0. If it is not the first SSD, calculate the time interval with the previous abnormal SSD report time, and determine whether it meets the time threshold for continuous failure of the SSD in a short period of time (assuming it is 3 days).
[0156] (4) If the judgment criteria for continuous SSD failures within a short period of time are met, all object storage devices in the distributed storage system will be marked with SSD abnormality tags to block all write operations and report an alarm.
[0157] Finally, please refer to Figures 6 to 9 , Figure 6 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid state drive fails continuously within a short period of time due to an IO error. Figure 7 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid state drive fails continuously within a short period of time due to IO jamming. Figure 8 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid-state hard disk fails continuously within a short period of time due to a disk partition mounting failure. Fig. 9 A schematic diagram of an algorithm processing flow of an OSD service provided by an embodiment of the present invention in a scenario where a solid state drive fails continuously within a short period of time due to a DB mount failure. Figures 6 to 9 As can be seen from the figure, the detection logic of the OSD service in the scenario of continuous SSD failures in a short period of time is mainly as follows:
[0158] (1) Identify abnormal scenarios (IO error, IO jam, mount failure, etc.).
[0159] (2) Under different abnormal scenarios, different strategies are used to obtain the current storage medium and determine whether the current storage medium is a solid-state drive.
[0160] (3) If it is a solid-state drive, the solid-state drive health status detection module is called to confirm whether the solid-state drive is indeed damaged.
[0161] (4) If the SSD is damaged, report the relevant information to the Monitor and exit the process.
[0162] 2. The life of the solid-state drive is about to expire in a super failure scenario.
[0163] Please refer to Fig.10 , Fig.10 A schematic diagram of an algorithm processing flow of a Monitor provided by an embodiment of the present invention in a scenario where a solid-state hard disk expires in a scenario close to a super failure, and the implementation process is as follows:
[0164] (1) After the OSD service detects that the SSD has expired, it reports the expired SSD information to the Monitor, but the process does not exit immediately.
[0165] (2) After receiving the report message from the OSD service, Monitor obtains the object storage device list corresponding to the SSD (that is, which object storage devices are related to the SSD, which can be determined by the ID information) and the device information of the object storage device where the SSD is located.
[0166] (3) Check whether there is a PG on these object storage devices. If so, the current storage system is already in the state of being close to the super fault domain; if not, the current storage system is not in the state of being close to the super fault domain.
[0167] (4) If it is determined that the distributed storage system is in a state close to a super fault domain, the solid-state drive abnormality label is marked on the relevant object storage device, all write actions on the relevant object storage device are blocked, and an alarm is reported.
[0168] (5) The relevant information of the SSD whose life has expired recorded by the Monitor is cleared after the data reconstruction is completed, the redundancy of all PG data is restored, and the PG status is restored to active + clean status.
[0169] It can be seen that the SSD management method provided by the embodiment of the present invention first determines whether there may be an abnormal SSD problem in the distributed storage system by performing an abnormality detection on the service layer in the distributed storage system, and determines the abnormal SSD and the abnormal type of the SSD in the storage layer when there is an abnormality in the service layer. Thus, the abnormal SSD can be re-detected using the preset SSD fault detection strategy to determine whether the abnormal SSD is indeed faulty, thereby determining the target protection strategy corresponding to the abnormal SSD according to the SSD abnormality type and the fault detection result, and realizing redundant protection of the abnormal SSD based on the target protection strategy. It can be seen that the technical solution realizes double-layer monitoring of the service layer and the storage layer in the distributed storage system, taking into account multiple situations such as the expiration of the hard disk life, the real hard disk failure, and the hard disk abnormal scenario, and can timely and accurately identify the health status of the solid-state hard disk, which helps to realize fast and efficient redundant protection of the faulty disk, and further avoid the problem of data loss.
[0170] An embodiment of the present invention provides a solid state hard disk management device.
[0171] Please refer to Fig.11 , Fig.11 This is a structural schematic diagram of a solid-state hard disk management device provided by the present invention, which is applied to a distributed storage system. The distributed storage system includes a service layer and a storage layer. The storage layer is deployed with multiple object storage devices, and each object storage device is deployed with multiple solid-state hard disks. It may include:
[0172] Monitoring module 1, used to monitor the service layer in the distributed storage system to determine whether there is an abnormality in the service layer;
[0173] Determination module 2, for determining an abnormal solid-state drive and an abnormal type of the solid-state drive at the storage layer when an abnormality exists at the service layer; the abnormal type of the solid-state drive includes an abnormality of the hard drive itself and / or expiration of the hard drive life;
[0174] Detection module 3, used for, when the abnormal type of the solid state hard disk is the abnormality of the hard disk itself, performing fault detection on the abnormal solid state hard disk using a preset fault detection strategy to obtain a fault detection result;
[0175] The protection module 4 is used to determine a target protection strategy using the abnormality type of the solid state drive and the fault detection result, and to perform redundant protection on the abnormal solid state drive using the target protection strategy.
[0176] It can be seen that the SSD management device provided by the embodiment of the present invention first determines whether there may be an abnormal SSD problem in the distributed storage system by performing an abnormality detection on the service layer in the distributed storage system, and determines the abnormal SSD and the abnormal type of the SSD in the storage layer when there is an abnormality in the service layer. Thus, the preset SSD fault detection strategy can be used to re-perform fault detection on the abnormal SSD to determine whether the abnormal SSD is indeed faulty, thereby determining the target protection strategy corresponding to the abnormal SSD according to the SSD abnormality type and the fault detection result, and realizing redundant protection of the abnormal SSD based on the target protection strategy. It can be seen that the technical solution realizes double-layer monitoring of the service layer and the storage layer in the distributed storage system, taking into account multiple situations such as the expiration of the hard disk life, the real hard disk failure, and the hard disk abnormal scenario, and can timely and accurately identify the health status of the solid-state hard disk, which helps to realize fast and efficient redundant protection of the faulty disk, and further avoid the problem of data loss.
[0177] In one embodiment of the present invention, the above-mentioned judgment module 1 can be specifically used to monitor the read and write process of the object storage device of the service layer in the distributed storage system to determine whether an input and output congestion event is monitored; if an input and output congestion event is monitored, it is determined that there is an abnormality in the service layer; if no input and output congestion event is monitored, it is determined that there is no abnormality in the service layer.
[0178] In one embodiment of the present invention, the above-mentioned judgment module 1 can be specifically used to monitor the read and write process of the object storage device of the service layer in the distributed storage system to determine whether an error code is monitored; if no error code is monitored, it is determined that there is an abnormality in the service layer; if an error code is monitored, the abnormal disk partition is determined according to the error code; if the storage medium to which the abnormal disk partition belongs is a solid-state hard disk, it is determined that there is an abnormality in the service layer; if the storage medium to which the abnormal disk partition belongs is not a solid-state hard disk, it is determined that there is no abnormality in the service layer.
[0179] In one embodiment of the present invention, the above-mentioned judgment module 1 can be specifically used to monitor the object storage device startup process of the service layer in the distributed storage system to determine whether a mount failure event is monitored; wherein the mount failure event includes a disk partition mount failure event and / or a file system mount failure event; if a mount failure event is monitored, it is determined that there is an abnormality in the service layer; if no mount failure event is monitored, it is determined that there is no abnormality in the service layer.
[0180] In one embodiment of the present invention, the above-mentioned judgment module 1 can be specifically used to monitor the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk removal event is monitored; if a hard disk removal event is monitored, it is determined that there is an abnormality in the service layer; if no hard disk removal event is monitored, it is determined that there is no abnormality in the service layer.
[0181] In one embodiment of the present invention, the above-mentioned judgment module 1 can be specifically used to monitor the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk life expiration signal is monitored; if a hard disk life expiration signal is monitored, it is determined that there is an abnormality in the service layer; if no hard disk life expiration signal is monitored, it is determined that there is no abnormality in the service layer.
[0182] In one embodiment of the present invention, the above-mentioned detection module 3 can be specifically used to collect parameters of an abnormal solid-state hard disk to obtain hard disk parameters; wherein the hard disk parameters include a combination of one or more of power-on time, wear degree, and data writing amount; if all hard disk parameters do not exceed the corresponding parameter thresholds, then the fault detection result is determined to be that the abnormal solid-state hard disk has no fault; if any hard disk parameter exceeds the corresponding parameter threshold, then the fault detection result is determined to be that the abnormal solid-state hard disk has a fault.
[0183] In one embodiment of the present invention, the above-mentioned detection module 3 can be specifically used to obtain the hard disk log corresponding to the abnormal solid-state hard disk in the system log; if there is no hard disk error log in the hard disk log, the fault detection result is determined to be that the abnormal solid-state hard disk has no fault; if there is a hard disk error log in the hard disk log, the fault detection result is determined to be that the abnormal solid-state hard disk has a fault.
[0184] In one embodiment of the present invention, the above-mentioned detection module 3 can be specifically used to determine whether abnormal error information about an abnormal solid-state hard drive is received; if abnormal error information about an abnormal solid-state hard drive is not received, the fault detection result is determined to be that the abnormal solid-state hard drive does not have a fault; if abnormal error information about an abnormal solid-state hard drive is received, the fault detection result is determined to be that the abnormal solid-state hard drive has a fault.
[0185] In one embodiment of the present invention, the solid state drive management device may further include a control module for determining the faulty object storage device to which the abnormal solid state drive belongs when the fault detection result indicates that the abnormal solid state drive is faulty; and controlling the faulty object storage device to stop running.
[0186] In one embodiment of the present invention, the protection module 4 may include:
[0187] The first determination unit is used to determine the abnormal scenario corresponding to the abnormal solid-state hard disk according to the abnormal type of the solid-state hard disk and the fault detection result; wherein the abnormal scenario includes the scenario of continuous hard disk failure in a short period of time and / or the scenario of hard disk expiration in a state close to a super fault domain; the scenario of continuous hard disk failure in a short period of time indicates that a preset number of solid-state hard disks fail in a preset time period in the distributed storage system; the scenario of hard disk expiration in a state close to a super fault domain indicates that the number of data reconstruction members in the object storage device to which the solid-state hard disk with expired life belongs is not less than the minimum redundancy number of the object storage device;
[0188] The second determining unit is used to determine a target protection strategy according to an abnormal scenario corresponding to the abnormal solid state drive, and perform redundant protection on the abnormal solid state drive using the target protection strategy.
[0189] In one embodiment of the present invention, the above-mentioned first determination unit can be specifically used to obtain the abnormal time node of the abnormal solid-state hard drive if the solid-state hard drive abnormality type is an abnormality of the hard drive itself, and the fault detection result is that the abnormal solid-state hard drive is faulty; if the time interval between the abnormal time node of the abnormal solid-state hard drive and the abnormal time node of the historical abnormal solid-state hard drive does not exceed the first time length, then the abnormal scenario is determined to be a scenario of continuous hard drive failure in a short period of time.
[0190] In one embodiment of the present invention, the above-mentioned first determination unit can be specifically used to determine the expired object storage device to which the abnormal solid-state hard disk belongs if the solid-state hard disk abnormality type is the expiration of the hard disk life; if there is a placement group in the expired object storage device, then determine that the abnormal scenario is a hard disk expiration scenario in an approaching super fault domain state.
[0191] In one embodiment of the present invention, when the abnormal scenario is a scenario of continuous hard disk failure within a short period of time, the above-mentioned second determination unit can be specifically used to set abnormal labels for all object storage devices in the distributed storage system to block all write operations in all object storage devices and output a first alarm prompt.
[0192] In one embodiment of the present invention, when the abnormal scenario is a hard disk expiration scenario approaching a super fault domain state, the above-mentioned second determination unit can be specifically used to determine the abnormal object storage device to which the abnormal solid-state hard disk belongs in the distributed storage system; set an abnormal label for the abnormal object storage device to block all write operations in the abnormal object storage device, and output a second alarm prompt.
[0193] In one embodiment of the present invention, the above-mentioned first determination unit can be specifically used to determine the time node for obtaining the fault detection result; when the interval between the time node and the current time node reaches a second time length, the abnormal scenario corresponding to the abnormal solid state hard disk is determined according to the solid state hard disk abnormality type and the fault detection result.
[0194] For an introduction to the device provided in the embodiment of the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.
[0195] An embodiment of the present invention provides an electronic device.
[0196] Please refer to Fig.12 , Fig.12 This is a schematic diagram of the structure of an electronic device provided by the present invention, and the electronic device may include:
[0197] A memory 11, used for storing computer programs;
[0198] The processor 10 can implement the steps of any one of the above-mentioned solid state drive management methods when executing a computer program.
[0199] like Fig.12 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.
[0200] In the embodiment of the present invention, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices.
[0201] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of the solid state drive management method.
[0202] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present invention, the memory 11 at least stores programs for implementing the following functions:
[0203] Monitor the service layer in the distributed storage system to determine whether there are any abnormalities in the service layer;
[0204] When an abnormality occurs in the service layer, the abnormal SSD and the abnormal type of the SSD are determined in the storage layer; the abnormal type of the SSD includes abnormality of the hard disk itself and / or expiration of the hard disk life;
[0205] When the abnormal type of the solid state hard disk is the hard disk itself being abnormal, a preset fault detection strategy is used to perform fault detection on the abnormal solid state hard disk to obtain a fault detection result;
[0206] The target protection strategy is determined by using the SSD abnormality type and fault detection results, and the target protection strategy is used to perform redundant protection on the abnormal SSD.
[0207] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0208] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0209] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.
[0210] Of course, it should be noted that Fig.12 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present invention. In actual applications, the electronic device may include Fig.12 More or fewer components than shown, or combinations of certain components.
[0211] An embodiment of the present invention provides a non-volatile storage medium.
[0212] The non-volatile storage medium provided in the embodiment of the present invention stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned solid state hard disk management methods can be implemented.
[0213] Among them, the non-volatile storage medium can be any available medium that can be stored by a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, it can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk) and other media that can store computer program codes.
[0214] For an introduction to the non-volatile storage medium provided in the embodiment of the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.
[0215] An embodiment of the present invention provides a computer program product.
[0216] The computer program product provided in the embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of any one of the above-mentioned solid state drive management methods can be implemented.
[0217] Specifically, in the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product.
[0218] Among them, the computer program product may include one or more computer programs / instructions, and when the computer program / instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention may be generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a non-volatile storage medium, or transmitted from one non-volatile storage medium to another non-volatile storage medium. For example, computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0219] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.
[0220] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0221] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0222] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0223] The technical solution provided by the present invention is described in detail above. Specific examples are used herein to illustrate the principle and implementation of the present invention, and the description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A solid state hard disk management method, characterized in that: Applied to a distributed storage system, the distributed storage system includes a service layer and a storage layer, the storage layer is deployed with multiple object storage devices, each of the object storage devices is deployed with multiple solid-state hard disks, the method includes: Monitoring the service layer in the distributed storage system to determine whether there is an abnormality in the service layer; When an abnormality exists in the service layer, an abnormal solid-state hard disk and an abnormal type of the solid-state hard disk are determined in the storage layer; the abnormal type of the solid-state hard disk includes an abnormality of the hard disk itself and / or expiration of the hard disk life; When the abnormal type of the solid state hard disk is the abnormality of the hard disk itself, a preset fault detection strategy is used to perform fault detection on the abnormal solid state hard disk to obtain a fault detection result; A target protection strategy is determined using the abnormality type of the solid state drive and the fault detection result, and the target protection strategy is used to perform redundant protection on the abnormal solid state drive.
2. The solid state drive management method according to claim 1, characterized in that: Monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes: Monitoring the read and write process of the object storage device of the service layer in the distributed storage system to determine whether an input and output congestion event is monitored; If the input and output blocking event is monitored, it is determined that an abnormality exists in the service layer; If the input / output congestion event is not monitored, it is determined that there is no abnormality in the service layer.
3. The solid state drive management method according to claim 1, characterized in that: Monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes: Monitoring the read and write process of the object storage device of the service layer in the distributed storage system to determine whether an error code is monitored; If the error code is not monitored, it is determined that an abnormality exists in the service layer; If the error code is monitored, determining the abnormal disk partition according to the error code; If the storage medium to which the abnormal disk partition belongs is a solid state drive, it is determined that an abnormality exists in the service layer; If the storage medium to which the abnormal disk partition belongs is not a solid-state hard disk, it is determined that there is no abnormality in the service layer.
4. The solid state drive management method according to claim 1, characterized in that: Monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes: The object storage device startup process of the service layer in the distributed storage system is monitored to determine whether a mount failure event is monitored; wherein the mount failure event includes a disk partition mount failure event and / or a file system mount failure event; If the mount failure event is monitored, it is determined that an abnormality exists in the service layer; If the mount failure event is not monitored, it is determined that there is no abnormality in the service layer.
5. The solid state drive management method according to claim 1, characterized in that: Monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes: Monitoring the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk removal event is monitored; If the hard disk removal event is monitored, it is determined that an abnormality exists in the service layer; If the hard disk removal event is not monitored, it is determined that there is no abnormality in the service layer.
6. The solid state drive management method according to claim 1, characterized in that: Monitoring the service layer in the distributed storage system to determine whether the service layer has an abnormality includes: Monitoring the object storage device startup process and / or the object storage device read and write process of the service layer in the distributed storage system to determine whether a hard disk life expiration signal is monitored; If the hard disk life expiration signal is monitored, it is determined that the service layer is abnormal; If the hard disk life expiration signal is not monitored, it is determined that there is no abnormality in the service layer.
7. The solid state drive management method according to claim 1, characterized in that: Performing fault detection on the abnormal solid state drive using a preset fault detection strategy to obtain a fault detection result includes: Collecting parameters of the abnormal solid state hard disk to obtain hard disk parameters; wherein the hard disk parameters include a combination of one or more of power-on time, wear degree, and data writing amount; If all the hard disk parameters do not exceed the corresponding parameter thresholds, determining that the fault detection result is that the abnormal solid state hard disk has no fault; If any of the hard disk parameters exceeds the corresponding parameter threshold, the fault detection result is determined to be that the abnormal solid state hard disk is faulty.
8. The solid state drive management method according to claim 1, characterized in that: Performing fault detection on the abnormal solid state drive using a preset fault detection strategy to obtain a fault detection result includes: Obtaining a hard disk log corresponding to the abnormal solid state hard disk in the system log; If there is no hard disk error log in the hard disk log, determining that the fault detection result is that the abnormal solid state hard disk has no fault; If the hard disk error log exists in the hard disk log, it is determined that the fault detection result is that the abnormal solid state hard disk has a fault.
9. The solid state drive management method according to claim 1, characterized in that: Performing fault detection on the abnormal solid state drive using a preset fault detection strategy to obtain a fault detection result includes: Determining whether abnormal error information about the abnormal solid state hard disk is received; If no abnormal error information about the abnormal solid state hard disk is received, determining that the fault detection result is that the abnormal solid state hard disk has no fault; If abnormal error information about the abnormal solid state hard disk is received, it is determined that the fault detection result is that the abnormal solid state hard disk is faulty.
10. The solid state drive management method according to claim 1, characterized in that: Also includes: When the fault detection result indicates that the abnormal solid state hard disk is faulty, determining the fault object storage device to which the abnormal solid state hard disk belongs; Control the faulty object storage device to stop running.
11. The solid state drive management method according to any one of claims 1 to 10, characterized in that: Determining a target protection strategy using the abnormal type of the solid state drive and the fault detection result, and performing redundant protection on the abnormal solid state drive using the target protection strategy, including: Determine the abnormal scenario corresponding to the abnormal solid-state hard disk according to the abnormal type of the solid-state hard disk and the fault detection result; wherein the abnormal scenario includes a scenario of continuous hard disk failure in a short period of time and / or a scenario of hard disk expiration in a state close to a super fault domain; the scenario of continuous hard disk failure in a short period of time indicates that a preset number of solid-state hard disks in the distributed storage system fail within a preset time period; the scenario of hard disk expiration in a state close to a super fault domain indicates that the number of data reconstruction members in the object storage device to which the solid-state hard disk with expired life belongs is not less than the minimum redundancy number of the object storage device; The target protection strategy is determined according to the abnormal scenario corresponding to the abnormal solid state drive, and the target protection strategy is used to perform redundant protection on the abnormal solid state drive.
12. The solid state hard disk management method according to claim 11, characterized in that: Determining an abnormal scenario corresponding to the abnormal solid state drive according to the abnormal type of the solid state drive and the fault detection result includes: If the abnormal type of the solid state hard disk is that the hard disk itself is abnormal, and the fault detection result is that the abnormal solid state hard disk is faulty, then obtaining the abnormal time node of the abnormal solid state hard disk; If the time interval between the abnormal time node of the abnormal solid state hard disk and the abnormal time node of the historical abnormal solid state hard disk does not exceed the first time length, it is determined that the abnormal scenario is a scenario of continuous hard disk failure within the short period of time.
13. The solid state drive management method according to claim 11, characterized in that: Determining an abnormal scenario corresponding to the abnormal solid state drive according to the abnormal type of the solid state drive and the fault detection result includes: If the abnormal type of the solid state hard disk is that the hard disk has expired, determining the expired object storage device to which the abnormal solid state hard disk belongs; If there is a placement group in the expired object storage device, it is determined that the abnormal scenario is a hard disk expiration scenario in the near super fault domain state.
14. The solid state hard disk management method according to claim 11, characterized in that: When the abnormal scenario is a scenario of continuous hard disk failures within a short period of time, redundant protection is performed on the abnormal solid-state hard disk using the target protection strategy, including: An abnormal tag is set for all the object storage devices in the distributed storage system to block all write operations in all the object storage devices and output a first alarm prompt.
15. The solid state drive management method according to claim 11, characterized in that: When the abnormal scenario is a hard disk expiration scenario in the state close to the super fault domain, using the target protection strategy to perform redundancy protection on the abnormal solid state hard disk includes: Determine the abnormal object storage device to which the abnormal solid state hard disk in the distributed storage system belongs; An abnormal tag is set for the abnormal object storage device to block all write operations in the abnormal object storage device and output a second alarm prompt.
16. The solid state hard disk management method according to claim 11, characterized in that: Determining an abnormal scenario corresponding to the abnormal solid state drive according to the abnormal type of the solid state drive and the fault detection result includes: Determine a time point for obtaining the fault detection result; When the interval duration between the time node and the current time node reaches a second duration, the abnormal scenario corresponding to the abnormal solid state drive is determined according to the abnormal type of the solid state drive and the fault detection result.
17. A solid state hard disk management device, characterized in that: Applied to a distributed storage system, the distributed storage system includes a service layer and a storage layer, the storage layer is deployed with multiple object storage devices, each of the object storage devices is deployed with multiple solid-state hard disks, and the apparatus includes: A monitoring module, used to monitor the service layer in the distributed storage system to determine whether there is an abnormality in the service layer; A determination module, configured to determine an abnormal solid-state drive and an abnormal type of the solid-state drive at the storage layer when an abnormality exists at the service layer; the abnormal type of the solid-state drive includes an abnormality of the hard drive itself and / or expiration of the hard drive life; A detection module, used for, when the abnormal type of the solid state hard disk is the abnormality of the hard disk itself, performing fault detection on the abnormal solid state hard disk using a preset fault detection strategy to obtain a fault detection result; The protection module is used to determine a target protection strategy using the abnormal type of the solid state drive and the fault detection result, and to perform redundant protection on the abnormal solid state drive using the target protection strategy.
18. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the solid state drive management method as described in any one of claims 1 to 16 when executing the computer program.
19. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the solid state drive management method according to any one of claims 1 to 16 are implemented.
20. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the solid state drive management method according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
Monitoring method, system and device of distributed storage system and medium
CN111858240A
Server cluster hard disk fault processing method and device, electronic equipment and storage medium
CN111897686A
Distributed storage solid state disk processing method and device
CN116414661A
Fault management method and device for solid state disk, computer equipment and medium
CN118445119A
Fault analysis method and device, electronic equipment and storage medium
CN118606093A
Cited By
Solid state disk fault data processing method and device, server and storage medium
CN120469845A
Data processing method, device, server and storage medium for solid state hard drive failure
CN120469845B
Solid-state electronic disk soft destruction method, device and system
CN120951403A
Solid-state electronic disk soft-destroying method, device and system
CN120951403B