File system state management method and device, equipment, medium and product

By monitoring the performance parameters of the Btrfs file system and calling the pre-stored recovery solution, the problem of file system repair efficiency is solved, and data security and system stability are improved.

CN119739564AActive Publication Date: 2025-04-01INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411841469.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-01
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

When a Btrfs file system fails or is abnormal, the repair efficiency is too slow, resulting in data loss or corruption.

Method used

By monitoring the file system's ultimate performance parameters and current performance parameters, determine the file system's status information. When an exception occurs, the pre-stored recovery scheme is called immediately for repair, and an exception message is generated and written to the message queue is written when repair fails.

Benefits of technology

Improves the recovery efficiency of the file system, reduces the risk of data loss or corruption, and ensures that the file system can be repaired in a timely manner when problems occur.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739564A_ABST
    Figure CN119739564A_ABST
Patent Text Reader

Abstract

The invention provides a state management method and device of a file system, equipment, a medium and a product, and relates to the field of information security. The method comprises the steps of obtaining limit performance parameters and current performance parameters of the file system, determining state information of the file system according to the limit performance parameters and the current performance parameters of the file system and a return result of a calling interface of the file system, and when indication information indicates that the file system is abnormal, sending the state information to the calling interface of the file system. Determining a corresponding first recovery scheme according to the feature information, executing the first recovery scheme, generating an exception message of the file system according to the file system identifier, the feature information, the exception type and the exception degree of the file system when the execution of the first recovery scheme fails, and writing the exception message into a target message queue, therefore, data loss or damage of the file system is avoided by improving the repair efficiency of the file system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security, and in particular to a file system status management method, device, equipment, medium and product. Background Art

[0002] Btrfs (B-Tree File System) is a new file system with many advanced features, such as snapshots, compression, verification, online expansion and repair, etc. It is widely used in Linux operating systems. Since Btrfs is a new file system, its technology maturity is not as good as that of traditional file systems. Therefore, there is still a certain gap in stability and compatibility between Btrfs file system and traditional file systems such as ext4 (Fourth Extended Filesystem). In large enterprises, there are a large number of scenarios where Btrfs file system is used. When problems occur in Btrfs file system, it will have a serious impact on business operations.

[0003] In the prior art, when a Btrfs file system fails or becomes abnormal, environmental maintenance personnel will discover the problem through log analysis or Btrfs file system error reporting, and then locate and repair the discovered problem, resulting in file system data being lost or damaged during the time from the problem occurring to the problem being discovered and repaired.

[0004] However, the prior art will notify the environment maintenance personnel to repair the file system only when a problem occurs, resulting in a slow efficiency in repairing the file system, thereby causing data loss or damage to the file system. Summary of the invention

[0005] The present application provides a file system status management method, apparatus, device, medium and product, which are used to solve the problem that the efficiency of repairing a file system is too slow, resulting in data loss or damage to the file system.

[0006] In a first aspect, the present application provides a method for managing the state of a file system, which is applied to an agent of the file system, and the method comprises:

[0007] Acquire the limit performance parameter and current performance parameter of the file system, wherein the limit performance parameter includes at least one of the following: the maximum number of read and write times that can be completed within a unit time, the minimum read and write time per unit data volume, or the maximum storage space, and the current performance parameter includes at least one of the following: the current number of read and write times that can be completed within the unit time, the current read and write time per unit data volume, or the current storage space;

[0008] Determine, according to the limit performance parameter of the file system and the current performance parameter, and the return result of the calling interface of the file system, the state information of the file system, wherein the state information includes: indication information indicating whether the file system is abnormal, and, when the indication information indicates that the file system is abnormal, characteristic information, abnormality type, and abnormality degree;

[0009] When the indication information indicates that the file system is abnormal, determining a corresponding first recovery plan according to the characteristic information, and executing the first recovery plan;

[0010] When the execution of the first recovery solution fails, an exception message of the file system is generated according to the file system identifier of the file system, the characteristic information, the exception type and the exception degree, and the exception message is written into a target message queue.

[0011] In a second aspect, the present application provides a file system status management method, which is applied to a server, and the method includes:

[0012] Get exception messages of each file system from multiple message queues;

[0013] Each of the abnormal messages is stored in a database, and when the abnormal type and abnormal degree in the abnormal message meet the prompt condition, a prompt message is generated, wherein the prompt condition includes: the abnormal type is a target abnormal type and / or the abnormal degree is greater than or equal to a preset abnormal degree;

[0014] The prompt information is sent to a target maintainer, and the abnormal message of each file system is displayed.

[0015] In a third aspect, the present application provides a file system agent, including:

[0016] an acquisition module, configured to acquire a limit performance parameter and a current performance parameter of the file system, wherein the limit performance parameter includes at least one of the following: a maximum number of read and write operations that can be completed within a unit time, a minimum read and write operation time per unit data volume, or a maximum storage space, and the current performance parameter includes at least one of the following: a current number of read and write operations that can be completed within the unit time, a current read and write operation time per unit data volume, or a current storage space;

[0017] a processing module, configured to determine, according to the limit performance parameter of the file system and the current performance parameter, and a return result of the calling interface of the file system, the status information of the file system, wherein the status information includes: indication information indicating whether the file system is abnormal, and, when the indication information indicates that the file system is abnormal, characteristic information, abnormality type, and abnormality degree;

[0018] The processing module is further configured to determine a corresponding first recovery plan according to the characteristic information and execute the first recovery plan when the indication information indicates that the file system is abnormal;

[0019] The processing module is further configured to generate an exception message of the file system according to the file system identifier, the feature information, the exception type and the exception degree of the file system when the execution of the first recovery solution fails, and write the exception message into a target message queue.

[0020] In a fourth aspect, the present application provides a server, including:

[0021] An acquisition module is used to obtain abnormal messages of each file system from multiple message queues;

[0022] A processing module, used to store each of the abnormal messages in a database, and generate prompt information when the abnormal type and abnormal degree in the abnormal message meet the prompt condition, wherein the prompt condition includes: the abnormal type is a target abnormal type and / or the abnormal degree is greater than or equal to a preset abnormal degree;

[0023] The processing module is further configured to send the prompt information to a target maintainer and display the abnormal message of each file system.

[0024] In a fifth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0025] The memory stores computer-executable instructions;

