Disk health check method, apparatus, electronic device, medium, and product

By determining the association links and mapping relationships between logical disks and physical disks in the storage system and performing a full-link health check, the problem of difficult fault diagnosis in existing technologies is solved, and rapid handling and effective linkage of disk faults are achieved.

CN114721850BActive Publication Date: 2026-04-14ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2022-02-15
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing disk health check methods cannot effectively link logical disk and physical disk fault handling, making fault diagnosis difficult and hindering rapid processing.

Method used

By determining the association links between each logical disk and physical disk in the storage system, the mapping relationship between nodes is obtained, and a full-link health check is performed to output the location information of abnormal nodes.

Benefits of technology

It enables rapid handling of disk failures and simplifies new hardware adaptation through effective linkage between service failure isolation and physical disk repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721850B_ABST
    Figure CN114721850B_ABST
Patent Text Reader

Abstract

The method comprises the following steps: determining the association link between each logical disk and physical disk in a storage system; acquiring the mapping relationship between each node in the association link corresponding to the logical disk; performing health examination on each node in the association link, and when the health examination result of a target node is abnormal, outputting the position information of a target logical disk corresponding to the target node and the position information of a target physical disk based on the mapping relationship between each node. The technical solution can comprehensively check the disk, and the output result can indicate the service party to isolate the fault of the service on the target logical disk, and indicate the operation and maintenance personnel to repair and replace the target physical disk, so as to realize the effective linkage of service processing and disk repair, and realize the rapid processing of disk faults.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, specifically to a disk health check method, apparatus, electronic device, medium, and product. Background Technology

[0002] With the rapid development of the internet and the surge in the number of online services, large-scale, massive data storage systems are indispensable. However, due to economic constraints, large data centers still rely on traditional disk-based storage systems. Frequent disk failures can cause file and data corruption and loss, leading to service disruptions or even the inability to provide basic services. Therefore, disk health diagnostics are crucial. Existing disk health checks primarily include the following three methods: 1. Monitoring logical disks and outputting logical disk error logs; 2. Monitoring the status of physical disks under RAID (Redundant Arrays of Independent Disks) cards and outputting disk status anomaly information; 3. Analyzing disk health based on SMART (Self-Monitoring, Analysis and Reporting Technology) information and sending alarm messages according to the severity of the health condition, informing users to replace disks that are about to fail. Whether it's a logical disk failure or a physical disk problem, it's necessary to drive the services on the corresponding logical disk to isolate the fault and replace or repair the problematic physical disk. However, the above three methods diagnose the health of different locations on the logical or physical disks independently, without any correlation between them. If a logical disk failure is diagnosed, there is no unified solution to find the corresponding problematic physical disk. Sometimes, maintenance personnel even need to manually search through a lot of information to identify the problematic physical disk, making fault diagnosis difficult and unable to effectively link service processing and disk repair for rapid disk failure handling. Summary of the Invention

[0003] This disclosure provides a disk health check method, apparatus, electronic device, medium, and product.

[0004] In a first aspect, this disclosure provides a disk health check method.

[0005] Specifically, the disk health check method includes:

[0006] Determine the connection links between each logical disk and physical disk in the storage system;

[0007] Obtain the mapping relationship between each node in the associated link corresponding to the logical disk;

[0008] Perform a health check on each node in the associated link corresponding to the logical disk, and obtain the health check results of each node;

[0009] When the health check result of the target node is abnormal, the location information of the target logical disk and the location information of the target physical disk corresponding to the target node are output based on the mapping relationship between the nodes.

[0010] In conjunction with the first aspect, in a first implementation of the first aspect of this disclosure, determining the association link between the logical disk and the physical disk in the storage system includes:

[0011] Obtain the logical drive letter of the logical disk;

[0012] When the logical drive letter of the logical disk is of type 1, the next associated node of the logical disk is determined to be a Small Computer System Interface (SCSI) device.

[0013] When the logical drive letter of the logical disk is of type 2, the next associated node of the logical disk is determined to be the physical disk; wherein, the next associated node of the physical disk is the SMART (Smart Disk Monitoring, Analysis and Reporting Technology) information.

[0014] In conjunction with the first aspect and the first implementation of the first aspect, in the second implementation of the first aspect of this disclosure, the determination of the association link between the logical disk and the physical disk in the storage system further includes:

[0015] When the next associated node of the logical disk is a SCSI device, the hardware access method of the physical disk is determined based on the identification information of the SCSI device corresponding to the logical disk.

[0016] When the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device is determined to be a volume, wherein the next associated node of the volume is N physical disks, and N is an integer greater than or equal to 1;

[0017] When the hardware access type of the SCSI device is the second access type, the next associated node of the SCSI device is determined to be a physical disk.

[0018] In conjunction with the first aspect and its various implementations, this disclosure, in a third implementation of the first aspect, further includes:

[0019] When performing a health check on a physical disk, a health check is also performed on the disk controller corresponding to the physical disk, and the health check result of the physical disk includes the health check result of the disk controller.

[0020] In conjunction with the first aspect and its various implementations, this disclosure provides a third implementation of the first aspect, wherein the step of performing health checks on each node in the associated link corresponding to the logical disk to obtain the health check results of each node includes:

[0021] A recursive health check is performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node.

[0022] In conjunction with the first aspect and its various implementations, in the third implementation of the first aspect of this disclosure, when the logical drive letter of the logical disk of the second type is nvmeX or dfX, the health check result of the physical disk corresponding to the logical disk includes the health check result of the disk SMART information of the physical disk.

[0023] Secondly, this disclosure provides a disk health check device.

[0024] Specifically, the disk health check device includes:

[0025] The determination module is configured to determine the association links between each logical disk and physical disk in the storage system;

[0026] The acquisition module is configured to acquire the mapping relationship between each node in the associated link corresponding to the logical disk;

[0027] The inspection module is configured to perform health checks on each node in the associated link corresponding to the logical disk and obtain the health check results of each node.

[0028] The output module is configured to output the location information of the target logical disk and the location information of the target physical disk corresponding to the target node, based on the mapping relationship between the nodes, when the health check result of the target node is abnormal.

[0029] In conjunction with the second aspect, in a first implementation of the second aspect of this disclosure, the determining module is configured as follows:

[0030] Obtain the logical drive letter of the logical disk;

[0031] When the logical drive letter of the logical disk is of type 1, the next associated node of the logical disk is determined to be a Small Computer System Interface (SCSI) device.

[0032] When the logical drive letter of the logical disk is of type 2, the next associated node of the logical disk is determined to be the physical disk; wherein, the next associated node of the physical disk is the SMART (Smart Disk Monitoring, Analysis and Reporting Technology) information.

[0033] In conjunction with the second aspect, in a first implementation of the second aspect of this disclosure, the determining module is further configured to:

[0034] When the next associated node of the logical disk is a SCSI device, the hardware access method of the physical disk is determined based on the identification information of the SCSI device corresponding to the logical disk.

[0035] When the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device is determined to be a volume, wherein the next associated node of the volume is N physical disks, and N is an integer greater than or equal to 1;

