Cluster capacity reduction risk prompting method and device, equipment and medium

By calculating the expected data volume after scaling down in a distributed storage cluster and displaying risk warnings, the capacity risk problem caused by cluster scaling down is solved, improving operational convenience and reducing maintenance costs.

CN115185456BActive Publication Date: 2026-04-24JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN INSPUR DATA TECH CO LTD
Filing Date
2022-06-29
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In a distributed storage cluster, cluster downsizing may result in insufficient remaining capacity to meet the required capacity, leading to downsizing risks and increased maintenance costs.

Method used

By obtaining the total data volume of the storage cluster and the preset data distribution rules, the expected data volume of the object storage resources after scaling down is calculated, and it is determined whether it is less than the total capacity. If it is less, a preset scaling down risk warning message is displayed to avoid unnecessary cluster expansion operations.

Benefits of technology

By assessing capacity risks before scaling down the cluster, unnecessary expansion operations are avoided, operational convenience is improved, and maintenance costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115185456B_ABST
    Figure CN115185456B_ABST
Patent Text Reader

Abstract

The application discloses a cluster capacity reduction risk prompting method and device, equipment and medium, and relates to the technical field of computers. The method comprises the following steps: acquiring the total data quantity of a storage pool in a current storage cluster and a preset data distribution rule corresponding to the storage pool; based on the total data quantity and the preset data distribution rule, calculating the predicted data quantity of an object storage resource in the storage pool after capacity reduction; judging whether the predicted data quantity is less than the total capacity of the object storage resource, and if so, displaying preset capacity reduction risk prompting information corresponding to the object storage resource. Before the cluster capacity reduction, the predicted data quantity of the object storage resource in the storage pool after capacity reduction is calculated. If the predicted data quantity is less than the total capacity of the object storage resource, preset capacity reduction risk prompting information corresponding to the object storage resource is displayed, and the cluster capacity reduction operation is avoided, so that the cost generated due to the risk of the cluster capacity reduction operation can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for alerting risks of cluster scaling down. Background Technology

[0002] Partition tolerance is the most important of the three elements of distributed systems. In distributed storage clusters, dynamic adjustment of storage media is a routine operation. If storage media is removed from the cluster, the cluster shrinks, and the remaining capacity of the storage cluster decreases. However, if the remaining capacity does not meet the required capacity, there is a risk of shrinkage, which may require related expansion operations. This greatly reduces the convenience and increases the maintenance cost.

[0003] In summary, reducing the costs incurred due to the risks associated with cluster scaling down is a problem that needs to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for alerting risks associated with cluster scaling down, which can reduce costs arising from the risks associated with cluster scaling down operations. The specific solution is as follows:

[0005] Firstly, this application discloses a method for alerting risks associated with cluster scaling down, including:

[0006] Obtain the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools;

[0007] Based on the total data volume and the preset data distribution rules, the expected data volume of object storage resources in the storage pool after scaling down is calculated;

[0008] Determine whether the estimated data volume is less than the total capacity of the object storage resource. If it is less, display a preset reduction risk warning message corresponding to the object storage resource.

[0009] Optionally, calculating the expected data volume of object storage resources in the storage pool after scaling down, based on the total data volume and the preset data distribution rules, includes:

[0010] The number of logical storage units of object storage resources in the storage pool after scaling down is calculated based on the preset data distribution rules.

[0011] The estimated data volume of the object storage resource after scaling down is calculated based on the total data volume and the number of logical storage units.

[0012] Optionally, calculating the number of logical storage units of object storage resources in the reduced-size storage pool based on the preset data distribution rules includes:

[0013] The number of logical storage units for object storage resources in the reduced-size storage pool is calculated based on the CRUSH rule.

[0014] Optionally, calculating the estimated data volume of the object storage resource after scaling down based on the total data volume and the number of logical storage units includes:

[0015] Based on the total data volume, the number of logical storage units, and the crush rule, the expected data volume of the object storage resource after shrinking is calculated using a preset shrinking formula.