[0026] The processor executes the computer-executable instructions stored in the memory to implement the method described in any one of the first aspects, or the method described in any one of the second aspects.

[0027] In a sixth aspect, the present application provides a file system status management system, comprising: at least one agent and a server, each agent corresponding to a file system, the agent being used to execute the method described in any one of the first aspects, and the server being used to execute the method described in any one of the second aspects.

[0028] In a seventh aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspect, or the method as described in any one of the second aspect.

[0029] In an eighth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any one of the first aspect, or the method described in any one of the second aspect.

[0030] The file system status management method, device, equipment, medium and product provided by the present application obtain the extreme performance parameters and current performance parameters of the file system, and then determine the status information of the file system according to the extreme performance parameters and current performance parameters of the file system and the return result of the calling interface of the file system. When the indication information indicates that the file system is abnormal, the corresponding first recovery plan is determined according to the characteristic information, and the first recovery plan is executed. When the execution of the first recovery plan fails, an abnormal message of the file system is generated according to the file system identification, characteristic information, abnormal type and abnormal degree of the file system, and the abnormal message is written into the target message queue. Compared with the prior art, when a file system fails or becomes abnormal, maintenance personnel discover the problem through log analysis or file system error reporting, and repair the problem, which results in too slow file system repair efficiency, and further causes a high probability of file system data loss or damage. The present application monitors the extreme performance parameters and current performance parameters of the file system, and then determines the status information of the file system according to the extreme performance parameters and current performance parameters of the file system. When the status information of the file system is abnormal, a recovery plan is matched in time according to the characteristic information of the file system, and the file system is restored. Therefore, the abnormal file system can be repaired in time, and the problem of too slow file system repair efficiency, which causes file system data loss or damage, is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0032] Figure 1 A schematic diagram of a scenario of a file system status management method provided in this application;

[0033] Figure 2 A flowchart of a first embodiment of a method for managing the state of a file system provided by the present application;

[0034] Figure 3 A flowchart of a second embodiment of a method for managing the state of a file system provided by the present application;

[0035] Figure 4 A flowchart of a third embodiment of a method for managing the state of a file system provided by the present application;

[0036] Figure 5A flowchart of a fourth embodiment of a method for managing the state of a file system provided by the present application;

[0037] Figure 6 A flowchart of a fifth embodiment of a method for managing the state of a file system provided by the present application;

[0038] Figure 7 A flowchart of a sixth embodiment of a method for managing the state of a file system provided by the present application;

[0039] Figure 8 A flowchart of a seventh embodiment of a method for managing the state of a file system provided by the present application;

[0040] Fig. 9 A signaling flow chart of a file system status management method provided in an embodiment of the present application;

[0041] Fig.10 A schematic diagram of the structure of a proxy terminal of a file system provided in an embodiment of the present application;

[0042] Fig.11 A schematic diagram of a server structure provided in an embodiment of the present application;

[0043] Fig.12 An electronic device provided in an embodiment of the present application;

[0044] Fig.13 A state management system for a file system is provided in an embodiment of the present application.

[0045] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0047] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0048] In addition, this application involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and the use of artificial intelligence technology for automated decision-making, and a technical solution for making decisions that have a significant impact on personal rights and interests based on the results of automated decision-making. The application provides users with corresponding operation entrances for them to choose to agree or reject the results of automated decision-making; if the user chooses to reject, the expert decision-making process will be entered.

[0049] It should be noted that the state management method, device, equipment, medium and product of the file system of the present application can be used in the field of information security, and can also be used in any field other than information security. The application field of the state management method, device, equipment, medium and product of the file system of the present application is not limited.

[0050] In the prior art, since Btrfs is a new type of file system and its technical maturity is not as good as that of traditional file systems, the Btrfs file system is more prone to problems in stability and compatibility. However, in the prior art, only when the Btrfs file system fails or becomes abnormal will the environmental maintenance personnel analyze and process it, and the efficiency of repairing the file system is too slow. Therefore, during the period when the Btrfs file system fails, the data in the Btrfs file system will be lost or damaged.

[0051] Based on this, the invention concept of this application is to provide a method for managing the status of a file system, and to automatically perform repair processing when the file system is unhealthy, so as to avoid notifying environmental maintenance personnel to perform processing and repair after the file system fails. Based on this, this application monitors the extreme performance parameters and current performance parameters of the file system, and determines the status information of the file system by comparing the extreme performance parameters and the current performance parameters. When the status information of the file system is abnormal, a pre-stored recovery plan is immediately called to restore it. Therefore, it can be avoided that the maintenance personnel are notified to repair the file system when the file system has problems and cannot be used. When the file system is abnormal, this application will immediately call the pre-stored recovery plan to restore it, thereby improving the recovery efficiency of the file system and avoiding the loss or damage of data due to the unusability of the file system.

[0052] The file system status management method provided in this application is intended to solve the above technical problems in the prior art.

[0053] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0054] Figure 1 A scenario diagram of a file system status management method provided by the present application, first, the agent end of the file system will obtain the extreme performance parameters and current performance parameters of the file system, and then determine the status information of the file system based on the extreme performance parameters and current performance parameters of the file system. When the status information of the file system is abnormal, the agent end will first try to use a pre-stored recovery solution to restore it. When the recovery fails, the agent end will generate an abnormal message of the file system and send it to the message queue. The server end of the file system will receive the abnormal messages of the file system from the message queue in sequence, and then send the abnormal messages to the target maintenance personnel, so that the target maintenance personnel can repair the file system.

[0055] Figure 2 A flowchart of a first embodiment of a method for managing the state of a file system provided by the present application is shown in FIG. Figure 1 As shown, the execution subject of the method is the proxy end of the file system, and the method includes the following steps:

[0056] S201: Obtain the extreme performance parameters and current performance parameters of the file system, where the extreme performance parameters include at least one of the following: the maximum number of read and write times that can be completed within a unit time, the minimum read and write time per unit data volume, or the maximum storage space; and the current performance parameters include at least one of the following: the current number of read and write times that can be completed within a unit time, the current read and write time per unit data volume, or the current storage space.

