Storage pool creating method, device and equipment and computer readable storage medium

By performing virtualization processing and disk allocation policies on storage nodes, the problem of limited number of failed disks in existing storage pools is solved, the performance and redundancy strategies of storage pools are improved, and the failure tolerance is achieved.

CN119597225AActive Publication Date: 2025-03-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411856122.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-11
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

The number of faulty disks in existing storage pools is limited, resulting in low performance of storage pools and inability to effectively deal with multi-node failures.

Method used

By virtualizing the storage nodes, multiple virtualization nodes are generated, and the disk allocation method is adopted according to the non-unified memory access to the disk corresponding to the nodes, so that the difference in the number of disks of each virtualization node is maximum to 1, and the number of disks across nodes is minimized, thereby improving the redundancy strategy and performance of the storage pool.

Benefits of technology

This increases the maximum number of failed disks allowed by the storage pool, improves the performance and redundancy strategy of the storage pool, and reduces cross-node data transmission while ensuring balance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597225A_ABST
    Figure CN119597225A_ABST
Patent Text Reader

Abstract

The invention discloses a storage pool creating method, device and equipment and a computer readable storage medium, and is applied to the technical field of distributed storage, and the method comprises the following steps: carrying out virtualization processing on storage nodes to obtain a set number of virtualization nodes; the set number is greater than 1; determining a non-uniform memory access node corresponding to the virtualization node; according to the disk corresponding to each non-uniform memory access node, using a disk allocation method to allocate a disk for each virtualization node to obtain a target storage pool; the disk allocation method is a method for enabling the maximum difference value of the number of the disks corresponding to each virtualization node to be 1 and enabling the number of the cross-node disks to be minimized. Due to the fact that one storage node corresponds to a plurality of virtualization nodes, under the current same redundancy strategy, the number of the maximum fault disks allowed to appear becomes larger, storage pool balance is guaranteed through a disk distribution method, and cross-node transmission is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed storage technology, and in particular to a storage pool creation method, device, equipment and computer-readable storage medium. Background Art

[0002] Storage pool is a way to manage and organize physical storage resources in modern storage systems, especially in software-defined storage (SDS), distributed storage and virtualized environments. Currently, there are mainly two types of storage pools for storing data: erasure pool and replica pool. Among them, the number of failed disks in the erasure storage pool is limited. For example, a 2+1 erasure pool can only allow one disk failure in one node at most, otherwise there will be a risk of data loss, while a 3-copy storage pool can allow one disk failure in two nodes at most, so the number of failed disks currently allowed is too small.

[0003] It can be seen that how to increase the maximum number of allowed failed disks and improve the performance of the storage pool is a technical problem that those skilled in the art urgently need to solve. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a storage pool creation method, apparatus, device and computer-readable storage medium, which solve the technical problem of low storage pool performance in the prior art.

[0005] In order to solve the above technical problems, the present invention provides a storage pool creation method, comprising:

[0006] Virtualizing the storage nodes to obtain a set number of virtualized nodes; wherein the set number is greater than 1;

[0007] Determine a non-uniform memory access node corresponding to the virtualization node;

[0008] According to the disks corresponding to each non-uniform memory access node, a disk is allocated to each virtualization node using a disk allocation method to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualization node be 1 and minimizes the number of disks across nodes.

[0009] In some embodiments, when determining equal allocation, allocating a disk to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool includes:

[0010] According to the disks corresponding to the non-uniform memory access nodes, it is determined to select an equal number of disks from each non-uniform memory access node to obtain a plurality of equal number of disk groups;

[0011] Allocate each equal disk group to a virtualization node corresponding to the non-uniform memory access node.

[0012] In some embodiments, when it is determined that the disks are not equally allocated and the selected disk exists under each non-uniform memory access node, the method of allocating a disk to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool includes:

[0013] Determine that the number of disks selected under the first non-uniform memory access node is a first number, and determine that the number of disks selected under the second non-uniform memory access node is a second number;

[0014] When it is determined that the first number is greater than the sum of the second number and 1, a target movement number is determined according to the first number and the second number, and the target movement number of disks is selected from the first number of disks under the first non-uniform memory access node and moved to the second non-uniform memory access node; wherein the calculation formula of the target movement number h is h=(nm) / 2, n is the first number, and m is the second number;

[0015] Determine the disk group corresponding to the first non-uniform memory access node and the disk group corresponding to the second non-uniform memory access node according to the target movement quantity of the movement; wherein the disk group corresponding to the first non-uniform memory access node is a=n-(nm) / 2, and the disk group corresponding to the second non-uniform memory access node is b=m+(nm) / 2;

[0016] The disk group corresponding to the first non-uniform memory access node and the disk group corresponding to the second non-uniform memory access node are respectively allocated to the virtualization node corresponding to each non-uniform memory access node.

[0017] In some embodiments, when it is determined that the disks are not equally allocated and all the disks belong to one non-uniform memory access node, the method of allocating disks to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool includes:

[0018] Divide all disks equally to obtain an evenly distributed disk group;

[0019] Each equally-divided disk group is allocated to a virtualization node corresponding to each non-uniform memory access node to obtain the target storage pool.

[0020] In some embodiments, after allocating a disk to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool, the method further includes:

[0021] When the number of expansion disks selected from the non-uniform memory access nodes is the same, each equal amount of disks is expanded to the virtualization node corresponding to each non-uniform memory access node for expansion;

[0022] When the number of expansion disks selected from each non-uniform memory access node is inconsistent, the number of expansion disks selected from the two non-uniform memory access nodes is respectively the first expansion number and the second expansion number, and the number of mobile expansion disks selected from the non-uniform memory access node whose disk number is the first expansion number is determined according to the first expansion number and the second expansion number; wherein the first expansion number is greater than the second expansion number, and the number of mobile expansion disks o=(pq) / 2, where p is the first expansion number and q is the second expansion number;

[0023] Determine to select the mobile expansion disk quantity block expansion disk from the non-uniform memory access node corresponding to the first expansion quantity, move it to the non-uniform memory access node corresponding to the second expansion quantity, and obtain a first expansion disk group corresponding to the first virtualization node and a second expansion disk group corresponding to the second virtualization node;

[0024] When the expansion disk is selected from only one of the non-uniform memory access nodes, the number of the selected expansion disks is averaged to obtain multiple average expansion disk groups, and each average expansion disk group is allocated to each virtualization node.