[0016] Optionally, before calculating the expected data volume of the object storage resource after scaling down using a preset scaling-down formula, the method further includes:

[0017] Create the preset shrinkage formula with the total data volume, the number of logical storage units, and the crush rule as independent variables.

[0018] Optionally, determining whether the estimated data volume is less than the total capacity of the object storage resources includes:

[0019] The estimated data volume in the estimated capacity table is determined sequentially to be less than the total capacity of the object storage resources.

[0020] Optionally, before sequentially determining whether the estimated data volume in the estimated capacity table is less than the total capacity of the object storage resources, the method further includes:

[0021] Obtain the total capacity of the object storage resources and generate an estimated capacity table based on the expected data volume.

[0022] Secondly, this application discloses a cluster scaling-down risk warning device, comprising:

[0023] The rule acquisition module is used to acquire the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools;

[0024] The scaling-down pre-calculation module is used to calculate the expected data volume of object storage resources in the storage pool after scaling down, based on the total data volume and the preset data distribution rules.

[0025] The risk warning module is used to determine whether the expected data volume is less than the total capacity of the object storage resource. If it is less, a preset reduction risk warning message corresponding to the object storage resource is displayed.

[0026] Thirdly, this application discloses an electronic device, including:

[0027] Memory, used to store computer programs;

[0028] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed cluster scaling-down risk warning method.

[0029] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed cluster scaling-down risk warning method.

[0030] As can be seen, this application obtains the total data volume of the storage pool in the current storage cluster and the preset data distribution rules corresponding to the storage pool; based on the total data volume and the preset data distribution rules, it calculates the expected data volume of the object storage resources in the storage pool after scaling down; it determines whether the expected data volume is less than the total capacity of the object storage resources, and if it is less, it displays the preset scaling down risk warning information corresponding to the object storage resources. Therefore, before performing cluster scaling down, this application calculates the expected data volume of the object storage resources in the storage pool after scaling down based on the total data volume and the preset data distribution rules. If the expected data volume is less than the total capacity of the object storage resources, there is a corresponding cluster scaling down risk. Therefore, the preset scaling down risk warning information corresponding to the object storage resources is displayed to avoid subsequent cluster scaling down operations, thereby avoiding the need for subsequent cluster expansion operations due to the risk of cluster scaling down operations. This improves convenience and reduces the cost caused by the risk of cluster scaling down operations. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0032] Figure 1 This is a flowchart of a cluster scaling-down risk warning method disclosed in this application;

[0033] Figure 2 This application discloses a flowchart of a specific cluster scaling-down risk warning method.

[0034] Figure 3 This application discloses a flowchart of a specific cluster scaling-down risk warning method.

[0035] Figure 4 This is a schematic diagram of a specific cluster scaling-down risk warning method disclosed in this application;

[0036] Figure 5 This is a schematic diagram of a cluster scaling-down risk warning device disclosed in this application;

[0037] Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0039] Partition tolerance is the most important of the three elements of distributed systems. In distributed storage clusters, dynamic adjustment of storage media is a routine operation. If storage media is removed from the cluster, the cluster shrinks, and the remaining capacity of the storage cluster decreases. However, if the remaining capacity does not meet the required capacity, there is a risk of shrinkage, which may require related expansion operations. This greatly reduces the convenience and increases the maintenance cost.

[0040] Therefore, this application provides a cluster scaling-down risk warning scheme, which can reduce the costs incurred due to the risks of cluster scaling-down operations.

[0041] See Figure 1 As shown in the figure, this application discloses a cluster scaling-down risk warning device, including:

[0042] Step S11: Obtain the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools.