[0057] In an embodiment of the present application, the extreme performance parameters and current performance parameters of the file system are first obtained. Among them, the extreme performance parameters include: the maximum number of read and write times that can be completed within a unit time, the minimum read and write time per unit data volume, or the maximum storage space per unit data volume; the current performance parameters include: the current number of read and write times that can be completed within a unit time, the current read and write time per unit data volume, or the current storage space. For example, obtaining the current performance parameters of the file system includes: using an input / output statistics tool to obtain the current number of read and write times that can be completed within a unit time of the file system, the current read and write time per unit data volume, and obtaining the current storage space of the file system through a file system disk usage query tool.

[0058] S202: Determine status information of the file system according to the limit performance parameters and current performance parameters of the file system and the return result of the calling interface of the file system, where the status information includes: indication information indicating whether there is an abnormality in the file system, and feature information, abnormality type, and abnormality degree when the indication information indicates that there is an abnormality in the file system.

[0059] In the embodiment of the present application, the status information of the file system is determined based on the obtained limit performance parameters and current performance parameters of the file system, as well as the return result of the call interface of the file system. The status information includes: indication information, characteristic information, abnormality type, and abnormality degree; wherein the indication information indicates whether the file system is abnormal, and the characteristic information, abnormality type, and abnormality degree will only appear when the indication information of the file system is abnormal.

[0060] S203: When the indication information indicates that an abnormality exists in the file system, a corresponding first recovery plan is determined according to the characteristic information, and the first recovery plan is executed.

[0061] In an embodiment of the present application, when the indication information indicates that an abnormality occurs in the file system, the agent end of the file system will first determine the first recovery plan corresponding to the abnormality of the file system based on the characteristic information in the status information of the file system, and execute the first recovery plan to attempt to repair the abnormal file system.

[0062] S204: When the first recovery solution fails to be executed, an abnormal message of the file system is generated according to the file system identification, characteristic information, abnormal type and abnormal degree of the file system, and the abnormal message is written into the target message queue.

[0063] In the embodiment of the present application, when the agent fails to repair the file system by executing the first recovery solution, the agent generates an abnormal message of the file system according to the file system identification, characteristic information, abnormal type and abnormal degree of the file system, and then writes the abnormal message into the target message queue. The file system identification can be determined by a file system identification tool, and optionally, the file system identification is a universal unique identification code or a volume label.

[0064] Optionally, the operating environment of the file system and the target maintainer information corresponding to the exception type are added to the exception message, wherein the operating environment of the file system is obtained through a file system environment monitoring tool, and the operating environment includes but is not limited to: the operating system, hardware configuration, network configuration, and software environment of the file system. By adding the operating environment of the file system to the exception message, it is helpful to quickly locate the root cause of the problem based on the operating environment of the file system when the exception message is received. By adding the target maintainer information corresponding to the exception type to the exception message, when the server receives the file system exception message through the message queue, the file system exception message can be sent to the corresponding target maintenance personnel in a timely manner. Since the target maintenance personnel handle file systems of the same exception type, they have rich experience in file systems of this type of exception, and can quickly identify the cause of the problem and take effective solutions, which can shorten the processing time of the file system of the exception type.

[0065] Preferably, when the status information of the file system includes the exception type, a specific implementation method of writing the exception message into the target message queue is:

[0066] A target message queue corresponding to the exception type is determined from multiple message queues, and the exception message is written into the target message queue.

[0067] In an embodiment of the present application, when the status information of the file system includes an exception type, a target message queue corresponding to the exception type is determined from multiple message queues according to the exception type, and then the exception message is written into the target message queue, wherein the target message queue corresponding to the exception type is: the messages transmitted by the message queue are all messages of the same exception type. For example: a database table or file is pre-configured to store the mapping relationship between the exception type and the message queue, and when the execution of the first recovery plan fails, the pre-configured database table or file is queried to find the target message queue corresponding to the exception type of the file system, and then the exception message is written into the target message queue.

[0068] The target message queue is determined by the exception type of the file system, and then the exception message is written into the target message queue, so that file systems with the same exception type are sent to the same message queue, making it easier for subsequent target maintenance personnel to track and identify problems and take appropriate measures to repair them.

[0069] More preferably, determining a target message queue corresponding to the exception type from a plurality of message queues includes:

[0070] If the exception type does not exist in the exception type corresponding to at least one message queue, the degree of exception in the state information is matched with the degree of exception of the exception type of the message queue to obtain a first matching degree.

[0071] In an embodiment of the present application, if the mapping relationship between the abnormal type and the message queue does not exist in the pre-configured database or pre-configured file, the abnormality degree of the file system is checked, and then the abnormality degree corresponding to the file system of the abnormal type transmitted in the message queue in the past is matched to obtain the first matching degree. For example, if the abnormal type of a certain file system does not have a target message queue mapped to it in the pre-configured database or data table, the abnormality degree of all abnormal messages transmitted by the message queue is obtained, and then the abnormality degree of the file system is matched with the abnormality degree of the abnormal messages in all message queues to obtain the first matching degree.

[0072] The message queue with the largest first match degree is taken as the target message queue.

[0073] In the embodiment of the present application, the message queue with the largest first matching degree is used as the target message queue, and then the abnormal message of the file system is transmitted to the target message queue.

[0074] In an embodiment of the present application, if the exception type does not exist in the exception type corresponding to at least one message queue, the degree of exception is further selected as a criterion for selecting a target message queue. By selecting the degree of exception in the exception message transmitted by the message queue in the past, and matching it with the degree of exception of the file system, the message queue with the largest match is selected as the target message queue. By comparing the degree of exception, and then selecting the message queue with the closest degree of exception as the target message queue, the sending of exception messages can be balanced, so that when there is no message queue corresponding to the exception type, all exception messages will not be sent to the same message queue, causing the message queue to be unable to process the exception message in time, thereby causing the message queue to be blocked.