[0025] In some embodiments, the virtualizing the storage nodes to obtain a set number of virtualized nodes includes:

[0026] Each storage node is virtualized to obtain two virtualized nodes corresponding to each storage node.

[0027] In some embodiments, the storage pool creation method further includes:

[0028] When it is determined that the redundancy strategy of the target storage pool is an erasure pool, the redundancy strategy is determined to be 2x+2y; wherein x is the number of data blocks when virtualization is not performed, and y is the number of check codes when virtualization is not performed.

[0029] The embodiment of the present invention further provides a storage pool creation device, including:

[0030] A virtualization node determination module, used to virtualize the storage nodes to obtain a set number of virtualization nodes; wherein the set number is greater than 1;

[0031] A corresponding relationship determination module, used to determine a non-uniform memory access node corresponding to a virtualization node;

[0032] The storage pool creation module is used to allocate disks to each virtualization node according to the disks corresponding to each non-uniform memory access node using a disk allocation method to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualization node be 1 and minimizes the number of disks across nodes.

[0033] The embodiment of the present invention further provides a storage pool creation device, including:

[0034] Memory for storing computer programs;

[0035] A processor is used to execute the computer program to implement the steps of the storage pool creation method as described above.

[0036] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the storage pool creation method described above are implemented.

[0037] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above storage pool creation method when executed by a processor.

[0038] To solve the above technical problems, an embodiment of the present invention provides a storage pool creation method, which may include: virtualizing storage nodes to obtain a set number of virtualized nodes; wherein the set number is greater than 1; determining the non-uniform memory access nodes corresponding to the virtualized nodes; and according to the disks corresponding to the non-uniform memory access nodes, allocating disks to each virtualized node using a disk allocation method to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualized node be 1 and minimizes the number of disks across nodes.

[0039] It can be seen from the above technical solution that the beneficial effect of the present invention is that: by virtualizing the storage node, one storage node corresponds to multiple virtualized nodes, so that the maximum number of failed disks allowed to occur becomes larger (for example, compared with the 2+1 erasure storage pool, which only allows one hard disk to fail, the redundancy strategy of the virtualized storage pool becomes 4+2. The 4+2 redundancy strategy allocates data according to the hard disk. It uses 3 nodes as 6 nodes, and each node selects 2 hard disks, so that it can allow 2 nodes to have one hard disk failure respectively), and when determining the disk corresponding to the virtualized node, the maximum difference in the number of disks corresponding to the virtualized node is determined to be 1, and the number of disks across nodes is minimized, thereby reducing cross-node data transmission while ensuring the balance of the storage pool, and improving the overall performance of the storage pool. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flowchart of a storage pool creation method provided by an embodiment of the present invention;

[0042] Figure 2 An example diagram of a process for creating a first storage pool provided in an embodiment of the present invention;

[0043] Figure 3 A schematic diagram of a first capacity expansion method based on disk equalization provided in an embodiment of the present invention;

[0044] Figure 4 A schematic diagram of a second capacity expansion method based on disk equalization provided in an embodiment of the present invention;

[0045] Figure 5 A schematic diagram of a third capacity expansion method based on disk equal distribution provided in an embodiment of the present invention;

[0046] Figure 6 A schematic diagram of expanding the storage pool under the first unequal distribution situation provided by an embodiment of the present invention;

[0047] Figure 7 A schematic diagram of expanding the storage pool in the second unequal distribution case provided by an embodiment of the present invention;

[0048] Figure 8 A schematic diagram of expanding the storage pool under the third unequal distribution situation provided by an embodiment of the present invention;

[0049] Fig. 9 An example diagram of a process for creating a second storage pool provided in an embodiment of the present invention;

[0050] Fig.10 A schematic diagram of the structure of a storage pool creation device provided by an embodiment of the present invention;

[0051] Fig.11 A schematic diagram of the structure of a storage pool creation device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the protection scope of the present invention.

[0053] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0054] Some of the terms that appear in the description of the embodiments of the present invention may be interpreted as follows:

[0055] NUMA, short for Non-Uniform Memory Access, is a multi-processor computer architecture design that is mainly used in multi-core processors and multi-processor systems. Under the NUMA architecture, a processor can access its local memory much faster than accessing the memory of other processors in the system. This is because each processor has its own local memory, and accessing remote memory goes through a more complex path, such as through the CPU interconnect or the North Bridge controller, resulting in higher latency.

[0056] Storage pool is a way to manage and organize physical storage resources in modern storage systems, especially in software-defined storage (SDS), distributed storage and virtualization environments. Storage pool aggregates multiple independent physical storage devices (such as hard disk drives, SSD solid-state drives, storage arrays, etc.) to form a logical single storage resource, thereby improving storage flexibility, scalability and efficiency.

[0057] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0058] Next, a flowchart of a storage pool creation method provided by an embodiment of the present invention is described in detail. Figure 1 A storage pool creation method provided in an embodiment of the present invention may include:

[0059] S101, virtualize the storage nodes to obtain a set number of virtualized nodes; wherein the set number is greater than 1.

[0060] The executor of this embodiment is an electronic device. The electronic device may be a computer, a mobile phone, etc., or may also be a node in a storage pool. The storage node in this embodiment is a part of the storage pool, usually a server or a virtual machine, responsible for managing and maintaining the resources in the storage pool. In this embodiment, virtualizing the storage node means that a physical storage node is split or mapped into two logical virtual nodes through virtualization technology. This embodiment does not limit the specific set number. For example, the set number in this embodiment may be 2; or the set number in this embodiment may be 3. It is understandable that, in general, the set number is 2.

[0061] S102: Determine a non-uniform memory access node corresponding to the virtualization node.

[0062] This embodiment does not limit the specific method of determining the non-uniform memory access node corresponding to the virtualization node. For example, this embodiment can determine the non-uniform memory access node corresponding to the virtualization node according to the demand; or this embodiment can also be determined according to the correspondence between the number of the virtualization node and the number of the non-uniform memory access node. It can be understood that when there are multiple virtualization nodes, each virtualization node can be numbered to obtain the number of each virtualization node, and the non-uniform memory access node can be numbered at the same time. By setting the mapping relationship between the numbers, the non-uniform memory access node corresponding to the virtualization node can be directly determined. For example, when the virtualization nodes are numbered 1 and 2 respectively, and the non-uniform memory access nodes are also numbered 1 and 2, at this time, it can be determined that the virtualization node numbered 1 corresponds to the non-uniform memory access node numbered 1, and it can be determined that the virtualization node numbered 2 corresponds to the non-uniform memory access node numbered 2. The non-uniform memory access nodes in this embodiment are NUMA nodes.

