CN114579151A - BMC dual-firmware mirror image synchronization method, device, equipment and storage medium - Google Patents

BMC dual-firmware mirror image synchronization method, device, equipment and storage medium Download PDF

Info

Publication number
CN114579151A
CN114579151A CN202210242509.1A CN202210242509A CN114579151A CN 114579151 A CN114579151 A CN 114579151A CN 202210242509 A CN202210242509 A CN 202210242509A CN 114579151 A CN114579151 A CN 114579151A
Authority
CN
China
Prior art keywords
firmware
partition
image
bmc
disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210242509.1A
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.)
Inspur Power Commercial Systems Co Ltd
Original Assignee
Inspur Power Commercial Systems 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 Inspur Power Commercial Systems Co Ltd filed Critical Inspur Power Commercial Systems Co Ltd
Priority to CN202210242509.1A priority Critical patent/CN114579151A/en
Publication of CN114579151A publication Critical patent/CN114579151A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The application discloses a BMC dual-firmware mirror synchronization method, device, equipment and storage medium, comprising: detecting whether a primary firmware partition image of a working disk and a standby firmware partition image of a mirror disk in RAID1 are complete; if the main firmware partition image of the working disk and the standby firmware partition image of the mirror disk in the RAID1 are complete, starting the BMC by calling the main firmware partition image, and acquiring target firmware data to be mirrored, which is generated in the normal running process of the BMC; and storing the target firmware data into a standby firmware partition of the mirror disk according to a partition mirror image mode. Therefore, according to the method and the device, the BMC dual-firmware mirror image data are stored in a partitioned mode through the two disks in the RAID1, the completeness and the synchronization of the BMC dual-firmware mirror image data can be guaranteed, and the stability of the server BMC is improved.

Description

