CN113608922A - Backup system switching method and device - Google Patents

Backup system switching method and device Download PDF

Info

Publication number
CN113608922A
CN113608922A CN202110714802.9A CN202110714802A CN113608922A CN 113608922 A CN113608922 A CN 113608922A CN 202110714802 A CN202110714802 A CN 202110714802A CN 113608922 A CN113608922 A CN 113608922A
Authority
CN
China
Prior art keywords
partition
file
boot
response
error identification
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.)
Withdrawn
Application number
CN202110714802.9A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110714802.9A priority Critical patent/CN113608922A/en
Publication of CN113608922A publication Critical patent/CN113608922A/en
Withdrawn 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/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/1438Restarting or rejuvenating
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/1827Management specifically adapted to NAS

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a backup system switching method and a device, wherein the method comprises the following steps: accessing a first system partition of the system image using an initial random access file system to determine whether an error identification file exists in the first system partition in response to booting the system boot by a boot partition of the system image; accessing a second system partition of the system image using the initial random access file system to determine whether an error identification file exists in the second system partition in response to determining that the error identification file exists in the first system partition; performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition; and in response to the fact that the system verification fails, acquiring a system installation file from the backup partition of the system image, reinstalling the first system partition, and sending out warning information for guiding manual intervention. The invention can prevent the system starting failure of the virtual machine caused by the fault of the system disk partition.

Description