[0063] S103, according to the disks corresponding to each non-uniform memory access node, a disk allocation method is used to allocate a disk to each virtualization node to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualization node be 1 and minimizes the number of disks across nodes.

[0064] In this embodiment, the disks corresponding to the non-uniform memory access nodes can be visualized, so that the disks corresponding to each non-uniform memory access node can be intuitively determined, so that when selecting disks for virtualization nodes, try to select disks in the same non-uniform memory access node, so that there is no need to read across disks. This embodiment does not limit the number of non-uniform memory access nodes. For example, in this embodiment, the number of non-uniform memory access nodes can be 2; or the number of non-uniform memory access nodes in this embodiment can be 3; or the number of non-uniform memory access nodes in this embodiment can be 4. This embodiment does not limit the number of disks selected from each non-uniform memory access node, and an equal number of disks can be selected from each non-uniform memory access node; or disks can be selected from each non-uniform memory access node separately, but the number of disks is not the same; or this embodiment can also select a disk from one of the non-uniform memory access nodes. The disk allocation method in this embodiment is a method for minimizing the number of disks across nodes (non-uniform memory access nodes), that is, making the disks corresponding to each virtualization node belong to the same non-uniform memory access node as much as possible, while ensuring that the disks are evenly distributed (the number of disks corresponding to each virtualization node is equal, and when they cannot be equal, the maximum difference in the number of disks is 1. For example, there are two non-uniform memory access nodes, and the numbers of disks selected under these two non-uniform memory access nodes are 2 and 4 respectively. At this time, it is necessary to move one disk from the virtualization node with 4 disks to the virtualization node with 2 disks; or when the numbers of disks selected under these two non-uniform memory access nodes are 2 and 3 respectively, no movement is required), ensure that the disks corresponding to each virtualization node belong to the same non-uniform memory access node as much as possible to prevent cross-node transmission. Among them, the disks corresponding to each virtualization node belong to the same non-uniform memory access node as much as possible, which means that, for example, the number of disks selected under the first non-uniform memory access node is 4, and the number of disks selected under the second non-uniform memory access node is 8. At this time, only 2 disks need to be selected from the second non-uniform memory access node for the first non-uniform memory access node (or the virtualization node corresponding to the first non-uniform memory access node), that is, at least one of the corresponding disks does not need to cross nodes, and the other only has two disks that need to cross nodes. If this cross-node situation is not considered, if 4 disks are moved from the second non-uniform memory access node to the first non-uniform memory access node, and 2 disks originally belonging to the first non-uniform memory access node are moved from the first non-uniform memory access node to the second non-uniform memory access node, at this time, even if the number of disks corresponding to the two virtualization nodes is the same, there are a large number of disks that need to be transmitted across nodes, and the remote memory access consumption is large, which affects the transmission efficiency. After the allocation, this embodiment can also expand the disks in the storage pool. For example, the current disk can be expanded; or this embodiment can also select a new disk to expand the storage pool.

[0065] It should be further explained that, in order to improve the accuracy of the redundancy strategy, when the redundancy strategy of the target storage pool is determined to be an erasure pool, the redundancy strategy is determined to be 2x+2y; where x is the number of data blocks when virtualization is not performed, and y is the number of checksums when virtualization is not performed. A replica pool is a simple data redundancy strategy that ensures high availability and fault tolerance of data by creating multiple identical copies of data (i.e., replication). For example, in a replica pool with 3 replicas, each piece of data will be replicated 3 times and stored on different nodes. In this way, even if there is a node failure, the integrity and accessibility of the data can be guaranteed. An erasure pool uses erasure coding technology, which is a more efficient data redundancy strategy. Erasure coding divides the original data into several data blocks through mathematical algorithms and generates a certain number of checksums. These data blocks and checksums are distributed and stored on different nodes. When a node fails, the lost data can be restored through the remaining data blocks and checksums without the need for a complete data copy. Compared with a replica pool, an erasure pool can provide higher data storage efficiency in the same space. For example, if there is a 3-node distributed storage cluster, if a 3-copy storage pool is created, the storage space utilization is only 33% (each piece of data has 3 identical copies). However, if a 2+1 erasure storage pool is created, its space utilization can reach 66.7% (one piece of verification data is required for every two pieces of data, so the utilization is 2 / (2+1)=66.7%). Therefore, an erasure storage pool is selected. Although the erasure storage pool improves the space utilization compared to the copy storage pool, the erasure storage pool also has certain defects. For example, the 2+1 erasure pool mentioned above can only allow one disk failure of one node at most, otherwise there will be a risk of data loss, while the 3-copy storage pool can allow one disk failure of two nodes at most. Therefore, in order to increase the number of disks with the most failures, a sub-node erasure storage pool is proposed, that is, when creating a storage pool, one node is virtualized into two virtual nodes, and the redundancy strategy of the storage pool becomes 4+2. Compared with the 2+1 erasure storage pool, 4+2 will allocate data according to the hard disk. It uses 3 nodes as 6 nodes, and each node selects 2 hard disks, so that it can allow 2 nodes to fail 1 hard disk respectively (a total of 2 hard disks fail) without data loss. After the above analysis, it can be seen that the 4+2 erasure storage pool is better than the copy storage pool in terms of space utilization, and is better than the 2+1 erasure storage pool in terms of the maximum number of allowed failed disks, achieving a balance between space utilization and allowed failed disks. It should be noted that this embodiment gives the case of two virtualized nodes. When the number of virtualized nodes is d, the redundancy strategy is dx+dy, and d is a positive integer greater than 1.

[0066] It should be further explained that when determining equal allocation, the disk allocation method is used to allocate disks to each virtualization node according to the disks corresponding to each non-uniform memory access node to obtain the target storage pool, which may include: determining to select equal disks from each non-uniform memory access node according to the disks corresponding to the non-uniform memory access nodes to obtain multiple equal disk groups; and allocating each equal disk group to the virtualization node corresponding to the non-uniform memory access node.

