CN113110955A - System disk repair method, storage medium and device - Google Patents

System disk repair method, storage medium and device Download PDF

Info

Publication number
CN113110955A
CN113110955A CN202110409919.6A CN202110409919A CN113110955A CN 113110955 A CN113110955 A CN 113110955A CN 202110409919 A CN202110409919 A CN 202110409919A CN 113110955 A CN113110955 A CN 113110955A
Authority
CN
China
Prior art keywords
system disk
damage
repair
file
disk
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.)
Granted
Application number
CN202110409919.6A
Other languages
Chinese (zh)
Other versions
CN113110955B (en
Inventor
张茂岭
刘骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110409919.6A priority Critical patent/CN113110955B/en
Publication of CN113110955A publication Critical patent/CN113110955A/en
Application granted granted Critical
Publication of CN113110955B publication Critical patent/CN113110955B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • G06F11/1428Reconfiguring to eliminate the error with loss of hardware functionality
    • 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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques

Landscapes

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

Abstract

The invention discloses a system disk repairing method, a storage medium and a device. The method comprises the following steps: detecting the damage state of the system disk and determining the damage reason of the system disk; calling a repair tool corresponding to the damage reason according to the determined damage reason; and completing system disk repair through a repair tool. The storage medium has stored thereon a computer program which, when executed by a processor, carries out the steps of the system disk repair method as described above. The apparatus comprises: a memory for storing a computer program; a processor for implementing the steps of the method for system disk repair as described above when executing the computer program. The method and the device can automatically repair the damage of the system disk caused by abnormal power failure or abnormal shutdown, improve the efficiency of repairing the system disk, and reduce the risk of data loss caused by incapability of repairing the system disk.

Description

System disk repair method, storage medium and device
Technical Field
The invention relates to the field of server repair, in particular to a system disk repair method, a storage medium and equipment.
Background
Linux is a UNIX-like operating system which is free to use and spread, is mainly inspired by Minix and Unix ideas, and is a multi-user, multi-task, multi-thread and multi-CPU supporting operating system based on POSIX and Unix. The Linux takes a network as a core and is a multi-user network operating system with stable performance.
The Linux server is designed for service processing application, has wide application in networks and computer systems, can provide contents such as database management, network service and the like, is a server with very high performance and open source, is widely used in client sides of computer systems in China as the Linux system, and has very wide application range and better user experience response. However, the Linux server is abnormally powered off or abnormally shut down, which may cause damage to the system disk, and rebooting may not allow the system to enter the system. The repair method is also diversified and complicated because the damage of the system disk and the failure of entering the system are caused by many reasons.
In the prior art, the system disk can not be quickly repaired due to low efficiency of the method which is usually performed by manually checking and analyzing and then giving a repair scheme.
Disclosure of Invention
In order to solve the technical problems, the invention provides a system disk repairing method, a storage medium and a device, which can realize rapid and automatic repairing of a damaged system disk and improve the efficiency of repairing the system disk.
In order to achieve the purpose, the invention adopts the following technical scheme:
a system disk repair method, comprising:
detecting the damage state of the system disk and determining the damage reason of the system disk;
calling a repair tool corresponding to the damage reason according to the determined damage reason;
and completing system disk repair through a repair tool.
Further, the detecting a damage state of the system disk and determining a damage cause of the system disk specifically include:
checking whether the partition table is damaged or not, and if the partition table is damaged, determining that the damage reason of the system disk is the partition damage of the system disk;
if the partition table is not damaged, checking whether the file system is damaged; if the file system is damaged, determining that the damage reason of the system disk is the damage of the file system of the system disk;
and if the file system is not damaged, determining that the damage reason of the system disk is the loss of the/boot directory file.
Further, the checking whether the file system is damaged specifically includes:
if the system partition can mount and check the system files normally, the file system is not damaged;
and if the system partition can not mount and view the system file normally, the file system is damaged.
Further, the checking whether the partition table is damaged is checked by the fdisk command.
Further, when the damage reason is that the system disk partition is damaged, the partition table is restored through a gdisk command.
Further, when the damage cause is the system disk file system damage, the file system is repaired through fsck and xfs _ repair.
Further, when the damage cause is the loss of the/boot directory file, the/boot directory file is copied and restored through the file library.
The present invention also proposes a storage medium having stored thereon a computer program which, when being executed by a processor, implements the steps of the system disk repair method as described above.
Further, a Linux live environment is installed on the storage medium.
The invention also provides a system disk repair device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for system disk repair as described above when executing the computer program.
The invention has the beneficial effects that:
the invention provides a system disk repairing method, a storage medium and equipment, which can realize rapid and automatic repairing of a damaged system disk. The method can automatically repair the damage of the system disk caused by abnormal power failure or abnormal shutdown, is simple to operate, reduces the technical threshold for repairing the system disk, can quickly repair the system disk, improves the efficiency for repairing the system disk, reduces the risk of data loss caused by incapability of repairing the system disk, and is practical and significant.
The invention also solidifies the repairing method into simple devices (such as a U disk and the like) in the form of Linux environment and automation script, thus realizing the automatic repairing of the Linux system disk.
Drawings
Fig. 1 is a schematic flow chart of a system disk repair method according to an embodiment of the present invention.
Fig. 2 is a second flowchart of a system disk repairing method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a system disk repair apparatus according to an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
As shown in fig. 1, an embodiment of the present invention discloses a system disk repair method, including:
detecting the damage state of the system disk and determining the damage reason of the system disk;
calling a repair tool corresponding to the damage reason according to the determined damage reason;
and completing system disk repair through a repair tool.
The repairing method can be implemented by solidifying the storage medium such as the U disk, installing a simplified Linux live environment on the U disk, wherein the environment comprises or installs tools and commands required by repairing the system disk. When the system disk is damaged and cannot enter a system, the device (U disk) is inserted, the Linux live environment is started from the U disk and can automatically execute the automatic system disk repairing script, the damage reason and the automatic repairing of the system disk are detected, and the function of automatically repairing the damaged system disk is realized.
Specifically, the tools required for repairing the system disk include a partition table checking tool fdisk, a partition table repairing tool gdisk, a file system repairing tool fsck, xfs _ repar, and a file library containing various operating systems/boot directories.
As shown in fig. 2, the specific processing procedure of the system disk repair method is as follows:
1) starting from a system disk repairing device (U disk).
2) And checking the partition table through an fdisk command, checking whether the partition table is damaged, if the partition table is damaged, determining that the damage reason of the system disk is the damage of the partition of the system disk, and recovering the partition table through a gdisk command.
3) If the partition table is not damaged, checking whether the file system is damaged;
the checking whether the file system is damaged specifically includes:
if the system partition can mount and check the system files normally, the file system is not damaged;
and if the system partition can not mount and view the system file normally, determining that the damage reason of the system disk is the damage of the system disk file system, and repairing the file system through the file system repairing tools fsck and xfs _ repair.
4) And if the file system is not damaged, determining that the damage reason of the system disk is that the/boot directory file is lost, and copying and recovering the/boot directory file through the file library.
After the system disk is repaired, the repairing device (U disk) is pulled out, and the system disk is started.
The embodiment of the invention also discloses a storage medium, wherein a computer program is stored on the storage medium, and when being executed by a processor, the computer program realizes the steps of the system disk repairing method.
The storage medium is provided with a Linux live environment.
As shown in fig. 3, an embodiment of the present invention further discloses a system disk repair device, including:
a memory for storing a computer program;
a processor for implementing the steps of the method for system disk repair as described above when executing the computer program.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, the scope of the present invention is not limited thereto. Various modifications and alterations will occur to those skilled in the art based on the foregoing description. And are neither required nor exhaustive of all embodiments. On the basis of the technical scheme of the invention, various modifications or changes which can be made by a person skilled in the art without creative efforts are still within the protection scope of the invention.