[0075] In the embodiment of the present application, by obtaining the limit performance parameters and current performance parameters of the file system, and then determining the status information of the file system according to the limit performance parameters and current performance parameters of the file system and the return result of the calling interface of the file system, when the indication information indicates that the file system is abnormal, determining the corresponding first recovery plan according to the characteristic information, and executing the first recovery plan, when the execution of the first recovery plan fails, generating the abnormal message of the file system according to the file system identification, characteristic information, abnormal type and abnormal degree of the file system, and writing the abnormal message into the target message queue. Compared with the prior art, when the file system fails or is abnormal, the maintenance personnel find the problem through log analysis or file system error reporting, and repair the problem, resulting in too slow file system repair efficiency, thereby causing the file system data loss or damage probability is too high, the present application monitors the limit performance parameters and current performance parameters of the file system, and then determines the status information of the file system according to the limit performance parameters and current performance parameters of the file system, when the status information of the file system is abnormal, timely matching the recovery plan according to the characteristic information of the file system, and performing recovery on the file system, so that the abnormal file system can be repaired in time, avoiding the problem that the file system repair efficiency is too slow, thereby causing the file system data loss or damage.

[0076] Figure 3 A flowchart of a second embodiment of a method for managing the state of a file system provided by the present application is shown in FIG. Figure 3 As shown in the above Figure 2 Based on the illustrated embodiment, a specific implementation of step S201 is as follows:

[0077] S301: Acquire a file system and extreme performance parameters of the file system from target configuration information.

[0078] In an embodiment of the present application, a file system and a limit performance parameter of the file system are obtained from target configuration information. For example, the target configuration information is a target database, and the target database stores the file system and the corresponding limit performance parameters, wherein the identifier of the file system, such as the name of the file system, can be used as a primary key to associate with the limit performance parameters.

[0079] S302: If the target configuration information contains the extreme performance parameters of the file system, an open source tool provided by the operating system is called to detect the current performance parameters of the file system during operation.

[0080] In an embodiment of the present application, if there are extreme performance parameters of the file system in the target configuration information, the current number of read and write times that can be completed per unit time, the current read and write time per unit amount of data, or the current storage space that can be completed by the file system during operation is detected by calling the open source tools provided by the operating system.

[0081] For example, use the I / O workload generator to detect the current number of reads and writes that can be completed per unit time during the operation of the file system, and detect the current read and write time per unit data volume during the operation of the file system. Use the file system disk usage query tool to obtain the current storage space of the file system during operation.

[0082] S303: When the file system is mounted, the file system and the corresponding extreme performance parameters are stored in the target configuration information.

[0083] In an embodiment of the present application, when the file system is mounted, an open source interception tool is used to intercept the file system mount event, and the extreme performance parameters of the mounted file system obtained by the open source tool are intercepted, and then the file system and the corresponding extreme performance parameters are stored in the target configuration information, which can be saved in the target database.

[0084] S304: When the file system is uninstalled, the file system and the limit performance parameter are deleted from the target configuration information.

[0085] In an embodiment of the present application, when the file system is unmounted, the open source interception technology is also used to intercept the file system unmount event. When the file system is unmounted, it triggers the deletion of the file system and the extreme performance parameters from the target configuration information, that is, the unmounted file system and its corresponding extreme performance parameters are deleted from the target database.

[0086] In an embodiment of the present application, a file system and extreme performance parameters of the file system are obtained from target configuration information. If the extreme performance parameters of the file system exist in the target configuration information, an open source tool provided by the operating system is called to detect the current performance parameters of the file system during operation, so that the status information of the file system can be analyzed in time to see if it is abnormal. When the file system is mounted, the file system and the corresponding extreme performance parameters are stored in the target configuration information. When the file system is unmounted, the file system and the extreme performance parameters are deleted from the target configuration information. When the file system is mounted, the file system and the corresponding extreme performance parameters are automatically recorded. When the file system is unmounted, the relevant information is automatically deleted from the target configuration information, thereby maintaining the real-time and accuracy of the information in the target configuration information, reducing manual intervention through an automated configuration and update mechanism, and improving the management efficiency of the target configuration information.

[0087] Figure 4 A flowchart of a third embodiment of a method for managing the state of a file system provided by the present application is shown in FIG. Figure 4 As shown in the above Figure 2 Based on the illustrated embodiment, a specific implementation of step S202 is as follows:

[0088] S401: Determine a first ratio between the current read / write times and the maximum read / write times, a second ratio between the minimum read / write duration and the current read / write duration, and a third ratio between the current storage space and the maximum storage space.

[0089] In an embodiment of the present application, after obtaining the extreme performance parameters and current performance parameters of the file system, a first ratio of the current read and write times to the maximum read and write times, a second ratio of the minimum read and write time to the current read and write time, and a third ratio of the current storage space to the maximum storage space are calculated.

[0090] S402: If the first ratio and the second ratio meet the first preset condition, the abnormality type in the status information is determined to be a read-write abnormality, and the characteristic information in the status information is generated according to the current read-write times, the maximum read-write times, the minimum read-write duration, and the current read-write duration; the first preset condition includes: the first ratio is less than or equal to the preset first ratio threshold, and the second ratio is less than or equal to the preset second ratio threshold.

[0091] In an embodiment of the present application, if the first ratio and the second ratio meet the first preset condition, the abnormality type in the status information of the file system is determined to be a read-write abnormality, and the current read-write times, the maximum read-write times, the minimum read-write time, and the current read-write time are generated as characteristic information in the status information of the file system.

[0092] For example, the preset first ratio threshold is 70%, and the preset second ratio threshold is 80%. When the first ratio of the current read and write times to the maximum read and write times is less than or equal to 70%, and the second ratio of the minimum read and write duration to the current read and write duration is less than or equal to 80%, it is determined that the abnormality type in the status information of the file system is a read and write abnormality.

[0093] S403: If the first ratio and the second ratio do not satisfy the first preset condition, but the third ratio satisfies the second preset condition, it is determined that the abnormality type in the status information is a capacity abnormality, and, based on the current storage space and maximum storage space production characteristic information, the second preset condition includes: the third ratio is greater than or equal to a preset third ratio threshold.

[0094] In an embodiment of the present application, if the first ratio and the second ratio do not satisfy the first preset condition, but the third ratio satisfies the second preset condition, it is determined that the abnormality type in the status information of the file system is a capacity abnormality, and characteristic information in the status information of the file system is generated based on the current storage space and the maximum storage space.

[0095] For example, the preset third ratio threshold is 90%, and the third ratio between the current storage space and the maximum storage space is greater than or equal to 90%. However, when the first ratio between the current read and write times and the maximum read and write times is greater than 70% and the second ratio between the minimum read and write time and the current read and write time is greater than 80%, it is determined that the abnormality type in the status information in the file system is a capacity abnormality.