[0067] When selecting disks for each virtual node, this embodiment selects equal disks according to the non-uniform memory access node (NUMAnode) to which it belongs. That is, when n disks are selected under NUMA node0, n disks are also selected under NUMA node1. At this time, the disks can be evenly divided, that is, n disks are respectively provided under the two nodes node-hdd_1 and node-hdd_2 virtualized from one node. At this time, both capacity balance and maximum performance can be achieved, which is the optimal state of storage pool performance.

[0068] It should be further explained that, when it is determined that the disks are not equally allocated and the selected disk exists under each non-uniform memory access node, a disk allocation method is used to allocate a disk to each virtualization node according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool, which may specifically include:

[0069] S201, determining that the number of disks selected under a first non-uniform memory access node is a first number, and determining that the number of disks selected under a second non-uniform memory access node is a second number.

[0070] In this embodiment, there are selected disks under each non-uniform memory access node, which means that when each node selects a disk, the disks under each non-uniform memory access node are not selected in equal quantities. For example, there are two non-uniform memory access nodes, the number of disks selected under the first non-uniform memory access node is n (a first number), and the number of disks selected under the second non-uniform memory access node is m (a second number), where m and n are not equal.

[0071] S202, when it is determined that the first number is greater than the sum of the second number and 1, determine the target movement number according to the first number and the second number, and determine to select the target movement number of disks from the first number of disks under the first non-uniform memory access node and move them to the second non-uniform memory access node; wherein the calculation formula for the target movement number h is h= (nm) / 2, n is the first number, and m is the second number.

[0072] In this embodiment, the first number is greater than the sum of the second number and 1, which means n>m+1. This embodiment does not limit the specific values ​​of n and m. For example, in this embodiment, n is 4, m is 2, and the target movement number is (4-2) / 2=1; or in this embodiment, n is 8, m is 2, and the target movement number is (8-2) / 2=3.

[0073] S203, determine the disk group corresponding to the first non-uniform memory access node and the disk group corresponding to the second non-uniform memory access node according to the target movement number; wherein, the disk group corresponding to the first non-uniform memory access node is a=n-(nm) / 2, and the disk group corresponding to the second non-uniform memory access node is b=m+(nm) / 2.

[0074] S204: allocate the disk group corresponding to the first non-uniform memory access node and the disk group corresponding to the second non-uniform memory access node to the virtualization node corresponding to each non-uniform memory access node respectively.

[0075] The above process is an example diagram of the process of creating the first storage pool provided by an embodiment of the present invention. In this embodiment, when n > m+1 (for example, n=4, m=2), in order to be compatible with balance and performance, we take out (n–m) / 2 disks from NUMA node0 and put them together with the m disks under NUMA node1 to node-hdd_2, and put the remaining disks under NUMA node0 to node-hdd_1. At this time, it can be ensured that all disks under node-hdd_1 belong to the same NUMA node, ensuring the performance of node-hdd_1. In this case, some performance is lost to ensure balance.

[0076] It should be further explained that when it is determined that the disks are not allocated equally and all the disks belong to a non-uniform memory access node, the disk allocation method is used to allocate disks to each virtualization node according to the disks corresponding to each non-uniform memory access node to obtain the target storage pool, which may include: dividing all the disks equally to obtain an equally divided disk group; allocating each equally divided disk group to the virtualization node corresponding to each non-uniform memory access node to obtain the target storage pool. For example, there are currently two virtualization nodes, of which the number of disks under the non-uniform memory access node corresponding to the first virtualization node is 4, and the number of disks under the other non-uniform memory access node is 0. At this time, only two disks need to be moved from the first virtualization node to the other virtualization node.

[0077] It should be further explained that, after allocating a disk to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool, the following may also be included:

[0078] S1, when the number of expansion disks selected from the non-uniform memory access nodes is the same, each equal amount of disks is expanded to the virtualization node corresponding to each non-uniform memory access node for expansion;

[0079] S2, when the number of expansion disks selected from each non-uniform memory access node is inconsistent, the number of expansion disks selected from the two non-uniform memory access nodes is respectively the first expansion number and the second expansion number, and according to the first expansion number and the second expansion number, the number of mobile expansion disks selected from the non-uniform memory access node whose disk number is the first expansion number is determined; wherein the first expansion number is greater than the second expansion number, the number of mobile expansion disks o=(pq) / 2, p is the first expansion number, and q is the second expansion number;

[0080] S3, determine to select the expansion disk of the mobile expansion disk quantity from the non-uniform memory access node corresponding to the first expansion quantity, move it to the non-uniform memory access node corresponding to the second expansion quantity, and obtain the first expansion disk group corresponding to the first virtualization node and the second expansion disk group corresponding to the second virtualization node;

[0081] S4, when only the expansion disk is selected from one of the non-uniform memory access nodes, the number of selected expansion disks is averaged to obtain multiple average expansion disk groups, and each average expansion disk group is allocated to each virtualization node.

[0082] For ease of understanding, this embodiment provides methods for capacity expansion in different situations. The above process can be understood as the disks in the original storage pool have been evenly divided according to NUMA nodes. For example, in the first case, when the number of expansion disks selected from the non-uniform memory access nodes is the same, the expansion is performed by directly expanding the capacity of each equal number of disks to the virtualization node corresponding to each non-uniform memory access node. Figure 3 , Figure 3 A schematic diagram of a first capacity expansion method based on disk equalization provided by an embodiment of the present invention, from Figure 3 It can be seen that the original virtual node node 01-hdd_1 already has disks 1, 2, and 3, which belong to NUMA node0; node01-hdd_1_n1 already has disks 4, 5, and 6, which belong to NUMA node1; 6 disks are selected for capacity expansion, of which a, b, and c belong to NUMA node0, and x, y, and z belong to NUMA node1. At this time, for capacity expansion, you only need to expand a, b, and c to NUMA node0, and expand x, y, and z to NUMA node1.

