Storage class determination method and apparatus, storage medium, and electronic device
Patent Information
- Application Number
- CN202510926500.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-07-04
AI Technical Summary
[0004]本申请实施例提供了一种存储类的确定方法、装置、存储介质及电子设备,以至少解决相关技术中无法根据性能和成本变化动态调整存储策略,导致存储资源的利用率低下和成本增加的问题
[0010]通过本申请,在接收存储请求的情况下,通过容器存储接口获取待响应所述存储请求的存储系统的参数信息,并基于所述参数信息确定不同存储类对应的第一评分;其中,所述参数信息至少包括:所述存储系统中不同存储类的性能参数、所述存储系统中不同存储类的成本参数;获取所述存储系统中可用存储空间对应的拓扑数据,并基于所述拓扑数据确定不同存储类对应的第二评分,其中,所述拓扑数据至少包括:所述可用存储空间支持的节点,所述节点与所述存储系统中不同存储类的对应关系;对所述第一评分和所述第二评分进行计算处理,得到综合评分;通过所述综合评分确定目标存储类。采用上述技术方案,解决了无法根据性能和成本变化动态调整存储策略,导致存储资源的利用率低下和成本增加的问题。进而,通过动态评估性能和成本,结合拓扑信息确定最优的存储类以适应业务需求与资源变化,从而减少了因性能和成本不匹配导致的资源浪费。
Smart Images

