Large-scale storage cluster deployment grouping method and device
Technical Field
The invention relates to the technical field of cluster deployment, in particular to a method and a device for deploying and grouping large-scale storage clusters.
Background
In a storage cluster, nodes are divided into management nodes and storage nodes according to node purposes. The management node bears the management and control task of the whole cluster, and needs to acquire the states of each hard disk pool, each node and each disk in the cluster in real time, sense the overall operation situation of the cluster and perform corresponding processing. As the scale of the storage cluster is larger and larger, the network pressure and the service pressure of the management and control node are greatly increased, and the response speed is greatly influenced, so that the system becomes a bottleneck in a large-scale scene.
Aiming at a large-scale deployment scene of the storage cluster, in order to lighten the pressure of the management nodes, the whole cluster can be divided into a plurality of sub-clusters to be managed by adopting a multi-sub-cluster mode, each sub-cluster is provided with a plurality of sub-management nodes respectively and is responsible for the management and control tasks of the sub-clusters, and the pressure of the main management nodes is further shared to the sub-management nodes on each sub-cluster, so that the pressure of the main management nodes is lightened. The method has the advantages that the whole cluster is divided into a plurality of sub-clusters to be managed by adopting a multi-sub-cluster mode, the problem of single node performance under a large-scale scene can be solved, but in practical application, the method has the following defects that 1, the creation of the sub-clusters needs user intervention, each sub-cluster needs a user to plan the nodes contained in the sub-clusters, the deployment efficiency is low under the large-scale scene, 2, the high reliability of the sub-management nodes under the fault scene needs to be ensured by introducing an additional high-availability mechanism, for example, the mode of virtual IP (Internet protocol) is adopted, the complexity of cluster operation and deployment configuration is obviously increased by the user allocation, 3, the sub-management nodes need to perform node role migration when the sub-management nodes bear the management task of the sub-clusters, the capacity shrinking process under the scene is complex, and the user intervention is required to specify a new sub-management node, and the user experience is influenced.
Therefore, how to provide a method for improving deployment efficiency and user experience of a large-scale storage cluster becomes a technical problem to be solved.
Disclosure of Invention
In view of this, the invention mainly solves the problems of low deployment efficiency and poor user experience of large-scale clusters, and provides an automatic grouping method of large-scale storage clusters, which releases users from heavy deployment flows.
In one aspect, the present invention provides a method for deploying and grouping a large-scale storage cluster, including:
analyzing the information of the management node and the storage node selected by a user, initializing a grouping sequence, adding the management node into the queue head of the grouping sequence, and sequentially adding the storage node into the grouping sequence according to the IP sequence;
Setting an upper limit value of a grouping node, comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping node, grouping the remaining nodes to be grouped in the grouping sequence according to a comparison result, and adding the nodes in each grouping into a unified management service;
the grouping information in the distributed configuration file is updated.
Further, the method for deploying and grouping the large-scale storage clusters of the invention groups the rest nodes to be grouped in the grouping sequence according to the comparison result, and comprises the following steps:
if the number of the remaining nodes to be grouped in the grouping sequence is not less than the upper limit value of the grouping nodes, sequentially selecting the nodes in the grouping sequence according to the upper limit value of the grouping nodes to form a new group, adding one to the number of the group, adding all the nodes in the new group to unified management service, continuously comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping nodes, and grouping the remaining nodes to be grouped in the grouping sequence according to the comparison result;
If the number of the remaining nodes to be grouped in the grouping sequence is smaller than the upper limit value, forming a new group by the remaining nodes to be grouped in the grouping sequence, adding one to the number of the group, and adding all the nodes in the new group into unified management service.
Further, the method for deploying the grouping of the large-scale storage clusters comprises the steps that when the management node needs to acquire data of each node, the management node establishes communication with the unified management service and sends request data to the unified management service, the unified management service routes the request data to a certain storage node of the grouping, and the storage node collects information of all nodes of the grouping.
Further, the method for deploying the grouping of the large-scale storage clusters comprises the steps of adding the nodes in each grouping into the unified management service, and when the management node needs each node to execute the service, establishing communication with the unified management service and sending request data to the unified management service, wherein the unified management service routes the request data to a certain storage node of the grouping, and the storage node distributes configuration instructions.
Furthermore, the method for deploying the grouping of the large-scale storage clusters comprises the steps that when a certain node is abnormal, the unified management service automatically discovers the abnormality and removes the node from a unified management service list, and request data cannot be routed to the fault node.
On the other hand, the invention also provides a large-scale storage cluster deployment grouping device, which comprises:
The system comprises a packet sequence construction module, a packet sequence analysis module and a storage module, wherein the packet sequence construction module is used for analyzing the information of a management node and a storage node selected by a user, initializing a packet sequence, adding the management node into the queue head of the packet sequence, and sequentially adding the storage node into the packet sequence according to an IP sequence;
The grouping module is used for setting an upper limit value of the grouping nodes, comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping nodes, grouping the remaining nodes to be grouped in the grouping sequence according to a comparison result, and adding the nodes in each grouping into the unified management service module;
The unified management service module is used for establishing communication with the management node, receiving request data sent by the management node, routing the request data to a certain storage node of the packet, and collecting information of all nodes of the packet or distributing configuration instructions through the storage node;
and the updating module is used for updating the grouping information in the distributed configuration file.
Further, the invention relates to a grouping module in a large-scale storage cluster deployment grouping device, which is specifically used for:
Setting an upper limit value of a grouping node, comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping node, if the number of the remaining nodes to be grouped in the grouping sequence is not smaller than the upper limit value of the grouping node, sequentially selecting the nodes in the grouping sequence according to the upper limit value of the grouping node to form a new group, adding one to the number of the group, adding all the nodes in the new group into a unified management service module, continuously comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping node, and grouping the remaining nodes to be grouped in the grouping sequence according to a comparison result;
If the number of the remaining nodes to be grouped in the grouping sequence is smaller than the upper limit value, forming a new group by the remaining nodes to be grouped in the grouping sequence, adding one to the number of the group, and adding all the nodes in the new group into the unified management service module.
Further, the large-scale storage cluster deployment grouping device of the invention establishes communication with the unified management service module and sends request data to the unified management service module when the management node needs to acquire the data of each node, the unified management service module routes the request data to a certain storage node of the group, and the storage node collects the information of all nodes of the group.
Further, the large-scale storage cluster deployment grouping device of the invention establishes communication with the unified management service module and sends request data to the unified management service module when the management node needs each node to execute service, and the unified management service module routes the request data to a certain storage node of the grouping, and the storage node distributes configuration instructions.
Furthermore, according to the large-scale storage cluster deployment grouping device, when a certain node is abnormal, the unified management service module automatically discovers the abnormality and removes the node from the unified management service list, and request data cannot be routed to the fault node.
The method and the device for deploying and grouping the large-scale storage clusters have the following beneficial effects:
1. by the automatic grouping strategy, the user is prevented from dividing and configuring the clusters, so that the operation of the user under the large-scale clusters is simpler, and the deployment efficiency is improved.
2. Through the management and control strategy of the management service, the fact that each group can provide service outwards under the fault scene is guaranteed, the management and control strategy is configured without user intervention, operation is more convenient, and meanwhile operation and maintenance efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a mass storage cluster according to the present invention.
Fig. 2 is a flowchart of a method for deploying mass storage cluster grouping according to an exemplary first embodiment of the invention.
FIG. 3 is a block diagram of a mass storage cluster deployment grouping apparatus according to a third exemplary embodiment of the present invention
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It is noted that the following embodiments and features of the embodiments may be combined with each other without conflict, and that all other embodiments obtained by persons of ordinary skill in the art without creative efforts based on the embodiments in the present disclosure are within the scope of protection of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
The technical principle of the invention is as follows:
As shown in fig. 1, the large-scale cluster is composed of a management node group and storage nodes, and the management node group is configured into a master-slave mode. The invention automatically groups the large-scale clusters, wherein the main group comprises a management node group and unified management and control service formed by all storage nodes, and the auxiliary group comprises the unified management and control service formed by all storage nodes of the main group. The management node group only carries out communication and business interaction with the unified management service of each group, the whole pressure is greatly reduced, and the original requirement of reducing the pressure of the management node can be met.
The invention solves the problem of low deployment efficiency caused by the need of user intervention for cluster division and repeated subset group deployment. The user needs to conduct sub-cluster planning on the page by the aid of a common strategy, select nodes to join different sub-clusters, and configure sub-management nodes of the sub-clusters, so that complexity of configuration flow is brought, deployment time is increased, and user experience is affected. In order to solve the problem, the invention divides the whole cluster into a plurality of groups according to the number of the cluster nodes and the setting of the group upper limit value, the number of the nodes in each group is not more than the set group upper limit value, and the rest nodes after grouping are automatically grouped into a group.
The invention adds the nodes in each group into the unified management and control service to perform unified management, when the management node needs to acquire the data of each node or needs each node to execute service, the management node only needs to communicate with the unified management service, the unified management service routes the request data to a certain storage node of the group, and the storage node is responsible for collecting the information or distributing configuration instructions of all the nodes of the group. In this way, each group does not need to introduce an extra high availability mechanism, when a certain node is abnormal, the unified management service automatically discovers the abnormality, removes the node from the unified management service list, and the request data will not be routed to the fault node.
Aiming at a large-scale scene, the node joining cluster needs to specify the joining sub-cluster, so that a user is required to plan, and the configuration is complex. In the capacity-shrinking scene, if the management node of the sub-cluster is deleted, another node is added as a new management node to ensure high availability, thereby bringing complexity of operation and maintenance. In the invention, as all the nodes added into the unified management service are indiscriminate, the nodes are deleted only by removing the nodes from the unified management service, and the method is simple and efficient.
Fig. 2 is a flowchart of a method for deploying a mass storage cluster grouping according to an exemplary first embodiment of the invention, as shown in fig. 2, the method of the present embodiment comprises:
analyzing the information of the management node and the storage node selected by a user, initializing a grouping sequence, adding the management node into the queue head of the grouping sequence, and sequentially adding the storage node into the grouping sequence according to the IP sequence;
Setting an upper limit value of a grouping node, comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping node, grouping the remaining nodes to be grouped in the grouping sequence according to a comparison result, and adding the nodes in each grouping into a unified management service;
the grouping information in the distributed configuration file is updated.
In the method of the embodiment, grouping the remaining nodes to be grouped in the grouping sequence according to the comparison result includes:
if the number of the remaining nodes to be grouped in the grouping sequence is not less than the upper limit value of the grouping nodes, sequentially selecting the nodes in the grouping sequence according to the upper limit value of the grouping nodes to form a new group, adding one to the number of the group, adding all the nodes in the new group to unified management service, continuously comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping nodes, and grouping the remaining nodes to be grouped in the grouping sequence according to the comparison result;
If the number of the remaining nodes to be grouped in the grouping sequence is smaller than the upper limit value, forming a new group by the remaining nodes to be grouped in the grouping sequence, adding one to the number of the group, and adding all the nodes in the new group into unified management service.
An exemplary second embodiment of the present invention provides a method for deploying a large-scale storage cluster into a group, where the method in the embodiment is a preferred embodiment of the method shown in fig. 2, and includes:
when the management node needs to acquire the data of each node, establishing communication with the unified management service and sending request data to the unified management service, wherein the unified management service routes the request data to a certain storage node of the group, and the storage node collects the information of all the nodes of the group;
When the management node needs each node to execute the service, the unified management service routes the request data to a certain storage node of the packet by establishing communication with the unified management service and sending the request data to the unified management service, and the storage node distributes the configuration instruction;
When a node is abnormal, the unified management service automatically discovers the abnormality, removes the node from the unified management service list, and requests data are not routed to the failed node.
Fig. 3 is a schematic diagram of a mass storage cluster deployment packet device according to a third exemplary embodiment of the present invention, and as shown in fig. 3, the device of this embodiment includes:
The system comprises a packet sequence construction module, a packet sequence analysis module and a storage module, wherein the packet sequence construction module is used for analyzing the information of a management node and a storage node selected by a user, initializing a packet sequence, adding the management node into the queue head of the packet sequence, and sequentially adding the storage node into the packet sequence according to an IP sequence;
The grouping module is used for setting an upper limit value of the grouping nodes, comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping nodes, grouping the remaining nodes to be grouped in the grouping sequence according to a comparison result, and adding the nodes in each grouping into the unified management service module;
The unified management service module is used for establishing communication with the management node, receiving request data sent by the management node, routing the request data to a certain storage node of the packet, and collecting information of all nodes of the packet or distributing configuration instructions through the storage node;
and the updating module is used for updating the grouping information in the distributed configuration file.
In practical application, the grouping module of the device of this embodiment is specifically configured to:
Setting an upper limit value of a grouping node, comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping node, if the number of the remaining nodes to be grouped in the grouping sequence is not smaller than the upper limit value of the grouping node, sequentially selecting the nodes in the grouping sequence according to the upper limit value of the grouping node to form a new group, adding one to the number of the group, adding all the nodes in the new group into a unified management service module, continuously comparing the number of the remaining nodes to be grouped in the grouping sequence with the upper limit value of the grouping node, and grouping the remaining nodes to be grouped in the grouping sequence according to a comparison result;
If the number of the remaining nodes to be grouped in the grouping sequence is smaller than the upper limit value, forming a new group by the remaining nodes to be grouped in the grouping sequence, adding one to the number of the group, and adding all the nodes in the new group into the unified management service module.
When the management node needs to acquire the data of each node, the unified management service module routes the request data to a certain storage node of the packet by establishing communication with the unified management service module and sending the request data to the unified management service module, and the storage node collects the information of all the nodes of the packet.
When the management node needs each node to execute the service, the unified management service module routes the request data to a certain storage node of the packet by establishing communication with the unified management service module and sending the request data to the unified management service module, and the storage node distributes the configuration instruction.
When a node is abnormal, the unified management service module automatically discovers the abnormality and removes the node from the unified management service list, so that the request data cannot be routed to the fault node.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.