[0043] In this embodiment, it is understood that distributed storage can perform cluster scaling-down operations, such as fault disk replacement, batch disk replacement, and whole-node scaling-down. However, the current AS13000 does not have a method to predict whether a cluster scaling-down operation is recommended, meaning it cannot predict in advance whether there is a capacity risk associated with scaling-down. Therefore, the existence of capacity risk is only known after each cluster scaling-down operation, necessitating the termination of scaling-down or related cluster expansion operations. This is very inconvenient and significantly increases maintenance difficulty.

[0044] In this embodiment, the total data volume pool_total_byte of each storage pool in the current storage cluster and the preset data distribution rules corresponding to each storage pool can be obtained. In addition, the total capacity OSD_total_byte and the used capacity OSD_used_byte of object storage resources (i.e., OSD) in each storage pool can also be obtained.

[0045] Step S12: Based on the total data volume and the preset data distribution rules, calculate the expected data volume of object storage resources in the storage pool after scaling down.

[0046] In this embodiment, before performing cluster scaling down, the estimated data volume OSD_recovered_bytes of the corresponding object storage resources in each storage pool after scaling down is calculated based on the total data volume pool_total_bytes of each storage pool and the corresponding preset data distribution rules. It is important to note that a preset scaling down formula can be created in advance. For example, a preset scaling down formula may use the total data volume pool_total_bytes and the preset data distribution rules as independent variables. Therefore, by inputting the obtained total data volume pool_total_bytes and the preset data distribution rules into the preset scaling down formula, the estimated data volume OSD_recovered_bytes of the object storage resources can be obtained before performing the corresponding cluster scaling down operation.

[0047] Step S13: Determine whether the expected data volume is less than the total capacity of the object storage resource. If it is less, display the preset reduction risk warning information corresponding to the object storage resource.

[0048] In this embodiment, after calculating the estimated data volume OSD_recovered_byte of the object storage resource, since the estimated data volume OSD_recovered_byte of the object storage resource corresponds to the number of storage pools (i.e., if there are multiple storage pools, then the estimated data volume is also multiple), a mapping relationship between the estimated data volume and the object storage resource and storage pools can be created to obtain an estimated capacity statistics table. The table is then iterated to determine the numerical relationship between each estimated data volume and the total capacity of the object storage resource. If the estimated data volume is less than the total capacity of the object storage resource, it indicates that if a cluster scaling-down operation corresponding to that object storage resource is performed, the scaled-down capacity (i.e., the estimated data volume) will not meet the current actual required capacity (i.e., the total capacity of the object storage resource). Therefore, a capacity risk will occur. In this case, a preset scaling-down risk warning message corresponding to the object storage resource can be displayed on the preset interface. For example, the preset scaling-down risk warning message could be "If this cluster scaling-down operation is performed, the scaled-down capacity will be less than the current actual required capacity. It is recommended to stop this cluster scaling-down operation." This allows users to be aware of the potential capacity risks associated with cluster scaling down, enabling them to choose to stop the operation and avoid the need for subsequent expansion. This effectively prevents the storage pool from exceeding its total capacity, reducing unnecessary maintenance and improving the stability and health of the distributed storage cluster. In contrast, if the expected data volume is not less than the total capacity of the object storage resources, then scaling down the cluster corresponding to those resources will result in a capacity that meets the current actual needs (i.e., the total capacity of the object storage resources). Therefore, there is no need to notify the user of any capacity risks, and the cluster scaling down operation can proceed by default.

[0049] As can be seen, this application obtains the total data volume of the storage pool in the current storage cluster and the preset data distribution rules corresponding to the storage pool; based on the total data volume and the preset data distribution rules, it calculates the expected data volume of the object storage resources in the storage pool after scaling down; it determines whether the expected data volume is less than the total capacity of the object storage resources, and if it is less, it displays the preset scaling down risk warning information corresponding to the object storage resources. Therefore, before performing cluster scaling down, this application calculates the expected data volume of the object storage resources in the storage pool after scaling down based on the total data volume and the preset data distribution rules. If the expected data volume is less than the total capacity of the object storage resources, there is a corresponding cluster scaling down risk. Therefore, the preset scaling down risk warning information corresponding to the object storage resources is displayed to avoid subsequent cluster scaling down operations, thereby avoiding the need for subsequent cluster expansion operations due to the risk of cluster scaling down operations. This improves convenience and reduces the cost caused by the risk of cluster scaling down operations.