BMC dual-firmware mirror image synchronization method, device, equipment and storage medium
Technical Field
The present application relates to the field of server technologies, and in particular, to a method, an apparatus, a device, and a storage medium for synchronizing dual firmware images of a BMC.
Background
Currently, with the rapid development of server technology, the monitoring and Management role of BMC (Baseboard Management Controller) in the server is more and more important. A large number of server manufacturers start to use Dual Image (i.e., Dual firmware) to ensure normal operation of the BMC, and operate in a primary/standby mode, and when a problem occurs in the primary firmware, the primary firmware may be switched to the standby firmware to operate. However, the function of the backup firmware is relatively single, and some data such as configuration files, log information, etc. require the main firmware and the backup firmware to use the same partition, i.e. a common partition, so when the common partition is damaged, the main firmware and the backup firmware may not work normally and the data of the common partition may be lost.
In summary, how to realize the integrity and synchronization of the BMC dual firmware image data and ensure the stable operation of the server BMC is a problem to be further solved at present.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device and a storage medium for synchronizing dual firmware images of a BMC, which can ensure integrity and synchronization of dual firmware image data of the BMC, and improve stability of a BMC of a server. The specific scheme is as follows:
in a first aspect, the present application discloses a BMC dual firmware image synchronization method, applied to a server, including:
detecting whether a primary firmware partition image of a working disk and a standby firmware partition image of a mirror disk in RAID1 are complete;
if the main firmware partition image of the working disk and the standby firmware partition image of the mirror disk in the RAID1 are complete, starting the BMC by calling the main firmware partition image, and acquiring target firmware data to be mirrored, which is generated in the normal running process of the BMC;
and storing the target firmware data into a standby firmware partition of the mirror disk according to a partition mirror image mode.
Optionally, the acquiring target firmware data to be mirrored, which is generated in the normal operation process of the BMC, includes:
and acquiring a configuration file and log information generated in the normal operation process of the BMC, and taking the configuration file and the log information as target firmware data to be mirrored.
Optionally, the BMC dual firmware image synchronization apparatus further includes:
adding a target service program created based on the RAID1 in a main business logic service program of the BMC, and initializing main firmware and standby firmware of the BMC to be the RAID1 when the target service program is executed.
Optionally, after detecting whether the primary firmware partition image of the working disk and the backup firmware partition image of the mirroring disk in RAID1 are complete, the method further includes:
if the primary firmware partition image of the working disk and the standby firmware partition image of the mirror disk in the RAID1 are incomplete, judging whether the primary firmware partition image or the standby firmware partition image is complete;
if the primary firmware partition mirror image or the standby firmware partition mirror image is complete, taking the complete partition mirror image as a target partition mirror image, and taking the other partition mirror image as an incomplete partition mirror image;
recovering the logical partition mirror image of the incomplete partition mirror image by using the logical partition mirror image of the target partition mirror image, and starting the BMC by using the logical partition mirror image of the target partition mirror image;
and acquiring firmware data to be mirrored, which is generated in the normal running process of the BMC and is started by using the logical partition mirror image of the target partition mirror image, and mirroring the firmware data partition to be mirrored to the data partition of the incomplete partition mirror image.
Optionally, the BMC dual firmware image synchronization apparatus further includes:
executing the target service program, judging whether the U-Boot is started within preset time, if not, setting a mirror image starting failure zone bit in the target service program, and executing the step of judging whether the main firmware partition mirror image or the standby firmware partition mirror image is complete.
Optionally, after the mirroring of the firmware data partition to be mirrored to the data partition of the incomplete partition mirroring, the method further includes:
and clearing the mirror image starting failure zone bit in the target service program.
Optionally, the BMC dual firmware image synchronization apparatus further includes:
when the BMC needs firmware upgrading, randomly selecting one disk from the working disk and the mirror image disk as a target disk, and taking the other disk as a disk to be upgraded;
upgrading the firmware in the target disk to obtain upgraded firmware, and setting a flag bit with synchronous all partitions in the upgraded firmware;
and when the BMC executes the upgraded firmware, storing all the partition images of the upgraded firmware in the target disk to the disk to be upgraded.
In a second aspect, the present application discloses a BMC dual firmware image synchronization device, applied to a server, including:
the mirror image detection module is used for detecting whether a main firmware partition mirror image of a working disk and a standby firmware partition mirror image of a mirror disk in RAID1 are complete;
a firmware data obtaining module, configured to, if the main firmware partition image of the working disk and the standby firmware partition image of the mirror disk in RAID1 are complete, start a BMC by calling the main firmware partition image, and obtain target firmware data to be mirrored, which is generated in a normal operation process of the BMC;
and the data storage module is used for storing the target firmware data into the standby firmware partition of the mirror disk in a partition mirror image mode.
In a third aspect, the present application discloses an electronic device comprising a processor and a memory; when the processor executes the computer program stored in the memory, the BMC dual firmware image synchronization method is realized.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; when being executed by a processor, the computer program realizes the BMC dual firmware image synchronization method.
It can be seen that, according to the application, whether a main firmware partition mirror image of a working disk in RAID1 and a standby firmware partition mirror image of a mirror disk are complete is detected, if the main firmware partition mirror image and the standby firmware partition mirror image of the mirror disk are located in the working disk in RAID1, a BMC is started by calling the main firmware partition mirror image, target firmware data to be mirrored generated in the normal running process of the BMC is acquired, and the target firmware data is stored in the standby firmware partition of the mirror disk in a partition mirror image manner. Therefore, according to the method and the device, the BMC dual-firmware mirror image data are stored in a partitioned mode through the two disks in the RAID1, the completeness and the synchronization of the BMC dual-firmware mirror image data can be guaranteed, and the stability of the server BMC is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a BMC dual firmware image synchronization method disclosed herein;
FIG. 2 is a diagram illustrating a specific RAID1 mirroring structure disclosed herein;
FIG. 3 is a flowchart of a specific BMC dual firmware image synchronization method disclosed herein;
FIG. 4 is a schematic diagram of a BMC dual firmware image synchronization apparatus according to the disclosure;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application discloses a BMC dual-firmware mirror synchronization method, which is applied to a server and is shown in figure 1, and the method comprises the following steps:
step S11: a check is made to see if the primary firmware partition image of the working disk and the backup firmware partition image of the mirrored disk are complete in RAID 1.
In this embodiment, first, dual firmware (i.e., main firmware and standby firmware) of the BMC needs to be allocated to two disks (i.e., a working disk and a mirror disk) located in RAID1 (i.e., a disk mirror), and a mirror structure of the two disks of RAID1 after allocation is shown in fig. 2, where the two disks include firmware 1 (i.e., the main firmware) and firmware 2 (i.e., the standby firmware), firmware data in the firmware 1 and the firmware 2 are both stored in a partitioned manner, the firmware 1 is located in the working disk of RAID1, and the firmware 2 is located in the mirror disk of RAID 1. It will be appreciated that since firmware 2 is an image of firmware 1 as backup firmware, the partition present in firmware 1 is also present in firmware 2, as in firmware 1 located on a RAID1 working disk in fig. 2, which includes two logical partitions and two data partitions, firmware 2 located on a RAID1 image disk should include the same partition as firmware 1, i.e., the two logical partitions and the two data partitions.
It should be noted that, in general, the firmware of the BMC may be burned or upgraded into a flash (hard disk) through a burner or a WEB page of the BMC, which is equivalent to installing an operating system for the flash, and after the burning or upgrading is completed, various logic partitions and data partitions may be formed, where the flash partition of the BMC mainly includes: the boot partition is used for storing bootloaders (namely boot loaders) and belongs to the logic partition; the kernel partition is used for storing the Linux kernel and belongs to the logic partition; a rofs (read only file system) partition for storing necessary executable files, such as configuration files required by the Linux system, belongs to the logical partition; an rwfs-log partition belonging to the data partition (i.e., read write file system-log, log partition of a read-write file system); an rwfs-conf partition (a profile partition of a read-write file system) belonging to a data partition. Thus, logical partitions and data partitions located in the primary firmware partition image and the backup firmware partition image in RAID1 include, but are not limited to, boot partitions, kernel partitions, ROFS partitions, rwfs-log partitions, rwfs-conf partitions, and the like.
In this embodiment, after the dual firmware of the BMC is respectively allocated to the two disks located in RAID1, further, the integrity of the firmware partition images (i.e., the primary firmware partition image of the working disk and the backup firmware partition image of the mirror disk) located in the two disks of RAID1 is detected. In a particular embodiment, the integrity of the primary firmware partition image of the working disk and the backup firmware partition image of the mirrored disk located in RAID1 may be checked by the kernel portion.
In this embodiment, before detecting whether the primary firmware partition image of the working disk and the backup firmware partition image of the mirror disk in RAID1 are complete, the method specifically further includes: adding a target service program created based on the RAID1 in a main business logic service program of the BMC, and initializing a main firmware and a standby firmware of the BMC to be the RAID1 when the target service program is executed. Specifically, according to the application, firstly, a target service program needs to be created based on RAID1, the target service program is used for respectively allocating dual firmware of a BMC to two disks of RAID1, then the created target service program is added to a main business logic service program of the BMC, after an operating system is powered on, a U-Boot (i.e., a Universal Boot Loader for an embedded system) starts a watchdog, and starts to Boot a kernel of the BMC to start a whole BMC system, i.e., the main business logic service program, after the BMC system is successfully started, related monitoring management software and a WEB server are operated, the watchdog is fed, the target service program is created based on RAID1, and after the target service program is started, the dual firmware (i.e., main firmware and standby firmware) of the BMC is initialized to RAID 1.
Step S12: if the main firmware partition image of the working disk and the standby firmware partition image of the mirror disk in the RAID1 are complete, the BMC is started by calling the main firmware partition image, and target firmware data to be mirrored, which is generated in a normal operation process of the BMC, is acquired.
In this embodiment, if the main firmware partition image of the working disk in RAID1 and the standby firmware partition image of the mirroring disk are complete, that is, the partition image data of the main firmware and the standby firmware in the two disks of RAID1 are complete, the BMC may be further started by calling a logic partition in the main firmware partition image, and then target firmware data to be mirrored, which is generated by the BMC in a normal operation process, is acquired.
In a specific embodiment, the obtaining target firmware data to be mirrored, which is generated in a normal operation process of the BMC, may specifically include: and acquiring a configuration file and log information generated in the normal operation process of the BMC, and taking the configuration file and the log information as target firmware data to be mirrored. In this embodiment, after the BMC is started by calling the logical partition in the main firmware partition image, log information generated by the BMC in a normal operation process and a configuration file generated by user modification configuration may be further collected, and the collected log information and the collected configuration file are used as target firmware data to be mirrored.
Step S13: and storing the target firmware data into a standby firmware partition of the mirror disk according to a partition mirror image mode.
In this embodiment, after target firmware data to be mirrored, which is generated during the normal operation of the BMC, is acquired, the target firmware data is stored in a standby firmware partition of the mirror disk in a partition mirroring manner. For example, in the normal operation process of the BMC, if a user modifies the configuration of the firmware 1 in fig. 2, the configuration file generated after modification is stored in the data partition 1, and the partition corresponding to the firmware 2 is also modified correspondingly, that is, the configuration file is added to the data partition 1 of the firmware 2.
Further, the BMC dual firmware image synchronization method may further include: when the BMC needs firmware upgrading, one disk is randomly selected from the working disk and the mirror image disk to serve as a target disk, and the other disk serves as a disk to be upgraded; upgrading the firmware in the target disk to obtain upgraded firmware, and setting a flag bit with synchronous all partitions in the upgraded firmware; when the updated firmware is executed by the BMC, storing all partition images of the updated firmware in the target disk to the disk to be updated. In this embodiment, when the dual firmware in the BMC needs to be upgraded, in order to reduce the upgrade time, one disk may be randomly selected from a working disk and a mirror disk of RAID1 as a target disk, the other disk is used as a disk to be upgraded, then the firmware in the target disk is upgraded to obtain an upgraded firmware, that is, only one firmware of the BMC is upgraded, then a flag bit for synchronizing all partitions is set in the upgraded firmware, and when the BMC executes the upgraded firmware, it is found that the flag bit for synchronizing all partitions exists in the upgraded firmware, then all partitions of the upgraded firmware in the target disk are mirror-stored in the disk to be upgraded, that is, both the two pieces of firmware in the BMC are upgraded.
It can be seen that, in the embodiment of the present application, it is first detected whether a main firmware partition mirror image of a working disk located in RAID1 and a standby firmware partition mirror image of a mirror disk are complete, and if the main firmware partition mirror image of the working disk located in RAID1 and the standby firmware partition mirror image of the mirror disk are complete, a BMC is started by calling the main firmware partition mirror image, target firmware data to be mirrored generated in a normal operation process of the BMC is acquired, and then the target firmware data is stored in the standby firmware partition of the mirror disk in a partition mirror image manner. Therefore, according to the embodiment of the application, the BMC dual-firmware mirror image data are stored in a partitioned mode through the two disks in the RAID1, the completeness and the synchronization of the BMC dual-firmware mirror image data can be guaranteed, and the stability of the server BMC is improved.
The embodiment of the application discloses a specific method for synchronizing dual firmware images of a BMC (baseboard management controller), which is shown in fig. 3 and comprises the following steps:
step S21: a check is made to see if the primary firmware partition image of the working disk and the backup firmware partition image of the mirrored disk are complete in RAID 1.
Step S22: if the primary firmware partition image of the working disk and the backup firmware partition image of the mirror disk in the RAID1 are incomplete, determining whether the primary firmware partition image or the backup firmware partition image is complete.
In this embodiment, if the primary firmware partition image of the working disk and the backup firmware partition image of the mirror disk in RAID1 are incomplete, the integrity of the primary firmware partition image and the integrity of the backup firmware partition image are respectively determined.
In this embodiment, the method for synchronizing dual firmware images of a BMC may further include: executing the target service program, judging whether the U-Boot is started within preset time, if not, setting a mirror image starting failure zone bit in the target service program, and executing the step of judging whether the main firmware partition mirror image or the standby firmware partition mirror image is complete. Specifically, after executing a target service program created based on RAID1, if the U-Boot is not started within a preset time, if the U-Boot is not started within 5 minutes, that is, if the U-Boot does not successfully feed a dog to the watchdog of the U-Boot, it indicates that at least one of the main firmware partition image and the spare firmware partition image is incomplete, and the U-Boot sets an image start failure flag bit in the target service program, and then executes the step of determining whether the main firmware partition image or the spare firmware partition image is complete, that is, determines whether there is a complete firmware partition image capable of starting the BMC in two disks of RAID 1.
Step S23: and if the primary firmware partition mirror image or the standby firmware partition mirror image is complete, taking the complete partition mirror image as a target partition mirror image, and taking the other partition mirror image as an incomplete partition mirror image.
In this embodiment, if a complete partition image exists in the primary firmware partition image and the backup firmware partition image, the complete partition image is used as a target partition image, and the other partition image is used as an incomplete partition image.
Step S24: and recovering the logical partition image of the incomplete partition image by using the logical partition image of the target partition image, and starting the BMC by using the logical partition image of the target partition image.
In this embodiment, if the primary firmware partition image or the backup firmware partition image is complete, the complete partition image is used as a target partition image, and another partition image is used as an incomplete partition image, and further, the logical partition image of the incomplete partition image may be recovered by using the logical partition image of the target partition image, that is, the incomplete partition image is recovered by using the complete partition image, and then the BMC is started by using the logical partition image of the target partition image.
Step S25: and acquiring firmware data to be mirrored, which is generated in the normal running process of the BMC and is started by using the logical partition mirror image of the target partition mirror image, and mirroring the firmware data partition to be mirrored to the data partition of the incomplete partition mirror image.
In this embodiment, after the BMC is started by using the logical partition image of the target partition image, firmware data to be mirrored, which is generated in a normal operation process when the BMC is started by using the logical partition image of the target partition image, is acquired, and the firmware data to be mirrored is stored in the data partition of the incomplete partition image in a partition image manner. The firmware data to be mirrored includes, but is not limited to, configuration files, log information and other data.
In this embodiment, after mirroring the firmware data partition to be mirrored to the data partition of the incomplete partition mirroring, the method further includes: and clearing the mirror image starting failure flag bit in the target service program. It is understood that, in order to improve the utilization rate of RAID1 disk resources, the image start failure flag bit in the target service program may be deleted after the incomplete partition image is restored by using the complete partition image.
For a more specific processing procedure of the step S21, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that, in the embodiment of the present application, when it is detected that the primary firmware partition image and the backup firmware partition image located in RAID1 are incomplete, it is further determined whether the primary firmware partition image or the backup firmware partition image is complete, and if there is a complete partition image, the logical partition image of the incomplete partition image is recovered by using the logical partition image of the complete partition image, and the firmware data image to be mirrored, which is generated in the normal operation process of the BMC, is stored in the data partition of the incomplete partition image. Therefore, according to the embodiment of the application, the two disks in the RAID1 are used for respectively storing the BMC dual firmware image data in a partitioned manner, a logical partition with a problem can be automatically repaired, and integrity and synchronization of the BMC dual firmware image data are guaranteed.
Correspondingly, an embodiment of the present application further discloses a BMC dual firmware image synchronization device, which is applied to a server, and as shown in fig. 4, the device includes:
the image detection module 11 is configured to detect whether a primary firmware partition image of a working disk and a backup firmware partition image of a mirror disk in RAID1 are complete;
the firmware data obtaining module 12 is configured to, if the main firmware partition image of the working disk and the standby firmware partition image of the mirror disk in the RAID1 are complete, start the BMC by calling the main firmware partition image, and obtain target firmware data to be mirrored, which is generated in a normal operation process of the BMC;
and a data storage module 13, configured to store the target firmware data in a spare firmware partition of the mirror disk according to a partition mirror manner.
For the specific work flow of each module, reference may be made to corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that, in this embodiment of the present application, whether a main firmware partition image of a working disk located in RAID1 and a standby firmware partition image of a mirror disk are complete is detected first, and if the main firmware partition image of the working disk located in RAID1 and the standby firmware partition image of the mirror disk are complete, a BMC is started by calling the main firmware partition image, target firmware data to be mirrored, which is generated in a normal operation process of the BMC, is acquired, and then the target firmware data is stored in the standby firmware partition of the mirror disk in a partition image manner. Therefore, according to the embodiment of the application, the BMC dual-firmware mirror image data are stored in a partitioned mode through the two disks in the RAID1, the completeness and the synchronization of the BMC dual-firmware mirror image data can be guaranteed, and the stability of the server BMC is improved.
In some specific embodiments, the obtaining target firmware data to be mirrored, which is generated in the normal operation process of the BMC, may specifically include:
the first firmware data acquisition unit is used for acquiring a configuration file and log information generated in the normal operation process of the BMC and taking the configuration file and the log information as target firmware data to be mirrored.
In some specific embodiments, the BMC dual firmware image synchronization apparatus may further include:
a program adding unit, configured to add a target service program created based on the RAID1 to a main business logic service program of the BMC;
an initialization unit, configured to initialize the main firmware and the standby firmware of the BMC to the RAID1 when the target service program is executed.
In some specific embodiments, after the mirror image detection module 11, the method may further include:
a first determining unit, configured to determine whether the primary firmware partition image or the backup firmware partition image of a working disk in RAID1 is complete if the primary firmware partition image of the working disk and the backup firmware partition image of a mirror disk in RAID1 are incomplete;
a partition mirror image determining unit, configured to, if the primary firmware partition mirror image or the backup firmware partition mirror image is complete, take the complete partition mirror image as a target partition mirror image, and take another partition mirror image as an incomplete partition mirror image;
the partition mirror image recovery unit is used for recovering the logical partition mirror image of the incomplete partition mirror image by using the logical partition mirror image of the target partition mirror image and starting the BMC by using the logical partition mirror image of the target partition mirror image;
the second firmware data acquisition unit is used for acquiring firmware data to be mirrored, which is generated in the process of starting the normal operation of the BMC by using the logical partition mirror image of the target partition mirror image;
and the first firmware data storage unit is used for mirroring the firmware data partition to be mirrored to the data partition of the incomplete partition mirror.
In some specific embodiments, the BMC dual firmware image synchronization apparatus may further include:
the second judgment unit is used for executing the target service program and judging whether the U-Boot is started within the preset time;
and the first flag setting unit is used for setting a mirror image starting failure flag in the target service program if the U-Boot is not started in the preset time, and executing the step of judging whether the mirror image of the main firmware partition or the mirror image of the standby firmware partition is complete.
In some embodiments, after the firmware data saving unit, the method further includes:
and the clearing unit is used for clearing the mirror image starting failure zone bit in the target service program.
In some specific embodiments, the BMC dual firmware image synchronization apparatus may further include:
the target disk determining unit is used for randomly selecting one disk from the working disk and the mirror image disk as a target disk and taking the other disk as a disk to be upgraded when the BMC needs firmware upgrade;
the firmware upgrading unit is used for upgrading the firmware in the target disk to obtain upgraded firmware;
the second flag bit setting unit is used for setting a flag bit for synchronizing all partitions in the upgraded firmware;
and the second firmware data storage unit is used for storing all the partition images of the upgraded firmware in the target disk to the disk to be upgraded when the BMC executes the upgraded firmware.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 5 is a block diagram of an electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, and the computer program is loaded and executed by the processor 21 to implement relevant steps in the BMC dual firmware image synchronization method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, Netware, Unix, Linux, or the like. The computer programs 222 may further include computer programs that can be used to perform other specific tasks in addition to the computer programs that can be used to perform the BMC dual firmware image synchronization method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the BMC dual firmware image synchronization method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. 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.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. 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 present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The BMC dual firmware image synchronization method, apparatus, device and storage medium provided by the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A BMC dual firmware image synchronization method is applied to a server and comprises the following steps:
detecting whether a primary firmware partition image of a working disk and a standby firmware partition image of a mirror disk in RAID1 are complete;
if the main firmware partition image of the working disk and the standby firmware partition image of the mirror disk in the RAID1 are complete, starting the BMC by calling the main firmware partition image, and acquiring target firmware data to be mirrored, which is generated in the normal running process of the BMC;
and storing the target firmware data into a standby firmware partition of the mirror disk according to a partition mirror image mode.
2. The BMC dual firmware image synchronization method of claim 1, wherein the acquiring target firmware data to be imaged generated in a normal operation process of the BMC includes:
and acquiring a configuration file and log information generated in the normal operation process of the BMC, and taking the configuration file and the log information as target firmware data to be mirrored.
3. The BMC dual firmware image synchronization method of claim 1, further comprising:
adding a target service program created based on the RAID1 in a main business logic service program of the BMC, and initializing a main firmware and a standby firmware of the BMC to be the RAID1 when the target service program is executed.
4. The BMC dual firmware image synchronization method of claim 3, wherein after detecting whether the primary firmware partition image of the working disk and the backup firmware partition image of the mirror disk in RAID1 are complete, further comprising:
if the primary firmware partition image of the working disk and the standby firmware partition image of the mirror disk in the RAID1 are incomplete, judging whether the primary firmware partition image or the standby firmware partition image is complete;
if the primary firmware partition mirror image or the standby firmware partition mirror image is complete, taking the complete partition mirror image as a target partition mirror image, and taking the other partition mirror image as an incomplete partition mirror image;
recovering the logical partition mirror image of the incomplete partition mirror image by using the logical partition mirror image of the target partition mirror image, and starting the BMC by using the logical partition mirror image of the target partition mirror image;
and acquiring firmware data to be mirrored, which is generated in the normal running process of the BMC and is started by using the logical partition mirror image of the target partition mirror image, and mirroring the firmware data partition to be mirrored to the data partition of the incomplete partition mirror image.
5. The BMC dual firmware image synchronization method of claim 4, further comprising:
executing the target service program, judging whether the U-Boot is started within preset time, if not, setting a mirror image starting failure zone bit in the target service program, and executing the step of judging whether the main firmware partition mirror image or the standby firmware partition mirror image is complete.
6. The BMC dual firmware image synchronization method of claim 5, wherein after mirroring the firmware data partition to be mirrored into the data partition of the incomplete partition mirror, further comprising:
and clearing the mirror image starting failure zone bit in the target service program.
7. The BMC dual firmware image synchronization method of any of claims 1 to 6, further comprising:
when the BMC needs firmware upgrading, one disk is randomly selected from the working disk and the mirror image disk to serve as a target disk, and the other disk serves as a disk to be upgraded;
upgrading the firmware in the target disk to obtain upgraded firmware, and setting a flag bit with synchronous all partitions in the upgraded firmware;
and when the BMC executes the upgraded firmware, storing all the partition images of the upgraded firmware in the target disk to the disk to be upgraded.
8. A BMC dual firmware image synchronization device is applied to a server and comprises:
the mirror image detection module is used for detecting whether a main firmware partition mirror image of a working disk and a standby firmware partition mirror image of a mirror disk in RAID1 are complete;
a firmware data obtaining module, configured to, if the main firmware partition image of the working disk and the standby firmware partition image of the mirror disk in RAID1 are complete, start a BMC by calling the main firmware partition image, and obtain target firmware data to be mirrored, which is generated in a normal operation process of the BMC;
and the data storage module is used for storing the target firmware data into a standby firmware partition of the mirror disk in a partition mirror image mode.
9. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the BMC dual firmware image synchronization method of any of claims 1-7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the BMC dual firmware image synchronization method of any of claims 1 to 7.
CN202210242509.1A 2022-03-11 2022-03-11 BMC dual-firmware mirror image synchronization method, device, equipment and storage medium Pending CN114579151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210242509.1A CN114579151A (en) 2022-03-11 2022-03-11 BMC dual-firmware mirror image synchronization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210242509.1A CN114579151A (en) 2022-03-11 2022-03-11 BMC dual-firmware mirror image synchronization method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114579151A true CN114579151A (en) 2022-06-03