[0096] S404: If the first ratio and the second ratio do not satisfy the first preset condition, and the third ratio does not satisfy the second preset condition, and the returned result is the same as the preset abnormal return result, then the abnormality type in the status information is determined according to the information of the calling interface and the returned result, and the information of the calling interface and the returned result are used as characteristic information in the status information, and the abnormality degree of the read-write abnormality is higher than the abnormality degree of the capacity abnormality.

[0097] In an embodiment of the present application, if the first ratio and the second ratio do not satisfy the first preset condition, and the third ratio does not satisfy the second preset condition, but the return result is the same as the preset exception return result, that is, the return result indicates that the read and write status is an error, then the exception type in the status message is determined based on the information of the calling interface and the return result, for example, by intercepting the return value of the function related to the inline extended reference search, if the return result is that there is no space on the device, then the exception type is determined to be a capacity exception, and the information of the calling interface and the return result are used as characteristic information in the status information.

[0098] In an embodiment of the present application, a first ratio of the current number of read and write times to the maximum number of read and write times, a second ratio of the minimum read and write duration to the current read and write duration, and a third ratio between the current storage space and the maximum storage space are determined, and then, based on whether the first ratio and the second ratio satisfy a first preset condition, it is judged whether it is a read and write abnormality, and based on whether the third ratio satisfies a second preset condition, it is judged whether it is a capacity abnormality, and when the first ratio and the second ratio do not satisfy the first preset condition, and when the third ratio does not satisfy the second preset condition, the capacity abnormality of the file system is judged by intercepting the information of the calling interface and its return structure, and by calculating and monitoring the number of read and write times, the read and write duration, and the storage space utilization, and generating the abnormality type and characteristic information based on the intercepted interface call information and the return result, it is possible to quickly determine the recovery plan of the file system based on the characteristic information, thereby reducing the difficulty and time cost of troubleshooting.

[0099] Figure 5 A flowchart of a fourth embodiment of a file system status management method provided by the present application is shown in FIG. Figure 5 As shown in the above Figure 2 Based on the embodiment shown, the specific implementation method of determining the corresponding first restoration solution according to the characteristic information in step S203 is:

[0100] S501: Calculate a second matching degree between feature information and each reference feature in a preset solution list.

[0101] In an embodiment of the present application, the preset scheme list stores reference features when an abnormality exists in the file system and the corresponding recovery scheme. When it is determined that the status information of the file system is abnormal, the second matching degree between the feature information when the file system is abnormal and each reference feature in the preset scheme list is calculated. For example, the cosine similarity between the feature information when the file system is abnormal and each reference feature in the preset scheme list is calculated as the second matching degree between the feature information and each reference feature in the preset scheme list, or the edit distance between the feature information and each reference feature in the preset scheme list is calculated as the second matching degree.

[0102] S502: Using the restoration solution corresponding to the reference feature with the second highest matching degree in the preset solution list as the first restoration solution for the feature information.

[0103] In the embodiment of the present application, the reference feature with the largest second matching degree is used as the corresponding recovery solution in the preset solution list as the first recovery solution of the feature information. For example, if the feature information is the current storage space and the maximum storage space, the reference feature corresponding to the largest second matching degree is searched according to the feature information, and the corresponding recovery solution in the preset solution list is to use a data reallocation tool to reallocate data blocks, so that the storage space of the file system is evenly distributed, thereby improving the space utilization of the file system.

[0104] When the first recovery plan fails, the following steps are also included:

[0105] When the execution of the first recovery plan fails, a second recovery plan sent by the server is received and the second recovery plan is executed.

[0106] In an embodiment of the present application, when the execution of the first recovery solution fails, the abnormal file system is restored by accepting the second recovery solution sent by the server and then executing the second recovery solution.

[0107] When the second recovery plan is successfully executed, the characteristic information and the second recovery plan are added to the preset plan list, and the second recovery plan is a recovery plan input by the maintenance personnel of the server.

[0108] In an embodiment of the present application, when the second recovery plan is successfully executed, the characteristic information of the file system and the second recovery plan are added to the preset plan list, wherein the second recovery plan is a recovery plan input by the maintenance personnel of the server.

[0109] In the embodiment of the present application, the second matching degree between the characteristic information and each reference feature in the preset solution list is calculated, and the recovery solution corresponding to the reference feature with the largest second matching degree in the preset solution list is used as the first recovery solution of the characteristic information. By automatically matching the recovery solution that best matches the characteristic message, the file system is restored, and the best matching recovery solution can be quickly found, reducing the time for manual search and selection of recovery solutions, thereby improving the recovery efficiency of the file system. When the first recovery solution fails, the second recovery solution sent by the server and input by the maintenance personnel is received. The second recovery solution is used as a backup means. On the basis of improving the recovery efficiency of the file system, the success rate of file system recovery can be further guaranteed. When the second recovery solution is successfully executed, the characteristic information and the second recovery solution are added to the preset solution list, and the preset solution list can be continuously expanded and optimized, so that when encountering similar problems in the future, the system can quickly match the recovery solution, further improving the recovery efficiency, and with the enrichment of the preset solution list, the need for manual intervention can be reduced, and the proportion and accuracy of automated recovery can be improved.

[0110] Figure 6 A flowchart of a fifth embodiment of a method for managing the state of a file system provided by the present application is shown in FIG. Figure 6 As shown, the execution subject of the method is the server, and the method includes the following steps:

[0111] S601: Acquire abnormal messages of each file system from multiple message queues.

[0112] In the embodiment of the present application, when the agent fails to execute the first recovery solution, it generates an exception message of the file system according to the file system identification, characteristic information, exception type and degree of the file system, and writes the exception message to the target message queue, and the server obtains the exception message of each file system from multiple message queues. Optionally, the message queue is a Kafka message queue.

[0113] S602: Each abnormal message is stored in a database, and when the abnormal type and abnormal degree in the abnormal message meet the prompt condition, a prompt message is generated, where the prompt condition includes: the abnormal type is the target abnormal type and / or the abnormal degree is greater than or equal to the preset abnormal degree.

[0114] In the embodiment of the present application, the server stores the received abnormal messages of each file system in a database, and generates a prompt message when the abnormal type and abnormal degree in the abnormal message meet the prompt condition. The prompt condition includes: the abnormal type is the target abnormal type or the abnormal degree is greater than or equal to the preset abnormal degree.