Claims (10)

1. A system disk repair method, comprising:
detecting the damage state of the system disk and determining the damage reason of the system disk;
calling a repair tool corresponding to the damage reason according to the determined damage reason;
and completing system disk repair through a repair tool.
2. The method according to claim 1, wherein the detecting a damage state of the system disk and determining a cause of the damage of the system disk specifically comprise:
checking whether the partition table is damaged or not, and if the partition table is damaged, determining that the damage reason of the system disk is the partition damage of the system disk;
if the partition table is not damaged, checking whether the file system is damaged; if the file system is damaged, determining that the damage reason of the system disk is the damage of the file system of the system disk;
and if the file system is not damaged, determining that the damage reason of the system disk is the loss of the/boot directory file.
3. The system disk repair method according to claim 2, wherein the checking whether the file system is corrupted specifically includes:
if the system partition can mount and check the system files normally, the file system is not damaged;
and if the system partition can not mount and view the system file normally, the file system is damaged.
4. The system disk repair method according to claim 2, wherein the checking whether the partition table is corrupt is checked by an fdisk command.
5. The method according to claim 2, wherein when the damage cause is damage to the system disk partition, the partition table is restored by a gdisk command.
6. The system disk repairing method according to claim 2, wherein when the damage cause is a system disk file system damage, the file system is repaired by fsck, xfs _ repair.
7. The system disk repair method according to claim 2, wherein when the cause of the damage is loss of a/boot directory file, the/boot directory file is copied and restored by a file library.
8. A storage medium having stored thereon a computer program for implementing the steps of the system disk repair method according to any one of claims 1 to 7 when executed by a processor.
9. The storage medium of claim 8, wherein the storage medium has a Linux live environment installed thereon.
10. A system disk repair apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of system disk repair according to any one of claims 1 to 7 when executing the computer program.
CN202110409919.6A 2021-04-15 2021-04-15 System disk repair method, storage medium and device Active CN113110955B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110409919.6A CN113110955B (en) 2021-04-15 2021-04-15 System disk repair method, storage medium and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110409919.6A CN113110955B (en) 2021-04-15 2021-04-15 System disk repair method, storage medium and device

