Background
With the continuous development of internet technology, in order to relieve the operating pressure of servers and provide faster and better services for users, a server cluster is usually established to process access requests of users.
Currently, each server in a server cluster receives and processes an access request of a user through a switch, that is, each server in the server cluster is connected to the switch, and the switch binds ports of each server into a common port and provides the common port to the user.
In practical applications, a system of servers in a server cluster may be damaged, and therefore, when the system of the server is damaged, the system needs to be reinstalled for the server.
In the existing process of reinstalling a system to the server, a port corresponding to a server to be reinstalled is first split from a bound common port, and the server to be reinstalled is restarted, a Preboot execution Environment (PXE) installation mode is entered, a system image file is downloaded through a Virtual Local Area Network (VLAN), and the system image file is installed in the server to be reinstalled.
However, in the prior art, when the system is reinstalled, the bound common port needs to be disassembled, which inevitably reduces the efficiency of the system reinstallation.
Disclosure of Invention
The embodiment of the application provides a system reinstallation method and device, which are used for solving the problem that the bound common port needs to be disassembled when the system is reinstalled, and the system reinstallation efficiency is inevitably reduced.
The system reinstallation method provided by the embodiment of the application comprises the following steps:
a server to be reinstalled acquires a system image file to be installed;
restarting the server to be reinstalled to enter a pre-installed memory operating system;
and running the system image file to be installed through the memory operating system to reinstall the system.
Preferably, a system reinstallation request is sent to the webpex platform, and a system image file to be installed corresponding to the system reinstallation request returned by the webpex platform is received.
Preferably, the system image file to be installed is written into the memory through the memory operating system, and the system image file to be installed written into the memory is operated through the memory operating system to perform system reinstallation.
Preferably, the method further comprises: and the server to be reinstalled acquires the binding parameter configuration.
Preferably, the memory operating system runs the system image file to be installed, establishes network connection, and performs binding configuration on the server to be reinstalled according to the acquired binding parameter configuration.
The system reinstallation device that this application embodiment provided, the device includes:
the device comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring a system image file to be installed by the device;
the restarting module is used for restarting the device to enter a pre-installed memory operating system;
and the operation module is used for operating the system image file to be installed through the memory operation system and reinstalling the system.
Preferably, the obtaining module is specifically configured to send a system reinstallation request to the webpex platform, and receive a to-be-installed system image file corresponding to the system reinstallation request returned by the webpex platform.
Preferably, the running module is specifically configured to write the system image file to be installed into the memory through the memory operating system, run the system image file to be installed, which is written into the memory, through the memory operating system, and perform system reinstallation.
Preferably, the obtaining module is further configured to obtain, by the apparatus, a binding parameter configuration.
Preferably, the running module is specifically configured to run the system image file to be installed through the memory operating system, establish a network connection, and perform binding configuration on the server to be reinstalled according to the obtained binding parameter configuration.
The embodiment of the application provides a system reinstallation method and device, in the method, a server to be reinstalled acquires a system image file to be installed, the server to be reinstalled is restarted to enter a pre-installed memory operating system, and the system image file to be installed is operated through the memory operating system to be reinstalled. By the method, the bound common port does not need to be disassembled when the system is reassembled, and the system reassembly efficiency is effectively improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some 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.
Fig. 1 is a system reinstallation process provided in an embodiment of the present application, which specifically includes the following steps:
s101: and acquiring a system image file to be installed.
In practical application, each server in the server cluster is connected to the switch, and the switch binds the ports of each server into a common port and provides the common port to the outside for users.
However, in practical applications, there may be a case where a system of servers in a server cluster is damaged, and therefore, when the system of the server is damaged, the system needs to be reinstalled for the server, and hereinafter, the server in which the system is damaged and the system needs to be reinstalled is referred to as a server to be installed.
When a damaged server is reinstalled, a system image file to be installed needs to be acquired first, where the system image file to be installed refers to a system file corresponding to an operating system that is run when the server provides a service to the outside, such as a linux system image file.
Further, the present application provides a specific implementation manner in which the server to be reinstalled obtains the system image file to be installed, which is specifically as follows:
the server to be reinstalled can be connected with the webpxe platform through the switch, when the server needs to be reinstalled, a system reinstallation request carrying the identification of the system image file to be installed can be sent to the webpxe platform, and after the webpxe receives the system reinstallation request again, the system image file is determined according to the identification of the system image file to be installed carried in the system reinstallation request, and the system image file is returned to the server to be reinstalled, namely, the server to be reinstalled receives the system image file to be installed corresponding to the system reinstallation request returned by the webxe platform.
It should be noted that the webpxe platform is mainly used for downloading system image files and managing Media Access Control (MAC) addresses, and in addition, other devices may be used instead of the webpxe platform as long as the device can play a role in downloading system image files, for example, a separate server is used for downloading system image files.
Further, after the system image file to be installed is run through the memory operating system and the system is installed, the port of the server to be reassembled needs to be re-bound with the ports of other servers through the switch, that is, the server to be reassembled needs to be bound and configured, so in the application, the binding parameter configuration also needs to be obtained, specifically, an identifier of the binding parameter configuration can be added in a system reassembly request sent to the webpxe platform, the webpxe platform can determine the binding parameter configuration according to the identifier of the binding parameter configuration, and the system image file and the binding parameter configuration are returned to the server to be reassembled.
For example, assuming that a system of a server 1 in a server cluster needs to be reinstalled, the server 1 (i.e., the server to be reinstalled) sends a system reinstallation request carrying an identifier of a system image file to be installed and an identifier of a binding parameter configuration to a webpxe platform, and after the webpxe receives the system reinstallation request, the system image file is determined according to the identifier of the system image file to be installed carried in the system reinstallation request, the binding parameter configuration is determined according to the identifier of the binding parameter configuration, and the system image file is returned to the server 1 to be reinstalled.
S102: and restarting the server to be reinstalled to enter a pre-installed memory operating system.
Further, after the server to be reloaded acquires the system image file, the server to be reloaded needs to be restarted, and the restarted server to be reloaded directly enters a Random Access Memory (RAMOS) installed in the server to be reloaded in advance.
Continuing the above example, the server 1 is restarted to enter the memory operating system RAMOS.
S103: and running the system image file to be installed through the memory operating system to reinstall the system.
And after entering a memory operating system RAMOS which is pre-installed in the server to be reinstalled, running a system image file to be installed through the memory operating system RAMOS.
Further, since the memory operating system can only operate data or objects in the memory, in the present application, running the system image file to be installed through the memory operating system RAMOS specifically includes writing the system image file to be installed into the memory (that is, a disk) through the memory operating system, running the system image file to be installed written into the memory through the memory operating system, and performing system reinstallation.
Further, after the system image file to be installed is run through the memory operating system, the server to be reinstalled also needs to be bound and configured, and if the server to be reinstalled needs to be bound and configured according to the obtained binding parameter configuration, the network connection needs to be reestablished between the server to be reinstalled and the switch.
Continuing to use the above example, writing the system image file to be installed into the disk through the RAMOS, running the system image file to be installed written into the disk through the RAMOS, establishing a network connection between the server 1 and the switch, and performing binding configuration on the server to be reinstalled according to the obtained binding parameter configuration.
By the method, the bound common port does not need to be disassembled when the system is reassembled, and the system reassembly efficiency is effectively improved.
Based on the same idea, the system reloading method provided in the embodiment of the present application further provides a system reloading apparatus, as shown in fig. 2.
Fig. 2 is a schematic structural diagram of a system reloading apparatus according to an embodiment of the present application, including:
an obtaining module 201, configured to obtain a system image file to be installed by the apparatus;
a restart module 202, configured to restart the apparatus to enter a pre-installed memory operating system;
and the running module 203 is configured to run the system image file to be installed through the memory operating system, and perform system reinstallation.
The obtaining module 201 is specifically configured to send a system reinstallation request to the webpex platform, and receive a system image file to be installed corresponding to the system reinstallation request returned by the webpex platform.
The running module 203 is specifically configured to write the system image file to be installed into the memory through the memory operating system, run the system image file to be installed, which is written into the memory, through the memory operating system, and perform system reinstallation.
The obtaining module 201 is further configured to obtain, by the apparatus, a binding parameter configuration.
The running module 203 is specifically configured to run the system image file to be installed through the memory operating system, establish a network connection, and perform binding configuration on the server to be reinstalled according to the obtained binding parameter configuration.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur 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 scope of the claims of the present application.