[0115] For example, when the exception message is: file system ID: FS001, exception type: insufficient disk space, disk usage reaches 90%, and exception level: severe, when the server receives the exception message of the file system, it determines the exception type. If insufficient disk space is the target exception type, the server stores the exception message in the database and generates a prompt message based on the exception message.

[0116] S603: Send the prompt information to the target maintainer, and display the abnormal messages of each file system.

[0117] In an embodiment of the present application, a prompt message is sent to the target maintenance personnel, and the abnormal messages of each file system are displayed. For example, the prompt message can be sent to the target maintenance personnel by email, text message, etc.; by providing a web-based graphical interface, the target maintenance personnel are allowed to view the abnormal messages of all file systems, which can achieve comprehensive monitoring of all abnormal messages and provide overall system stability. And the number of abnormalities in the file system can be counted according to the time dimension, so that the target maintenance personnel can identify the laws and trends of abnormal occurrence, analyze which time periods are abnormal high-incidence periods, and thus strengthen monitoring and preventive measures during these time periods.

[0118] In an embodiment of the present application, the abnormal messages of each file system are obtained from multiple message queues, and then each abnormal message is stored in a database, which is convenient for subsequent query and analysis, and helps to summarize experience and optimize operation and maintenance strategies. When the abnormal type and degree of abnormality in the abnormal message meet the prompt conditions, a prompt message is generated, and finally the prompt message is sent to the target maintainer to ensure that only important abnormal information is sent to the target maintainer, avoiding information overload, so that the maintenance personnel can focus on handling key issues, and at the same time display the abnormal messages of each file system. The graphical interface makes the abnormal messages and statistical data clear at a glance, which helps the target maintenance personnel to quickly locate the problem and take corresponding countermeasures to improve operation and maintenance efficiency and service quality.

[0119] Figure 7 A flowchart of a sixth embodiment of a method for managing the state of a file system provided by the present application is shown in FIG. Figure 6 As shown in the above Figure 7 Based on the illustrated embodiment, a specific implementation of step S601 is as follows:

[0120] S701: Determine the priority of each message queue according to the abnormality type and abnormality degree of each message queue.

[0121] In an embodiment of the present application, when abnormal messages of each file system are obtained from multiple message queues, the priority of each message queue can be determined according to the abnormal type and degree of abnormality of each message queue. For example, the priority can be determined first according to the abnormal type in the abnormal message transmitted in the message queue, such as determining abnormal types such as insufficient disk space and network terminal as high priority, and non-critical abnormal types such as file performance degradation and log errors as low priority, and then the same abnormal type is prioritized according to the degree of abnormality, that is, when the abnormal type is insufficient disk space, the priority is further subdivided according to the degree of abnormality, for example, a disk space usage rate exceeding 90% is regarded as a severe abnormality, and its priority is higher than a medium abnormality of a disk space usage rate exceeding 80% but not reaching 90%.

[0122] Determine the message queue priority based on the degree of abnormality.

[0123] S702: Acquire abnormal information of each file system from multiple message queues according to the priority of each message queue.

[0124] In an embodiment of the present application, the exception messages of each file system are obtained from multiple message queues according to the priority of each message queue. The exception information of each file system in the message queue whose exception type is insufficient disk space and whose degree of exception is severe can be obtained first, and then the exception messages of each file system in the message queue whose exception type is insufficient disk space but whose degree of exception is medium can be obtained.

[0125] In an embodiment of the present application, the priority of each message queue is determined according to the exception type and degree of each message queue, and then the exception information of each file system is obtained from multiple message queues according to the priority of each message queue. By giving priority to high-priority exception messages, the response time of key issues is shortened. By giving priority to high-priority exception messages, operation and maintenance personnel can reduce the time spent on handling non-critical exceptions, improve operation and maintenance efficiency, and improve the stability and reliability of the entire system.

[0126] Figure 8 A flowchart of a seventh embodiment of a method for managing the state of a file system provided by the present application is shown in FIG. Figure 7 As shown in the above Figure 6 Based on the embodiment shown, a specific implementation method of sending the prompt information to the target maintainer in step S603 is:

[0127] S801: Extract target maintainer information from the exception message.

[0128] In the embodiment of the present application, the abnormal message contains the target maintainer information corresponding to the abnormal type, and the target maintainer information is extracted from the abnormal message. For example, the target maintainer information in the abnormal message is: the target maintainer name, the target maintainer email address and the target maintainer phone number.

[0129] S802: Send prompt information to the target maintainer according to the target maintainer information.

[0130] In the embodiment of the present application, according to the target maintainer information, the prompt information can be sent to the target maintainer via the target maintainer's email address, or the prompt information can be sent to the target maintainer via SMS.

[0131] In an embodiment of the present application, by directly extracting the target maintainer information from the exception message, and then sending the prompt information to the target maintainer based on the target maintainer information, omissions or errors that may occur when the prompt information of the exception message is manually transmitted are avoided, the accuracy of information transmission is guaranteed, and the prompt information of the exception message is directly sent to the target maintainer, which reduces the intermediate links of information transmission and improves the response speed of exception processing.

[0132] Fig. 9 A signaling flow chart of a file system status management method provided in an embodiment of the present application, such as Fig. 9 As shown, the method includes:

[0133] S901: The agent obtains the limit performance parameters and current performance parameters of the file system.

[0134] S902: The agent determines the status information of the file system according to the limit performance parameters and current performance parameters of the file system and the return result of the calling interface of the file system.

[0135] S903: When the indication information indicates that the file system is abnormal, the agent determines a corresponding first recovery plan according to the characteristic information and executes the first recovery plan.

[0136] S904: When the agent fails to execute the first recovery solution, it generates an abnormal message of the file system according to the file system identification, characteristic information, abnormal type and abnormal degree of the file system, and sends it to the server through the message queue.

[0137] S905: The server stores each abnormal message in a database, and generates a prompt message when the abnormal type and abnormal degree in the abnormal message meet the prompt condition. The prompt condition includes: the abnormal type is the target abnormal type and / or the abnormal degree is greater than or equal to the preset abnormal degree.

