A storage cluster online upgrading method, device, equipment and medium
Patent Information
- Application Number
- CN202310413369.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-04-13
AI Technical Summary
[0003]针对大规模存储集群(节点数>=100),已有技术可通过节点分组并行升级的方式,一定程度上减少升级时间;但在对升级时间要求严苛的场景,此种方案依然不能完全满足业务需求,仍有进一步提升空间
[0033]This application provides an online upgrade method for a storage cluster. First, all nodes in the storage cluster are divided into corresponding node groups based on storage pools. The nodes are stored in the storage pools of the storage cluster. If all nodes are stored in one storage pool, the storage pool is considered as a node group; if all nodes are stored in different storage pools, the storage pools are considered as multiple node groups. Then, the node groups are divided into multiple fault domain groups based on fault domains. Each fault domain group includes one or more nodes. When an update event of the storage cluster is detected, the node groups are processed in parallel. During the processing of any fault domain group, an upgrade package is used to upgrade the nodes within that fault domain group based on a parallel processing mechanism until all nodes have been processed. Thus, all nodes in the storage cluster are divided into one or more node groups based on storage pools. Furthermore, each node group is further divided into multiple fault domain groups based on fault domains. When the storage cluster is upgraded online, not only is parallel processing between each node group, but also between each fault domain group, an upgrade package is used to upgrade the nodes within that fault domain group based on a parallel processing mechanism. This improves the speed of online upgrades, allowing for further reduction of online upgrade time without compromising business stability and continuity, thereby enhancing product competitiveness.
Smart Images