Publications (2)

Publication Number Publication Date
CN113110955A true CN113110955A (en) 2021-07-13
CN113110955B CN113110955B (en) 2022-12-27

Family

ID=76717723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110409919.6A Active CN113110955B (en) 2021-04-15 2021-04-15 System disk repair method, storage medium and device

Country Status (1)

Country Link
CN (1) CN113110955B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207816A (en) * 2013-04-08 2013-07-17 浪潮电子信息产业股份有限公司 Linux system repairing method
CN103729264A (en) * 2013-12-23 2014-04-16 国云科技股份有限公司 Method for backing up and restoring Windows virtual machine system disk
CN103970564A (en) * 2014-04-23 2014-08-06 京信通信系统(中国)有限公司 Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions
CN104111882A (en) * 2014-08-12 2014-10-22 浪潮电子信息产业股份有限公司 Redundant and high-reliability partitioning method for embedded Linux system
WO2017097233A1 (en) * 2015-12-11 2017-06-15 中兴通讯股份有限公司 Fault tolerance method for data storage load and iptv system
CN109086171A (en) * 2018-08-15 2018-12-25 郑州云海信息技术有限公司 A kind of file system restorative procedure and device
CN109710377A (en) * 2018-12-14 2019-05-03 国云科技股份有限公司 A method of restoring kvm virtual machine in the distributed storage of failure
CN111563003A (en) * 2020-06-12 2020-08-21 广东浪潮大数据研究有限公司 Device, method, equipment and medium for monitoring equipment state
CN112015587A (en) * 2019-05-31 2020-12-01 烽火通信科技股份有限公司 Method and device for enhancing reliability of operating system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207816A (en) * 2013-04-08 2013-07-17 浪潮电子信息产业股份有限公司 Linux system repairing method
CN103729264A (en) * 2013-12-23 2014-04-16 国云科技股份有限公司 Method for backing up and restoring Windows virtual machine system disk
CN103970564A (en) * 2014-04-23 2014-08-06 京信通信系统(中国)有限公司 Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions
CN104111882A (en) * 2014-08-12 2014-10-22 浪潮电子信息产业股份有限公司 Redundant and high-reliability partitioning method for embedded Linux system
WO2017097233A1 (en) * 2015-12-11 2017-06-15 中兴通讯股份有限公司 Fault tolerance method for data storage load and iptv system
CN109086171A (en) * 2018-08-15 2018-12-25 郑州云海信息技术有限公司 A kind of file system restorative procedure and device
CN109710377A (en) * 2018-12-14 2019-05-03 国云科技股份有限公司 A method of restoring kvm virtual machine in the distributed storage of failure
CN112015587A (en) * 2019-05-31 2020-12-01 烽火通信科技股份有限公司 Method and device for enhancing reliability of operating system
CN111563003A (en) * 2020-06-12 2020-08-21 广东浪潮大数据研究有限公司 Device, method, equipment and medium for monitoring equipment state

Also Published As

Publication number Publication date
CN113110955B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN107844386B (en) Data backup and recovery method and device
CN106951345B (en) Consistency test method and device for disk data of virtual machine
CN110795420A (en) Automatic MySQL database backup method based on infrastructure
CN105573859A (en) Data recovery method and device of database
CN110225078B (en) Application service updating method, system and terminal equipment
CN102163167A (en) Method and device for rescuing system
CN104572422A (en) Memory monitoring achievement method based on startup and shutdown of Linux system
CN104636217A (en) Root file system automatic backup and exception recovery method and partition structure
CN104714863A (en) Method for completely storing Raid card logs on basis of Linux operation system after system crashes
CN105022678A (en) Data backup method and apparatus for virtual machine
CN113110955B (en) System disk repair method, storage medium and device
CN112506551A (en) USB software upgrading method based on ARM device
CN110555009B (en) Processing method and device for Network File System (NFS) service
CN109933351B (en) Method and device for repairing and upgrading Linux system
CN111158952A (en) Method for automatically backing up configuration file by using external storage equipment
WO2017020460A1 (en) Method and apparatus for integrating plugin
CN106708541A (en) Version upgrading processing method and apparatus
CN108958827B (en) Method and system for processing program upgrading fault
WO2012097761A1 (en) Recovery method for communication exceptions between data card and host, and data card
CN113515291A (en) Equipment online upgrading method and device
CN104750579A (en) Method and device for manufacturing memory mirroring
CN111427720A (en) Database repair method and device, computer equipment and storage medium
CN109032955B (en) UI automation test method, device, equipment and readable storage medium
CN106201546B (en) Full-scale formatting method and system for large disks in linux system installation processes
CN113708981B (en) Method and system for repairing fault of cloud host system

Legal Events

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