[0138] S906: The agent sends a prompt message to the target maintainer and displays the abnormal message of each file system.

[0139] In an embodiment of the present application, the agent obtains the extreme performance parameters and current performance parameters of the file system, and determines the status information of the file system based on the extreme performance parameters and current performance parameters of the file system and the return result of the calling interface of the file system. When the indication information indicates that there is an abnormality in the file system, the agent determines the corresponding first recovery plan based on the characteristic information and executes the first recovery plan. When the agent fails to execute the first recovery plan, the agent generates an abnormal message of the file system based on the file system identification, characteristic information, abnormality type and abnormality degree of the file system, and writes the abnormal message to the target message queue. The server obtains the abnormal message of each file system from multiple message queues, stores each abnormal message in a database, and generates a prompt message when the abnormality type and abnormality degree in the abnormal message meet the prompt condition. The prompt condition includes: the abnormality type is the target abnormality type and / or the abnormality degree is greater than or equal to the preset abnormality degree. The agent sends the prompt message to the target maintainer and displays the abnormal message of each file system. The agent end of the file system of this embodiment obtains the extreme performance parameters and current performance parameters of the file system, and then determines the status information of the file system according to the current performance parameters and the extreme performance parameters of the file system. When the status information of the file system is abnormal, the pre-stored recovery plan is first called to immediately recover it, thereby improving the recovery efficiency of the file system. And when the execution of the recovery plan fails, a prompt message is generated by the abnormal message of the file system and sent to the server end through the message queue. The server end will display the abnormal information of the file system according to the prompt message and send it to the corresponding target maintenance personnel, reminding the target maintenance personnel to repair it, thereby further improving the recovery efficiency of the file system and avoiding the loss or damage of data in the file system.

[0140] Fig.10 The schematic diagram of the structure of a proxy end of a file system provided by the embodiment of the present application. The schematic diagram of the structure of a proxy end of a file system provided by the present application includes: an acquisition module 1001 and a processing module 1002; wherein,

[0141] The acquisition module 1001 is used to acquire the extreme performance parameters and current performance parameters of the file system, the extreme performance parameters include at least one of the following: the maximum number of read and write times that can be completed within a unit time, the minimum read and write time per unit data volume, or the maximum storage space, and the current performance parameters include at least one of the following: the current number of read and write times that can be completed within a unit time, the current read and write time per unit data volume, or the current storage space; the processing module 1002 is used to determine the status information of the file system according to the extreme performance parameters and current performance parameters of the file system and the return result of the calling interface of the file system, the status information including: indication information indicating whether the file system is abnormal, and, when the indication information indicates that the file system is abnormal, characteristic information, abnormality type, and abnormality degree; the processing module 1002 is also used to determine the corresponding first recovery plan according to the characteristic information when the indication information indicates that the file system is abnormal, and execute the first recovery plan; the processing module 1002 is also used to generate an abnormal message of the file system according to the file system identifier, characteristic information, abnormality type, and abnormality degree of the file system when the execution of the first recovery plan fails, and write the abnormal message into the target message queue.

[0142] Fig.11 A schematic diagram of a server structure provided in an embodiment of the present application. A schematic diagram of a server structure provided in the present application includes: an acquisition module 1101 and a processing module 1102; wherein,

[0143] The acquisition module 1101 is used to obtain the abnormal messages of each file system from multiple message queues; the processing module 1102 is used to store each abnormal message in a database, and generate prompt information when the abnormal type and abnormal degree in the abnormal message meet the prompt conditions, and the prompt conditions include: the abnormal type is the target abnormal type and / or the abnormal degree is greater than or equal to the preset abnormal degree; the processing module 1102 is also used to send the prompt information to the target maintainer and display the abnormal messages of each file system.

[0144] Fig.12 An electronic device provided in an embodiment of the present application includes: at least one processor 1201 and a memory 1202 . The processor 1201 and the memory 1202 are connected via a bus 1203 .

[0145] The specific implementation process of the processor 1201 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0146] In the above Fig.12In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0147] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0148] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0149] Fig.13 A state management system of a file system provided in an embodiment of the present application, such as Fig.13 As shown, it includes: at least one agent 1301 and a server 1302, each agent 1301 corresponds to a file system, and the agent is used to execute Figures 2 to 5 Any method, the server is used to execute Figures 6 to 8 Any of the methods.

[0150] The present application also provides a computer-readable storage medium on which computer execution instructions are stored. When a processor executes the computer execution instructions, a file system status management method as described above is implemented.

[0151] The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The computer-readable storage medium may be any available medium that can be accessed by a general or special purpose computer.

[0152] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0153] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0154] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0155] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0156] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, 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 for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0157] The present application also provides a computer program product, including a computer program, which is used to implement the above-mentioned file system status management method when the computer program is executed by a processor.

[0158] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0159] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0160] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0161] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0162] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0163] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for 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 various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0164] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0165] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0166] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for managing the state of a file system, characterized in that: Applied to the agent end of the file system, the method comprises: Acquire the limit performance parameter and current performance parameter of the file system, wherein the limit performance parameter includes at least one of the following: the maximum number of read and write times that can be completed within a unit time, the minimum read and write time per unit data volume, or the maximum storage space, and the current performance parameter includes at least one of the following: the current number of read and write times that can be completed within the unit time, the current read and write time per unit data volume, or the current storage space; Determine, according to the limit performance parameter of the file system and the current performance parameter, and the return result of the calling interface of the file system, the state information of the file system, wherein the state information includes: indication information indicating whether the file system is abnormal, and, when the indication information indicates that the file system is abnormal, characteristic information, abnormality type, and abnormality degree; When the indication information indicates that the file system is abnormal, determining a corresponding first recovery plan according to the characteristic information, and executing the first recovery plan; When the execution of the first recovery solution fails, an exception message of the file system is generated according to the file system identifier of the file system, the characteristic information, the exception type and the exception degree, and the exception message is written into a target message queue.

2. The method according to claim 1, characterized in that The state information also includes: an exception type, and the writing of the exception message into the target message queue includes: A target message queue corresponding to the exception type is determined from multiple message queues, and the exception message is written into the target message queue.

