[go: up one dir, main page]

CN114237957A - Method and device for processing abnormal disk partition - Google Patents

Method and device for processing abnormal disk partition Download PDF

Info

Publication number
CN114237957A
CN114237957A CN202111547742.2A CN202111547742A CN114237957A CN 114237957 A CN114237957 A CN 114237957A CN 202111547742 A CN202111547742 A CN 202111547742A CN 114237957 A CN114237957 A CN 114237957A
Authority
CN
China
Prior art keywords
disk partition
abnormal disk
abnormal
generation type
partition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111547742.2A
Other languages
Chinese (zh)
Inventor
谢伟
范世辉
任帅
侯宝山
吴家华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Postal Savings Bank of China Ltd
Original Assignee
Postal Savings Bank of China 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 Postal Savings Bank of China Ltd filed Critical Postal Savings Bank of China Ltd
Priority to CN202111547742.2A priority Critical patent/CN114237957A/en
Publication of CN114237957A publication Critical patent/CN114237957A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for processing abnormal disk partitions. Wherein, the method comprises the following steps: detecting abnormal disk partitions of a host; determining the generation type of the abnormal disk partition; and processing the abnormal disk partition according to the generation type. The invention solves the technical problems that the existing solution is mainly to find and report the problems through a monitoring tool or a user, and then the problems are analyzed and checked in a manual mode, the processing efficiency is low, and the problems need to be attended manually.

Description

Method and device for processing abnormal disk partition
Technical Field
The invention relates to the technical field of servers, in particular to a method and a device for processing abnormal disk partitions.
Background
Due to network instability or other reasons, storage equipment is often abnormal, so that a disk partition of a linux operating system cannot be read and written normally, and the linux operating system is visually represented as a disk Input/Output error. The existing solution is mainly to find and report problems through a monitoring tool or a user, then analyze, investigate and solve the problems in a manual mode, the processing efficiency is low, and the problems need to be attended manually.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing abnormal disk partitions, which are used for at least solving the technical problems that the existing solution is mainly to find and report problems through a monitoring tool or a user, and then the problems are analyzed, checked and solved in a manual mode, the processing efficiency is low, and manual operation is needed.
According to an aspect of the embodiments of the present invention, a method for processing an abnormal disk partition is provided, where the method is applied to a host connected with an information collection end, and the method includes: detecting an abnormal disk partition of the host; determining the generation type of the abnormal disk partition; and processing the abnormal disk partition according to the generation type.
Optionally, detecting an abnormal disk partition of the host includes: deploying a detection service module on the host in a timed task mode, wherein the detection service module comprises an application program generated based on a shell script tool; and triggering and detecting the abnormal disk partitions at regular time through the detection service module.
Optionally, determining the generation type of the abnormal disk partition includes: if the abnormal disk partition is generated by a data disk, determining that the generation type is a first generation type; and if the abnormal disk partition is generated by a system disk, determining that the generation type is a second generation type.
Optionally, processing the abnormal disk partition according to the generation type includes: and under the condition that the generation type is the first generation type, closing the process occupying the abnormal disk partition, and releasing the occupied space of the abnormal disk partition.
Optionally, after releasing the occupied space of the abnormal disk partition, the method further includes: unloading the abnormal disk partition, and re-mounting the abnormal disk partition after unloading is finished; and performing read-write detection according to the abnormal disk partition after mounting is completed, and feeding detection information back to the information collection end.
Optionally, processing the abnormal disk partition according to the generation type includes: if the generation type is the second generation type, judging whether the abnormal disk partition is mounted to a main directory of an operating system; if the abnormal disk partition is mounted to the main directory of the operating system, the process occupying the abnormal disk partition cannot be closed, and the information of the abnormal disk partition and the information of the processing result are fed back to the information collection end; and if the abnormal disk partition is not mounted to the main directory of the operating system, closing the process occupying the abnormal disk partition.
Optionally, after processing the abnormal disk partition according to the generation type, at least one of the following is further included: controlling the information collection end to display host information; controlling the information collection end to retrieve the physical storage position of the abnormal host; and controlling the information collection end to alarm the abnormal disk partition.
According to another aspect of the embodiments of the present invention, there is further provided a device for processing an abnormal disk partition, where the device is applied to a host connected with an information collection end, and the device includes: the detection module is used for detecting the abnormal disk partitions of the host; the determining module is used for determining the generation type of the abnormal disk partition; and the processing module is used for processing the abnormal disk partition according to the generation type.
According to another aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, where the computer-readable storage medium includes a stored program, and when the program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the method for processing an abnormal disk partition described in any one of the foregoing.
According to another aspect of the embodiments of the present invention, there is further provided a processor, where the processor is configured to execute a program, where the program executes the method for processing an abnormal disk partition described in any one of the above.
In the embodiment of the invention, the abnormal disk partition of the host is detected; determining the generation type of the abnormal disk partition; the abnormal disk partitions are processed according to the generation types, the abnormal disk partitions of the host are detected, the abnormal disk partitions are processed according to the generation types of the abnormal disk partitions, the purposes that the abnormal disk partitions are timely and actively analyzed to be system disks or data disks while problems are found, and optimal solutions made in advance are automatically matched are achieved, so that the technical effects that manual operation is reduced, the availability of complex environments is improved, and related abnormal hidden dangers are timely eliminated are achieved, the problems are mainly found and reported by monitoring tools or users in the existing solution mode, then the problems are analyzed and checked in the manual mode, the processing efficiency is low, and the technical problems need to be attended manually are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of handling an abnormal disk partition according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a host connected to an information gathering side according to an embodiment of the present invention;
FIG. 3 is a diagram of an apparatus for handling an abnormal disk partition according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for handling abnormal disk partitioning, it is noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that herein.
Fig. 1 is a flowchart of a method for processing an abnormal disk partition according to an embodiment of the present invention, and as shown in fig. 1, the method is applied to a host connected with an information collection end, and includes the following steps:
step S102, detecting abnormal disk partitions of the host;
step S104, determining the generation type of the abnormal disk partition;
and step S106, processing the abnormal disk partition according to the generation type.
Through the steps, the abnormal disk partitions can be detected through the abnormal disk partitions of the host, the abnormal disk partitions are processed according to the generation types of the abnormal disk partitions, the purposes that the abnormal disk partitions can be analyzed to be the system disks or the data disks timely and actively while problems are found, and optimal solutions formulated in advance are automatically matched are achieved, so that the technical effects of reducing manual operation, improving the availability of the environment and eliminating related hidden dangers timely are achieved, the problems that the problems are found and reported mainly through monitoring tools or users in the existing solution mode are solved, then the problems are analyzed, checked and solved through a manual mode, the processing efficiency is low, and the technical problems that manual watching is needed are solved.
Optionally, detecting an abnormal disk partition of the host includes: deploying a detection service module on a host in a timed task mode, wherein the detection service module comprises an application program generated based on a shell script tool; and triggering and detecting abnormal disk partitions at regular time through a detection service module.
The detection service module can be deployed in an independent partition independent of other disk partitions on the host, and detects abnormal disk partitions by timing triggering, so that the abnormal disk partitions can be found in time.
The timing task can be set to be once every 30 minutes, or can be set to be other times, or different timing detection plans can be set according to different disk partitions.
The detection service module includes an application program generated based on a shell script tool, for example, an application program generated by a shell script tool such as Bourne shell, C shell, Korn shell, and the like may be used, and in addition, the detection service module may also be an application program written by AWK, Perl, Python, and the like, which is not limited herein.
In the specific implementation process, disk partitioning may be caused by power-on failure, loss of CMOS parameters, invalid partition table, damage of DOS boot record, system stop response, loss of boot sector, unrecognizable hard disk system, timeout of hard disk operation, failure of hard disk drive selection, failure of hard disk controller, missing of sought record, failure of write operation, 0-channel signal error, error of head selection signal ECC check, sector buffer overflow during reading data, bad address identification, unrecognizable error, error of data comparison, BIOS unknown hard disk, failure of self-checking hard disk, damage of hard disk partition table, and the like.
Optionally, determining a generation type of the abnormal disk partition includes: if the abnormal disk partition is generated by the data disk, determining that the generation type is a first generation type; and if the abnormal disk partition is generated by the system disk, determining the generation type as a second generation type.
In an optional implementation manner, if the generation type of the abnormal disk partition is the first generation type, it indicates that the abnormal disk partition is generated by the data disk, and if the generation type of the abnormal disk partition is the second generation type, it indicates that the abnormal disk partition is generated by the system disk. By the method and the device, whether the abnormal disk partition is generated by the data disk or the system disk can be accurately acquired.
Optionally, processing the abnormal disk partition according to the generation type includes: and under the condition that the generation type is the first generation type, closing the process occupying the abnormal disk partition, and releasing the occupied space of the abnormal disk partition.
In the process of closing the process occupying the abnormal disk partition, the disk mount condition, the root directory mount condition, whether the deleted file is used by the process or not, the parent process and the like can be respectively checked, and then how to process the process occupying the abnormal disk partition is determined according to specific conditions. For example, when it is checked that a process uses a deleted file, the name of the deleted file is captured from a core memory, and a log is saved; for another example, if it is checked that the parent process exits and one or more child processes are still running, then state collection is performed on the child processes.
Optionally, after releasing the occupied space of the abnormal disk partition, the method further includes: unloading the abnormal disk partition, and re-mounting the abnormal disk partition after unloading is finished; and performing read-write detection according to the abnormal disk partition after mounting, and feeding detection information back to the information collection end.
The abnormal disk partition is described, and the partition mode is GPT or MBR. The read-write detection is performed on the abnormal disk partition after the mounting is completed, and the detection content includes, but is not limited to, a pure read speed, a pure write speed, a read-write quantity, and the like. By the embodiment, the abnormal disk partition can be found in advance, and when the abnormal disk partition is generated by the data disk, relevant problems are automatically processed, so that manual complicated and repetitive operations are reduced.
Optionally, processing the abnormal disk partition according to the generation type includes: under the condition that the generation type is a second generation type, judging whether the abnormal disk partition is mounted to a main directory of an operating system or not; if the abnormal disk partition is mounted to the main directory of the operating system, the process occupying the abnormal disk partition cannot be closed, and the information of the abnormal disk partition and the information of the processing result are fed back to the information collection end; and if the abnormal disk partition is not mounted to the main directory of the operating system, closing the process occupying the abnormal disk partition.
The primary directories include, but are not limited to, device specific files, system management and configuration files, boot configuration files and scripts, hypervisor commands, system administrator's home directory, virtual directories.
In an alternative embodiment, the generation type is the second generation type, that is, the abnormal disk partition is generated by the system disk. Firstly, judging whether an abnormal disk partition is mounted to a main directory of an operating system, if the abnormal disk partition is mounted to the main directory of the operating system, closing the process occupying the abnormal disk partition cannot be performed, and simultaneously, feeding back information of the abnormal disk partition and processing result information to an information collection end; if the abnormal disk partition is not mounted to the main directory of the operating system, the process occupying the abnormal disk partition can be directly closed.
By the implementation method, the abnormal disk partitions can be found in advance, and when the abnormal disk partitions are generated by the system disk, relevant problems are automatically processed, so that manual complicated and repetitive operations are reduced.
Optionally, after the processing of the abnormal disk partition according to the generation type, at least one of the following is further included: the control information collection end displays host information; the control information collection end retrieves the physical storage position of the abnormal host; and the control information collection end gives an alarm to the abnormal disk partition.
The host information includes but is not limited to: the main board model, the hard disk model, the power-on time, the hard disk reading and writing times, the continuous working time and the like.
The control information collection end may search the physical storage location of the abnormal host by at least one of the following methods: and searching for the physical address of the abnormal host correspondingly, searching for the IP address of the abnormal host correspondingly, presetting a number for the host, and searching for the number of the abnormal host correspondingly.
The alarm is performed on the abnormal disk partition, and the alarm method includes but is not limited to: sounding alarm, pop window alarm, light alarm, etc.
Through the embodiment, the host information can be displayed through the information collection end, the abnormal host and the physical storage device can be found, and the abnormal disk partition can be alarmed in time, so that the problem solving efficiency is improved.
An alternative embodiment of the invention is described in detail below.
Fig. 2 is a schematic diagram of a host connected to an information collection end according to an embodiment of the present invention, and as shown in fig. 2, the service module is written by a shell script, is deployed on a Linux controlled host in a crontab timing task manner, detects and finds abnormal disk partitions through timing trigger, automatically processes the abnormal disk partitions, and reports information of the abnormal disk partitions and processing result information to the information collection end.
The current cloud environment is divided into a system disk sda and a data disk, a mount partition is divided into a system partition and an application partition, and all partitions are generated mainly in two ways, wherein one way is that a physical disk creates a sub-partition direct partition, and the other way is that the physical disk creates a lvm logical volume and then generates a lvm partition. The analysis detection service firstly analyzes whether the partition is generated by the data disk, if so, the process of occupying the partition is closed, the occupation of the partition of the disk is released, then the disk is unloaded, the disk is mounted again after the unloading is successful, the read-write detection is carried out after the mounting is finished, and the detection information is fed back to the information collection end.
If the abnormal partition is generated by the system disk, whether the partition is a system main directory needs to be analyzed, whether process closing processing can be carried out is judged, and if the abnormal partition is not operable, relevant information is fed back to the information collection end.
The information collection end carries out statistical analysis on all information, displays and processes normal and abnormal host information, retrieves the physical storage position of the abnormal host, finds abnormal storage in advance and gives an alarm for the abnormal information.
In the embodiment of the invention, the abnormal host and the physical storage equipment can be found in advance, the related problems can be automatically processed, and the manual and tedious repeated operation is reduced. In addition, the disk partition with abnormal reading and writing in the linux server can be timely and actively discovered, the partition with the problem is automatically analyzed to be a system disk or a data disk, the related problems are solved according to a processing scheme established in advance, and the availability of the system is ensured.
Example 2
According to another aspect of the embodiments of the present invention, there is further provided a processing apparatus for an abnormal disk partition, which is applied to a host connected with an information collection end, and fig. 3 is a schematic diagram of the processing apparatus for an abnormal disk partition according to the embodiments of the present invention, as shown in fig. 3, the processing apparatus for an abnormal disk partition includes: a detection module 32, a determination module 34, and a processing module 36. The following describes the processing apparatus of the abnormal disk partition in detail.
The detection module 32 is used for detecting abnormal disk partitions of the host; a determining module 34, connected to the detecting module 32, for determining the generation type of the abnormal disk partition; and the processing module 36 is connected to the determining module 34 and is used for processing the abnormal disk partition according to the generation type.
It should be noted that the above modules may be implemented by software or hardware, for example, for the latter, the following may be implemented: the modules can be located in the same processor; and/or the modules are located in different processors in any combination.
In the above embodiment, the processing apparatus for the abnormal disk partition may detect the abnormal disk partition of the host, and process the abnormal disk partition according to the generation type of the abnormal disk partition, so as to achieve the purpose of actively analyzing the abnormal disk partition as a system disk or a data disk in time while finding a problem, and automatically matching an optimal solution formulated in advance, thereby achieving the technical effects of reducing manual operations, improving the availability of a load environment, and eliminating related hidden dangers in time, thereby solving the technical problems that the existing solution is mainly to find and report problems by a monitoring tool or a user, and then analyzing, troubleshooting and solving the technical problems that the processing efficiency is slow and the user has to watch manually.
It should be noted here that the detection module 32, the determination module 34 and the processing module 36 correspond to steps S102 to S106 in embodiment 1, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in embodiment 1.
Optionally, the detection module 32 includes: the deployment unit is used for deploying the detection service module on the host in a timed task mode, wherein the detection service module comprises an application program generated based on a shell script tool; and the detection unit is used for triggering and detecting the abnormal disk partitions at regular time through the detection service module.
Optionally, the determining module 34 includes: the first determining unit is used for determining that the generation type is the first generation type if the abnormal disk partition is generated by the data disk; and the second determining unit is used for determining the generation type as a second generation type if the abnormal disk partition is generated by the system disk.
Optionally, the processing module 36 includes: and the first processing unit is used for closing the process occupying the abnormal disk partition and releasing the occupied space of the abnormal disk partition under the condition that the generation type is the first generation type.
Optionally, the processing module 36 further includes: the second processing unit is used for unloading the abnormal disk partition after the occupied space of the abnormal disk partition is released, and re-mounting the abnormal disk partition after the unloading is finished; and the third processing unit is used for performing read-write detection according to the abnormal disk partition after mounting is completed and feeding back detection information to the information collection end.
Optionally, the processing module 36 includes: the judging unit is used for judging whether the abnormal disk partition is mounted to a main directory of the operating system or not under the condition that the generation type is the second generation type; the fourth processing unit is used for stopping the process occupying the abnormal disk partitions if the abnormal disk partitions are mounted to the main directory of the operating system, and feeding back the information of the abnormal disk partitions and the processing result information to the information collection end; and the fifth processing unit is used for closing the process occupying the abnormal disk partition if the abnormal disk partition is not mounted to the main directory of the operating system.
Optionally, the apparatus further comprises at least one of: the first control module is used for controlling the information collection end to display the host information after the abnormal disk partition is processed according to the generation type; the second control module is used for controlling the information collection end to retrieve the physical storage position of the abnormal host; and the third control module is used for controlling the information collection end to alarm the abnormal disk partition.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the method for processing an abnormal disk partition in any one of the above.
Optionally, in this embodiment, the computer-readable storage medium may be located in any one of a group of computer terminals in a computer network and/or in any one of a group of mobile terminals, and the computer-readable storage medium includes a stored program.
Optionally, the program when executed controls an apparatus in which the computer-readable storage medium is located to perform the following functions: detecting abnormal disk partitions of a host; determining the generation type of the abnormal disk partition; and processing the abnormal disk partition according to the generation type.
Optionally, detecting an abnormal disk partition of the host includes: deploying a detection service module on a host in a timed task mode, wherein the detection service module comprises an application program generated based on a shell script tool; and triggering and detecting abnormal disk partitions at regular time through a detection service module.
Optionally, determining a generation type of the abnormal disk partition includes: if the abnormal disk partition is generated by the data disk, determining that the generation type is a first generation type; and if the abnormal disk partition is generated by the system disk, determining the generation type as a second generation type.
Optionally, processing the abnormal disk partition according to the generation type includes: and under the condition that the generation type is the first generation type, closing the process occupying the abnormal disk partition, and releasing the occupied space of the abnormal disk partition.
Optionally, after releasing the occupied space of the abnormal disk partition, the method further includes: unloading the abnormal disk partition, and re-mounting the abnormal disk partition after unloading is finished; and performing read-write detection according to the abnormal disk partition after mounting, and feeding detection information back to the information collection end.
Optionally, processing the abnormal disk partition according to the generation type includes: under the condition that the generation type is a second generation type, judging whether the abnormal disk partition is mounted to a main directory of an operating system or not; if the abnormal disk partition is mounted to the main directory of the operating system, the process occupying the abnormal disk partition cannot be closed, and the information of the abnormal disk partition and the information of the processing result are fed back to the information collection end; and if the abnormal disk partition is not mounted to the main directory of the operating system, closing the process occupying the abnormal disk partition.
Optionally, after the processing of the abnormal disk partition according to the generation type, at least one of the following is further included: the control information collection end displays host information; the control information collection end retrieves the physical storage position of the abnormal host; and the control information collection end gives an alarm to the abnormal disk partition.
Example 4
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes a method for processing an abnormal disk partition in any one of the above.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: detecting abnormal disk partitions of a host; determining the generation type of the abnormal disk partition; and processing the abnormal disk partition according to the generation type.
Optionally, detecting an abnormal disk partition of the host includes: deploying a detection service module on a host in a timed task mode, wherein the detection service module comprises an application program generated based on a shell script tool; and triggering and detecting abnormal disk partitions at regular time through a detection service module.
Optionally, determining a generation type of the abnormal disk partition includes: if the abnormal disk partition is generated by the data disk, determining that the generation type is a first generation type; and if the abnormal disk partition is generated by the system disk, determining the generation type as a second generation type.
Optionally, processing the abnormal disk partition according to the generation type includes: and under the condition that the generation type is the first generation type, closing the process occupying the abnormal disk partition, and releasing the occupied space of the abnormal disk partition.
Optionally, after releasing the occupied space of the abnormal disk partition, the method further includes: unloading the abnormal disk partition, and re-mounting the abnormal disk partition after unloading is finished; and performing read-write detection according to the abnormal disk partition after mounting, and feeding detection information back to the information collection end.
Optionally, processing the abnormal disk partition according to the generation type includes: under the condition that the generation type is a second generation type, judging whether the abnormal disk partition is mounted to a main directory of an operating system or not; if the abnormal disk partition is mounted to the main directory of the operating system, the process occupying the abnormal disk partition cannot be closed, and the information of the abnormal disk partition and the information of the processing result are fed back to the information collection end; and if the abnormal disk partition is not mounted to the main directory of the operating system, closing the process occupying the abnormal disk partition.
Optionally, after the processing of the abnormal disk partition according to the generation type, at least one of the following is further included: the control information collection end displays host information; the control information collection end retrieves the physical storage position of the abnormal host; and the control information collection end gives an alarm to the abnormal disk partition.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1.一种异常磁盘分区的处理方法,其特征在于,应用于连接有信息收集端的主机上,所述方法包括:1. a processing method of abnormal disk partition, is characterized in that, is applied on the host computer that is connected with information collecting end, and described method comprises: 检测所述主机的异常磁盘分区;detecting abnormal disk partitions of the host; 确定所述异常磁盘分区的生成类型;determining the generation type of the abnormal disk partition; 根据所述生成类型对所述异常磁盘分区进行处理。The abnormal disk partition is processed according to the generation type. 2.根据权利要求1所述的方法,其特征在于,检测所述主机的异常磁盘分区,包括:2. The method according to claim 1, wherein detecting an abnormal disk partition of the host comprises: 将检测服务模块以定时任务的方式部署在所述主机上,其中,所述检测服务模块包括基于shell脚本工具生成的应用程序;Deploying the detection service module on the host by means of a timed task, wherein the detection service module includes an application program generated based on a shell script tool; 通过所述检测服务模块定时触发检测所述异常磁盘分区。The detection of the abnormal disk partition is periodically triggered by the detection service module. 3.根据权利要求1所述的方法,其特征在于,确定所述异常磁盘分区的生成类型,包括:3. The method according to claim 1, wherein determining the generation type of the abnormal disk partition comprises: 若所述异常磁盘分区由数据盘生成,则确定所述生成类型为第一生成类型;If the abnormal disk partition is generated by a data disk, determine that the generation type is the first generation type; 若所述异常磁盘分区由系统盘生成,则确定所述生成类型为第二生成类型。If the abnormal disk partition is generated by the system disk, it is determined that the generation type is the second generation type. 4.根据权利要求3所述的方法,其特征在于,根据所述生成类型对所述异常磁盘分区进行处理,包括:4. The method according to claim 3, wherein processing the abnormal disk partition according to the generation type comprises: 在所述生成类型为所述第一生成类型的情况下,则对占用所述异常磁盘分区的进程进行关闭,并释放所述异常磁盘分区的占用空间。If the generation type is the first generation type, the process occupying the abnormal disk partition is closed, and the occupied space of the abnormal disk partition is released. 5.根据权利要求4所述的方法,其特征在于,在释放所述异常磁盘分区的占用空间之后,还包括:5. The method according to claim 4, wherein after releasing the occupied space of the abnormal disk partition, further comprising: 卸载所述异常磁盘分区,并在卸载完成后重新挂载所述异常磁盘分区;Unloading the abnormal disk partition, and remounting the abnormal disk partition after the unloading is completed; 根据挂载完成后的所述异常磁盘分区进行读写检测,并将检测信息反馈给所述信息收集端。Read and write detection is performed according to the abnormal disk partition after the mounting is completed, and the detection information is fed back to the information collection end. 6.根据权利要求3所述的方法,其特征在于,根据所述生成类型对所述异常磁盘分区进行处理,包括:6. The method according to claim 3, wherein processing the abnormal disk partition according to the generation type comprises: 在所述生成类型为所述第二生成类型的情况下,则判断所述异常磁盘分区是否挂载到操作系统的主要目录;If the generation type is the second generation type, then determine whether the abnormal disk partition is mounted to the main directory of the operating system; 若所述异常磁盘分区挂载到所述操作系统的主要目录,则无法对占用所述异常磁盘分区的进程进行关闭,并将异常磁盘分区信息和处理结果信息反馈给所述信息收集端;If the abnormal disk partition is mounted to the main directory of the operating system, the process occupying the abnormal disk partition cannot be closed, and the abnormal disk partition information and processing result information are fed back to the information collection end; 若所述异常磁盘分区没有挂载到所述操作系统的主要目录,则对占用所述异常磁盘分区的进程进行关闭。If the abnormal disk partition is not mounted to the main directory of the operating system, the process occupying the abnormal disk partition is closed. 7.根据权利要求1至6中任意一项所述的方法,其特征在于,在根据所述生成类型对所述异常磁盘分区进行处理之后,还包括以下至少之一:7. The method according to any one of claims 1 to 6, wherein after the abnormal disk partition is processed according to the generation type, the method further comprises at least one of the following: 控制所述信息收集端展示主机信息;控制所述信息收集端检索异常主机所在物理存储位置;控制所述信息收集端对所述异常磁盘分区进行报警。The information collection end is controlled to display host information; the information collection end is controlled to retrieve the physical storage location where the abnormal host is located; and the information collection end is controlled to alarm the abnormal disk partition. 8.一种异常磁盘分区的处理装置,其特征在于,应用于连接有信息收集端的主机上,所述装置包括:8. A processing device for abnormal disk partition, characterized in that it is applied to a host computer connected with an information collection end, and the device comprises: 检测模块,用于检测所述主机的异常磁盘分区;a detection module for detecting abnormal disk partitions of the host; 确定模块,用于确定所述异常磁盘分区的生成类型;A determination module, for determining the generation type of the abnormal disk partition; 处理模块,用于根据所述生成类型对所述异常磁盘分区进行处理。A processing module, configured to process the abnormal disk partition according to the generation type. 9.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行权利要求1至7中任意一项所述的异常磁盘分区的处理方法。9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein, when the program is run, a device where the computer-readable storage medium is located is controlled to execute claims 1 to 7 The processing method for abnormal disk partition described in any one of. 10.一种处理器,其特征在于,所述处理器用于运行程序,其中,所述程序运行时执行权利要求1至7中任意一项所述的异常磁盘分区的处理方法。10 . A processor, wherein the processor is configured to run a program, wherein when the program runs, the method for processing an abnormal disk partition according to any one of claims 1 to 7 is executed.
CN202111547742.2A 2021-12-16 2021-12-16 Method and device for processing abnormal disk partition Pending CN114237957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111547742.2A CN114237957A (en) 2021-12-16 2021-12-16 Method and device for processing abnormal disk partition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111547742.2A CN114237957A (en) 2021-12-16 2021-12-16 Method and device for processing abnormal disk partition

Publications (1)

Publication Number Publication Date
CN114237957A true CN114237957A (en) 2022-03-25

Family

ID=80757563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111547742.2A Pending CN114237957A (en) 2021-12-16 2021-12-16 Method and device for processing abnormal disk partition

Country Status (1)

Country Link
CN (1) CN114237957A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116382576A (en) * 2023-03-17 2023-07-04 平头哥(上海)半导体技术有限公司 Storage control chip, solid state disk and related method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573872A (en) * 2014-10-09 2016-05-11 腾讯科技(深圳)有限公司 Hardware maintenance method and device of data storage system
CN106874141A (en) * 2015-12-11 2017-06-20 中兴通讯股份有限公司 A kind of fault-tolerance approach and IPTV system of data storage load
CN112445677A (en) * 2019-09-04 2021-03-05 中国石油化工股份有限公司 Health state checking and repairing method of computer cluster and storage medium
CN113110955A (en) * 2021-04-15 2021-07-13 山东英信计算机技术有限公司 System disk repair method, storage medium and device
CN113726553A (en) * 2021-07-29 2021-11-30 浪潮电子信息产业股份有限公司 Node fault recovery method and device, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573872A (en) * 2014-10-09 2016-05-11 腾讯科技(深圳)有限公司 Hardware maintenance method and device of data storage system
CN106874141A (en) * 2015-12-11 2017-06-20 中兴通讯股份有限公司 A kind of fault-tolerance approach and IPTV system of data storage load
CN112445677A (en) * 2019-09-04 2021-03-05 中国石油化工股份有限公司 Health state checking and repairing method of computer cluster and storage medium
CN113110955A (en) * 2021-04-15 2021-07-13 山东英信计算机技术有限公司 System disk repair method, storage medium and device
CN113726553A (en) * 2021-07-29 2021-11-30 浪潮电子信息产业股份有限公司 Node fault recovery method and device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116382576A (en) * 2023-03-17 2023-07-04 平头哥(上海)半导体技术有限公司 Storage control chip, solid state disk and related method
CN116382576B (en) * 2023-03-17 2024-02-27 平头哥(上海)半导体技术有限公司 Storage control chip, solid state disk and related method