[0036] When the hardware access type of the SCSI device is the second access type, the next associated node of the SCSI device is determined to be a physical disk.

[0037] In conjunction with the second aspect and various implementations of the second aspect, in a third implementation of the second aspect of this disclosure, the inspection module is configured as follows:

[0038] When performing a health check on a physical disk, a health check is also performed on the disk controller corresponding to the physical disk, and the health check result of the physical disk includes the health check result of the disk controller.

[0039] In conjunction with the second aspect and various implementations of the second aspect, in a third implementation of the second aspect of this disclosure, the inspection module is configured as follows:

[0040] A recursive health check is performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node.

[0041] In conjunction with the second aspect and various implementations of the second aspect, in the fourth implementation of the second aspect of this disclosure, when the logical drive letter of the logical disk of the second type is nvmeX or dfX, the health check result of the physical disk corresponding to the logical disk includes the health check result of the disk SMART information of the physical disk.

[0042] Thirdly, embodiments of this disclosure provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer instructions that support the above-described apparatus in performing the above-described methods, and the processor is configured to execute the computer instructions stored in the memory.

[0043] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method described in any of the preceding aspects.

[0044] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program / instructions, wherein the computer program / instructions, when executed by a processor, implement the steps of the method described in any of the above aspects.

[0045] The technical solutions provided in this disclosure may have the following beneficial effects:

[0046] The above technical solution can determine the association links between each logical disk and physical disk in the storage system and obtain the mapping relationship between each node in the association link. In this way, a full-link health check can be performed on each node in the association link to obtain the health check results of each node, resulting in a more comprehensive health check of the disk. If the health check result of the target node is abnormal, the location information of the target logical disk and the target physical disk corresponding to the target node can be output based on the mapping relationship between the nodes. This allows the service provider to isolate the service on the target logical disk, while the operation and maintenance personnel can repair and replace the target physical disk. This achieves effective linkage between service processing and disk repair, enabling rapid handling of disk failures.

[0047] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the embodiments of this disclosure. Attached Figure Description

[0048] Other features, objects, and advantages of embodiments of this disclosure will become more apparent from the following detailed description of non-limiting implementations, taken in conjunction with the accompanying drawings. In the drawings:

[0049] Figure 1 A flowchart illustrating a disk health check method according to an embodiment of the present disclosure is shown;

[0050] Figure 2 A structural block diagram of a disk health check apparatus according to an embodiment of the present disclosure is shown;

[0051] Figure 3 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;

[0052] Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing the method according to embodiments of the present disclosure. Detailed Implementation

[0053] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of the exemplary embodiments have been omitted from the drawings.

[0054] In embodiments disclosed herein, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, numbers, steps, behaviors, components, portions or combinations thereof disclosed herein, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, portions or combinations thereof are present or added.

[0055] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings and examples.

[0056] As mentioned above, with the rapid development of the internet and the surge in the number of network services, large-scale, massive data storage systems are indispensable. Due to economic constraints, large data centers still rely on traditional disk-based storage systems. Frequent disk failures can cause file and data corruption and loss, leading to service disruptions or even the inability to provide basic services. Therefore, disk health checks are particularly important. Existing disk health check methods mainly include the following three types: 1. Monitoring logical disks and outputting logical disk error logs; 2. Monitoring the status information of physical disks under RAID (Redundant Arrays of Independent Disks) cards and outputting disk status anomaly information; 3. Analyzing the hardware health status of the disk based on disk SMART (Self-Monitoring, Analysis and Reporting Technology) information and sending alarm information according to the degree of health status, informing users to replace disks that are about to fail. Whether it's a logical disk failure or a physical disk problem, it's necessary to drive the services on the corresponding logical disk to isolate the fault and replace or repair the problematic physical disk. However, the above three methods diagnose the health of different locations on the logical or physical disks independently, without any correlation between them. If a logical disk failure is diagnosed, there is no unified solution to find the corresponding problematic physical disk. Sometimes, maintenance personnel even need to manually search through a lot of information to identify the problematic physical disk, making fault diagnosis difficult and unable to effectively link service processing and disk repair for rapid disk failure handling.

[0057] In view of the above problems, this disclosure proposes a disk health check method. By determining the association links between each logical disk and physical disk in the storage system, the mapping relationship between each node in the association link is obtained. In this way, a full-link health check can be performed on each node in the association link, and the health check results of each node can be obtained, resulting in a more comprehensive disk health check. If the health check result of the target node is abnormal, the location information of the target logical disk and the target physical disk corresponding to the target node can be output based on the mapping relationship between the nodes. This allows the service provider to isolate the service on the target logical disk, and the operation and maintenance personnel to repair and replace the target physical disk. This achieves effective linkage between service processing and disk repair, enabling rapid handling of disk failures. Moreover, if a new physical disk is connected to the storage system, it is only necessary to quickly determine the association links and establish the mapping relationship between each node in the association link according to the above scheme to perform a full-link health check. The adaptation to new hardware is simple.

[0058] Figure 1 A flowchart illustrating a disk health check method according to an embodiment of the present disclosure is shown, as follows: Figure 1 As shown, the disk health check method includes the following steps S101-S104:

[0059] In step S101, the association links between each logical disk and physical disk in the storage system are determined;

[0060] In step S102, the mapping relationship between each node in the associated link corresponding to the logical disk is obtained;

[0061] In step S103, a health check is performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node;

[0062] In step S104, when the health check result of the target node is abnormal, the location information of the target logical disk and the location information of the target physical disk corresponding to the target node are output based on the mapping relationship between the nodes.

[0063] In one embodiment of this disclosure, the disk health check method is applicable to the diagnosis of various storage systems that use disks for storage, such as the diagnosis of server internal storage systems or the diagnosis of professional data storage systems, etc.

[0064] In one embodiment of this disclosure, a physical disk refers to a real, physical hardware disk, such as a hard drive installed in a machine, which is called a physical disk. A logical disk is a partition of a real hard drive (physical disk) into several logical disks. A logical disk does not actually exist; it is a logical drive letter that represents each partition after it has been created. A logical drive letter uniquely identifies a logical disk.

[0065] In one embodiment of this disclosure, the nodes on the association link between the logical disk and the physical disk include the logical disk, the intermediate node between the logical disk and the physical disk, and the physical disk. It should be noted that during disk health checks, in addition to performing operational health checks on the logical disk, the intermediate node between the logical disk and the physical disk, and the physical disk, hardware health checks are typically performed, such as SMART information health checks. Disk SMART information refers to disk health information detected using disk SMART technology. Disk SMART technology involves analyzing and comparing the operating status, historical records, and preset safety values ​​of the read / write heads, platters, motors, and circuits through monitoring commands on the physical disk and monitoring software on the host. When a situation occurs outside the safety value range, a warning message is automatically issued to the user to attract the attention of the system administrator or user, ensuring that data is backed up before the physical disk fails and that the corresponding physical disk is repaired or replaced. Each physical disk is equipped with a disk SMART, so each physical disk is associated with its disk SMART information. Therefore, the association link can also include disk SMART information, and the next associated node of the physical disk in the association link is the disk SMART information.