3. The method according to claim 2, characterized in that The determining of a target message queue corresponding to the exception type from a plurality of message queues includes: If the exception type does not exist in the exception type corresponding to at least one message queue, matching the degree of exception in the state information with the degree of exception of the exception type of the message queue to obtain a first matching degree; The message queue with the largest first matching degree is used as the target message queue.

4. The method according to any one of claims 1 to 3, characterized in that The obtaining of the limit performance parameter and the current performance parameter of the file system includes: Acquire the file system and the extreme performance parameters of the file system from the target configuration information; If the target configuration information contains the limit performance parameters of the file system, calling an open source tool provided by the operating system to detect the current performance parameters of the file system during operation; The method further comprises: When the file system is mounted, storing the file system and the corresponding extreme performance parameters in the target configuration information; When the file system is unmounted, the file system and the limit performance parameter are deleted from the target configuration information.

5. The method according to any one of claims 1 to 3, characterized in that The determining the status information of the file system according to the limit performance parameter of the file system and the current performance parameter, and the return result of the calling interface of the file system, includes: Determine a first ratio of the current read / write times to the maximum read / write times, a second ratio of the minimum read / write duration to the current read / write duration, and a third ratio of the current storage space to the maximum storage space; If the first ratio and the second ratio meet a first preset condition, it is determined that the abnormality type in the state information is a read-write abnormality, and the characteristic information in the state information is generated according to the current read-write times, the maximum read-write times, the minimum read-write duration, and the current read-write duration; the first preset condition includes: the first ratio is less than or equal to a preset first ratio threshold, and the second ratio is less than or equal to a preset second ratio threshold; If the first ratio and the second ratio do not satisfy the first preset condition, but the third ratio satisfies the second preset condition, determining that the abnormality type in the status information is a capacity abnormality, and generating the characteristic information according to the current storage space and the maximum storage space, the second preset condition includes: the third ratio is greater than or equal to a preset third ratio threshold; If the first ratio and the second ratio do not satisfy the first preset condition, and the third ratio does not satisfy the second preset condition, and the returned result is the same as the preset abnormal return result, then the abnormality type in the status information is determined according to the information of the calling interface and the returned result, and the information of the calling interface and the returned result are used as characteristic information in the status information, and the abnormality degree of the read-write abnormality is higher than the abnormality degree of the capacity abnormality.

6. The method according to any one of claims 1 to 3, characterized in that The determining a corresponding first restoration solution according to the characteristic information includes: Calculating a second matching degree between the feature information and each reference feature in the preset solution list; The recovery solution corresponding to the reference feature with the second largest matching degree in the preset solution list is used as the first recovery solution for the feature information.

7. The method according to claim 6, characterized in that The method further comprises: When the execution of the first recovery plan fails, receiving a second recovery plan sent by the server, and executing the second recovery plan; When the second recovery plan is successfully executed, the characteristic information and the second recovery plan are added to the preset plan list, and the second recovery plan is a recovery plan input by the maintenance personnel of the server.

8. The method according to any one of claims 1 to 3, characterized in that Also includes: The operating environment information of the file system and the target maintainer information corresponding to the exception type are added to the exception message.

9. A method for managing the state of a file system, characterized in that: Applied to the server, the method includes: Get exception messages of each file system from multiple message queues; Each of the abnormal messages is stored in a database, and when the abnormal type and abnormal degree in the abnormal message meet the prompt condition, a prompt message is generated, wherein the prompt condition includes: the abnormal type is a target abnormal type and / or the abnormal degree is greater than or equal to a preset abnormal degree; The prompt information is sent to a target maintainer, and the abnormal message of each file system is displayed.

10. The method according to claim 9, characterized in that The obtaining of abnormal messages of each file system from the plurality of message queues includes: Determining the priority of each message queue according to the abnormality type and abnormality degree of each message queue; The abnormal information of each file system is obtained from the multiple message queues according to the priority of each message queue.

11. The method according to claim 9, characterized in that The sending the prompt information to the target maintainer includes: Extracting target maintainer information from the abnormal message; The prompt information is sent to the target maintainer according to the target maintainer information.

12. A file system agent, characterized in that: include: an acquisition module, configured to acquire a limit performance parameter and a current performance parameter of the file system, wherein the limit performance parameter includes at least one of the following: a maximum number of read and write operations that can be completed within a unit time, a minimum read and write operation time per unit data volume, or a maximum storage space, and the current performance parameter includes at least one of the following: a current number of read and write operations that can be completed within the unit time, a current read and write operation time per unit data volume, or a current storage space; a processing module, configured to determine, according to the limit performance parameter of the file system and the current performance parameter, and a return result of the calling interface of the file system, the status information of the file system, wherein the status information includes: indication information indicating whether the file system is abnormal, and, when the indication information indicates that the file system is abnormal, characteristic information, abnormality type, and abnormality degree; The processing module is further configured to determine a corresponding first recovery plan according to the characteristic information and execute the first recovery plan when the indication information indicates that the file system is abnormal; The processing module is further configured to generate an exception message of the file system according to the file system identifier, the feature information, the exception type and the exception degree of the file system when the execution of the first recovery solution fails, and write the exception message into a target message queue.

13. A server, characterized in that: include: An acquisition module is used to obtain abnormal messages of each file system from multiple message queues; A processing module, used to store each of the abnormal messages in a database, and generate prompt information when the abnormal type and abnormal degree in the abnormal message meet the prompt condition, wherein the prompt condition includes: the abnormal type is a target abnormal type and / or the abnormal degree is greater than or equal to a preset abnormal degree; The processing module is further configured to send the prompt information to a target maintainer and display the abnormal message of each file system.

14. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8, or the method according to any one of claims 9 to 11.

15. A state management system for a file system, characterized in that: include: At least one agent and a server, each of the agent corresponds to a file system, the agent is used to execute the method described in any one of claims 1 to 8, and the server is used to execute the method described in any one of claims 9 to 11.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method according to any one of claims 1 to 8, or the method according to any one of claims 9 to 11.

17. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8, or the method according to any one of claims 9 to 11.

Citation Information

Patent Citations

  • Payment system message control and processing method and device

    CN106970846A

  • A file system repair method and apparatus

    CN109086171A

  • System behavior testing method and device, equipment and storage medium

    CN115964239A

  • System abnormal information monitoring analysis method and device, equipment and storage medium

    CN117648206A

  • Distributed file system logging

    US20110040811A1