CN110750411B - Method and device for monitoring, early warning and repairing file index node - Google Patents

Method and device for monitoring, early warning and repairing file index node Download PDF

Info

Publication number
CN110750411B
CN110750411B CN201910787814.7A CN201910787814A CN110750411B CN 110750411 B CN110750411 B CN 110750411B CN 201910787814 A CN201910787814 A CN 201910787814A CN 110750411 B CN110750411 B CN 110750411B
Authority
CN
China
Prior art keywords
monitoring
partition
change
early warning
threshold
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.)
Active
Application number
CN201910787814.7A
Other languages
Chinese (zh)
Other versions
CN110750411A (en
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.)
Shanghai Sunmi Technology Group Co Ltd
Original Assignee
Shanghai Sunmi Technology Group 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 Shanghai Sunmi Technology Group Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN201910787814.7A priority Critical patent/CN110750411B/en
Publication of CN110750411A publication Critical patent/CN110750411A/en
Application granted granted Critical
Publication of CN110750411B publication Critical patent/CN110750411B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • 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/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for monitoring, early warning and repairing a file index node, wherein the method comprises the following steps: when creating a file or writing data, if a mounting point of the file or the data monitors a partition, monitoring the change percentage of an available index node and the change percentage of a residual space in the partition; limiting creation of files or writing of data if the percentage of change of available inodes or the percentage of change of remaining space within the partition exceeds a change threshold; monitoring the number of index nodes in the partition; and if the index node occupation ratio in the monitoring partition exceeds the early warning threshold, repairing the application of which the index node occupation ratio is ordered to exceed the ordering threshold, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold. According to the invention, the number of the index nodes is monitored and early-warned, and cleaning and repairing are carried out after the number exceeds the early-warning, so that the problem that the file system fails due to the fact that the index nodes are used up is solved.

Description