[0066] In one embodiment of this disclosure, since the types of physical disks are different, the access methods to the storage system are also different. Therefore, the intermediate nodes associated with logical disks and physical disks in the storage system will also be different. The association links between each logical disk and physical disk can be determined first to obtain each node in the association link corresponding to the logical disk. Then, the mapping relationship between each node in the association link corresponding to the logical disk can be obtained. The mapping relationship between each node can include the mapping relationship between two adjacent nodes on the association link or it can also include the mapping relationship between one node and one or more other nodes. As long as there is a direct or indirect mapping relationship between each node, it is acceptable. The indirect mapping relationship mentioned here means that there is a direct mapping relationship between node A and node B, and there is a direct mapping relationship between node B and node C. Then there is an indirect mapping relationship between node A and node C.

[0067] In one embodiment of this disclosure, a health check needs to be performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node. These results can indicate whether any abnormalities have occurred at the node. If the health check result of a node, such as the target node, is abnormal, the target logical disk and target physical disk corresponding to that target node can be determined based on the mapping relationship between the nodes. The logical drive letter of the target logical disk and the disk location information of the target physical disk can then be output. Regardless of which target node in the associated link is abnormal, the target logical disk and target physical disk can be associated with the direct or indirect mapping relationship between the target node and the logical disk and physical disk. The location information of the target logical disk corresponding to the problematic target node can be output, such as the logical drive letter, and the location information of the target physical disk can be output, such as the slot cabinet and slot number where the physical disk is located. It should be noted that the health check result of the target node can also be output to display abnormal information to the user. Furthermore, the health check results of each node in the associated link can also be output so that the user can view the health status of the entire link.

[0068] In this embodiment, a full-link health check can be performed on the disk, providing a more comprehensive check. When anomalies are detected, the logical drive letter of the target logical disk corresponding to the problematic target node and the disk location information of the target physical disk can be output. This allows the service provider to isolate the service on the target logical disk, while simultaneously enabling maintenance personnel to repair or replace the target physical disk. This achieves effective linkage between service processing and disk repair, enabling rapid handling of disk failures. Furthermore, if a new physical disk is added to the storage system, only the above scheme needs to be used to quickly determine the associated links and establish the mapping relationship between each node in the associated links to perform a full-link health check, simplifying new hardware adaptation.

[0069] In one embodiment of this disclosure, step S101 of the disk health check method described above, namely determining the association link between logical disks, physical disks, and SMART information in the storage system, may include the following steps:

[0070] Obtain the logical drive letter of the logical disk;

[0071] When the logical drive letter of the logical disk is of type 1, the next associated node of the logical disk is determined to be a Small Computer System Interface (SCSI) device.

[0072] When the logical drive letter of the logical disk is of type 2, the next associated node of the logical disk is determined to be the physical disk; wherein, the next associated node of the physical disk is the disk SMART information.

[0073] In this embodiment, the logical drive letter of the logical disk can uniquely identify the logical disk. The second type of logical drive letter can be nvmeX and dfX, and the first type of logical drive letter can be an existing logical drive letter other than the first type of logical drive letter, such as sdX.

[0074] In this implementation, when the logical drive letter of the logical disk is nvmeX or dfX, the next associated node of the logical disk can be determined to be the physical disk. There are no intermediate nodes between the logical disk and the physical disk. Since the physical disk and its SMART information are directly corresponding one-to-one, the next associated node of the physical disk is the disk SMART information. Therefore, when the logical drive letter of the logical disk is nvmeX or dfX, the associated link corresponding to the logical drive letter can be determined to be associated link 1: logical disk → physical disk → disk SMART information. At this time, the mapping relationship between each node in link 1, namely the logical disk, the physical disk, and the disk SMART information, can be obtained, that is, the mapping relationship between the logical disk and the physical disk, and the mapping relationship between the physical disk and the disk SMART information.

[0075] For example, when the physical disk type is PCIe (Peripheral Component Interconnect Express), NVMe (Non-Volatile Memory Host Controller Interface Specification), or SSD (Solid State Disk), hereinafter referred to as NVMe hard drive, after the physical disk is connected to the storage system, logical disks will be directly partitioned based on the physical disk, and the logical drive letters of the resulting logical disks will be nvme1, nvme2, etc. Therefore, when the logical drive letter of the logical disk is obtained as nvme1, it can be directly determined that the associated link corresponding to this logical drive letter is associated link 1: logical disk → physical disk → disk SMART information. At this time, the physical disk subclass is NVMe hard drive. The unique identifier of the logical disk, LogicalDisk.diskname (disk name), has a mapping relationship with the unique identifier of the NVMe hard drive, Nvme.diskname. LogicalDisk.diskname can be the drive letter of the logical disk, and Nvme.diskname can be the physical access slot of the NVMe hard drive. The mapping relationship between e and Nvme.diskname is the mapping relationship between the logical disk and the physical disk. There is a one-to-one mapping relationship between the NVMe hard drive and the disk SMART information. The health check result of the NVMe hard drive directly includes the disk SMART information of the NVMe hard drive. In this way, the mapping relationship between two adjacent nodes in the associated link 1 corresponding to the logical disk nvmeX can be obtained, that is, the diskname of the NVMe hard drive corresponding to the logical disk nvmeX and the disk SMART information corresponding to the diskname of the NVMe hard drive can be obtained. Thus, the direct or indirect mapping relationship between each node in the associated link 1 can be obtained.

[0076] Alternatively, for example, if the physical disk is hard drive A, after hard drive A is connected to the storage system, logical disks will be directly partitioned based on the physical disk, and the logical drive letters of the resulting logical disks will be dfA, dfB, etc. Therefore, when the logical drive letter of the logical disk is obtained as dfA, the associated link corresponding to the logical drive letter can be directly determined as associated link 1: logical disk → physical disk → disk SMART information. At this time, the physical disk subclass is hard disk A. The unique identifier of the logical disk, LogicalDisk.diskname (logical drive letter), has a mapping relationship with the unique identifier of hard disk A, A.diskname. The mapping relationship between LogicalDisk.diskname and A.diskname is the mapping relationship between the logical disk and the physical disk. There is a one-to-one mapping relationship between hard disk A and disk SMART information. The health check result of hard disk A directly includes the health check result of the disk SMART information of hard disk A. In this way, the mapping relationship between two adjacent nodes in associated link 1 corresponding to logical disk dfX can be obtained, that is, the diskname of hard disk A corresponding to logical disk dfX, and the disk SMART information corresponding to the diskname of hard disk A can be obtained. Thus, the direct or indirect mapping relationship between each node in associated link 1 can be obtained.