[0083] When the number of expansion disks selected from two non-uniform memory access nodes is inconsistent, the disks under NUMAnode0 and NUMA node1 are not selected equally. Assume that p expansion disks are selected under NUMA node0, q expansion disks are selected under NUMA node1, and p > q+1. In order to maintain compatibility and performance, we take out (pq) / 2 disks from NUMA node0 and put them together with the q disks under NUMA node1 under the node originally storing NUMA node1, and put the remaining disks under NUMAnode0 under the node originally storing NUMA node0. As shown below Figure 4 As shown, Figure 4 A schematic diagram of a second capacity expansion method based on disk equalization provided by an embodiment of the present invention, from Figure 4 It can be seen that node01-hdd_1 already has disks 1, 2, and 3, which belong to NUMA node0; node01-hdd_1_n1 already has disks 4, 5, and 6, which belong to NUMA node1; 8 disks are selected for expansion, of which a, b, c, d, and e belong to NUMA node0, and x, y, and z belong to NUMA node1. Since the number of disks under the newly expanded NUMA node0 is two more than that under NUMA node1, in order to ensure balance, disk e under NUMAnode0 needs to be expanded to node01-hdd_1_n1. After the expansion is completed, all disks under node01-hdd_1 belong to NUMA node0, but node01-hdd_1_n1 has both disks under NUMA node0 and disks under NUMA node1.

[0084] When selecting expansion disks from only one of the non-uniform memory access nodes to expand the storage pool, select only NUMA node0 or only select disks under NUMA nodes. In this case, you only need to evenly distribute all disks to NUMA node0 and NUMA node1. Figure 5 As shown, Figure 5 A schematic diagram of a third capacity expansion method based on disk equalization provided by an embodiment of the present invention, from Figure 5 It can be seen that when the number of expanded disks cannot be evenly divided, the larger number of disks are allocated to the virtualization nodes corresponding to the original disks to ensure that the types of disks under the node node01-hdd1 are consistent. In other words, when it is determined that the disks cannot be evenly divided, add 1 to the original number of disks and divide it by 2 to divide it evenly. The obtained value is used as the number of disks allocated to the virtualization node corresponding to the current disk, and the value obtained by even division minus 2 is used as the number of disks allocated to another virtualization node.

[0085] It should be further noted that when the selection is not equal (assuming there are n disks under NUMAnode0 in node-hdd_1, m disks under NUMA node1 in node-hdd_1_n1, and k disks under NUMA node0, and -2 < n - (m + k) < 2), when expanding the storage pool, the specific process can be as follows:

[0086] Step 1: When the number of expanded disks selected from the non-uniform memory access nodes is the same, expand each equal amount of disks to the virtualization nodes corresponding to each non-uniform memory access node for expansion.

[0087] In this embodiment, when each node selects disks to expand the storage pool, according to the NUMA node to which it belongs, an equal amount of disks are selected respectively. At this time, only need to put the storage pool under NUMA node0 newly selected under the node-hdd_1 node, and the storage pool under NUMA node1 under the node-hdd_1_n1 node; such as Figure 6 , Figure 6 The following is a schematic diagram of expanding the storage pool in the first non-uniform case provided by the embodiment of the present invention: There are already disks 1, 2, and 3 under node01-hdd_1, which belong to NUMAnode0; there are already disks 4 and 5 under node01-hdd_1_n1, which belong to NUMA node1, and 6 belongs to NUMA node0; when expanding, 6 disks are selected, where a, b, and c belong to NUMA node0, and x, y, and z belong to NUMA node1. At this time, for expansion, only need to expand a, b, and c under NUMA node0, and expand x, y, and z under NUMA node1.

[0088] Step 2: When the number of expansion disks selected from each non-uniform memory access node is inconsistent, the number of expansion disks selected from the two non-uniform memory access nodes is the first expansion number and the second expansion number respectively, and the number of mobile expansion disks selected from the non-uniform memory access node whose disk number is the first expansion number is determined according to the first expansion number and the second expansion number; wherein the first expansion number is greater than the second expansion number, and the number of mobile expansion disks c=((a+x) -(b+k+y+1)) / 2), x is the first expansion quantity, y is the second expansion quantity, a is the number of disks of the first non-uniform memory access node under the current first virtualization node, b is the number of disks of the second non-uniform memory access node under the current second virtualization node, and k is the number of disks of the first non-uniform memory access node under the current second virtualization node; determine to select the expansion disks of the mobile expansion disk quantity block from the non-uniform memory access nodes corresponding to the first expansion quantity, move them to the non-uniform memory access nodes corresponding to the second expansion quantity, and obtain the first expansion disk group corresponding to the first virtualization node, and the second expansion disk group corresponding to the second virtualization node.

[0089] In this embodiment, when each node selects disks to expand the storage pool, assuming that x disks are selected under NUMA node0 and y disks are selected under NUMA node1, and (a+x)>b+k+y+1), a portion of disks (((a+x)-(b+k+y)) / 2) are selected from the newly expanded disks under NUMA node0 and placed under node-hdd_1, and the remaining portion is placed under node-hdd_1_n1, ensuring that the difference in the number of disks under node-hdd_1 and node-hdd_1_n1 does not exceed 1. Figure 7 As shown, Figure 7A schematic diagram of expanding the storage pool under the second unequal distribution case provided for an embodiment of the present invention: node01-hdd_1 already has disks 1, 2 and 3, which belong to NUMA node0; node01-hdd_1_n1 already has disks 4 and 5, which belong to NUMA node1, and 6 belongs to NUMA node0; 8 disks are selected for expansion, of which a, b, c, d and e belong to NUMA node0, and x, y and z belong to NUMA node1. Since the number of disks under the newly expanded NUMA node0 is two more than that under NUMA node1, in order to ensure balance, disk e under NUMAnode0 needs to be expanded to node01-hdd_1_n1. After the expansion is completed, all the disks under node01-hdd_1 belong to NUMA node0, but node01-hdd_1_n1 has both disks under NUMA node0 and disks under NUMA node1. Alternatively, when each node selects disks for storage pool expansion, assuming that x disks are selected under NUMA node0, y disks are selected under NUMAnode1, and (a+x)<(b+k+y+1), then a portion of the disks under the newly expanded NUMA node1 (((b+k+y+1) - (a+x)) / 2) are selected and placed under node-hdd_1, and the remaining portion is placed under node-hdd_1_n1, ensuring that the difference in the number of disks under node-hdd_1 and node-hdd_1_n1 does not exceed 1. Figure 8 , Figure 8 A schematic diagram of expanding the storage pool under the third unequal distribution case provided for an embodiment of the present invention: node01-hdd_1 already has disks 1, 2 and 3, which belong to NUMA node0; node01-hdd_1_n1 already has disks 4 and 5, which belong to NUMA node1, and 6 belongs to NUMA node0; 8 disks are selected for expansion, of which a, b and c all belong to NUMA node0, and x, y, z, m and n belong to NUMA node1. Since the number of disks under the newly expanded NUMA node0 is two less than that under NUMA node1, in order to ensure balance, disk m under NUMA node1 needs to be expanded to node01-hdd_1. After the expansion is completed, node01-hdd_1 and node01-hdd_1_n1 both have disks under NUMA node0 and disks under NUMA node1.