Method and device for monitoring, early warning and repairing file index node
Technical Field
The embodiment of the invention relates to the field of file management of a Linux operating system, in particular to a method and a device for monitoring, early warning and repairing file index nodes.
Background
Along with the continuous popularization of intelligent terminals, a strong and stable file system is particularly important, particularly for a Linux-based operating system, a large amount of files can be read and written when equipment is started, and once the file system fails, the file system is extremely easy to cause incapability of starting or incapability of entering the system after being restarted continuously.
In Linux-based operating systems, the possible causes of file system failures are roughly: the partition space is severely insufficient, or the file inodes are exhausted. Because the number of files that can be used in a file system (the number of corresponding file inodes) is limited, when the storage device is formatted, the operating system may allocate an Inode area separately for storing information contained in the file inodes, and in the Linux operating system, one file or folder is one Inode. The file index node mainly stores metadata such as creator, date, size and the like of the file, each file is created to occupy one index node, when a large number of files are created, the total number of the file index nodes is exhausted, and therefore a large amount of residual disk space exists in the partition, but new files cannot be built because the index nodes are exhausted.
It should be noted that the foregoing description of the background art is only for the purpose of providing a clear and complete description of the technical solution of the present invention and is presented for the convenience of understanding by those skilled in the art. The above-described solutions are not considered to be known to the person skilled in the art simply because they are set forth in the background of the invention section.
Disclosure of Invention
Aiming at the problems, the embodiment of the invention aims to provide a method and a device for monitoring, early warning and repairing file index nodes, which aim to solve the problem that a file system fails due to the fact that the file index nodes are used up, and the method and the device for monitoring, early warning and repairing the number of the file index nodes are introduced, and cleaning and repairing are carried out after the number of the file index nodes exceeds the early warning.
In order to achieve the above objective, an embodiment of the present invention provides a method for monitoring, early warning and repairing a file inode, including: when creating a file or writing data, if a mounting point of the file or the data monitors a partition, monitoring the change percentage of an available index node and the change percentage of a residual space in the partition; limiting creation of files or writing of data if the percentage of change of available inodes or the percentage of change of remaining space within the partition exceeds a change threshold; monitoring the number of index nodes in the partition; and if the index node occupation ratio in the monitoring partition exceeds the early warning threshold, repairing the application of which the index node occupation ratio is ordered to exceed the ordering threshold, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
Further, a first change threshold value and a second change threshold value are preset, wherein the first change threshold value is smaller than the second change threshold value; if the change percentage of the available index nodes or the change percentage of the residual space in the monitoring partition does not exceed or equal to a first change threshold value, no processing is needed; if the change percentage of the remaining available index nodes or the change percentage of the remaining space in the monitoring partition exceeds a first change threshold value but does not exceed a second change threshold value, limiting the creation of files or the writing of data by the common application, and not limiting the creation of files or the writing of data by the system application; if the change percentage of the available index nodes or the change percentage of the residual space in the monitoring partition exceeds a second change threshold value, all applications are restricted from creating files or writing data.
Further, the number of files in the monitoring partition is scanned, and the number of index nodes occupied by each application is obtained according to the packet name and the scanning result; and calculating the occupation ratio of the index nodes of each application according to the total number of the index nodes in the monitoring partition and the acquired number of the index nodes of each application, and sequencing the applications according to the occupation ratio.
Further, a safety threshold and an early warning threshold of the index node occupation ratio in the monitoring partition are preset; if the occupation ratio of the index nodes in the monitoring partition does not exceed the safety state threshold, the index nodes are in a safety state; if the occupation ratio of the index nodes in the monitoring partition exceeds the safety state and does not exceed the early warning threshold value, recommending that the index nodes occupy more applications for the early warning state by sending a reminding message to the user, so that the user repairs the recommended applications according to the problems in the reminding message; if the occupation ratio of the index nodes in the monitoring partition exceeds the early warning threshold, repairing the application of which the occupation ratio of the index nodes exceeds the sequencing threshold in a dangerous state so that the occupation ratio of the index nodes in the partition is smaller than the safety threshold.
In order to achieve the above objective, the embodiment of the present invention further provides a device for monitoring, early warning and repairing a file inode, including: the monitoring module is used for monitoring the change percentage of the available index nodes and the change percentage of the residual space in the partition if the mounting point of the file or the data monitors the partition when the file or the data is created, and limiting the creation of the file or the data is written if the change percentage of the available index nodes or the change percentage of the residual space in the partition exceeds a change threshold; the scanning module is used for monitoring the number of index nodes in the partition; the early warning module is used for sending a repair notification to the repair module when the index node occupation ratio in the monitoring partition exceeds an early warning threshold value; and the repair module is used for repairing the application with the index node occupation ratio sequencing exceeding the sequencing threshold according to the repair notification, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
As can be seen from the above, the method and the device for monitoring, early warning and repairing the index node of the file provided by the embodiment of the invention actively monitor the index node in the partition. When the system creates or deletes the file, the number state of the index nodes is obtained in real time. And scanning all application data, sequencing the applications in the scanning result according to the index node occupation ratio, and intelligently recommending the applications to be processed to the user, so that the index node occupation ratio in the monitoring partition is smaller than a safety threshold. The application layer may also automatically repair if the user is not processing. Therefore, the problem that the power-on cannot be performed due to the fact that the index node is used up can be effectively prevented.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described one by one, it being obvious that the drawings in the description below are some embodiments of the invention, and that other drawings can be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for monitoring, early warning and repairing a file inode according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a safety state, an early warning state and a dangerous state according to an embodiment of the present invention.
Fig. 3 is a schematic block diagram of a device for monitoring, early warning and repairing a file inode according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, based on the embodiments of the invention, which are apparent to those of ordinary skill in the art without inventive faculty, are intended to be within the scope of the invention. Furthermore, as used in the embodiments of the invention 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.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to make the person skilled in the art better understand the solution of the present invention, the technical solution of the embodiment of the present invention will be clearly and completely described below with reference to the accompanying drawings.
The embodiment of the invention provides a method for monitoring, early warning and repairing a file index node. As shown in fig. 1, the method comprises the steps of:
step S101, when creating a file or writing data, if a mounting point of the file or the data monitors a partition, monitoring the change percentage of the available index nodes and the change percentage of the residual space of the partition.
In this step, linux VFS (virtual machine file system) is an abstraction layer that provides a unified file access interface upwards, while downwards is compatible with various different file systems. At the Linux VFS layer, when a user creates a file and writes data, it is checked whether the mount point of the file or data is in the partition to be monitored:
if the mounting point of the file or the data is not in the monitoring partition, no processing is needed;
if the mounting point of the file or the data monitors the partition, monitoring the change percentage of the available index nodes and the change percentage of the residual space of the partition.
In a specific embodiment, the total number of index nodes and the total size of space of the monitoring partition can be obtained through an API (Application Programming Interface ), the number of remaining index nodes and the size of remaining space are obtained in real time, and the change percentage of the available index nodes and the change percentage of the remaining space are calculated according to the number of remaining index nodes and the size of remaining space of the monitoring partition and the total number of index nodes and the total size of space.
In the embodiment of the invention, the change percentage of the available index nodes and the change percentage of the residual space are used as judgment bases, so that the index nodes in the partition can be more effectively prevented from being used up and the space can be more effectively prevented from being used up.
Step S102, if the change percentage of the available index nodes and the change percentage of the residual space of the monitoring partition exceed the change threshold, the creation of files or the writing of data is limited.
In this step, a change threshold of the change percentage of the available index node or the remaining space is set in advance, for example, the change threshold is set to 1%. If the change percentage of the available index nodes or the residual space of the partition does not exceed the change threshold value, updating the record value; if the change percentage of the available index nodes or the residual space of the partition exceeds the change threshold value, reporting is performed, for example, a message is sent to a monitoring service through a Netlink.
To prevent inodes or remaining space from running out, resulting in the listening service being abnormally terminated from being unusable, it is necessary to limit creation of files or writing of data.
Specifically, if the change percentage of the available index node or the residual space is greater than or equal to a first change threshold value, no processing is needed;
if the change percentage of the remaining available index nodes or the change percentage of the remaining space is smaller than the first change threshold value and larger than or equal to the second change threshold value, limiting the common application to create files or write data, but not limiting the system application to create files or write data;
if the percentage of change of the available inodes or the percentage of change of the remaining space is less than a second change threshold, all applications are restricted from creating files or writing data.
Among them, the general application and the system application can be distinguished according to EUID (effective user ID).
The first change threshold is smaller than the second change threshold, for example, the first change threshold is 2%, and the second change threshold is 1%, but may be other values, which is not limited in the present invention.
Step S103, monitoring the number of index nodes in the partition.
In this step, the number of index nodes of each application in the listening partition may be obtained by scanning. The number of index nodes is increased by one every time a file is created, so that the number of files and the number of index nodes can be in one-to-one correspondence. For example, the number of files under the directory is scanned, and the folders under the directory are named by the system apk package name, so that the total number of files created by each application can be known according to the scanning result, and the number of index nodes occupied by each application is obtained.
Further, the index node occupation ratio of each application is calculated according to the obtained index node number of each application, and the applications are ordered according to the occupation ratio.
And step S104, if the index node occupation ratio of the monitoring partition exceeds the early warning threshold, repairing the application of which the index node occupation ratio is ordered to exceed the ordering threshold so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
In this step, the number of index nodes in the partition may include three states: safety, early warning and dangerous conditions, as shown in fig. 2.
Correspondingly, a safety threshold and an early warning threshold of the index node occupation ratio are preset.
If the occupation ratio of the index nodes in the monitoring partition does not exceed the safety state threshold, for example, the occupation ratio of the index nodes does not exceed 85%, the monitoring partition is in a safety state, and no processing is needed at the moment;
if the index node occupation ratio in the monitoring partition exceeds the safety state and does not exceed the early warning threshold, for example, the index node occupation ratio exceeds 85% and does not exceed 95%, the monitoring partition is in the early warning state. And sending a reminding message, such as a pop-up dialog box, to the user to remind the user, wherein the recommended index node occupies more applications, so that the user can repair the applications according to the problems in the dialog box, such as selecting manual cleaning, and the user can choose to ignore the problems in the dialog box and not process the problems.
If the index node occupation ratio in the monitoring partition exceeds the early warning threshold, for example, the index node occupation ratio exceeds 95%, the monitoring partition is in a dangerous state. And repairing the application of which the index node occupation ratio is greater than the ordering threshold, for example repairing the application of which the index node occupation ratio in the monitoring partition is greater than the first ten in order, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
According to the method for monitoring, early warning and repairing the file index nodes, the index nodes in the partition are actively monitored. When the system creates or deletes the file, the number state of the index nodes is obtained in real time. And scanning all application data, sequencing the applications in the scanning result according to the index node occupation ratio, and intelligently recommending the applications to be processed to the user, so that the index node occupation ratio in the monitoring partition is smaller than a safety threshold. The application layer may also automatically repair if the user is not processing. Therefore, the problem that the power-on cannot be performed due to the fact that the index node is used up can be effectively prevented. For terminals with frequent user interaction like mobile phones, users can find problems early and judge according to intelligent recommendation, and for unattended commercial terminal equipment, the terminal can be repaired automatically under the condition of reaching the limit. Although the negative result of deleting the user data by mistake can be brought, the serious result brought by the fact that the equipment cannot be started can be prevented very effectively.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 1, the present invention provides an embodiment of a device for monitoring, early warning and repairing a file inode, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 1. As shown in fig. 3, a device for monitoring, early warning and repairing a file index node provided by an embodiment of the present invention includes:
the monitoring module 31 monitors the change percentage of the available index nodes and the change percentage of the residual space of the partition if the mounting point of the file or the data monitors the partition when the file or the written data is created, and limits the creation of the file or the written data if the change percentage of the available index nodes and the change percentage of the residual space of the monitoring partition exceed a change threshold;
the scanning module 32 monitors the number of index nodes in the partition;
the early warning module 33 is configured to notify the repair module 34 when the index node occupancy ratio of the monitoring partition exceeds an early warning threshold;
and the repairing module 34 is configured to repair an application whose index node occupancy rate is ranked above the ranking threshold, so that the index node occupancy rate in the listening area is less than the safety threshold.
The monitoring module is specifically used for: when a user creates a file and writes data, checking whether a mounting point of the file or the data is in a partition to be monitored, if the mounting point of the file or the data is not in the partition to be monitored, no processing is needed, and if the mounting point of the file or the data is in the partition to be monitored, the change percentage of an available index node and the change percentage of a residual space of the partition are monitored; when the change percentage of the available index nodes or the change percentage of the residual space of the monitoring partition is smaller than the first change threshold value and larger than or equal to the second change threshold value, the common application is limited to create files or write data, but the system application is not limited to create files or write data; when the change percentage of the available index nodes or the change percentage of the residual space of the monitoring partition is smaller than a second change threshold value, limiting all applications to create files or write data; wherein the first variation threshold is smaller than the second variation threshold.
The scanning module is specifically used for: scanning the number of files in the monitoring partition, and acquiring the number of index nodes occupied by each application according to the packet name and the scanning result; according to the total number of index nodes in the monitoring partition and the acquired number of index nodes of each application, calculating the index node occupation ratio of each application, and sequencing the applications according to the occupation ratio; and outputting the occupation ratio and the ordering of each application index node to the early warning module.
The early warning module is specifically used for: if the occupation ratio of index nodes in the partition does not exceed the safety state threshold, the index nodes are in a safety state, and processing is not needed; if the index node occupation ratio in the partition exceeds the safety state and does not exceed the early warning threshold value, a dialog box pops up for reminding a user in the early warning state, so that the user can repair the application according to the problems in the dialog box, and the user can choose to ignore and not process the application; if the index node occupation ratio in the partition exceeds the early warning threshold, the index node occupation ratio is in a dangerous state, and the index node occupation ratio is sequenced to be more than the application packet name of the sequencing threshold in a broadcasting mode, and the application packet name is transmitted to the repair module in a parameter mode.
The repair module is specifically used for: when a repair message of the early warning module is received, executing a data cleaning action on the corresponding application according to the application packet name carried in the repair message, for example, repairing the application by calling a cleaning application data interface of the Android system, so that the occupation ratio of index nodes in the partition is smaller than a safety threshold.
The specific technical details of the device for monitoring, early warning and repairing the file inode are similar to those of the method for monitoring, early warning and repairing the file inode, and the technical effects achieved in the embodiment of the device for monitoring, early warning and repairing the file inode can be achieved in the embodiment of the method for monitoring, early warning and repairing the file inode, so that repetition is reduced and redundant description is omitted. Accordingly, the related technical details mentioned in the embodiment of the device for monitoring, early warning and repairing the file inode can also be applied to the embodiment of the method for monitoring, early warning and repairing the file inode.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are referred to each other, and each embodiment is mainly described as different from other embodiments.
Finally, it should be noted that: the foregoing description of various embodiments of the invention has been presented to those skilled in the art for the purposes of illustration. It is not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. As described above, various alternatives and variations of the present invention will be apparent to those skilled in the art. Thus, while some alternative embodiments have been specifically discussed, other embodiments will be apparent or relatively readily available to those skilled in the art. The present invention is intended to embrace all alternatives, modifications, and variations of the present invention that have been discussed herein and other embodiments that fall within the spirit and scope of the above-described application.

Claims (10)

1. The method for monitoring, early warning and repairing the file index node is characterized by comprising the following steps:
when creating a file or writing data, if a mounting point of the file or the data monitors a partition, monitoring the change percentage of an available index node and the change percentage of a residual space in the partition;
limiting creation of files or writing of data if the percentage of change of available inodes or the percentage of change of remaining space within the partition exceeds a change threshold;
monitoring the number of index nodes in the partition;
and if the index node occupation ratio in the monitoring partition exceeds the early warning threshold, repairing the application of which the index node occupation ratio is ordered to exceed the ordering threshold, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
2. The method for monitoring, early warning and repairing a file inode according to claim 1, wherein when creating a file or writing data, if a mounting point of the file or data monitors a partition, monitoring a change percentage of an available inode and a change percentage of a remaining space in the partition specifically comprises:
presetting a first change threshold and a second change threshold, wherein the first change threshold is smaller than the second change threshold;
if the change percentage of the available index nodes or the change percentage of the residual space in the monitoring partition does not exceed a first change threshold value, no processing is needed; or (b)
If the change percentage of the remaining available index nodes or the change percentage of the remaining space in the monitoring partition exceeds a first change threshold value but does not exceed a second change threshold value, limiting the creation of files or the writing of data by the common application, and not limiting the creation of files or the writing of data by the system application; or (b)
If the change percentage of the available index nodes or the change percentage of the residual space in the monitoring partition exceeds a second change threshold value, all applications are restricted from creating files or writing data.
3. The method for monitoring, early warning and repairing file index nodes according to claim 1, wherein the monitoring the number of index nodes in the partition specifically comprises:
scanning the number of files in the monitoring partition, and acquiring the number of index nodes occupied by each application according to the packet name and the scanning result;
and calculating the occupation ratio of the index nodes of each application according to the total number of the index nodes in the monitoring partition and the acquired number of the index nodes of each application, and sequencing the applications according to the occupation ratio.
4. The method for monitoring, early warning and repairing file index nodes according to claim 3, wherein if the index node occupancy ratio in the monitoring partition exceeds an early warning threshold, repairing the application of which the index node occupancy ratio is ranked above a ranking threshold so that the index node occupancy ratio in the monitoring partition is smaller than a safety threshold, specifically comprising:
presetting a safety threshold and an early warning threshold for the occupation ratio of index nodes in a monitoring partition;
if the occupation ratio of the index nodes in the monitoring partition does not exceed the safety threshold, the index nodes are in a safety state;
if the occupancy ratio of the index nodes in the monitoring partition exceeds the safety threshold value and does not exceed the early warning threshold value, the monitoring partition is in an early warning state;
and if the occupancy ratio of the index nodes in the monitoring partition exceeds the early warning threshold, the index nodes are in a dangerous state.
5. The method for monitoring, early warning and repairing a file inode according to claim 4, wherein if the file inode is in the early warning state, the user recommends that the inode occupies more applications by sending a reminding message to the user, so that the user repairs the recommended applications according to the problems in the reminding message.
6. The method for monitoring, early warning and repairing file inodes according to claim 4, wherein if the file inodes are in the dangerous state, repairing the application with the inode occupancy rate ranking exceeding the ranking threshold so that the inode occupancy rate in the partition is smaller than a safety threshold.
7. The utility model provides a device of file inode monitoring early warning and restoration which characterized in that includes:
the monitoring module is used for monitoring the change percentage of the available index nodes and the change percentage of the residual space in the partition if the mounting point of the file or the data monitors the partition when the file or the data is created, and limiting the creation of the file or the data is written if the change percentage of the available index nodes or the change percentage of the residual space in the partition exceeds a change threshold;
the scanning module is used for monitoring the number of index nodes in the partition;
the early warning module is used for sending a repair notification to the repair module when the index node occupation ratio in the monitoring partition exceeds an early warning threshold value;
and the repair module is used for repairing the application with the index node occupation ratio sequencing exceeding the sequencing threshold according to the repair notification, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
8. The device for monitoring, early warning and repairing of a file inode according to claim 7, wherein the monitoring module is specifically configured to:
if the change percentage of the available index nodes or the change percentage of the residual space in the monitoring partition does not exceed a first change threshold value, no processing is needed;
if the change percentage of the remaining available index nodes or the change percentage of the remaining space in the monitoring partition exceeds a first change threshold value but does not exceed a second change threshold value, limiting the creation of files or the writing of data by the common application, and not limiting the creation of files or the writing of data by the system application;
if the change percentage of the available index nodes or the change percentage of the residual space in the monitoring partition exceeds a second change threshold value, limiting all applications to create files or write data;
the first change threshold is less than the second change threshold.
9. The device for monitoring, early warning and repairing a file inode according to claim 8, wherein the scanning module is specifically configured to:
scanning the number of files in the monitoring partition, and acquiring the number of index nodes occupied by each application according to the packet name and the scanning result; and calculating the occupation ratio of the index nodes of each application according to the total number of the index nodes in the monitoring partition and the acquired number of the index nodes of each application, and sequencing the applications according to the occupation ratio.
10. The device for monitoring, early warning and repairing a file inode according to claim 9, wherein the early warning module is specifically configured to:
if the occupation ratio of index nodes in the partition does not exceed the safety threshold, the index nodes are in a safety state;
if the occupation ratio of the index nodes in the monitoring partition exceeds the safety threshold value but does not exceed the early warning threshold value, recommending that the index nodes occupy more applications for the early warning state by sending a reminding message to the user, so that the user repairs the recommended applications according to the problems in the reminding message;
if the index node occupation ratio in the monitoring partition exceeds the early warning threshold, the monitoring partition is in a dangerous state, and according to the sequence of the application occupation ratios obtained by scanning, the application packet names of which the index node occupation ratio exceeds the sequence threshold are transmitted to the repairing module in a broadcasting mode in a parameter mode, so that the repairing module repairs the corresponding application according to the application packet names carried in the repairing message, and the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
CN201910787814.7A 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node Active CN110750411B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910787814.7A CN110750411B (en) 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910787814.7A CN110750411B (en) 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node

