Storage cluster expansion method, device, electronic device and readable storage medium
By analyzing the resource information of the storage cluster and the node to be expanded, the expansion configuration information is generated to realize automatic expansion, which solves the tedious and error-prone problems of manual expansion in distributed storage clusters and improves the expansion success rate and performance.
Patent Information
- Application Number
- CN202111271843.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-10-29
AI Technical Summary
In a distributed storage cluster, when there are a large number of nodes to be expanded, manual expansion operations are cumbersome and error-prone, leading to expansion failure.
By obtaining the resource information of the storage cluster and the node to be expanded, the usage data is analyzed and the expansion configuration information is generated to realize automatic expansion, automatic and reasonable allocation of resources, and avoid the tedious manual operation.
It improves the expansion success rate of storage clusters, saves operation and maintenance manpower, reduces workload, and ensures the accuracy and performance of expansion.
Smart Images

Figure CN114020214B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed storage technology, and in particular to a storage cluster expansion method, device, electronic device and readable storage medium. Background Art
[0002] With the explosive growth of massive unstructured data, distributed storage has gradually become the storage cornerstone for users to build data center architectures, and more and more key businesses are connected to distributed storage. However, as the business increases, the storage capacity of the distributed storage cluster in use may lead to insufficient resources. At this time, it is necessary to increase the capacity of the distributed storage cluster by expanding the node capacity to meet business needs.
[0003] At present, the capacity expansion of distributed storage clusters is mainly based on the IP address information of the node to be expanded input by the user to manually specify the monitor (MON) node and metadata server (MDS) node, and manually partition the disk, specify the usage method for each disk or partition, and finally expand the expanded node to the storage cluster. However, when the number of nodes to be expanded is large, the manual expansion operation is very cumbersome and prone to errors, which leads to expansion failure. Summary of the invention
[0004] In view of this, embodiments of the present invention provide a storage cluster expansion method, device, electronic device and readable storage medium to solve the problem that manual expansion operations are very cumbersome and error-prone when the number of nodes to be expanded is large, thus causing expansion failure.
[0005] According to a first aspect, an embodiment of the present invention provides a method for expanding a storage cluster, comprising: obtaining first resource information of a storage cluster and second resource information of at least one node to be expanded; analyzing the first resource information to determine usage data of the storage cluster; and generating expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information.
[0006] The storage cluster expansion method provided by the embodiment of the present invention obtains the first resource information of the storage cluster and the second resource information of at least one node to be expanded, analyzes the first resource information to determine the usage data of the storage cluster, and then generates the storage cluster expansion configuration information according to the usage data of the storage cluster and the second resource information, so as to perform the expansion operation on the storage cluster according to the expansion configuration information. The method realizes the automatic expansion of the storage cluster, can meet the expansion requirements of a large number of nodes to be expanded to a greater extent, and greatly saves the operation and maintenance manpower by automatically and reasonably allocating resource information according to the expansion configuration information, reduces the workload when expanding a large-scale storage cluster, avoids the expansion failure caused by the cumbersome manual expansion operation, and improves the expansion success rate of the storage cluster.
[0007] In combination with the first aspect, in a first implementation of the first aspect, the analysis of the first resource information of the storage cluster to determine the usage data of the storage cluster includes: analyzing the storage pool capacity information, disk write information and service startup information corresponding to the storage cluster; based on the storage pool capacity information, disk write information and service startup information, respectively determining the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes and the startup status of each service.
[0008] In combination with the first implementation manner of the first aspect, in the second implementation manner of the first aspect, the capacity expansion configuration information of the storage cluster is generated based on the usage data of the storage cluster and the second resource information, including: determining the capacity expansion data corresponding to the storage cluster based on the usage data of the storage cluster; allocating the second resource information according to the capacity expansion data to generate the capacity expansion configuration information.
[0009] The storage cluster expansion method provided by the embodiment of the present invention determines the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes, and the startup status of each service by analyzing the storage pool capacity information, disk write information, and service startup information corresponding to the storage cluster. Based on the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes, and the startup status of each service, the expansion data corresponding to the storage cluster is determined, and the second resource information is allocated according to the expansion data to generate the expansion configuration information, thereby ensuring the accuracy of the generation of the expansion configuration information and further improving the expansion success rate of the storage cluster.
[0010] In combination with the first aspect, in a third implementation of the first aspect, obtaining the second resource information of the at least one node to be expanded includes: obtaining the at least one node to be expanded information in response to an input instruction to the node to be expanded; analyzing the at least one node to be expanded information to determine the second resource information corresponding to the at least one node to be expanded.
[0011] The storage cluster expansion method provided in an embodiment of the present invention obtains at least one node to be expanded information in response to an input instruction of the node to be expanded, analyzes the obtained at least one node to be expanded information, and determines the second resource information corresponding to the at least one node to be expanded, thereby realizing the convenience of automatic expansion without the need for operation and maintenance personnel to perform tedious operations of expansion.
[0012] In combination with the first aspect, in the fourth implementation of the first aspect, the method also includes: deleting the original resource information of the at least one node to be expanded, and obtaining the current resource information corresponding to the at least one node to be expanded; performing monitor node configuration, metadata database service node configuration, cluster database configuration and disk resource allocation according to the expansion configuration information.
[0013] In combination with the fourth implementation of the first aspect, in the fifth implementation of the first aspect, allocating disk resources according to the expansion configuration information includes: obtaining the usage frequency and usage status of each storage pool corresponding to the storage cluster; based on the usage frequency and usage status of each storage pool, dynamically allocating the disk resources to each storage pool.
[0014] The storage cluster expansion method provided by the embodiment of the present invention obtains the current resource information corresponding to the at least one node to be expanded by deleting the original resource information of at least one node to be expanded, and performs monitor node configuration, metadata database service node configuration, cluster database configuration and disk resource allocation according to the expansion configuration information, thereby avoiding the nodes to be expanded separated from other clusters from affecting the performance of the current storage cluster due to retaining the original cluster service and configuration information, thereby ensuring the performance of the storage cluster.
[0015] In combination with the fourth implementation of the first aspect, in the sixth implementation of the first aspect, the metadatabase service nodes are configured according to the expansion configuration information, including: determining whether the storage cluster is a file storage cluster; when the storage cluster is a file storage cluster, configuring multiple metadatabase service nodes based on the expansion configuration information.
[0016] The storage cluster expansion method provided by the embodiment of the present invention determines whether the storage cluster is a file storage cluster, and when the storage cluster is a file storage cluster, configures multiple metadata library service nodes based on the expansion configuration information. The method determines the type of the storage cluster so as to configure the metadata library service nodes for the storage cluster, thereby ensuring the high availability of the storage cluster and enabling the storage cluster after expansion to achieve the best performance.
[0017] According to the second aspect, an embodiment of the present invention provides a storage cluster expansion device, including: an acquisition module, used to acquire first resource information of the storage cluster and second resource information of at least one node to be expanded; an analysis module, used to analyze the first resource information and determine the usage data of the storage cluster; a generation module, used to generate expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information.
[0018] The storage cluster expansion device provided in the embodiment of the present invention obtains the first resource information of the storage cluster and the second resource information of at least one node to be expanded, analyzes the first resource information to determine the usage data of the storage cluster, and then generates the storage cluster expansion configuration information according to the usage data of the storage cluster and the second resource information, so as to perform the expansion operation on the storage cluster according to the expansion configuration information. The device realizes the automatic expansion of the storage cluster, can meet the expansion requirements of a large number of nodes to be expanded to a greater extent, and greatly saves the operation and maintenance manpower by automatically and reasonably allocating resource information according to the expansion configuration information, reduces the workload when expanding a large-scale storage cluster, avoids the expansion failure caused by the cumbersome manual expansion operation, and improves the expansion success rate of the storage cluster.
[0019] According to a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the method for expanding the storage cluster described in the first aspect or any embodiment of the first aspect.
[0020] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the storage cluster expansion method described in the first aspect or any implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 is a flow chart of a method for expanding a storage cluster according to an embodiment of the present invention;
[0023] Figure 2 is another flow chart of a method for expanding a storage cluster according to an embodiment of the present invention;
[0024] Figure 3 is another flow chart of a method for expanding a storage cluster according to an embodiment of the present invention;
[0025] Figure 4 is a structural block diagram of a storage cluster expansion device according to an embodiment of the present invention;
[0026] Figure 5 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0028] At present, the capacity expansion of distributed storage clusters is mainly based on the IP address information of the node to be expanded input by the user to manually specify the monitor (MON) node and metadata server (MDS) node, and manually partition the disk, specify the usage method for each disk or partition, and finally expand the expansion node to the storage cluster. However, when the number of nodes to be expanded is large, the manual expansion operation is very cumbersome and prone to errors, which leads to expansion failure.
[0029] Based on this, the technical solution of the present invention automatically and reasonably allocates the resource information of the nodes to be expanded to the current storage cluster according to the usage of the current storage cluster and the resource information of the nodes to be expanded, thereby realizing automatic expansion of the storage cluster, saving operation and maintenance manpower, and reducing the probability of expansion errors caused by cumbersome manual expansion operations.
[0030] According to an embodiment of the present invention, an embodiment of a method for expanding the capacity of a storage cluster is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] In this embodiment, a storage cluster expansion method is provided, which can be used in electronic devices such as computers, servers, etc. Figure 1 is a flow chart of a method for expanding the capacity of a storage cluster according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0032] S11, obtaining first resource information of a storage cluster and second resource information of at least one node to be expanded.
[0033] The first resource information is the current resource information of the storage cluster, and may include the total capacity of each storage pool, disk information, and each service status, etc. The electronic device may monitor the usage status of the storage cluster in real time, and determine the corresponding first resource information according to the real-time updated usage status.
[0034] The second resource information is the resource information of the node to be expanded, and the second resource information may include the central processing unit (CPU), memory size, disk type, number of disks of various types and capacity information corresponding to the node to be expanded, etc. The electronic device may determine the second resource information corresponding to the node to be expanded by analyzing the attribute information of the node to be expanded.
[0035] S12: Analyze the first resource information to determine usage data of the storage cluster.
[0036] The usage data is used to characterize the usage of the storage cluster resource information. After obtaining the first resource information, the electronic device can analyze the usage of the first resource information to determine the usage (remaining capacity) of each storage pool corresponding to the storage cluster, the number of disk writes, and the on or off status of each service.
[0037] S13: Generate capacity expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information.
[0038] The expansion configuration information is used to reasonably allocate the second resource information to the storage cluster, and the expansion configuration information may include MON node configuration, MDS node configuration, and disk partitioning. The electronic device can reasonably allocate the second resource information corresponding to the node to be expanded based on the usage data of the storage cluster, and generate the expansion configuration information of the storage cluster. For example, the electronic device can determine the disk partition ratio based on the frequency of disk read and write times, and can determine the allocation of storage space based on the usage of the storage pool and the frequency of use.
[0039] The storage cluster expansion method provided in this embodiment obtains the first resource information of the storage cluster and the second resource information of at least one node to be expanded, analyzes the first resource information to determine the usage data of the storage cluster, and then generates the storage cluster expansion configuration information according to the usage data of the storage cluster and the second resource information, so as to perform the expansion operation on the storage cluster according to the expansion configuration information. The method realizes the automatic expansion of the storage cluster, can meet the expansion requirements of a large number of nodes to be expanded to a greater extent, and greatly saves the operation and maintenance manpower by automatically and reasonably allocating resource information according to the expansion configuration information, reduces the workload when expanding a large-scale storage cluster, avoids the expansion failure caused by the cumbersome manual expansion operation, and improves the expansion success rate of the storage cluster.
[0040] In this embodiment, a storage cluster expansion method is provided, which can be used in electronic devices such as computers, servers, etc. Figure 2 is a flow chart of a method for expanding the capacity of a storage cluster according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0041] S21, obtaining first resource information of the storage cluster and second resource information of at least one node to be expanded. For detailed description, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.
[0042] S22: Analyze the first resource information to determine usage data of the storage cluster.
[0043] Specifically, the above step S22 may include:
[0044] S221, analyzing storage pool capacity information, disk writing information, and service start-up information corresponding to the storage cluster.
[0045] The storage pool capacity information is used to characterize the usage and frequency of the storage pool, the disk write information is used to characterize the usage and read and write frequency of the disk, and the service start information is used to characterize whether the service is started, that is, whether the service is in running state.
[0046] S222: Based on the storage pool capacity information, the disk write information, and the service enablement information, respectively determine the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes, and the enablement status of each service.
[0047] By analyzing the storage pool capacity information corresponding to the storage cluster, the total capacity and capacity usage of each storage pool can be determined; by analyzing the disk write information, the number of writes to each type of disk can be determined; by analyzing the service startup information, it can be determined whether each service of the storage cluster is in the enabled state, so as to determine whether each service is in normal operation.
[0048] S23: Generate capacity expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information.
[0049] Specifically, the above step S23 may include:
[0050] S231, determining capacity expansion data corresponding to the storage cluster based on usage data of the storage cluster.
[0051] The expansion data is the expansion ratio of the resource information corresponding to the storage cluster, such as the configuration ratio of MON nodes, the configuration ratio of MDS nodes, the disk partition ratio, the storage space allocation ratio, etc. After the electronic device determines the usage data of the storage cluster, it can determine the corresponding expansion data according to the usage data.
[0052] S232: Allocate second resource information according to the expansion data to generate expansion configuration information.
[0053] After determining the expansion data, the electronic device can allocate the second resource information accordingly according to the expansion data of the storage cluster determined by it, and obtain the expansion configuration information corresponding to the storage cluster, so that the electronic device can reasonably allocate the second resource information according to the expansion configuration information. The expansion configuration information includes MON node configuration, MDS node configuration, cluster trivial database (CTDB) configuration and disk resource allocation.
[0054] Optionally, when generating capacity expansion configuration information, the electronic device can display the capacity expansion configuration information through its management interface. If the user is not satisfied with the currently generated capacity expansion configuration information, the user can adjust the current capacity expansion configuration information according to actual needs so that the capacity expansion configuration information can meet the capacity expansion needs of the storage cluster.
[0055] The storage cluster expansion method provided in this embodiment determines the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes, and the startup status of each service by analyzing the storage pool capacity information, disk write information, and service startup information corresponding to the storage cluster. Based on the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes, and the startup status of each service, the expansion data corresponding to the storage cluster is determined, and the second resource information is allocated according to the expansion data to generate the expansion configuration information, thereby ensuring the accuracy of the generation of the expansion configuration information and further improving the expansion success rate of the storage cluster.
[0056] In this embodiment, a storage cluster expansion method is provided, which can be used in electronic devices such as computers, servers, etc. Figure 3 is a flow chart of a method for expanding the capacity of a storage cluster according to an embodiment of the present invention. Figure 3As shown, the process includes the following steps:
[0057] S31, obtaining first resource information of a storage cluster and second resource information of at least one node to be expanded.
[0058] Specifically, the above step S31 may include:
[0059] S311, obtaining first resource information of a storage cluster. For a detailed description of obtaining the first resource information of a storage cluster, please refer to the relevant description corresponding to the above embodiment, which will not be repeated here.
[0060] S312: In response to an input instruction for a node to be expanded, obtain information of at least one node to be expanded.
[0061] The user can input one or more nodes to be expanded through the storage cluster management interface of the electronic device, and accordingly, the electronic device can obtain the corresponding information of the nodes to be expanded in response to the user's input instructions for the nodes to be expanded. The information of the nodes to be expanded is information used to reflect the uniqueness of the nodes to be expanded, so that the electronic device can accurately locate the nodes to be expanded, for example, the IP address information corresponding to the nodes to be expanded, the physical address corresponding to the nodes to be expanded, etc.
[0062] S313: Analyze information of at least one node to be expanded, and determine second resource information corresponding to the at least one node to be expanded.
[0063] After obtaining the information of the node to be expanded, the electronic device can analyze the information of the node to be expanded to accurately locate the node to be expanded, and determine the corresponding CPI, memory size, software version, disk type, number of disks of various types, and capacity information, etc. of the second resource information. For example, the electronic device obtains the memory, disk type, number of disks, and disk capacity, etc., corresponding to the node to be expanded according to the input IP address information corresponding to the node to be expanded.
[0064] S32, analyzing the first resource information to determine the usage data of the storage cluster. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0065] S33: Generate capacity expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0066] S34, deleting original resource information of at least one node to be expanded, and obtaining current resource information corresponding to at least one node to be expanded.
[0067] The original resource information is the service information and configuration information in the original storage cluster retained by the node to be expanded. Since the newly added node may be separated from other storage clusters, in order to avoid the original resource information retained by the newly added node from having an adverse effect on the current storage cluster, it is necessary to clear the original resource information of each node to be expanded, so as to obtain the node to be expanded after the original resource information is cleared, and determine the current resource information of each node to be expanded.
[0068] S35, performing monitor node configuration, metabase service node configuration, cluster database configuration, and disk resource allocation according to the expansion configuration information.
[0069] After determining the expansion configuration information and clearing the original resource information of the node to be expanded, the electronic device can perform expansion configurations such as monitor node configuration, metadata database service node configuration, cluster database configuration and disk resource allocation on the current storage cluster according to the determined expansion configuration information, and automatically complete the expansion of the storage cluster without human intervention.
[0070] Specifically, when configuring the MON nodes of the storage cluster, the system time of the current storage cluster is synchronized to each node to be expanded.
[0071] Specifically, allocating disk resources according to the expansion configuration information includes:
[0072] (1) Obtain the usage frequency and usage status of each storage pool corresponding to the storage cluster.
[0073] The electronic device can monitor the usage of each storage pool corresponding to the storage cluster in real time to determine the usage frequency and usage status of each storage pool. Specifically, a monitoring period can be set to calculate the usage frequency and usage status of each storage pool within the monitoring period.
[0074] (2) Based on the usage frequency and usage status of each storage pool, disk resources are dynamically allocated to each storage pool.
[0075] According to the usage frequency and usage status of each storage pool, the disk is automatically divided to obtain multiple disk partitions. For example, SSD disks have good read and write performance, and SSD disks can be used as caches. By dividing the disk partitions, the disk space can be fully utilized. After the disk partitioning is completed, the electronic device can automatically allocate the disk partitions to the storage cluster according to the capacity information corresponding to each disk partition and the disk type to complete the storage space expansion of the storage cluster.
[0076] Specifically, the metadata database service node is configured according to the expansion configuration information, including:
[0077] (1) Determine whether the storage cluster is a file storage cluster.
[0078] When configuring the metadatabase service MDS node, the electronic device can analyze the type of the current storage cluster to determine whether the storage cluster is a file storage (Network Attached Storage, NAS) cluster. When the storage cluster is a file storage cluster, execute step (2), otherwise perform corresponding MDS node configuration according to the type of the current storage cluster. For example, when the storage cluster is a block storage (Storage Area Network, SAN) cluster or an object storage (Objcet Storage, OBJ) cluster, there is no need to configure the metadatabase service node.
[0079] (2) Configure multiple metadata repository service nodes based on the expansion configuration information.
[0080] The metadata base service node is used to provide metadata of the stored data. When the storage cluster is a file storage cluster, since several nodes are required in the NAS cluster to provide services for storing data, the electronic device can select multiple metadata base service nodes from the NAS cluster according to the generated expansion configuration information to configure the multiple metadata base service nodes.
[0081] Specifically, when performing database configuration of the storage cluster, namely CTDB configuration, the electronic device can configure the CTDB of the current storage cluster according to the CTDB configuration information of the original storage cluster, and automatically configure the virtual IP and node IP to ensure high availability of the storage cluster.
[0082] At the same time, the electronic device can also synchronize the management software configuration file, start various services of the node to be expanded, and add startup items to complete the automatic expansion of the storage cluster.
[0083] The storage cluster expansion method provided in this embodiment obtains at least one node to be expanded information by responding to an input instruction of a node to be expanded, analyzes the obtained at least one node to be expanded information, and determines the second resource information corresponding to at least one node to be expanded, thereby realizing the convenience of automatic expansion without the need for operation and maintenance personnel to perform tedious operations of expansion. By deleting the original resource information of at least one node to be expanded, the current resource information corresponding to at least one node to be expanded is obtained, and the monitor node configuration, metadata database service node configuration, cluster database configuration and disk resource allocation are performed according to the expansion configuration information, thereby avoiding the nodes to be expanded separated from other clusters from affecting the performance of the current storage cluster due to retaining the original cluster service and configuration information, thereby ensuring the performance of the storage cluster. By distinguishing the type of storage cluster, so as to configure the metadata database service node for the storage cluster, the high availability of the storage cluster is guaranteed, so that the expanded storage cluster can achieve the best performance.
[0084] In this embodiment, a storage cluster expansion device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0085] This embodiment provides a storage cluster expansion device, such as Figure 4 As shown, including:
[0086] The acquisition module 41 is used to acquire the first resource information of the storage cluster and the second resource information of at least one node to be expanded. For detailed description, please refer to the relevant description corresponding to the above method embodiment.
[0087] The analysis module 42 is used to analyze the first resource information and determine the usage data of the storage cluster. For detailed description, please refer to the relevant description corresponding to the above method embodiment.
[0088] The generating module 43 is used to generate the expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information. For detailed description, please refer to the relevant description corresponding to the above method embodiment.
[0089] The storage cluster expansion device provided in this embodiment obtains the first resource information of the storage cluster and the second resource information of at least one node to be expanded, analyzes the first resource information to determine the usage data of the storage cluster, and then generates the storage cluster expansion configuration information according to the usage data of the storage cluster and the second resource information, so as to perform the expansion operation on the storage cluster according to the expansion configuration information. The device realizes the automatic expansion of the storage cluster, can meet the expansion requirements of a large number of nodes to be expanded to a greater extent, and greatly saves the operation and maintenance manpower by automatically and reasonably allocating resource information according to the expansion configuration information, reduces the workload when expanding a large-scale storage cluster, avoids the expansion failure caused by the cumbersome manual expansion operation, and improves the expansion success rate of the storage cluster.
[0090] The storage cluster expansion device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0091] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.
[0092] The embodiment of the present invention also provides an electronic device having the above Figure 4 The expansion device of the storage cluster is shown.
[0093] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the electronic device may include: at least one processor 501, such as a CPU (Central Processing Unit), at least one communication interface 503, a memory 504, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The communication interface 503 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a wireless interface. The memory 504 may be a high-speed RAM memory (Random Access Memory) or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 504 may optionally be at least one storage device located away from the aforementioned processor 501. The processor 501 may be combined with Figure 4 In the described device, the memory 504 stores an application program, and the processor 501 calls the program code stored in the memory 504 to execute any of the above method steps.
[0094] The communication bus 502 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0095] Among them, the memory 504 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 504 may also include a combination of the above types of memory.
[0096] The processor 501 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.
[0097] The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0098] Optionally, the memory 504 is also used to store program instructions. The processor 501 can call the program instructions to implement the present application Figures 1 to 3 The storage cluster expansion method shown in the embodiment.
[0099] The embodiment of the present invention also provides a non-transitory computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the processing method of the storage cluster expansion method in any of the above method embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.
[0100] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for expanding storage cluster, characterized in that: include: Obtaining first resource information of the storage cluster and second resource information of at least one node to be expanded, wherein the first resource information includes the total capacity of each storage pool, disk information, and each service status, and the second resource information includes the central processing unit, memory size, disk type, number of disks of various types, and capacity information corresponding to the node to be expanded; Analyzing the first resource information to determine usage data of the storage cluster; Generate capacity expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information; The analyzing the first resource information of the storage cluster to determine the usage data of the storage cluster includes: Analyze the storage pool capacity information, disk writing information and service start-up information corresponding to the storage cluster; Based on the storage pool capacity information, disk write information and service enablement information, respectively determine the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes and the enablement status of each service; The generating, based on the usage data of the storage cluster and the second resource information, the capacity expansion configuration information of the storage cluster includes: Determine, based on the usage data of the storage cluster, the capacity expansion data corresponding to the storage cluster, wherein the capacity expansion data is the capacity expansion ratio of the resource information corresponding to the storage cluster; Allocate the second resource information according to the expansion data to generate the expansion configuration information; The determining, based on the usage data of the storage cluster, the capacity expansion data corresponding to the storage cluster comprises: Determine the disk partition ratio based on the frequency of disk read and write times; Determine the allocation of storage space based on the usage and frequency of storage pool usage; Also includes: Deleting original resource information of the at least one node to be expanded, and obtaining current resource information corresponding to the at least one node to be expanded, wherein the original resource information is service information and configuration information in the original storage cluster retained by the node to be expanded; Perform monitor node configuration, metadata database service node configuration, cluster database configuration and disk resource allocation according to the expansion configuration information; Allocating disk resources according to the expansion configuration information includes: Obtaining the usage frequency and usage status of each storage pool corresponding to the storage cluster; Dynamically allocating the disk resources to the respective storage pools based on the usage frequency and usage status of the respective storage pools; The dynamically allocating the disk resources to the respective storage pools based on the usage frequency and usage status of the respective storage pools comprises: Automatically divide the disk into multiple disk partitions based on the usage frequency and usage status of each storage pool; After the disk is divided, the disk partitions are automatically allocated to the storage cluster according to the capacity information and disk type corresponding to each disk partition to complete the storage space expansion of the storage cluster; Performing metadatabase service node configuration according to the expansion configuration information includes: Determining whether the storage cluster is a file storage cluster; When the storage cluster is a file storage cluster, configuring a plurality of metadatabase service nodes based on the capacity expansion configuration information; When the storage cluster is not a file storage cluster, performing corresponding metadatabase service node configuration according to the type of the current storage cluster; The configuring of the plurality of metadata repository service nodes based on the capacity expansion configuration information includes: A plurality of metadatabase service nodes are selected from the file storage cluster according to the capacity expansion configuration information to configure the plurality of metadatabase service nodes.
2. The method according to claim 1, characterized in that Acquiring second resource information of the at least one node to be expanded includes: In response to an input instruction of the node to be expanded, obtaining information of the at least one node to be expanded; The information of the at least one node to be expanded is analyzed to determine second resource information corresponding to the at least one node to be expanded.
3. A storage cluster expansion device, characterized in that: include: An acquisition module is used to acquire first resource information of a storage cluster and second resource information of at least one node to be expanded, wherein the first resource information includes the total capacity of each storage pool, disk information, and each service status, and the second resource information includes the central processing unit, memory size, disk type, number of disks of various types, and capacity information corresponding to the node to be expanded; An analysis module, configured to analyze the first resource information and determine usage data of the storage cluster; A generating module, configured to generate capacity expansion configuration information of the storage cluster based on the usage data of the storage cluster and the second resource information; The analysis module is specifically used to analyze the storage pool capacity information, disk writing information and service start information corresponding to the storage cluster; Based on the storage pool capacity information, disk write information and service enablement information, respectively determine the total capacity of each storage pool corresponding to the storage cluster and its usage status, the number of disk writes and the enablement status of each service; The generating module is specifically configured to determine the expansion data corresponding to the storage cluster based on the usage data of the storage cluster, wherein the expansion data is the expansion ratio of the resource information corresponding to the storage cluster; Allocate the second resource information according to the expansion data to generate the expansion configuration information; The generation module is specifically used to determine the disk partition ratio according to the frequency of disk read and write times; Determine the allocation of storage space based on the usage and frequency of storage pool usage; The device is also used for: Deleting original resource information of the at least one node to be expanded, and obtaining current resource information corresponding to the at least one node to be expanded, wherein the original resource information is service information and configuration information in the original storage cluster retained by the node to be expanded; Perform monitor node configuration, metadata database service node configuration, cluster database configuration and disk resource allocation according to the expansion configuration information; Allocating disk resources according to the expansion configuration information includes: Obtaining the usage frequency and usage status of each storage pool corresponding to the storage cluster; Dynamically allocating the disk resources to the respective storage pools based on the usage frequency and usage status of the respective storage pools; The dynamically allocating the disk resources to the respective storage pools based on the usage frequency and usage status of the respective storage pools comprises: Automatically divide the disk into multiple disk partitions based on the usage frequency and usage status of each storage pool; After the disk is divided, the disk partitions are automatically allocated to the storage cluster according to the capacity information and disk type corresponding to each disk partition to complete the storage space expansion of the storage cluster; Performing metadatabase service node configuration according to the expansion configuration information includes: Determining whether the storage cluster is a file storage cluster; When the storage cluster is a file storage cluster, configuring a plurality of metadatabase service nodes based on the capacity expansion configuration information; When the storage cluster is not a file storage cluster, performing corresponding metadatabase service node configuration according to the type of the current storage cluster; The configuring of the plurality of metadata repository service nodes based on the capacity expansion configuration information includes: A plurality of metadatabase service nodes are selected from the file storage cluster according to the capacity expansion configuration information to configure the plurality of metadatabase service nodes.
4. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the storage cluster expansion method according to any one of claims 1 to 2 by executing the computer instructions.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the storage cluster expansion method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Capacity expansion method and device for target system, equipment and storage medium
CN112463372A
Node expansion method and system, terminal and storage medium
CN112486664A