Similar Documents

Publication Publication Date Title
CN111625401A (en) Data backup method and device based on cluster file system and readable storage medium
US6907419B1 (en) Method, system, and product for maintaining within a virtualization system a historical performance database for physical devices
EP2674865A1 (en) MANAGEMENT COMPUTER AND METHOD FOR ROOT CAUSE ANALYSiS
CN112100048B (en) Self-adaptive inspection method and device for server
CN110750396B (en) Server operating system compatibility testing method and device and storage medium
CN105468482B (en) Hard disk position identification and fault diagnosis method and server equipment thereof
CN113849329B (en) An operating system log analysis integration method and system
CN108009067A (en) A kind of method and system that RAID card details are checked under server
CN102508760A (en) Early warning method for redundant array of independent disks (RAID) and early warning system for RAID
CN113590405A (en) Hard disk error detection method and device, storage medium and electronic device
CN114237957A (en) Method and device for processing abnormal disk partition
US20210349775A1 (en) Method of data management and method of data analysis
CN110750416A (en) A method and device for automatic processing of fault information
CN110413463A (en) A method for checking SMART information of hard disk
CN114265555A (en) Method, device and medium for cleaning disk data
US20120254406A1 (en) Computer system management method and management apparatus
CN108959003A (en) A kind of realization multi-memory method for testing pressure, system, equipment and computer readable storage medium
US8250402B2 (en) Method to precondition a storage controller for automated data collection based on host input
CN113806119A (en) Memory card processing method, device, equipment and storage medium
CN111722879A (en) U disk identification method, Linux system, device and readable storage medium
CN115827451A (en) Method and device for detecting test defects, storage medium and electronic device
US20160266951A1 (en) Diagnostic collector for hadoop
CN116501523A (en) Abnormality processing method and device for equipment, storage medium and electronic device
CN114003477B (en) Method, system, terminal and storage medium for collecting diagnosis information of slow disk
CN115408192A (en) IO error detection method of virtual machine and related components thereof

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