Backup system switching method and device
Technical Field
The present invention relates to the field of virtual machines, and in particular, to a method and an apparatus for switching a backup system.
Background
Most of current qemu-kvm system disks are in a qcow2 format, and no effective detection means exists in the process of starting a NAS (network attached storage) host. The partition where the system is located is damaged by a violent switching system and manual operation due to long-time uninterrupted operation and reading and writing, so that the system is started wrongly. The virtual machine is started by a grub bootstrap program in a mode of combining initramfs (initial random access file system) and root rootfs, and the initramfs is only read and generally causes the system startup failure due to the damage of the rootfs.
Aiming at the problem of starting failure caused by the failure of a virtual machine system disk partition in the prior art, no effective solution is available at present.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for switching a backup system, which can prevent a system partition of a system from failing to boot a virtual machine system.
Based on the above object, a first aspect of the embodiments of the present invention provides a backup system switching method, including the following steps:
accessing a first system partition of the system image using an initial random access file system to determine whether an error identification file exists in the first system partition in response to booting the system boot by a boot partition of the system image;
accessing a second system partition of the system image using the initial random access file system to determine whether an error identification file exists in the second system partition in response to determining that the error identification file exists in the first system partition;
performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition;
and in response to determining that the first system partition and the second system partition do not pass system verification, acquiring a system installation file from the backup partition of the system image to reinstall the first system partition, and sending alarm information for guiding manual intervention.
In some embodiments, the boot partition is a read-only partition that stores the basic boot components; accessing a first system partition of a system image using an initial random access file system comprises: an initial random access file system is activated by the base boot component to access the first system partition.
In some embodiments, the method further comprises performing the steps of: in response to determining that the error identification file is not present in the first system partition, the error identification file is written to the first system partition and necessary system modules are loaded using the first system partition and the root partition is switched to boot the system.
In some embodiments, the method further comprises performing the steps of: in response to determining that the error identification file is not present in the second system partition, the error identification file is written to the second system partition and necessary system modules are loaded and the root partition is switched to boot the system using the second system partition.
In some embodiments, loading the necessary system modules and switching the root partition using the first system partition or the second system partition comprises: and setting the address of the first system partition or the second system partition in the system image as a loading partition, and loading necessary system modules and switching the root partition by using the loading partition.
In some embodiments, the error identification file is configured to log boot errors and logs associated with last boot failures for the partition in which it is located.
In some embodiments, the method further comprises performing the steps of: in response to determining that at least one of the first system partition and the second system partition passes system check, loading necessary system modules and switching the root partition to boot the system using the one system partition that passed system check.
In some embodiments, the method further comprises performing the steps of: the error identification file is deleted from the first system partition or the second system partition in response to confirming that the first system partition or the second system partition passes the system check after the system is booted using the first system partition or the second system partition.
In some embodiments, the system image further includes a user partition configured to store user association data, and the user association data is not invoked at system boot.
A second aspect of an embodiment of the present invention provides a backup system switching apparatus, including:
a processor;
a controller storing program code executable by a processor, the processor executing the following steps when executing the program code:
accessing a first system partition of the system image using an initial random access file system to determine whether an error identification file exists in the first system partition in response to booting the system boot by a boot partition of the system image;
accessing a second system partition of the system image using the initial random access file system to determine whether an error identification file exists in the second system partition in response to determining that the error identification file exists in the first system partition;
performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition;
and in response to determining that the first system partition and the second system partition do not pass system verification, acquiring a system installation file from the backup partition of the system image to reinstall the first system partition, and sending alarm information for guiding manual intervention.
In some embodiments, the boot partition is a read-only partition that stores the basic boot components; accessing a first system partition of a system image using an initial random access file system comprises: an initial random access file system is activated by the base boot component to access the first system partition.
In some embodiments, further comprising performing the steps of: in response to determining that the error identification file is not present in the first system partition, the error identification file is written to the first system partition and necessary system modules are loaded using the first system partition and the root partition is switched to boot the system.
In some embodiments, further comprising performing the steps of: in response to determining that the error identification file is not present in the second system partition, the error identification file is written to the second system partition and necessary system modules are loaded and the root partition is switched to boot the system using the second system partition.
In some embodiments, loading the necessary system modules and switching the root partition using the first system partition or the second system partition comprises: and setting the address of the first system partition or the second system partition in the system image as a loading partition, and loading necessary system modules and switching the root partition by using the loading partition.
In some embodiments, the error identification file is configured to log boot errors and logs associated with last boot failures for the partition in which it is located.
In some embodiments, further comprising performing the steps of: in response to determining that at least one of the first system partition and the second system partition passes system check, loading necessary system modules and switching the root partition to boot the system using the one system partition that passed system check.
In some embodiments, further comprising performing the steps of: the error identification file is deleted from the first system partition or the second system partition in response to confirming that the first system partition or the second system partition passes the system check after the system is booted using the first system partition or the second system partition.
In some embodiments, the system image further includes a user partition configured to store user association data, and the user association data is not invoked at system boot.
The invention has the following beneficial technical effects: according to the backup system switching method and device provided by the embodiment of the invention, the system is started by responding to the starting partition of the system image, and the initial random access file system is used for accessing the first system partition of the system image so as to determine whether an error identification file exists in the first system partition; accessing a second system partition of the system image using the initial random access file system to determine whether an error identification file exists in the second system partition in response to determining that the error identification file exists in the first system partition; performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition; and in response to the fact that the first system partition and the second system partition do not pass system verification, acquiring a system installation file from the backup partition of the system image to reinstall the first system partition, and sending an alarm message for guiding manual intervention, so that the failure of starting the virtual machine system caused by the failure of the system disk partition can be prevented.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a backup system switching method provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the foregoing, a first aspect of the embodiments of the present invention provides an embodiment of a backup system switching method for preventing a system boot failure of a virtual machine due to a system disk partition failure. Fig. 1 is a schematic flowchart illustrating a backup system switching method provided by the present invention.
The backup system switching method, as shown in fig. 1, includes the following steps:
step S101, in response to booting the system boot through the boot partition of the system image, accessing a first system partition of the system image using an initial random access file system to determine whether an error identification file exists in the first system partition;
step S103, in response to determining that the error identification file exists in the first system partition, accessing a second system partition of the system image by using the initial random access file system to determine whether the error identification file exists in the second system partition;
step S105, in response to determining that the error identification file exists in the second system partition, performing system verification on both the first system partition and the second system partition;
and step S107, in response to determining that the first system partition and the second system partition do not pass the system verification, acquiring a system installation file from the backup partition of the system image to reinstall the first system partition, and sending warning information for guiding manual intervention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the preceding method embodiments to which it corresponds.
In some embodiments, the boot partition is a read-only partition that stores the basic boot components; accessing a first system partition of a system image using an initial random access file system comprises: an initial random access file system is activated by the base boot component to access the first system partition.
In some embodiments, the method further comprises performing the steps of: in response to determining that the error identification file is not present in the first system partition, the error identification file is written to the first system partition and necessary system modules are loaded using the first system partition and the root partition is switched to boot the system.
In some embodiments, the method further comprises performing the steps of: in response to determining that the error identification file is not present in the second system partition, the error identification file is written to the second system partition and necessary system modules are loaded and the root partition is switched to boot the system using the second system partition.
In some embodiments, loading the necessary system modules and switching the root partition using the first system partition or the second system partition comprises: and setting the address of the first system partition or the second system partition in the system image as a loading partition, and loading necessary system modules and switching the root partition by using the loading partition.
In some embodiments, the error identification file is configured to log boot errors and logs associated with last boot failures for the partition in which it is located.
In some embodiments, the method further comprises performing the steps of: in response to determining that at least one of the first system partition and the second system partition passes system check, loading necessary system modules and switching the root partition to boot the system using the one system partition that passed system check.
In some embodiments, the method further comprises performing the steps of: the error identification file is deleted from the first system partition or the second system partition in response to confirming that the first system partition or the second system partition passes the system check after the system is booted using the first system partition or the second system partition.
In some embodiments, the system image further includes a user partition configured to store user association data, and the user association data is not invoked at system boot.
The various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The following further illustrates embodiments of the invention in terms of specific examples.
The system mirror image is divided into five partitions, namely a starting partition, a first system partition, a second system partition, a user partition and a backup partition. The two system partitions contain the same content and are file systems which are backed up with each other. The boot partition contains the basic boot component, which is a read-only partition. The user partition is a configuration file, an audit log, a temporary file and the like customized by the user, and the normal starting of the system is not influenced even if the partition is damaged. And the backup partition reserves system installation files for system emergency reloading.
When the system is started, the system firstly enters initramfs to prepare for switching the root file system. In initramfs, a file in a first system partition is read first, whether an error flag file exists is judged, if the error flag file does not exist, an error flag file is created, a loading partition is set as an address of the first system partition, and then necessary system modules are loaded and root partition switching is carried out. And if the error mark file exists, reading whether the error mark file exists in the second system partition, if the error mark file does not exist, writing the error mark file, setting the loading partition as the address of the second system partition, and then loading the necessary system module and switching the root partitions.
If the error mark files exist in both the system partitions, the fact that both the system partitions have problems or the previous starting is not finished is shown, in order to prevent misjudgment caused by a starting process terminal, both the system partitions are verified, and which root file system is switched is determined according to a verification result. If the two system partitions are not verified, the first system partition is automatically repaired and reinstalled by using the files in the backup partition, an alarm is notified, and field personnel judge the next operation.
And after the system partition is loaded, checking the current partition, and deleting the error sign file after the error is checked.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention. The above-described method steps and system elements may also be implemented using a controller and a computer-readable storage medium for storing a computer program for causing the controller to implement the functions of the above-described steps or elements.
The embodiment of the invention realizes the system fault switching and recovery of the virtual NAS host through the independent double backup partitions and the backup partition; meanwhile, the last starting state is judged in initramfs by using an error sign file to select the system which really runs at this time; in addition, an error flag file is created before switching, and the error flag file is deleted after the system starts to complete self-checking to identify the integrity of the system partition.
As can be seen from the foregoing embodiments, the backup system switching method provided in the embodiments of the present invention uses an initial random access file system to access a first system partition of a system image to determine whether an error identification file exists in the first system partition by responding to a boot of the system by a boot partition of the system image; accessing a second system partition of the system image using the initial random access file system to determine whether an error identification file exists in the second system partition in response to determining that the error identification file exists in the first system partition; performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition; and in response to the fact that the first system partition and the second system partition do not pass system verification, acquiring a system installation file from the backup partition of the system image to reinstall the first system partition, and sending an alarm message for guiding manual intervention, so that the failure of starting the virtual machine system caused by the failure of the system disk partition can be prevented.
It should be particularly noted that, the steps in the embodiments of the backup system switching method described above may be mutually intersected, replaced, added, or deleted, and therefore, these reasonable permutation and combination transformations should also belong to the scope of the present invention, and should not limit the scope of the present invention to the described embodiments.
In view of the foregoing, a second aspect of the embodiments of the present invention provides an embodiment of a backup system switching apparatus for preventing a system boot failure of a virtual machine due to a system disk partition failure. The device comprises:
a processor;
a controller storing program code executable by a processor, the processor executing the following steps when executing the program code:
accessing a first system partition of the system image using an initial random access file system to determine whether an error identification file exists in the first system partition in response to booting the system boot by a boot partition of the system image;
accessing a second system partition of the system image using the initial random access file system to determine whether an error identification file exists in the second system partition in response to determining that the error identification file exists in the first system partition;
performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition;
and in response to determining that the first system partition and the second system partition do not pass system verification, acquiring a system installation file from the backup partition of the system image to reinstall the first system partition, and sending alarm information for guiding manual intervention.
The apparatuses and devices disclosed in the embodiments of the present invention may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television, and the like, or may be a large terminal device, such as a server, and therefore the scope of protection disclosed in the embodiments of the present invention should not be limited to a specific type of apparatus and device. The client disclosed in the embodiment of the present invention may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.
In some embodiments, the boot partition is a read-only partition that stores the basic boot components; accessing a first system partition of a system image using an initial random access file system comprises: an initial random access file system is activated by the base boot component to access the first system partition.
In some embodiments, further comprising performing the steps of: in response to determining that the error identification file is not present in the first system partition, the error identification file is written to the first system partition and necessary system modules are loaded using the first system partition and the root partition is switched to boot the system.
In some embodiments, further comprising performing the steps of: in response to determining that the error identification file is not present in the second system partition, the error identification file is written to the second system partition and necessary system modules are loaded and the root partition is switched to boot the system using the second system partition.
In some embodiments, loading the necessary system modules and switching the root partition using the first system partition or the second system partition comprises: and setting the address of the first system partition or the second system partition in the system image as a loading partition, and loading necessary system modules and switching the root partition by using the loading partition.
In some embodiments, the error identification file is configured to log boot errors and logs associated with last boot failures for the partition in which it is located.
In some embodiments, further comprising performing the steps of: in response to determining that at least one of the first system partition and the second system partition passes system check, loading necessary system modules and switching the root partition to boot the system using the one system partition that passed system check.
In some embodiments, further comprising performing the steps of: the error identification file is deleted from the first system partition or the second system partition in response to confirming that the first system partition or the second system partition passes the system check after the system is booted using the first system partition or the second system partition.
In some embodiments, the system image further includes a user partition configured to store user association data, and the user association data is not invoked at system boot.
As can be seen from the foregoing embodiments, the backup system switching apparatus provided in the embodiments of the present invention uses an initial random access file system to access a first system partition of a system image to determine whether an error identification file exists in the first system partition by booting the system boot through a boot partition of the system image; accessing a second system partition of the system image using the initial random access file system to determine whether an error identification file exists in the second system partition in response to determining that the error identification file exists in the first system partition; performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition; and in response to the fact that the first system partition and the second system partition do not pass system verification, acquiring a system installation file from the backup partition of the system image to reinstall the first system partition, and sending an alarm message for guiding manual intervention, so that the failure of starting the virtual machine system caused by the failure of the system disk partition can be prevented.
It should be particularly noted that the above-mentioned embodiment of the apparatus adopts the embodiment of the backup system switching method to specifically describe the working process of each module, and those skilled in the art can easily think that these modules are applied to other embodiments of the backup system switching method. Of course, since the steps in the embodiment of the backup system switching method may be mutually intersected, replaced, added, or deleted, these reasonable permutation and combination transformations should also belong to the scope of the present invention, and should not limit the scope of the present invention to the embodiment.
The embodiment of the invention also provides an embodiment of computer equipment for executing the backup system switching method. The computer device for executing the backup system switching method comprises a memory, at least one processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to execute any one of the methods.
The memory, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the backup system switching method in this embodiment of the present application. The processor executes various functional applications and data processing of the server by running the nonvolatile software program, instructions and modules stored in the memory, that is, the backup system switching method of the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the backup system switching device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions can execute the backup system switching method in any method embodiment and implement the backup system switching device/system in any device/system embodiment. Embodiments of the computer-readable storage medium may achieve the same or similar effects as any of the aforementioned method and apparatus/system embodiments corresponding thereto.
Embodiments of the present invention further provide a computer program product, where the computer program product includes a computer program stored on a computer-readable storage medium, where the computer program includes instructions, and when the instructions are executed by a computer, the computer executes the backup system switching method in any of the method embodiments and the backup system switching apparatus/system implementing any of the apparatus/system embodiments. Embodiments of the computer program product may achieve the same or similar effects as any of the aforementioned method and apparatus/system embodiments corresponding thereto.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the preceding method embodiments to which it corresponds.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A backup system switching method is characterized by comprising the following steps:
accessing a first system partition of a system image using an initial random access file system to determine whether a misidentified file is present in the first system partition in response to booting a system boot through a boot partition of the system image;
in response to determining that the error identification file is present in the first system partition, accessing a second system partition of the system image using the initial random access file system to determine whether the error identification file is present in the second system partition;
performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition;
and in response to determining that neither the first system partition nor the second system partition passes system verification, obtaining a system installation file from the backup partition of the system image to reinstall the first system partition, and sending alarm information guiding manual intervention.
2. The method of claim 1, wherein the boot partition is a read-only partition storing a basic boot component;
accessing a first system partition of the system image using an initial random access file system comprises: activating, by the base boot component, the initial random access file system to access the first system partition.
3. The method of claim 1, further comprising performing the steps of:
in response to determining that the error identification file is not present in the first system partition, writing the error identification file to the first system partition, and loading necessary system modules and switching a root partition to boot a system using the first system partition.
4. The method of claim 1, further comprising performing the steps of:
in response to determining that the error identification file is not present in the second system partition, writing the error identification file to the second system partition, and loading necessary system modules and switching a root partition to boot a system using the second system partition.
5. The method of claim 3 or 4, wherein loading essential system modules and switching a root partition using the first system partition or the second system partition comprises: setting an address of the first system partition or the second system partition in the system image as a load partition, and loading necessary system modules and switching a root partition using the load partition.
6. The method of claim 1, wherein the error identification file is configured to log boot errors and logs associated with last boot failures of the partition in which the error identification file is located.
7. The method of claim 1, further comprising performing the steps of:
in response to determining that at least one of the first system partition and the second system partition passes system checks, loading necessary system modules and switching a root partition to boot a system using the one system partition that passed system checks.
8. The method of claim 1, further comprising performing the steps of:
deleting the error identification file from the first system partition or the second system partition in response to confirming that the first system partition or the second system partition passes system verification after booting a system using the first system partition or the second system partition.
9. The method of claim 1, wherein the system image further comprises a user partition configured to store user-associated data, and wherein the user-associated data is not invoked at system startup.
10. A backup system switching apparatus, comprising:
a processor;
a controller storing program code executable by the processor, the processor executing the following steps when executing the program code:
accessing a first system partition of a system image using an initial random access file system to determine whether a misidentified file is present in the first system partition in response to booting a system boot through a boot partition of the system image;
in response to determining that the error identification file is present in the first system partition, accessing a second system partition of the system image using the initial random access file system to determine whether the error identification file is present in the second system partition;
performing a system check on both the first system partition and the second system partition in response to determining that the error identification file exists in the second system partition;
and in response to determining that neither the first system partition nor the second system partition passes system verification, obtaining a system installation file from the backup partition of the system image to reinstall the first system partition, and sending alarm information guiding manual intervention.
CN202110714802.9A 2021-06-25 2021-06-25 Backup system switching method and device Withdrawn CN113608922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110714802.9A CN113608922A (en) 2021-06-25 2021-06-25 Backup system switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110714802.9A CN113608922A (en) 2021-06-25 2021-06-25 Backup system switching method and device