[0090] Step 3: When only expansion disks are selected from one of the non-uniform memory access nodes, the number of selected expansion disks is averaged to obtain multiple average expansion disk groups, and each average expansion disk group is allocated to each virtualization node.

[0091] It should be noted that although the above process is exemplified by two virtual nodes and two non-uniform memory access nodes, in actual application, the number of virtualization nodes and the number of non-uniform memory access nodes can be more, and the specific division method is the same. For example, when there are 2 virtualization nodes and 3 non-uniform memory access nodes, an equal number of disks can be selected from the 3 non-uniform memory access nodes to create or expand the storage pool, so that the 3 equal disks are allocated to the 3 virtualization nodes. Or when the number of disks selected from the 3 non-uniform memory access nodes is 3, 2, and 1 respectively. At this time, it is determined to move a disk from the virtualization node with 3 disks to the virtualization node with 1 disk. It can be understood that (3+2+1) / 3=2, which means that there should be 2 disks under each virtualization node, and only 1 disk needs to be moved at this time.

[0092] It should be further explained that, assuming that node-hdd_1 and node-hdd_1_n1 both contain disks under NUMAnode0 and disks under NUMA node1, it is only necessary to ensure that the difference in the number of disks under node-hdd_1 and node-hdd_1_n1 does not exceed 1 after expansion.

[0093] A storage pool creation method provided by an embodiment of the present invention may include: S101, virtualizing storage nodes to obtain a set number of virtualized nodes; wherein the set number is greater than 1; S102, determining non-uniform memory access nodes corresponding to the virtualized nodes; S103, allocating disks to each virtualized node using a disk allocation method according to the disks corresponding to each non-uniform memory access node, to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualized node be 1, and minimizes the number of disks across nodes. The present invention virtualizes the storage nodes so that one storage node corresponds to multiple virtualized nodes, so that under the "same" data redundancy strategy, the maximum number of allowed failed disks becomes larger (for example, compared with a 2+1 erasure storage pool that only allows one hard disk to fail, the redundancy strategy of the virtualized storage pool becomes 4+2, and the 4+2 redundancy strategy allocates data according to the hard disks. It uses three nodes as six nodes, and each node selects two hard disks, so that it can allow two nodes to have one hard disk failure respectively). When determining the disks corresponding to the virtualized nodes, the maximum difference in the number of disks corresponding to the virtualized nodes is determined to be 1, and the number of disks across nodes is minimized, thereby reducing cross-node data transmission while ensuring the balance of the storage pool, and improving the overall performance of the storage pool.

[0094] In order to make the present invention easier to understand, please refer to Fig. 9 , Fig. 9 The example flow chart of the second storage pool creation process provided by the embodiment of the present invention may specifically include:

[0095] S301, determining a NUMA node corresponding to each disk node, and performing visualization processing on the disks under each NUMA node, so as to select a disk for each virtualization node according to the visualization view.

[0096] The NUMA node in this embodiment corresponds to the non-uniform memory access node mentioned above.

[0097] S302, virtualize each physical node to obtain a set number of virtualized nodes; wherein the set number is 2.

[0098] S303: Determine the NUMA node corresponding to each virtualization node.

[0099] S304: When the same number of disks is selected for each NUMA node, a first disk group and a second disk group with the same number of disks are obtained; the first disk group and the second disk group are respectively allocated to each virtualization node.

[0100] When selecting disks to create a storage pool, this embodiment groups the disks according to the NUMA to which the disks belong. For example, if NUMA node0 and NUMA node1 select the same number of disks or the number of disks differs by no more than 1, the disks under NUMA node0 are uniformly placed under the first virtual node of the two virtual nodes virtualized from one physical node, that is, node-hdd_1; and the disks under NUMA node1 are uniformly placed under the second virtual node of the two virtual nodes virtualized from one physical node, that is, node-hdd_1_n1.

[0101] S305, when unequal amounts of disks are selected for each virtualization node and the difference between the first number of disks and the second number of disks is greater than 1, the number of mobile disks is determined based on the first number of disks and the second number of disks, the disks with the number of mobile disks are taken out from the disk group including the first number of disks, added to the disk group with the second number of disks, and the moved disk group is allocated to the corresponding virtualization node.

[0102] In this embodiment, the difference value greater than 1 may be 2, 3, etc. In this embodiment, the number of disks to be taken out is set to x = (nm) / 2. For example, when n is 4 and m is 2, the number of disks to be taken out is set to 1. In this embodiment, if the difference between the selected disks under NUMA node0 and NUMA node1 is more than 2, the excess part is evenly distributed to the two virtualization nodes. For example, if 3 disks are selected under NUMA node0 and 5 disks are selected under NUMA node1, the 3 disks under NUMA node0 and 1 disk under NUMA node1 are placed under node-hdd_1, and the remaining 4 disks under NUMA node1 are placed under node-hdd_1_n1.

[0103] S306, when only the disks under one of the NUMA nodes are selected, all the disks are evenly distributed to each NUMA node, and the disks under each NUMA node are respectively distributed to the virtualization nodes.

[0104] When the storage pool needs to be expanded, this embodiment first determines whether the existing disks in the storage pool are allocated according to NUMA. If not, the newly expanded disks are randomly and evenly distributed to different virtual nodes. If the original disks have disks under a virtual node that belong to the same NUMA, the expansion should try to ensure that the disks allocated to the virtual node belong to the same NUMA as the original disks. For example, if all the disks under node-hdd_1 belong to NUMA node0, the newly expanded disks that belong to NUMA node0 should be placed under node-hdd_1. After allocation according to the above steps, if the difference between the number of disks under node-hdd_1 and node-hdd_1_n1 exceeds 2, the extra disks under the node with more disks are evenly distributed to the two nodes. The above allocation principle: on the premise of ensuring that the number of disks under the two virtual nodes does not exceed 2, try to allocate the disks to different virtual nodes according to the NUMA to which the disks belong, so as to maximize the read and write performance of the storage pool.