Publications (2)

Publication Number Publication Date
CN110750411A CN110750411A (en) 2020-02-04
CN110750411B true CN110750411B (en) 2023-05-05

Family

ID=69275883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910787814.7A Active CN110750411B (en) 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node

Country Status (1)

Country Link
CN (1) CN110750411B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749411A (en) * 2021-01-14 2021-05-04 上海商米科技集团股份有限公司 Hierarchical management and control method and system for android file system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294206A (en) * 2015-05-21 2017-01-04 广州华多网络科技有限公司 A kind of caching data processing method and device
CN109656885A (en) * 2018-12-18 2019-04-19 Oppo广东移动通信有限公司 Memory space monitoring method and device, electric terminal, storage medium
CN110109868A (en) * 2018-01-18 2019-08-09 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for index file

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170262463A1 (en) * 2016-03-14 2017-09-14 Dell Products L.P. Method and system for managing shrinking inode file space consumption using file trim operations

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294206A (en) * 2015-05-21 2017-01-04 广州华多网络科技有限公司 A kind of caching data processing method and device
CN110109868A (en) * 2018-01-18 2019-08-09 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for index file
CN109656885A (en) * 2018-12-18 2019-04-19 Oppo广东移动通信有限公司 Memory space monitoring method and device, electric terminal, storage medium

