Node online method and device, server and storage medium
Through the automated node launch method, the first management node is used to obtain the identification and operating system files of the node to be launched, and the node launch in the distributed storage cluster is automated, which solves the problem of inefficiency in the existing technology and improves the online efficiency.
Patent Information
- Application Number
- CN202510121521.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-24
AI Technical Summary
When the prior art adds the nodes to be launched into a distributed storage cluster, users need to manually operate in the computer room, resulting in inefficiency.
The first management node responds to the node online request of the terminal device, obtains the identification of the node to be online, and controls the node to be online to perform device positioning and displays the device according to the identification. Then, obtain the operating system's boot configuration file and boot image file, automatically install the operating system in the node to be launched, and add it to the distributed storage cluster.
The user does not need to manually operate in the computer room, which significantly improves the efficiency of node online and simplifies the online process.
Smart Images

Figure CN119922200A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a node online method, device, server and storage medium. Background Art
[0002] In the server field, distributed storage clusters can use multiple servers to store data through a scalable system structure. When the capacity of the distributed storage cluster is insufficient or a node is down, a node to be online (bare metal) needs to be added to the distributed storage cluster.
[0003] In the related art, in the process of adding the nodes to be put online to the distributed storage cluster, the user is required to manually add the nodes to be put online to the distributed storage cluster in the computer room (the room where the distributed storage cluster is placed) (such as manually installing the operating system), which leads to the problem of low efficiency in the related art methods. Summary of the invention
[0004] The embodiments of the present application provide a node online method, device, server and storage medium to achieve the effect of improving the node online efficiency.
[0005] In a first aspect, an embodiment of the present application provides a node online method, which is applied to a first management node, where the first management node is any management node in a distributed storage cluster; the method includes:
[0006] In response to the node online request sent by the terminal device, obtain the identifier of the node to be online;
[0007] According to the identification of the node to be put online, control the node to be put online to display the device location;
[0008] In response to the verification pass information sent by the terminal device, a boot configuration file corresponding to the operating system and a boot image file corresponding to the operating system stored in the first management node are obtained; wherein the verification pass information is input to the terminal device by the user based on the device location display of the node to be online;
[0009] According to the boot configuration file and the boot image file, install the operating system in the node to be put online, and add the node to be put online to the distributed storage cluster.
[0010] In a possible implementation, according to the identifier of the node to be online, controlling the node to be online to perform device location display includes:
[0011] According to the identifier of the node to be put online, determine the duration variable corresponding to the node to be put online; wherein the duration variable indicates the duration of the node to be put online to join the distributed storage cluster; the identifier of the node to be put online is the serial number of the node to be put online;
[0012] When the value in the duration variable corresponding to the node to be online is a preset value, the node to be online is controlled to light up an indicator light and / or output a preset sound to display the device location.
[0013] In a possible implementation manner, before adding the node to be put online to the distributed storage cluster, the method further includes:
[0014] Obtaining software packages corresponding to various software and configuration files corresponding to various software stored in the first management node;
[0015] According to the software packages and configuration files corresponding to each software, the nodes to be put online are configured.
[0016] In a possible implementation, the method further includes:
[0017] Obtain a target file sent by a master node in a distributed storage cluster; the target file includes at least one of the following: a boot configuration file corresponding to an operating system, a boot image file corresponding to the operating system, a software package corresponding to at least one software, and a configuration file corresponding to at least one software;
[0018] Perform storage processing on the target file;
[0019] Determine a second management node; wherein the second management node is a lower-level management node of the first management node; and the priority of the second management node is lower than that of the first management node;
[0020] When it is determined that the second management node does not store the synchronization mark, the target file is sent to the second management node so that the second management node can store the target file, and when the next-level management node of the second management node does not store the synchronization mark, the target file is sent to the next-level management node of the second management node;
[0021] The second management node is controlled to store a synchronization mark.
[0022] In a possible implementation, the method further includes:
[0023] Determining the total number of at least one stored target file stored by the first management node; the stored target file is a target file or a historical target file;
[0024] Determine the storage time of each stored target file;
[0025] When it is determined that the total number reaches the preset threshold, determining a target file to be deleted from at least one of the stored target files according to the storage time of each stored target file and the preset threshold;
[0026] Delete the target file to be deleted.
[0027] In one possible implementation,
[0028] The first management node is a control node, which is determined from a plurality of management nodes included in the distributed storage cluster according to the priority of each management node in the distributed storage cluster;
[0029] The priority of each management node is determined by the control node according to the acquired Internet Protocol address and / or at least one resource usage indicator of each management node.
[0030] In one possible implementation,
[0031] The priority of each management node is determined by the control node based on the resource usage indicators of each management node and the resource usage scores of each management node are consistent, based on the Internet Protocol address of each management node; or,
[0032] The priority of each management node is determined by the control node according to the resource usage scores of each management node when the control node determines that the resource usage scores of each management node are inconsistent based on the resource usage indicators of each management node.
[0033] In a second aspect, an embodiment of the present application provides a node online device, which is applied to a first management node, where the first management node is any management node in a distributed storage cluster; the device includes:
[0034] An acquisition module, used to obtain the identifier of the node to be online in response to the node online request sent by the terminal device;
[0035] A control module, used to control the node to be put online to display the device location according to the identifier of the node to be put online;
[0036] The acquisition module is further used to obtain the boot configuration file and the boot image file corresponding to the operating system stored in the first management node in response to the verification pass information sent by the terminal device; wherein the verification pass information is displayed by the user based on the device location of the node to be online, and is input to the terminal device;
[0037] The processing module is used to install the operating system in the node to be put online according to the boot configuration file and the boot image file, and add the node to be put online to the distributed storage cluster.
[0038] In a possible implementation manner, the control module is specifically configured to:
[0039] According to the identifier of the node to be put online, determine the duration variable corresponding to the node to be put online; wherein the duration variable indicates the duration of the node to be put online to join the distributed storage cluster; the identifier of the node to be put online is the serial number of the node to be put online;
[0040] When the value in the duration variable corresponding to the node to be online is a preset value, the node to be online is controlled to light up an indicator light and / or output a preset sound to display the device location.
[0041] In a possible implementation manner, the processing module is further configured to:
[0042] Obtaining software packages corresponding to various software and configuration files corresponding to various software stored in the first management node;
[0043] According to the software packages and configuration files corresponding to each software, the nodes to be put online are configured.
[0044] In a possible implementation manner, the processing module is further configured to:
[0045] Obtain a target file sent by a master node in a distributed storage cluster; the target file includes at least one of the following: a boot configuration file corresponding to an operating system, a boot image file corresponding to the operating system, a software package corresponding to at least one software, and a configuration file corresponding to at least one software;
[0046] Perform storage processing on the target file;
[0047] Determine a second management node; wherein the second management node is a lower-level management node of the first management node; and the priority of the second management node is lower than that of the first management node;
[0048] When it is determined that the second management node does not store the synchronization mark, the target file is sent to the second management node so that the second management node can store the target file, and when the next-level management node of the second management node does not store the synchronization mark, the target file is sent to the next-level management node of the second management node;
[0049] The second management node is controlled to store a synchronization mark.
[0050] In a possible implementation manner, the processing module is further configured to:
[0051] Determining the total number of at least one stored target file stored by the first management node; the stored target file is a target file or a historical target file;
[0052] Determine the storage time of each stored target file;
[0053] When it is determined that the total number reaches the preset threshold, determining a target file to be deleted from at least one of the stored target files according to the storage time of each stored target file and the preset threshold;
[0054] Delete the target file to be deleted.
[0055] In one possible implementation,
[0056] The first management node is a control node, which is determined from a plurality of management nodes included in the distributed storage cluster according to the priority of each management node in the distributed storage cluster;
[0057] The priority of each management node is determined by the control node according to the acquired Internet Protocol address and / or at least one resource usage indicator of each management node.
[0058] In one possible implementation,
[0059] The priority of each management node is determined by the control node based on the resource usage indicators of each management node and the resource usage scores of each management node are consistent, based on the Internet Protocol address of each management node; or,
[0060] The priority of each management node is determined by the control node according to the resource usage scores of each management node when the control node determines that the resource usage scores of each management node are inconsistent based on the resource usage indicators of each management node.
[0061] In a third aspect, an embodiment of the present application provides a server, the server being the first management node as in the first aspect; the server comprising: a memory, a processor;
[0062] Memory stores computer-executable instructions;
[0063] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0064] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0065] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0066] The node online method, device, server and storage medium provided by the embodiments of the present application, the first management node (any management node in the distributed storage cluster) can respond to the node online request sent by the terminal device, obtain the identification of the node to be online, and control the node to be online to display the device location according to the identification of the node to be online. The first management node can respond to the verification information sent by the terminal device to obtain the boot configuration file corresponding to the operating system stored by the first management node and the boot image file corresponding to the operating system; wherein the verification information is input to the terminal device by the user based on the device location display of the node to be online. The first management node can install the operating system in the node to be online according to the boot configuration file and the boot image file, and add the node to be online to the distributed storage cluster. In the above manner, the node can be online without the user manually adding the node to be online to the distributed storage cluster in the computer room, thereby improving the efficiency of node online. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0068] Figure 1a A schematic diagram of a node going online in a related technology provided in an embodiment of the present application;
[0069] Figure 1b A schematic diagram of an application scenario provided in an embodiment of the present application;
[0070] Figure 2a A flowchart of a node online method provided in an embodiment of the present application is shown in FIG1 ;
[0071] Figure 2b A workflow diagram for node online provided in an embodiment of the present application;
[0072] Figure 2c A functional schematic diagram of a first management node provided in an embodiment of the present application;
[0073] Figure 2d A schematic diagram of a process for installing an operating system provided for this application;
[0074] Figure 3 A second flowchart of a node online method provided in an embodiment of the present application;
[0075] Figure 4 A schematic diagram of a node online method provided in an embodiment of the present application Figure 3 ;
[0076] Figure 5 A schematic diagram of the structure of a node online device provided in an embodiment of the present application;
[0077] Figure 6 A schematic diagram of the structure of the server provided for this application.
[0078] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0079] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0080] In the server field, distributed storage clusters can use multiple servers to store data through a scalable system structure. When the capacity of the distributed storage cluster is insufficient or a node is down, a node to be online (bare metal) needs to be added to the distributed storage cluster.
[0081] Figure 1a A schematic diagram of a node going online in a related technology provided in an embodiment of the present application. Figure 1a As shown, in the related art, in the process of adding the node to be put online to the distributed storage cluster, the user needs to manually add the node to be put online to the distributed storage cluster in the computer room (the room where the distributed storage cluster is placed). Figure 1a As shown in FIG. 1 , the process of manually adding the node to be put online to the distributed storage cluster includes manually installing the operating system in the node to be put online, manually performing version upgrade (software version upgrade) and network configuration on the node to be put online.
[0082] In addition, in the process of manually adding the nodes to be put online to the distributed storage cluster outside the computer room, it is also necessary to use terminal devices to perform storage configuration, manual inspection, and storage pool reconstruction of the nodes to be put online. After the reconstruction is completed, the nodes to be put online are added to the distributed storage cluster.
[0083] However, the methods in the related art have the problem of low efficiency.
[0084] Based on the above technical problems, the technical concept of the embodiment of the present application is as follows: the first management node (any management node in the distributed storage cluster) can respond to the node online request sent by the terminal device, obtain the identification of the node to be online, and control the node to be online to display the device location according to the identification of the node to be online. The first management node can respond to the verification information sent by the terminal device to obtain the boot configuration file corresponding to the operating system stored by the first management node and the boot image file corresponding to the operating system; wherein the verification information is input to the terminal device by the user based on the device location display of the node to be online. The first management node can install the operating system in the node to be online according to the boot configuration file and the boot image file, and add the node to be online to the distributed storage cluster.
[0085] Through the above method, the node can be put online without the user manually adding the node to be put online to the distributed storage cluster in the computer room, thereby improving the efficiency of node online.
[0086] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0087] To facilitate understanding, first combine Figure 1b The application scenarios of the embodiments of the present application are described.
[0088] Figure 1b A schematic diagram of an application scenario provided for an embodiment of the present application.
[0089] like Figure 1b As shown, the application scenarios include:
[0090] Terminal device 10 and distributed storage cluster 20.
[0091] The distributed storage cluster 20 includes a control node 201 and a plurality of management nodes. Exemplarily, the distributed storage cluster includes a management node 202, a management node 203, and a management node 204. It can be understood that a plurality of management nodes can form a management node cluster. Any management node among the plurality of management nodes can be a first management node. Exemplarily, the management node 202 can be a first management node.
[0092] In addition, the distributed storage cluster 20 may further include multiple storage nodes. Exemplarily, the distributed storage cluster may further include a storage node 205 and a storage node 206 .
[0093] In this application scenario, the control node 201 may be communicatively connected with the terminal device 10 .
[0094] The control node can also be connected to multiple management nodes for communication.
[0095] The control node can also be connected to multiple storage nodes for communication.
[0096] It should be noted that Figure 1b This is only a schematic diagram of an application scenario provided by the embodiment of the present application. Figure 1b The actual form of the various devices included in the Figure 1b The interaction mode between devices is limited, and in the application of the solution, it can be set according to actual needs.
[0097] Figure 2a A flowchart of a node online method provided in an embodiment of the present application is shown in FIG. Figure 2a As shown, the method comprises the following steps:
[0098] S201: In response to a node online request sent by a terminal device, an identifier of a node to be online is obtained.
[0099] In this embodiment, the first management node may obtain a node online request sent by the terminal device. The first management node may obtain an identifier of the node to be online in response to the node online request. In one implementation, the identifier of the node to be online may be a serial number of the node to be online.
[0100] Next, a process in which the first management node obtains a node online request sent by a terminal device is described.
[0101] In one implementation,
[0102] The first management node may run a smart wizard.
[0103] The terminal device may generate a node online request in response to a user's operation on a graphical user interface (GUI) of the terminal device. For example, Figure 2b A workflow diagram for node online provided in an embodiment of the present application. Figure 2b As shown, the terminal device can generate a node online request in response to the user's start operation on the GUI.
[0104] The control node may run an intelligent wizard, obtain a node online request, and send the node online request to the first management node.
[0105] The following describes a process in which the first management node obtains the identifier of the node to be brought online in response to the node bringing online request.
[0106] In one implementation,
[0107] The first management node may obtain an Internet Protocol (IP) address of a controller in the node to be brought online. In one implementation, the controller may be a baseboard management controller.
[0108] In one implementation, when the node to be put online is a newly added node or a node with a replaced mainboard, the IP address of the controller in the node to be put online is the IP address of the controller in the node to be put online, which is screened from multiple free IP addresses by the first management node running a DHCP server and allocated to the controller in the node to be put online.
[0109] In one implementation, when the node to be put online is a down node, based on the fact that the first management node has stored the IP address of the controller in the down node, the first management node can directly obtain the IP address of the controller in the node to be put online.
[0110] After obtaining the IP address of the controller in the node to be online, the first management node can query the correspondence between the IP address and the serial number according to the IP address of the controller in the node to be online, and determine the identifier (serial number) of the node to be online.
[0111] In one implementation, the first management node can also determine the host name and host model corresponding to the node to be online according to the IP address of the controller in the node to be online. It should be noted that the host name, host model, and serial number can all be understood as the node information of the node to be online.
[0112] In one implementation,
[0113] The node online request may include the identifier of the node to be online.
[0114] The first management node may obtain the identifier of the node to be brought online in the node bringing online request.
[0115] S202: According to the identifier of the node to be online, control the node to be online to perform device positioning display.
[0116] In this embodiment, the first management node may control the node to be online to display the device location according to the identifier of the node to be online.
[0117] In one implementation,
[0118] The first management node may determine a duration variable corresponding to the node to be online according to the identifier of the node to be online, wherein the duration variable indicates the duration of the node to be online joining the distributed storage cluster.
[0119] The first management node can control the node to be online to light up the indicator light and / or output a preset sound when the value in the duration variable (online_time) corresponding to the node to be online is a preset value (such as zero) to display the device location. It should be noted that the device location display allows the user to quickly find the node to be online from multiple nodes in the computer room. In one implementation, the first management node can control the node to be online to light up the indicator light and / or output a preset sound by sending an Intelligent Platform Management Interface (IPMI) command to the node to be online. In one implementation, the node to be online can light up the indicator light continuously at intervals of two seconds based on the IPMI command.
[0120] In one implementation, the preset value may be zero. It should be noted that, when the node to be put online is a newly added node or a node whose mainboard has been replaced, the value in the duration variable corresponding to the node to be put online is zero. When the node to be put online is a downtime node, the value in the duration variable corresponding to the node to be put online is zero. Based on the above, it can be seen that when the value in the duration variable corresponding to the node to be put online is zero, the node to be put online is a node that needs to be put online.
[0121] Through the above-mentioned method, node online errors are avoided, which may cause the first management node to bring online a node that has completed the online process, thereby causing a node failure.
[0122] S203: In response to the verification pass information sent by the terminal device, obtain a boot configuration file corresponding to the operating system and a boot image file corresponding to the operating system stored in the first management node.
[0123] In this embodiment, the first management node may store a boot configuration file corresponding to the operating system, and a boot image file corresponding to the operating system. In addition, the first management node may also store a software package corresponding to each software, and a configuration file corresponding to each software. In one implementation, the first management node may reserve 20 GB of storage space for storing the boot configuration file corresponding to the operating system, the boot image file corresponding to the operating system, the software package corresponding to each software, and the configuration file corresponding to each software.
[0124] In one implementation, Figure 2c A functional diagram of a first management node provided in an embodiment of the present application. Figure 2cAs shown, the first management node can have network management function, version image management function, and configuration management function. Among them, the network management function means that the first management node can run DHCP server, TFTP server, and in addition, the first management node can also run IP scanning tools. The version image management function means that the first management node can manage the boot configuration file corresponding to the operating system stored in the first management node, the boot image file corresponding to the operating system, and the software package (or upgrade package) corresponding to each software. The configuration management function means that the first management node can manage the configuration file corresponding to each software.
[0125] When the node to be put online is displaying the device location, the user can check in the computer room whether the node to be put online where the device location is displayed is a bare metal node that needs to be put online. If so, the terminal device can respond to the user's operation on the graphical user interface and obtain verification information.
[0126] The first management node may obtain the verification pass information sent by the terminal device, and obtain the boot configuration file corresponding to the operating system and the boot image file corresponding to the operating system stored in the first management node.
[0127] The verification pass information is displayed by the user based on the device location of the node to be put online and input into the terminal device.
[0128] S204: Install the operating system in the node to be put online according to the boot configuration file and the boot image file, and add the node to be put online to the distributed storage cluster.
[0129] In this embodiment, the first management node may install (install) the operating system in the node to be put online according to the boot configuration file and the boot image file, and add the node to be put online to the distributed storage cluster.
[0130] Figure 2d A schematic diagram of a process for installing an operating system provided in this application.
[0131] Next, combine Figure 2b , a process of installing an operating system in a node to be put online by a first management node according to a boot configuration file and a boot image file is described.
[0132] In one implementation,
[0133] 1. The first management node can run the IPMI tool to send a Preboot Execution Environment (PXE) boot command to the node to be put online.
[0134] 2. The node to be online can send a temporary IP address application request to the first management node through the in-band management network card. It can be understood that the first management node can run a DHCP server to obtain the temporary IP address application request sent by the node to be online.
[0135] 3. The first management node can send a temporary IP address and the network location of the bootstrap file to the node to be online. The temporary IP address is used for communication by the node to be online.
[0136] 4. The node to be put online can request the first management node to transmit the bootstrap file. It can be understood that the node to be put online requests the first management node to transmit the bootstrap file based on the temporary IP address and the network location of the bootstrap file.
[0137] 5. The first management node can send the bootstrap file to the node to be put online.
[0138] 6. The node to be put online can execute pxelinux.0 according to the bootstrap file. It should be noted that pxelinux.0 is a boot image file.
[0139] 7. The node to be online requests the first management node for the pxelinux.cfg file. It should be noted that the pxelinux.cfg file is a boot configuration file. This file contains the configuration parameters required for booting.
[0140] 8. The first management node transmits the pxelinux.cfg file to the node to be put online.
[0141] 9. The node to be put online requests the system kernel and root files from the first management node.
[0142] 10. The first management node transmits the system kernel and root files to the node to be online. It should be noted that the system kernel and root files are necessary for the operating system to start.
[0143] 11. The node to be put online starts.
[0144] In addition, in one implementation,
[0145] The first management node may also obtain the software packages corresponding to the various software and the configuration files corresponding to the various software stored in the first management node before adding the node to be put online to the distributed storage cluster.
[0146] The first management node can perform configuration processing on the node to be put online according to the software package corresponding to each software and the configuration file corresponding to each software. In other words, the first management node can perform version upgrade management (version management of the software package) and import configuration files.
[0147] Next, the configuration process of the first management node is described.
[0148] In one implementation,
[0149] After installing the operating system on the node to be launched, the first management node can use the temporary IP address of the node to be launched and the default account and password to establish a Secure Shell Session (SSH) session with the node to be launched before adding the node to be launched to the distributed storage cluster. The first management node can send a port closing command (such as an iptables command) to the node to be launched to control the node to be launched to close the storage service port. In this way, it is possible to avoid the node to be launched from storing data to be stored (data that needs to be stored in the distributed storage cluster), which may cause an alarm.
[0150] The first management node can control the node to be online to perform hard disk partitioning and network recovery processing. In one implementation, when the node to be online is a down node, since the hard disk of the node to be online is not faulty, the node to be online can mount the hard disk according to the partition table information after identifying the partition table information of the hard disk (including the partition layout information of the hard disk). In addition, the first management node can obtain the network configuration information corresponding to the node to be online, and send the network configuration information to the node to be online, so that the node to be online performs network recovery processing according to the network configuration information. In one implementation, when the node to be online is a newly added node, that is, when the management database does not store the serial number of the node to be online, the first management node can respond to the node type (node role) selection information sent by the terminal device, determine the partition mode corresponding to the node type (such as storage node or computing node) in the node type selection information, partition the hard disk, and mount the hard disk according to the partition table information of the hard disk partition. The first management node can also determine an IP address corresponding to a node to be online from multiple idle IP addresses, and control the node to be online to perform network recovery processing according to the IP address. In one implementation, the first management node can also control the graphical user interface of the terminal device to display the IP address for the user to verify the IP address, and after the verification is passed, control the node to be online to perform network recovery processing according to the IP address. In one implementation, the terminal device can also obtain a new IP address input by the user after the user fails to verify the IP address. The first management node can obtain the new IP address sent by the terminal device, and control the node to be online to perform network recovery processing according to the new IP address. It can be understood that in one implementation, the new IP address entered by the user can be different from the last digit of the IP address displayed on the graphical user interface of the terminal device.
[0151] The first management node may also send a service start command corresponding to the node type to start the storage service of the node to be online after controlling the node to be online to perform hard disk partitioning and network recovery processing according to the node type of the node to be online.
[0152] In one implementation, the first management node may also perform inspection and processing on the node to be online. The first management node may control the graphical user interface of the terminal device to display abnormal information when the detection fails. The user may perform abnormal processing based on the abnormal information displayed by the terminal device. In one implementation, after the user performs abnormal processing, the first management node may respond to the continue inspection instruction of the terminal device and perform full inspection or incremental inspection processing on the node to be online.
[0153] In one implementation, the first management node may also determine whether the distributed storage cluster meets the node online condition based on the fault information and load information of the distributed storage cluster. If not, the first management node may control the graphical user interface of the terminal device to display a reminder message.
[0154] In one implementation, the first management node can also control the node to be online to open the storage service port in response to the information sent by the terminal device to start the online node to be online, so that the node to be online can store the data to be stored (the data that needs to be stored in the distributed storage cluster). In addition, the first management node can also control the node to be online to reconstruct the storage pool, and control the duration variable corresponding to the node to be online to start timing, so that it reflects the duration of the node to be online joining the distributed storage cluster. In addition, it should be noted that the first management node can determine the reconstruction speed of the storage pool based on the load information of the distributed storage cluster. In addition, the first management node can also shut down the DHCP server and TFTP server running on the first management node. In one implementation, the first management node can also update the configuration library.
[0155] Beneficial effects of this embodiment: In this embodiment, the first management node (any management node in the distributed storage cluster) can obtain the identification of the node to be online in response to the node online request sent by the terminal device, and control the node to be online to perform device positioning display according to the identification of the node to be online. The first management node can obtain the boot configuration file corresponding to the operating system stored by the first management node and the boot image file corresponding to the operating system in response to the verification pass information sent by the terminal device; wherein the verification pass information is input to the terminal device by the user based on the device positioning display of the node to be online. The first management node can install the operating system in the node to be online according to the boot configuration file and the boot image file, and add the node to be online to the distributed storage cluster. In the above manner, the node can be online without the user manually adding the node to be online to the distributed storage cluster in the computer room, thereby improving the efficiency of node online.
[0156] Next, the process of each management node in the distributed storage cluster obtaining the target file is described.
[0157] Figure 3 A flowchart of a method for bringing a node online provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the method comprises the following steps:
[0158] S301: Acquire a target file sent by a control node in a distributed storage cluster.
[0159] In this embodiment, the control node in the distributed storage cluster can obtain the target file sent by the terminal device.
[0160] The target file includes at least one of the following: a boot configuration file corresponding to the operating system, a boot image file corresponding to the operating system, a software package corresponding to at least one software, and a configuration file corresponding to at least one software.
[0161] The first management node may obtain the target file sent by the control node.
[0162] S302: storing the target file.
[0163] In this embodiment, the first management node may perform storage processing on the target file after acquiring the target file.
[0164] S303: Determine a second management node.
[0165] In this embodiment, the first management node may determine the second management node after storing the target file. In one implementation, each management node may store the priorities of multiple management nodes. The first management node may determine the second management node according to the priority of each management node.
[0166] Among them, the second management node is the next-level management node of the first management node. The priority of the second management node is lower than that of the first management node. Exemplarily, the first management node is a management node with a priority of 1. The second management node is a management node with a priority of 2. It should be noted that, in one implementation, the smaller the value of the priority, the greater the priority. In one implementation, the priority of the second management node is lower than that of the first management node, and the priority of the second management node is greater than that of other management nodes.
[0167] S304: When it is determined that the second management node does not store the synchronization mark, send the target file to the second management node.
[0168] In this embodiment, the first management node may determine whether the second management node stores a synchronization mark, wherein the synchronization mark is used to indicate that the second management node has synchronized the target file.
[0169] The first management node may send the target file to the second management node when it is determined that the second management node does not store the synchronization mark.
[0170] The second management node can perform storage processing on the target file.
[0171] The second management node may determine a next-level node (third management node) of the second management node.
[0172] The second management node may determine whether the next level node of the second management node stores a synchronization mark. The second management node may send the target file to the next level node of the second management node if it is determined that the next level node of the second management node does not store a synchronization mark.
[0173] The third management node (a node at a lower level than the second management node) may determine a node at a lower level than the third management node.
[0174] The third management node may determine whether the next level node of the third management node stores a synchronization mark. The third management node may send the target file to the next level node of the third management node if it is determined that the next level node of the third management node does not store a synchronization mark.
[0175] Through the above-mentioned step-by-step synchronization method, each management node can store target data.
[0176] S305: Control the second management node to store a synchronization flag.
[0177] In this embodiment, after sending the target file to the second management node, the first management node may control the second management node to store the target file and then control the second management node to store a synchronization mark.
[0178] In addition, in one implementation,
[0179] The first management node may determine the total number of at least one stored target file stored by the first management node, wherein the stored target file is a target file or a historical target file.
[0180] The first management node may determine the storage time of each stored target file.
[0181] When determining that the total number reaches a preset threshold, the first management node may determine a target file to be deleted from at least one stored target file according to the storage time of each stored target file and the preset threshold. Exemplarily, the preset threshold may be 3.
[0182] The first management node may delete the target file to be deleted.
[0183] It should be noted that other management nodes in the management node cluster can also determine the target file to be deleted and delete the target file to be deleted. The specific implementation process is the same as the process of the first management node determining the target file to be deleted and deleting the target file to be deleted, which will not be repeated here.
[0184] In addition, in one implementation,
[0185] The control node in the distributed storage cluster can monitor the resource usage score of each management node.
[0186] When the control node detects that the resource usage score of at least one management node has changed, the control node may obtain the updated priority of each management node according to the resource usage score of each management node.
[0187] The control node may determine whether all management nodes store a synchronization flag when determining that the updated priority of at least one management node is inconsistent with the priority of the management node (priority before updating).
[0188] The control node may send the updated priority of each management node to each management node when it is determined that each management node stores the synchronization mark.
[0189] Beneficial effects of this embodiment: the first management node can obtain the target file sent by the master node in the distributed storage cluster; the target file includes at least one of the following: a boot configuration file corresponding to the operating system, a boot image file corresponding to the operating system, a software package corresponding to at least one software, and a configuration file corresponding to at least one software. The first management node can store and process the target file. The first management node can determine the second management node; the second management node is the next-level management node of the first management node; the priority of the second management node is lower than that of the first management node. The first management node can send the target file to the second management node when it is determined that the second management node does not store the synchronization mark, so that the second management node can store and process the target file, and send the target file to the next-level management node of the second management node when the next-level management node of the second management node does not store the synchronization mark. After sending the target file to the second management node, the first management node can control the second management node to store the synchronization mark. By synchronizing the target files of the management nodes step by step, each management node can store the target file, and then each management node can use the stored target file to perform online processing on the node to be online when it is selected as the first management node, avoiding the situation where the node to be online cannot be online due to the failure of a single management node. In addition, by synchronizing the target files of the management nodes step by step, the synchronization pressure of the first management node can be reduced.
[0190] The following describes a process in which a control node in a distributed storage cluster determines a first management node from a plurality of management nodes included in the distributed storage cluster.
[0191] Figure 4 A schematic diagram of a node online method provided in an embodiment of the present application Figure 3 ,like Figure 4 As shown, the method comprises the following steps:
[0192] S401: The control node determines the priority of each management node according to the acquired IP address and / or resource usage index of each management node.
[0193] In this embodiment, the distributed storage cluster includes a control node, wherein the control node can run cluster management software to manage each node in the cluster.
[0194] The distributed storage cluster includes multiple management nodes. In one implementation, the control node may determine multiple management nodes from the distributed storage cluster in response to the user's confirmation information and according to the identifiers of the multiple management nodes in the determination information.
[0195] In one implementation, the control node may obtain the IP address of each management node.
[0196] In one implementation, the control node may obtain resource usage indicators of each management node. Exemplarily, the resource usage indicators may include at least one or more of the following: CPU usage, memory usage, remaining storage space of the hard disk, hard disk performance, and network bandwidth. It should be noted that hard disk performance may be measured by the data transmission rate, random read / write rate, sequential read / write rate, delay duration, etc. of the hard disk.
[0197] The control node may determine the priority of each management node according to the IP address and / or resource usage index of each management node.
[0198] In one implementation,
[0199] The control node can compare the IP addresses of the management nodes and determine the priority of each management node according to the size of the IP address of each management node. Exemplarily, as the size of the IP address of the management node gradually increases, the priority of the management node gradually decreases.
[0200] In one implementation,
[0201] The control node may determine the resource usage score of each management node according to the resource usage index of each management node. In one implementation, the control node may determine the resource usage score of the management node based on the following formula.
[0202]
[0203] Among them, j represents the jth management node; w represents the weight value of each resource usage indicator; v represents the resource usage indicator; k represents the number of resource usage indicators.
[0204] The control node may determine the priority of the management node according to the resource usage score of each management node. In one implementation, the lower the resource usage score, the higher the priority of the management node.
[0205] In one implementation,
[0206] The control node can determine the resource usage score of each management node based on the resource usage indicators of each management node.
[0207] The control node may determine the priority of each management node according to the IP address of each management node when it is determined that the resource usage scores of each management node are consistent according to the resource usage scores of each management node. In one implementation, the control node may determine the priority of each management node according to the size of the IP address of each management node. Exemplarily, as the size of the IP address of the management node gradually increases, the priority of the management node gradually decreases.
[0208] The control node may determine the priority of each management node according to the resource usage scores of each management node when determining that the resource usage scores of each management node are inconsistent. In one implementation, the lower the resource usage score, the higher the priority of the management node.
[0209] S402: The control node determines a first management node from a plurality of management nodes included in the distributed storage cluster according to the priorities of the management nodes in the distributed storage cluster.
[0210] In this embodiment, after determining the priority of each management node in the distributed storage cluster, the control node may determine the first management node from the multiple management nodes included in the distributed storage cluster according to the priority of each management node.
[0211] In an implementation manner, the control node may determine a management node with the highest priority among multiple management nodes as the first management node.
[0212] In one implementation, for any management node, after determining the priority of each management node, the control node may send the priority of each management node to the management node.
[0213] Beneficial effects of this embodiment: In this embodiment, the control node can determine the priority of each management node according to the acquired IP address and / or resource usage index of each management node. The control node can determine the first management node from the multiple management nodes included in the distributed storage cluster according to the priority of each management node in the distributed storage cluster. In the above manner, the first management node can be quickly determined, which improves the efficiency of determining the first management node.
[0214] An embodiment of the present application provides a node online device, which is applied to a first management node, and the first management node is any management node in a distributed storage cluster.
[0215] Figure 5 A schematic diagram of the structure of the node online device provided in the embodiment of the present application, such as Figure 5 As shown, the node online device 50 provided in this embodiment includes: an acquisition module 51, a control module 52, and a processing module 53.
[0216] An acquisition module 51 is used to obtain an identifier of a node to be online in response to a node online request sent by a terminal device;
[0217] A control module 52, used to control the node to be online to perform device positioning display according to the identifier of the node to be online;
[0218] The acquisition module 51 is further used to obtain the boot configuration file and the boot image file corresponding to the operating system stored in the first management node in response to the verification pass information sent by the terminal device; wherein the verification pass information is input to the terminal device by the user based on the device location display of the node to be online;
[0219] The processing module 53 is used to install the operating system in the node to be put online according to the boot configuration file and the boot image file, and add the node to be put online to the distributed storage cluster.
[0220] The node online device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0221] In a possible implementation, the control module 52 is specifically configured to:
[0222] According to the identifier of the node to be put online, determine the duration variable corresponding to the node to be put online; wherein the duration variable indicates the duration of the node to be put online to join the distributed storage cluster; the identifier of the node to be put online is the serial number of the node to be put online;
[0223] When the value in the duration variable corresponding to the node to be online is a preset value, the node to be online is controlled to light up an indicator light and / or output a preset sound to display the device location.
[0224] The node online device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0225] In a possible implementation manner, the processing module 53 is further configured to:
[0226] Obtaining software packages corresponding to various software and configuration files corresponding to various software stored in the first management node;
[0227] According to the software packages and configuration files corresponding to each software, the nodes to be put online are configured.
[0228] The node online device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0229] In a possible implementation manner, the processing module 53 is further configured to:
[0230] Obtain a target file sent by a master node in a distributed storage cluster; the target file includes at least one of the following: a boot configuration file corresponding to an operating system, a boot image file corresponding to the operating system, a software package corresponding to at least one software, and a configuration file corresponding to at least one software;
[0231] Perform storage processing on the target file;
[0232] Determine a second management node; wherein the second management node is a lower-level management node of the first management node; and the priority of the second management node is lower than that of the first management node;
[0233] When it is determined that the second management node does not store the synchronization mark, the target file is sent to the second management node so that the second management node can store the target file, and when the next-level management node of the second management node does not store the synchronization mark, the target file is sent to the next-level management node of the second management node;
[0234] The second management node is controlled to store a synchronization mark.
[0235] The node online device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0236] In a possible implementation manner, the processing module 53 is further configured to:
[0237] Determining the total number of at least one stored target file stored by the first management node; the stored target file is a target file or a historical target file;
[0238] Determine the storage time of each stored target file;
[0239] When it is determined that the total number reaches the preset threshold, determining a target file to be deleted from at least one of the stored target files according to the storage time of each stored target file and the preset threshold;
[0240] Delete the target file to be deleted.
[0241] The node online device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0242] In one possible implementation,
[0243] The first management node is a control node, which is determined from a plurality of management nodes included in the distributed storage cluster according to the priority of each management node in the distributed storage cluster;
[0244] The priority of each management node is determined by the control node according to the acquired Internet Protocol address and / or at least one resource usage indicator of each management node.
[0245] The node online device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0246] In one possible implementation,
[0247] The priority of each management node is determined by the control node based on the resource usage indicators of each management node and the resource usage scores of each management node are consistent, based on the Internet Protocol address of each management node; or,
[0248] The priority of each management node is determined by the control node according to the resource usage scores of each management node when the control node determines that the resource usage scores of each management node are inconsistent based on the resource usage indicators of each management node.
[0249] The node online device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0250] Figure 6 A schematic diagram of the structure of the server provided in this application. The server is the first management node of any of the aforementioned method embodiments.
[0251] like Figure 6 As shown, the server 60 provided in this embodiment includes: at least one processor 601 and a memory 602. Optionally, the device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus ( Figure 6 not shown) connection.
[0252] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above method.
[0253] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0254] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0255] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one hard disk memory.
[0256] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0257] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0258] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0259] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, hard disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0260] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0261] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0262] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.
[0263] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0264] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0265] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0266] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application, are not limited to the precise structures described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A node online method, characterized in that: Applied to a first management node, the first management node is any management node in a distributed storage cluster; the method comprises: In response to the node online request sent by the terminal device, obtain the identifier of the node to be online; According to the identifier of the node to be online, controlling the node to be online to perform device positioning display; In response to the verification pass information sent by the terminal device, a boot configuration file corresponding to the operating system stored in the first management node and a boot image file corresponding to the operating system are obtained; wherein the verification pass information is input to the terminal device by the user based on the device location display of the node to be online; According to the boot configuration file and the boot image file, the operating system is installed in the node to be put online, and the node to be put online is added to the distributed storage cluster.
2. The method according to claim 1, characterized in that: The controlling the node to be online to perform device positioning display according to the identifier of the node to be online includes: According to the identifier of the node to be online, determine the duration variable corresponding to the node to be online; wherein the duration variable indicates the duration of the node to be online joining the distributed storage cluster; the identifier of the node to be online is the serial number of the node to be online; When the value in the duration variable corresponding to the node to be online is a preset value, the node to be online is controlled to light up an indicator light and / or output a preset sound to display the device location.
3. The method according to claim 1, characterized in that Before adding the node to be put online to the distributed storage cluster, the method further includes: Acquire a software package corresponding to each software and a configuration file corresponding to each software stored in the first management node; The node to be put online is configured according to the software packages corresponding to the software and the configuration files corresponding to the software.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Obtain a target file sent by a master node in the distributed storage cluster; the target file includes at least one of the following: a boot configuration file corresponding to the operating system, a boot image file corresponding to the operating system, a software package corresponding to at least one software, and a configuration file corresponding to at least one software; Performing storage processing on the target file; Determine a second management node; wherein the second management node is a lower-level management node of the first management node; and the priority of the second management node is lower than that of the first management node; If it is determined that the second management node does not store the synchronized mark, send the target file to the second management node so that the second management node can store the target file, and if the next-level management node of the second management node does not store the synchronized mark, send the target file to the next-level management node of the second management node; Control the second management node to store the synchronization flag.
5. The method according to claim 4, characterized in that The method further comprises: Determine the total number of at least one stored target file stored by the first management node; the stored target file is the target file or a historical target file; Determining the storage time of each of the stored target files; When it is determined that the total number reaches a preset threshold, determining a target file to be deleted from at least one of the stored target files according to the storage time of each of the stored target files and the preset threshold; The target file to be deleted is deleted.
6. The method according to claim 1, characterized in that The first management node is the control node, and is determined from a plurality of management nodes included in the distributed storage cluster according to the priority of each management node in the distributed storage cluster; The priority of each management node is determined by the control node according to the acquired Internet Protocol address and / or at least one resource usage indicator of each management node.
7. The method according to claim 6, characterized in that The priority of each management node is determined by the control node according to the Internet Protocol address of each management node when the resource usage scores of each management node are determined to be consistent according to the resource usage indicators of each management node; or, The priority of each management node is determined by the control node according to the resource usage scores of each management node when it is determined that the resource usage scores of each management node are inconsistent according to the resource usage indicators of each management node.
8. A node online device, characterized in that: Applied to a first management node, the first management node is any management node in a distributed storage cluster; the device comprises: An acquisition module, used to obtain the identifier of the node to be online in response to the node online request sent by the terminal device; A control module, used for controlling the node to be online to perform device positioning display according to the identifier of the node to be online; The acquisition module is further configured to acquire, in response to the verification pass information sent by the terminal device, a boot configuration file and a boot image file corresponding to the operating system stored in the first management node; wherein the verification pass information is input to the terminal device by the user based on the device location display of the node to be online; A processing module is used to install the operating system in the node to be online according to the boot configuration file and the boot image file, and add the node to be online to the distributed storage cluster.
9. A server, characterized in that: The server is a first management node according to any one of claims 1 to 7; the server comprises: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the node online method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the node online method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Network device online method and device, server and storage medium
CN111245898A
Hard disk online detection method and device
CN113470726A
Cluster deployment method, related equipment and storage medium
CN117692315A
Distributed storage cluster deployment method, electronic equipment and storage medium
CN117806674A
Storage cluster upgrade control method and apparatus, device, and storage medium
WO2024099444A1