Summary of the invention
The object of the present invention is to provide a kind of Auto-mounting and establishing method of server, can after blank server inserts the slot of server cabinet, automatically complete installation and the setting of the data such as action required system and application software.
for reaching above-mentioned purpose, technical scheme of the present invention is as follows: a kind of Auto-mounting of server and establishing method, be applied in server system, this server system comprises a start server, at least one network switch and at least one blank server, this start server is connected one of them connectivity port on this network switch with this blank Fu business Qi Fen Do, Auto-mounting and the establishing method of this server comprise: a) this start server is obtained physical address (the Media Access Control Address of the network connection unit of this blank server by this network switch, be called for short MAC Address), b) correspondence is carried out in the internet protocol address that the connectivity port that MAC Address that should the blank server and this blank server connect is configured (Internet Protocol Address, be called for short IP address), c) use to this blank server this IP address assignment, the IP address of d) using according to this blank server is carried out corresponding installation and sets action this blank server.
for reaching above-mentioned purpose, the another technical scheme of the present invention is as follows: a kind of Auto-mounting of server and establishing method, be applied to comprise in the server system of a start server and at least one network switch, this start server connects a connectivity port on this network switch, and this start server has DHCP (Dynamic Host Configuration Protocol, abbreviation DHCP) function of server, this start server for each connectivity port on this network switch all configure one can reformed IP the address, Auto-mounting and the establishing method of this server comprise: a) that a blank server is newly-increased to this server system, and should the blank server connect a connectivity port on this network switch, b) this start server is obtained the MAC Address of the network connection unit of this blank server by this network switch, c) MAC Address that this start server should the blank server and this connectivity port are configured IP carries out correspondence in the address, and records this corresponding relation, d) this start server is assigned this IP address and is used to this blank server, e) this start server IP address of using according to this blank server, carry out corresponding installation action to this blank server, and f) this start server IP address of using according to this blank server is carried out corresponding setting to this blank server and is moved.
The beneficial effect that the present invention can reach against existing technologies is, the start server can according to which slot of newly-increased blank Servers installed at which rack, and be connected to which connectivity port on which network switch, assign corresponding IP address and use to blank server.The start server comes with reference to corresponding enactment document according to the position of blank server, and according to the content of enactment document to its installation action of presetting.So, after blank server is completed installation and set action, can become at once default role according to the demand of system, such as becoming storage server (Storage server) exclusive disjunction server (Computing server) etc.
And the start server can be obtained by the network switch MAC Address of blank server, and the IP address of MAC Address that should the blank server and its use is carried out corresponding.So, when mistake occured, system can be was directly correspondingly learnt which station server what make a mistake is by the IP address.Moreover when server was replaced, system can learn that this corresponding MAC Address in IP address changes by address translation table, and then knows the replaced mistake of server, and this will help the manager to the management of system.
Embodiment
Below in conjunction with a preferred embodiment of the present invention, coordinate accompanying drawing, be described in detail as follows.
See also Fig. 1, Fig. 1 is the server connection diagram of a preferred embodiment of the present invention.The Auto-mounting of server of the present invention and establishing method, be mainly used in server system, this server system is provided with 2, start servers of at least one network switch (switch) (boot server) 3, reaches at least one blank server 4 in rack (rack) 1, this start server 3 and this blank server 4 Fen Do connect a connectivity port 21 on this network switch 2.
Having a plurality of slots (slot) on this rack 1 can plant for server host, each slot Fen Do corresponds to wherein one of them connectivity port 21 on this network switch 2, when a station server main frame (as this start server 3 or should blank server 4) when inserting one of them slot, this server host can connect this slot corresponding connectivity port 21.In the present embodiment, start server 3 is arranged in same rack 1 with each blank server 4, and is connected to same the network switch 2, but is not limited.
See also Fig. 2, Fig. 2 is the server connection diagram of another preferred embodiment of the present invention.In the present embodiment, a specific application program is installed in one of them server host of this server system, by this application program, this server host can become the start server 3 in this server system.And this start server 3 has the function of Dynamic Host Configuration Protocol server, and this start server 3 be one of the 21 minutes Do in respectively this connectivity port configuration IP address on the network switch 2, and this IP address one is configured, and namely binds with connectivity port 21, can not be changed again.
As shown in Figure 2, each network switch 2 can have for example 48 connectivity ports 21, connectivity port 21 Fen Do be configured one can reformed IP the address.In the present embodiment, first connectivity port 21 on the First network switch 2, be configured to the IP address that first connectivity port 21 on IP second of the address network switch 2 ' that IP address that the IP address of X.X.1.1, second connectivity port 21 be configured to X.X.1.2, the 48th connectivity port 21 be configured to X.X.1.48 is configured to X.X.1.49, by that analogy.The above is only a better specific embodiment of the present invention, should be as limit.In the present embodiment, the network switch 2,2 ' is by the mutual line of network system, and each network switch 2,2 ' Ke Fen Do connect a start server 3, or shares same the server 3 of starting shooting by network system, do not limited.
Each connectivity port 21 on the network switch 2 all be configured one can reformed IP the address, when arbitrary blank server 4 inserts slot, and the connectivity port corresponding with this slot 21 be when connecting, and the IP address that this connectivity port 21 is configured namely is assigned to this blank server 4 and uses.For instance, if should blank server 4 be connected to first connectivity port 21 on the First network switch 2, this start server 3 namely distributes the IP address of X.X.1.1 as above to use to this blank server 4.Thus, this blank server 4 can use this IP address and this start server 3 lines, downloading the data such as necessary operating system and application software, thereby installs and sets action (being detailed later).
Fig. 3 is that the start server of a preferred embodiment of the present invention consists of schematic diagram.This start server 3 mainly has a motherboard (accompanying drawing does not indicate), be provided with network connection unit 31, a CPU (Central Processing Unit on this motherboard, CPU) 32, input-output units 33, memory 34, and storage device 35, this CPU 32 is electrically connected to these network connection unit 31, this input-output unit 33, this memory 34 and this storage device 35.In the present embodiment, main this network connection unit 31 of passing through of this start server 3 is connected with the network switch 2, is the IP address of each connectivity port 21 configuration correspondences on this network switch 2, and each blank server 4 is installed and set action.
Please consult simultaneously Fig. 4, Fig. 4 is the installation procedure figure of a preferred embodiment of the present invention.At first, need the wherein station server main frame in this rack 1 of selection, setting this server host becomes start server 3 (step S10), more specifically, for this server host is installed corresponding application program, possesses the required function of start server 3 to make this server host.Then, the Fen Do blank server 4 (below will should blank server 4 illustrate to plant) of planting in a plurality of slots of this rack 1, and make this blank server 4 be connected (step S12) with the network switch 2, more specifically, one of them connectivity port 21 that this blank server 4 is connected on this network switch 2.
With after this blank server 4 is connected, this start server 3 can be obtained by this network switch 2 MAC Address (step S14) of this blank server 4 when this network switch 2.More specifically, this blank server 4 is connected with this network switch 2 by inner network connection unit (as the network connection unit 31 on this start server 3), and this start server 3 is obtained the MAC Address of the network connection unit of blank server 4 by this network switch 2.So, this start server 3 can be with MAC Address that should blank server 4, the IP address that is configured with connectivity port 21 that this blank server 4 connects is carried out corresponding, and is stored in (for example the address translation table of this shown in Fig. 3 351) (step S16) in address translation table 351.Wherein, the storage device 35 of these address translation table 351 major storages in this start server 3, but do not limited.After this step S16, start server 3 uses (step S18) with the IP address assignment that connectivity port 21 is configured to blank server 4.
As mentioned above, after this step S16 and this step S18, this start server 3 can be with this IP address and 4 bindings of this blank server, so that bookkeeping in the future.For instance, if wrong generation in the running of server host, thus system can be is directly correspondingly learnt that what make a mistake is which the station server main frame inquiry of this address translation table 351 (for example by) by this IP address.Moreover when server host was replaced, system also can be inquired about by this address translation table 351 and learn that this corresponding MAC Address in IP address changes, and then knows the replaced mistake of server host, so will help the manager to the attended operation of system.
After this step S18, this start server 3 is learnt the IP address that blank server 4 uses, thereby the IP address that this start server 3 can use according to this blank server 4 is carried out corresponding installation and sets action (as described below) this blank server 4.
It is worth mentioning that, system can preset the server host that uses which IP address, after building and complete, it to serve as any role, for instance, can preset the 48 station server main frames that use IP address X.X.1.1 to IP address X.X.1.48, its role is storage server (Storage server) forever, and the 48 station server main frames of use IP address X.X.1.49 to IP address X.X.1.96, its role is calculation server (Computing server) forever, but is not limited.Thus, after blank server 4 was obtained the IP address, start server 3 can carry out corresponding installation and set action it for the IP address.Thereby, when this blank server 4 build complete after, can according to the demand of system, become at once default role.So, can be the manager and save the program that many scripts need artificial setting, with the demand of attenuating manpower, and shorten the time that server host is reached the standard grade, quite convenient.
As mentioned above, at first, the IP address that this start server 3 then uses according to blank server 4, the configuration file 355 (step S20) of a uniqueness of generation.Above-mentioned configuration file 355 is stored in the storage device 35 of this start server 3, and the content of this configuration file 355 comprises Hostname (Host name), user account (User account), and the information such as mode of operation of this blank server 4 at least, after this configuration file 355 is downloaded and received to this blank server 4, can set action according to the content of this configuration file 355.
Then, this blank server 4 is by IP address interconnection network, needs to download the start image file (step S22) installed.Wherein, this blank server 4 can link to a TFTP (Trivial File Transfer Protocol is called for short TFTP) server and download the start image file that needs installation; Also can store those start image files in this start server 3, and offer this blank server 4 by this start server 3, do not limited.
As shown in Figure 3, in the storage device 35 of start server 3, store a plurality of enactment documents 352, a plurality of operating system 353, reach a plurality of application software (Application) 354.After step S22, the IP address that this start server 3 uses according to blank server 4, with reference to corresponding enactment document 352 (step S24) in this start server 3, and according to the content of this enactment document 352 of institute's reference, this blank server 4 is carried out corresponding installation and sets action (step S26).More specifically, in step S26, this start server 3 is downloaded predetermined operating system 353 and application software 354 to this blank server 4, to carry out fitting operation according to the content of the enactment document 352 of institute's reference.And this start server 3 is downloaded this configuration file 355 simultaneously to this blank server 4, to carry out setting operation.
Start server 3 is mainly the IP address of using according to this blank server 4, learn which slot of position in which rack of this blank server 4, thereby judge blank server 4 and build the role who serves as after completing, and then with reference to corresponding enactment document 352.Enactment document 352 informs that this start server 3 is required to be this blank server 4 which operating system 353 and which application software 354 are installed.
After above-mentioned steps is completed, this blank server 4 is namely completed and is installed and setting program, and start (step S28) again, then, this blank server 4 is after again starting shooting for the first time, with all information of detecting itself, for example information of the size of the quantity of CPU state, hard disk and capacity, memory, socket etc. voluntarily.At this moment, blank server 4 has been built and has been completed.At last, this blank server 4 sends above-mentioned information to the server 3 of starting shooting, so that this start server 3 is carried out registration action (step S30).This start server 3 is accepted the registration of this blank server 4, and should the blank server 4 information storage that send in the server info table 356 of inside (step S32).So, this start server 3 can be taken as simultaneously a management server and use, the gerentocratic bookkeeping of being more convenient for.
In method of the present invention, as long as in one of them slot on a new spacing server 4 insertion racks 1, this blank server 4 can automatically be completed and installs and set action, exist side by side and engrave line, become the required predetermined role of system, and should also can pass through the corresponding relation of the MAC Address of IP address and this blank server 4 by start server 3, this blank server 4 was carried out tracking and managing.Thereby, except the installation and setting of start server 3, the manager does not need manually blank server 4 to be installed and setting operation, when server system once needed station server main frame up to ten thousand is set, method of the present invention can be the manager and saves appreciable time and the human cost of building.
In method of the present invention, be mainly to be written into and to carry out a kind of application program in a station server main frame, and set, make this server host become start server 3 in server system, and by this application program, this start server 3 can have the function of Dynamic Host Configuration Protocol server.Wherein, this server system mainly comprises start server 3, at least one network switch 2, and at least one blank server 4, and this start server 3 and blank server 4 Fen Do connect a connectivity port 21 on this network switch 2.
Execution by this application program, this start server 3 can be carried out Auto-mounting and the establishing method of server of the present invention, when a blank server 4 is increased newly, and when arbitrary connectivity port 21 on the network switch 2 was connected, this start server 3 was carried out the following steps: the MAC Address that a) is obtained the network connection unit of this blank server 4 by this network switch 2; B) correspondence is carried out in MAC Address that should blank server 4 and connected connectivity port 21 is configured IP address; C) use this IP address assignment for this blank server 4; The IP address of d) using according to this blank server 4 produces a configuration file 355; E) come with reference to corresponding enactment document 352 according to the IP address of these blank server 4 use; And f) choose predetermined operating system 353 and application software 354 according to the content of the enactment document 352 of institute's reference, and with operating system 353, application software 354, and configuration file 355 be downloaded to this blank server 4, and install and set action.
Above-described is only the preferred embodiments of the present invention; described embodiment limits scope of patent protection of the present invention; therefore the equivalent structure done of every utilization specification of the present invention and accompanying drawing content changes, and in like manner all should be included in protection scope of the present invention.