Family

ID=81781200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210242509.1A Pending CN114579151A (en) 2022-03-11 2022-03-11 BMC dual-firmware mirror image synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114579151A (en)

Similar Documents

Publication Publication Date Title
EP2444902B1 (en) Self-managed processing device
JP5113700B2 (en) Firmware update apparatus and method
WO2017049828A1 (en) Method, device and system for data processing based on linux
US10430082B2 (en) Server management method and server for backup of a baseband management controller
EP1879109A1 (en) Information processing device, program, and storage medium
US11803412B2 (en) Containerized application management system and management method
CN102439565A (en) Method and device for starting recovery
CN110780942A (en) System starting method and device, node equipment and computer readable storage medium
KR101576370B1 (en) System and method for remote restoration of computer system, and computer-readable recording medium with program therefor
CN114579151A (en) BMC dual-firmware mirror image synchronization method, device, equipment and storage medium
KR20160059181A (en) Apparatus and method for controlling updating software of AVN system in vehicle
US20160004607A1 (en) Information processing apparatus and information processing method
CN113377425A (en) BMC firmware generation method and device, BMC starting method and device and storage medium
CN112328429A (en) Hard disk snapshot method and device based on Openstack
CN113342365A (en) Operating system deployment method, device, equipment and computer-readable storage medium
US20030237021A1 (en) Automatic restoration of software applications in a mobile computing device
CN112685063B (en) Feature library updating method, device, network equipment and readable storage medium
US20240053992A1 (en) Systems and Methods for Automated Operating System Migration
US10585601B2 (en) Information processing apparatus, storage apparatus, and information processing system wherein virtual volume to physical volume mapping is updated from management machine responsive to storage indicating said physical volume is not present
CN117234808A (en) Processing method for improving performance of server system, electronic equipment and storage medium
KR100947136B1 (en) Incremental provisioning of software
CN117666950A (en) Hard disk data migration method, device, medium and NAS equipment
CN117492920A (en) Control method, device, equipment and medium of cloud platform
CN116661818A (en) Upgrading method and device of BMC software system and storage medium
CN117032790A (en) Virtualization system version synchronization method, device, equipment and 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