Storage link failure cause location method, storage subsystem and computer equipment
By recording the command execution information issued by the server when the serial logging module of the extension backplane is turned on, and combining the disk array card and hard disk log information, the problem of low accuracy of location caused by storage link failure is solved, and the problem of improved Efficiency and accuracy of fault cause positioning.
Patent Information
- Application Number
- CN202411303460.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-19
AI Technical Summary
In the prior art, the accuracy of the cause of storage link failure is low, because the log file of the extension backplane can only record basic exception events and cannot record information related to command execution.
When the serial logging module of the extension backplane is enabled, the command execution information of the target command issued by the server is recorded, and when the storage link is faulty, the log information of the disk array card and hard disk is obtained and sent to the server host for Location of the cause of the failure.
It improves the accuracy of location of storage link failure causes, can effectively utilize limited storage space, avoid storage space exhaustion caused by unlimited accumulation of logs, ensures stable operation of log records, and reduces the burden of later analysis.
Smart Images

Figure CN118819940B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a method for locating the cause of a storage link failure, a storage subsystem and a computer device. Background Art
[0002] With the continuous development of the server industry, users have higher and higher requirements for server security and reliability. The storage subsystem, which consists of disk array cards, hard disks, expansion backplanes, cables and other components, is an important part of the server. Therefore, the security and reliability of the storage subsystem are crucial.
[0003] In the related art, when a storage link of a storage subsystem fails, the cause of the storage link failure can be determined through log files of various components on the storage link.
[0004] However, when determining the cause of a storage link failure through the log files of each component on the storage link, the log file of the expansion backplane can only record basic abnormal events of the expansion backplane and cannot record information related to command execution, resulting in low accuracy in determining the cause of the storage link failure. Summary of the invention
[0005] In view of this, the present invention provides a method for locating the cause of a storage link failure, a storage subsystem and a computer device to solve the problem in the related art that the log file of the expansion backplane can only record basic abnormal events of the expansion backplane but cannot record information related to command execution, resulting in low accuracy in determining the cause of the storage link failure.
[0006] In a first aspect, the present invention provides a method for locating the cause of a storage link failure, the method comprising:
[0007] Get the switch status of the serial logging module of the expansion backplane;
[0008] When the switch state of the serial log recording module of the expansion backplane is turned on, the command execution information of the target command sent by the server is recorded by the serial log recording module;
[0009] In the event that the storage link fails, obtaining first log information corresponding to the disk array card, second log information corresponding to the hard disk, and target command execution information recorded by the serial log recording module;
[0010] The first log information, the second log information and the target command execution information are sent to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information and the target command execution information received by the server host end.
[0011] The method for locating the cause of a storage link failure provided in this embodiment uses a serial log recording module to record the command execution information of a target command issued by a server when the switch state of the serial log recording module of the expansion backplane is turned on. In the event of a storage link failure, the first log information corresponding to the disk array card, the second log information corresponding to the hard disk, and the target command execution information recorded by the serial log recording module are sent to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end. By using the serial log recording module to record the command execution information of the target command issued by the server, the cause of the storage link failure determined based on the first log information, the second log information, and the target command execution information is more accurate, thereby improving the accuracy of locating the cause of the storage link failure.
[0012] In an optional implementation, the using the serial log recording module to record the command execution information of the target command issued by the server includes:
[0013] Receive commands sent by the server;
[0014] In the case where the type of the command is a target command type, determining that the command is a target command, wherein the target command type is a read-write command, a monitoring command, a self-monitoring analysis command, an energy-saving command, and a link reset command;
[0015] The serial log recording module is used to record the command execution information of the target command sent by the server in an overwrite manner.
[0016] The storage link failure cause locating method provided in this embodiment records the command execution information of the target command sent by the server through the serial log recording module, thereby improving the efficiency of determining the storage link failure cause locating.
[0017] Using overwrite to record logs can effectively utilize limited storage space to achieve maximum performance, avoid the problem of storage space exhaustion caused by unlimited log accumulation, and ensure the stable operation of log recording.
[0018] In an optional implementation, when the storage link fails, obtaining the target command execution information recorded by the serial log recording module includes:
[0019] In the event of a failure in the storage link, determining whether the serial log recording module is provided with a keyword trigger condition;
[0020] In the case where the serial log recording module is provided with a keyword trigger condition, the command execution information recorded by the serial log recording module is screened using the keyword contained in the keyword trigger condition to obtain the target command execution information.
[0021] The method for locating the cause of a storage link failure provided in this embodiment introduces a keyword trigger condition when a storage link failure occurs. According to the keyword trigger condition, target command execution information with a high correlation with fault cause locating is screened out from the command execution information recorded by the serial log recording module. This not only reduces the burden of analyzing the command execution information at a later stage, but also improves the efficiency and accuracy of locating the cause of the storage link failure.
[0022] In an optional implementation, the using the keyword included in the keyword trigger condition to filter the command execution information recorded by the serial log recording module to obtain the target command execution information includes:
[0023] For any command execution information, if the command execution information includes at least one of the keywords, the command execution information is determined to be the target command execution information.
[0024] The storage link fault cause location method provided in this embodiment can quickly identify command execution information related to fault cause location from a large amount of log data through keyword matching, thereby improving the efficiency and accuracy of storage link fault cause location.
[0025] In an optional embodiment, the method further includes:
[0026] In the case that the serial log recording module is not set with a keyword trigger condition, the command execution information currently recorded by the serial log recording module is used as the target command execution information.
[0027] The storage link failure cause location method provided in this embodiment ensures the stability and business continuity of storage link failure cause location by using the command execution information currently recorded by the serial log recording module as the target command execution information when the serial log recording module is not set with a keyword trigger condition.
[0028] In an optional embodiment, the method further includes:
[0029] In the case where the storage link fails, the serial log recording module is suspended from recording the command execution information of the target command sent by the server.
[0030] The method for locating the cause of a storage link failure provided in this embodiment improves the accuracy of locating the cause of a storage link failure by suspending the use of a serial log recording module to record command execution information of a target command issued by a server when a storage link fails, thereby preventing key logs from being overwritten.
[0031] In an optional embodiment, the method further includes:
[0032] After the first log information, the second log information and the target command execution information are sent to the server host, the serial log recording module is continued to be used to record the command execution information of the target command issued by the server.
[0033] The storage link failure cause location method provided in this embodiment, after sending the first log information, the second log information and the target command execution information to the server host, continues to use the serial log recording module to record the command execution information of the target command issued by the server, thereby ensuring the continuity of the log recording.
[0034] In an optional embodiment, the method further includes:
[0035] In the event of a failure in the storage link, obtaining basic log information corresponding to the expansion backplane;
[0036] The sending of the first log information, the second log information, and the target command execution information to the server host end so that a technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end includes:
[0037] The first log information, the second log information, the basic log information and the target command execution information are sent to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, the basic log information and the target command execution information received by the server host end.
[0038] The storage link failure cause location method provided in this embodiment determines the storage link failure cause location based on the first log information, the second log information, the basic log information and the target command execution information, so that the determined storage link failure cause is more accurate, thereby improving the accuracy of storage link failure cause location.
[0039] In an optional embodiment, the method further includes:
[0040] When the switch state of the serial log recording module of the expansion backplane is in the off state, the expansion backplane log recording module is used to record basic log information corresponding to the expansion backplane.
[0041] The method for locating the cause of a storage link failure provided in this embodiment improves the stability of the system and achieves efficient use of resources by only using the extended backplane log recording module to record basic log information corresponding to the extended backplane when the switch state of the serial log recording module of the extended backplane is in the off state.
[0042] In an optional implementation, the command execution information includes: command response time, command type, command mode, execution status information and error status information.
[0043] The method for locating the cause of a storage link failure provided in this embodiment uses a serial log recording module to record the command execution information of a target command issued by a server, thereby making the cause of the storage link failure determined based on the first log information, the second log information and the target command execution information more accurate, thereby improving the accuracy of locating the cause of the storage link failure.
[0044] In a second aspect, the present invention provides an expansion backplane, the expansion backplane comprising: a serial logging module, wherein the serial logging module comprises a switch control module and a serial logging subunit;
[0045] The switch control module is used to control the switch state of the serial log recording subunit in response to a user operation;
[0046] The serial log recording subunit is used to record the command execution information of the target command sent by the server host in the turned-on state.
[0047] In a third aspect, the present invention provides a storage subsystem, comprising: a disk array card, an expansion backplane and a hard disk, wherein the storage subsystem is used to locate the cause of a storage link failure based on the storage link failure cause location method of the above-mentioned first aspect or any corresponding embodiment thereof.
[0048] In a fourth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for locating the cause of a storage link failure of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0049] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for locating the cause of a storage link failure according to the first aspect or any corresponding embodiment thereof.
[0050] In a sixth aspect, the present invention provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the method for locating the cause of a storage link failure in the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 is a schematic diagram of a flow chart of a method for locating a storage link failure cause according to an embodiment of the present invention;
[0053] Figure 2 is a flow chart of another method for locating the cause of a storage link failure according to an embodiment of the present invention;
[0054] Figure 3 is a schematic diagram of a data structure of command execution information recorded in a serial log recording module according to an embodiment of the present invention;
[0055] Figure 4 is a schematic diagram of command execution information recorded by a serial log recording module according to an embodiment of the present invention;
[0056] Figure 5 is a schematic structural diagram of an extended backplane according to an embodiment of the present invention;
[0057] Figure 6 is a flowchart of obtaining target command execution information according to an embodiment of the present invention;
[0058] Figure 7 is a schematic diagram of the structure of a storage subsystem according to an embodiment of the present invention;
[0059] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0061] With the continuous development of the server industry, the server market has gradually covered various fields, especially mainstream fields such as finance, Internet, and communications.
[0062] With the rapid development of the Internet, users have higher and higher requirements for high information security and high system reliability. As the most important components of the server, key components such as memory, hard disk, solid state drive (SSD), redundant array of independent disks (RAID) card, network card, etc. have a direct impact on the security of users, business applications and data. Therefore, the security of the above components needs to be guaranteed.
[0063] The storage subsystem, which consists of RAID card / Serial Attached SCSI (SAS) card, hard disk / SSD, Expander card / backplane, cables and other components, is one of the most important components of the server. Its stability and reliability directly affect the security of the server. It should be noted that the storage link includes the connection path between the storage subsystem and the multiple components that make up the storage subsystem. Due to the diversity of the components of the storage subsystem and the complexity of the interconnection between the components of the storage subsystem, the probability of compatibility failure is relatively high. According to statistics, storage link failures account for more than 60% of the total server failures each year. Therefore, accurately locating the root cause of storage link failures and quickly providing solutions are crucial to ensuring the security of storage links.
[0064] Accurately locating the root cause of storage link failures and quickly providing solutions requires not only rich experience and professional tools, but also innovative thinking and diverse analytical methods.
[0065] In the related technologies, for common types of failures in server storage links, such as disk drop, command timeout, speed reduction, high latency, and error reporting, the industry and component manufacturers have a wealth of debugging methods and standard processing techniques.
[0066] The common method of locating the cause of storage link failure includes locating the cause of storage link failure by using storage link related logs, and also includes locating the cause of storage link failure by using SAS protocol analyzer.
[0067] Among them, using storage link related logs to locate the cause of storage link failure includes: first, according to the fault phenomenon and error log, clarify the time point of the fault, preliminarily analyze the direction of the problem, and at the same time determine the initial suspicion direction through software and hardware comparison, model comparison, customer application, fault pattern, cross-validation analysis and troubleshooting; secondly, check from the firmware and driver of the components to see if similar problems are solved in the newly released version; then combine RAIS card logs, hard disk logs, baseboard management controller logs, operating system logs, etc., to comprehensively analyze and locate the cause of the problem.
[0068] Using a SAS protocol analyzer to locate the cause of a storage link failure includes: using a SAS protocol analyzer to capture the trace (transmission path) of the link at the time of the failure for further location analysis until the failure is resolved. Generally, as long as the trace at the time of the failure can be successfully captured, the cause of the storage link failure can basically be located.
[0069] However, due to the functional positioning, technical capabilities and log storage space size of the components themselves, the log files of the components cannot record all fault types and information communication processes, especially the log files of the expansion backplane, which can only record some hardware firmware information, backplane SAS address, physical (phy) topology, firmware fatal events, phy error technology, backplane send / receive (Tx / Rx) signals, rates and other information. Other fault types and detailed information such as command processing exceptions cannot be recorded. As one of the most important components of the storage link, the strength of the log recording function of the Expander backplane directly affects the location of the cause of the storage link failure. The Expander log recording function in the related technology is relatively weak, and only the above basic information is recorded, resulting in low accuracy in determining the cause of the storage link failure.
[0070] The SAS protocol analyzer can be connected in series between the Expander backplane and the hard disk. It can confirm whether the problem is on the host side or the device side by capturing the communication status of the link at the time of the failure. However, the SAS protocol analyzer supports up to 4 interfaces. If the failure can be stably reproduced in a fixed hard disk slot, the trace can be captured to locate the cause of the storage link failure. However, for problems with low probability of reproduction, inability to stably reproduce, or inability to be fixedly reproduced, the current means cannot be used to locate the cause of the storage link failure.
[0071] An embodiment of the present invention provides a method for locating the cause of a storage link failure. When the switch state of the serial log recording module of the expansion backplane is on, the serial log recording module is used to record the command execution information of the target command issued by the server. When a storage link fails, the first log information corresponding to the disk array card, the second log information corresponding to the hard disk, and the target command execution information recorded by the serial log recording module are sent to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end to improve the accuracy of locating the cause of the storage link failure, and can record and analyze problems with low probability of reproduction, cannot be stably reproduced, or cannot be fixedly reproduced to locate the cause of the storage link failure.
[0072] According to an embodiment of the present invention, an embodiment of a method for locating the cause of a storage link failure is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0073] In this embodiment, a method for locating the cause of a storage link failure is provided, which can be used in a storage subsystem. Figure 1 FIG. 4 is a flow chart of a method for locating the cause of a storage link failure according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0074] Step S101, obtaining the switch status of the serial logging module of the expansion backplane.
[0075] Among them, the switch state of the serial logging module of the expansion backplane is turned on by default.
[0076] It should be noted that the opening of the serial logging module will consume some resources for additional data statistics and recording, which will inevitably affect the input and output performance of the system. Users can choose to close it according to actual business conditions, and choose to open it using commands when a storage link failure occurs.
[0077] Step S102: When the switch state of the serial log recording module of the expansion backplane is turned on, the serial log recording module is used to record the command execution information of the target command sent by the server.
[0078] Among them, the switch state of the serial log recording module of the expansion backplane is on, indicating that the serial log recording module can be used for logging, and the serial log recording module is used to record the command execution information of the target command sent by the server.
[0079] It should be noted that the serial logging module of the Expander backplane is directly connected to the Expander chip. The Serial Advanced Technology Attachment (SATA) protocol commands and SAS protocol commands issued by the server host are forwarded by the Expander chip.
[0080] It should be noted that the serial logging module is designed to record only the most critical and most problematic protocol commands and key events.
[0081] Step S103, when a storage link fails, first log information corresponding to the disk array card, second log information corresponding to the hard disk, and target command execution information recorded by the serial log recording module are obtained.
[0082] Among them, the disk array card is RAID card. RAID card and hard disk components have powerful and complete log recording functions, which can record various abnormal events such as errors and timeouts in detail. Therefore, in the case of a storage link failure, the first log information corresponding to the RAID card and the second log information corresponding to the hard disk are directly obtained from the RAID card. Combined with the target command execution information recorded by the serial log recording module, the cause of the storage link failure can be located.
[0083] Step S104, sending the first log information, the second log information and the target command execution information to the server host, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information and the target command execution information received by the server host.
[0084] Among them, after obtaining the first log information corresponding to the RAID card, the second log information corresponding to the hard disk and the target command execution information recorded by the serial log recording module, these log information are sent to the server host so that the technicians can locate the cause of the storage link failure based on these log information.
[0085] The method for locating the cause of a storage link failure provided in this embodiment uses a serial log recording module to record the command execution information of a target command issued by a server when the switch state of the serial log recording module of the expansion backplane is turned on. In the event of a storage link failure, the first log information corresponding to the disk array card, the second log information corresponding to the hard disk, and the target command execution information recorded by the serial log recording module are sent to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end. By using the serial log recording module to record the command execution information of the target command issued by the server, the cause of the storage link failure determined based on the first log information, the second log information, and the target command execution information is more accurate, which improves the accuracy of locating the cause of the storage link failure, and can record and analyze problems with low probability of recurrence, problems that cannot be stably reproduced, or problems that cannot be fixedly reproduced to locate the cause of the storage link failure.
[0086] In this embodiment, a method for locating the cause of a storage link failure is provided, which can be used in a storage subsystem. Figure 2 FIG. 4 is a flow chart of a method for locating the cause of a storage link failure according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0087] Step S201, obtain the switch status of the serial logging module of the expansion backplane. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0088] Step S202: When the switch state of the serial log recording module of the expansion backplane is turned on, the serial log recording module is used to record the command execution information of the target command sent by the server.
[0089] Specifically, the above step S202 includes:
[0090] Step S2021, receiving the command sent by the server.
[0091] Among them, the storage subsystem receives various commands issued by the server.
[0092] Step S2022, when the command type is a target command type, determine that the command is a target command, wherein the target command type is a read-write command, a monitoring command, a self-monitoring analysis command, a power-saving command, and a link reset command.
[0093] After receiving the command sent by the server, it is determined whether the command type is the target command type. If the command type is the target command type, the command is determined to be the target command, and the serial log recording module is used to record the command execution information of the target command.
[0094] It should be noted that read and write commands include read commands and write commands. Monitoring commands can be Read Log Ext commands. Self-monitoring analysis commands are Self-Monitoring Analysis and Reporting Technology (SMART) commands (SMART CommandSet). Energy-saving commands are Check Power Mode commands. Link reset commands are Reset commands.
[0095] Step S2023, using the serial log recording module, using an overwrite method to record the command execution information of the target command sent by the server.
[0096] Among them, due to the chip size and cost constraints, the capacity of the serial logging module can be set to a minimum of 64MB, which is expected to record about an hour of logs, and use an overwrite method to cyclically record the command execution information of the target command issued by the server.
[0097] It should be noted that the serial logging module is also designed so that the logs are not lost when power is off.
[0098] Step S203, when a storage link fails, obtain first log information corresponding to the disk array card, second log information corresponding to the hard disk, and target command execution information recorded by the serial log recording module.
[0099] Specifically, the above step S203 includes:
[0100] Step S2031: When a storage link fails, determine whether a keyword trigger condition is set for the serial log recording module.
[0101] The keyword trigger condition is set by the user. When a storage link fails, it is determined whether the serial log recording module is set with the keyword trigger condition to determine whether to obtain all or part of the logs recorded by the current serial log recording module.
[0102] Step S2032: When the serial log recording module is set with a keyword trigger condition, the command execution information recorded by the serial log recording module is screened using the keyword contained in the keyword trigger condition to obtain the target command execution information.
[0103] The serial log recording module is set with a keyword trigger condition, which means that in the event of a storage link failure, the command execution information recorded in the serial log recording module needs to be screened to obtain the target command execution information.
[0104] The keyword trigger condition includes a keyword, which may be suspend, discard, error (Fail), etc. The keyword is used to filter the command execution information currently recorded in the serial log recording module to obtain the target command execution information.
[0105] Step S204: Send the first log information, the second log information, and the target command execution information to the server host, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0106] The storage link failure cause locating method provided in this embodiment records the command execution information of the target command sent by the server through the serial log recording module, thereby improving the efficiency of determining the storage link failure cause locating.
[0107] Using overwrite to record logs can effectively utilize limited storage space to achieve maximum performance, avoid the problem of storage space exhaustion caused by unlimited log accumulation, and ensure the stable operation of log recording.
[0108] By introducing keyword trigger conditions when a storage link fails, the target command execution information with a high correlation with the fault cause location is filtered out from the command execution information recorded by the serial log recording module according to the keyword trigger conditions. This not only reduces the burden of subsequent analysis of the command execution information, but also improves the efficiency and accuracy of locating the cause of the storage link failure.
[0109] In some optional implementations, the above step S2032 includes:
[0110] Step a1: for any command execution information, if the command execution information includes at least one keyword, determine that the command execution information is target command execution information.
[0111] The keyword trigger condition may include at least one keyword. When any command execution information includes at least one keyword in the keyword trigger condition, the command execution information is determined as the target command execution information to implement the screening of the command execution information.
[0112] The storage link fault cause location method provided in this embodiment can quickly identify command execution information related to fault cause location from a large amount of log data through keyword matching, thereby improving the efficiency and accuracy of storage link fault cause location.
[0113] In some optional implementations, the method for locating the cause of a storage link failure further includes:
[0114] Step b1: when the serial log recording module is not set with a keyword trigger condition, the command execution information currently recorded by the serial log recording module is used as the target command execution information.
[0115] Among them, if the serial log recording module is not set with a keyword trigger condition, there is no need to filter the command execution information recorded by the serial log recording module. All command execution information currently recorded by the serial log recording module is used as the target command execution information to participate in the subsequent location of the cause of the storage link failure.
[0116] The storage link failure cause location method provided in this embodiment ensures the stability and business continuity of storage link failure cause location by using the command execution information currently recorded by the serial log recording module as the target command execution information when the serial log recording module is not set with a keyword trigger condition.
[0117] In some optional implementations, the method for locating the cause of a storage link failure further includes:
[0118] Step c1, when a storage link fails, suspending the use of the serial log recording module to record command execution information of the target command sent by the server.
[0119] In the event of a storage link failure, in order to avoid overwriting of key logs, the serial log recording module is suspended from recording the command execution information of the target command issued by the server.
[0120] The method for locating the cause of a storage link failure provided in this embodiment improves the accuracy of locating the cause of a storage link failure by suspending the use of a serial log recording module to record command execution information of a target command issued by a server when a storage link fails, thereby preventing key logs from being overwritten.
[0121] In some optional implementations, the method for locating the cause of a storage link failure further includes:
[0122] Step d1, after sending the first log information, the second log information and the target command execution information to the server host, continue to use the serial log recording module to record the command execution information of the target command issued by the server.
[0123] It is understandable that after the first log information, the second log information and the target command execution information are sent to the server host, the key log has been sent to the server host, and the serial log recording module can continue to record the command execution information of the target command issued by the server.
[0124] That is, after sending the first log information, the second log information and the target command execution information to the server host, the serial log recording module continues to record the command execution information of the target command issued by the server.
[0125] The storage link failure cause location method provided in this embodiment, after sending the first log information, the second log information and the target command execution information to the server host, continues to use the serial log recording module to record the command execution information of the target command issued by the server, thereby ensuring the continuity of the log recording.
[0126] In some optional implementations, the method for locating the cause of a storage link failure further includes:
[0127] Step e1, when a storage link fails, obtain basic log information corresponding to the expansion backplane.
[0128] Among them, the basic log information corresponding to the extended backplane is obtained using the extended backplane log in the relevant technology. The recording function of the extended backplane log is relatively weak, and only records basic abnormal events such as basic link topology information, firmware fatal events, phy error counts, backplane Tx / Rx rates, etc. In other words, the basic log information is the information recorded in the extended backplane log.
[0129] The above step S204 includes:
[0130] Step f1, sending the first log information, the second log information, the basic log information and the target command execution information to the server host, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, the basic log information and the target command execution information received by the server host.
[0131] Among them, when a storage link fails and the first log information, the second log information, the basic log information and the target command execution information are obtained, the first log information, the second log information, the basic log information and the target command execution information are sent to the server host side to enable the technician to locate the cause of the storage link failure.
[0132] The storage link failure cause location method provided in this embodiment determines the storage link failure cause location based on the first log information, the second log information, the basic log information and the target command execution information, so that the determined storage link failure cause is more accurate, thereby improving the accuracy of storage link failure cause location.
[0133] In some optional implementations, the method for locating the cause of a storage link failure further includes:
[0134] Step g1, when the switch state of the serial log recording module of the expansion backplane is in the off state, the expansion backplane log recording module is used to record the basic log information corresponding to the expansion backplane.
[0135] It is understandable that the switch state of the serial log recording module of the expansion backplane is off, and the serial log recording module cannot be used to record the command execution information of the target command issued by the server. Only the expansion backplane log recording module can be used to record the basic log information corresponding to the expansion backplane. Among them, the expansion backplane log recording module is the expansion backplane log in the related technology.
[0136] The method for locating the cause of a storage link failure provided in this embodiment improves the stability of the system and achieves efficient use of resources by only using the extended backplane log recording module to record basic log information corresponding to the extended backplane when the switch state of the serial log recording module of the extended backplane is in the off state.
[0137] In some optional implementations, the command execution information includes: command response time, command type, command mode, execution status information, and error status information.
[0138] Figure 3 1 is a schematic diagram of the data structure of command execution information recorded in the serial log recording module according to an embodiment of the present invention. The serial log recording module is set to be accessible and recordable, and is designed to be able to capture and parse logs through an expansion backplane or RAID card tool. Figure 3 As shown, the command execution information includes: log generation time, timestamp, logical address, command tag, command type, data block size, command response time, command mode, execution status information and error status information.
[0139] The log generation time is the specific time when the serial log is generated, and the format is: Y / M / D_H:M:S. The serial log is the command execution information of the target command.
[0140] The timestamp is used to record the time of each command from reception, execution and completion. That is, it records the time when the target command is received, the time when the target command is executed and the time when the target command is completed.
[0141] The logical address is the logical block address (Logical Block Addressing, LBA for short), which is used to record the logical address space of each command operation.
[0142] The command tag is the unique identification tag of the command, which is used to record the execution process of each command.
[0143] Command type is used to record the type of command, covering six types of protocol commands: Read, Write, Read log Ext, SMARTCommand Set, Check Power Mode, and Reset.
[0144] The data block size is used to record the data block size of the read and write commands, such as 4K, 64K, 128K, etc.
[0145] The command response time is used to count the time taken for each command from reception to execution completion, in milliseconds.
[0146] The command mode is mainly used to record the order and randomness of command execution, and is mainly divided into sequential read, sequential write, random read, random write and other commands.
[0147] The execution status information is used to record the final execution status of each command, which is divided into three types: completed, suspended, and discarded, which respectively represent that the command is executed, the command is suspended without being executed, and the command is discarded.
[0148] Error status information is used to record whether errors occur during command execution. There are two main states: Pass and Fail.
[0149] Figure 4 FIG. 1 is a schematic diagram of command execution information recorded by a serial log recording module according to an embodiment of the present invention. Figure 4 As shown, the timestamp, command type, command response time, logical address, data block size, execution status information and error status information in the command execution information are exemplarily displayed.
[0150] According to Figure 4 The command execution information shown can clearly show the execution status of each target instruction, so that technicians can analyze typical problems of the storage link such as disk drop, performance problems and command timeout based on the command execution information.
[0151] For example, by analyzing the log, that is, the command execution information, it is determined which commands timed out, which commands are suspended, and which commands are discarded to determine the command timeout problem.
[0152] For example, by analyzing logs, that is, command execution information, we can determine which command or commands take a long time, which LBA addresses they are concentrated on, whether there is an impact from frequent read log temperature monitoring or SMART log monitoring, the energy-saving mode of Check Power, or whether there is a sudden abnormal reset event to determine performance issues.
[0153] The method for locating the cause of a storage link failure provided in this embodiment uses a serial log recording module to record the command execution information of a target command issued by a server, thereby making the cause of the storage link failure determined based on the first log information, the second log information and the target command execution information more accurate, thereby improving the accuracy of locating the cause of the storage link failure.
[0154] In some optional implementations, the method for locating the cause of a storage link failure further includes:
[0155] In response to the keyword update operation, the keyword in the keyword trigger condition is updated.
[0156] After locating the cause of the storage link failure, the technician may update the keyword according to the cause of the storage link failure, so as to obtain command execution information that is more conducive to locating the cause of the storage link failure.
[0157] In the case where the serial log recording module is set with a keyword trigger condition, the command execution information recorded by the serial log recording module is screened using the keyword contained in the keyword trigger condition to obtain the target command execution information, including:
[0158] In the case where the serial log recording module is set with a keyword trigger condition, the command execution information recorded by the serial log recording module is screened using the keyword contained in the updated keyword trigger condition to obtain the target command execution information.
[0159] The storage link failure cause location method provided in this embodiment updates the keywords in the keyword trigger condition in real time according to the storage link failure cause, so that the acquired command execution information is more conducive to the storage link failure cause location, thereby improving the accuracy of storage link failure cause location.
[0160] In this embodiment, an extended backplane is also provided. Figure 5 Schematic diagram of the structure of the extended backplane according to an embodiment of the present invention. Figure 5 As shown, the expansion backplane includes: an expansion backplane chip (Expander chip) and a serial logging module.
[0161] The serial log recording module includes a switch control module and a serial log recording subunit. The switch control module is used to control the switch state of the serial log recording subunit in response to the user's operation.
[0162] The serial log recording subunit is used to record the command execution information of the target command sent by the server host in the turned-on state. Among them, the serial log recording subunit is a serial log recording chip.
[0163] That is to say, the switch control module is mainly responsible for the switch of the serial log recording function. The switch control module can also suspend the recording of logs by setting keywords according to the log recording content to prevent key logs from being overwritten. That is to say, the switch control module is also used to set keyword trigger conditions.
[0164] Generally, when the keyword appears in the command execution information, the storage link fails.
[0165] Figure 6 is a flow chart of obtaining target command execution information according to an embodiment of the present invention, such as Figure 6 As shown, the process of obtaining the target command execution information includes the following steps:
[0166] Step 1: Determine whether the switch control module turns on the log recording function, that is, determine whether the switch state of the serial log recording module of the expansion backplane is turned on. It should be noted that determining whether the switch state of the serial log recording module of the expansion backplane is turned on means determining whether the switch state of the serial log recording subunit is turned on.
[0167] Step 2: When the switch control module turns on the logging function, serial logging is performed. When the switch state of the serial logging module of the expansion backplane is turned on, the serial logging module is used to record the command execution information of the target command sent by the server.
[0168] If the log recording function is not enabled in the switch control module, the process ends.
[0169] Step 3: Determine whether to read the log, that is, determine whether the storage link fails. It is necessary to read the command execution information in the serial log recording module.
[0170] Step 4: Without reading the log, the log loop record is updated in real time, that is, when there is no failure in the storage link, the serial log recording module is used to record the command execution information of the target command issued by the server in an overwrite manner.
[0171] Step 5: When reading the log, determine whether the switch control module sets a trigger condition, that is, when the storage link fails, determine whether the serial log recording module sets a keyword trigger condition.
[0172] Step 6: Generate a simplified log when the switch control module sets the trigger condition.
[0173] When the switch control module does not set the trigger condition, the serial log file is generated.
[0174] Corresponding to the above, when the serial log recording module is provided with a keyword trigger condition, the command execution information recorded by the serial log recording module is screened using the keyword contained in the keyword trigger condition to obtain the target command execution information. When the serial log recording module is not provided with a keyword trigger condition, the command execution information currently recorded by the serial log recording module is used as the target command execution information. For details, please refer to the corresponding description, which will not be repeated here.
[0175] The expansion backplane provided in this embodiment can obtain the command type, data block size, logical address, command label, command response time, command mode, execution status, error status and other information of the commands passed through the expansion backplane in real time when the server is running, through the built-in serial logging module, and realizes real-time monitoring and command execution information statistics of read and write commands, monitoring commands, SMART commands, energy-saving commands, and link reset commands. In the event of a storage link failure, by parsing the command execution information, typical storage link problems such as disk drop, command timeout, performance, and error reporting can be quickly located, thereby improving the timeliness of resolving storage link failures.
[0176] The embodiment of the present invention further provides a storage subsystem. Figure 7 FIG. 1 is a schematic diagram of the structure of a storage subsystem according to an embodiment of the present invention. Figure 7 As shown, the storage subsystem is connected to the server mainboard via a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, referred to as: PCIE) protocol interface.
[0177] The storage subsystem includes a disk array card, i.e., a RAID card, an expansion backplane, and a hard disk. Each component complies with the SATA / SAS protocol, and communication between links is achieved through the protocol. The storage subsystem is used to locate the cause of a storage link failure based on the storage link failure cause location method shown in the above embodiment.
[0178] As one of the most important components of the storage link, the expansion backplane in the server is connected in series between the RAID card / SAS card and the hard disk (including SSD), playing the role of a link and bridge. The RAID card and hard disk components have powerful and complete log recording functions, which can record various abnormal events such as errors and timeouts in detail. Combined with the serial log recording module in the current expansion backplane, the root cause of the storage link failure can be quickly located.
[0179] The storage subsystem provided in this embodiment can obtain in real time the command type, data block size, logical address, command tag, command response time, command mode, execution status, error status and other information of the commands passed through the expansion backplane when the server is running, and also realizes the switch function of the serial logging module and the specified keyword trigger condition. By parsing the command execution information, typical problems related to storage link compatibility such as disk drop, command timeout, performance, and error reporting can be quickly located, thereby improving the accuracy of locating the cause of storage link failure and enhancing the ability to solve storage link failure and the timeliness of solving the problem.
[0180] The embodiment of the present invention also provides a computer device, see Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 801, memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 801 is taken as an example.
[0181] The processor 801 may be a central processing unit, a network processor or a combination thereof. The processor 801 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0182] The memory 802 stores instructions executable by at least one processor 801, so that the at least one processor 801 executes the method shown in the above embodiment.
[0183] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0184] The memory 802 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 802 may also include a combination of the above types of memory.
[0185] The computer device also includes a communication interface 803, which is used for the computer device to communicate with other devices or a communication network.
[0186] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0187] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0188] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for locating the cause of a storage link failure, characterized in that: The method comprises: Obtaining a switch state of a serial log recording module of an expansion backplane, wherein the switch state of the serial log recording module of the expansion backplane is turned on by default; When the switch state of the serial log recording module of the expansion backplane is turned on, the command execution information of the target command sent by the server is recorded by the serial log recording module; In the event that the storage link fails, obtaining first log information corresponding to the disk array card, second log information corresponding to the hard disk, and target command execution information recorded by the serial log recording module; Sending the first log information, the second log information, and the target command execution information to the server host end, so that a technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end; In the event of a failure in the storage link, obtaining basic log information corresponding to the expansion backplane; The sending of the first log information, the second log information, and the target command execution information to the server host end so that a technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end includes: Sending the first log information, the second log information, the basic log information and the target command execution information to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, the basic log information and the target command execution information received by the server host end; The method of using the serial log recording module to record the command execution information of the target command issued by the server includes: Receive commands sent by the server; In the case where the type of the command is a target command type, determining that the command is a target command, wherein the target command type is a read-write command, a monitoring command, a self-monitoring analysis command, an energy-saving command, and a link reset command; The serial log recording module is used to record the command execution information of the target command sent by the server in an overwrite manner.
2. The method according to claim 1, characterized in that In the case where the storage link fails, obtaining the target command execution information recorded by the serial log recording module includes: In the event of a failure in the storage link, determining whether the serial log recording module is provided with a keyword trigger condition; In the case where the serial log recording module is provided with a keyword trigger condition, the command execution information recorded by the serial log recording module is screened using the keyword contained in the keyword trigger condition to obtain the target command execution information.
3. The method according to claim 2, characterized in that The method of using the keyword contained in the keyword trigger condition to filter the command execution information recorded by the serial log recording module to obtain the target command execution information includes: For any command execution information, if the command execution information includes at least one of the keywords, the command execution information is determined to be the target command execution information.
4. The method according to claim 2, characterized in that: The method further comprises: In the case that the serial log recording module is not set with a keyword trigger condition, the command execution information currently recorded by the serial log recording module is used as the target command execution information.
5. The method according to claim 1, characterized in that The method further comprises: In the event that the storage link fails, the serial log recording module is suspended from recording the command execution information of the target command sent by the server.
6. The method according to claim 5, characterized in that The method further comprises: After the first log information, the second log information and the target command execution information are sent to the server host, the serial log recording module is continued to be used to record the command execution information of the target command issued by the server.
7. The method according to claim 1, characterized in that The method further comprises: When the switch state of the serial log recording module of the expansion backplane is in the off state, the expansion backplane log recording module is used to record basic log information corresponding to the expansion backplane.
8. The method according to claim 1, characterized in that The command execution information includes: command response time, command type, command mode, execution status information and error status information.
9. An extended backplane, characterized in that: The expansion backplane includes: a serial log recording module, wherein the serial log recording module includes a switch control module and a serial log recording subunit, and the switch state of the serial log recording module of the expansion backplane is turned on by default; The switch control module is used to control the switch state of the serial log recording subunit in response to a user operation; The serial log recording subunit is used to record the command execution information of the target command issued by the server host in the turned-on state; Wherein, when a storage link fails, the storage subsystem obtains first log information corresponding to the disk array card, second log information corresponding to the hard disk, and target command execution information recorded by the serial log recording module, and sends the first log information, the second log information, and the target command execution information to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end; When the storage link fails, the storage subsystem obtains basic log information corresponding to the expansion backplane; The sending of the first log information, the second log information, and the target command execution information to the server host end so that a technician can locate the cause of the storage link failure based on the first log information, the second log information, and the target command execution information received by the server host end includes: Sending the first log information, the second log information, the basic log information and the target command execution information to the server host end, so that the technician can locate the cause of the storage link failure based on the first log information, the second log information, the basic log information and the target command execution information received by the server host end; The command execution information of the target command issued by the recording server host includes: Receive commands sent by the server; In the case where the type of the command is a target command type, determining that the command is a target command, wherein the target command type is a read-write command, a monitoring command, a self-monitoring analysis command, an energy-saving command, and a link reset command; The serial log recording module is used to record the command execution information of the target command sent by the server in an overwrite manner.
10. A storage subsystem, characterized in that: The storage subsystem comprises: a disk array card, an expansion backplane and a hard disk, wherein the storage subsystem is used to locate the cause of a storage link failure based on the storage link failure cause location method described in any one of claims 1-8.
11. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for locating the cause of a storage link failure according to any one of claims 1 to 8 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for locating the cause of a storage link failure according to any one of claims 1 to 8.
13. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the method for locating the cause of a storage link failure according to any one of claims 1 to 8.
Citation Information
Patent Citations
Storage component fault processing method and device, equipment and storage medium
CN114661505A
SAS link fault diagnosis method and device, equipment and storage medium
CN117811903A
