CN117591355A - Method and device for diagnosing hard disk faults, computer equipment and storage medium - Google Patents

Method and device for diagnosing hard disk faults, computer equipment and storage medium Download PDF

Info

Publication number
CN117591355A
CN117591355A CN202311615147.7A CN202311615147A CN117591355A CN 117591355 A CN117591355 A CN 117591355A CN 202311615147 A CN202311615147 A CN 202311615147A CN 117591355 A CN117591355 A CN 117591355A
Authority
CN
China
Prior art keywords
hard disk
fault
information
abnormal
failure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311615147.7A
Other languages
Chinese (zh)
Inventor
辛奇
朱飞勇
陈鹏全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xinyilian Information Technology Co Ltd
Original Assignee
Chengdu Xinyilian Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Xinyilian Information Technology Co Ltd filed Critical Chengdu Xinyilian Information Technology Co Ltd
Priority to CN202311615147.7A priority Critical patent/CN117591355A/en
Publication of CN117591355A publication Critical patent/CN117591355A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2252Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using fault dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses a diagnosis method, a diagnosis device, computer equipment and a storage medium for hard disk faults, wherein the diagnosis method is applied to a controller of a host, the controller simultaneously establishes communication connection with a hard disk and a client, and the diagnosis method comprises the steps of acquiring state information of the hard disk during operation; when the abnormal state of the hard disk is detected through the state information, generating log information; generating a corresponding fault reason according to the log information; and analyzing the fault reasons to obtain corresponding solving strategies. In the operation process of the hard disk, if an abnormal problem occurs, the internal log information of the hard disk is used for analyzing the fault cause so as to obtain a solution strategy capable of solving the fault cause, and a tester is displayed in an intuitive form, so that the test efficiency is improved.

Description

