CN114237695B - Server system version switching method, device, electronic device and storage medium - Google Patents
Server system version switching method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN114237695B CN114237695B CN202111572008.1A CN202111572008A CN114237695B CN 114237695 B CN114237695 B CN 114237695B CN 202111572008 A CN202111572008 A CN 202111572008A CN 114237695 B CN114237695 B CN 114237695B
- Authority
- CN
- China
- Prior art keywords
- server
- version
- starting
- image
- list
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a server system version switching method, a device, electronic equipment and a storage medium, which relate to the technical field of server control and are used for creating a starting list and a starting item, generating a target system image in a system pool, creating a snapshot interface for the target system image, cloning a server system image for a server based on the target system image, sending a version switching instruction to the server so that the server can acquire the target system image corresponding to a specified system version from the system pool based on the snapshot interface or set the starting item corresponding to the specified system version as a default starting item based on a logic unit number in the starting list corresponding to the server, and sending a restarting instruction to the server so as to switch the system version to the specified system version after the server is restarted. By adopting the method provided by the embodiment of the application, the switching efficiency of the server system version can be improved.
Description
Technical Field
The present application relates to the field of server control, and in particular, to a method and apparatus for switching versions of a server system, an electronic device, and a storage medium.
Background
The super fusion infrastructure (Hyper Converged Infrastructure or abbreviated as 'HCI') refers to that resources and technologies such as computing, network, storage, server virtualization and the like are not only provided in the same set of unit equipment, but also elements such as backup software, snapshot technology, repeated data deletion, online data compression and the like are included, and multiple sets of unit equipment can be aggregated through the network to realize modularized seamless transverse expansion so as to form a uniform resource pool. When a server using a super fusion architecture is used, environment deployment needs to be performed every time a system version is replaced, so that the system version switching efficiency is low.
Disclosure of Invention
The embodiment of the application aims to provide a method and a device for switching versions of a server system, electronic equipment and a storage medium, which are used for improving the efficiency of switching the versions of the system.
In a first aspect, an embodiment of the present application provides a server system version switching method, which is applied to a management terminal, where the method may include:
creating a starting list and a starting item, wherein a default starting item is set in the starting list, the starting list corresponds to a server, and the starting item corresponds to a version of system image;
generating a target system image in a system pool, and creating a snapshot interface for the target system image;
Cloning a server system mirror image for the server based on the target system mirror image, configuring a logic unit number for the server system mirror image, and injecting the logic unit number into the starting list;
Transmitting a version switching instruction to the server so that the server obtains the target system image corresponding to a specified system version from the system pool based on the snapshot interface, or sets the starting item corresponding to the specified system version as the default starting item based on the logical unit number in the starting list corresponding to the server;
And sending a restarting instruction to the server so as to switch the system version to the appointed system version after the server is restarted.
In the implementation process, the installation and deployment operation of the operating system is removed through the snapshot interface and the mode of switching the target storage medium, and the operating system is protected by utilizing the characteristic of distributed storage and can be subjected to version switching or version rollback on multiple data by using the snapshot technology, so that the efficiency and the safety of system version switching can be improved.
Optionally, before the creating the start list and the start item, and setting a default start item in the start list, the method may further include:
Creating a mirror image pool and a system pool;
the generating the target system image in the system pool may include:
exporting a system disk as a basic mirror image;
Converting the basic mirror image into an original format mirror image, and importing the original format mirror image into the mirror image pool;
The original format image is cloned from the image pool to the system pool in a completely cloned manner to serve as the target system image.
In the implementation process, the security of the operating system can be ensured by generating the target system image and creating the snapshot interface for the target system image, and the server system can be rolled back through the snapshot, so that the operating system can be rolled back on multiple data while protecting the operating system disk by using the snapshot technology, and the efficiency of switching the server version is improved.
Optionally, the creating a start list and a start item, and setting a default start item in the start list may include:
Creating a host group, and adding all servers in the host group;
Binding the host group and the starting list, and creating starting items in the starting list, wherein each starting item binds one version of the system image;
creating a start list corresponding to the physical address of the host network card in the transmission server, so as to provide the start list to the server when the transmission server receives the download request.
In the implementation process, through setting the corresponding relation between the starting list and the starting item and the host set and the system mirror image, the operating system of the corresponding version can be automatically obtained from the starting list when the system version is updated, so that the switching of the operating version of the server is realized.
Optionally, an embodiment of the present application provides a server system version switching method applied to a server, where the method may include:
receiving a version switching instruction, acquiring a target system image corresponding to a specified system version from a system pool based on a preset snapshot interface, or setting a starting item corresponding to the specified system version as a default starting item based on a logic unit number in a starting list corresponding to a server;
and receiving a restart instruction to switch the system version to the specified system version after restarting.
In the implementation process, the installation and deployment operation of the operating system is removed through the snapshot interface and the mode of switching the target storage medium, and the operating system is protected by utilizing the characteristic of distributed storage and can be subjected to version switching or version rollback on multiple data by using the snapshot technology, so that the efficiency and the safety of system version switching can be improved.
Optionally, the obtaining, based on the preset snapshot interface, the target system image corresponding to the specified system version from the system pool, or setting, based on the logical unit number, the startup item corresponding to the specified system version as a default startup item in the startup list corresponding to the server includes:
When the difference value of the version numbers of the current system version and the appointed system version is smaller than a preset difference value, acquiring a target system image corresponding to the appointed system version from a system pool based on a preset snapshot interface;
And when the difference value of the version numbers of the current system version and the appointed system version is not smaller than a preset difference value, setting the starting item corresponding to the appointed system version as a default starting item based on the logic unit number in a starting list corresponding to the server.
In the implementation process, the security of the operating system can be ensured by generating the target system image and creating the snapshot interface for the target system image, and the server system can be rolled back through the snapshot, so that the operating system can be rolled back on multiple data while protecting the operating system disk by using the snapshot technology, and the efficiency of switching the server version is improved.
Optionally, the switching the system version to the specified system version after the reboot may include:
Reloading the disk application service based on the restarting instruction, and acquiring protocol information from the management terminal;
Acquiring the starting list from a transmission server based on the protocol information;
reading starting information from a target storage medium based on a default starting item in the starting list;
starting a kernel of the server based on the starting information, and connecting with the target storage medium according to kernel starting parameters;
partition information, device information, root file system information, and drive information are loaded from the target storage medium to switch the system version to the instruction system version.
In the implementation process, the system version is switched based on the distributed storage and the mode of switching the target storage medium by associating the starting information with the target storage medium, so that the situation that multiple system versions need to be frequently installed and deployed in a super fusion test scene can be avoided, and the system version switching efficiency is improved.
In a second aspect, an embodiment of the present application provides a server system version switching device, where the device may include:
The system comprises a creation module, a system pool and a system pool, wherein the creation module is used for creating a starting list and a starting item, setting a default starting item in the starting list, wherein the starting list corresponds to a server, and the starting item corresponds to a version of system image;
the configuration module is used for cloning a server system mirror image for the server based on the target system mirror image, configuring a logic unit number for the server system mirror image, and injecting the logic unit number into the starting list;
The system comprises a server, a command sending module, a server and a restart command, wherein the server is used for sending a version switching command to the server so that the server obtains the target system image corresponding to a specified system version from the system pool based on the snapshot interface, or sets the starting item corresponding to the specified system version as the default starting item based on the logical unit number in the starting list corresponding to the server, and the restart command is sent to the server so as to switch the system version to the specified system version after the server is restarted.
In the implementation process, the installation and deployment operation of the operating system is removed through the snapshot interface and the mode of switching the target storage medium, and the operating system is protected by utilizing the characteristic of distributed storage and can be subjected to version switching or version rollback on multiple data by using the snapshot technology, so that the efficiency and the safety of system version switching can be improved.
Optionally, the server system version switching device may further include:
And the storage pool creation module is used for creating a mirror pool and a system pool.
The creation module may be to:
The method comprises the steps of exporting a system disk as a basic image, converting the basic image into an original format image, importing the original format image into an image pool, and cloning the original format image from the image pool to the system pool in a complete cloning mode to serve as the target system image.
In the implementation process, the security of the operating system can be ensured by generating the target system image and creating the snapshot interface for the target system image, and the server system can be rolled back through the snapshot, so that the operating system can be rolled back on multiple data while protecting the operating system disk by using the snapshot technology, and the efficiency of switching the server version is improved.
Optionally, the creation module is further operable to:
The method comprises the steps of creating a host group, adding all servers in the host group, binding the host group and a start list, creating start items in the start list, binding one version of the system mirror image by each start item, and creating a start list corresponding to the physical address of a host network card in a transmission server so as to provide the start list for the server when the transmission server receives a downloading request.
In the implementation process, through setting the corresponding relation between the starting list and the starting item and the host set and the system mirror image, the operating system of the corresponding version can be automatically obtained from the starting list when the system version is updated, so that the switching of the operating version of the server is realized.
Optionally, an embodiment of the present application provides a server system version switching device applied to a server, where the device may include:
The system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a version switching instruction, acquiring a target system image corresponding to a specified system version from a system pool based on a preset snapshot interface, or setting a starting item corresponding to the specified system version as a default starting item based on a logic unit number in a starting list corresponding to one server, wherein the starting item corresponds to one version of system image, the system pool comprises the target system image, the server clones the server system image based on the target system image, the server system image corresponds to a logic unit number, and the logic unit number is set in the starting list;
and the second receiving module is used for receiving a restarting instruction so as to switch the system version to the appointed system version after restarting.
In the implementation process, the installation and deployment operation of the operating system is removed through the snapshot interface and the mode of switching the target storage medium, and the operating system is protected by utilizing the characteristic of distributed storage and can be subjected to version switching or version rollback on multiple data by using the snapshot technology, so that the efficiency and the safety of system version switching can be improved.
Alternatively, the first receiving module may be specifically configured to:
And when the difference value of the version numbers of the current system version and the appointed system version is not less than the preset difference value, setting a starting item corresponding to the appointed system version as a default starting item based on a logic unit number in a starting list corresponding to a server.
In the implementation process, the security of the operating system can be ensured by generating the target system image and creating the snapshot interface for the target system image, and the server system can be rolled back through the snapshot, so that the operating system can be rolled back on multiple data while protecting the operating system disk by using the snapshot technology, and the efficiency of switching the server version is improved.
Alternatively, the second receiving module may be specifically configured to:
the method comprises the steps of obtaining a starting list from a transmission server based on protocol information, reading starting information from a target storage medium based on a default starting item in the starting list, starting a kernel of the server based on the starting information and connecting with the target storage medium according to kernel starting parameters, and loading partition information, equipment information, root file system information and driving information from the target storage medium to switch a system version into the instruction system version.
In the implementation process, the system version is switched based on the distributed storage and the mode of switching the target storage medium by associating the starting information with the target storage medium, so that the situation that multiple system versions need to be frequently installed and deployed in a super fusion test scene can be avoided, and the system version switching efficiency is improved.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores program instructions, and when the processor reads and executes the program instructions, the processor executes the steps in any implementation manner described above.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having stored therein computer program instructions which, when read and executed by a processor, perform the steps of any of the above implementations.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a system version switching method applied to a management terminal according to an embodiment of the present application;
FIG. 2 is a schematic diagram of steps for generating a target system image according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating steps for setting a startup list according to an embodiment of the present application;
FIG. 4 is a flowchart of a system version switching between multiple servers in a super-converged architecture according to an embodiment of the present application;
Fig. 5 is a schematic step diagram of a server system version switching method applied to a server according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating steps for switching a specified system version according to an embodiment of the present application;
fig. 7 is a schematic diagram of a server system version switching device according to an embodiment of the present application;
Fig. 8 is a schematic diagram of a server system version switching device applied to a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. For example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
In the research process, the applicant finds that when the version switching or rollback is performed on the servers of the super-fusion architecture, one-to-one installation is required on bare computers and an operating system mirror image is manufactured, when the number of the servers is large, a long time is required for deploying the server architecture, and meanwhile, when the version switching is performed on the servers, the servers cannot be switched to different storage media, so that the problem that the frequent installation environment deployment is required for the version switching of multiple systems in the super-fusion test scene exists.
Therefore, the embodiment of the application provides a version switching method applied to a management terminal server system, which removes the installation and deployment operation of an operating system by a snapshot interface and a mode of switching a target storage medium. Referring to fig. 1, fig. 1 is a schematic diagram of a system version switching method applied to a management terminal according to an embodiment of the present application, where the system version switching method applied to the management terminal may include the following steps:
In step S11, a startup list and a startup item are created, a default startup item is set in the startup list, the startup list corresponds to a server, and the startup item corresponds to a version of the system image.
In step S12, a target system image is generated in the system pool, and a snapshot interface is created for the target system image.
In step S13, a server system image is cloned for the server based on the target system image, a logical unit number is configured for the server system image, and the logical unit number is injected into the startup list.
In step S14, a version switch instruction is sent to the server, so that the server obtains the target system image corresponding to a specified system version from the system pool based on the snapshot interface, or sets the startup item corresponding to the specified system version as the default startup item based on the logical unit number in the startup list corresponding to the server.
In step S15, a restart instruction is sent to the server to switch the system version to the specified system version after the server is restarted.
Before creating a start list and a start item, a management terminal needs to be built, a Ceph block device cluster is firstly installed, a mirror image pool and a system (ISCSI) pool are created, tgt and tgt-rbd modules are installed, DHCP and tftp are configured, and IPxe is finally compiled.
The management terminal may be an electronic device with a networking function, and the electronic device may be a configurator of engineering equipment, a mobile phone, a tablet computer, a personal digital assistant, and the like. Ceph is a new generation free software distributed file system specially designed for doctor papers by Sage Weil of Santa Cruz division of California university, and the bottom layer storage of the management terminal uses Ceph, so that the functions of block equipment storage, simplified preparation, complete cloning, linked cloning, snapshot and the like are realized. The mirror image pool and the ISCSI pool are both storage pools, and the storage can be virtualized by creating a virtual hard disk, creating a new volume and configuring an ISCSI target server. Tgt is used to configure the logical unit number (Logical Unit Number, LUN) of the system image, and DHCP (Dynamic Host Configuration Protocol ) is a network protocol of a local area network. By server control over a range of IP addresses, a client can automatically obtain the server assigned IP address and subnet mask when logging into the server. TFTP (TRIVIAL FILE TRANSFER Protocol, simple file transfer Protocol) is a Protocol in the TCP/IP (Transmission Control Protocol/Internet Protocol ) Protocol family for simple file transfer between a client and a server, providing a simple, low cost file transfer service. IPXE is an extended version of PXE ((Preboot eXecute Environment)), supporting various acquisition means such as HTTP. IPXE are more versatile than PXR, and provide a mechanism for booting a computer using the network interface (Network Interface) to enable booting of a computer independent of a local data storage device (e.g., hard disk) or a locally installed operating system.
For step S13, a super fusion operating system may be installed based on a conventional manner, a multi-path and ISCSI (INTERNET SMALL Computer SYSTEM INTERFACE ) kernel module is added, and a linux u disk boot disk is fabricated, and a qemu-img controller command is used to export the system disk as a qcow2 mirror image. The qcow2 mirror image is a system mirror image corresponding to a start item.
Therefore, the embodiment of the application removes the installation and deployment operation of the operating system in the modes of snapshot interfaces and switching target storage media, protects the operating system by utilizing the characteristic of distributed storage, and can perform version switching or version rollback on multiple data by using snapshot technology, thereby improving the efficiency and the safety of system version switching.
In an optional embodiment, for step S12, an implementation manner of generating the target system image is further provided in the embodiment of the present application, referring to fig. 2, fig. 2 is a schematic diagram of steps of generating the target system image, where a flow of generating the target system image may be:
In step S21, a mirror pool and a system pool are created.
In step S22, the system disk is exported as a base image.
In step S23, the base image is converted into an original format image and imported into the image pool.
In step S24, the original format image is cloned from the image pool to the system pool in a completely cloned manner as the target system image.
The original format mirror image can be a RAW format mirror image, the original format mirror image can be converted into the original format mirror image through Rados commands, the original format mirror image is imported into a mirror image pool, so that a simplified prepared mirror image is obtained, and a protection snapshot is created for the mirror image, so that the safety of the original format mirror image is ensured.
Therefore, the embodiment of the application can protect the server operating system by generating the target system image and creating the snapshot interface for the target system image, ensure the safety of the operating system, and roll back the server system through the snapshot, thereby realizing the protection of the operating system disk by using the snapshot technology, simultaneously enabling the operating system to roll back on multiple data and improving the efficiency of server version switching.
Optionally, for step S11, an implementation manner of setting a start list is provided in the embodiment of the present application, please refer to fig. 3, fig. 3 is a schematic diagram of a step of setting a start list provided in the embodiment of the present application, and the implementation manner may include the following steps:
in step S31, a host group is created in which all servers are added.
In step S32, the host group and the startup list are bound, and the startup items are created in the startup list, where each startup item binds a version of the system image.
In step S33, a start list of physical addresses of corresponding host network cards is created in the transmission server, so that when the transmission server receives a download request, the start list is provided to the server.
Illustratively, the out-of-band management IP, port, username, password, and mac address of the PXE network card of the super converged server are first added, and the connectivity of the out-of-band management is tested to perform centralized integrated management on the network device, server device, and power supply system through a dedicated management channel independent of the data network.
Therefore, the embodiment of the application can automatically acquire the operating system of the corresponding version from the starting list when updating the system version by setting the corresponding relation between the starting list and the starting item and the host group and the system mirror image, thereby realizing the switching of the operating version of the server.
Specifically, referring to fig. 4, fig. 4 is a flowchart of a system version switching process performed by a plurality of servers in a super fusion architecture according to an embodiment of the present application.
The simultaneous version switching of the bare computer servers can be divided into four parts, namely mirror image making and configuration management terminal, and the super fusion server and version switching are started.
In the mirror image manufacturing process, firstly, a super fusion operating system is installed according to a conventional mode, a multi-path and ISCSI kernel module is added, a server is closed to connect and manufacture a linux u disk starting disk, and a qemu-img conversion command is used for exporting a system disk into a qcow2 mirror image.
In the configuration management terminal, firstly, a management terminal is built, ceph block equipment clusters are installed, a mirror image pool and an ISCSI pool are created, tgt and tgt-rbd modules are installed, DHCP and tftp are configured, and IPxe is compiled finally. After compiling is completed, converting the basic mirror image into a RAW format mirror image based on Rados commands, importing the RAW format mirror image into a mirror image pool as a target system mirror image, creating a starting list corresponding to a host group and a starting item corresponding to the target system mirror image, cloning the target system mirror image in the ISCSI pool in a link cloning mode to clone the mirror image corresponding to the number of super-fusion servers, wherein the number of the super-fusion servers can be obtained through the starting item. All target system images are configured as LUNs based on Tgt, mounted by using rbd map, and LUN information is injected into Grub. And finally, updating the LUN information of the corresponding start item in the start list.
The version switching is divided into two types, namely small version switching and large version switching, taking an initial system version of 1.5 as an example, switching the version to 1.51 as small version switching and switching the version to 2.0 as large version switching, determining that the current version is small version switching or large version switching based on the difference value of the version numbers of the current system version and the appointed system version, sending a shutdown instruction to a server by a management terminal when the current system version is small version switching, disconnecting ISCSI TARGET, rolling back a corresponding server image to the appointed snapshot by the management terminal, reloading iSCSI service, starting the step of starting the super-fusion server, and finishing the version switching when the starting step is finished.
When the large version is switched, the management terminal sends a shutdown instruction to the server, the server is disconnected ISCSI TARGET, the management terminal closes the iSCSI server, creates ISCSI TARGET by using the corresponding image file, reloads the iSCSI service and starts the step of starting the super fusion server, and when the starting step is finished, the version switching is finished.
In the step of starting the super fusion server, the management terminal uses out-of-band management to switch the server guiding mode into network guiding, allocates corresponding IP for the server, checks whether the LUN is ready or not, and whether a starting list is ready or not.
A host group is provided with a plurality of super fusion servers, and the starting processes of the plurality of super fusion servers are consistent, and a single host group is taken as an example. The management terminal sends a network guide instruction to the super fusion server, the management terminal sends a starting instruction to the server, the starting list starting item configuration and the DHCP network IP allocation configuration are checked before the starting instruction is initiated, kernel starting parameters are injected into corresponding images, the management terminal starts the operation and starts the operation from a network, a server network card enters PXE guide, a DHCP request is initiated to the management terminal to acquire an IP address, the management terminal pushes IPxe a client if judging that the client type is PXE, sends DHCP respond packets to the server, carries IP address information, subnet mask information, gateway information, routing information, mtu information, transmission server information and the like, wherein the transmission server can be a tftp server.
After the server acquires the IP, downloading IPXE the client from the transmission server, and running IPXE the client; the server re-acquires network configuration after operating IPXE the client, and re-sends the DHCP request to the management terminal; if the management terminal judges that the client type is IPXE, pushing IPxe a startup script (startup list), and sending DHCP respond a packet to a server, wherein the startup script carries IP address information, subnet mask information, gateway information, routing information, mtu information, transmission server information and the like; the server IPXE downloads IPXE startup script (startup list) from the transmission server after obtaining IP, each PXE network card has a fixed catalog on the transmission server, downloads corresponding IPXE startup script according to the corresponding catalog, the server enters the startup list after running IPXE startup script, one or more startup items are arranged in the list, and only one default startup item is entered by default, the default startup item of the startup list records the corresponding ISCSI TARGET equipment which needs to be connected with the server, no manual operation automatically enters the default startup item within 3 seconds, the connection corresponds to ISCSI TARGET, the server enters the default startup item, IPXE client initiates a connection ISCSI request, after connection is successful, the server enters sanboot stages, after entering sanbbot stages, the partition information is read from ISCSI TARGET, the guide information and the kernel information are obtained, after the server loads the kernel from ISCSI TARGET to the memory, the kernel is disconnected, the kernel is run, the default is entered into the corresponding ISCSI TARGET according to the kernel starting parameters, after the kernel is successfully connected with the kernel, after the kernel is successfully connected with ISCSI TARGET, the kernel is completely loaded with the ISCSI, the running system is continued to be formally loaded by the running the system, the system is completely loaded with the running parameters, the system is completely loaded by the system through the method of loading the complete running state of the system, and the system is completely loaded by the method of loading the complete state of the system, thereby, the server version switching is completed.
Therefore, in the implementation process, the mirror images corresponding to the quantity of the super fusion servers are cloned by using a link cloning mode, so that storage resources can be saved, the operating system is protected by a snapshot interface mode, the safety of the operating system can be improved, the installation and deployment operation of the operating system is removed by the snapshot interface and a target storage medium switching mode, and the efficiency of switching the version of the server system can be improved.
Based on the same inventive concept, the embodiment of the present application further provides a server system version switching method applied to a server, referring to fig. 5, fig. 5 is a schematic step diagram of the server system version switching method applied to a server, where the method may include:
in step S51, a version switching instruction is received, a target system image corresponding to a specified system version is obtained from a system pool based on a preset snapshot interface, or in a start-up list corresponding to a server, a start-up item corresponding to the specified system version is set as a default start-up item based on a logic unit number, the default start-up item is set in the start-up list, the start-up list corresponds to one server, the start-up item corresponds to one version of system image, the system pool contains the target system image, the server clones the server system image based on the target system image, the server system image corresponds to a logic unit number, and the logic unit number is set in the start-up list.
In step S52, a restart instruction is received to switch the system version to the specified system version after the restart.
Therefore, the embodiment of the application removes the installation and deployment operation of the operating system in the modes of snapshot interfaces and switching target storage media, protects the operating system by utilizing the characteristic of distributed storage, and can perform version switching or version rollback on multiple data by using snapshot technology, thereby improving the efficiency and the safety of system version switching.
Optionally, for step S52, when the difference between the version numbers of the current system version and the specified system version is smaller than a preset difference, a target system image corresponding to the specified system version is obtained from a system pool based on a preset snapshot interface, and when the difference between the version numbers of the current system version and the specified system version is not smaller than the preset difference, in a startup list corresponding to a server, a startup item corresponding to the specified system version is set as a default startup item based on a logical unit number.
The specific steps of the server system version switching method applied to the server may be referred to the implementation steps applied to the management terminal embodiment, and will not be described herein.
Therefore, the embodiment of the application can protect the server operating system by generating the target system image and creating the snapshot interface for the target system image, ensure the safety of the operating system, and roll back the server system through the snapshot, thereby realizing the protection of the operating system disk by using the snapshot technology, simultaneously enabling the operating system to roll back on multiple data and improving the efficiency of server version switching.
In an alternative embodiment, for step S52, the embodiment of the present application further provides an implementation manner of switching the specified system version, referring to fig. 6, fig. 6 is a schematic diagram of a step of switching the specified system version, where the manner of switching the specified system version may include:
In step S61, the protocol information is acquired from the management terminal based on the reloading of the disk application service by the restart instruction.
In step S62, the start list is acquired from the transmission server based on the protocol information.
In step S63, startup information is read from the target storage medium based on the default startup item in the startup list.
In step S64, the kernel of the server is started based on the start information, and is connected to the target storage medium according to the kernel start parameter.
In step S65, partition information, device information, root file system information, and drive information are loaded from the target storage medium to switch the system version to the instruction system version.
Therefore, the embodiment of the application realizes the switching of the system version based on the distributed storage and the mode of switching the target storage medium by associating the starting information with the target storage medium, can avoid the frequent installation and deployment environment of multiple system versions in the super fusion test scene, and improves the switching efficiency of the system versions.
Based on the same inventive concept, the embodiment of the present application further provides a server system version switching device 70, please refer to fig. 7, fig. 7 is a schematic diagram of a server system version switching device provided in the embodiment of the present application, and the server system version switching device 70 may include:
the system comprises a creation module 71, a snapshot interface and a snapshot module, wherein the creation module 71 is used for creating a starting list and starting items, setting default starting items in the starting list, wherein the starting list corresponds to a server, and the starting items correspond to a version of system image;
And a configuration module 72, configured to clone a server system image for the server based on the target system image, configure a logic unit number for the server system image, and inject the logic unit number into the startup list.
An instruction sending module 73, configured to send a version switching instruction to the server, so that the server obtains the target system image corresponding to a specified system version from the system pool based on the snapshot interface, or sets the start item corresponding to the specified system version as the default start item based on the logical unit number in the start list corresponding to the server, and send a restart instruction to the server, so that the system version is switched to the specified system version after the server is restarted.
Optionally, the server system version switching device 70 may further include:
And the storage pool creation module is used for creating a mirror pool and a system pool.
The creation module 71 may be used to:
The method comprises the steps of exporting a system disk as a basic image, converting the basic image into an original format image, importing the original format image into an image pool, and cloning the original format image from the image pool to the system pool in a complete cloning mode to serve as the target system image.
Optionally, the creation module 71 may be further configured to:
The method comprises the steps of creating a host group, adding all servers in the host group, binding the host group and a start list, creating start items in the start list, binding one version of the system mirror image by each start item, and creating a start list corresponding to the physical address of a host network card in a transmission server so as to provide the start list for the server when the transmission server receives a downloading request.
Based on the same inventive concept, the embodiment of the present application further provides a server system version switching device 80, please refer to fig. 8, fig. 8 is a schematic diagram of a server system version switching device applied to a server according to the embodiment of the present application, and the server system version switching device 80 may include:
the first receiving module 81 is configured to receive a version switch instruction, obtain, from a system pool, a target system image corresponding to a specified system version based on a preset snapshot interface, or set, in a startup list corresponding to a server, a startup item corresponding to the specified system version as a default startup item based on a logical unit number.
The second receiving module 82 is configured to receive a restart instruction, so as to switch the system version to the specified system version after restarting.
Alternatively, the first receiving module 81 may be specifically configured to:
When the difference value of the version numbers of the current system version and the appointed system version is not smaller than the preset difference value, setting a starting item corresponding to the appointed system version as a default starting item based on a logic unit number in a starting list corresponding to a server, wherein the default starting item is set in the starting list, the starting list corresponds to one server, the starting item corresponds to one version of system mirror image, the system pool comprises the target system mirror image, the server clones the server system mirror image based on the target system mirror image, the server system mirror image corresponds to a logic unit number, and the logic unit number is set in the starting list.
Alternatively, the second receiving module 82 may be specifically configured to:
the method comprises the steps of obtaining a starting list from a transmission server based on protocol information, reading starting information from a target storage medium based on a default starting item in the starting list, starting a kernel of the server based on the starting information and connecting with the target storage medium according to kernel starting parameters, and loading partition information, equipment information, root file system information and driving information from the target storage medium to switch a system version into the instruction system version.
Based on the same inventive concept, the embodiment of the application also provides an electronic device, which comprises a memory and a processor, wherein the memory stores program instructions, and the processor executes the steps in any implementation mode when reading and running the program instructions.
Based on the same inventive concept, the embodiments of the present application also provide a computer readable storage medium, in which computer program instructions are stored, which when read and run by a processor, perform the steps in any of the above implementations.
The computer readable storage medium may be random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), or the like, which may store the program code. The storage medium is used for storing a program, the processor executes the program after receiving an execution instruction, and the method executed by the electronic terminal defined by the process disclosed in any embodiment of the present invention may be applied to the processor or implemented by the processor.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
Alternatively, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part.
The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.).
In this document, 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. Moreover, 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" does not exclude the presence of additional identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (10)
1. The server system version switching method is characterized by being applied to a management terminal and comprising the following steps of:
creating a starting list and a starting item, wherein a default starting item is set in the starting list, the starting list corresponds to a server, and the starting item corresponds to a version of system image;
generating a target system image in a system pool, and creating a snapshot interface for the target system image;
Cloning a server system mirror image for the server based on the target system mirror image, configuring a logic unit number for the server system mirror image, and injecting the logic unit number into the starting list;
Transmitting a version switching instruction to the server so that the server obtains the target system image corresponding to a specified system version from the system pool based on the snapshot interface, or sets the starting item corresponding to the specified system version as the default starting item based on the logical unit number in the starting list corresponding to the server;
And sending a restarting instruction to the server so as to switch the system version to the appointed system version after the server is restarted.
2. The method of claim 1, wherein prior to the creating a launch list and launch items, setting a default launch item in the launch list, the method further comprises:
Creating a mirror image pool and a system pool;
the generating the target system image in the system pool comprises:
exporting a system disk as a basic mirror image;
Converting the basic mirror image into an original format mirror image, and importing the original format mirror image into the mirror image pool;
The original format image is cloned from the image pool to the system pool in a completely cloned manner to serve as the target system image.
3. The method of claim 1, wherein creating a launch list and launch items, wherein setting a default launch item in the launch list comprises:
Creating a host group, and adding all servers in the host group;
Binding the host group and the starting list, and creating starting items in the starting list, wherein each starting item binds one version of the system image;
creating a start list corresponding to the physical address of the host network card in the transmission server, so as to provide the start list to the server when the transmission server receives the download request.
4. The version switching method of the server system is characterized by being applied to a server and comprising the following steps of:
Receiving a version switching instruction, acquiring a target system image corresponding to a specified system version from a system pool based on a preset snapshot interface, or setting a starting item corresponding to the specified system version as a default starting item based on a logic unit number in a starting list corresponding to one server, wherein the starting item corresponds to one version of the system image, the system pool comprises the target system image, the server clones the server system image based on the target system image, the server system image corresponds to a logic unit number, and the logic unit number is set in the starting list;
and receiving a restart instruction to switch the system version to the specified system version after restarting.
5. The method of claim 4, wherein the obtaining, based on the preset snapshot interface, the target system image corresponding to the specified system version from the system pool, or setting, based on the logical unit number, the startup item corresponding to the specified system version as a default startup item in the startup list corresponding to the server, comprises:
When the difference value of the version numbers of the current system version and the appointed system version is smaller than a preset difference value, acquiring a target system image corresponding to the appointed system version from a system pool based on a preset snapshot interface;
And when the difference value of the version numbers of the current system version and the appointed system version is not smaller than a preset difference value, setting the starting item corresponding to the appointed system version as a default starting item based on the logic unit number in a starting list corresponding to the server.
6. The method of claim 4, wherein switching the system version to the specified system version after the reboot comprises:
Reloading the disk application service based on the restarting instruction, and acquiring protocol information from the management terminal;
Acquiring the starting list from a transmission server based on the protocol information;
reading starting information from a target storage medium based on a default starting item in the starting list;
starting a kernel of the server based on the starting information, and connecting with the target storage medium according to kernel starting parameters;
partition information, device information, root file system information, and drive information are loaded from the target storage medium to switch the system version to the instruction system version.
7. A server system version switching apparatus, which is applied to a management terminal, comprising:
The system comprises a creation module, a system pool and a system pool, wherein the creation module is used for creating a starting list and a starting item, setting a default starting item in the starting list, wherein the starting list corresponds to a server, and the starting item corresponds to a version of system image;
the configuration module is used for cloning a server system mirror image for the server based on the target system mirror image, configuring a logic unit number for the server system mirror image, and injecting the logic unit number into the starting list;
The system comprises a server, a command sending module, a server and a restart command, wherein the server is used for sending a version switching command to the server so that the server obtains the target system image corresponding to a specified system version from the system pool based on the snapshot interface, or sets the starting item corresponding to the specified system version as the default starting item based on the logical unit number in the starting list corresponding to the server, and the restart command is sent to the server so as to switch the system version to the specified system version after the server is restarted.
8. A server system version switching device, which is applied to a server, comprising:
The system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a version switching instruction, acquiring a target system image corresponding to a specified system version from a system pool based on a preset snapshot interface, or setting a starting item corresponding to the specified system version as a default starting item based on a logic unit number in a starting list corresponding to one server, wherein the starting item corresponds to one version of system image, the system pool comprises the target system image, the server clones the server system image based on the target system image, the server system image corresponds to a logic unit number, and the logic unit number is set in the starting list;
and the second receiving module is used for receiving a restarting instruction so as to switch the system version to the appointed system version after restarting.
9. An electronic device comprising a memory and a processor, the memory having stored therein program instructions which, when executed by the processor, perform the steps of the method of any of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein computer program instructions which, when executed by a processor, perform the steps of the method of any of claims 1-7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111572008.1A CN114237695B (en) | 2021-12-21 | 2021-12-21 | Server system version switching method, device, electronic device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111572008.1A CN114237695B (en) | 2021-12-21 | 2021-12-21 | Server system version switching method, device, electronic device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114237695A CN114237695A (en) | 2022-03-25 |
| CN114237695B true CN114237695B (en) | 2025-05-13 |
Family
ID=80760388
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111572008.1A Active CN114237695B (en) | 2021-12-21 | 2021-12-21 | Server system version switching method, device, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114237695B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106502925A (en) * | 2016-10-18 | 2017-03-15 | 安徽天达网络科技有限公司 | A kind of computer data processing system |
| CN110673923A (en) * | 2019-09-06 | 2020-01-10 | 中国平安财产保险股份有限公司 | XWIKI system configuration method, system and computer equipment |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110221868B (en) * | 2019-05-31 | 2022-11-08 | 新华三云计算技术有限公司 | Deployment method, device, electronic device and storage medium of host system |
| CN111475185A (en) * | 2020-03-11 | 2020-07-31 | 苏州浪潮智能科技有限公司 | Method and system for stably upgrading BMC (baseboard management controller) image across large versions |
| CN112965790B (en) * | 2021-03-29 | 2022-05-31 | 华云数据控股集团有限公司 | PXE protocol-based virtual machine starting method and electronic equipment |
-
2021
- 2021-12-21 CN CN202111572008.1A patent/CN114237695B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106502925A (en) * | 2016-10-18 | 2017-03-15 | 安徽天达网络科技有限公司 | A kind of computer data processing system |
| CN110673923A (en) * | 2019-09-06 | 2020-01-10 | 中国平安财产保险股份有限公司 | XWIKI system configuration method, system and computer equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114237695A (en) | 2022-03-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2025111560A (en) | Automatically deployed information technology (it) system and method with enhanced security | |
| CN101964821A (en) | Method and system for loading operating environment of remote terminal | |
| WO2011127860A2 (en) | Method, server and system for starting application | |
| CN102662884B (en) | Device driving program configuration method based on network | |
| CN105450759A (en) | System mirror image management method and device | |
| CN101778132B (en) | Method, system and device for network installation based on load balance | |
| US12197939B2 (en) | Provisioning DPU management operating systems | |
| CN107066287A (en) | The method and system of ESXI virtual machine automatic deployment installation systems | |
| WO2014101514A1 (en) | Method for obtaining resource information of server, resource pool management system and server | |
| CN109669808A (en) | A kind of method and apparatus of system backup | |
| CN111930396B (en) | An upgrade method of communication module in 4G router based on notify mechanism | |
| CN114115920A (en) | Operating system deployment method, system, device, and computer-readable storage medium | |
| US12175257B2 (en) | Provisioning DPU management operating systems using host and DPU boot coordination | |
| US10282346B1 (en) | Scalable network device self-configuration in large networks | |
| CN106547602B (en) | Method for manufacturing operating system mirror image suitable for iSCSI protocol remote wireless loading | |
| US11860776B2 (en) | Concurrent memory recycling for collection of servers | |
| CN115004151B (en) | System and method for updating add-in card firmware and collecting hardware information on any server or bare metal server with any OS installed | |
| CN114237695B (en) | Server system version switching method, device, electronic device and storage medium | |
| CN106708515A (en) | Automatic Windows system environment deploying method and system | |
| CN111078305A (en) | Information acquisition method and device, server and information management system | |
| CN112291096B (en) | Configuration method and device of bare metal server | |
| CN110418092B (en) | Video recording management system, method, control management node and recording node | |
| CN111240702A (en) | DHCP-based operating system deployment method, system, terminal and storage medium | |
| WO2024174739A1 (en) | Method and apparatus for installing multiple operating systems | |
| CN116232842A (en) | A PXE-based portable system maintenance device and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |