CN113504946A - Method and system for realizing mirror function when soft RAID logs in OS - Google Patents

Method and system for realizing mirror function when soft RAID logs in OS Download PDF

Info

Publication number
CN113504946A
CN113504946A CN202110842801.2A CN202110842801A CN113504946A CN 113504946 A CN113504946 A CN 113504946A CN 202110842801 A CN202110842801 A CN 202110842801A CN 113504946 A CN113504946 A CN 113504946A
Authority
CN
China
Prior art keywords
file
hard disk
starting
operating system
boot
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
CN202110842801.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.)
Lenovo Changfeng Technology Beijing Co Ltd
Original Assignee
Lenovo Changfeng Technology Beijing 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 Lenovo Changfeng Technology Beijing Co Ltd filed Critical Lenovo Changfeng Technology Beijing Co Ltd
Priority to CN202110842801.2A priority Critical patent/CN113504946A/en
Publication of CN113504946A publication Critical patent/CN113504946A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • G06F9/441Multiboot arrangements, i.e. selecting an operating system to be loaded
    • 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/1417Boot up procedures
    • 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

Landscapes

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

Abstract

The invention discloses a method and a system for realizing a mirror function when a soft RAID logs in an OS, wherein the method comprises the following steps: the method comprises the steps that an operating system starting file is respectively stored in a hard disk group of a soft RAID, so that a first hard disk and a second hard disk realize a mirror image function; when the first starting file fails to start the operating system, triggering restart information, and modifying the starting file into a second starting file; and meanwhile, the first starting file is repaired through the second starting file in the second hard disk. The method solves the technical problems that in the prior art, two hard disks can not mirror image to backup the starting files, once the starting files are damaged, the operating system can not be accessed, and the soft RAID function can not be realized. The technical effects that the starting file is backed up before the operating system is started, the operating system is automatically logged in by the backed-up starting file when the starting file of the system disk is damaged, and meanwhile the damaged starting file in the system disk is repaired are achieved.

Description

Method and system for realizing mirror function when soft RAID logs in OS
Technical Field
The invention relates to the field of computers, in particular to a method and a system for realizing a mirror function when a soft RAID logs in an OS.
Background
The startup file is the key for ensuring the normal startup and operation of the operating system, and any tiny loss and damage can cause the operating system to be incapable of being successfully started. At present, a startup file is often stored in a hard disk, and other files and the startup file are often stored in a mixed manner in daily work, so that viruses in the startup file are easily caused or mistakenly deleted, the startup file is finally damaged, and an operating system cannot be normally started.
In the process of implementing the technical scheme of the invention in the embodiment of the present application, the inventor of the present application finds that the above-mentioned technology has at least the following technical problems:
in the prior art, the soft RAID realized by the two hard disks has a soft RAID function only after the operating system is successfully started and the soft RAID simulation program is executed, however, the two hard disks cannot mirror-image the backup of the start file, and once the start file is damaged, the operating system cannot be accessed, which further causes a technical problem that the soft RAID function cannot be realized.
Disclosure of Invention
In view of this, an embodiment of the present application provides a method for implementing a mirroring function when a soft RAID logs in an OS, where the method includes: respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other; and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function. The method solves the technical problems that soft RAID realized by two hard disks in the prior art has a soft RAID function only after an operating system is successfully started and a soft RAID simulation program is executed, but the two hard disks cannot mirror and backup a starting file, and once the starting file is damaged, the operating system cannot be accessed, so that the soft RAID function cannot be realized. The technical effects that the starting file is backed up before the operating system is started, the operating system is automatically logged in by the backed-up starting file when the starting file of the system disk is damaged, the damaged starting file in the system disk is repaired by the backed-up starting file, and the operating system can be started successfully by the starting file in the system disk next time are achieved.
In view of the foregoing problems, embodiments of the present application provide a method for implementing a mirroring function when a soft RAID logs in an OS.
In a first aspect, the present application provides a method for implementing a mirroring function when a soft RAID logs in an OS, where the method includes: respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other; and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function.
On the other hand, the present application further provides a system for implementing a mirroring function when a soft RAID logs in an OS, which is used to execute the method for implementing a mirroring function when a soft RAID logs in an OS according to the first aspect, where the system includes: a first storage unit: the first obtaining unit is used for respectively storing operating system boot files into hard disk groups of the soft RAID, the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first boot file, the second hard disk is provided with a second boot file, and the first boot file and the second boot file are backups of each other; a first execution unit: the first execution unit is used for entering an operating system through the first boot file or the second boot file, and the first hard disk and the second hard disk realize a mirror image function.
In a third aspect, an embodiment of the present application further provides a system for implementing a mirroring function when a soft RAID logs in an OS, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the program.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
1. respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other; and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function. The technical effects that the starting file is backed up before the operating system is started, and the operating system is automatically and normally logged in by the backed-up starting file when the system disk starting file is damaged are achieved.
2. The damaged starting file in the system disk is repaired by the backup starting file when the starting file of the system disk is damaged, so that the starting file in the system disk can smoothly start the operating system in the subsequent starting.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a method for implementing a mirror function when a soft RAID logs in an OS according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a soft RAID hard disk group according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for booting an operating system according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for determining whether the start result is successful according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a processing method when a system disk fails to boot an operating system according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a system for implementing a mirroring function when a soft RAID logs in an OS according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an exemplary electronic device according to an embodiment of the present application.
Description of reference numerals:
a first memory unit 11, a first execution unit 12, a bus 300, a receiver 301, a processor 302, a transmitter 303, a memory 304, a bus interface 305.
Detailed Description
The embodiment of the application provides a method for realizing a mirror image function when a soft RAID logs in an OS, and solves the technical problems that the soft RAID realized by two hard disks in the prior art has a soft RAID function only after an operating system is successfully started and a soft RAID simulation program is executed, however, the two hard disks cannot mirror image and backup a starting file, once the starting file is damaged, the operating system cannot be accessed, and further the soft RAID function cannot be realized. The technical effects that the starting file is backed up before the operating system is started, the operating system is automatically logged in by the backed-up starting file when the starting file of the system disk is damaged, the damaged starting file in the system disk is repaired by the backed-up starting file, and the operating system can be started successfully by the starting file in the system disk next time are achieved.
In the following, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application. It should be further noted that, for the convenience of description, only some but not all of the elements relevant to the present application are shown in the drawings.
Summary of the application
The startup file is the key for ensuring the normal startup and operation of the operating system, and any tiny loss and damage can cause the operating system to be incapable of being successfully started. At present, a startup file is often stored in a hard disk, and other files and the startup file are often stored in a mixed manner in daily work, so that viruses in the startup file are easily caused or mistakenly deleted, the startup file is finally damaged, and an operating system cannot be normally started. In the prior art, the soft RAID realized by the two hard disks has a soft RAID function only after the operating system is successfully started and the soft RAID simulation program is executed, however, the two hard disks cannot mirror-image the backup of the start file, and once the start file is damaged, the operating system cannot be accessed, which further causes a technical problem that the soft RAID function cannot be realized.
In view of the above technical problems, the technical solution provided by the present application has the following general idea:
the application provides a method for realizing a mirror function when a soft RAID logs in an OS, wherein the method comprises the following steps: respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other; and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function.
Having thus described the general principles of the present application, various non-limiting embodiments thereof will now be described in detail with reference to the accompanying drawings.
Example one
Referring to fig. 1, an embodiment of the present application provides a method for implementing a mirror function when a soft RAID logs in an OS, where the method specifically includes the following steps:
step S100: respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other;
specifically, the Operating System (OS) refers to a computer program for managing hardware and software resources of a computer, and is used to process basic transactions such as managing and configuring a memory, determining a priority order of supply and demand of System resources, controlling input devices and output devices, Operating a network, and managing a file System. The operating system starting file refers to all related files for managing software and hardware resource programs of the computer. The soft RAID is driven by a system and completes work through software, and the soft RAID has no operation processing function. The hard disk group of the soft RAID is a computer main storage device consisting of one or more aluminum or glass disks, and at least comprises a first hard disk and a second hard disk, but is not limited to two hard disks, and also comprises more than two hard disks. As shown in fig. 2, a hard disk schematic diagram of a soft RAID and a corresponding storage function partition are shown.
Respectively storing an operating system starting file into a first hard disk and a second hard disk in a hard disk group of the soft RAID, wherein the operating system starting file in the first hard disk is a first starting file, and the operating system starting file in the second hard disk is a second starting file. The first startup file and the second startup file are backups of each other, that is, the contents of the first startup file and the second startup file are consistent.
The starting files of the operating systems are stored in the two soft RAID hard disks, so that the technical effect that the hard disk systems can be accessed through the first starting file and the second starting file is achieved, namely the soft RAID can be realized through the starting files of the two operating systems.
Step S200: and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function.
Specifically, the contents of the first boot file and the second boot file are consistent, and the first boot file and the second boot file are stored in the first hard disk and the second hard disk, respectively. The Mirroring (Mirroring) is essentially a form of file storage, and is a type of redundancy, which means that data on one disk has an identical copy on another disk. The first boot file or the second boot file can enter an operating system, and because the system files are under the OS, the two system files in the first hard disk and the second hard disk can realize the soft RAID function and keep consistent. That is to say, the storage contents of the first hard disk and the second hard disk are completely consistent, and the task effects are also completely consistent, so that the first hard disk and the second hard disk realize the mirror image function, and the technical effect that the two hard disks are backup redundancy with each other is achieved.
Further, as shown in fig. 3, step S100 in the embodiment of the present application further includes:
step S110: starting an operating system through the first starting file to obtain a starting result;
step S120: judging whether the starting result is successful;
step S130: and when the starting result is failure, restarting the operating system through the second starting file.
Specifically, when the machine is started, the first hard disk is defaulted to start to enter the system, an operation system is firstly tried to be started through the first start-up file, if the start-up file in the first hard disk is damaged, the operation system cannot be started successfully, at this time, the BIOS is triggered to restart through the watchdog, the second hard disk is adjusted to start the system, and the operation system is restarted through the second start-up file in the second hard disk.
By the method for storing the operating system starting files in the plurality of hard disks in advance before the operating system is started, the operating system starting files have a backup function, the starting files in one hard disk are damaged, the starting files backed up in the other hard disk can also realize the normal starting of the operating system, the technical effect of reducing the starting failure rate of the operating system is achieved, and the normal running of the operating system is ensured.
Further, as shown in fig. 4, the step S120 of the embodiment of the present application further includes:
step S121: when the starting time reaches a preset time threshold value, obtaining a CPLD value;
step S122: when the CPLD value is a first set value, the starting result is failure;
step S123: and when the CPLD value is the second set value, the starting result is successful.
Specifically, in order to determine whether the result of starting the operating system by using the first start-up file is successful, the system is provided with a certain start-up time threshold in advance, and the preset time threshold is the time for starting the operating system by using the file under a normal condition. The CPLD is a programmable logic device with high density, high speed and low power consumption, which is formed by adopting programming technologies such as CMOS EPROM, EEPROM, flash memory, SRAM and the like. The CPLD is controlled by a Watch dog program. When the starting is carried out for a certain time, namely a preset time threshold value is reached, a watchdog dog in the BIOS is triggered, the watchdog dog is used for monitoring a CPLD value and carrying out corresponding operation according to the CPLD, a first set value is 1, a second set value is 0, when the CPLD value is 1, the watchdog triggers the machine to restart, and if the CPLD value is kept 0 unchanged, the identification system can enter by policy, namely the starting is successful. The CPLD value is obtained by triggering the program, so that the technical effect of quickly distinguishing the starting result of the operating system is achieved.
Further, as shown in fig. 5, when the start result is failure, the operating system is restarted by using the second start file, and step S120 in this embodiment of the present application further includes:
step S124: when the starting result is failure, triggering restarting information and simultaneously modifying the starting file into the second starting file;
step S125: and executing the restart information, and starting the operating system through the second starting file.
Specifically, when the starting result is failure, the information of restarting the operating system is automatically triggered, and meanwhile, the operating system starting file is modified into the second starting file. The same operating system starting files are stored in the two independent hard disks, so that the operating system has two independent starting ways, and the starting of the operating system can be smoothly completed as long as the two starting files are not damaged simultaneously, thereby achieving the technical effect of obviously improving the starting success rate of the operating system.
Further, when the start result is failure, after the operating system is restarted by using the second start file, step S120 in this embodiment of the present application further includes:
step S126: copying the second starting file in the second hard disk to the first hard disk, and repairing the first starting file.
Specifically, when the start of the operating system fails through the first start-up file in the first hard disk, the information of restarting the operating system is automatically triggered, and meanwhile, the start-up file of the operating system is modified into the second start-up file, that is, the operating system is automatically started by using the second start-up file in the second hard disk. After the first boot file is repaired, the first hard disk has a boot function, can be readjusted to restore the first hard disk to boot, and can also continue to maintain the second hard disk to boot, specifically, corresponding settings are performed according to the requirements of the machine operating system and the corresponding hard disk.
By the method for automatically repairing the damaged starting file by using the complete starting file, the starting file of the operating system has the repairing capability, and as long as not two starting files are damaged simultaneously, the starting of the operating system can be smoothly completed, so that the technical effect of adding a guarantee for the smooth starting of the operating system is achieved. Meanwhile, the method and the device are also suitable for the mirror image function of more than two hard disks, before the OS is logged in, the hard disks store a plurality of OS starting files, the backup function of the starting files is realized, the problem that the soft RAID cannot realize the mirror image function when the OS is logged in is solved, and the condition that the OS cannot be accessed to realize the mirror image function when the starting files of the OS disk are damaged is avoided.
Further, the first boot file is the same as the second boot file.
Specifically, the first boot file and the second boot file are stored in the first hard disk and the second hard disk respectively, and the first hard disk and the second hard disk realize a mirror image function, thereby achieving the technical effect that the two hard disks are backup redundancy each other. That is, the first boot file is the same as the second boot file. The technical effect of backing up the starting file is achieved.
To sum up, the method for implementing the mirror function when the soft RAID logs in the OS provided by the embodiment of the present application has the following technical effects:
1. respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other; and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function. The technical effects that the starting file is backed up before the operating system is started, and the operating system is automatically and normally logged in by the backed-up starting file when the system disk starting file is damaged are achieved.
2. The damaged starting file in the system disk is repaired by the backup starting file when the starting file of the system disk is damaged, so that the starting file in the system disk can smoothly start the operating system in the subsequent starting.
Example two
Based on the same inventive concept as the method for implementing the mirror function when the soft RAID logs in the OS in the foregoing embodiment, the present invention further provides a system for implementing the mirror function when the soft RAID logs in the OS, as shown in fig. 6, where the system includes:
a first storage unit 11, where the first storage unit 11 is configured to store operating system boot files in hard disk groups of a soft RAID respectively, where the hard disk groups at least include a first hard disk and a second hard disk, where the first hard disk has a first boot file therein, the second hard disk has a second boot file therein, and the first boot file and the second boot file are backed up with each other;
a first execution unit 12, where the first execution unit 12 is configured to enter an operating system through the first boot file or the second boot file, and the first hard disk and the second hard disk implement a mirror image function.
Further, the system further comprises:
the first obtaining unit is used for starting the operating system through the first starting file to obtain a starting result;
the first judging unit is used for judging whether the starting result is successful or not;
and the second execution unit is used for restarting the operating system through the second starting file when the starting result is failure.
Further, the system further comprises:
the second obtaining unit is used for obtaining a CPLD value when the starting time reaches a preset time threshold;
the second judgment unit is used for judging that the starting result is failure when the CPLD value is the first set value;
and the third judging unit is used for judging that the starting result is successful when the CPLD takes the value as the second set value.
Further, the system further comprises:
the third execution unit is used for triggering restart information and modifying a start file into the second start file when the start result is failure;
and the fourth execution unit is used for executing the restart information and starting the operating system through the second start-up file.
Further, the system further comprises:
a fifth execution unit, configured to copy the second boot file in the second hard disk to the first hard disk, and repair the first boot file.
Further, the first boot file is the same as the second boot file.
In this specification, each embodiment is described in a progressive manner, and the focus of each embodiment is on the difference from other embodiments, the foregoing method for implementing the mirror function when the soft RAID in the first embodiment of fig. 1 is used for implementing the mirror function when the soft RAID is logged in the OS, and the specific example are also applicable to the system for implementing the mirror function when the soft RAID is logged in the OS in this embodiment. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Exemplary electronic device
The electronic apparatus of the embodiment of the present application is described below with reference to fig. 7.
Fig. 7 illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application.
Based on the inventive concept of the method for implementing the mirror image function when the soft RAID logs in the OS in the foregoing embodiment, the present invention further provides a system for implementing the mirror image function when the soft RAID logs in the OS, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the computer program implements the steps of any one of the methods of the emergency plan method for nursing in a blood purification center as described above.
Where in fig. 7 a bus architecture (represented by bus 300), bus 300 may include any number of interconnected buses and bridges, bus 300 linking together various circuits including one or more processors, represented by processor 302, and memory, represented by memory 304. The bus 300 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 305 provides an interface between the bus 300 and the receiver 301 and transmitter 303. The receiver 301 and the transmitter 303 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium.
The processor 302 is responsible for managing the bus 300 and general processing, and the memory 304 may be used for storing data used by the processor 302 in performing operations.
The application provides a method for realizing a mirror function when a soft RAID logs in an OS, which is applied to a system for realizing the mirror function when the soft RAID logs in the OS, wherein the method comprises the following steps: respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other; and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function. The method solves the technical problems that soft RAID realized by two hard disks in the prior art has a soft RAID function only after an operating system is successfully started and a soft RAID simulation program is executed, but the two hard disks cannot mirror and backup a starting file, and once the starting file is damaged, the operating system cannot be accessed, so that the soft RAID function cannot be realized. The technical effects that the starting file is backed up before the operating system is started, the operating system is automatically logged in by the backed-up starting file when the starting file of the system disk is damaged, the damaged starting file in the system disk is repaired by the backed-up starting file, and the operating system can be started successfully by the starting file in the system disk next time are achieved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely software embodiment, an entirely hardware embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application is in the form of a computer program product that may be embodied on one or more computer-usable storage media having computer-usable program code embodied therewith. And such computer-usable storage media include, but are not limited to: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk Memory, a Compact Disc Read-Only Memory (CD-ROM), and an optical Memory.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. 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 a system 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 an instruction system 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. While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method for realizing a mirroring function when a soft RAID logs in an OS (operating system), wherein the method comprises the following steps:
respectively storing operating system startup files into hard disk groups of a soft RAID, wherein the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first startup file, the second hard disk is provided with a second startup file, and the first startup file and the second startup file are backups for each other;
and entering an operating system through the first boot file or the second boot file, wherein the first hard disk and the second hard disk realize a mirror image function.
2. The method of claim 1, wherein the method comprises:
starting an operating system through the first starting file to obtain a starting result;
judging whether the starting result is successful;
and when the starting result is failure, restarting the operating system through the second starting file.
3. The method of claim 2, wherein said determining whether said boot result was successful comprises:
when the starting time reaches a preset time threshold value, obtaining a CPLD value;
when the CPLD value is a first set value, the starting result is failure;
and when the CPLD value is the second set value, the starting result is successful.
4. The method of claim 2, wherein performing an operating system reboot through the second boot file when the boot result is a failure comprises:
when the starting result is failure, triggering restarting information and simultaneously modifying the starting file into the second starting file;
and executing the restart information, and starting the operating system through the second starting file.
5. The method of claim 2, wherein when the boot result is failure, after the operating system is restarted by the second boot file, the method comprises:
copying the second starting file in the second hard disk to the first hard disk, and repairing the first starting file.
6. The method of claim 1, wherein the first boot file is the same as the second boot file.
7. A system for realizing mirroring function when a soft RAID logs in an OS, wherein the system comprises:
a first storage unit: the first obtaining unit is used for respectively storing operating system boot files into hard disk groups of the soft RAID, the hard disk groups at least comprise a first hard disk and a second hard disk, the first hard disk is provided with a first boot file, the second hard disk is provided with a second boot file, and the first boot file and the second boot file are backups of each other;
a first execution unit: the first execution unit is used for entering an operating system through the first boot file or the second boot file, and the first hard disk and the second hard disk realize a mirror image function.
8. A system for implementing a mirror function when a soft RAID logs in an OS, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the program.
CN202110842801.2A 2021-07-26 2021-07-26 Method and system for realizing mirror function when soft RAID logs in OS Pending CN113504946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110842801.2A CN113504946A (en) 2021-07-26 2021-07-26 Method and system for realizing mirror function when soft RAID logs in OS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110842801.2A CN113504946A (en) 2021-07-26 2021-07-26 Method and system for realizing mirror function when soft RAID logs in OS