Figure CN116431191B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cluster upgrade technology, and in particular to a method, apparatus, device and medium for online upgrade of storage clusters. Background Technology
[0002] After a storage cluster is deployed and provided to business users, upgrades to the cluster software are inevitable due to version iterations and the accumulation of usage issues. In industries with high business continuity requirements (such as telecommunications, finance, and security), online software upgrades are essential. Reducing upgrade time while ensuring business stability and continuity is also a need that requires continuous improvement.
[0003] For large-scale storage clusters (number of nodes >= 100), existing technologies can reduce upgrade time to some extent by upgrading nodes in parallel groups; however, in scenarios with strict requirements for upgrade time, this solution still cannot fully meet business needs and there is still room for further improvement.
[0004] In summary, how to improve the speed of online upgrades, further shorten the online upgrade time, and at the same time not weaken business continuity and stability are the problems that need to be solved. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for online upgrades of storage clusters, which can improve the speed of online upgrades, further shorten the online upgrade time, and at the same time not weaken business continuity and stability. The specific solution is as follows:
[0006] Firstly, this application discloses an online upgrade method for a storage cluster, including:
[0007] All nodes in the storage cluster are divided into corresponding node groups according to the storage pool; the nodes are stored in the storage pool of the storage cluster. If all the nodes are stored in one storage pool, the storage pool is considered as a node group. If all the nodes are stored in different storage pools, the storage pools are considered as multiple node groups.
[0008] The node group is divided into multiple fault domain groups according to the fault domain; wherein, each fault domain group includes one or more nodes;
[0009] When an update event of the storage cluster is detected, the node group is processed in parallel. During the processing of any of the fault domain groups, the nodes in the fault domain group are upgraded using an upgrade package based on the parallel processing mechanism until all nodes have been processed.
[0010] Optionally, dividing the node group into multiple fault domain groups according to the fault domain includes:
[0011] If the nodes in the storage pool are stored in different racks, then the fault domain is the rack, and each rack is taken as the fault domain group;
[0012] If the nodes in the storage pool are stored in a rack, then the fault domain is a node, and each node is a fault domain group.
[0013] Optionally, during the processing of any of the fault domain groups, upgrading the nodes within the fault domain group using an upgrade package based on a parallel processing mechanism includes:
[0014] During the processing of any of the fault domain groups, the upgrade package is installed in parallel to the nodes within the fault domain group, and after the upgrade package is installed, the nodes within the fault domain group are restarted according to a preset priority strategy.
[0015] Optionally, the process of restarting services for nodes in the fault domain group according to a preset priority after the upgrade package is installed further includes:
[0016] Real-time monitoring of node information for online upgrades within the fault domain group, and corresponding marking of nodes that have completed online upgrades;
[0017] Based on the node information and the marker, it is determined whether all nodes in the current fault domain group have been restarted in order to complete the online upgrade of the current fault domain group.
[0018] Optionally, determining whether all nodes in the current fault domain group have been restarted to complete the online upgrade of the current fault domain group includes:
[0019] If all nodes in the current fault domain group have completed restarting, then switch to another fault domain group and execute the step of using the upgrade package based on the parallel processing mechanism to process the nodes in the fault domain group until all nodes have been processed.
[0020] If not all nodes in the current fault domain group have completed restarting, the step of restarting the nodes in the fault domain group according to the preset priority strategy continues until all nodes in the current fault domain group have completed restarting.
[0021] Optionally, the online upgrade method for the storage cluster further includes:
[0022] Obtain the node name of each node in the fault domain group;
[0023] Sort several nodes in the fault domain group according to the node name;
[0024] The preset priority strategy is constructed by assigning different levels of priority to the nodes based on the order of the nodes.
[0025] Optionally, during the processing of any of the fault domain groups, upgrading the nodes within the fault domain group using an upgrade package based on a parallel processing mechanism includes:
[0026] During the processing of any of the fault domain groups, the upgrade package is decompressed based on a parallel processing mechanism, and the script files in the decompressed upgrade package are compiled to upgrade the processes of the nodes within the fault domain group.
[0027] Secondly, this application discloses an online upgrade device for a storage cluster, comprising:
[0028] The node grouping module is used to divide all nodes in the storage cluster into corresponding node groups according to the storage pools. The nodes are stored in the storage pools of the storage cluster. If all the nodes are stored in one storage pool, the storage pool is considered as one node group. If all the nodes are stored in different storage pools, the storage pools are considered as multiple node groups.
[0029] The fault domain grouping module is used to divide the node group into multiple fault domain groups according to the fault domain; wherein, the fault domain group includes one or more nodes;
[0030] The upgrade control module is used to perform parallel processing on the node group when an update event of the storage cluster is detected, and to upgrade the nodes in the fault domain group using an upgrade package based on the parallel processing mechanism during the processing of any of the fault domain groups, until all nodes have been processed.
[0031] Thirdly, this application discloses an electronic device comprising a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the online upgrade method for the storage cluster as described above.
[0032] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the online upgrade method for the storage cluster as described above.
[0033] This application provides an online upgrade method for a storage cluster. First, all nodes in the storage cluster are divided into corresponding node groups based on storage pools. The nodes are stored in the storage pools of the storage cluster. If all nodes are stored in one storage pool, the storage pool is considered as a node group; if all nodes are stored in different storage pools, the storage pools are considered as multiple node groups. Then, the node groups are divided into multiple fault domain groups based on fault domains. Each fault domain group includes one or more nodes. When an update event of the storage cluster is detected, the node groups are processed in parallel. During the processing of any fault domain group, an upgrade package is used to upgrade the nodes within that fault domain group based on a parallel processing mechanism until all nodes have been processed. Thus, all nodes in the storage cluster are divided into one or more node groups based on storage pools. Furthermore, each node group is further divided into multiple fault domain groups based on fault domains. When the storage cluster is upgraded online, not only is parallel processing between each node group, but also between each fault domain group, an upgrade package is used to upgrade the nodes within that fault domain group based on a parallel processing mechanism. This improves the speed of online upgrades, allowing for further reduction of online upgrade time without compromising business stability and continuity, thereby enhancing product competitiveness.
[0034] In addition, the storage cluster online upgrade device, equipment and storage medium provided in this application correspond to the above-mentioned storage cluster online upgrade method and have the same effect. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0036] Figure 1 This is a flowchart of an online upgrade method for a storage cluster disclosed in this application;
[0037] Figure 2 This application discloses a specific online upgrade method for a storage cluster.
[0038] Figure 3 This is a schematic diagram of the structure of an online upgrade device for a storage cluster disclosed in this application;
[0039] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] Currently, for large-scale storage clusters (number of nodes >= 100), existing technologies can reduce upgrade time to some extent by upgrading nodes in parallel groups; however, in scenarios with strict requirements for upgrade time, this solution still cannot fully meet business needs and there is still room for further improvement.
[0042] To address this, this application provides an online upgrade solution for storage clusters that can improve online upgrade speed, further shorten online upgrade time, and without compromising business continuity and stability.
[0043] This invention discloses an online upgrade method for a storage cluster, see [link to relevant documentation]. Figure 1 As shown, the method includes:
[0044] Step S11: Divide all nodes in the storage cluster into corresponding node groups according to the storage pool; the nodes are stored in the storage pool of the storage cluster. If all nodes are stored in one storage pool, the storage pool is considered as a node group. If all nodes are stored in different storage pools, the storage pools are considered as multiple node groups.
[0045] In this embodiment, a storage pool is a logical space for storing data, constructed using disks from some or all of the devices in a storage cluster. All nodes in the storage cluster are divided into corresponding node groups based on the storage pool. It can be understood that a storage cluster uses multiple devices of the same model to form a unified, manageable group for storing data; each node represents one device in the storage cluster. When dividing nodes, all nodes in the storage cluster are divided into one or more node groups corresponding to the storage pool, such as GN1, GN2, ..., GNn.
[0046] Specifically, if all nodes are stored in a single storage pool, the storage pool is considered as a node group; if all nodes are stored in different storage pools, the storage pools are considered as multiple node groups. In other words, nodes belonging to the same storage pool in the storage cluster are grouped into the same node group, and the number of nodes being upgraded simultaneously does not exceed the number of storage pools.
[0047] Step S12: Divide the node group into multiple fault domain groups according to the fault domains; wherein, each fault domain group includes one or more nodes.
[0048] In this embodiment of the application, each node group is divided into multiple fault domain groups according to the fault domain, such as GN1_d1, GN1_d2, etc. Each fault domain group contains one or more nodes, such as GN1_d1_n1, GN1_d1_n2, etc. When all nodes in the same fault domain group are abnormal, the continuity of services is not affected.
[0049] Step S13: When an update event of the storage cluster is detected, the node group is processed in parallel. During the processing of any of the fault domain groups, the nodes in the fault domain group are upgraded using an upgrade package based on the parallel processing mechanism until all nodes have been processed.
[0050] In this embodiment, when an online upgrade of the storage cluster is detected, i.e., an update event of the storage cluster is detected, the system controls all nodes to upgrade online in parallel, and the upgrade actions of upgrade packages within different node groups are executed in parallel. Simultaneously, based on the fault domain, each time all nodes within a selected fault domain group are upgraded using the upgrade package (e.g., when upgrading all nodes within fault domain group GN1_d1), a parallel processing mechanism is used. After all nodes within a single fault domain group have completed their online upgrades, the operation is repeated for other fault domain groups. The upgrade process ends when all nodes have completed the upgrade package processing.
[0051] In this embodiment, during the processing of any of the aforementioned fault domain groups, the upgrade package is decompressed based on a parallel processing mechanism, and the script files in the decompressed upgrade package are compiled to upgrade the processes of the nodes within the fault domain group. It is understood that the upgrade package is a compressed package composed of scripts and files required for online upgrades, and it needs to be executed on each node. Since online upgrades using the upgrade package upgrade the storage service of each node, and the storage service is a part of the processes that the storage cluster depends on for normal operation; and a process is a representation of all the resources called by a node when performing a certain operation task on the device. Therefore, compiling the script files in the decompressed upgrade package upgrades the processes of the nodes within the fault domain group.
[0052] In addition, the method provided in the embodiments of this application can be implemented by a computer chip or entity, or by a product with a specific function, or as a function of a product.
[0053] This application provides an online upgrade method for a storage cluster. First, all nodes in the storage cluster are divided into corresponding node groups based on storage pools. The nodes are stored in the storage pools of the storage cluster. If all nodes are stored in one storage pool, the storage pool is considered as a node group; if all nodes are stored in different storage pools, the storage pools are considered as multiple node groups. Then, the node groups are divided into multiple fault domain groups based on fault domains. Each fault domain group includes one or more nodes. When an update event of the storage cluster is detected, the node groups are processed in parallel. During the processing of any fault domain group, an upgrade package is used to upgrade the nodes within that fault domain group based on a parallel processing mechanism until all nodes have been processed. Thus, all nodes in the storage cluster are divided into one or more node groups based on storage pools. Furthermore, each node group is further divided into multiple fault domain groups based on fault domains. When the storage cluster is upgraded online, not only is parallel processing between each node group, but also between each fault domain group, an upgrade package is used to upgrade the nodes within that fault domain group based on a parallel processing mechanism. This improves the speed of online upgrades, allowing for further reduction of online upgrade time without compromising business stability and continuity, thereby enhancing product competitiveness.
[0054] This application discloses a specific method for online upgrade of a storage cluster. See also... Figure 2 As shown, the method includes:
[0055] Step S21: Divide all nodes in the storage cluster into corresponding node groups according to the storage pool; the nodes are stored in the storage pool of the storage cluster. If all nodes are stored in one storage pool, the storage pool is considered as a node group. If all nodes are stored in different storage pools, the storage pools are considered as multiple node groups.
[0056] For a more detailed description of the process of step S21, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0057] Step S22: If the nodes in the storage pool are stored in different racks, then the fault domain is the rack, and each rack is taken as the fault domain group; if the nodes in the storage pool are stored in one rack, then the fault domain is the node, and each node is taken as the fault domain group.
[0058] In this embodiment, the node group is divided into multiple fault domain groups based on the characteristics of the fault domains. A fault domain is the smallest unit that does not affect the normal operation of the cluster when devices fail simultaneously; it is generally a node or a rack. Physically, multiple nodes are placed in the same rack to form a rack. Specifically, if the nodes in the storage pool are stored in different racks, the fault domain is the rack, and each rack is considered as the fault domain group; if the nodes in the storage pool are stored in one rack, the fault domain is the node, and each node is considered as the fault domain group.
[0059] Assume a storage cluster with 12 nodes, divided into 2 storage pools, housed in 4 racks, with 3 nodes in each rack. Storage pool 1 (P1) has 9 nodes, housed in 3 racks. The fault domain is the rack. Storage pool 2 (P2) has 3 nodes, housed in 1 rack, and the fault domain is the node. This cluster is divided into two node groups, GN1 and GN2. GN1 corresponds to P1 and contains 3 fault domain groups: GN1_d1, containing nodes GN1_d1_n1, GN1_d1_n2, and GN1_d1_n3; GN1_d2, containing nodes GN1_d2_n1, GN1_d2_n2, and GN1_d2_n3; and GN1_d3, containing nodes GN1_d3_n1, GN1_d3_n2, and GN1_d3_n3. GN2 corresponds to P2 and contains 3 fault domain groups; GN2_d1 contains node GN2_d1_n1; GN2_d2 contains node GN2_d2_n1; GN2_d3 contains node GN2_d3_n1.
[0060] Step S23: When an update event of the storage cluster is detected, the node group is processed in parallel. During the processing of any of the fault domain groups, the upgrade package is installed in parallel to the nodes in the fault domain group. After the upgrade package is installed, the nodes in the fault domain group are restarted according to a preset priority strategy until all nodes are processed.
[0061] In this embodiment of the application, when an update event of the storage cluster is detected, the node group is processed in parallel. During the processing of any of the fault domain groups, all nodes in one fault domain group are selected for parallel installation of the upgrade package. After the upgrade package is installed, the node services in the fault domain group are restarted. Only the services on one node are restarted at a time, and the restart actions in different fault domain groups can be executed in parallel.
[0062] In this embodiment, the system controls the parallel online upgrade of each node and monitors the online upgrade node information in real time, controlling the order of upgrade operations within each fault domain group. Specifically, during the process of restarting the nodes in the fault domain group according to a preset priority after the upgrade package is installed, the system further includes: real-time monitoring of the node information of the nodes in the fault domain group undergoing online upgrades and marking the nodes that have completed the online upgrades; based on the node information and the markings, determining whether all nodes in the current fault domain group have been restarted to complete the online upgrade of the current fault domain group.
[0063] In this embodiment, after a single node restarts, the service of other nodes within the fault domain group continues to restart until all nodes in the fault domain group have restarted. Specifically, if all nodes in the current fault domain group have restarted, the system switches to another fault domain group and executes the step of processing the nodes in the fault domain group using the upgrade package based on the parallel processing mechanism until all nodes have been processed; if not all nodes in the current fault domain group have restarted, the step of restarting the service of the nodes in the fault domain group according to a preset priority strategy continues until all nodes in the current fault domain group have restarted.
[0064] In this embodiment, the preset priority strategy is a pre-constructed strategy used to control the order of upgrade operations within each fault domain group. In one specific implementation, the node names of each node in the fault domain group are obtained; the nodes in the fault domain group are sorted according to the node names; and different levels of priority are assigned to the nodes according to the sorting of the nodes, so as to construct the preset priority strategy.
[0065] For example, according to step S22, the upgrade method is as follows:
[0066] 1. Take one fault domain group from GN1 and GN2 respectively, assuming that GN1_d1 and GN2_d2 are taken for the first time;
[0067] 2. Simultaneously install the upgrade package on all nodes included in GN1_d1 and GN2_d2, and wait until all installations are complete;
[0068] 3. Select one node from GN1_d1 and one node from GN2_d2 to restart the service. Assuming GN1_d1_n1 and GN2_d2_n1 are selected respectively, confirm that the upgrade of these two nodes is complete after the restart is finished, and record the node upgrade completion marker;
[0069] 4. If there are still nodes in the fault domain group that have not been upgraded, proceed to step 3 until all nodes in the fault domain group have been upgraded. If all nodes in the fault domain group have been upgraded, proceed to step 1 and select a new fault domain group for operation. The selection of fault domain groups in different node groups is independent of each other and does not need to be performed simultaneously.
[0070] 5. Once all nodes in all node groups have been upgraded, the upgrade process is complete.
[0071] One possible upgrade order that meets the above conditions is as follows:
[0072] 1) GN1_d1_n1, GN2_d2_n1
[0073] 2) GN1_d1_n2 (service restart), GN2_d1_n1 (install upgrade package + service restart)
[0074] 3) GN1_d1_n3 (service restart), GN2_d3_n1 (install upgrade package + service restart)
[0075] 4) GN1_d2 (Concurrent installation of upgrade package)
[0076] 5) GN1_d2_n1 (Service restart)
[0077] 6) GN1_d2_n2 (Service restart)
[0078] 7) GN1_d2_n3 (Service restart)
[0079] 8) GN1_d3 (Concurrent installation of upgrade package)
[0080] 9) GN1_d3_n1 (Service restart)
[0081] 10) GN1_d3_n2 (Service restart)
[0082] 11) GN1_d3_n3 (Service restart)
[0083] This application provides an online upgrade method for a storage cluster. First, all nodes in the storage cluster are divided into corresponding node groups based on storage pools. The nodes are stored in the storage pools of the storage cluster. If all nodes are stored in one storage pool, the storage pool is considered as one node group; if all nodes are stored in different storage pools, the storage pools are considered as multiple node groups. If the nodes in the storage pools are stored in different racks, the fault domain is the rack, and each rack is considered as a fault domain group. If the nodes in the storage pools are stored in one rack, the fault domain is the node, and each node is considered as a fault domain group. When an update event of the storage cluster is detected, the node groups are processed in parallel. During the processing of any fault domain group, an upgrade package is installed in parallel to the nodes within that fault domain group. After the upgrade package installation is complete, the nodes within the fault domain group are restarted according to a preset priority strategy until all nodes have been processed. Thus, all nodes in the storage cluster are divided into one or more node groups based on storage pools. Furthermore, each node group is further divided into multiple fault domain groups based on fault domains. When upgrading the storage cluster online, not only are processes performed in parallel between each node group, but upgrades are also performed on nodes within each fault domain group using upgrade packages based on a parallel processing mechanism. This improves online upgrade speed and further shortens online upgrade time without compromising business stability and continuity, thereby enhancing product competitiveness.
[0084] Accordingly, this application also discloses an online upgrade device for a storage cluster, see [link to relevant documentation]. Figure 3 As shown, the device includes:
[0085] The node grouping module 11 is used to divide all nodes in the storage cluster into corresponding node groups according to the storage pool; the nodes are stored in the storage pool of the storage cluster, wherein if all the nodes are stored in one storage pool, the storage pool is regarded as a node group, and if all the nodes are stored in different storage pools, the storage pools are regarded as multiple node groups respectively.
[0086] The fault domain grouping module 12 is used to divide the node group into multiple fault domain groups according to the fault domain; wherein, the fault domain group includes one or more nodes.
[0087] The upgrade control module 13 is used to perform parallel processing on the node group when an update event of the storage cluster is detected, and to upgrade the nodes in the fault domain group based on the parallel processing mechanism using an upgrade package during the processing of any of the fault domain groups, until all nodes have been processed.
[0088] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0089] Therefore, the above-described scheme in this embodiment first divides all nodes in the storage cluster into corresponding node groups based on storage pools. The nodes are stored in the storage pools of the storage cluster. If all nodes are stored in one storage pool, the storage pool is considered as a node group; if all nodes are stored in different storage pools, the storage pools are considered as multiple node groups. Then, the node groups are divided into multiple fault domain groups based on fault domains. Each fault domain group includes one or more nodes. When an update event of the storage cluster is detected, the node groups are processed in parallel. During the processing of any fault domain group, an upgrade package is used to upgrade the nodes within the fault domain group based on a parallel processing mechanism until all nodes have been processed. Thus, all nodes in the storage cluster are divided into one or more node groups according to storage pools. Furthermore, each node group is further divided into multiple fault domain groups based on fault domains. When the storage cluster is upgraded online, not only are there parallel processing between each node group, but also between each fault domain group, an upgrade package is used to upgrade the nodes within the fault domain group based on a parallel processing mechanism. This improves the speed of online upgrades, allowing for further reduction of online upgrade time without compromising business stability and continuity, thereby enhancing product competitiveness.
[0090] In one specific implementation, the fault domain grouping module 12 includes:
[0091] The first fault domain grouping unit is used to define the fault domain as the rack if the nodes in the storage pool are stored in different racks, and to group each rack as the fault domain group.
[0092] The second fault domain grouping unit is used to group each node as a fault domain if the nodes in the storage pool are stored in a rack.
[0093] In one specific implementation, the upgrade control module 13 includes:
[0094] A concurrent installation module is used to install the upgrade package in parallel to the nodes within the fault domain group during the processing of any of the fault domain groups.
[0095] The first priority restart module is used to restart the nodes in the fault domain group according to a preset priority strategy after the upgrade package is installed.
[0096] In one specific implementation, the first sequential restart module further includes:
[0097] The node information monitoring module is used to monitor the node information of nodes undergoing online upgrades within the fault domain group in real time, and to mark the nodes that have completed the online upgrades accordingly.
[0098] The data statistics module is used to determine, based on the node information and the marker, whether all nodes in the current fault domain group have been restarted, so as to complete the online upgrade of the current fault domain group.
[0099] In one specific implementation, the data statistics module includes:
[0100] The fault domain group switching module is used to switch to another fault domain group if all nodes in the current fault domain group have completed restarting, and to execute the steps of using the upgrade package based on the parallel processing mechanism to process the nodes in the fault domain group until all nodes have been processed.
[0101] The second sequential restart module is used to continue executing the step of restarting the nodes in the fault domain group according to the preset priority strategy if not all nodes in the current fault domain group have completed restarting, until all nodes in the current fault domain group have completed restarting.
[0102] In one specific implementation, the online upgrade device for the storage cluster further includes:
[0103] The node name acquisition module is used to acquire the node name of each node in the fault domain group;
[0104] A node sorting module is used to sort several nodes in the fault domain group according to the node name;
[0105] A preset priority strategy construction module is used to assign different levels of priority to the nodes according to the sorting of several nodes, so as to construct the preset priority strategy.
[0106] In one specific implementation, the upgrade control module 13 includes:
[0107] The upgrade control unit is used to decompress the upgrade package based on a parallel processing mechanism and compile the script files in the decompressed upgrade package during the processing of any of the fault domain groups, so as to upgrade the processes of the nodes in the fault domain group.
[0108] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0109] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 specifically includes: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the online upgrade method for the storage cluster disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment can be used in numerous general-purpose or special-purpose computer system environments or configurations, including but not limited to: personal computers, server computers, handheld or portable devices, and large, medium, and small computers.
[0110] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0111] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it can include an operating system 221, computer programs 222, and data 223, etc. The data 223 can include various types of data. The storage method can be temporary storage or permanent storage.
[0112] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the online storage cluster upgrade method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0113] Furthermore, this application also discloses a computer-readable storage medium, which includes random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, magnetic disks, optical disks, or any other form of storage medium known in the art. The computer program, when executed by a processor, implements the aforementioned online storage cluster upgrade method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0114] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0115] The steps of online upgrades or algorithms for storage clusters described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, software modules executed by a processor, or a combination of both. The software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.
[0116] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0117] The above provides a detailed description of the online upgrade method, apparatus, device, and medium for a storage cluster provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for online upgrade of a storage cluster, characterized in that, include: All nodes in the storage cluster are divided into corresponding node groups based on the storage pool; The nodes are stored in the storage pool of the storage cluster. If all the nodes are stored in one storage pool, the storage pool is considered as a node group. If all the nodes are stored in different storage pools, the storage pools are considered as multiple node groups. The node group is divided into multiple fault domain groups according to the fault domain; wherein, each fault domain group includes one or more nodes; When an update event of the storage cluster is detected, the node groups are processed in parallel. During the processing of any of the fault domain groups, the nodes in the fault domain group are upgraded using an upgrade package based on the parallel processing mechanism until all nodes are processed. Within the same node group, after all nodes in a single fault domain group have been upgraded online, the operation is repeated for other fault domain groups. The step of dividing the node group into multiple fault domain groups according to the fault domain includes: If the nodes in the storage pool are stored in different racks, then the fault domain is the rack, and each rack is taken as the fault domain group; If the nodes in the storage pool are stored in a rack, then the fault domain is a node, and each node is a fault domain group. During the processing of any of the fault domain groups, the nodes within the fault domain group are upgraded using an upgrade package based on a parallel processing mechanism, including: During the processing of any of the fault domain groups, the upgrade package is installed in parallel to the nodes within the fault domain group, and after the upgrade package is installed, the nodes within the fault domain group are restarted according to a preset priority strategy.
2. The online upgrade method for a storage cluster according to claim 1, characterized in that, The process of restarting services for nodes in the fault domain group according to a preset priority after the upgrade package is installed also includes: Real-time monitoring of node information for online upgrades within the fault domain group, and corresponding marking of nodes that have completed online upgrades; Based on the node information and the marker, it is determined whether all nodes in the current fault domain group have been restarted in order to complete the online upgrade of the current fault domain group.
3. The online upgrade method for a storage cluster according to claim 2, characterized in that, The step of determining whether all nodes in the current fault domain group have been restarted to complete the online upgrade of the current fault domain group includes: If all nodes in the current fault domain group have completed restarting, then switch to another fault domain group and execute the step of using the upgrade package based on the parallel processing mechanism to process the nodes in the fault domain group until all nodes have been processed. If not all nodes in the current fault domain group have completed restarting, the step of restarting the nodes in the fault domain group according to the preset priority strategy continues until all nodes in the current fault domain group have completed restarting.
4. The online upgrade method for a storage cluster according to claim 1, characterized in that, Also includes: Obtain the node name of each node in the fault domain group; Sort several nodes in the fault domain group according to the node name; The preset priority strategy is constructed by assigning different levels of priority to the nodes based on the order of the nodes.
5. The online upgrade method for a storage cluster according to any one of claims 1 to 4, characterized in that, During the processing of any of the fault domain groups, the nodes within the fault domain group are upgraded using an upgrade package based on a parallel processing mechanism, including: During the processing of any of the fault domain groups, the upgrade package is decompressed based on a parallel processing mechanism, and the script files in the decompressed upgrade package are compiled to upgrade the processes of the nodes within the fault domain group.
6. A storage cluster online upgrade device, characterized in that, include: The node grouping module is used to divide all nodes in the storage cluster into corresponding node groups according to the storage pool. The nodes are stored in the storage pool of the storage cluster. If all the nodes are stored in one storage pool, the storage pool is considered as a node group. If all the nodes are stored in different storage pools, the storage pools are considered as multiple node groups. The fault domain grouping module is used to divide the node group into multiple fault domain groups according to the fault domain; wherein, the fault domain group includes one or more nodes; The upgrade control module is used to perform parallel processing on the node group when an update event of the storage cluster is detected. During the processing of any of the fault domain groups, the upgrade package is used to upgrade the nodes in the fault domain group based on the parallel processing mechanism until all nodes are processed. In the same node group, after all nodes in a single fault domain group have been upgraded online, the operation is repeated for other fault domain groups. The fault domain grouping module includes: The first fault domain grouping unit is used to define the fault domain as the rack if the nodes in the storage pool are stored in different racks, and to group each rack as the fault domain group. The second fault domain grouping unit is used to group each node as a fault domain if the nodes in the storage pool are stored in a rack. The upgrade control module includes: A concurrent installation module is used to install the upgrade package in parallel to the nodes within the fault domain group during the processing of any of the fault domain groups. The first priority restart module is used to restart the nodes in the fault domain group according to a preset priority strategy after the upgrade package is installed.
7. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the online upgrade method for the storage cluster as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used for storing computer programs; wherein the computer programs, when executed by a processor, implement the online upgrade method for the storage cluster as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Upgrading method and upgrading device for micro-service
CN108268271A
Cluster grouping online upgrading method and system, terminal and storage medium
CN112463195A