[0105] When creating and expanding a storage pool, the embodiment of the present invention fully utilizes the characteristic that a processor in a NUMA architecture can access its local memory faster than accessing the memory of other processors in the system while ensuring the balance of the storage pool. When allocating disks, the disks are evenly allocated to two virtual nodes virtualized from one node according to the NUMA nodes to which they belong, thereby reducing cross-node data transmission and improving the overall performance of the storage pool.

[0106] The following is an introduction to a storage pool creation device provided in an embodiment of the present invention. The storage pool creation device described below and the storage pool creation method described above can be referenced to each other.

[0107] Fig.10 A schematic diagram of a storage pool creation device provided in an embodiment of the present invention may include:

[0108] A virtualization node determination module 100 is used to virtualize the storage nodes to obtain a set number of virtualization nodes; wherein the set number is greater than 1;

[0109] A corresponding relationship determination module 200, used to determine a non-uniform memory access node corresponding to a virtualized node;

[0110] The storage pool creation module 300 is used to allocate disks to each virtualization node according to the disks corresponding to each non-uniform memory access node using a disk allocation method to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualization node be 1 and minimizes the number of disks across nodes.

[0111] Further, based on any of the above embodiments, the storage pool creation module 300 may include:

[0112] An equal-number disk group determination unit is used to determine, based on the disks corresponding to the non-uniform memory access nodes, to select equal-number disks from each non-uniform memory access node to obtain a plurality of equal-number disk groups;

[0113] The first disk allocation unit is used to allocate each equal-capacity disk group to a virtualization node corresponding to the non-uniform memory access node.

[0114] Further, based on any of the above embodiments, the storage pool creation module 300 may include:

[0115] A selected disk quantity determination unit, used to determine the number of disks selected under the first non-uniform memory access node as a first number, and determine the number of disks selected under the second non-uniform memory access node as a second number;

[0116] a target movement number determination unit, configured to determine the target movement number according to the first number and the second number when it is determined that the first number is greater than the sum of the second number and 1, and to determine to select the target movement number of disks from the first number of disks under the first non-uniform memory access node and move them to the second non-uniform memory access node; wherein the calculation formula of the target movement number h is h=(nm) / 2, n is the first number, and m is the second number;

[0117] A disk group determination unit, configured to determine a disk group corresponding to a first non-uniform memory access node and a disk group corresponding to a second non-uniform memory access node according to the target movement quantity of the movement; wherein the disk group corresponding to the first non-uniform memory access node is a=n-(nm) / 2, and the disk group corresponding to the second non-uniform memory access node is b=m+(nm) / 2;

[0118] The second disk allocation unit is used to allocate the disk group corresponding to the first non-uniform memory access node and the disk group corresponding to the second non-uniform memory access node to the virtualization node corresponding to each non-uniform memory access node respectively.

[0119] Further, based on any of the above embodiments, the storage pool creation module 300 may include: equally dividing all disks to obtain equally divided disk groups;

[0120] The third disk allocation unit is used to allocate each equally divided disk group to the virtualization node corresponding to each non-uniform memory access node to obtain the target storage pool.

[0121] Further, based on any of the above embodiments, the storage pool creation device may further include:

[0122] A first expansion module, configured to expand the capacity of each equal number of disks to a virtualization node corresponding to each non-uniform memory access node when the number of expansion disks selected from the non-uniform memory access node is the same, for expansion;

[0123] An expansion quantity determination module is used to determine the number of mobile expansion disks selected from the non-uniform memory access node with the first expansion quantity according to the first expansion quantity and the second expansion quantity when the number of expansion disks selected from each non-uniform memory access node is inconsistent, and the number of expansion disks selected from the two non-uniform memory access nodes is respectively the first expansion quantity and the second expansion quantity; wherein the first expansion quantity is greater than the second expansion quantity, and the number of mobile expansion disks o=(pq) / 2, p is the first expansion quantity, and q is the second expansion quantity;

[0124] The second expansion module is used to determine to select the mobile expansion disk quantity block expansion disk from the non-uniform memory access node corresponding to the first expansion quantity, move it to the non-uniform memory access node corresponding to the second expansion quantity, and obtain the first expansion disk group corresponding to the first virtualization node and the second expansion disk group corresponding to the second virtualization node;

[0125] The third expansion module is used to average the number of selected expansion disks when expansion disks are selected only from one of the non-uniform memory access nodes to obtain multiple average expansion disk groups, and allocate each average expansion disk group to each virtualization node.

[0126] Further, based on any of the above embodiments, the virtualization node determination module 100 may include:

[0127] The virtualization node determination unit is used to perform virtualization processing on each storage node to obtain two virtualization nodes corresponding to each storage node.

[0128] Further, based on any of the above embodiments, when the redundancy strategy of the target storage pool is determined to be an erasure pool, the redundancy strategy is determined to be 2x+2y; wherein x is the number of data blocks when virtualization is not performed, and y is the number of check codes when virtualization is not performed.

[0129] It should be noted that the order of the modules and units in the above storage pool creation device can be changed without affecting the logic.

[0130] Fig.10 The description of the features in the corresponding embodiments can be found in Fig.10 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.

[0131] A storage pool creation device provided by an embodiment of the present invention may include: a virtualization node determination module 100, used to virtualize storage nodes to obtain a set number of virtualization nodes; wherein the set number is greater than 1; a correspondence determination module 200, used to determine the non-uniform memory access node corresponding to the virtualization node; a storage pool creation module 300, used to allocate a disk to each virtualization node according to the disk corresponding to each non-uniform memory access node using a disk allocation method to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualization node be 1 and minimizes the number of disks across nodes. The present invention virtualizes the storage node so that one storage node corresponds to multiple virtualized nodes, so that under the "same" data redundancy strategy, the maximum number of allowed failed disks becomes larger (for example, compared with a 2+1 erasure storage pool that only allows one hard disk to fail, the redundancy strategy of the virtualized storage pool becomes 4+2, and the 4+2 redundancy strategy allocates data according to the hard disks. It uses three nodes as six nodes, and each node selects two hard disks, so that it can allow two nodes to have one hard disk failure respectively). When determining the disk corresponding to the virtualized node, the maximum difference in the number of disks corresponding to the virtualized node is determined to be 1, and the number of disks corresponding to the virtualized node that belongs to the non-uniform memory access node corresponding to the disk is maximized, thereby reducing cross-node data transmission and improving the overall performance of the storage pool while ensuring the balance of the storage pool.