[0050] See Figure 2 As shown in the figure, this application discloses a specific cluster scaling-down risk warning device, including:

[0051] Step S21: Obtain the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools.

[0052] For a more detailed explanation of step S21, please refer to the aforementioned disclosed embodiments, which will not be elaborated upon here.

[0053] Step S22: Calculate the number of logical storage units of object storage resources in the reduced-size storage pool based on the preset data distribution rules.

[0054] In this embodiment, calculating the number of logical storage units of object storage resources in the scaled-down storage pool based on the preset data distribution rule specifically includes: calculating the number of logical storage units of object storage resources in the scaled-down storage pool based on the CRUSH rule; and calculating the number of logical storage units (placement groups, i.e., PGs) num_pg_per_osd for each object storage resource in the scaled-down storage pool based on the preset data distribution rule, wherein the preset data distribution rule can be the CRUSH rule.

[0055] Step S23: Calculate the expected data volume of the object storage resource after scaling down based on the total data volume and the number of logical storage units.

[0056] In this embodiment, calculating the estimated data volume of the scaled-down object storage resource based on the total data volume and the number of logical storage units specifically includes: calculating the estimated data volume of the scaled-down object storage resource based on the total data volume, the number of logical storage units, and the crush rule, using a preset scaling-down formula. Specifically, the estimated data volume OSD_recovered_byte of the scaled-down object storage resource is calculated based on the total data volume pool_total_byte, the number of logical storage units num_pg_per_osd, and the crush rule crush_ratio, using a preset scaling-down formula.

[0057] In this embodiment, before calculating the expected data volume of the object storage resource after scaling down using the preset scaling-down formula, the method further includes: creating the preset scaling-down formula with the total data volume, the number of logical storage units, and the crush rule as independent variables. It is understood that the preset scaling-down formula can be created in advance, where the preset scaling-down formula can have the total data volume, the number of logical storage units, and the crush rule as independent variables. Therefore, when the total data volume, the number of logical storage units, and the crush rule are obtained, the expected data volume OSD_recovered_byte of each storage medium, i.e., the object storage resource, in each storage pool can be calculated before the cluster scaling-down operation. The method is simple and convenient. The preset scaling-down formula is as follows:

[0058] OSD_recovered_byte=pool_total_byte / pool_new_pgs*num_pg_per_osd*crush_ratio;

[0059] In the formula, OSD_recovered_byte represents the expected amount of data in the object storage resource, pool_total_byte represents the total amount of data in the storage pool, pool_new_pgs represents the newly added logical storage units in the storage pool, num_pg_per_osd represents the number of logical storage units, and crush_ratio represents the crush rule.

[0060] Step S24: Determine whether the expected data volume is less than the total capacity of the object storage resource. If it is less, display the preset reduction risk warning information corresponding to the object storage resource.

[0061] In this embodiment, after obtaining the estimated data volume OSD_recovered_byte for each storage medium (i.e., object storage resource) in each storage pool using a preset reduction formula, it is necessary to determine whether the estimated data volume OSD_recovered_byte for each storage medium (i.e., object storage resource) in each storage pool is not less than the total capacity OSD_total_byte of the corresponding object storage resource. If it is not less than, it means that the corresponding cluster reduction operation can be executed, and there is no capacity risk in the reduction, so there is no need to issue a warning. If it is less than, it means that the corresponding cluster reduction operation cannot be executed, and there is a capacity risk in the reduction. Therefore, the corresponding preset reduction risk warning information can be displayed on the preset interface so that the user can handle it according to the specific situation. Understandably, before determining whether the expected data volume is less than the total capacity of the object storage resources, a mapping relationship can be established between the expected data volume, the object storage resources, and the storage pool. Alternatively, a mapping relationship can be established between the expected data volume, the object storage resources, the storage pool, and the determination result. This mapping relationship can be created using the storage pool number and the object storage resource number, for example, the expected data volume of the seventh object storage resource in the third storage pool is greater than the total capacity of the object storage resources. Alternatively, a mapping relationship can be created using the storage pool identification information and the object storage resource identification information, for example, the expected data volume of object storage resource G in storage pool A is greater than the total capacity of the object storage resources.

