Link fault identification and repair method, device, server and storage medium
By subdividing the transmission error types and adjusting parameters under complex topology, the problem of inaccurate link fault identification in traditional methods is solved, the reliability and efficiency of IO data transmission is improved, and the correct transmission of hard disk data is ensured.
Patent Information
- Application Number
- CN202411206305.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-30
AI Technical Summary
Under complex topology, traditional link fault identification and repair methods are difficult to effectively identify and repair faults when IO data transmission fails, resulting in an increase in transmission time overhead, and the fault identification under simple topology is inaccurate, so it is impossible to identify transmission signal abnormalities and Hard disk failure.
After the main controller sends IO data to the hard disk interface controller, it monitors the transmission error type in real time, subcategorizes the transmission timeout fault, and adjusts the transmission parameters according to the subcategorizes the fault category, and retrys the IO data multiple times until it is successful. Optimal transmission parameters to ensure IO data is transferred to the hard disk.
It realizes the identification and repair of transmission timeout failures under complex topology, improves the reliability of the IO data transmission link, avoids transmission failures caused by transmission signals and hard disk failures, and reduces maintenance costs.
Smart Images

Figure CN118733322B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a link fault identification and repair method, device, server and storage medium. Background Art
[0002] The storage system is required to process the massive data transmitted between the server and the hard disk with high reliability and high efficiency. The universal interface of the hard disk is the Serial Attached SCSI (SAS); the SAS expansion cabinet is connected to each hard disk; in order to meet the demand for increased storage data volume, more hard disks need to be connected. Multiple control cabinets can be connected, and multi-level expansion cabinets can be cascaded under each control cabinet to meet the requirements of larger capacity and higher performance. According to the SAS protocol, when the main program sends input / output (IO) data to the hard disk, a connection needs to be established on the transmission link from the SAS controller to each level of expansion cabinet and then to the hard disk. Only when the "connection is established successfully" and the "connection time is long enough to meet the transmission time requirements" can the IO data be successfully transmitted; in a topology with a small number of cascade bases, the IO data can be connected and successfully transmitted; if the IO data link fails, it can be identified as an abnormal SAS transmission signal or hard disk abnormality. However, as the requirements for capacity and performance become higher and higher, the topology becomes more and more complex, and the more cascaded expansion cabinets there are, the IO data of the host needs to be successfully connected to the multi-level expansion cabinet nodes in front of the hard disk before it can be transmitted. For multi-host scenarios, each host sends IO data asynchronously. Only after one host completes the transmission and closes the connection can another host establish a connection. Compared with the single-host scenario, the transmission waiting time is longer and the time overhead of IO data on the link transmission increases. If the time increases to the timeout threshold and the connection cannot be established, the host will not receive a response from the hard disk. If it is still identified as an abnormal SAS transmission signal or hard disk, it is unreasonable, and replacing the hard disk still cannot solve the current problem. Summary of the invention
[0003] The present invention provides a link fault identification and repair method, device, server and storage medium, which are used to solve the defect that the traditional simple topology link fault identification and repair method cannot effectively identify and repair the fault when IO data transmission fails.
[0004] The present invention provides a link fault identification and repair method, comprising:
[0005] After the main controller sends IO data to the hard disk interface controller, real-time monitoring of the transmission error type returned by the hard disk interface controller;
[0006] If the transmission error type returned by the hard disk interface controller is a transmission timeout fault, the transmission timeout fault is sub-classified, and the corresponding transmission parameters are adjusted according to the sub-classified fault types. During the transmission parameter adjustment process, the IO data is retried to be sent multiple times, and the transmission parameter value when the IO data is successfully sent is used as the optimal transmission parameter;
[0007] The IO data is resent to the hard disk interface controller according to the optimal transmission parameter to transmit the IO data to the corresponding hard disk.
[0008] According to the link fault identification and repair method provided by the present invention, the transmission error type also includes a transmission signal failure, and the transmission signal failure is determined based on the data verification results of the main controller and the hard disk interface controller.
[0009] If the transmission error type returned by the hard disk interface controller is a transmission signal failure, the method further includes:
[0010] Initiate a retry request. After a preset number of consecutive retries fail, a transmission signal failure alarm is reported to the user.
[0011] According to the link fault identification and repair method provided by the present invention, the transmission error type also includes a hard disk fault, and the hard disk fault is determined based on whether the hard disk sends a response signal;
[0012] If the transmission error type returned by the hard disk interface controller is a hard disk failure, the method further includes:
[0013] Initiate a retry request. After a preset number of consecutive retries fail, a hard disk failure alarm is reported to the user.
[0014] According to the link fault identification and repair method provided by the present invention, the transmission parameter adjustment process also includes:
[0015] Determine whether the number of retries to send the IO data exceeds a preset threshold;
[0016] If yes, a transmission timeout alarm is sent to the user.
[0017] According to the link fault identification and repair method provided by the present invention, the transmission parameters include:
[0018] At least one of the maximum establishment timeout, the number of retries after establishment failure, the waiting interval for retries, the time to establish a connection, the check error threshold, and the pre-emphasis and de-emphasis parameters of the transmission signal;
[0019] Adjust the corresponding transmission parameters according to the sub-classified fault types, including:
[0020] If the sub-classified fault type is an establishment timeout fault, the maximum establishment timeout is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and cascade device performance in the system topology structure;
[0021] If the sub-classified fault type is a fault of exceeding the number of retries after establishment failure, the number of retries after establishment failure is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs;
[0022] If the sub-classified fault type is a fault that exceeds the waiting retry interval, the waiting retry interval is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs;
[0023] If the sub-classified fault type is a fault exceeding the time for establishing a connection, the time for establishing a connection is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and hard disk performance in the system topology structure;
[0024] If the sub-classified fault type is a fault exceeding the verification error threshold, the verification error threshold is adjusted in steps, and the step value of the step adjustment is determined according to user requirements;
[0025] If the sub-classified fault category is a pre-emphasis or de-emphasis parameter fault of the transmission signal, the pre-emphasis or de-emphasis parameters of the transmission signal are adjusted stepwise, and the step value of the stepwise adjustment is determined according to the strength and quality of the transmission signal.
[0026] According to the link fault identification and repair method provided by the present invention, if there are multiple sub-categorized fault categories, it also includes:
[0027] The transmission parameters are adjusted in a coordinated manner in the order of connection establishment to obtain an optimal transmission parameter combination within the processing capability of the hard disk interface controller.
[0028] According to the link fault identification and repair method provided by the present invention, the sub-classified fault categories include establishment time timeout fault, connection establishment time failure and check error threshold failure, and the transmission parameters are adjusted in sequence according to the connection establishment order, including:
[0029] Keep the time for establishing the connection and the check error threshold unchanged, and adjust the number of retries after the establishment failure according to the maximum establishment timeout step value;
[0030] After the establishment time timeout fault is repaired, the number of retries after the establishment failure and the verification error threshold are kept unchanged, and the time for establishing the connection is adjusted according to the time step value for establishing the connection;
[0031] After the fault that exceeds the time for establishing a connection is repaired, the number of retries after the establishment failure and the time for establishing a connection are kept unchanged, and the verification error threshold is adjusted according to the verification error threshold step value until the fault that exceeds the verification error threshold is repaired, so as to obtain the optimal number of retries after the establishment failure, the connection time and the verification error threshold.
[0032] According to the link fault identification and repair method provided by the present invention, the main controller includes: a sending layer and a driving layer;
[0033] The sending layer is used to send an instruction to transmit IO data to the driving layer, identify the response of the hard disk, determine whether the IO data is abnormal or the hard disk fails, and report an alarm to the user;
[0034] The driver layer is used to initialize the configuration of the hard disk interface controller and set the initial transmission parameters; write the instruction of the sending layer to send the IO data to the hard disk interface controller, apply for the establishment of connection step by step, and transmit the IO data after each level is successfully connected;
[0035] If the transmission error type returned by the hard disk interface controller is a transmission timeout failure, after the driver layer adjusts the transmission parameters and the sending layer retries sending the IO data for multiple times, the IO data still fails to be transmitted, an alarm is sent that the transmission reaches the limit value.
[0036] The link fault identification and repair method provided by the present invention also includes:
[0037] When the driver layer identifies a transmission error, it reports a fault event to the sending layer, wherein the fault event includes a transmission signal fault event and a transmission timeout fault event;
[0038] The transmission signal failure event includes a parity check error event and a cyclic redundancy check error event;
[0039] The transmission timeout failure event includes a transmission timeout adjustment start event, a transmission timeout adjustment in progress event, a transmission timeout adjustment success event, and a transmission timeout adjustment failure event.
[0040] The link fault identification and repair method provided by the present invention also includes:
[0041] If the sending layer receives the hard disk feedback information reported by the driver layer, it determines whether the hard disk fails according to the hard disk feedback information, and after determining that the hard disk fails, performs a sending retry and reports a hard disk failure alarm;
[0042] If the sending layer receives the transmission signal failure event reported by the driving layer, a retry is initiated; if the transmission signal failure event is no longer received after the retry, it indicates that the retry is successful; if the transmission signal failure event is still received after the retry, a transmission signal failure alarm is reported to the user;
[0043] If the sending layer receives a transmission timeout failure event reported by the driver layer, the IO data will be resent, and the number of IO data sending times will not be counted as the number of retries until a transmission timeout adjustment success event reported by the driver layer is received; if a transmission timeout adjustment failure event reported by the driver layer is received, the sending will be retried, and a transmission timeout failure alarm will be reported to the user after the retries reach a preset threshold.
[0044] According to the link fault identification and repair method provided by the present invention, the hard disk feedback information reported by the driver layer includes a response or error code of the hard disk.
[0045] The link fault identification and repair method provided by the present invention also includes:
[0046] Run the firewall through the hard disk interface controller, apply to the cascade expansion cabinets step by step to establish a connection and transmit IO data;
[0047] Based on the response of each level of expansion cabinet, identify whether a transmission signal failure or a transmission timeout failure occurs.
[0048] The present invention also provides a link fault identification and repair device, comprising:
[0049] A monitoring module, used for monitoring the transmission error type returned by the hard disk interface controller in real time after the main controller sends IO data to the hard disk interface controller;
[0050] an adjustment module, for, if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, sub-classifying the transmission timeout fault, and adjusting the corresponding transmission parameters according to the sub-classified fault types; during the transmission parameter adjustment process, retrying to send the IO data multiple times, and taking the transmission parameter value when the IO data is successfully sent as the optimal transmission parameter;
[0051] The sending module is used to resend the IO data to the hard disk interface controller according to the optimal transmission parameters, so as to transmit the IO data to the corresponding hard disk.
[0052] The present invention also provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the link fault identification and repair method as described in any one of the above items is implemented.
[0053] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the above-mentioned link fault identification and repair methods.
[0054] The link fault identification and repair method, device, server and storage medium provided by the present invention monitor the transmission error type returned by the hard disk interface controller in real time after the main controller sends IO data to the hard disk interface controller; if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, the transmission timeout fault is sub-classified, and the corresponding transmission parameters are adjusted according to the sub-classified fault type. During the transmission parameter adjustment process, the IO data is retried to be sent multiple times, and the transmission parameter value when the IO data is successfully sent is used as the optimal transmission parameter; the IO data is re-sent to the hard disk interface controller according to the optimal transmission parameter to transmit the IO data to the corresponding hard disk. The present invention can identify the IO data link transmission timeout fault under complex topology, and can adjust the corresponding transmission parameters according to the sub-classified fault type to repair the transmission timeout fault, thereby meeting the link fault identification and repair requirements under complex topology structures and improving the reliability of the IO data transmission link. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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.
[0056] Figure 1 It is a flowchart of a link fault identification and repair method provided by an embodiment of the present invention;
[0057] Figure 2 It is a schematic diagram of a dual-control structure of a control cabinet provided by an embodiment of the present invention;
[0058] Figure 3 is a schematic diagram of the structure of an expansion cabinet provided by an embodiment of the present invention;
[0059] Figure 4 is a schematic diagram of a cascaded multi-stage expansion cabinet provided by an embodiment of the present invention;
[0060] Figure 5 is a schematic diagram of the structure of multiple control cabinets provided by an embodiment of the present invention;
[0061] Figure 6 is a schematic diagram of the timing of establishing a connection between two adjacent levels provided by an embodiment of the present invention;
[0062] Figure 7This is a schematic diagram of IO transmission in a simple topology scenario provided by an embodiment of the present invention;
[0063] Figure 8 This is a flowchart of IO processing in a simple topology scenario provided by an embodiment of the present invention;
[0064] Fig. 9 It is a schematic diagram of a sending layer perception event in a simple topology scenario provided by an embodiment of the present invention;
[0065] Fig.10 It is a schematic diagram of a multi-level cascade complex topology scenario provided by an embodiment of the present invention;
[0066] Fig.11 It is a schematic diagram of a multi-host complex topology scenario provided by an embodiment of the present invention;
[0067] Fig.12 This is a schematic diagram of IO transmission in a complex topology scenario provided by an embodiment of the present invention;
[0068] Fig.13 This is a flowchart of IO processing in a complex topology scenario provided by an embodiment of the present invention;
[0069] Fig.14 It is a schematic diagram of a sending layer sensing event in a complex topology scenario provided by an embodiment of the present invention;
[0070] Fig.15 is a flow chart of adjusting the timeout parameter for applying to establish a connection provided by an embodiment of the present invention;
[0071] Fig.16 It is a schematic diagram of the structure of a device of a link fault identification and repair method provided by an embodiment of the present invention;
[0072] Fig.17 It is a functional structure diagram of a server provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0073] Figure 1 A flowchart of a link fault identification and repair method provided by an embodiment of the present invention, such as Figure 1 As shown, the link fault identification and repair method provided by the embodiment of the present invention includes:
[0074] Step 101: After the main controller sends IO data to the hard disk interface controller, the transmission error type returned by the hard disk interface controller is monitored in real time;
[0075] Step 102: If the transmission error type returned by the hard disk interface controller is a transmission timeout fault, the transmission timeout fault is sub-classified, and corresponding transmission parameters are adjusted according to the sub-classified fault types. During the transmission parameter adjustment process, the IO data is retried to be sent multiple times, and the transmission parameter value when the IO data is successfully sent is used as the optimal transmission parameter;
[0076] In the embodiment of the present invention, the transmission parameter adjustment process further includes:
[0077] Determine whether the number of retries to send the IO data exceeds a preset threshold;
[0078] If yes, a transmission timeout alarm is sent to the user.
[0079] Step 103: resend the IO data to the hard disk interface controller according to the optimal transmission parameters to transmit the IO data to the corresponding hard disk.
[0080] In the storage system, the SAS expansion cabinet is connected to each hard disk; each hard disk supports dual ports, and the dual-control structure through dual ports is as follows Figure 2 The main program running on the CPU can manage multiple hard disks to achieve larger capacity expansion; the structure of a single control cabinet is limited and can only be expanded to dozens of disks. When more hard disks are needed, an expansion cabinet can be used to increase the hard disks; the structure of the expansion cabinet is as follows Figure 3 As shown, there is no need to add an additional CPU. You only need to expand a batch of hard disks under the expansion cabinet, which will be handled uniformly by the main program on the control cabinet.
[0081] In order to meet the need to connect more hard disks, multiple expansion cabinets can be cascaded under the control cabinet, such as Figure 4 To meet the needs of larger capacity and higher performance, multiple control cabinets can be connected to realize the sharing characteristics of multiple disk continuous bundle arrays (Just a Bunch Of Disks, JBOD), such as Figure 5 shown.
[0082] According to the SAS protocol, when the main program sends an IO data to the hard disk, the SAS controller needs to establish a connection (OpenConnection) with the host on the transmission link of the hard disk connected to each level of the expansion cabinet. The IO data can be passed to the next level only when the "connection is established successfully" and the "connection time is long enough to meet the transmission time". When there are multiple levels, the data can only be transmitted after all the connection applications between the two adjacent levels are successful (OpenRequest). If other connections have been established at the time of application, a refusal to establish the connection (OpenReject) is returned. In order to ensure that the IO data can be transmitted, the level needs to retry again (OpenRetry). If the connection is successfully established within a certain timeout period, the IO data can be transmitted normally.
[0083] In a topology with low capacity and performance requirements and a small number of cascade bases, the 12Gbps transmission rate of SAS3.0 is very high and can meet the fast transmission of IO. When the SAS signal is stable, IO data can be transmitted to establish a connection and successfully transmitted; the SAS4.0 rate is doubled, which can further improve the transmission efficiency; at this time, the IO transceiver layer of the main program only needs to initiate IO transmission and wait for the hard disk to respond to confirm whether it is successful. It does not need to pay attention to the connection status of each level of cascade nodes, but only needs to pay attention to the point-to-point processing strategy from the main program to the hard disk; when an IO transmission fails, only two types of faults need to be identified, namely SAS transmission signal abnormality and hard disk abnormality.
[0084] However, as the requirements for capacity and performance become higher and higher, the topology becomes more and more complex. When there are more cascaded expansion cabinets (the greater the cascade depth), the host's IO must be sent to the hard disks on each level of JBOD. Taking 10-level cascaded JBOD as an example, when accessing the hard disk on the 5th level JBOD, it is necessary to successfully establish connections with all the expansion cabinet nodes of the first 4 levels of JBOD before transmission; when accessing the hard disk on the 10th level JBOD, it is necessary to successfully establish connections with all the expansion cabinet nodes of the first 9 levels of JBOD before transmission. In addition, for multi-host scenarios, the timing of sending IO data for each host is asynchronous; if the connection is dual-host, if the dual hosts send IO data at the same time, when host A first establishes a connection and the transmission is in progress, host B's connection application will be rejected. At this time, host B can only initiate a retry and start timing. Only after host A completes the transmission and closes the connection (CloseConnection) can host B successfully connect. At this time, the retry time of host B is the transmission time of host A plus the establishment time of host B, which is longer than the waiting time in the single-host scenario; if it is a four-host scenario, hosts A, B, C, and D may all send IO data at the same time, then the retry time of host A may have to wait until hosts B, C, and D have completed sending, so the waiting time for retry will be longer. In the multi-host multi-cascade topology scenario, each level of expansion cabinet receives an exponential increase in the number of host connection establishments, and the number of arbitrations that follow increases. The number of times the connection is rejected when IO data is sent increases, and more retries are required, which in turn increases the time consumption of a single IO data.
[0085] Therefore, in the scenario of complex topology, the time spent on trying to establish a connection increases, and the time overhead on link transmission increases; if it increases to the preset timeout period, the connection cannot be established; at this time, the host will not receive a response from the hard disk, and the IO data transmission strategy under the original simple topology cannot identify the link anomaly that occurs during the current IO data transmission process; if the point-to-point transmission processing strategy is continued, when the IO data sent to a hard disk is abnormal, it is considered that the disk is faulty, which is unreasonable, and replacing the disk cannot solve the current problem.
[0086] The link fault identification and repair method provided by the embodiment of the present invention monitors the transmission error type returned by the hard disk interface controller in real time after the main controller sends IO data to the hard disk interface controller; if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, the transmission timeout fault is sub-classified, and the corresponding transmission parameters are adjusted according to the sub-classified fault types. During the transmission parameter adjustment process, the IO data is retried to be sent multiple times, and the transmission parameter value when the IO data is successfully sent is used as the optimal transmission parameter; the IO data is re-sent to the hard disk interface controller according to the optimal transmission parameter to transmit the IO data to the corresponding hard disk. The present invention can identify the transmission timeout fault under complex topology, and can adjust the corresponding transmission parameters according to the sub-classified fault type to repair the transmission timeout fault, thereby meeting the link fault identification and repair requirements under complex topology structures and improving the reliability of the IO data transmission link.
[0087] Based on any of the above embodiments, the transmission error type also includes a transmission signal failure, and the transmission signal failure is determined based on a data verification result between the main controller and the hard disk interface controller.
[0088] In the embodiment of the present invention, transmission signal failure: a signal failure caused by the inability to transmit the differential signal normally on the SAS link, such as uneven impedance, incomplete eye diagram, and inability to ensure reliable signal integrity; this failure is an irreparable failure, and probabilistic data errors occur during transmission; a transmission timeout failure is caused by a complex link topology, and when the host sends IO data, the data cannot be sent to the hard disk within the specified timeout period; for example: the set "number of retries for connection establishment failure" is small, and the set "timeout parameter of connection time" is short, resulting in the failure of IO data not being fully transmitted.
[0089] In an embodiment of the present invention, a firewall can be run through a hard disk interface controller to apply to the cascaded expansion cabinets step by step to establish a connection and transmit IO data; based on the response of each level of the expansion cabinet, it is identified whether a transmission signal failure or a transmission timeout failure occurs. A transmission timeout failure is not a real failure, but in the point-to-point (host to hard disk) processing strategy, it is often identified as a hard disk failure, which is unreasonable; therefore, it is necessary to extract the failure and optimize the parameter adjustment to give priority to ensuring the reliability of IO data transmission; because the transmission parameters vary according to the complexity of the topology and the size of the business block, a small adjustment of the parameters will result in failure to transmit to the hard disk, and a large adjustment of the parameters may reduce communication efficiency. When an abnormality occurs in IO data transmission, multiple retries are performed, and the transmission parameters are dynamically adjusted during the retries until all IO data in the current scene can be reliably transmitted to the hard disk.
[0090] In the embodiment of the present invention, if the transmission error type returned by the hard disk interface controller is a transmission signal failure, the method further includes: initiating a retry application, and reporting a transmission signal failure alarm to the user after a preset number of consecutive retry failures.
[0091] Based on any of the above embodiments, the transmission error type further includes a hard disk failure, and the hard disk failure is determined based on whether the hard disk sends a response signal;
[0092] If the transmission error type returned by the hard disk interface controller is a hard disk failure, the method further includes:
[0093] Initiate a retry request. After a preset number of consecutive retries fail, a hard disk failure alarm is reported to the user.
[0094] Based on any of the above embodiments, the transmission parameters include:
[0095] At least one of the maximum establishment timeout, the number of retries after establishment failure, the waiting interval for retries, the time to establish a connection, the check error threshold, and the pre-emphasis and de-emphasis parameters of the transmission signal;
[0096] In the embodiment of the present invention, adjusting corresponding transmission parameters according to the sub-classified fault categories includes:
[0097] If the sub-classified fault type is an establishment timeout fault, the maximum establishment timeout is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and cascade device performance in the system topology structure;
[0098] If the sub-classified fault type is a fault of exceeding the number of retries after establishment failure, the number of retries after establishment failure is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs;
[0099] If the sub-classified fault type is a fault that exceeds the waiting retry interval, the waiting retry interval is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs;
[0100] If the sub-classified fault type is a fault exceeding the time for establishing a connection, the time for establishing a connection is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and hard disk performance in the system topology structure;
[0101] If the sub-classified fault type is a fault exceeding the verification error threshold, the verification error threshold is adjusted in steps, and the step value of the step adjustment is determined according to user requirements;
[0102] If the sub-classified fault category is a pre-emphasis or de-emphasis parameter fault of the transmission signal, the pre-emphasis or de-emphasis parameters of the transmission signal are adjusted stepwise, and the step value of the stepwise adjustment is determined according to the strength and quality of the transmission signal.
[0103] The embodiment of the present invention provides an optimization strategy for the specified parameters: including typical values of the initialization settings, and a one-to-one correspondence between {transmission fault type, adjustment parameter, and step-by-step adjustment strategy}, etc.
[0104] In the embodiment of the present invention, if there are multiple sub-categorized fault categories, the following is also included:
[0105] The transmission parameters are adjusted in a coordinated manner in the order of connection establishment to obtain an optimal transmission parameter combination within the processing capability of the hard disk interface controller.
[0106] For example, the sub-categorized fault categories include a timeout fault for establishing a connection, a time failure for exceeding the time for establishing a connection, and a time failure for exceeding a check error threshold. The coordinated adjustment of the transmission parameters in sequence according to the order of establishing the connection includes:
[0107] Keep the time for establishing the connection and the check error threshold unchanged, and adjust the number of retries after the establishment failure according to the maximum establishment timeout step value;
[0108] After the establishment time timeout fault is repaired, the number of retries after the establishment failure and the verification error threshold are kept unchanged, and the time for establishing the connection is adjusted according to the time step value for establishing the connection;
[0109] After the fault that exceeds the time for establishing a connection is repaired, the number of retries after the establishment failure and the time for establishing a connection are kept unchanged, and the verification error threshold is adjusted according to the verification error threshold step value until the fault that exceeds the verification error threshold is repaired, so as to obtain the optimal number of retries after the establishment failure, the connection time and the verification error threshold.
[0110] Based on any of the above embodiments, the main controller includes: a sending layer and a driving layer;
[0111] The sending layer is used to send an instruction to transmit IO data to the driving layer, identify the response of the hard disk, determine whether the IO data is abnormal or the hard disk fails, and report an alarm to the user;
[0112] The driver layer is used to initialize the configuration of the hard disk interface controller and set the initial transmission parameters; write the instruction of the sending layer to send the IO data to the hard disk interface controller, apply for the establishment of connection step by step, and transmit the IO data after each level is successfully connected;
[0113] In the point-to-point processing strategy between the host and the hard disk, the embodiment of the present invention adds an event return mechanism for the driver layer and intermediate link nodes such as the controller and the expansion cabinet: the driver layer adds event notification to the sending layer, and when the driver layer identifies a transmission error, it reports a fault event (transmission signal fault event, transmission timeout fault event) to the sending layer; the sending layer adds processing of the driver layer return event;
[0114] In an embodiment of the present invention, the current interaction mechanism is that the sending layer initiates an "IO task for a certain hard disk" to the driving layer, and the driving layer initiates transmission; the sending layer waits for the response of the hard disk and identifies whether the transmission is normal; the driving layer is responsible for the actual transmission of IO on the one hand, and on the other hand, real-time detection of the link LINK status of the disk; when the hard disk is plugged in or unplugged or the port is opened or closed, a LINK status change occurs, and the driving layer notifies the sending layer of the "LINK status change event" for processing.
[0115] If the transmission error type returned by the hard disk interface controller is a transmission timeout failure, after the driver layer adjusts the transmission parameters and the sending layer retries sending the IO data for multiple times, the IO data still fails to be transmitted, an alarm is sent that the transmission reaches the limit value.
[0116] In an embodiment of the present invention, the link fault identification and repair method further includes:
[0117] When the driver layer identifies a transmission error, it reports a fault event to the sending layer, wherein the fault event includes a transmission signal fault event and a transmission timeout fault event;
[0118] The transmission signal failure event includes a parity check error event and a cyclic redundancy check error event;
[0119] The transmission timeout failure event includes a transmission timeout adjustment start event, a transmission timeout adjustment in progress event, a transmission timeout adjustment success event, and a transmission timeout adjustment failure event.
[0120] In an embodiment of the present invention, the link fault identification and repair method further includes:
[0121] If the sending layer receives the hard disk feedback information reported by the driver layer, it determines whether the hard disk fails according to the hard disk feedback information, and after determining that the hard disk fails, performs a sending retry and reports a hard disk failure alarm;
[0122] If the sending layer receives the transmission signal failure event reported by the driving layer, a retry is initiated; if the transmission signal failure event is no longer received after the retry, it indicates that the retry is successful; if the transmission signal failure event is still received after the retry, a transmission signal failure alarm is reported to the user;
[0123] If the sending layer receives a transmission timeout failure event reported by the driver layer, the IO data will be resent, and the number of IO data sending times will not be counted as the number of retries until a transmission timeout adjustment success event reported by the driver layer is received; if a transmission timeout adjustment failure event reported by the driver layer is received, the sending will be retried, and a transmission timeout failure alarm will be reported to the user after the retries reach a preset threshold.
[0124] In the embodiment of the present invention, the hard disk feedback information reported by the driver layer includes a response or an error code of the hard disk.
[0125] The original protocol stack only includes a point-to-point processing strategy between the host and the hard disk. The host sends IO and determines the error based on whether the hard disk returns an error code. In a complex topology, the host may send data to a hard disk but fail to receive a response from the hard disk because the connection may not be established on the previous expansion cabinets and the transmission fails. Therefore, if the hard disk response cannot be received, it is necessary to increase fault detection of the intermediate nodes.
[0126] In the embodiment of the present invention, a newly added sending layer can report alarms to the user: based on the original point-to-point hard disk failure alarm between the host and the hard disk, a "transmission signal failure alarm" and a "transmission timeout failure alarm" are added; the driver layer can report the failure of the disk only after the IO is sent to the hard disk and the error code (SenseData) of the hard disk response is received; in a complex topology, the driver layer can accurately identify alarms, distinguish alarms, and report them correctly in the scenario where no hard disk response is received.
[0127] Take "the time to establish a connection between two adjacent levels" as an example. Figure 6 As shown in the figure, the left one is successfully established within the timeout period and data can be sent; the right one is that the connection cannot be established within the timeout period. After the timeout, there will be no more OpenRequest in the dotted part, and the IO data will no longer be sent;
[0128] For simple topology scenarios, almost all of them can be successfully established, and the IO transmission of the sending layer to the hard disk is realized, and the response of the hard disk is received, such as Figure 7 As shown in the figure, the processing flow of IO data in this scenario is as follows Figure 8 As shown in the figure, this point-to-point processing strategy, because of its simple topology, can almost always establish a connection and pass the IO data to the hard disk, so it only contains "the result of judging as yes"; the controller firewall is responsible for the transmission of IO data on the small computer system interface, so it can perceive the transmission anomaly; however, in the point-to-point strategy used in a simple topology, the sending layer almost does not need to perceive the fault type; the sending layer is simple to process, and the events that can be perceived are as follows Fig. 9 shown.
[0129] However, as the topology becomes more and more complex, this scenario cannot reflect the normal transmission scenario. We cannot attribute all IO data reception failures to hard disk failures. For complex topology scenarios:
[0130] Scenario 1: Fig.10 As shown in the figure, in multi-level cascading, when a host sends IO to a hard disk, it needs to apply to establish connections between multiple levels of expansion cabinets; at the same time, the same transmission link is used to send IO to hard disks of the same level, and there is a transmission wait on the link; at the same time, to hard disks of different levels (for example, a hard disk of a 5th level JBOD and a hard disk of a 10th level JBOD), the first five levels of links are shared, and there is also a transmission wait on the link.
[0131] Scenario 2: Fig.11 As shown, in a multi-host scenario, each host sends IO data asynchronously; when a host sends IO data to the last-level hard disk, the other host can only establish a connection after waiting and all the expansion cabinet connections are released; when sending IO data, two adjacent nodes (hard disk interface controller and Expander, or Expander and Expander, or Expander and hard disk) must establish a connection; if the upper level initiates a connection request while the lower level is transmitting, the connection will be rejected; the upper level needs to initiate a retry; it needs to retry multiple times. If it keeps retrying without stopping after a timeout, the path will continue to be blocked and subsequent IO data cannot be transmitted. Therefore, it is necessary to establish a timeout period, stop sending the current IO data after the timeout, and ensure that subsequent IO data continues to be transmitted; if the connection is successful within the retry timeout period, the transmission can be successful; but if the connection cannot be successful within the timeout period, the IO data will no longer be transmitted, and the main program will not receive a response from the hard disk. The IO transmission of this scenario is shown in the figure. Fig.12 As shown in the figure. For more and more complex scenarios, the driver layer and the sending layer are added with event notification channels for the transmission link, accurately locating the fault type and self-learning transmission parameters to repair the fault strategy. The specific process is as follows Fig.13 As shown, the execution process of the link fault identification and repair method includes:
[0132] (1) Establish topology based on business needs; (topology includes: single / multi-host scenarios, cascaded devices)
[0133] (2) Start the system. The driver layer uses typical parameter values to initialize the hard disk interface controller. The main program business is established and starts sending IO data to the hard disk.
[0134] (3) The sending layer receives tasks based on business requirements (business requirements are divided into the following: data block size, number of IO data per second, latency requirements), sends IO tasks of different block sizes to the driver layer, and monitors the hard disk response and driver event feedback;
[0135] (4) The driver layer initiates the IO transmission to the hard disk interface controller and detects in real time whether the hard disk interface controller returns a transmission error (Transport Error);
[0136] (5) The hard disk interface controller runs FW, expands the link from the cabinet to the hard disk step by step, applies to establish a connection and transmit data, and identifies whether a transmission signal failure or a transmission timeout failure occurs based on the response of each level of expansion cabinet;
[0137] (6) If there is no transmission failure, the hard disk can receive the data and respond. At this time, the hard disk interface controller does not need to return an exception to the driver layer;
[0138] (7) If a transmission failure occurs, identify which type of timeout failure or signal failure it is and provide real-time feedback to the driver layer;
[0139] (8) The driver layer identifies the error code type of the hard disk interface controller and performs processing:
[0140] (9) If the hard disk interface controller returns a transmission signal failure, it reports the transmission signal failure event to the driver layer; this means telling the driver layer to initiate a retry. When N consecutive retries fail, the transmission signal failure event is reported to the sending layer.
[0141] (10) If the hard disk interface controller returns a transmission timeout fault, the driver layer adjusts the parameters according to the established strategy: find the parameters and step adjustment values to be modified to fix the error code; calculate the setting value to increase or decrease based on the current value, and configure it to the hard disk interface controller to take effect;
[0142] (11) According to the error code, report the transmission timeout adjustment event to the driver layer; this means to inform the driver layer: do not alarm for the time being, this error type can be fixed by modification; during parameter adjustment, retry sending the IO to train the parameter setting value; if there is still an error code after multiple trainings, indicating that it is unrepairable, then notify the sending layer: this error cannot be repaired, please improve it by retrying; if the sending layer cannot send successfully after retrying, report the transmission timeout alarm to the user (the parameters have reached the processing capacity of the hard disk interface controller chip and cannot be optimized; this indicates that the transmission scenario is bad, and the parameters of the hard disk interface controller can only improve the scenario to reduce the probability, but cannot completely repair all scenarios, and can only be improved by retrying the sending layer.
[0143] (12) When the sending layer sends IO data to the driver layer, it detects in real time whether the driver layer has fed back an error event, and detects the hard disk's response; it responds based on the received event: when it receives the hard disk's response (indicating that the IO has been fed back to the hard disk and there is no transmission error), it determines whether the disk has a fault based on the hard disk's response and sense_data, and determines whether to retry or report a hard disk fault alarm; when it receives a transmission signal fault event from the driver layer, it initiates a retry; if the event is no longer received after the retry, it indicates that the retry is successful; if the event is still received after the retry, it reports a transmission signal fault alarm to the user; when it receives a transmission timeout fault adjustment event from the driver, it resends the IO (no alarm statistics are performed at this time) until it receives a transmission timeout fault adjustment success event from the driver layer; if it receives a transmission timeout fault adjustment failure event from the driver layer, it automatically retries, and reports a transmission timeout fault alarm to the user after the retry fails;
[0144] During the retry and parameter adjustment process, multiple error codes may appear, and they are adjusted one by one. Repeat this cycle to achieve the optimal parameter combination within the processing capacity of the hard disk interface controller under this topology.
[0145] When the processing capacity limit of the hard disk interface controller is reached, the sending layer can only retry multiple times and report an alarm after retrying. The alarm is a transmission timeout alarm or a transmission limit alarm. This ensures that IO can be successfully transmitted first under complex topologies.
[0146] In the embodiment of the present invention, the sending layer accurately receives the detailed events of each layer and makes corresponding alarms respectively. Fig.14 Taking the timeout period for establishing a connection as an example, the parameter adjustment process is as follows: Fig.15As shown, the initialization setting of the connection establishment timeout is 100us, and the sending layer sends IO; the sending conditions are: 1) receiving the IO sent by the sending layer; 2) receiving the transmission timeout fault event of the driver layer, starting self-learning, and resending IO data; 3) receiving the resending IO retry after the self-learning failure of the driver layer. Determine whether the self-learning fails and the retry also fails. If so, alarm upward and report "transmission timeout fault alarm"; if not, the driver layer initiates the transmission of the IO; the hard disk interface controller determines whether it is within the timeout time of the open request OpenRequest. If so, initiate OpenRequest to establish a connection, and the driver layer perceives the transmission timeout; according to the established step adjustment strategy, calculate the next step to adjust the timeout parameter of the open request, such as "timeout+50us", and determine whether the parameter reaches the maximum processing capacity of the hard disk interface controller. If not, the driver layer performs processing: set the parameter to the hard disk interface controller; report "transmission timeout fault event, self-learning in progress". Finally, determine whether the connection is established successfully (OpenSuccess). If so, the IO data is transmitted normally.
[0147] The link fault identification and repair method provided by the embodiment of the present invention adaptively adjusts the transmission parameters in complex scenarios, eliminates other transmission errors within the processing capacity of the hard disk interface controller, and improves development efficiency; adds the link transmission signal fault alarm and transmission timeout fault alarm between the host and the hard disk, ensuring that when an abnormality occurs in IO transmission, the fault type is accurately identified, and the problem is not all classified as a hard disk alarm, which greatly improves the accuracy of fault location and reduces maintenance costs. Defines the transmission error code from the hard disk interface controller end, to the parameter-adjustable repair strategy, to the interactive processing mechanism of transmission events at the sending layer driver layer; after multiple adjustments to the transmission parameters, the optimal value within the processing capacity of the hard disk interface controller is reached; at the same time, when an IO transmission fails, the transmission signal fault alarm and transmission timeout fault alarm types are accurately identified and fed back, improving the fault locatability.
[0148] The link fault identification and repairing device provided by the present invention is described below. The link fault identification and repairing device described below and the link fault identification and repairing method described above can be referred to each other.
[0149] Fig.16 A flowchart of a link fault identification and repair method provided by an embodiment of the present invention, such as Fig.16 As shown, the link fault identification and repair method provided by the embodiment of the present invention includes:
[0150] The monitoring module 1601 is used to monitor the transmission error type returned by the hard disk interface controller in real time after the main controller sends IO data to the hard disk interface controller;
[0151] The adjustment module 1602 is used for, if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, sub-classifying the transmission timeout fault, and adjusting the corresponding transmission parameters according to the sub-classified fault types. During the transmission parameter adjustment process, the IO data is retried to be sent multiple times, and the transmission parameter value when the IO data is successfully sent is used as the optimal transmission parameter;
[0152] The sending module 1603 is used to re-send the IO data to the hard disk interface controller according to the optimal transmission parameters, so as to transmit the IO data to the corresponding hard disk.
[0153] In an embodiment of the present invention, the transmission error type further includes a transmission signal failure, and the transmission signal failure is determined based on a data verification result between the main controller and the hard disk interface controller.
[0154] If the transmission error type returned by the hard disk interface controller is a transmission signal failure, the method further includes:
[0155] Initiate a retry request. After a preset number of consecutive retries fail, a transmission signal failure alarm is reported to the user.
[0156] In an embodiment of the present invention, the transmission error type further includes a hard disk failure, and the hard disk failure is determined based on whether the hard disk sends a response signal;
[0157] If the transmission error type returned by the hard disk interface controller is a hard disk failure, the method further includes:
[0158] Initiate a retry request. After a preset number of consecutive retries fail, a hard disk failure alarm is reported to the user.
[0159] In the embodiment of the present invention, the transmission parameter adjustment process further includes:
[0160] Determine whether the number of retries to send the IO data exceeds a preset threshold;
[0161] If yes, a transmission timeout alarm is sent to the user.
[0162] In this embodiment of the present invention, the transmission parameters include:
[0163] At least one of the maximum establishment timeout, the number of retries after establishment failure, the waiting interval for retries, the time to establish a connection, the check error threshold, and the pre-emphasis and de-emphasis parameters of the transmission signal;
[0164] Adjust the corresponding transmission parameters according to the sub-classified fault types, including:
[0165] If the sub-classified fault type is an establishment timeout fault, the maximum establishment timeout is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and cascade device performance in the system topology structure;
[0166] If the sub-classified fault type is a fault of exceeding the number of retries after establishment failure, the number of retries after establishment failure is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs;
[0167] If the sub-classified fault type is a fault that exceeds the waiting retry interval, the waiting retry interval is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs;
[0168] If the sub-classified fault type is a fault exceeding the time for establishing a connection, the time for establishing a connection is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and hard disk performance in the system topology structure;
[0169] If the sub-classified fault type is a fault exceeding the verification error threshold, the verification error threshold is adjusted in steps, and the step value of the step adjustment is determined according to user requirements;
[0170] If the sub-classified fault category is a pre-emphasis or de-emphasis parameter fault of the transmission signal, the pre-emphasis or de-emphasis parameters of the transmission signal are adjusted stepwise, and the step value of the stepwise adjustment is determined according to the strength and quality of the transmission signal.
[0171] In the embodiment of the present invention, if there are multiple sub-categorized fault categories, the following is also included:
[0172] The transmission parameters are adjusted in a coordinated manner in the order of connection establishment to obtain an optimal transmission parameter combination within the processing capability of the hard disk interface controller.
[0173] In the embodiment of the present invention, the sub-classified fault categories include establishment time timeout fault, connection establishment time exceeded fault and verification error threshold exceeded fault, and the coordinated adjustment of transmission parameters in sequence according to the connection establishment order includes:
[0174] Keep the time for establishing the connection and the check error threshold unchanged, and adjust the number of retries after the establishment failure according to the maximum establishment timeout step value;
[0175] After the establishment time timeout fault is repaired, the number of retries after the establishment failure and the verification error threshold are kept unchanged, and the time for establishing the connection is adjusted according to the time step value for establishing the connection;
[0176] After the fault that exceeds the time for establishing a connection is repaired, the number of retries after the establishment failure and the time for establishing a connection are kept unchanged, and the verification error threshold is adjusted according to the verification error threshold step value until the fault that exceeds the verification error threshold is repaired, so as to obtain the optimal number of retries after the establishment failure, the connection time and the verification error threshold.
[0177] In an embodiment of the present invention, the main controller includes: a sending layer and a driving layer;
[0178] The sending layer is used to send an instruction to transmit IO data to the driving layer, identify the response of the hard disk, determine whether the IO data is abnormal or the hard disk fails, and report an alarm to the user;
[0179] The driver layer is used to initialize the configuration of the hard disk interface controller and set the initial transmission parameters; write the instruction of the sending layer to send the IO data to the hard disk interface controller, apply for the establishment of connection step by step, and transmit the IO data after each level is successfully connected;
[0180] If the transmission error type returned by the hard disk interface controller is a transmission timeout failure, after the driver layer adjusts the transmission parameters and the sending layer retries sending the IO data for multiple times, the IO data still fails to be transmitted, an alarm is sent that the transmission reaches the limit value.
[0181] In an embodiment of the present invention, it also includes:
[0182] When the driver layer identifies a transmission error, it reports a fault event to the sending layer, wherein the fault event includes a transmission signal fault event and a transmission timeout fault event;
[0183] The transmission signal failure event includes a parity check error event and a cyclic redundancy check error event;
[0184] The transmission timeout failure event includes a transmission timeout adjustment start event, a transmission timeout adjustment in progress event, a transmission timeout adjustment success event, and a transmission timeout adjustment failure event.
[0185] In an embodiment of the present invention, it also includes:
[0186] If the sending layer receives the hard disk feedback information reported by the driver layer, it determines whether the hard disk fails according to the hard disk feedback information, and after determining that the hard disk fails, performs a sending retry and reports a hard disk failure alarm;
[0187] If the sending layer receives the transmission signal failure event reported by the driving layer, a retry is initiated; if the transmission signal failure event is no longer received after the retry, it indicates that the retry is successful; if the transmission signal failure event is still received after the retry, a transmission signal failure alarm is reported to the user;
[0188] If the sending layer receives a transmission timeout failure event reported by the driver layer, the IO data will be resent, and the number of IO data sending times will not be counted as the number of retries until a transmission timeout adjustment success event reported by the driver layer is received; if a transmission timeout adjustment failure event reported by the driver layer is received, the sending will be retried, and a transmission timeout failure alarm will be reported to the user after the retries reach a preset threshold.
[0189] In the embodiment of the present invention, the hard disk feedback information reported by the driver layer includes a response or an error code of the hard disk.
[0190] In an embodiment of the present invention, it also includes:
[0191] Run the firewall through the hard disk interface controller, apply to the cascade expansion cabinets step by step to establish a connection and transmit IO data;
[0192] Based on the response of each level of expansion cabinet, identify whether a transmission signal failure or a transmission timeout failure occurs.
[0193] The link fault identification and repair device provided by the embodiment of the present invention monitors the transmission error type returned by the hard disk interface controller in real time after the main controller sends IO data to the hard disk interface controller; if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, the transmission timeout fault is sub-classified, and the corresponding transmission parameters are adjusted according to the sub-classified fault type. During the transmission parameter adjustment process, the IO data is retried to be sent multiple times, and the transmission parameter value when the IO data is successfully sent is used as the optimal transmission parameter; the IO data is re-sent to the hard disk interface controller according to the optimal transmission parameter to transmit the IO data to the corresponding hard disk. The present invention can identify the IO data link transmission timeout fault under complex topology, and can adjust the corresponding transmission parameters according to the sub-classified fault type to repair the transmission timeout fault, thereby meeting the link fault identification and repair requirements under complex topology structures and improving the reliability of the IO data transmission link.
[0194] Fig.17 An example of a server physical structure diagram is shown below: Fig.17As shown, the server may include: a processor (processor) 1710, a communication interface (Communications Interface) 1720, a link fault identification and repair device (memory) 1730 and a communication bus 1740, wherein the processor 1710, the communication interface 1720, and the link fault identification and repair device 1730 communicate with each other through the communication bus 1740. The link fault identification and repair device 1730 includes a computer program, an operating system and acquired data. The processor 1710 can call the logic instructions in the link fault identification and repair device 1730 to execute the link fault identification and repair method, which includes: after the main controller sends IO data to the hard disk interface controller, real-time monitoring of the transmission error type returned by the hard disk interface controller; if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, sub-classifying the transmission timeout fault, and adjusting the corresponding transmission parameters according to the sub-classified fault type. During the transmission parameter adjustment process, retrying to send the IO data multiple times, and taking the transmission parameter value when the IO data is successfully sent as the optimal transmission parameter; re-sending the IO data to the hard disk interface controller according to the optimal transmission parameter to transmit the IO data to the corresponding hard disk.
[0195] In addition, the logic instructions in the above-mentioned link fault identification and repair device 1730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only link fault identification and repair device (ROM, Read-Only Memory), random access link fault identification and repair device (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0196] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the link fault identification and repair method provided by the above-mentioned methods, the method comprising: after the main controller sends IO data to the hard disk interface controller, real-time monitoring of the transmission error type returned by the hard disk interface controller; if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, sub-classifying the transmission timeout fault, and adjusting the corresponding transmission parameters according to the sub-classified fault type, during the transmission parameter adjustment process, retrying to send the IO data multiple times, and taking the transmission parameter value when the IO data is successfully sent as the optimal transmission parameter; and re-sending the IO data to the hard disk interface controller according to the optimal transmission parameter to transmit the IO data to the corresponding hard disk.
[0197] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0198] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0199] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A link fault identification and repair method, characterized in that: include: After the main controller sends IO data to the hard disk interface controller, real-time monitoring of the transmission error type returned by the hard disk interface controller; If the transmission error type returned by the hard disk interface controller is a transmission timeout fault, the transmission timeout fault is sub-classified, and the corresponding transmission parameters are adjusted according to the sub-classified fault types. During the transmission parameter adjustment process, the IO data is retried to be sent multiple times, and the transmission parameter value when the IO data is successfully sent is used as the optimal transmission parameter; resending the IO data to the hard disk interface controller according to the optimal transmission parameter to transmit the IO data to the corresponding hard disk; The main controller includes: a sending layer and a driving layer; when the driving layer identifies a transmission error, it reports a fault event to the sending layer, and the fault event includes a transmission signal fault event and a transmission timeout fault event; the transmission signal fault event includes a parity error event and a cyclic redundancy check error event; the transmission timeout fault event includes a transmission timeout adjustment start event, a transmission timeout adjustment in progress event, a transmission timeout adjustment success event, and a transmission timeout adjustment failure event.
2. The link fault identification and repair method according to claim 1, characterized in that: The transmission error type also includes a transmission signal failure, and the transmission signal failure is determined based on the data verification results of the main controller and the hard disk interface controller. If the transmission error type returned by the hard disk interface controller is a transmission signal failure, the method further includes: Initiate a retry request. After a preset number of consecutive retries fail, a transmission signal failure alarm is reported to the user.
3. The link fault identification and repair method according to claim 1, characterized in that: The transmission error type also includes hard disk failure, and the hard disk failure is determined based on whether the hard disk sends a response signal; If the transmission error type returned by the hard disk interface controller is a hard disk failure, the method further includes: Initiate a retry request. After a preset number of consecutive retries fail, a hard disk failure alarm is reported to the user.
4. The link fault identification and repair method according to claim 1, characterized in that: The transmission parameter adjustment process also includes: Determine whether the number of retries to send the IO data exceeds a preset threshold; If yes, a transmission timeout alarm is sent to the user.
5. The link fault identification and repair method according to claim 4, characterized in that: The transmission parameters include: At least one of the maximum establishment timeout, the number of retries after establishment failure, the waiting interval for retries, the time to establish a connection, the check error threshold, and the pre-emphasis and de-emphasis parameters of the transmission signal; Adjust the corresponding transmission parameters according to the sub-classified fault types, including: If the sub-classified fault type is an establishment timeout fault, the maximum establishment timeout is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and cascade device performance in the system topology structure; If the sub-classified fault type is a fault of exceeding the number of retries after establishment failure, the number of retries after establishment failure is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs; If the sub-classified fault type is a fault that exceeds the waiting retry interval, the waiting retry interval is adjusted in steps, and the step value of the step adjustment is determined according to the communication performance requirements and user needs; If the sub-classified fault type is a fault exceeding the time for establishing a connection, the time for establishing a connection is adjusted in steps, and the step value of the step adjustment is determined according to the cascade depth and hard disk performance in the system topology structure; If the sub-classified fault type is a fault exceeding the verification error threshold, the verification error threshold is adjusted in steps, and the step value of the step adjustment is determined according to user requirements; If the sub-classified fault category is a pre-emphasis or de-emphasis parameter fault of the transmission signal, the pre-emphasis or de-emphasis parameters of the transmission signal are adjusted stepwise, and the step value of the stepwise adjustment is determined according to the strength and quality of the transmission signal.
6. The link fault identification and repair method according to claim 5, characterized in that: If there are multiple fault categories, the following are also included: The transmission parameters are adjusted in a coordinated manner in the order of connection establishment to obtain an optimal transmission parameter combination within the processing capability of the hard disk interface controller.
7. The link fault identification and repair method according to claim 6, characterized in that: The sub-categorized fault categories include a timeout fault for establishing a connection, a timeout fault for establishing a connection, and a timeout fault for exceeding a check error threshold. The coordinated adjustment of the transmission parameters in sequence according to the connection establishment sequence includes: Keep the time for establishing the connection and the check error threshold unchanged, and adjust the number of retries after the establishment failure according to the maximum establishment timeout step value; After the establishment time timeout fault is repaired, the number of retries after the establishment failure and the verification error threshold are kept unchanged, and the time for establishing the connection is adjusted according to the time step value for establishing the connection; After the fault that exceeds the time for establishing a connection is repaired, the number of retries after the establishment failure and the time for establishing a connection are kept unchanged, and the verification error threshold is adjusted according to the verification error threshold step value until the fault that exceeds the verification error threshold is repaired, so as to obtain the optimal number of retries after the establishment failure, the connection time and the verification error threshold.
8. The link fault identification and repair method according to claim 1, characterized in that: The sending layer is used to send an instruction to transmit IO data to the driving layer, identify the response of the hard disk, determine whether the IO data is abnormal or the hard disk fails, and report an alarm to the user; The driver layer is used to initialize the configuration of the hard disk interface controller and set the initial transmission parameters; write the instruction of the sending layer to send the IO data to the hard disk interface controller, apply for the establishment of connection step by step, and transmit the IO data after each level is successfully connected; If the transmission error type returned by the hard disk interface controller is a transmission timeout failure, after the driver layer adjusts the transmission parameters and the sending layer retries sending the IO data for multiple times, the IO data still fails to be transmitted, an alarm is sent that the transmission reaches the limit value.
9. The link fault identification and repair method according to claim 8, characterized in that: Also includes: If the sending layer receives the hard disk feedback information reported by the driver layer, it determines whether the hard disk fails according to the hard disk feedback information, and after determining that the hard disk fails, performs a sending retry and reports a hard disk failure alarm; If the sending layer receives a transmission signal failure event reported by the driving layer, a retry is initiated; If the transmission signal failure event is no longer received after the retry, it indicates that the retry is successful; if the transmission signal failure event is still received after the retry, a transmission signal failure alarm is reported to the user; If the sending layer receives a transmission timeout fault event reported by the driver layer, the IO data is resent, and the number of times the IO data is sent is not used as the number of retries, until a transmission timeout adjustment success event reported by the driver layer is received; If a transmission timeout adjustment failure event reported by the driver layer is received, retry sending, and report a transmission timeout fault alarm to the user after the retry reaches a preset threshold.
10. The link fault identification and repair method according to claim 9, characterized in that: The hard disk feedback information reported by the driver layer includes a response or an error code of the hard disk.
11. The link fault identification and repair method according to claim 2, characterized in that: Also includes: Run the firewall through the hard disk interface controller, apply to the cascade expansion cabinets step by step to establish a connection and transmit IO data; Based on the response of each level of expansion cabinet, identify whether a transmission signal failure or a transmission timeout failure occurs.
12. A link fault identification and repair device, characterized in that: include: A monitoring module, used for monitoring the transmission error type returned by the hard disk interface controller in real time after the main controller sends IO data to the hard disk interface controller; The adjustment module is used for, if the transmission error type returned by the hard disk interface controller is a transmission timeout fault, sub-classifying the transmission timeout fault, and adjusting the corresponding transmission parameters according to the sub-classified fault types, during the transmission parameter adjustment process, retrying to send the IO data multiple times, and taking the transmission parameter value when the IO data is successfully sent as the optimal transmission parameter; the main controller includes: a sending layer and a driving layer; when the driving layer identifies a transmission error, the fault event is reported to the sending layer, and the fault event includes a transmission signal fault event and a transmission timeout fault event; the transmission signal fault event includes a parity check error event and a cyclic redundancy check error event; the transmission timeout fault event includes a transmission timeout adjustment start event, a transmission timeout adjustment in progress event, a transmission timeout adjustment success event, and a transmission timeout adjustment failure event; The sending module is used to resend the IO data to the hard disk interface controller according to the optimal transmission parameters, so as to transmit the IO data to the corresponding hard disk.
13. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the link fault identification and repair method according to any one of claims 1 to 11 is implemented.
14. A non-transitory readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the link fault identification and repair method according to any one of claims 1 to 11 is implemented.