Also Published As

Publication number Publication date
CN110750411A (en) 2020-02-04

Similar Documents

Publication Publication Date Title
CN107315659B (en) Metadata redundancy backup method and device
CN108737132B (en) Alarm information processing method and device
CN104537076A (en) File reading and writing method and device
CN107193871B (en) Database recovering method and device
CN107562386A (en) A kind of method for writing data and device of distributed storage cluster
CN111857581A (en) Data storage processing method and system
CN104735107A (en) Recovery method and device for data copies in distributed storage system
CN103473343A (en) File management method, device and terminal
CN103491192A (en) Namenode switching method and system of distributed system
WO2024148854A1 (en) Database fault processing method and apparatus based on monitor service, and distributed cluster
CN110750411B (en) Method and device for monitoring, early warning and repairing file index node
CN113515531A (en) Data access method, device, client and storage medium
CN111459399A (en) Data writing method, data reading method and device
CN112527746A (en) Log storage method, device, equipment and storage medium
CN110597764A (en) File management method and device
CN103544254B (en) A kind of data managing method and device
CN108363727A (en) A kind of date storage method and device based on ZFS file system
CN111240579B (en) Method and device for data storage
CN104424109A (en) Information processing method and electronic equipment
CN112486506B (en) NAND Flash burning method and device
CN111625502B (en) Data reading method and device, storage medium and electronic device
CN114666401B (en) Device information processing method, device, computer device and storage medium
CN118175362B (en) ROM space recycling method and device, storage medium and set top box
CN112804335B (en) Data processing method, data processing device, computer readable storage medium and processor
CN115174667B (en) Big data pushing method, system and electronic equipment

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
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200204

Assignee: Guangdong Shangjie Information Technology Co.,Ltd.

Assignor: SHANGHAI SHANGMI SCIENCE AND TECHNOLOGY GROUP Co.,Ltd.

Contract record no.: X2023310000072

Denomination of invention: Method and device for monitoring, warning, and repairing file index nodes

Granted publication date: 20230505

License type: Common License

Record date: 20230524

EE01 Entry into force of recordation of patent licensing contract