[0062] Therefore, this application utilizes a distributed algorithm to estimate the hardware media of all storage pools within the current cluster before scaling down the distributed storage cluster, calculates the data allocation after scaling down, and determines whether it exceeds the total capacity of the storage media. This effectively avoids the risk of storage pool capacity exceeding the total capacity, reduces unnecessary maintenance measures, and thus improves the stability and health index of the distributed storage cluster, further enhancing the competitiveness of distributed storage.

[0063] See Figure 3 As shown in the figure, this application discloses a specific cluster scaling-down risk warning device, including:

[0064] Step S31: Obtain the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools.

[0065] For a more detailed explanation of step S31, please refer to the aforementioned disclosed embodiments, which will not be elaborated upon here.

[0066] Step S32: Based on the total data volume and the preset data distribution rules, calculate the expected data volume of object storage resources in the storage pool after scaling down.

[0067] In this embodiment, before calculating the expected data volume of object storage resources in the storage pool after scaling down based on the total data volume and the preset data distribution rules, the device to be scaled down can be obtained through the AS13000 management interface, and it can be determined whether it is storage pool scaling down or node scaling down. If it is storage pool scaling down, the calculation process should correspond to storage pool scaling down when calculating the expected data volume of object storage resources; if it is node scaling down, the calculation process should correspond to node scaling down when calculating the expected data volume of object storage resources.

[0068] Step S33: Sequentially determine whether the estimated data volume in the estimated capacity table is less than the total capacity of the object storage resource. If it is less, display the preset reduction risk warning information corresponding to the object storage resource.

[0069] In this embodiment, before sequentially determining whether the estimated data volume in the estimated capacity table is less than the total capacity of the object storage resources, the method further includes: obtaining the total capacity of the object storage resources and generating an estimated capacity table based on the estimated data volume. Since there may be multiple storage pools undergoing cluster scaling down, an estimated capacity table can be established. This table can contain a mapping relationship between the estimated data volume, object storage resources, and storage pools. This allows for iterative traversal to obtain the numerical relationship between the estimated data volume and the total capacity of each object storage resource in each storage pool. Based on this numerical relationship, object storage resources at risk of scaling down are identified, and corresponding cluster scaling down risk warnings are issued to prevent the cluster scaling down operation.

[0070] Therefore, this application generates an estimated capacity table before scaling down, and iterates through the estimated capacity table to obtain the numerical relationship between the expected data volume and the total capacity of the object storage resources, so as to estimate the data volume of each storage medium, i.e., the object storage resources, after scaling down, and thus realizes scaling down control.

[0071] The following is based on Figure 4The following is a flowchart illustrating a specific cluster scaling-down risk warning method, which will be used as an example to explain the cluster scaling-down risk warning method described in this application. The method obtains the total data volume (pool_total_byte) of the storage pools in the current storage cluster, as well as the preset data distribution rules corresponding to the storage pools. It can also obtain the total capacity (OSD_total_byte) and used capacity (OSD_used_byte) of object storage resources in each storage pool. It can be assumed that the object storage resources to be scaled down are deleted from the cluster so that the expected data volume of the object storage resources after cluster scaling-down, i.e., the crushmap, can be recalculated. The number of logical storage units of object storage resources in the reduced-size storage pool is calculated based on the preset data distribution rules. The preset data distribution rule corresponding to the storage pool can be a CRUSH rule, meaning the number of logical storage units of object storage resources in the reduced-size storage pool can be calculated based on the CRUSH rule. Then, the expected data volume of the reduced-size object storage resources is calculated based on the total data volume and the number of logical storage units. The expected data volume of the reduced-size object storage resources is calculated based on the total data volume, the number of logical storage units, and the CRUSH rule, using a preset reduction formula. A preset reduction formula with the total data volume, the number of logical storage units, and the CRUSH rule as independent variables can be created in advance. It is understood that the expected data volume of object storage resources in each storage pool can be calculated iteratively, one storage pool can be selected as the current storage pool, and an object storage resource can be selected from the current storage pool as the current object storage resource, and the expected data volume of the current object storage resource can be calculated. The process involves obtaining the total capacity of the object storage resources and generating an estimated capacity table based on the expected data volume. It then sequentially checks whether the expected data volume in the estimated capacity table is less than the total capacity of the object storage resources. If the expected data volume is not less than the total capacity of the object storage resources, the process proceeds to determine whether the expected data volume of the next object storage resource is less than the total capacity. If it is less, it indicates a capacity risk associated with scaling down the current object storage resource, and a corresponding warning is issued. This process continues until all object storage resources in all storage pools have been determined, at which point the process ends. This method effectively avoids the risk of storage pool capacity exceeding the total capacity during distributed storage scaling down, reducing unnecessary maintenance measures. This improves the stability and health of the distributed storage cluster, further enhancing the competitiveness of distributed storage.

[0072] See Figure 5 As shown in the figure, this application discloses a cluster scaling-down risk warning device, including:

[0073] Rule acquisition module 11 is used to acquire the total amount of data in the storage pool in the current storage cluster and the preset data distribution rules corresponding to the storage pool;

[0074] The shrinkage pre-calculation module 12 is used to calculate the expected data volume of object storage resources in the storage pool after shrinkage, based on the total data volume and the preset data distribution rules.

[0075] The risk warning module 13 is used to determine whether the expected data volume is less than the total capacity of the object storage resource. If it is less, a preset reduction risk warning message corresponding to the object storage resource is displayed.

[0076] In this embodiment, the rule acquisition module 11 can obtain the total data volume of each storage pool in the current storage cluster, the preset data distribution rules corresponding to each storage pool, and the total capacity and used capacity of object storage resources in each storage pool. In this embodiment, the scaling-down pre-calculation module 12 can calculate the number of logical storage units of the object storage resources in the scaled-down storage pool based on the preset data distribution rules, and calculate the expected data volume of the scaled-down object storage resources based on the total data volume and the number of logical storage units. The scaling-down pre-calculation module 12 can also calculate the number of logical storage units of the object storage resources in the scaled-down storage pool based on the CRUSH rule. Furthermore, the scaling-down pre-calculation module 12 can calculate the expected data volume of the scaled-down object storage resources based on the total data volume, the number of logical storage units, the CRUSH rule, and a preset scaling-down formula. Through the shrinkage pre-calculation module 12, before calculating the expected data volume of object storage resources in the storage pool after shrinkage based on the total data volume and the preset data distribution rules, the device to be shrunk can be obtained through the AS13000 management interface, and it can be determined whether it is storage pool shrinkage or node shrinkage. If it is storage pool shrinkage, the calculation process should correspond to storage pool shrinkage when calculating the expected data volume of object storage resources; if it is node shrinkage, the calculation process should correspond to node shrinkage when calculating the expected data volume of object storage resources. Through the shrinkage pre-calculation module 12, the expected data volume of the object storage resources after shrinkage can be calculated based on the total data volume, the number of logical storage units, and the crush rule, using a preset shrinkage formula. The pre-calculation module 12 can create a preset shrinkage formula with the total data volume, the number of logical storage units, and the crush rule as independent variables. Therefore, when the total data volume, the number of logical storage units, and the crush rule are obtained, the expected data volume of each storage medium (i.e., object storage resource) in each storage pool can be calculated before the cluster shrinkage operation. In this embodiment, the cluster shrinkage risk warning device can also sequentially determine whether the expected data volume in the estimated capacity table is less than the total capacity of the object storage resources; the cluster shrinkage risk warning device can also obtain the total capacity of the object storage resources and generate an estimated capacity table based on the expected data volume.The cluster scaling-down risk warning device can establish an estimated capacity table, which can include the mapping relationship between the expected data volume and object storage resources and storage pools. This allows for iterative traversal to obtain the numerical relationship between the expected data volume and the total capacity of each object storage resource in each storage pool. Based on this numerical relationship, object storage resources at risk of scaling down can be identified, and corresponding cluster scaling-down risk warnings can be issued to prevent the cluster scaling-down operation.

[0077] As can be seen, this application obtains the total data volume of the storage pool in the current storage cluster and the preset data distribution rules corresponding to the storage pool; based on the total data volume and the preset data distribution rules, it calculates the expected data volume of the object storage resources in the storage pool after scaling down; it determines whether the expected data volume is less than the total capacity of the object storage resources, and if it is less, it displays the preset scaling down risk warning information corresponding to the object storage resources. Therefore, before performing cluster scaling down, this application calculates the expected data volume of the object storage resources in the storage pool after scaling down based on the total data volume and the preset data distribution rules. If the expected data volume is less than the total capacity of the object storage resources, there is a corresponding cluster scaling down risk. Therefore, the preset scaling down risk warning information corresponding to the object storage resources is displayed to avoid subsequent cluster scaling down operations, thereby avoiding the need for subsequent cluster expansion operations due to the risk of cluster scaling down operations. This improves convenience and reduces the cost caused by the risk of cluster scaling down operations.

[0078] In some specific embodiments, the scaling-down pre-calculation module 12 includes:

[0079] The unit quantity calculation unit is used to calculate the number of logical storage units of object storage resources in the storage pool after scaling down, based on the preset data distribution rules.

[0080] A data volume calculation unit is used to calculate the expected data volume of the object storage resource after scaling down, based on the total data volume and the number of logical storage units.

[0081] In some specific embodiments, the unit for calculating the number of units includes:

[0082] The logical storage unit is used to calculate the number of logical storage units of object storage resources in the storage pool after scaling down, based on the CRUSH rule.

[0083] In some specific embodiments, the data volume calculation unit includes:

[0084] The estimated data volume calculation unit is used to calculate the estimated data volume of the object storage resource after scaling down based on the total data volume, the number of logical storage units, and the crush rule, using a preset scaling down formula.

[0085] In some specific embodiments, the cluster scaling-down risk warning device includes:

[0086] The shrinkage formula creation unit is used to create the preset shrinkage formula with the total data volume, the number of logical storage units and the crush rule as independent variables.

[0087] In some specific embodiments, the cluster scaling-down risk warning device includes:

[0088] The judgment unit is used to sequentially determine whether the estimated data volume in the estimated capacity table is less than the total capacity of the object storage resources.

[0089] In some specific embodiments, the cluster scaling-down risk warning device includes:

[0090] The estimated capacity table generation unit is used to obtain the total capacity of the object storage resources and generate an estimated capacity table based on the estimated data volume.

[0091] Furthermore, embodiments of this application also provide an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0092] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the following steps;

[0093] Obtain the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools;

[0094] Based on the total data volume and the preset data distribution rules, the expected data volume of object storage resources in the storage pool after scaling down is calculated;

[0095] Determine whether the estimated data volume is less than the total capacity of the object storage resource. If it is less, display a preset reduction risk warning message corresponding to the object storage resource.

[0096] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0097] The number of logical storage units of object storage resources in the storage pool after scaling down is calculated based on the preset data distribution rules.

[0098] The estimated data volume of the object storage resource after scaling down is calculated based on the total data volume and the number of logical storage units.

[0099] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0100] The number of logical storage units for object storage resources in the reduced-size storage pool is calculated based on the CRUSH rule.

[0101] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0102] Based on the total data volume, the number of logical storage units, and the crush rule, the expected data volume of the object storage resource after shrinking is calculated using a preset shrinking formula.

[0103] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0104] Create the preset shrinkage formula with the total data volume, the number of logical storage units, and the crush rule as independent variables.

[0105] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0106] The estimated data volume in the estimated capacity table is determined sequentially to be less than the total capacity of the object storage resources.

[0107] In some specific embodiments, the processor, by executing a computer program stored in the memory, may further include the following steps:

[0108] Obtain the total capacity of the object storage resources and generate an estimated capacity table based on the expected data volume.

[0109] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0110] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0111] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include operating system 221, computer program 222, and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0112] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the cluster scaling risk warning method disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0113] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed computer wake-up and interface encryption method.

[0114] For the specific steps of this method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0115] The various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts between the various embodiments, refer to each other. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to the method section.

[0116] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0117] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly in hardware, in a software module executed by a processor, or in a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0118] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0119] The present invention has provided a detailed description of a cluster scaling-down risk warning method, apparatus, device, and medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for alerting risks of cluster scaling down, characterized in that, include: Obtain the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools; Based on the total data volume and the preset data distribution rules, the expected data volume of object storage resources in the storage pool after scaling down is calculated; Determine whether the estimated data volume is less than the total capacity of the object storage resource; if it is less, display a preset reduction risk warning message corresponding to the object storage resource. The step of calculating the expected data volume of object storage resources in the storage pool after scaling down, based on the total data volume and the preset data distribution rules, includes: The number of logical storage units of the object storage resources in the storage pool after scaling down is calculated based on the CRUSH rule; the expected data volume of the object storage resources after scaling down is calculated based on the total data volume, the number of logical storage units, and the CRUSH rule, using a preset scaling down formula. Before calculating the expected data volume of the object storage resource after scaling down using a preset scaling-down formula, the method further includes: Create a preset shrinkage formula with the total data volume, the number of logical storage units, and the crush rule as independent variables; the preset shrinkage formula is: OSD_recovered_byte=pool_total_byte / pool_new_pgs num_pg_per_osd crush_ratio; Among them, OSD_recovered_byte represents the expected amount of data in the object storage resource, pool_total_byte represents the total amount of data in the storage pool, pool_new_pgs represents the newly added logical storage units in the storage pool, num_pg_per_osd represents the number of logical storage units, and crush_ratio represents the crush rule.

2. The cluster scaling-down risk warning method according to claim 1, characterized in that, The step of determining whether the estimated data volume is less than the total capacity of the object storage resources includes: The estimated data volume in the estimated capacity table is determined sequentially to be less than the total capacity of the object storage resources.

3. The cluster scaling-down risk warning method according to claim 2, characterized in that, Before sequentially determining whether the estimated data volume in the estimated capacity table is less than the total capacity of the object storage resources, the method further includes: Obtain the total capacity of the object storage resources and generate an estimated capacity table based on the expected data volume.

4. A cluster scaling-down risk warning device, characterized in that, The steps for implementing the cluster scaling-down risk warning method as described in any one of claims 1 to 3 include: The rule acquisition module is used to acquire the total amount of data in the storage pools of the current storage cluster and the preset data distribution rules corresponding to the storage pools; The scaling-down pre-calculation module is used to calculate the expected data volume of object storage resources in the storage pool after scaling down, based on the total data volume and the preset data distribution rules. The risk warning module is used to determine whether the expected data volume is less than the total capacity of the object storage resource. If it is less, a preset reduction risk warning message corresponding to the object storage resource is displayed.

5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the cluster scaling-down risk warning method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the steps of the cluster scaling-down risk warning method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Cluster storage capacity determination method, system and device and storage medium

    CN110222013A

  • Cluster-based capacity reduction processing method and device

    CN114356558A