Publications (1)

Publication Number Publication Date
CN113504946A true CN113504946A (en) 2021-10-15

Family

ID=78014827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110842801.2A Pending CN113504946A (en) 2021-07-26 2021-07-26 Method and system for realizing mirror function when soft RAID logs in OS

Country Status (1)

Country Link
CN (1) CN113504946A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968358A (en) * 2012-11-13 2013-03-13 浪潮电子信息产业股份有限公司 Quick recovery method of soft RAID1 deployment system
CN111930399A (en) * 2020-07-24 2020-11-13 深圳Tcl数字技术有限公司 Operating system repair method, device, system and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968358A (en) * 2012-11-13 2013-03-13 浪潮电子信息产业股份有限公司 Quick recovery method of soft RAID1 deployment system
CN111930399A (en) * 2020-07-24 2020-11-13 深圳Tcl数字技术有限公司 Operating system repair method, device, system and computer readable storage medium

Similar Documents

Publication Publication Date Title
US7475282B2 (en) System and method for rapid restoration of server from back up
US7496783B1 (en) Merging cluster nodes during a restore
US9367400B2 (en) System reset
CN102439565B (en) Method and device for starting recovery
EP3769224B1 (en) Configurable recovery states
CN109361542B (en) Client fault processing method, device, system, terminal and server
CN111143132B (en) BIOS recovery method, device, equipment and readable storage medium
US20060036832A1 (en) Virtual computer system and firmware updating method in virtual computer system
US11803412B2 (en) Containerized application management system and management method
US7194614B2 (en) Boot swap method for multiple processor computer systems
GB2434888A (en) System for restoring a crashed client device by saving a configuration state to a server and creating a boot medium from the saved state.
CN108268302B (en) Method and device for realizing equipment starting
EP1110146B1 (en) A method, computer, and article of manufacturing for fault tolerant booting
US9933953B1 (en) Managing copy sessions in a data storage system to control resource consumption
CN112948169A (en) Data backup method, device, equipment and storage medium
WO2018059565A1 (en) Method and system for backing up flash memory data
EP3769225B1 (en) Free space pass-through
CN113504946A (en) Method and system for realizing mirror function when soft RAID logs in OS
CN114756355B (en) Method and device for automatically and quickly recovering process of computer operating system
CN109189444A (en) A kind of upgrade control method and device of the management node of server virtualization system
US20040010490A1 (en) Data transfer method
CN111382009B (en) Automatic system maintenance method and computer equipment with automatic maintenance function
CN113297318A (en) Data processing method and device, electronic equipment and storage medium
KR101564144B1 (en) Apparatus and method for managing firmware
TWI244031B (en) Booting switch method for computer system having multiple processors

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