[0132] A storage pool creation device provided by an embodiment of the present invention is introduced below. The storage pool creation device described below and the storage pool creation method described above can refer to each other.

[0133] Fig.11 A schematic diagram of the structure of a storage pool creation device provided by an embodiment of the present invention, such as Fig.11 As shown, the storage pool creation device includes: a memory 60 for storing a computer program;

[0134] The processor 61 is used to implement the steps of the storage pool creation method in the above embodiment when executing a computer program.

[0135] The storage pool creation provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0136] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0137] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, the relevant steps of the storage pool creation method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include, but is not limited to, data required for storage pool creation, etc.

[0138] In some embodiments, the storage pool creation device may further include a display screen 62 , an input and output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .

[0139] Those skilled in the art will understand that Fig.11 The structure shown in the figure does not constitute a limitation on the storage pool creation device, and may include more or less components than those shown in the figure.

[0140] It is understandable that if the storage pool creation method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the current technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0141] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the storage pool creation method described above are implemented.

[0142] The above is a detailed introduction to a storage pool creation method provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0143] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0144] The above is a detailed introduction to a storage pool creation method, device, equipment and computer-readable storage medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A storage pool creation method, characterized in that: include: Virtualizing the storage nodes to obtain a set number of virtualized nodes; wherein the set number is greater than 1; Determine a non-uniform memory access node corresponding to the virtualization node; According to the disks corresponding to each non-uniform memory access node, a disk is allocated to each virtualization node using a disk allocation method to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualization node be 1 and minimizes the number of disks across nodes.

2. The storage pool creation method according to claim 1, characterized in that: When equal allocation is determined, allocating disks to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool includes: According to the disks corresponding to the non-uniform memory access nodes, it is determined to select an equal number of disks from each non-uniform memory access node to obtain a plurality of equal number of disk groups; Allocate each equal disk group to a virtualization node corresponding to the non-uniform memory access node.

3. The storage pool creation method according to claim 1, characterized in that: When it is determined that the disks are not equally allocated and the selected disk exists under each non-uniform memory access node, the method allocates a disk to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool, including: Determine that the number of disks selected under the first non-uniform memory access node is a first number, and determine that the number of disks selected under the second non-uniform memory access node is a second number; When it is determined that the first number is greater than the sum of the second number and 1, a target movement number is determined according to the first number and the second number, and the target movement number of disks is selected from the first number of disks under the first non-uniform memory access node and moved to the second non-uniform memory access node; wherein the calculation formula of the target movement number h is h=(nm) / 2, n is the first number, and m is the second number; Determine the disk group corresponding to the first non-uniform memory access node and the disk group corresponding to the second non-uniform memory access node according to the target movement quantity of the movement; wherein the disk group corresponding to the first non-uniform memory access node is a=n-(nm) / 2, and the disk group corresponding to the second non-uniform memory access node is b=m+(nm) / 2; The disk group corresponding to the first non-uniform memory access node and the disk group corresponding to the second non-uniform memory access node are respectively allocated to the virtualization node corresponding to each non-uniform memory access node.

4. The storage pool creation method according to claim 1, characterized in that: When it is determined that the disks are not equally allocated and all the disks belong to one non-uniform memory access node, the method allocates disks to each virtualization node using a disk allocation method according to the disks corresponding to the non-uniform memory access nodes to obtain a target storage pool, including: Divide all disks equally to obtain an evenly distributed disk group; Each equally-divided disk group is allocated to a virtualization node corresponding to each non-uniform memory access node to obtain the target storage pool.

5. The storage pool creation method according to any one of claims 1 to 4, characterized in that: After allocating a disk to each virtualization node using a disk allocation method according to the disks corresponding to each non-uniform memory access node to obtain a target storage pool, the method further includes: When the number of expansion disks selected from the non-uniform memory access nodes is the same, each equal amount of disks is expanded to the virtualization node corresponding to each non-uniform memory access node for expansion; When the number of expansion disks selected from each non-uniform memory access node is inconsistent, the number of expansion disks selected from the two non-uniform memory access nodes is respectively the first expansion number and the second expansion number, and the number of mobile expansion disks selected from the non-uniform memory access node whose disk number is the first expansion number is determined according to the first expansion number and the second expansion number; wherein the first expansion number is greater than the second expansion number, and the number of mobile expansion disks o=(pq) / 2, where p is the first expansion number and q is the second expansion number; Determine to select the mobile expansion disk quantity block expansion disk from the non-uniform memory access node corresponding to the first expansion quantity, move it to the non-uniform memory access node corresponding to the second expansion quantity, and obtain a first expansion disk group corresponding to the first virtualization node and a second expansion disk group corresponding to the second virtualization node; When the expansion disk is selected from only one of the non-uniform memory access nodes, the number of the selected expansion disks is averaged to obtain multiple average expansion disk groups, and each average expansion disk group is allocated to each virtualization node.

6. The storage pool creation method according to claim 1, characterized in that: The virtualizing the storage nodes to obtain a set number of virtualized nodes includes: Each storage node is virtualized to obtain two virtualized nodes corresponding to each storage node.

7. The storage pool creation method according to claim 6, characterized in that: Also includes: When it is determined that the redundancy strategy of the target storage pool is an erasure pool, the redundancy strategy is determined to be 2x+2y; wherein x is the number of data blocks when virtualization is not performed, and y is the number of check codes when virtualization is not performed.

8. A storage pool creation device, characterized in that: include: A virtualization node determination module, used to virtualize the storage nodes to obtain a set number of virtualization nodes; wherein the set number is greater than 1; A corresponding relationship determination module, used to determine a non-uniform memory access node corresponding to a virtualization node; The storage pool creation module is used to allocate disks to each virtualization node according to the disks corresponding to each non-uniform memory access node using a disk allocation method to obtain a target storage pool; wherein the disk allocation method is a method that makes the maximum difference in the number of disks corresponding to each virtualization node be 1 and minimizes the number of disks across nodes.

9. A storage pool creation device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the storage pool creation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the storage pool creation method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • OpenStack virtual machine memory thermal expansion method

    CN110750336A

  • Cluster storage pool creation method

    CN112905118A

  • Object storage system, object data read-write method, medium and device

    CN116069563A

  • Migrating virtual resources between non-uniform memory access (NUMA) nodes

    US11625175B1

  • System and method for managing distribution of virtual memory over multiple physical memories

    US20190278715A1