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; CALCULATING OR 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; CALCULATING OR 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. A processing method for abnormal disk partitions is applied to a host connected with an information collection end, and comprises the following steps:
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.
2. The method of claim 1, wherein detecting an abnormal disk partition of the host comprises:
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.
3. The method of claim 1, wherein determining the type of generation of the abnormal disk partition comprises:
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.
4. The method of claim 3, wherein processing the abnormal disk partition according to the generation type comprises:
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.
5. The method of claim 4, further comprising, after freeing the occupied space of the abnormal disk partition:
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.
6. The method of claim 3, wherein processing the abnormal disk partition according to the generation type comprises:
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.
7. The method according to any one of claims 1 to 6, further comprising, after processing the abnormal disk partition according to the generation type, at least one of:
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.
8. The device for processing the abnormal disk partition is applied to a host connected with an information collection end, and comprises the following components:
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.
9. A computer-readable storage medium, comprising a stored program, wherein when the program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the processing method of the abnormal disk partition according to any one of claims 1 to 7.
10. A processor, configured to execute a program, wherein the program executes the method for handling an abnormal disk partition according to any one of claims 1 to 7.
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

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
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
CN105468482B (en) Hard disk position identification and fault diagnosis method and server equipment thereof
CN112100048B (en) Self-adaptive inspection method and device for server
CN106598796A (en) Method for testing hardware information stability in reboot
CN111897686A (en) Server cluster hard disk fault processing method and device, electronic equipment and storage medium
CN100395717C (en) Method and system for monitoring hard-disk damage
CN102508760A (en) Early warning method for redundant array of independent disks (RAID) and early warning system for RAID
EP3274839B1 (en) Technologies for root cause identification of use-after-free memory corruption bugs
CN117312051A (en) File backup method, device, equipment and storage medium
CN114237957A (en) Method and device for processing abnormal disk partition
US8843781B1 (en) Managing drive error information in data storage systems
US10108537B2 (en) Mechanisms for reproducing storage system metadata inconsistencies in a test environment
CN113590405A (en) Hard disk error detection method and device, storage medium and electronic device
US8250402B2 (en) Method to precondition a storage controller for automated data collection based on host input
CN111124785A (en) Hard disk fault checking method, device, equipment and storage medium
US20240272912A1 (en) Disc loading control method, apparatus, and device, and readable storage medium
CN117033079A (en) Backup reduction method based on domestic platform
CN113849329B (en) Log analysis integration method and system of operating system
CN116501523A (en) Abnormality processing method and device for equipment, storage medium and electronic device
CN109491822A (en) A kind of system reboot detection method, device, terminal and storage medium
CN115878400A (en) Test method, test apparatus, computer device, storage medium, and program product
US6229743B1 (en) Method of a reassign block processing time determination test for storage device
CN115168124A (en) Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium
CN113468029A (en) Log management method and device, electronic equipment and readable storage medium
CN113806119A (en) Memory card processing method, device, equipment and storage medium

Legal Events

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