Publications (1)

Publication Number Publication Date
CN113608922A true CN113608922A (en) 2021-11-05

Family

ID=78303747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110714802.9A Withdrawn CN113608922A (en) 2021-06-25 2021-06-25 Backup system switching method and device

Country Status (1)

Country Link
CN (1) CN113608922A (en)

Similar Documents

Publication Publication Date Title
US9146839B2 (en) Method for pre-testing software compatibility and system thereof
US20160132420A1 (en) Backup method, pre-testing method for environment updating and system thereof
CN108646982B (en) Automatic data restoration method and device based on UBIFS
CN109032632B (en) FOTA upgrading method, wireless communication terminal and storage medium
CN102298545B (en) System startup boot processing method and device
CN102262574B (en) Boot protecting method and device of operating system
CN107315616B (en) Firmware loading method and device and electronic equipment
CN106775610B (en) Electronic equipment starting method and electronic equipment
CN109587331B (en) Method and system for automatically repairing cloud mobile phone fault
CN108932249B (en) Method and device for managing file system
CN113094210B (en) Window platform process and file daemon method and system
CN111552592A (en) Double-backup starting method and system
US7594136B2 (en) Paging-triggered corrupted file recovery
CN113032183A (en) System management method, device, computer equipment and storage medium
CN109086162B (en) Memory diagnosis method and device
CN113608922A (en) Backup system switching method and device
CN113448760B (en) Method, system, equipment and medium for recovering abnormal state of hard disk
CN113094107B (en) Data protection method, device, equipment and computer storage medium
CN111783162B (en) Data protection implementation method and device and computer equipment
CN114385418A (en) Protection method, device, equipment and storage medium for communication equipment
CN114153503A (en) BIOS control method, device and medium
CN114579971A (en) Starting method of safety control module and related device
CN113297010A (en) Firmware recovery method, device and system based on system on chip and storage medium
CN118093028A (en) Firmware loading method, system and device of basic input/output system
CN117667258A (en) Restarting method and device of embedded system, electronic equipment and readable 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20211105