Method and device for diagnosing hard disk faults, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for diagnosing a hard disk failure, a computer device, and a storage medium.
Background
In a storage device of a data center or a home-type computer host, a hard disk is a component with the highest failure rate except a memory and a main board, so that the failed hard disk needs to be replaced in a large scale every year.
In order to facilitate accurate understanding of the hard disk in the operation process, the situation that a large number of hard disks are replaced is prevented; for this reason, in some related technologies, the server alarms and iBMC logs may be used to view information records during the system startup process, including startup information and state transitions, and may also be used to view a setup class operation log that is executed by the user on the iBMC, and may download the operation log. The function is completed after the whole server is finished and can be delivered, and the function cannot be used for troubleshooting when problems occur in the development stage of the server, such as the main board development and debugging process.
Disclosure of Invention
In order to overcome the defects of the prior art, the embodiment of the invention provides a diagnosis method, a diagnosis device, computer equipment and a storage medium for hard disk faults.
The technical scheme adopted for solving the technical problems is as follows:
in a first aspect, an embodiment of the present invention provides a method for diagnosing a hard disk failure, where the method is applied to a controller of a host, and the controller simultaneously establishes a communication connection with a hard disk and a client, and the method includes:
acquiring state information of a hard disk during operation;
when the abnormal state of the hard disk is detected through the state information, generating log information;
generating a corresponding fault reason according to the log information;
and analyzing the fault reasons to obtain corresponding solving strategies.
As a preferable technical solution of the present invention, the generating a corresponding failure cause according to the log information includes:
acquiring fault diagnosis information containing different abnormal problems from the log information;
judging whether each abnormal problem of the hard disk is matched with the fault diagnosis information or not;
and if at least one abnormal problem is matched with the fault diagnosis information, generating a fault reason corresponding to the abnormal problem.
As a preferable technical solution of the present invention, the determining whether the abnormal problems of the hard disk match the fault diagnosis information includes:
sequentially matching each abnormal problem with each preset fault cause information in the fault diagnosis information to obtain a matching probability value corresponding to each fault cause information;
and judging whether the matching probability value of each fault cause information exceeds a preset fault threshold value so as to obtain a matching result of whether the fault cause information is matched.
As a preferred technical solution of the present invention, the sequentially matching each abnormal problem with each preset fault cause information in the fault diagnosis information to obtain a matching probability value corresponding to each fault cause information, includes:
detecting the similarity frequency of phrase information of the abnormal problems and phrase information in the fault cause information;
calculating the ratio of the similarity frequency of each piece of fault cause information to the phrase information of the corresponding abnormal problem so as to obtain a matching probability value between each piece of fault cause information and the corresponding abnormal problem.
As a preferable technical solution of the present invention, after generating the corresponding fault cause according to the log information, the method includes:
classifying the fault reasons to obtain alarm information corresponding to the fault reasons;
and sending the alarm information to the client.
As a preferable technical scheme of the invention, the controller also establishes communication connection with a manufacturer side; after analyzing the fault cause to obtain the corresponding solution policy, the method further includes:
and collecting each fault reason and sending the fault reason to the manufacturer side.
In a second aspect, an embodiment of the present invention provides a diagnostic apparatus for hard disk failure, where the diagnostic apparatus is disposed in a controller of a host, and the controller establishes communication connection with a hard disk and a client at the same time, and the diagnostic apparatus includes:
the first acquisition module is used for acquiring state information of the hard disk during operation;
the first generation module is used for generating log information when the hard disk is in an abnormal state;
the second generation module is used for generating a fault reason causing hard disk abnormality from the log information;
and the analysis module is used for analyzing the fault reasons to generate a solution strategy capable of solving the fault reasons.
As a preferable technical solution of the present invention, the second generating module further includes:
the second acquisition module is used for acquiring fault diagnosis information containing different abnormal problems from the log information;
the judging module is used for judging whether the abnormal problems of the hard disk are matched with the fault diagnosis information or not;
and the third generation module is used for generating a fault reason corresponding to the abnormal problem if at least one abnormal problem is matched with the fault diagnosis information.
In a third aspect, an embodiment of the present invention provides a computer device, where the device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method for diagnosing a hard disk failure according to any one of the first aspect when executing a program stored in a memory.
In a fourth aspect, an embodiment of the present invention provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for diagnosing a hard disk failure according to any one of the first aspects
Compared with the prior art, the invention has the beneficial effects that:
in the operation process of the hard disk, if an abnormal problem occurs, the internal log information of the hard disk is used for analyzing the fault cause so as to obtain a solution strategy capable of solving the fault cause, and a tester is displayed in an intuitive form, so that the test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for diagnosing hard disk failure according to an embodiment of the present invention.
Fig. 2 is a block schematic diagram of a hard disk failure diagnosis apparatus according to an embodiment of the present invention.
Fig. 3 is a block diagram of a second generation module of the diagnostic device according to an embodiment of the present invention.
FIG. 4 is a block schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
In order to solve the problems of related tools and methods in the prior art, such as software, hardware or operation and the like in each test link of manufacturers are difficult to solve, most of the problems need to feed back FAE of the manufacturers through log collection and feed back research and development, thereby influencing efficiency; therefore, the embodiment of the invention provides a diagnosis method for hard disk faults.
The embodiment of the invention provides a specific flow of a diagnosis method for hard disk faults, and the diagnosis method is applied to a controller of a host computer, and the controller establishes communication connection with a hard disk and a client side at the same time. According to the method shown in fig. 1, the method for diagnosing the hard disk fault specifically includes:
step S110, obtaining the state information of the hard disk during operation.
Specifically, after the server or the home host is started, the state of the hard disk during operation is detected at any time through a plurality of hard disk diagnostic tools pre-installed in the hard disk.
It will be appreciated that the hard disk diagnostic tool of the embodiments of the present invention is a Quick Test (Quick Test), an Extended Test (Extended Test), a transfer rate Test (Transfer Rate Test), and the like.
For example, the quick Test functions to perform the following operations: 1. and detecting the basic functions of the hard disk, such as whether the hard disk can be started, read and written with data normally. 2. And detecting the physical health condition of the hard disk, such as checking whether a bad track exists on the surface of the hard disk, whether a sector is damaged or not and whether other hardware problems exist on the hard disk or not. 3. The method includes the steps of testing the reading speed of the hard disk, for example, a Quick Test can read data in the hard disk, and comparing whether the reading speed is within a normal range.
S120, when the abnormal state of the hard disk is detected through the state information, log information is generated.
Specifically, when the hard disk is in an operating state and is abnormal, log information is immediately generated, and the log information is used for recording the state and error information of the hard disk, namely, when the hard disk is in an abnormal state, an operating system of the hard disk generates log information corresponding to the abnormal problem (detailed report of detailed error which leads to the occurrence of the hard disk abnormality).
For example, when an abnormality of the hard disk is a large class of problems in the improper operation or the environment configuration, log information detailing a specific improper step of the improper operation or a specific environment configuration problem is immediately generated.
It should be noted that, the controller may monitor the hard disk in an operating state at any time, and may obtain each log file of the RAID card in the server to be monitored. Specifically, the controller passes through Secure Shell protocol (Secure Shell protocol).
When the controller detects that the hard disk is abnormal, the abnormal information is recorded in the register so as to decode the log information recorded in the register later, thereby rapidly and accurately acquiring the fault reason of the server.
It is understood that the register in the embodiment of the present invention is a CSR register or an MSR register, which is not limited in particular.
Step S130, corresponding fault reasons are generated according to the log information.
In order to accurately know the fault cause causing the hard disk abnormality, so as to provide a proper solution subsequently; therefore, if log information corresponding to the abnormal state of the hard disk is generated, the side problem, namely the preliminary problem of the hard disk abnormality caused by preliminary positioning, is eliminated, and meanwhile, the additional unrelated preliminary problem is eliminated, so that the accuracy of the fault cause of the hard disk abnormality is further improved.
For example, the reasons for the failure that causes the hard disk to be abnormal include improper operation of the user, problems of the hard disk itself, and environmental configuration; and matching the three types of fault reasons with the current fault reason, and if the matched fault reason is confirmed to be a problem in the operation processing process of some links of a user, removing the other two types of fault reasons.
And step S140, analyzing the fault reasons to obtain corresponding solving strategies.
Specifically, the log information comprises fault reasons and fault processing schemes capable of solving various fault reasons, so that the fault reasons of the hard disk can be conveniently known through the log file, and corresponding fault processing and solving schemes are generated based on the fault reasons, so that the working intensity of related personnel is relieved, the fault problem of the hard disk is rapidly solved, and the situation that the data of the hard disk is lost is further reduced; the arrangement improves the stability of the hard disk during operation.
It should be noted that, after the preliminary problem of the hard disk is obtained, a prompt instruction whether to analyze specifically is sent to the user terminal, if the prompt instruction sent by the user terminal is received, the failure reason of the hard disk is further analyzed, further a specific reason causing the failure of the hard disk and a solution capable of solving the failure reason are obtained, and finally the specific reason and the solution capable of solving the failure reason are sent to the client terminal in an intuitive form so as to be checked by a tester, thereby improving the overall test efficiency.
For example, if the failure cause causing the hard disk abnormality is an environmental configuration reference, the self-problem of the hard disk is discharged, and then whether the failure cause causing the hard disk abnormality is further analyzed is sent to the user terminal, and if the user terminal sends an consent request, the failure cause of the environmental configuration is analyzed to obtain a solution.
In a specific embodiment, the steps of generating the corresponding fault cause according to the log information specifically include the following steps and embodiments:
fault diagnosis information including different abnormal problems is acquired from the log information.
Specifically, when log information is acquired, whether a hard disk has a fault during operation can be determined according to a preset fault diagnosis information base, and then when the hard disk has the fault, a solution for solving different fault causes can be generated through the fault diagnosis information base according to the preset fault diagnosis information base.
It should be further noted that, the fault diagnosis information base in the embodiment of the present invention is a historical fault accident pre-stored in the hard disk, which can be understood as fault information, and the historical fault accident of the hard disk is analyzed and extracted, so as to obtain the created fault diagnosis information base.
Therefore, the operation condition of the hard disk can be detected in real time, and the abnormal hard disk is subjected to fault diagnosis according to the fault diagnosis information base in the log file, so that the fault reason of the hard disk is quickly found, and the corresponding solution is convenient to generate in time.
In order to achieve the fast and accurate acquisition of the fault reasons of the hard disk, the test environment for the testers to execute manual analysis and matching is lightened; for this purpose, in a specific embodiment, it is determined whether the respective abnormal problems of the hard disk and the failure diagnosis information match.
Specifically, according to all the obtained abnormal problems of the hard disk, each abnormal problem can be matched with the fault information in the fault diagnosis information, so that a matching result is obtained, and the matching result contains specific fault reasons resolved from the fault diagnosis information.
For example, when the hard disk is abnormal in environment configuration, the abnormal information of the environment configuration of the hard disk is matched with the fault information in the fault diagnosis information, so as to obtain the fault information corresponding to the environment configuration recorded in the diagnosis result file, and then the fault diagnosis information is analyzed according to the register value and the fault reason, so that at least one abnormal problem can be confirmed to be matched with the fault diagnosis information.
And if at least one abnormal problem is matched with the fault diagnosis information, generating a fault reason corresponding to the abnormal problem.
Specifically, log information containing fault information is obtained, and the log information can also generate a corresponding fault solution, so that when the hard disk is abnormal, information of a fault cause contained in a log file and a solution for solving the fault cause can be generated, and then a tester can process the fault according to the solution; therefore, the tester can conveniently and quickly find out the reason for the hard disk abnormality, and the certain working strength of the tester is reduced.
For example, when the hard disk is abnormal in environmental configuration, the fault diagnosis information base includes at least three pieces of fault information, which are respectively the problem of improper operation, the problem of the hard disk itself and the environmental configuration; therefore, when it is confirmed that the abnormality of the environment configuration matches the fault information of the environment configuration contained in the fault diagnosis information, then the abnormality is generated as the cause of the fault of the environment configuration.
The accuracy of detecting the specific fault reasons of the hard disk is further improved; in a further embodiment, the foregoing steps are to determine whether the abnormal problems of the hard disk and the fault diagnosis information match, and include the following steps and embodiments:
and sequentially matching each abnormal problem with each preset fault cause information in the fault diagnosis information to obtain a matching probability value corresponding to each fault cause information.
Specifically, since the plurality of fault cause information in the fault diagnosis information is preset, that is, a plurality of fault causes causing the hard disk to be abnormal can be matched with the plurality of fault cause information in the fault diagnosis information, and then a specific fault cause causing the hard disk to be abnormal is determined according to the matching degree of the plurality of fault cause information and the plurality of fault cause information; it can be understood that if one of the abnormal problems matches a preset failure cause in the failure diagnosis information to a higher degree, the specific failure cause that causes the hard disk abnormality is confirmed.
And judging whether the matching probability value of each fault cause information exceeds a preset fault threshold value so as to obtain a matching result of whether the fault cause information is matched.
Specifically, after obtaining a matching probability value of an abnormal problem of the hard disk, a fault threshold value of each parameter can be combined (i.e. the fault threshold value is preset by the system); when the matching probability value of one abnormal problem exceeds the fault threshold value, the hard disk is determined to be matched, namely, a specific fault cause causing the abnormal hard disk is confirmed; otherwise, when the matching probability value of one of the abnormal problems does not exceed the fault threshold value, determining that the abnormal problem is not matched, and eliminating the abnormal problem of the hard disk caused by the fault cause; by the scheme, the specific fault reason of the hard disk abnormality is determined, the problem that the subsequently generated fault reason has larger error is avoided, and the accuracy of detecting the hard disk fault is further improved.
In a further embodiment, the step of sequentially matching each abnormal problem with each preset fault cause information in the fault diagnosis information to obtain a matching probability value corresponding to each fault cause information includes the following steps and embodiments:
and detecting the similarity frequency of phrase information of the abnormal problems and phrase information in the fault cause information.
Specifically, it can be understood that by detecting that the abnormal problem caused by the misoperation of the user corresponds to the first abnormal phrase information in the preset fault cause information, the abnormal problem of the environment configuration corresponds to the second abnormal phrase information in the preset fault cause information, and the abnormal problem of the hard disk itself corresponds to the third abnormal phrase information in the preset fault cause information.
In the foregoing embodiment, if the number of times of similarity between the third abnormal phrase information in the plurality of abnormal phrase information and the phrase information in the preset failure cause information is the largest, the number of times of similarity between the third abnormal phrase information is the second abnormal phrase information, and then the third abnormal phrase information; therefore, the third abnormal phrase information is determined to be the closest to the fault cause causing the hard disk to be abnormal; thus, the accuracy of detecting the hard disk faults is improved. It can be understood that, if the frequency of similarity of a particular abnormal phrase information is higher, the degree of similarity of the abnormal problem corresponding to the abnormal phrase information is proved to be highest.
Calculating the ratio of the similarity frequency of each piece of fault cause information to the phrase information of the corresponding abnormal problem to obtain a matching probability value between each piece of fault cause information and the corresponding abnormal problem.
Specifically, when the phrase information of one of the abnormal problems has a similar frequency, the specific matching probability value of the fault information is obtained by calculating according to the specific times of the similar frequency.
For example, if the number of times of similarity of the third abnormal phrase information is higher than the number of times of similarity of the other first abnormal phrase information and the second abnormal phrase information, the matching probability value that causes the hard disk abnormality may be determined to be the highest after calculation. Thus, the accuracy and efficiency of acquiring the specific fault cause causing the hard disk abnormality are improved.
In a specific embodiment, the steps are further included after generating the corresponding fault cause according to the log information, and the steps and embodiments are as follows:
classifying the fault reasons to obtain alarm information corresponding to the corresponding fault reasons; and sending the alarm information to the client.
Specifically, the fault causes of the hard disk abnormality can be classified according to different severity levels and types, information of a plurality of fault causes is recorded in log information, and the information is sent to a user side in a serious alarm mode, so that a solution is generated for reference of a user, and the user can be warned.
And finally, collecting all fault reasons causing the hard disk abnormality, and sending the fault reasons to a manufacturer side so that the manufacturer side can obtain some fault reasons of the hard disk abnormality which are not met.
In correspondence to the above-mentioned method for diagnosing a hard disk failure, the embodiment of the present invention further provides a device 100 for diagnosing a hard disk failure, where the device 100 for diagnosing a hard disk failure is used for executing any embodiment of the foregoing method for diagnosing a hard disk failure. The diagnostic device 100 is applied to a controller provided in a host computer, which establishes communication connection with a hard disk and a client at the same time.
The following details a specific structure of the hard disk fault diagnosis apparatus 100 according to an embodiment of the present invention, and according to fig. 2, specifically includes:
a first obtaining module 110, configured to obtain status information of the hard disk during operation;
the first generation module 120 is configured to generate log information when an abnormal state occurs in the hard disk;
a second generating module 130, configured to generate a failure cause that causes an abnormality of the hard disk from the log information;
and the analysis module 140 is used for analyzing the fault reasons to generate a solution strategy capable of solving the fault reasons.
In a further embodiment, the second generating module further comprises:
a second obtaining module 1301, configured to obtain fault diagnosis information including different abnormal problems from the log information;
a judging module 1302, configured to judge whether each abnormal problem of the hard disk is matched with the fault diagnosis information;
and the third generating module 1303 is configured to generate a fault cause corresponding to the abnormal problem if at least one abnormal problem matches the fault diagnosis information.
In summary, in the operation process of the hard disk, if an abnormal problem occurs, the internal log information of the hard disk is used for analyzing the failure cause so as to obtain a solution strategy capable of solving the failure cause, and a tester is displayed in an intuitive form, so that the test efficiency is improved.
The embodiment of the present invention further provides a computer device 10, according to fig. 3, including a processor 401, a network interface 405, a memory 403, and a communication bus, where the processor 401, the network interface 405, and the memory 403 complete communication with each other through the communication bus; a memory 403 for storing a computer program; in one embodiment of the present invention, the processor 401 is configured to implement the steps of the method for diagnosing a hard disk failure provided in any one of the foregoing method embodiments when executing the program stored in the memory 403.
The memory 403 may store an operating system 4031 and computer programs 4032. The computer program 5032, when executed, may cause the processor 401 to perform a method for diagnosing a hard disk failure, wherein the memory 403 may be a volatile storage medium or a nonvolatile storage medium.
The processor 401 serves to provide computing and control capabilities, supporting the operation of the overall computer device 10. The network interface 405 is used for network communication, such as wired network communication and/or wireless network communication, to provide for the transmission of data information. It will be appreciated by those skilled in the art that the structure shown in fig. 3 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the apparatus 10 to which the present inventive arrangements are applied, and that a particular apparatus 10 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
The processor 401 is configured to execute a computer program 4032 stored in the memory 403, so as to implement the corresponding functions in the above-mentioned method for diagnosing a hard disk failure.
The embodiment of the invention further provides a readable storage medium, on which a computer program is stored, the computer program implementing the steps of the method for diagnosing a hard disk failure provided by any one of the foregoing method embodiments when executed by a processor.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A method for diagnosing a hard disk failure, the method being applied to a controller of a host, the controller simultaneously establishing a communication connection with a hard disk and a client, the method comprising:
acquiring state information of a hard disk during operation;
when the abnormal state of the hard disk is detected through the state information, generating log information;
generating a corresponding fault reason according to the log information;
and analyzing the fault reasons to obtain corresponding solving strategies.
2. The method for diagnosing a hard disk failure according to claim 1, wherein the generating a corresponding failure cause from the log information includes:
acquiring fault diagnosis information containing different abnormal problems from the log information;
judging whether each abnormal problem of the hard disk is matched with the fault diagnosis information or not;
and if at least one abnormal problem is matched with the fault diagnosis information, generating a fault reason corresponding to the abnormal problem.
3. The method according to claim 2, wherein said determining whether the respective abnormal problems of the hard disk and the failure diagnosis information match, comprises:
sequentially matching each abnormal problem with each preset fault cause information in the fault diagnosis information to obtain a matching probability value corresponding to each fault cause information;
and judging whether the matching probability value of each fault cause information exceeds a preset fault threshold value so as to obtain a matching result of whether the fault cause information is matched.
4. The method for diagnosing a hard disk failure according to claim 3, wherein said sequentially matching each of said abnormal problems with each of the predetermined failure cause information in said failure diagnosis information to obtain a matching probability value corresponding to each of said failure cause information, respectively, comprises:
detecting the similarity frequency of phrase information of the abnormal problems and phrase information in the fault cause information;
calculating the ratio of the similarity frequency of each piece of fault cause information to the phrase information of the corresponding abnormal problem so as to obtain a matching probability value between each piece of fault cause information and the corresponding abnormal problem.
5. The method for diagnosing a hard disk failure according to claim 1, wherein after generating the corresponding failure cause based on the log information, comprising:
classifying the fault reasons to obtain alarm information corresponding to the fault reasons;
and sending the alarm information to the client.
6. The method for diagnosing a hard disk failure according to claim 1, wherein the controller further establishes a communication connection with a manufacturer side; after analyzing the fault cause to obtain the corresponding solution policy, the method further includes:
and collecting each fault reason and sending the fault reason to the manufacturer side.
7. A diagnostic apparatus for hard disk failure, the diagnostic apparatus being provided in a controller of a host computer, the controller establishing communication connection with a hard disk and a client at the same time, the diagnostic apparatus comprising:
the first acquisition module is used for acquiring state information of the hard disk during operation;
the first generation module is used for generating log information when the hard disk is in an abnormal state;
the second generation module is used for generating a fault reason causing hard disk abnormality from the log information;
and the analysis module is used for analyzing the fault reasons to generate a solution strategy capable of solving the fault reasons.
8. The apparatus for diagnosing a hard disk failure according to claim 7, wherein said second generating module further comprises:
the second acquisition module is used for acquiring fault diagnosis information containing different abnormal problems from the log information;
the judging module is used for judging whether the abnormal problems of the hard disk are matched with the fault diagnosis information or not;
and the third generation module is used for generating a fault reason corresponding to the abnormal problem if at least one abnormal problem is matched with the fault diagnosis information.
9. A computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method for diagnosing a hard disk failure according to any one of claims 1 to 6 when executing a program stored on a memory.
10. A readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method for diagnosing a hard disk failure according to any of the claims 1-6.
CN202311615147.7A 2023-11-28 2023-11-28 Method and device for diagnosing hard disk faults, computer equipment and storage medium Pending CN117591355A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311615147.7A CN117591355A (en) 2023-11-28 2023-11-28 Method and device for diagnosing hard disk faults, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311615147.7A CN117591355A (en) 2023-11-28 2023-11-28 Method and device for diagnosing hard disk faults, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117591355A true CN117591355A (en) 2024-02-23