[0077] Following the example above, health checks are performed on each node in the associated link 1—the logical disk, physical disk, and disk SMART information. This yields health check results for the logical disk, such as logical disk error logs; health check information for the physical disk, including abnormal physical disk status; and health check results for the disk SMART information, such as disk SMART alarm information. Sometimes, the health check results for the physical disk also include the health check results for the disk SMART information. If a logical disk reports an error, the driver outputs the logical drive letter of the malfunctioning logical disk for isolation of related services. Furthermore, based on the mapping relationship between the logical disk and the physical disk, the driver can further correlate and output the specific physical disk's location information, enabling maintenance personnel to perform disk repair or replacement. Similarly, if a physical disk reports an error, the driver outputs the drive letter location information of the malfunctioning physical disk for maintenance personnel to perform disk repair or replacement. Furthermore, based on the mapping relationship between the logical disk and the physical disk, the driver can further correlate and output the corresponding logical drive letter, enabling the driver to perform isolation of related services on the logical disk identified by that logical drive letter.

[0078] In one embodiment of this disclosure, when the logical drive letter of the logical disk is a first type such as sdX, it can be determined that the physical disk is connected via a SCSI device. In this case, the next associated node of the logical disk is the SCSI device, and the first intermediate node between the logical disk and the physical disk is the SCSI device. In this case, step S101 in the above method may further include the following steps:

[0079] When the next associated node of the logical disk is a SCSI device, the hardware access method of the physical disk is determined based on the identification information of the SCSI device corresponding to the logical disk.

[0080] When the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device is determined to be a volume, wherein the next associated node of the volume is N physical disks, and N is an integer greater than or equal to 1;

[0081] When the hardware access type of the SCSI device is the second access type, the next associated node of the SCSI device is determined to be a physical disk.

[0082] In this implementation, the SCSI device corresponding to the logical disk can be determined based on the mapping relationship between the logical disk and the SCSI device. Here, the corresponding hardware access method can be determined by obtaining the host_type information in the unique identifier information of the SCSI device. Some physical disks of the first access type are accessed by forming one or more physical disks into a volume, while some physical disks of the first access type are accessed directly without forming a volume.

[0083] In this embodiment, when the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device can be determined to be a volume, and the next associated node of the volume is N physical disks, where N is an integer greater than or equal to 1; the intermediate nodes between the logical disk and the physical disk are the SCSI device and the volume. Since each physical disk and its SMART information are directly corresponding one-to-one, the next associated node of the physical disk is the disk SMART information. In summary, when the logical drive letter of the logical disk is of the first type and the hardware access method of the physical disk is determined to be the first access type, the associated link of the logical disk can be obtained as associated link 2: logical disk → SCSI device → volume → N (physical disk → disk SMART information).

[0084] In this embodiment, when the hardware access method of the physical disk is the second access type, the next associated node of the SCSI device can be determined to be the physical disk; the intermediate node between the logical disk and the physical disk is the SCSI device. Since each physical disk and its SMART information are directly corresponding one-to-one, the next associated node of the physical disk is the disk SMART information. In summary, when the logical drive letter of the logical disk is of the first type and the hardware access method of the physical disk is determined to be the second access type, the associated link of the logical disk can be obtained as associated link 3: logical disk → SCSI device → physical disk → disk SMART information.

[0085] For example, assuming the physical disk is an M RAID card, this M RAID card will be connected to the storage system via a SCSI device. One or more physical disks in this M RAID card will be connected after forming a volume. At this time, the logical drive letters of the corresponding logical disks can be queried as sd1, sd2, etc. Therefore, when the logical drive letter of the logical disk is found to be sdA, it can be determined that the next associated node of the logical disk is a SCSI device. Based on the correspondence between the unique identifier of the logical disk, LogicalDisk.diskname, and the unique identifier of the SCSI device, ScsiGeneric.diskname, the corresponding SCSI device can be determined. Then, another unique identifier of the SCSI device, host_type, is obtained, confirming that the corresponding RAID card type is an M RAID card. At this point, the associated link of the logical disk can be determined to be associated link 2: logical disk → SCSI device → volume → N (physical disk → disk SMART information). Here, the physical disk subclass is Mraid Disk, and the volume subclass is Mraid Volume. The mapping relationship between each node on this link (logical disk → SCSI device → Mraid Volume → N (Mraid Disk → disk SMART information) can be obtained. The following mapping relationship can be retrieved from the information stored in the system:

[0086] LogicalDisk.diskname<>ScsiGeneric.diskname means that there is a one-to-one correspondence between the diskname in the unique identifier of the LogicalDisk and the diskname in the unique identifier of the Scsi device. In this way, the mapping relationship between LogicalDisk and Scsi device can be obtained.

[0087] ScsiGeneric.target<>MraidVolume.volume_id (key mapping) means that the target in the combined unique identifier information of the Scsi device (that is, the Host, Controller and target are combined to uniquely identify a Scsi device) is one-to-one with the volume_id in the unique identifier information of the MraidVolume. In this way, the mapping relationship between the Scsi device and the volume can be obtained.

[0088] MraidVolume.PhysicalDisk(s).location(enclosure,slot) <> MraidDisk.location(enclosure,slot) (a one-to-N mapping relationship). That is, the PhysicalDisk(s).location (i.e., the physical location of the physical disk) in the unique identifier of MraidVolume (enclosure refers to the rack number where the physical disk is located, and slot refers to the slot number within the rack) corresponds one-to-one with the location(enclosure,slot) in the unique identifier of MraidDisk. In this way, a one-to-N mapping relationship between MraidVolume and MraidDisk can be obtained.

[0089] MraidDisk.device_id<>DiskSmart.device, meaning that the device ID in the combined identifier information of MraidDisk corresponds one-to-one with the device in DiskSmart, thus obtaining the mapping relationship between MraidDisk and DiskSmart;

[0090] In this way, the mapping relationship between adjacent nodes on the associated link 2 can be obtained.

[0091] Alternatively, for example, suppose the physical disk is an A RAID card, which is connected to the storage system via a SCSI device. One or more physical disks within this A RAID card are connected as a volume. In this case, the logical drive letters of the corresponding logical disks can be found as sd1, sd2, etc. Therefore, when the logical drive letter of the logical disk is found to be sd1, it can be determined that the next associated node of the logical disk is a SCSI device. Based on the correspondence between the unique identifier of the logical disk, LogicalDisk.diskname, and the unique identifier of the SCSI device, ScsiGeneric.diskname, the corresponding SCSI device can be determined. Then, another unique identifier of the SCSI device, host_type, is obtained, confirming that the corresponding RAID card type is ARAID card. At this point, the associated link corresponding to the logical disk can be determined as associated link 2: logical disk → SCSI device → volume → N (physical disk → disk SMART information). Here, the physical disk subclass is Araid Disk, and the volume subclass is Araid Volume. The mapping relationship between each node in associated link 2 (logical disk → SCSI device → Araid Volume → N (Araid Disk → disk SMART information) can be obtained from the system stored information. The following mapping relationship can be retrieved from the system stored information:

[0092] LogicalDisk.diskname<>ScsiGeneric.diskname means that there is a one-to-one correspondence between the diskname in the unique identifier of the LogicalDisk and the diskname in the unique identifier of the Scsi device. In this way, the mapping relationship between LogicalDisk and Scsi device can be obtained.

[0093] LogicalDisk.scsi_id<>AraidVolume.volume_id means that there is a one-to-one correspondence between the scsi_id in the unique identifier of LogicalDisk and the volume_id in the unique identifier of AraidVolume. In this way, the mapping relationship between LogicalDisk and AraidVolume can be obtained.

[0094] AraidVolume.PhysicalDisk(s).location(enclosure,slot) <> AraidDisk.location(enclosure,slot) (a one-to-N mapping relationship). That is, the PhysicalDisk(s).location (i.e., the physical location of the physical disk) in the unique identifier information of AraidVolume corresponds one-to-one with the location(enclosure,slot) in the unique identifier information of AraidDisk. In this way, a one-to-N mapping relationship between AraidVolume and AraidDisk can be obtained.

[0095] AraidDisk.target<>ScsiGeneric.target means that the target in the combined identifier information of AraidDisk and the target in the combined identifier information of Scsi device are in one-to-one correspondence, so that a 1-to-N mapping relationship between AraidDisk and Scsi device can be obtained;

[0096] ScsiGeneric.device_id<>DiskSmart.device means that the device ID in the unique identification information of the Scsi device corresponds one-to-one with the device in the DiskSmart, thus obtaining the mapping relationship between the Scsi device and the DiskSmart;

[0097] In this way, we can obtain the mapping relationship between the Scsi device on the associated link 2 and LogicalDisk and DiskSmart, the mapping relationship between LogicalDisk and AraidVolume, the 1-to-N mapping relationship between AraidVolume and AraidDisk, and the direct or indirect mapping relationship between each node and other nodes.

[0098] Alternatively, for example, suppose the physical disk is an HBA (Host Bus Adapter) card. There are two access configurations: one is using the HBA card as a RAID card. In this case, the HBA card will connect to the storage system via a SCSI device, and one or more physical disks within the HBA card will form a volume before being connected. In this scenario, the logical drive letters for the corresponding logical disks can be found as sd1, sd2, etc. Therefore, when the logical drive letter of the logical disk is found to be sd1, it can be determined that the next associated node of the logical disk is a SCSI device. Based on the unique identifier host_type of the SCSI device corresponding to the logical disk, the corresponding RAID card type is determined to be an HBA card configured as a RAID card. At this time, the associated link corresponding to the logical disk can be determined to be associated link 2: logical disk → SCSI device → volume → N (physical disk → disk SMART information). At this time, the physical disk subclass is SasxircuDisk, and the volume subclass is SasxircuVolume. The mapping relationship between each node in associated link 2 corresponding to the logical disk (logical disk → SCSI device → SasxircuVolume → N (SasxircuDisk → disk SMART information) can be obtained. The following mapping relationship can be obtained from the information stored in the system:

[0099] LogicalDisk.wwn<>SasxircuVolume.wwid means that wwn (World Wide Name) in the unique identifier of LogicalDisk and wwid (World Wide ID) in the unique identifier of SasxircuVolume are in one-to-one correspondence, thus obtaining the mapping relationship between LogicalDisk and SasxircuVolume;

[0100] The `SasxircuVolume.PhysicalDisk(s).location(enclosure, slot)` method, which represents a one-to-N mapping relationship, means that the `PhysicalDisk(s).location` (the physical location of the physical disk, where `enclosure` refers to the rack number of the physical disk and `slot` refers to the slot number within the rack) in the unique identifier of the `SasxircuVolume` corresponds one-to-one with the `location(enclosure, slot)` in the unique identifier of the `SasxircuDisk`. This establishes a one-to-N mapping relationship between `SasxircuVolume` and `SasxircuDisk`.

[0101] SasxircuDisk.sas_address<>ScsiGeneric.sas_address, meaning that the sas (serial SCSI) address in the combined identification information of SasxircuDisk corresponds one-to-one with the sas_address in the combined identification information of the Scsi device. In this way, the mapping relationship between SasxircuDisk and Scsi device can be obtained.

[0102] ScsiGeneric.device<>DiskSmart.device means that there is a one-to-one correspondence between the device in the unique identification information of the Scsi device and the device in the DiskSmart, so that the mapping relationship between the Scsi device and the DiskSmart can be obtained;

[0103] Thus, we can obtain the mapping relationship between LogicalDisk and SasxircuVolume on the associated link 2, the 1-to-N mapping relationship between SasxircuVolume and SasxircuDisk, the mapping relationship between SasxircuDisk and Scsi device, the mapping relationship between Scsi device and DiskSmart, and the direct or indirect mapping relationship between each node and other nodes.

[0104] Alternatively, if the HBA is not configured for RAID but is directly connected, the HBA card will connect to the storage system via a SCSI device, and the physical disks in the HBA card will be directly connected without forming volumes. In this case, the logical drive letters of the corresponding logical disks can be found as sd1, sd2, etc. Therefore, when the logical drive letter of the logical disk is found to be sd1, the next associated node of the logical disk can be determined to be a SCSI device. Based on the correspondence between the unique identifier of the logical disk, LogicalDisk.diskname, and the unique identifier of the SCSI device, ScsiGeneric (generic) diskname, the corresponding SCSI device can be determined. Then, another unique identifier of the SCSI device, host_type, is obtained, confirming that the corresponding access type is HBA card pass-through. At this point, the associated link corresponding to the logical disk can be determined to be associated link 3: logical disk → SCSI device → physical disk → disk SMART information. In this case, the physical disk subclass is SasxircuDisk, and the mapping relationship between the nodes of associated link 3 corresponding to the logical disk (logical disk → SCSI device → SasxircuDisk → disk SMART information) can be obtained. The following mapping relationships can be retrieved from the information stored in the system:

[0105] LogicalDisk.diskname<>ScsiGeneric.diskname means that there is a one-to-one correspondence between the diskname in the unique identifier of the LogicalDisk and the diskname in the unique identifier of the Scsi device. In this way, the mapping relationship between LogicalDisk and Scsi device can be obtained.

[0106] ScsiGeneric.sas_address<>SasxircuDisk.sas_address means that there is a one-to-one correspondence between the sas_address in the combined identifier information of the Scsi device and the sas_address in the combined identifier information of the SasxircuDisk. In this way, the mapping relationship between the Scsi device and the SasxircuDisk can be obtained.

[0107] ScsiGeneric.device<>DiskSmart.device means that there is a one-to-one correspondence between the device in the unique identification information of the Scsi device and the device in the DiskSmart, so that the mapping relationship between the Scsi device and the DiskSmart can be obtained;

[0108] In this way, the mapping relationship between the Scsi device on the associated link 3 and other nodes LogicalDisk and SasxircuDiskDiskSmart can be obtained. Each node has a direct or indirect mapping relationship with other nodes.

[0109] Alternatively, for example, the physical disk is accessed via AHCI (Advanced Host Controller Interface) pass-through. In this case, the physical disk is directly accessed without forming a volume. The logical drive letters of the corresponding logical disks can be found as sd1, sd2, etc. Therefore, when the logical drive letter of the logical disk is found to be sd1, the next associated node of this logical disk can be determined to be a SCSI device. Based on the correspondence between the unique identifier of the logical disk, LogicalDisk.diskname, and the unique identifier of the SCSI device, ScsiGeneric.diskname, the corresponding SCSI device can be determined. Then, another unique identifier of the SCSI device, host_type, is obtained, determining that the corresponding access type is AHCI card pass-through. At this point, the associated link corresponding to this logical disk can be determined to be associated link 3: logical disk → SCSI device → physical disk → disk SMART information. In this case, the physical disk subclass is AchiDisk, and the mapping relationship between the nodes of associated link 3 corresponding to this logical disk can be obtained as logical disk → SCSI device → ScsiGenericDisk → disk SMART information. The following mapping relationships can be retrieved from the information stored in the system:

[0110] LogicalDisk.diskname<>ScsiGeneric.diskname means that the diskname in the unique identifier of LogicalDisk corresponds to the diskname in the unique identifier of Scsi device, thus obtaining the mapping relationship between LogicalDisk and Scsi device;

[0111] ScsiGeneric.(host, controller, target)<>AhciDisk.(host, controller, slot) means that the (host, controller, target) in the combined identifier information of the Scsi device and the (host, controller, slot) in the combined identifier information of the AchiDisk are in one-to-one correspondence, so that the mapping relationship between the Scsi device and the AchiDisk can be obtained;

[0112] ScsiGeneric.device<>DiskSmart.device means that there is a one-to-one correspondence between the device in the unique identification information of the Scsi device and the device in the DiskSmart, so that the mapping relationship between the Scsi device and the DiskSmart can be obtained;

[0113] In this way, the mapping relationship between the Scsi device on the associated link 3 and other nodes LogicalDisk and AchiDiskDiskSmart can be obtained, and each node has a direct or indirect mapping relationship with other nodes.

[0114] As can be seen from the examples above, the current mainstream disk configuration association links can be covered by the following three types of association links:

[0115] Link 1: Logical disk → Physical disk → Disk SMART information;

[0116] Link 2: Logical disk → SCSI device → Volume → N (Physical disk → Disk SMART information);

[0117] Link 3: Logical disk → SCSI device → Physical disk → Disk SMART information.

[0118] After establishing the association links between logical disks, physical disks, and disk SMART information, the mapping relationships between nodes on these association links can be queried. Since the types of disks and access methods used in practice vary, the mapping relationships between nodes are also diverse, as in the example above. However, the mapping relationship between one node and one or more other nodes in the association link can always be found. With the association relationships established, the following is a full-link disk health check. Based on the established association links, a full-link health check can be performed on each node in the association link. Health checks on different nodes can be performed synchronously. Only when the health check results of all nodes are normal will the disks in the storage system be considered healthy. If the health check result of the target node is abnormal, the logical drive letter of the target logical disk corresponding to the target node can be output upwards based on the mapping relationships between the nodes, and the disk location information of the target physical disk can be output downwards.

[0119] In one embodiment of this disclosure, step S103 of the above method, which involves performing a health check on each node in the associated link corresponding to the logical disk and obtaining the health check results of each node, may include the following steps:

[0120] A recursive health check is performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node.

[0121] In this implementation, recursive health checks refer to checking not only the health of the current node but also the health of its next associated node during the health check of the current node. For example, if the logical disk's associated link is link 2: logical disk → SCSI device → volume → N (physical disk → disk SMART information), then during the health check of the logical disk, not only is the health of the logical disk checked, but also the health of the SCSI device. While checking the SCSI device's health, the health of the volume is also checked. While checking the volume's health, the health of N physical disks is also checked. Finally, while checking the health of the N physical disks, the health of the disk SMART information corresponding to each physical disk is also checked, thus achieving recursive checking.

[0122] In one embodiment of this disclosure, the method may further include the following steps:

[0123] When performing a health check on a physical disk, a health check is also performed on the disk controller corresponding to the physical disk, and the health check result of the physical disk includes the health check result of the disk controller.

[0124] In this embodiment, the disk controller refers to the disk drive adapter, which is the interface device between the computer and the disk drive. It receives and interprets commands from the computer, sends various control signals to the disk drive, detects the disk drive status, and writes and reads data from the disk according to the prescribed disk data format. When performing a health check on the physical disk, a health check can also be performed on the disk controller corresponding to the physical disk, making the disk health check more comprehensive.

[0125] In one embodiment of this disclosure, when the logical drive letter of the second type of logical disk is nvmeX or dfX, the health check result of the physical disk corresponding to the logical disk includes the health check result of the disk SMART information of the physical disk.

[0126] In this implementation, when the logical drive letter of the logical disk is nvmeX or dfX, the health check information of the physical disk will include disk SMART information. Therefore, the health check result of the physical disk includes the health check result of the disk SMART information, and it is not necessary to perform a health check on the disk SMART information again.

[0127] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein.

[0128] Figure 2 This diagram illustrates a structural block diagram of a disk health check apparatus according to an embodiment of the present disclosure. This apparatus can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 2 As shown, the disk health check device includes:

[0129] The determination module 201 is configured to determine the association links between each logical disk and physical disk in the storage system;

[0130] The acquisition module 202 is configured to acquire the mapping relationship between each node in the associated link corresponding to the logical disk;

[0131] The inspection module 203 is configured to perform health checks on each node in the associated link corresponding to the logical disk and obtain the health check results of each node.

[0132] The output module 204 is configured to output the location information of the target logical disk and the location information of the target physical disk corresponding to the target node, based on the mapping relationship between the nodes, when the health check result of the target node is abnormal.

[0133] In one embodiment of this disclosure, the disk health check method is applicable to the diagnosis of various storage systems that use disks for storage, such as the diagnosis of server internal storage systems or the diagnosis of professional data storage systems, etc.

[0134] In one embodiment of this disclosure, a physical disk refers to a real, physical hardware disk, such as a hard drive installed in a machine, which is called a physical disk. A logical disk is a partition of a real hard drive (physical disk) into several logical disks. A logical disk does not actually exist; it is a logical drive letter that represents each partition after it has been created. A logical drive letter uniquely identifies a logical disk.

[0135] In one embodiment of this disclosure, the nodes on the association link between the logical disk and the physical disk include the logical disk, the intermediate node between the logical disk and the physical disk, and the physical disk. It should be noted that during disk health checks, in addition to performing operational health checks on the logical disk, the intermediate node between the logical disk and the physical disk, and the physical disk, hardware health checks are typically performed, such as SMART information health checks. Disk SMART information refers to disk health information detected using disk SMART technology. Disk SMART technology involves analyzing and comparing the operating status, historical records, and preset safety values ​​of the read / write heads, platters, motors, and circuits through monitoring commands on the physical disk and monitoring software on the host. When a situation occurs outside the safety value range, a warning message is automatically issued to the user to attract the attention of the system administrator or user, ensuring that data is backed up before the physical disk fails and that the corresponding physical disk is repaired or replaced. Each physical disk is equipped with a disk SMART, so each physical disk is associated with its disk SMART information. Therefore, the association link can also include disk SMART information, and the next associated node of the physical disk in the association link is the disk SMART information.

[0136] In one embodiment of this disclosure, since the types of physical disks are different, the access methods to the storage system are also different. Therefore, the intermediate nodes associated with logical disks and physical disks in the storage system will also be different. The association links between each logical disk and physical disk can be determined first to obtain each node in the association link corresponding to the logical disk. Then, the mapping relationship between each node in the association link corresponding to the logical disk can be obtained. The mapping relationship between each node can include the mapping relationship between two adjacent nodes on the association link or it can also include the mapping relationship between one node and one or more other nodes. As long as there is a direct or indirect mapping relationship between each node, it is acceptable. The indirect mapping relationship mentioned here means that there is a direct mapping relationship between node A and node B, and there is a direct mapping relationship between node B and node C. Then there is an indirect mapping relationship between node A and node C.

[0137] In one embodiment of this disclosure, a health check needs to be performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node. These results can indicate whether any abnormalities have occurred at the node. If the health check result of a node, such as the target node, is abnormal, the target logical disk and target physical disk corresponding to that target node can be determined based on the mapping relationship between the nodes. The logical drive letter of the target logical disk and the disk location information of the target physical disk can then be output. Regardless of which target node in the associated link is abnormal, the target logical disk and target physical disk can be associated with the direct or indirect mapping relationship between the target node and the logical disk and physical disk. The location information of the target logical disk corresponding to the problematic target node can be output, such as the logical drive letter, and the location information of the target physical disk can be output, such as the slot cabinet and slot number where the physical disk is located. It should be noted that the health check result of the target node can also be output to display abnormal information to the user. Furthermore, the health check results of each node in the associated link can also be output so that the user can view the health status of the entire link.

[0138] In this embodiment, a full-link health check can be performed on the disk, providing a more comprehensive check. When anomalies are detected, the logical drive letter of the target logical disk corresponding to the problematic target node and the disk location information of the target physical disk can be output. This allows the service provider to isolate the service on the target logical disk, while simultaneously enabling maintenance personnel to repair or replace the target physical disk. This achieves effective linkage between service processing and disk repair, enabling rapid handling of disk failures. Furthermore, if a new physical disk is added to the storage system, only the above scheme needs to be used to quickly determine the associated links and establish the mapping relationship between each node in the associated links to perform a full-link health check, simplifying new hardware adaptation.

[0139] In one embodiment of this disclosure, the determining module is configured as follows:

[0140] Obtain the logical drive letter of the logical disk;

[0141] When the logical drive letter of the logical disk is of type 1, the next associated node of the logical disk is determined to be a Small Computer System Interface (SCSI) device.

[0142] When the logical drive letter of the logical disk is of type 2, the next associated node of the logical disk is determined to be the physical disk; wherein, the next associated node of the physical disk is the disk SMART information.

[0143] In this embodiment, the logical drive letter of the logical disk can uniquely identify the logical disk. The second type of logical drive letter can be nvmeX and dfX, and the first type of logical drive letter can be an existing logical drive letter other than the first type of logical drive letter, such as sdX.

[0144] In this embodiment, the logical drive letter of the logical disk can uniquely identify the logical disk. The second type of logical drive letter can be nvmeX and dfX, and the first type of logical drive letter can be an existing logical drive letter other than the first type of logical drive letter, such as sdX.

[0145] In this implementation, when the logical drive letter of the logical disk is nvmeX or dfX, the next associated node of the logical disk can be determined to be the physical disk. There are no intermediate nodes between the logical disk and the physical disk. Since the physical disk and its SMART information are directly corresponding one-to-one, the next associated node of the physical disk is the disk SMART information. Therefore, when the logical drive letter of the logical disk is nvmeX or dfX, the associated link corresponding to this logical drive letter can be determined to be associated link 1: logical disk → physical disk → disk SMART information. At this time, the mapping relationship between each node in associated link 1, namely the logical disk, the physical disk, and the disk SMART information, can be obtained, that is, the mapping relationship between the logical disk and the physical disk, and the mapping relationship between the physical disk and the disk SMART information.

[0146] In this implementation, health checks are performed on each node in the associated link 1, namely the logical disk, physical disk, and disk SMART information. This yields health check results for the logical disk, such as logical disk error logs; health check information for the physical disk, including abnormal physical disk status information; and health check results for the disk SMART information, such as disk SMART alarm information. In some cases, the health check results for the physical disk also include the health check results for the disk SMART information. If a logical disk reports an error, the driver outputs the logical drive letter of the abnormal logical disk for isolation of related services. Furthermore, based on the mapping relationship between the logical disk and the physical disk, the driver can further associate and output the specific physical disk's disk location information to facilitate collaborative disk repair or replacement by maintenance personnel. Similarly, if a physical disk reports an error, the driver outputs the drive letter location information of the abnormal physical disk for collaborative disk repair or replacement by maintenance personnel. Furthermore, based on the mapping relationship between the logical disk and the physical disk, the driver can further associate and output the corresponding logical drive letter of the logical disk to facilitate isolation of related services on the logical disk identified by that logical drive letter.

[0147] In one embodiment of this disclosure, the determining module is further configured to:

[0148] When the next associated node of the logical disk is a SCSI device, the hardware access method of the physical disk is determined based on the identification information of the SCSI device corresponding to the logical disk.

[0149] When the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device is determined to be a volume, wherein the next associated node of the volume is N physical disks, and N is an integer greater than or equal to 1;

[0150] When the hardware access type of the SCSI device is the second access type, the next associated node of the SCSI device is determined to be a physical disk.

[0151] When the logical drive letter of a logical disk is of type 1, such as sdX, it can be determined that the physical disk is connected via a SCSI device. In this case, the next associated node of the logical disk is the SCSI device, and the first intermediate node between the logical disk and the physical disk is the SCSI device. Based on the mapping relationship between the logical disk and the SCSI device, the corresponding SCSI device can be determined. Here, the corresponding hardware access method can be determined by obtaining the host_type information in the unique identifier information of the SCSI device. Some physical disks of type 1 access are connected by forming one or more physical disks into a volume, while some physical disks of type 1 access are connected directly without forming a volume.

[0152] In this embodiment, when the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device can be determined to be a volume, and the next associated node of the volume is N physical disks, where N is an integer greater than or equal to 1; the intermediate nodes between the logical disk and the physical disk are the SCSI device and the volume. Since each physical disk and its SMART information are directly corresponding one-to-one, the next associated node of the physical disk is the disk SMART information. In summary, when the logical drive letter of the logical disk is of the first type and the hardware access method of the physical disk is determined to be the first access type, the associated link of the logical disk can be obtained as associated link 2: logical disk → SCSI device → volume → N (physical disk → disk SMART information).

[0153] In this embodiment, when the hardware access method of the physical disk is the second access type, the next associated node of the SCSI device can be determined to be the physical disk; the intermediate node between the logical disk and the physical disk is the SCSI device. Since each physical disk and its SMART information are directly corresponding one-to-one, the next associated node of the physical disk is the disk SMART information. In summary, when the logical drive letter of the logical disk is of the first type and the hardware access method of the physical disk is determined to be the second access type, the associated link of the logical disk can be obtained as associated link 3: logical disk → SCSI device → physical disk → disk SMART information.

[0154] In one embodiment of this disclosure, the inspection module is configured as follows:

[0155] When performing a health check on a physical disk, a health check is also performed on the disk controller corresponding to the physical disk, and the health check result of the physical disk includes the health check result of the disk controller.

[0156] In this embodiment, the disk controller refers to the disk drive adapter, which is the interface device between the computer and the disk drive. It receives and interprets commands from the computer, sends various control signals to the disk drive, detects the disk drive status, and writes and reads data from the disk according to the prescribed disk data format. When performing a health check on the physical disk, a health check can also be performed on the disk controller corresponding to the physical disk, making the disk health check more comprehensive.

[0157] In one embodiment of this disclosure, the inspection module is configured as follows:

[0158] A recursive health check is performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node.

[0159] In this implementation, recursive health checks refer to checking not only the health of the current node but also the health of its next associated node during the health check of the current node. For example, if the logical disk's associated link is link 2: logical disk → SCSI device → volume → N (physical disk → disk SMART information), then during the health check of the logical disk, not only is the health of the logical disk checked, but also the health of the SCSI device. While checking the SCSI device's health, the health of the volume is also checked. While checking the volume's health, the health of N physical disks is also checked. Finally, while checking the health of the N physical disks, the health of the disk SMART information corresponding to each physical disk is also checked, thus achieving recursive checking.

[0160] In one embodiment of this disclosure, when the logical drive letter of the second type of logical disk is nvmeX or dfX, the health check result of the physical disk corresponding to the logical disk includes the health check result of the disk SMART information of the physical disk.

[0161] In this implementation, when the logical drive letter of the logical disk is nvmeX or dfX, the health check information of the physical disk, such as an NVMe hard drive, will include disk SMART information. Therefore, the health check result of the physical disk will include the health check result of the disk SMART information, and there is no need to perform a health check on the disk SMART information.

[0162] This disclosure also discloses an electronic device, Figure 3 This diagram illustrates a structural block diagram of an electronic device according to an embodiment of the present disclosure, such as... Figure 3 As shown, the electronic device 300 includes a memory 301 and a processor 302; wherein,

[0163] The memory 301 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 302 to implement the above method steps.

[0164] Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing the method according to embodiments of the present disclosure.

[0165] like Figure 4 As shown, the computer system 400 includes a processing unit 401, which can execute various processes described above based on a program stored in a read-only memory (ROM) 402 or a program loaded from a storage section 408 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the system 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0166] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed. The processing unit 401 can be implemented as a CPU, GPU, TPU, FPGA, NPU, etc.

[0167] In particular, according to embodiments of this disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program tangibly embodied on a readable medium thereof, the computer program containing program code for performing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411.

[0168] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0169] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.

[0170] In another aspect, embodiments of this disclosure also provide a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the methods described in embodiments of this disclosure.

[0171] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A disk health check method, wherein, include: Determine the connection links between each logical disk and physical disk in the storage system; Obtain the mapping relationship between each node in the associated link corresponding to the logical disk; Perform a health check on each node in the associated link corresponding to the logical disk, and obtain the health check results of each node; When the health check result of the target node is abnormal, the location information of the target logical disk and the location information of the target physical disk corresponding to the target node are output based on the mapping relationship between the nodes. The determination of the association links between logical disks and physical disks in the storage system includes: Obtain the logical drive letter of the logical disk; When the logical drive letter of the logical disk is of type 1, the next associated node of the logical disk is determined to be a Small Computer System Interface (SCSI) device. When the logical drive letter of the logical disk is of type 2, the next associated node of the logical disk is determined to be the physical disk; wherein, the next associated node of the physical disk is the SMART (Smart Disk Monitoring, Analysis and Reporting Technology) information.

2. The method according to claim 1, wherein, The determination of the association links between logical disks and physical disks in the storage system also includes: When the next associated node of the logical disk is a SCSI device, the hardware access method of the physical disk is determined based on the identification information of the SCSI device corresponding to the logical disk. When the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device is determined to be a volume, wherein the next associated node of the volume is N physical disks, and N is an integer greater than or equal to 1; When the hardware access type of the SCSI device is the second access type, the next associated node of the SCSI device is determined to be a physical disk.

3. The method according to claim 1, wherein, The method further includes: When performing a health check on a physical disk, a health check is also performed on the disk controller corresponding to the physical disk, and the health check result of the physical disk includes the health check result of the disk controller.

4. The method according to claim 1, wherein, The step of performing health checks on each node in the associated link corresponding to the logical disk, and obtaining the health check results for each node, includes: A recursive health check is performed on each node in the associated link corresponding to the logical disk to obtain the health check results of each node.

5. The method according to claim 1, wherein, When the logical drive letter of the second type of logical disk is nvmeX or dfX, the health check result of the physical disk corresponding to the logical disk includes the health check result of the disk SMART information of the physical disk.

6. A disk health check device, wherein, include: The determination module is configured to determine the association links between each logical disk and physical disk in the storage system; The acquisition module is configured to acquire the mapping relationship between each node in the associated link corresponding to the logical disk; The inspection module is configured to perform health checks on each node in the associated link corresponding to the logical disk and obtain the health check results of each node. The output module is configured to output the location information of the target logical disk and the location information of the target physical disk corresponding to the target node, based on the mapping relationship between the nodes, when the health check result of the target node is abnormal. The determining module is configured as follows: Obtain the logical drive letter of the logical disk; When the logical drive letter of the logical disk is of type 1, the next associated node of the logical disk is determined to be a Small Computer System Interface (SCSI) device. When the logical drive letter of the logical disk is of type 2, the next associated node of the logical disk is determined to be the physical disk; wherein, the next associated node of the physical disk is the SMART (Smart Disk Monitoring, Analysis and Reporting Technology) information.

7. The apparatus according to claim 6, wherein, The determining module is further configured to: When the next associated node of the logical disk is a SCSI device, the hardware access method of the physical disk is determined based on the identification information of the SCSI device corresponding to the logical disk. When the hardware access method of the physical disk is the first access type, the next associated node of the SCSI device is determined to be a volume, wherein the next associated node of the volume is N physical disks, and N is an integer greater than or equal to 1; When the hardware access type of the SCSI device is the second access type, the next associated node of the SCSI device is determined to be a physical disk.

8. An electronic device, characterized in that, The method includes a memory and at least one processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the at least one processor to implement the steps of the method according to any one of claims 1-5.

9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by a processor, the computer instructions implement the steps of the method described in any one of claims 1-5.

10. A computer program product comprising a computer program / instructions, wherein, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Method and apparatus for determining fault location in storage system

    CN105468484A

  • Fault disk positioning method and device

    CN112445633A