Figure CN120821433B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing and containerized storage management technology, and more specifically, to a method, apparatus, storage medium, and electronic device for determining storage class. Background Technology
[0002] With the rapid development of cloud computing and container technologies, the performance and cost of storage systems have become a key focus for enterprises, especially in multi-cloud environments where the management and scheduling of storage resources become more complex. In Kubernetes clusters, storage classes abstract the characteristics of storage resources, such as storage type, performance metrics, cost considerations, and topology constraints, allowing users to declare customized storage needs through Persistent Volume Claims (PVCs). However, in current implementations, there is a one-to-one correspondence between PVCs and Persistent Volumes (PVs), meaning each PVC can only be paired with a single PV. When the load surges or shrinks, while the Container Storage Interface (CSI) plugin can dynamically supply PVs based on the storage class's preset configuration, it cannot detect performance degradation or cost changes in the storage backend. This results in resource allocation strategies lagging behind actual needs, reducing the overall utilization of storage resources and increasing enterprise operating costs.
[0003] There is currently no effective solution to the problem that related technologies cannot dynamically adjust storage strategies according to changes in performance and cost, resulting in low utilization of storage resources and increased costs. Summary of the Invention
[0004] This application provides a method, apparatus, storage medium, and electronic device for determining storage types, in order to at least solve the problem in related technologies that the storage strategy cannot be dynamically adjusted according to changes in performance and cost, resulting in low utilization of storage resources and increased costs.
[0005] According to one embodiment of this application, a method for determining a storage class is provided, comprising: upon receiving a storage request, obtaining parameter information of a storage system to respond to the storage request through a container storage interface, and determining a first score corresponding to different storage classes based on the parameter information; wherein the parameter information includes at least: performance parameters of different storage classes in the storage system and cost parameters of different storage classes in the storage system; obtaining topology data corresponding to available storage space in the storage system, and determining a second score corresponding to different storage classes based on the topology data, wherein the topology data includes at least: nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system; calculating and processing the first score and the second score to obtain a comprehensive score; and determining a target storage class based on the comprehensive score.
[0006] According to another embodiment of this application, a storage class determination apparatus is provided, comprising: a first determination module, configured to, upon receiving a storage request, obtain parameter information of a storage system to respond to the storage request through a container storage interface, and determine a first score corresponding to different storage classes based on the parameter information; wherein the parameter information includes at least: performance parameters of different storage classes in the storage system and cost parameters of different storage classes in the storage system; a second determination module, configured to obtain topology data corresponding to available storage space in the storage system, and determine a second score corresponding to different storage classes based on the topology data, wherein the topology data includes at least: nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system; a calculation module, configured to calculate and process the first score and the second score to obtain a comprehensive score; and a third determination module, configured to determine a target storage class based on the comprehensive score.
[0007] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0008] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0009] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0010] This application addresses the following: Upon receiving a storage request, parameter information of the storage system responding to the request is obtained through a container storage interface. A first score is determined for different storage classes based on this parameter information. The parameter information includes at least performance parameters and cost parameters for different storage classes within the storage system. Topology data corresponding to available storage space in the storage system is obtained, and a second score is determined for different storage classes based on this topology data. The topology data includes at least the nodes supported by the available storage space and the correspondence between these nodes and different storage classes in the storage system. The first and second scores are then calculated to obtain a comprehensive score. Finally, the target storage class is determined based on this comprehensive score. This technical solution solves the problem of low storage resource utilization and increased costs caused by the inability to dynamically adjust storage strategies based on performance and cost changes. Furthermore, by dynamically evaluating performance and cost and combining topology information to determine the optimal storage class to adapt to business needs and resource changes, resource waste caused by performance-cost mismatch is reduced. Attached Figure Description
[0011] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a hardware structure block diagram of a server device for a method of determining a storage class according to an embodiment of this application;
[0013] Figure 2 This is a flowchart of a method for determining a storage class according to an embodiment of this application;
[0014] Figure 3 This is a schematic diagram of the core module and component layout of a storage-based intelligent switching system according to an embodiment of this application;
[0015] Figure 4 This is a schematic diagram of a CSI-based dynamic storage intelligent switching process according to an embodiment of this application;
[0016] Figure 5 This is a structural block diagram of a storage class determination device according to an embodiment of this application;
[0017] Figure 6 This is a computer system architecture block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0018] 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 this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0019] It should be noted that, in the description of this application, 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0020] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] As an optional implementation, the method embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a method of determining a storage class according to an embodiment of this application. For example... Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MPU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0022] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the storage class determination method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0023] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0024] This embodiment provides a method for determining the storage class. Figure 2 This is a flowchart of a method for determining a storage class according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0025] Step S202: Upon receiving a storage request, obtain parameter information of the storage system to respond to the storage request through the container storage interface, and determine a first score corresponding to different storage classes based on the parameter information; wherein, the parameter information includes at least: performance parameters of different storage classes in the storage system and cost parameters of different storage classes in the storage system.
[0026] Optionally, a Kubernetes cluster may require high-performance storage resources during peak periods, while accepting lower-performance but more cost-effective storage services during off-peak periods. The cluster connects multiple storage systems, each offering storage classes with different performance and cost profiles. For example, storage system A's high-performance storage class currently has 3000 I / O operations per second (IOPS) and a latency of 3ms; the low-cost storage class has 1000 IOPS and a latency of 10ms. The high-performance storage class costs 0.15 yuan / GB, while the low-cost storage class costs 0.05 yuan / GB. The CSI plugin collects these performance and cost parameters and calculates a first score for each storage class based on preset weights. For instance, if the performance weight is 0.7 and the cost weight is 0.3, the score for the high-performance storage class is (0.7*3000) + (0.3*0.15), while the score for the low-performance storage class is (0.7*1000) + (0.3*0.05). During peak periods, high-performance storage is prioritized based on performance requirements; while during off-peak periods, low-cost storage is selected based on cost optimization strategies, even if its performance is lower.
[0027] Step S204: Obtain topology data corresponding to the available storage space in the storage system, and determine the second score corresponding to different storage classes based on the topology data. The topology data includes at least: the nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system.
[0028] Optionally, a Kubernetes cluster distributed across different regions can be used. This cluster connects to multiple storage systems, and each system provides a storage class suitable for nodes within its respective region. This forms a storage class selection distribution map based on the geographical distribution of nodes and the topology information of the storage systems. If a node is located in the east-1a region and the storage volume supports both the east-1a and east-1b regions, then the storage class in the east-1a region is selected first (score +1). If a node is located in the west-2a region and the storage volume only supports the east-1a region, but the cross-Availability Zone (AZ) latency is 45ms, then that storage class is selected (score +0.6).
[0029] Step S206: Calculate and process the first score and the second score to obtain a comprehensive score;
[0030] Optionally, in a Kubernetes cluster, a node located in Availability Zone az-west-1a issues a storage service request. If the storage provider in the cluster offers high-performance storage class A1 (IOPS = 3000, latency = 1ms, unit price = 0.20 yuan / GB) in az-west-1a, then the performance and cost score of storage class A1 = (0.7 * IOPS) + (0.3 * unit price) = (0.7 * 3000) + (0.3 * 0.20) = 2100.06; according to the topology priority rule, the topology score of storage class A1 (located in az-west-1a) is calculated as 1. The weight ratios of the performance / cost score and the topology score in the comprehensive score are set as α and β, where α + β = 1. Assuming α = 0.8 and β = 0.2, then the overall score of A1 = (α * first score) + (β * second score) = (0.8 * 2100.06) + (0.2 * 1) = 1680.248.
[0031] Step S208: Determine the target storage class based on the comprehensive score.
[0032] The above method, upon receiving a storage request, obtains parameter information of the storage system to which the storage request is to be responded through the container storage interface, and determines a first score corresponding to different storage classes based on the parameter information. The parameter information includes at least: performance parameters and cost parameters of different storage classes in the storage system. Topology data corresponding to the available storage space in the storage system is obtained, and a second score corresponding to different storage classes is determined based on the topology data. The topology data includes at least: nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system. The first score and the second score are calculated to obtain a comprehensive score. The target storage class is determined based on the comprehensive score. This technical solution solves the problem of low storage resource utilization and increased costs caused by the inability to dynamically adjust storage strategies according to performance and cost changes. Furthermore, by dynamically evaluating performance and cost, and combining topology information to determine the optimal storage class to adapt to business needs and resource changes, resource waste caused by performance and cost mismatch is reduced.
[0033] In one exemplary embodiment, obtaining topology data corresponding to available storage space in a storage system and determining a second score for different storage classes based on the topology data includes: obtaining a preset scoring standard, wherein the scoring standard includes: a correspondence between multiple levels and configuration scores, the multiple levels including at least one of the following: a first level corresponding to storage classes where nodes are located in the same region, a second level corresponding to storage classes where nodes are not in the same region and the network latency between the nodes and the storage volumes corresponding to the storage classes is lower than a first preset threshold, and a third level corresponding to storage classes where nodes are not in the same region and the cost of the storage classes is lower than a second preset threshold; evaluating scores for different storage classes using the scoring standard to obtain multiple sub-scores; and summarizing the multiple sub-scores to obtain a second score.
[0034] Optionally, in a Kubernetes cluster, the requesting node N1 is located in the "az-west-1" availability zone. Storage system S1 provides storage class SC1 in "az-west-1", S2 provides storage class SC2 in "az-east-2", and S3 provides storage class SC3 in both "az-west-1" and "az-east-2", with a network latency of 40ms between it and N1. The price of storage class SC1 is 0.20 yuan / GB, SC2 is 0.25 yuan / GB, and SC3 is 0.15 yuan / GB. A preset three-tiered scoring standard is applied: Tier 1: Storage classes located in the same region as the node, configuration score increased by 1; Tier 2: Storage classes not in the same region as the node, but with network latency below the first preset threshold of 50ms, configuration score increased by 0.6; Tier 3: Storage classes not in the same region as the node and with a storage cost below the second preset threshold of 0.20 yuan / GB, configuration score increased by 0.3. SC1 and N1 are in the same region, so the first-tier score is increased by 1. SC2 is in a different region from N1, and its cost exceeds the second preset threshold (0.20 yuan / GB), so it does not receive a third-tier score. Its network latency is 80ms, exceeding the first preset threshold (40ms), so it also cannot obtain a second-tier score. SC3, based on S3's storage in "az-west-1", receives a first-tier score of 1; based on S3's storage in "az-east-2", its network latency is 40ms, so it receives a second-tier score of 0.6; and its cost is less than 0.20 yuan / GB, so it receives a third-tier score of 0.3. The final second score is 1 for SC1 (first-tier). The second score for SC2 is 0 (failing to meet any tier scoring criteria). SC3's second score = 1 (first-tier) + 0.5 (second-tier) + 0.3 (third-tier) = 1.8.
[0035] Through the above process, multi-level topology scoring criteria can effectively balance geographical distance, network latency, and cost, thereby optimizing resource allocation. This not only improves business continuity and response speed but also takes cost control into account and improves storage resource utilization.
[0036] In one exemplary embodiment, determining the target storage class through comprehensive scoring includes: recording the comprehensive score corresponding to each storage class in different storage classes and generating a comprehensive score list; sorting the comprehensive score list according to the score value to obtain a sorting result; and determining the target storage class based on the sorting result.
[0037] Optionally, in a Kubernetes cluster, the requesting node runs in the "us-west-1a" availability zone. Storage class SC1 is located in "us-west-1a" with a performance / cost score of 2000 and a topology score of 1. Storage class SC2 is located in "us-west-1b" with a performance / cost score of 1800 and a topology score of 0.6. Storage class SC3 is located in "us-east-1c" with a performance / cost score of 1900 and a topology score of 0.3, but at a lower cost. If the weights of the performance / cost score and the topology score are α = 0.8 and β = 0.2, respectively, where α + β = 1, then: SC1's overall score = α * performance / cost score + β * topology score = 1600.2. SC2's overall score = 0.8 * 1800 + 0.2 * 0.6 = 1440.12. SC3's overall score = 0.8 * 1900 + 0.2 * 0.3 = 1520.06. The resulting comprehensive score list is: {SC1:1600.2,SC2:1440.12,SC3:1520.06}. Sorted by numerical value, the ranking is: SC1>SC3>SC2. Based on this ranking, SC1 is determined as the target storage class.
[0038] In summary, the comprehensive score calculation in the above implementation combines real-time performance indicators and cost changes, enabling the selection process to dynamically adapt to changes in business needs and market conditions, ensuring optimal resource utilization. Furthermore, the scoring and ranking mechanism ensures that nodes in the Kubernetes cluster receive the most suitable and efficient storage services, promoting intelligent resource scheduling.
[0039] In one exemplary embodiment, determining the target storage class based on the sorting result includes: comparing each score value in the sorting result with a preset allowed storage score value; determining the storage class corresponding to multiple sorting results that are greater than the preset allowed storage score value as the target storage class; and determining the storage class corresponding to multiple sorting results that are less than or equal to the preset allowed storage score value as a non-target storage class.
[0040] Optionally, a suitable storage class needs to be selected for a node located in the "us-west-2a" availability zone within a Kubernetes cluster, with a preset allowable storage score of 1500. Storage class SC1: Located in the same availability zone as "us-west-2a", with a comprehensive score of 1900 (performance / cost assessment score 1800, topology score +100); Storage class SC2: Located in "us-west-2b", with network latency to the Pod below the first preset threshold, with a comprehensive score of 1600 (performance / cost assessment score 1500, topology score +100); Storage class SC3: Located in "us-east-1a", with cost below the second preset threshold, but higher cross-region network latency, with a comprehensive score of 1400 (performance / cost assessment score 1300, topology score +100). As can be seen, SC1's comprehensive score of 1900 is higher than the preset allowable storage score of 1500, therefore it is identified as the target storage class. SC2's comprehensive score of 1600 is also higher than the preset allowable storage score, and it is also considered a candidate for the target storage class. SC3's overall score of 1400 is lower than the preset allowed storage score, so it is determined to be a non-target storage class and is not considered.
[0041] In summary, the above implementation method, by pre-setting allowable storage scores, excludes storage classes that fall below the standard, ensuring that the selected storage classes not only have high geographical matching but also perform well in terms of performance and cost, meeting business needs and cost control strategies. This mechanism helps to prioritize the allocation of high-quality storage resources in resource-constrained environments, while avoiding the negative impacts that low-quality resources may bring, thereby improving the reliability and efficiency of the entire storage system.
[0042] In one exemplary embodiment, upon receiving a storage request, parameter information of the storage system to which the storage request is to be responded is obtained through a container storage interface, and a first score corresponding to different storage classes is determined based on the parameter information. This includes: weighting performance parameters and cost parameters using a first formula to obtain the first score, wherein the first formula is: Where P is the first score, w i Let w1 + w2 + ... + w be the weights of the i-th indicator, satisfying w1 + w2 + ... + w n =1,f i (V i ) represents the standardized value of the i-th indicator.
[0043] Optionally, a weighted score based on real-time performance metrics and cost can be calculated to determine a dynamic evaluation score, reflecting the overall performance of the storage class in terms of real-time performance, cost, etc.; the calculation formula is as follows:
[0044]
[0045] In the above formula: P is the dynamic evaluation score, w i Let w1 + w2 + ... + w be the weights of the i-th indicator, satisfying w1 + w2 + ... + w n =1,f i (V i Let be the standardized value of the i-th indicator, calculated using the following formula:
[0046]
[0047] In the above formula: V is the current value (such as IOPS, latency, cost), V min V max The maximum and minimum values are given by the formula above. It can be seen that during linear normalization, the higher the performance value, the higher the score, and the higher the cost, the lower the score.
[0048] The above implementation method quickly identifies the storage class that performs best in terms of performance and cost by calculating the first score. This enables the optimal storage resource to be selected quickly and accurately when a storage request is received, thereby improving the efficiency and effectiveness of storage allocation.
[0049] In an exemplary embodiment, after determining the target storage class through comprehensive scoring, the method further includes: creating a target storage volume corresponding to the target storage class to support data migration; upon completion of target storage volume creation, performing a first operation on the old storage volume through a container storage interface, wherein the old storage volume is bound to nodes under available storage space, the first operation being used to call a preset interface to pause data transmission of the old storage volume and obtain snapshot data corresponding to the current time point of the old storage volume; performing full data replication based on the execution result of the first operation; upon completion of full data replication, performing a second operation on the old storage volume at preset time intervals, wherein the second operation is used to determine that the old storage volume has changed after the first operation and generate incremental data; dividing the data into blocks based on the execution result of the second operation to obtain multiple incremental data blocks; replicating the multiple incremental data blocks to the target storage volume through a preset interface; replacing the old storage volume with the target storage volume that has completed data synchronization, and establishing a binding relationship between the target storage volume and the nodes.
[0050] Optionally, if the current storage volume PV1 under storage class SC1 is located in availability zone "us-west-2a", and the target storage class is determined to be SC2 based on the comprehensive score, the target storage volume PV2 corresponding to SC2 is dynamically created via the CSI interface by calling the storage backend service, ensuring that PV2 is in the correct availability zone "us-west-2a". Using CSI's snapshot function, a preset interface is called to pause PV1's input / output operations to capture all data states of PV1 at the snapshot time. A full data copy is performed based on the snapshot data of PV1, copying all data from the old storage volume PV1 to the target storage volume PV2, ensuring complete data migration. After the full data copy is complete, incremental data copy is performed at preset time intervals (e.g., every 5 minutes). The incremental snapshot function of CSI records the changes in PV1 since the last full copy; the incremental data is divided into blocks and copied to PV2 to ensure real-time data updates and migration efficiency. After completing the full and incremental data copying, PV1 is replaced with the data-synchronized PV2, and the binding relationship between PV2 and the node is established, completing the storage volume switch. During this process, the mount information of the old storage volume PV1 will be unmounted to avoid conflicts.
[0051] In summary, the above embodiments achieve efficient and smooth switching of dynamic storage resources through the creation of target storage volumes, snapshots, and incremental data replication, while ensuring business continuity and data consistency.
[0052] In one exemplary embodiment, after replacing the old storage volume with the target storage volume that has completed data synchronization and establishing a binding relationship between the target storage volume and the node, the method further includes: comparing the first hash value of the data in the old storage volume with the second hash value of the data in the target storage volume to obtain a comparison result; if the comparison result indicates that the first hash value and the second hash value are equal, confirming that no data loss occurred during the data migration process; if the comparison result indicates that the first hash value and the second hash value are not equal, confirming that data loss occurred during the data migration process.
[0053] Optionally, if the current used storage volume PV1 is located in the "eu-central-1a" availability zone, and the target storage volume PV2 is also located in "eu-central-1a", and the data migration is complete, calculate the hash value of each data file in PV1 and PV2 respectively. For example, the hash value of the file data1.txt is H1 on PV1 and H2 on PV2. Compare the hash values of the same file on the old storage volume PV1 and the target storage volume PV2. If H1 and H2 match, it indicates that the file has not changed during the data migration and the data is intact; conversely, if the hash values do not match, it means that the file may have been lost or corrupted during the migration.
[0054] In summary, the above implementation methods, through hash value comparison, can effectively verify data integrity during the data migration process, which is crucial for ensuring data security during the switching of storage classes.
[0055] To facilitate understanding of the implementation methods of this application, relevant scenarios are explained below, but these explanations do not limit the scope of this application.
[0056] In related technologies, within a Kubernetes cluster, storage volumes may only support access from nodes in a specific region (e.g., a storage volume is bound to a specific Availability Zone). If the storage class (SC) is not matched in conjunction with the topology information, a Pod may be scheduled to a node that cannot access the storage volume, causing cross-region network latency or access failure. Existing scheduling logic does not fully integrate the topology information of nodes and storage volumes, easily leading to high latency issues in cross-region access. Furthermore, when a storage volume needs to be replaced due to performance degradation or excessive cost, administrators must manually modify the SC of the PVC and rebind the PV, a time-consuming and error-prone process. Storage volume switching relies on manual operation or downtime migration, which cannot guarantee business continuity.
[0057] To avoid the aforementioned problems, as an optional implementation method, this application proposes a dynamic storage intelligent switching method based on CSI. This method first constructs a dynamic performance indicator library by real-time monitoring and collecting the input / output operations per second (IOPS), latency, and storage unit price of the storage backend, thereby automatically selecting the optimal storage controller (SC) to adapt to business needs and resource changes. Next, it constructs dynamic matching rules by combining the regional / AZ topology information of the node and storage volume. Based on the topology information of CSI, it prioritizes matching SCs with the same topology as the node, reducing cross-regional access latency. Then, it calculates the comprehensive score of the SC by combining performance / cost evaluation and topology matching rules, intelligently selecting the optimal SC. Finally, it utilizes the snapshot and incremental replication functions of CSI to achieve seamless data migration during the switching process, ensuring business continuity.
[0058] Optionally, Availability Zones (AZs) are a core concept in the cloud computing field, referring to independent fault domains within a specific area, consisting of physically independent infrastructure (such as power, network, cooling, etc.). Each Availability Zone communicates with each other through redundant network connections but is isolated from one another, ensuring that if one Availability Zone fails, other Availability Zones can still operate normally.
[0059] Optionally, Kubernetes (often simply called K8s) is an open-source container orchestration system used to automate the deployment, scaling, and management of containerized applications. A Kubernetes cluster is an infrastructure for centrally managing and scheduling containerized applications. It consists of a group of network-connected servers (physical or virtual machines) that work together to run and manage containerized applications.
[0060] Optionally, SC is a core mechanism in Kubernetes used to classify and manage storage resources. Its function is to provide differentiated services for storage needs in different scenarios through predefined storage configuration parameters.
[0061] Optionally, a PV is a block of storage in the cluster that can be dynamically created by the administrator using SC.
[0062] Optionally, a Pod is the smallest deployable unit of computing that can be created and managed in Kubernetes.
[0063] Optionally, a PVC is a mechanism in Kubernetes used to request storage resources, representing a user's request for storage.
[0064] Optionally, CSI is a standardized interface protocol used to decouple Kubernetes from underlying storage systems such as Network Attached Storage (NAS) and Storage Area Network (SAN, cloud storage), enabling storage vendors to provide storage services for containerized applications through a unified interface.
[0065] As an alternative implementation method, Figure 3 This is a schematic diagram of the core module and component layout of a storage-based intelligent switching system according to an embodiment of this application, mainly including the following three parts:
[0066] (1) Controller is the control plane component in the Kubernetes cluster, which includes several key sub-modules: performance / cost acquisition module 30, topology awareness module 32, dynamic matching module 34, CSI controller 36, K8s scheduler 38, and data migration module 40.
[0067] Optionally, a performance / cost acquisition module 30 is deployed on the Controller node to monitor and collect performance data and cost parameters of the storage backend in real time, including performance data of Pool1, Lun1, Pool2, and Lun2 of storage cluster A and cost information of Pool13 and Lun3 of storage cluster B, in order to build a dynamic performance indicator library.
[0068] Optionally, the topology-aware module 32 is deployed on the Controller node to parse the topology information of nodes and storage volumes in the Kubernetes cluster, including but not limited to the region and availability zone (AZ) information to which the node belongs, and to build dynamic matching rules to enable intelligent allocation of storage resources based on network topology characteristics.
[0069] Optionally, the dynamic matching module 34, integrated into the CSI plugin of the Controller node, is used to combine real-time performance / cost assessment results with topology information to automatically calculate the comprehensive score of each storage class and intelligently select the optimal SC to balance the needs of performance, cost and business continuity.
[0070] Optionally, the CSI controller 36 serves as a bridge between Kubernetes and external storage systems. It interacts with storage clusters A / B through the CSI standard interface to enable dynamic creation and release of PVs.
[0071] Optionally, the Kubernetes scheduler 38 is responsible for scheduling and deploying Pods across the entire cluster. Based on the scoring results and topology information provided by various modules, it determines which storage volume a Pod should be bound to, ensuring reasonable resource allocation. During storage volume switching, the Pod's PVC configuration is modified to automatically mount the new storage volume to the Pod and unmount the old storage volume, achieving a seamless switchover for services.
[0072] Optionally, the data migration module 40 is integrated into the CSI controller. It utilizes the snapshot and incremental replication functions of CSI to achieve uninterrupted data migration during storage volume switching, ensuring data integrity and business continuity.
[0073] (2) A Worker represents a worker node in a Kubernetes cluster. Each node runs a CSI Plugin Controller A and a CSI Plugin Controller B to handle storage requests on the local node. In addition, a Worker node hosts PVCs and Pods. A Pod is the smallest unit of computation for a user application, while a PVC is a Pod's declaration of storage resource requirements.
[0074] (3) Storage Clusters A and B. Storage clusters A and B are two different storage clusters. Each cluster has multiple storage pools and logical unit numbers (LUNs) representing different storage resources within the cluster. Cluster A includes Pool1 and Pool2, which contain Lun1 and Lun2 respectively; cluster B contains Pool13 and Lun3, representing different storage backend environments.
[0075] Optional, Figure 4This is a schematic diagram of a CSI-based dynamic storage intelligent switching process according to an embodiment of this application, specifically including the following steps:
[0076] Step 1: Collect real-time performance metrics and cost parameters of the storage backend through the CSI controller plugin, specifically including the following steps:
[0077] Step 1: Deploy a custom CSI controller plugin in the Kubernetes cluster. The CSI plugin calls the application programming interface (API) of the backend storage to obtain the performance parameters (such as IOPS, latency baseline) and cost parameters of the backend storage.
[0078] Step 2: Call the CSI interface to collect real-time performance metrics and cost data, and poll the storage backend interface every 5 minutes to update the performance and cost data.
[0079] Step 3: Calculate a dynamic evaluation score based on a weighted score calculated using real-time performance metrics and cost, reflecting the overall performance of the storage class in terms of real-time performance, cost, etc.; the calculation formula is:
[0080]
[0081] In the above formula: P is the dynamic evaluation score, w i Let w1 + w2 + ... + w be the weights of the i-th indicator, satisfying w1 + w2 + ... + w n =1,f i (V i Let be the standardized value of the i-th indicator, calculated using the following formula:
[0082]
[0083] In the above formula: V is the current value (such as IOPS, latency, cost), V min V max The maximum and minimum values are given by the formula above. It can be seen that during linear normalization, the higher the performance value, the higher the score, and the higher the cost, the lower the score.
[0084] Step 2: Parse the topology information of nodes and storage volumes, and construct storage class matching rules, which includes the following steps:
[0085] Step 1: Collect and extract region / AZ information from K8s node tags to generate node topology, and obtain the topology range supported by the storage volume through the CSI plugin interface.
[0086] Step 2: Construct topology matching rules. Set a priority strategy, prioritizing matching storage volumes in the same region / AZ as the node. If no match is found, select the storage volume in the nearest region and obtain the topology score T. An example of a priority rule design is shown below:
[0087] First priority: Match the storage class that is in the same AZ as the node (add 1 point to the score).
[0088] Second priority: Match storage classes that cross AZs but have a latency of <50ms (add 0.6 points to the score).
[0089] Third priority: Match storage classes that cross regions but have a cost below the threshold (add 0.3 points to the score).
[0090] Optionally, if the node is located in east-1a and the storage volume supports both east-1a and east-1b, the storage class of east-1a will be selected first (score +1). If the node is located in west-2a and the storage volume only supports east-1a, but the cross-AZ latency is 45ms, then this storage class will be selected (score +0.6).
[0091] Step 3: Dynamically adjust topology matching rules, and dynamically adjust priority weights according to business needs. For example, during peak periods, priority is given to matching within the same Availability Zone (AZ), while during off-peak periods, cross-AZ matching is allowed to reduce costs.
[0092] Step 4: Develop a load balancing strategy. If multiple storage volumes meet the topology requirements, select the optimal storage class based on a comprehensive performance / cost scoring model.
[0093] Step 3: Based on the dynamic evaluation results and topology matching rules, automatically match the optimal SC, which includes the following steps:
[0094] Step 1: Calculate the overall score for the storage class based on the dynamic evaluation model and topology score, combined with the business operation scenario, and select the optimal SC. The calculation formula is as follows:
[0095] S = α·P + β·T;
[0096] In the above formula, α and β represent the weight coefficients of each dimension, satisfying α+β=1, P is the weighted score based on performance and cost, and T is the topology score.
[0097] Step 2: Sort all storage classes from highest to lowest based on their overall score, and intelligently select the SC with the highest overall score as the default matching strategy.
[0098] Step 3: Continuously collect performance, cost, and topology data, and trigger a strategy re-evaluation once per hour.
[0099] Step 4: Utilize CSI snapshot and incremental replication technologies to achieve seamless migration of storage volumes during the switchover process, ensuring business continuity. This includes the following steps:
[0100] Step 1: Create a snapshot of the old storage volume through the CSI interface. When the snapshot is generated, the CSI plugin briefly freezes the input / output operations of the storage volume through the snapshot creation interface to capture the current data state, and then unfreezes the business traffic as the basis for data migration.
[0101] Step 2: Create a new PVC based on the selected optimal target SC as the migrated storage volume, mount the source snapshot to the target storage volume as the initial data copy, and perform a full copy.
[0102] Step 3: Generate incremental snapshots on the source storage volume at fixed time intervals (e.g., every 5 minutes) to record data changes since the last snapshot, and copy the data from the old storage volume to the new storage volume in blocks;
[0103] Step 4: After the data replication is complete, the Kubernetes scheduler modifies the Pod's PVC configuration, mounts the new storage volume to the Pod through the CSI plugin, and unmounts the old storage volume at the same time, achieving a seamless switchover.
[0104] Step 5: Compare the data hash values of the source storage volume and the target storage volume to ensure that the data is intact and without loss.
[0105] It should be noted that the weighting coefficients can be dynamically adjusted based on actual user needs and business scenarios. When the optimal SC (Search Engine Controller) fails, it automatically switches to the suboptimal SC, dynamically adjusting the topology weights.
[0106] In summary, by collecting and evaluating dynamic performance and cost parameters, and combining the CSI interface standard with real-time acquisition technology, this approach addresses the problem that traditional static evaluation cannot adapt to dynamic business needs. It employs topology information parsing and dynamic matching rule construction, combined with regional / AZ information and a weighted scoring model, to dynamically bind network topology characteristics with storage strategies, improving the intelligence level of storage resource allocation. By integrating dynamic data and topology rules, it achieves intelligent selection of storage classes, balancing performance, cost, and business continuity requirements. Based on CSI snapshots and incremental replication, it enables rapid data backup, recovery, and migration during PVC switching, achieving zero-downtime migration and ensuring business continuity.
[0107] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0108] This embodiment also provides a storage class determination system for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0109] Figure 5 This is a structural block diagram of a storage class determination device according to an embodiment of this application, such as... Figure 5 As shown, the device includes:
[0110] The first determining module 52 is used to, upon receiving a storage request, obtain parameter information of the storage system to respond to the storage request through a container storage interface, and determine a first score corresponding to different storage classes based on the parameter information; wherein, the parameter information includes at least: performance parameters of different storage classes in the storage system and cost parameters of different storage classes in the storage system;
[0111] The second determining module 54 is used to obtain topology data corresponding to the available storage space in the storage system, and determine a second score corresponding to different storage classes based on the topology data, wherein the topology data includes at least: the nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system;
[0112] Calculation module 56 is used to calculate and process the first score and the second score to obtain a comprehensive score;
[0113] The third determining module 58 is used to determine the target storage class through the comprehensive score.
[0114] Using the above-described apparatus, upon receiving a storage request, parameter information of the storage system to which the storage request is to be responded is obtained through the container storage interface, and a first score corresponding to different storage classes is determined based on the parameter information. The parameter information includes at least: performance parameters and cost parameters of different storage classes in the storage system. Topology data corresponding to the available storage space in the storage system is obtained, and a second score corresponding to different storage classes is determined based on the topology data. The topology data includes at least: nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system. The first and second scores are calculated to obtain a comprehensive score. The target storage class is determined based on the comprehensive score. This technical solution solves the problem of low storage resource utilization and increased costs caused by the inability to dynamically adjust storage strategies according to performance and cost changes. Furthermore, by dynamically evaluating performance and cost, and combining topology information to determine the optimal storage class to adapt to business needs and resource changes, resource waste caused by performance and cost mismatch is reduced.
[0115] In an exemplary embodiment, the second determining module is further configured to obtain a preset scoring standard, wherein the scoring standard includes: a correspondence between multiple levels and configuration scores, the multiple levels including at least one of the following: a first level corresponding to a storage class where the node is located in the same region, a second level corresponding to a storage class where the node is not in the same region and the network latency between the node and the storage volume corresponding to the storage class is lower than a first preset threshold, and a third level corresponding to a storage class where the node is not in the same region and the cost of the storage class is lower than a second preset threshold; using the scoring standard to evaluate the scores of different storage classes to obtain multiple sub-scores; and summarizing the multiple sub-scores to obtain a second score.
[0116] In an exemplary embodiment, the third determining module is further configured to record the comprehensive score corresponding to each storage class in different storage classes, generate a comprehensive score list; sort the comprehensive score list according to the score value to obtain a sorting result; and determine the target storage class based on the sorting result.
[0117] In an exemplary embodiment, the third determining module is further configured to compare each score value in the sorting results with a preset allowed storage score value; determine the storage class corresponding to multiple sorting results that are greater than the preset allowed storage score value as the target storage class; and determine the storage class corresponding to multiple sorting results that are less than or equal to the preset allowed storage score value as the non-target storage class.
[0118] In an exemplary embodiment, the first determining module is further configured to perform a weighted calculation on the performance parameters and cost parameters using a first formula to obtain a first score, wherein the first formula is: Where P is the first score, w i Let w1 + w2 + ... + w be the weights of the i-th indicator, satisfying w1 + w2 + ... + w n =1,f i (V i ) represents the standardized value of the i-th indicator.
[0119] In an exemplary embodiment, the apparatus further includes: a replication module, configured to: after determining the target storage class through a comprehensive score, create a target storage volume corresponding to the target storage class for supporting data migration; upon completion of the target storage volume creation, perform a first operation on the old storage volume through a container storage interface, wherein the old storage volume is bound to nodes under available storage space, the first operation being configured to call a preset interface to pause data transmission of the old storage volume and obtain snapshot data corresponding to the current time point of the old storage volume; perform full data replication based on the execution result of the first operation; upon completion of full data replication, perform a second operation on the old storage volume at preset time intervals, wherein the second operation is configured to determine that the old storage volume has changed after the first operation and generate incremental data; divide the data into blocks based on the execution result of the second operation to obtain multiple incremental data blocks; replicate the multiple incremental data blocks to the target storage volume through a preset interface; replace the old storage volume with the target storage volume that has completed data synchronization, and establish a binding relationship between the target storage volume and the nodes.
[0120] In one exemplary embodiment, the replication module further includes: a comparison unit, configured to, after replacing the old storage volume with the target storage volume that has completed data synchronization and establishing a binding relationship between the target storage volume and the node, compare the first hash value of the data in the old storage volume with the second hash value of the data in the target storage volume to obtain a comparison result; if the comparison result indicates that the first hash value and the second hash value are equal, confirm that no data loss occurred during the data migration process; if the comparison result indicates that the first hash value and the second hash value are not equal, confirm that data loss occurred during the data migration process.
[0121] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0122] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0123] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0124] Optionally, Figure 6 This is a computer system architecture block diagram of an electronic device according to an embodiment of this application. For example... Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM). The random access memory 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output interface 605 (I / O interface) is also connected to the bus 604.
[0125] The following components are connected to the input / output interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a local area network card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.
[0126] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0127] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0128] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0129] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0130] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0131] 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.
[0132] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0133] The foregoing has provided a detailed description of a storage class determination method, apparatus, storage medium, and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for determining a storage class, characterized in that, include: Upon receiving a storage request, the system obtains parameter information of the storage system that will respond to the storage request through the container storage interface, and determines a first score corresponding to different storage classes based on the parameter information; wherein, the parameter information includes at least: performance parameters of different storage classes in the storage system and cost parameters of different storage classes in the storage system; Obtain topology data corresponding to the available storage space in the storage system, and determine a second score corresponding to different storage classes based on the topology data. The topology data includes at least: the nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system. The first score and the second score are calculated and processed to obtain a comprehensive score; The target storage class is determined based on the comprehensive score. The step of obtaining topology data corresponding to available storage space in the storage system and determining a second score for different storage classes based on the topology data includes: obtaining a preset scoring standard, wherein the scoring standard includes a relationship between multiple levels and configuration scores, the multiple levels including at least one of the following: a first level corresponding to storage classes located in the same region as the node; a second level corresponding to storage classes not located in the same region as the node and where the network latency between the node and the storage volume corresponding to the storage class is lower than a first preset threshold; a third level corresponding to storage classes not located in the same region as the node and where the cost of the storage class is lower than a second preset threshold; evaluating the scores of the different storage classes using the scoring standard to obtain multiple sub-scores; and summarizing the multiple sub-scores to obtain the second score. The method further includes, after determining the target storage class through the comprehensive score, creating a target storage volume corresponding to the target storage class to support data migration; pausing data transmission of the old storage volume by calling a preset interface through the container storage interface, and obtaining snapshot data of the old storage volume at the pause time, wherein the old storage volume is bound to a node under the available storage space; after completing a full data copy based on the snapshot data, capturing the changed data of the old storage volume after the pause at preset time intervals to generate incremental data; dividing the incremental data into blocks to obtain multiple incremental data blocks; copying the multiple incremental data blocks to the target storage volume through the preset interface; replacing the old storage volume with the target storage volume that has completed data synchronization, and establishing a binding relationship between the target storage volume and the node.
2. The method for determining the storage class according to claim 1, characterized in that, The target storage class is determined through the comprehensive score, including: Record the comprehensive score corresponding to each of the different storage classes and generate a comprehensive score list; The comprehensive score list is sorted according to the score values to obtain the sorting result; The target storage class is determined based on the sorting results.
3. The method for determining the storage class according to claim 2, characterized in that, Determining the target storage class based on the sorting result includes: Compare each score value in the sorting result with the preset allowed score values; The storage class corresponding to multiple sorting results that are greater than the preset allowed storage score value is determined as the target storage class; The storage classes corresponding to multiple sorting results that are less than or equal to the preset allowed storage score value are determined as non-target storage classes.
4. The method for determining the storage class according to claim 1, characterized in that, Upon receiving a storage request, the system obtains parameter information of the storage system to respond to the storage request through the container storage interface, and determines a first score corresponding to different storage classes based on the parameter information, including: The performance parameter and the cost parameter are weighted and calculated using a first formula to obtain a first score, wherein the first formula is: Wherein, P is the first score, and the Let the weight of the i-th indicator satisfy the following condition: The Let be the standardized value of the i-th indicator.
5. The method for determining the storage class according to claim 1, characterized in that, After replacing the old storage volume with the target storage volume that has completed data synchronization and establishing a binding relationship between the target storage volume and the node, the method further includes: The comparison result is obtained by comparing the first hash value of the data in the old storage volume with the second hash value of the data in the target storage volume. If the comparison result indicates that the first hash value and the second hash value are equal, it is confirmed that no data was lost during the data migration process; If the comparison result indicates that the first hash value and the second hash value are not equal, it is confirmed that data loss occurred during the data migration process.
6. A device for determining a storage class, characterized in that, include: The first determining module is used to, upon receiving a storage request, obtain parameter information of the storage system to respond to the storage request through a container storage interface, and determine a first score corresponding to different storage classes based on the parameter information; wherein, the parameter information includes at least: performance parameters of different storage classes in the storage system and cost parameters of different storage classes in the storage system; The second determining module is used to obtain topology data corresponding to the available storage space in the storage system, and determine a second score corresponding to different storage classes based on the topology data, wherein the topology data includes at least: the nodes supported by the available storage space, and the correspondence between the nodes and different storage classes in the storage system; The calculation module is used to calculate and process the first score and the second score to obtain a comprehensive score; The third determining module is used to determine the target storage class based on the comprehensive score; The second determining module described above is further configured to obtain a preset scoring standard, wherein the scoring standard includes a correspondence between multiple levels and configuration scores, the multiple levels including at least one of the following: a first level corresponding to a storage class located in the same region as the node; a second level corresponding to a storage class not located in the same region as the node and where the network latency between the node and the storage volume corresponding to the storage class is lower than a first preset threshold; and a third level corresponding to a storage class not located in the same region as the node and where the cost of the storage class is lower than a second preset threshold; the scoring standard is used to evaluate the scores of the different storage classes to obtain multiple sub-scores; and the multiple sub-scores are aggregated to obtain the second score; The replication module is used to create a target storage volume corresponding to the target storage class to support data migration; to pause data transmission of the old storage volume by calling a preset interface through the container storage interface, and to obtain snapshot data of the old storage volume at the pause time, wherein the old storage volume has a binding relationship with the node under the available storage space before the pause; after completing the full data replication based on the snapshot data, to capture the changed data of the old storage volume after the pause at preset time intervals to generate incremental data; to divide the incremental data into blocks to obtain multiple incremental data blocks; to copy the multiple incremental data blocks to the target storage volume through the preset interface; to replace the old storage volume with the target storage volume that has completed data synchronization, and to establish a binding relationship between the target storage volume and the node.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the method for determining the storage class as described in any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for determining the storage class as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Flexible deprovisioning of distributed storage
US20200012443A1
Score-based selection of storage device for virtual disk with specification of quality of service
US9594770B1