Family

ID=89913004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311615147.7A Pending CN117591355A (en) 2023-11-28 2023-11-28 Method and device for diagnosing hard disk faults, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117591355A (en)

Similar Documents

Publication Publication Date Title
CN108388489B (en) Server fault diagnosis method, system, equipment and storage medium
CN113689911B (en) Fault diagnosis method, device, equipment and readable storage medium
CN108763005B (en) Memory ECC fault error reporting method and system
CN116107794B (en) Ship software fault automatic diagnosis method, system and storage medium
CN111124809B (en) Test method and device for server sensor system
JPH09205429A (en) Network fault diagnostic device, fault prediction device, and its diagnostic and prediction method
CN110532146B (en) Data acquisition monitoring method and device
CN112668159A (en) Troubleshooting method and device based on improved FMEA system log file
CN117591355A (en) Method and device for diagnosing hard disk faults, computer equipment and storage medium
CN112306038B (en) Detection method, detection device and diagnosis equipment
CN115840686A (en) Server performance test method and device, electronic equipment and storage medium
CN109783263B (en) Method and system for processing aging test fault of server
CN113538725A (en) Hardware product testing method and related equipment
CN117472474B (en) Configuration space debugging method, system, electronic equipment and storage medium
CN111190781A (en) Test self-check method of server system
CN117789804A (en) Method, device and equipment for testing flash hard disk and medium
CN116909800B (en) Method and device for locating crash information and storage medium
CN113886165B (en) Verification method, device and equipment for firmware diagnosis function and readable medium
CN117472629B (en) Multi-fault diagnosis method and system for electronic information system
CN114741219B (en) Operating system based diagnostic system and method for computing software
CN113094221B (en) Fault injection method, device, computer equipment and readable storage medium
CN116991724A (en) Interface testing method and device based on monitoring log, electronic equipment and storage medium
CN111176916B (en) Data storage fault diagnosis method and system
CN117149492A (en) Server fault detection method, device, equipment and computer storage medium
CN118055013A (en) Bandwidth fault detection method, device, equipment and machine-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination