Cloud hard disk processing method and device based on anti-affinity strategy

By adopting anti-affinity strategy in the cloud hard disk processing method, selecting the target storage pool based on the cloud hard disk's belonging information and storage pool usage information, the failure problem caused by the cloud hard disk being scheduled to the same storage pool in the existing technology is solved, and the problem of failure caused by the cloud hard disk being scheduled to the same storage pool is realized. Business continuity and stability of cloud hard drive groups.

CN119484558APending Publication Date: 2025-02-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411688577.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing cloud hard disk processing method is only scheduled based on the storage pool usage rate when creating a cloud hard disk, resulting in the main and backup cloud hard disks being scheduled to the same storage pool in a high-availability host cluster or a load-balanced cloud host cluster, and hardware or software appears. In the event of a failure, the cloud hard disk cannot be read and written, interrupting the upper-level application, and unable to ensure business continuity.

Method used

Using the cloud hard disk processing method based on the anti-affinity strategy, the target cloud hard disk group and its home information are determined by responding to the cloud hard disk processing instructions, and based on the current usage information of the anti-affinity strategy and the storage pool, the target storage is determined from the candidate storage pool. and associate the target cloud hard disk with the target storage pool to achieve physical isolation of the fault domain.

Benefits of technology

By scheduling the target cloud hard disk into different storage pools, physical isolation of the fault domain is achieved, the impact of a single storage pool failure on the cloud hard disk group is avoided, and the continuity and stability of the upper-level business is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484558A_ABST
    Figure CN119484558A_ABST
Patent Text Reader

Abstract

The invention relates to a cloud hard disk processing method and device based on an anti-affinity strategy. The method comprises the steps of determining a target cloud hard disk group to be called in by a target cloud hard disk in response to a cloud hard disk processing instruction, obtaining cloud hard disk affiliation information of the target cloud hard disk group, determining a target storage pool from candidate storage pools based on an anti-affinity strategy according to the cloud hard disk affiliation information and current use information of the candidate storage pools, and sending the target storage pool to the cloud hard disk group. And associating the target cloud hard disk with the target storage pool, so that the target cloud hard disk can perform data processing based on the target storage pool. By adopting the method, the service processing continuity can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed storage technology, and in particular to a cloud hard disk processing method and device based on an anti-affinity strategy. Background Art

[0002] With the development of information technology and cloud computing, cloud computing technology has been increasingly applied in education, science, culture, government, medical care and other fields, and businesses in all walks of life have begun to move to the cloud. The current public cloud resource pool distributed storage cluster will create multiple storage pools based on the number of cluster servers, server hardware configuration, physical fault domain isolation, storage pool capacity, etc.

[0003] In related technologies, when creating cloud hard disks, cloud computing platforms only schedule based on the usage rate of all storage pools in the current distributed storage cluster, that is, directly create cloud hard disks on storage pools with lower usage rates. This is fine in most application scenarios, but there are potential risks for upper-layer applications that have high-availability host clusters or cloud host clusters that have load balancing. During use, if both the primary and backup cloud hard disks are scheduled to be created on the same storage pool, once the storage pool has a hardware or software failure, the corresponding primary and backup cloud hard disks will be unreadable and unwritable, resulting in upper-layer application interruption, inability to switch services, resulting in service damage, and failure to guarantee customer service continuity. Summary of the invention

[0004] Based on this, it is necessary to provide a cloud hard disk processing method and device based on an anti-affinity strategy that can ensure business processing continuity in response to the above technical problems.

[0005] In a first aspect, the present application provides a cloud hard disk processing method, comprising:

[0006] In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to which the target cloud hard disk is to be transferred, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0007] Based on the anti-affinity policy, the target storage pool is determined from each candidate storage pool according to the cloud disk ownership information and the current usage information of each candidate storage pool;

[0008] Associate the target cloud disk with the target storage pool so that the target cloud disk can process data based on the target storage pool.

[0009] In one embodiment, determining a target storage pool from each candidate storage pool based on an anti-affinity policy, cloud hard disk ownership information, and current usage information of each candidate storage pool includes:

[0010] According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; if so, based on the anti-affinity policy, determine the target storage pool from each candidate storage pool according to the cloud hard disk ownership information and the current usage information of each candidate storage pool; if not, determine the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0011] In one embodiment, based on the anti-affinity policy, according to the cloud hard disk ownership information and the current usage information of each candidate storage pool, a target storage pool is determined from each candidate storage pool, including:

[0012] According to the cloud hard disk ownership information, determine the storage pool where the cloud hard disk already exists in the target cloud hard disk group; eliminate the storage pool where the existing cloud hard disk exists from each candidate storage pool to obtain each candidate storage pool; according to the current usage information of each candidate storage pool, determine the target storage pool from each candidate storage pool.

[0013] In one embodiment, the current usage information includes a current usage rate; and determining a target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool includes:

[0014] The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

[0015] In one of the embodiments, when the cloud hard disk processing instruction is a cloud hard disk migration instruction, associating the target cloud hard disk with the target storage pool includes:

[0016] Add the target cloud disk to the target cloud disk group and hot migrate the data stored in the original storage pool of the target cloud disk to the target storage pool.

[0017] In one of the embodiments, when the cloud hard disk processing instruction is a cloud hard disk creation instruction, associating the target cloud hard disk with the target storage pool includes:

[0018] Create a target cloud disk in the target cloud disk group based on the target storage pool.

[0019] In a second aspect, the present application also provides a cloud hard disk processing device based on an anti-affinity strategy, including:

[0020] An acquisition module, configured to respond to a cloud hard disk processing instruction, determine a target cloud hard disk group to be transferred into by a target cloud hard disk, and acquire cloud hard disk ownership information of the target cloud hard disk group;

[0021] A determination module, used to determine a target storage pool from each candidate storage pool based on an anti-affinity policy, according to cloud hard disk ownership information and current usage information of each candidate storage pool;

[0022] The processing module is used to associate the target cloud hard disk with the target storage pool so that the target cloud hard disk can process data based on the target storage pool.

[0023] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0024] In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to which the target cloud hard disk is to be transferred, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0025] Based on the anti-affinity policy, the target storage pool is determined from each candidate storage pool according to the cloud disk ownership information and the current usage information of each candidate storage pool;

[0026] Associate the target cloud disk with the target storage pool so that the target cloud disk can process data based on the target storage pool.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0028] In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to which the target cloud hard disk is to be transferred, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0029] Based on the anti-affinity policy, the target storage pool is determined from each candidate storage pool according to the cloud disk ownership information and the current usage information of each candidate storage pool;

[0030] Associate the target cloud disk with the target storage pool so that the target cloud disk can process data based on the target storage pool.

[0031] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0032] In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to which the target cloud hard disk is to be transferred, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0033] Based on the anti-affinity policy, the target storage pool is determined from each candidate storage pool according to the cloud disk ownership information and the current usage information of each candidate storage pool;

[0034] Associate the target cloud disk with the target storage pool so that the target cloud disk can process data based on the target storage pool.

[0035] The above-mentioned cloud hard disk processing method and device based on the anti-affinity strategy, by responding to the cloud hard disk processing instruction, determines the target cloud hard disk group to be transferred into by the target cloud hard disk, and obtains the cloud hard disk affiliation information of the target cloud hard disk group, and then determines the target storage pool from each candidate storage pool based on the anti-affinity strategy according to the cloud hard disk affiliation information and the current usage information of each candidate storage pool; then, the target cloud hard disk is associated with the target storage pool so that the target cloud hard disk can perform data processing based on the target storage pool. Compared with the related art, in which the storage pool required for data processing of the cloud hard disk is selected only based on the storage pool usage rate, the above-mentioned method is adopted to schedule the target cloud hard disk to the corresponding target storage pool based on the anti-affinity strategy, so as to support the physical isolation of the fault domain between each cloud hard disk in the target cloud hard disk group, and ensure the continuity and stability of the upper-layer business corresponding to the target cloud hard disk group. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A schematic diagram of a cloud hard disk processing method in the prior art;

[0038] Figure 2 The figure is a flowchart of a cloud hard disk processing method based on an anti-affinity strategy in one embodiment;

[0039] Figure 3 A schematic diagram of a cloud hard disk architecture in one embodiment;

[0040] Figure 4 A schematic diagram of a cloud hard disk failure in one embodiment;

[0041] Figure 5 A schematic diagram of a cloud hard disk processing method in one embodiment;

[0042] Figure 6 A schematic diagram of a cloud hard disk processing method in another embodiment;

[0043] Figure 7 It is a flowchart of a cloud hard disk processing method based on an anti-affinity strategy in another embodiment;

[0044] Figure 8 It is a structural block diagram of a cloud hard disk processing device based on an anti-affinity strategy in one embodiment;

[0045] Fig. 9FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] With the development of information technology and cloud computing, cloud computing technology is increasingly being applied in various fields. Currently, a distributed storage cluster creates multiple storage pools based on the number of cluster servers, server hardware configuration, physical fault domain isolation, storage pool capacity, etc. In the existing cloud hard disk processing method, in order to ensure the rationality of resource use, cloud hard disks are created in storage pools with low storage pool utilization.

[0048] However, using the existing cloud hard disk processing method, the storage pool required for cloud hard disk data processing is selected only based on the storage pool usage rate, which will reduce the reliability of business processing on the cloud hard disk.

[0049] With the development of information technology and cloud computing, cloud computing technology has been increasingly applied in education, science, culture, government, medical care and other fields, and businesses in all walks of life have begun to move to the cloud. The current public cloud resource pool distributed storage cluster will create multiple storage pools based on the number of cluster servers, server hardware configuration, physical fault domain isolation, storage pool capacity, etc.

[0050] When creating a cloud disk, the cloud computing platform will only schedule it based on the usage of all storage pools in the current distributed storage cluster. That is, the cloud disk will be directly created on the storage pool with lower usage. This is not a problem in most application scenarios, but it has potential risks for upper-layer applications that have built high-availability host clusters or cloud host clusters that have built load balancing. Figure 1 As shown in the existing cloud hard disk processing diagram, during use, if the primary and backup cloud hard disks are scheduled to be created on the same storage pool, once a hardware failure or software failure occurs in the storage pool, the corresponding primary and backup cloud hard disks will be unreadable and writable, resulting in upper-layer application interruption, inability to switch business, resulting in business damage, and failure to guarantee customer business continuity.

[0051] Based on this, in an exemplary embodiment, Figure 2 As shown, a cloud hard disk processing method based on an anti-affinity strategy is provided, and the method is applied to a cloud hard disk processing platform as an example for explanation, and specifically includes the following steps:

[0052] S201, in response to a cloud hard disk processing instruction, determining a target cloud hard disk group to be transferred into by a target cloud hard disk, and obtaining cloud hard disk ownership information of the target cloud hard disk group.

[0053] Among them, the cloud hard disk processing instruction refers to the instruction for processing the cloud hard disk, for example, it can be a cloud hard disk creation instruction or a cloud hard disk migration instruction; the target cloud hard disk refers to the cloud hard disk with processing requirements; the cloud hard disk group is a logical division of the cloud hard disk, and the cloud hard disks added to the same cloud hard disk group need to comply with the same strategy. Furthermore, the target cloud hard disk group is the cloud hard disk group to which the target cloud hard disk corresponds when processing; the cloud hard disk affiliation information is the storage pool affiliation status of each existing cloud hard disk in the target cloud hard disk group.

[0054] The anti-affinity strategy is to intelligently schedule cloud disks in the same cloud disk group to different storage pools in the distributed storage cluster to achieve physical isolation of fault domains.

[0055] In one possible implementation, the user can initiate a cloud disk processing instruction by entering the cloud disk processing platform. For example, if the user has a cloud disk group creation requirement, the name of the cloud disk group and the cloud disk storage policy (such as anti-affinity policy) can be set on the cloud disk processing platform to create a new cloud disk group S as the target cloud disk group.

[0056] Subsequently, on the cloud disk processing platform, the user can initiate a cloud disk processing instruction to migrate cloud disk A to cloud disk group S by selecting an existing cloud disk A that has been created and mounted to the cloud host. Alternatively, the user can create a new cloud disk B by setting basic configuration information such as the cloud disk name, size, and disk type, and check cloud disk group S when creating cloud disk B, to initiate a cloud disk processing instruction to create cloud disk B in cloud disk group S.

[0057] After receiving the cloud hard disk processing instruction, the target cloud hard disk group to be transferred into the target cloud hard disk can be extracted from the cloud hard disk processing instruction; then, the identification information of the target cloud hard disk group can be used as an index to query the correspondence between each cloud hard disk group and the cloud hard disk ownership information to obtain the cloud hard disk ownership information of the target cloud hard disk group.

[0058] S202: Based on the anti-affinity policy, according to the cloud hard disk ownership information and the current usage information of each candidate storage pool, determine a target storage pool from each candidate storage pool.

[0059] Among them, the current usage information is used to characterize the usage of the storage pool at the current moment; in this application, the distributed storage cluster can create multiple candidate storage pools, each candidate storage pool is created using a different physical server, which is not only a logical isolation unit, but also a physical isolation unit. One candidate storage pool can create multiple cloud hard disks; the target storage pool is the candidate storage pool corresponding to the target cloud hard disk.

[0060] In one possible implementation, the cloud hard disk ownership information and the current usage information of each candidate storage pool can be input into a trained storage pool determination model, and the storage pool determination model outputs the target storage pool according to the cloud hard disk ownership information, the current usage information of each candidate storage pool and the model parameters. The storage pool determination model is constructed based on the anti-affinity policy.

[0061] It is understandable that during the use of cloud hard disks, if all cloud hard disks in a cloud hard disk group are migrated / created to the same storage pool, once a hardware failure or software failure occurs in the storage pool, all cloud hard disks in the corresponding cloud hard disk group will be unreadable and writable, resulting in interruption of upper-layer applications, inability to switch business, resulting in damage to the business, and failure to guarantee the continuity of customer business.

[0062] Based on this, in another possible implementation, based on the anti-affinity strategy, a selectable storage pool can be determined from each candidate storage pool according to the cloud hard disk affiliation information (for example, a storage pool in each candidate storage pool that is not associated with the cloud hard disk already existing in the target cloud hard disk group can be used as a selectable storage pool); then, based on the current usage information of each selectable storage pool, the target storage pool is determined from each selectable storage pool.

[0063] S203: Associating the target cloud hard disk with the target storage pool, so that the target cloud hard disk can process data based on the target storage pool.

[0064] In one possible implementation, after determining the target storage pool corresponding to the target cloud hard disk, the target cloud hard disk may be associated with the target storage pool, so that the target cloud hard disk may perform subsequent data processing in the target storage pool.

[0065] For example, after associating the target cloud hard disk with the target storage pool based on the anti-affinity policy, the following can be obtained: Figure 3 The cloud hard disk architecture diagram is shown in FIG. Further, based on this, Figure 4As shown in the cloud hard disk failure diagram, when storage pool 1 associated with cloud hard disk 1 in cloud hard disk group 1 fails, the original application backup library will be used as the new application master library to continue to execute the upper-layer business. That is, when storage pool 1 where cloud hard disk 1 that undertakes the main service is located fails, it will not affect storage pool 2 where cloud hard disk 2 that undertakes the slave service is located. Therefore, the upper-layer application can switch to the slave cloud hard disk 2 to continue execution.

[0066] In the above-mentioned cloud hard disk processing method based on the anti-affinity strategy, by responding to the cloud hard disk processing instruction, the target cloud hard disk group to be transferred into by the target cloud hard disk is determined, and the cloud hard disk affiliation information of the target cloud hard disk group is obtained, and then based on the anti-affinity strategy, the target storage pool is determined from each candidate storage pool according to the cloud hard disk affiliation information and the current usage information of each candidate storage pool; then, the target cloud hard disk is associated with the target storage pool so that the target cloud hard disk can perform data processing based on the target storage pool. Compared with the related art, in which the storage pool required for data processing of the cloud hard disk is selected only based on the storage pool usage rate, the above-mentioned method is adopted to schedule the target cloud hard disk to the corresponding target storage pool based on the anti-affinity strategy, so that the physical isolation of the fault domain between each cloud hard disk in the target cloud hard disk group can be supported, and the continuity and stability of the upper-layer business corresponding to the target cloud hard disk group are ensured.

[0067] In order to ensure the accuracy of the determined target storage pool, based on the above embodiments, in an embodiment of the present application, an optional method for determining the target storage pool is provided, specifically, judging whether there is a cloud hard disk in the target cloud hard disk group according to the cloud hard disk affiliation information; if so, based on the anti-affinity strategy, determining the target storage pool from each candidate storage pool according to the cloud hard disk affiliation information and the current usage information of each candidate storage pool; if not, determining the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0068] It is understandable that during the use of cloud hard disks, if all cloud hard disks in a cloud hard disk group are migrated / created to the same storage pool, then if the storage pool fails, all cloud hard disks in the cloud hard disk group will become unreadable and unwritable at the same time.

[0069] Based on this, in one possible implementation, it is possible to determine whether there is a cloud hard disk in the target cloud hard disk group based on the cloud hard disk attribution information of the target cloud hard disk group. For example, if the cloud hard disk attribution information is empty, it is determined that there is no cloud hard disk in the target cloud hard disk group; if the cloud hard disk attribution information is not empty, it is determined that there is a cloud hard disk in the target cloud hard disk group.

[0070] When cloud hard disks exist in the target cloud hard disk group, the used storage pools corresponding to the cloud hard disks existing in the target cloud hard disk group can be determined based on the anti-affinity policy and the cloud hard disk ownership information; then, the target storage pool is selected from the candidate storage pools other than the used storage pools based on the current usage information of each candidate storage pool.

[0071] When there is no cloud disk in the target cloud disk group, the target storage pool can be directly determined from the candidate storage pools based on the current usage information of the candidate storage pools.

[0072] For example, when the current usage information includes the current usage rate, in order to ensure the high availability of the underlying storage, the storage pool whose current usage rate is lower than the preset usage threshold among the candidate storage pools can be used as the target storage pool. The current usage rate is the resource usage rate of the storage pool under the current situation; the preset usage threshold can be determined based on the historical experience of the technicians or based on the historical usage records of the storage pool, which is not limited in this application.

[0073] Alternatively, the storage pool with the lowest current usage rate among the candidate storage pools may be used as the target storage pool. It is understandable that since the current usage rate reflects the availability of the storage pool to a certain extent, the lower the current usage rate, the higher the availability of the storage pool. Based on this, in order to ensure the high availability of the underlying storage, the storage pool with the lowest current usage rate among the candidate storage pools may be directly used as the target storage pool.

[0074] In an embodiment of the present application, by determining whether there is a cloud hard disk in the target cloud hard disk group and providing two different methods for determining the target storage pool based on the determination result, the high availability of the underlying storage can be guaranteed, thereby ensuring the rationality and accuracy of the target storage pool determination.

[0075] In order to ensure the accuracy of the target storage pool, based on the above embodiments, in the embodiments of the present application, when it is determined that there is a cloud hard disk in the target cloud hard disk group, another optional method for determining the target storage pool is provided, specifically, according to the cloud hard disk affiliation information, determining the storage pool where the cloud hard disk already exists in the target cloud hard disk group is located; eliminating the storage pool where the existing cloud hard disk is located from each candidate storage pool to obtain each candidate storage pool; and determining the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0076] In one feasible implementation, the cloud hard disks already existing in the target cloud hard disk group and the storage pools where the existing cloud hard disks are located can be extracted from the cloud hard disk affiliation information of the target cloud hard disk group; then, in order to achieve physical isolation of the fault domain, after the storage pools where the existing cloud hard disks are located are eliminated from each candidate storage pool, the remaining storage pools are used as each alternative storage pool.

[0077] It is understandable that after excluding the storage pool where the existing cloud hard disk is located from each candidate storage pool, if there is no remaining storage pool, it is necessary to feedback a cloud hard disk processing failure prompt to the user to prompt the user to adjust the cloud hard disk processing instruction.

[0078] In the case that there are candidate storage pools, the current usage rates of the candidate storage pools may be determined according to the current usage information of the candidate storage pools; then, the candidate storage pool with the lowest current usage rate is used as the target storage pool.

[0079] In an embodiment of the present application, the target storage pool is determined by eliminating the storage pool where the existing cloud hard disk is located from each candidate storage pool. This can ensure that when any storage pool fails, the processing of the upper-layer business corresponding to the target cloud hard disk group will not be affected. That is, physical isolation of the fault domain is achieved, thereby ensuring the continuity and reliability of the upper-layer application business processing.

[0080] Based on the above embodiments, in an embodiment of the present application, two optional methods of associating a target cloud hard disk with a target storage pool are provided. One optional method is, when the cloud hard disk processing instruction is a cloud hard disk migration instruction, adding the target cloud hard disk to the target cloud hard disk group, and hot migrating the data stored in the target cloud hard disk in the original storage pool to the target storage pool.

[0081] Specifically, when the cloud disk processing instruction is a cloud disk migration instruction, if there is no cloud disk in the target cloud disk group, the target cloud disk can be directly added to the target cloud disk group, and data migration is not required.

[0082] If there is already a cloud disk in the target cloud disk group, determine whether the storage pool where the target cloud disk is located is the same as the storage pool where the cloud disk already exists in the target cloud disk group. If the storage pools are not the same, directly add the target cloud disk to the target cloud disk group. In this case, no data migration is required.

[0083] If the storage pool where the target cloud hard disk is located overlaps with the storage pool where the cloud hard disk already exists in the target cloud hard disk group, you need to refer to the above steps, determine the target storage pool from each candidate storage pool based on the cloud hard disk ownership information and the current usage rate of each candidate storage pool, and hot migrate the data stored in the target cloud hard disk in the original storage pool to the target storage pool across storage pools. The hot migration process will not affect user services, and users will not be aware of data migration.

[0084] In the case that the target storage pool does not exist in the candidate storage pools, it is necessary to provide a cloud hard disk processing failure prompt to the user to prompt the user to adjust the cloud hard disk processing instruction.

[0085] For example, Figure 5As shown, in the process of migrating the existing cloud hard disk 2 to the anti-affinity cloud hard disk group 1, since the cloud hard disk 2 and the existing cloud hard disk 1 in the anti-affinity cloud hard disk group 1 are in the same storage pool (storage pool 1), it is necessary to use the storage pool 2 with the lowest current utilization rate among the remaining storage pools 2-5 as the new target storage pool corresponding to the cloud hard disk 2, and hot migrate the data in the cloud hard disk 2 to the storage pool 2.

[0086] Another optional manner is, when the cloud disk processing instruction is a cloud disk creation instruction, creating a target cloud disk in a target cloud disk group based on a target storage pool.

[0087] Specifically, when the cloud hard disk processing instruction is a cloud hard disk creation instruction, if there is no cloud hard disk in the target cloud hard disk group, the candidate storage pool with the lowest current usage rate can be directly used as the target storage pool, and the target cloud hard disk in the target cloud hard disk group can be created on the target storage pool.

[0088] If there are cloud disks in the target cloud disk group, refer to the above steps, determine the target storage pool from the candidate storage pools based on the cloud disk ownership information and the current usage of each candidate storage pool, and create the target cloud disk in the target cloud disk group on the target storage pool.

[0089] In the case that the target storage pool does not exist in the candidate storage pools, it is necessary to provide a cloud hard disk processing failure prompt to the user to prompt the user to adjust the cloud hard disk processing instruction.

[0090] For example, Figure 6 As shown, in the process of creating a new cloud hard disk 5 in the anti-affinity cloud hard disk group 1, the storage pool 1-4 associated with the cloud hard disk 1-4 in the anti-affinity cloud hard disk group 1 can be removed from the storage pool 1-5 to obtain the remaining storage pool 5, and a new cloud hard disk 5 can be created in the anti-affinity cloud hard disk group 1 based on the storage pool 5.

[0091] In the embodiment of the present application, by providing two different cloud hard disk processing instructions for associating the cloud hard disk with the storage pool, the reliability of the target cloud hard disk processing can be ensured.

[0092] Figure 7 This is a flow chart of a method for processing a cloud hard disk based on an anti-affinity policy in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a method for processing a cloud hard disk based on an anti-affinity policy. Figure 7 The specific implementation process is as follows:

[0093] S701, in response to a cloud hard disk processing instruction, determining a target cloud hard disk group to be transferred into by a target cloud hard disk, and obtaining cloud hard disk ownership information of the target cloud hard disk group.

[0094] S702, judging whether there is a cloud hard disk in the target cloud hard disk group according to the cloud hard disk ownership information, if so, executing S703; if not, executing S706.

[0095] S703: Determine the storage pool where the cloud hard disk that already exists in the target cloud hard disk group is located according to the cloud hard disk ownership information.

[0096] S704, removing the storage pool where the existing cloud hard disk is located from each candidate storage pool to obtain each candidate storage pool.

[0097] S705: The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

[0098] S706: The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

[0099] S707, determine whether the cloud hard disk processing instruction is a cloud hard disk migration instruction, if so, execute S708; if not, execute S709.

[0100] S708, adding the target cloud hard disk to the target cloud hard disk group, and hot migrating the data stored in the original storage pool of the target cloud hard disk to the target storage pool.

[0101] S709: Create a target cloud hard disk in the target cloud hard disk group based on the target storage pool.

[0102] The specific process of the above S701-S709 can be found in the description of the above method embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0103] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0104] Based on the same inventive concept, the embodiment of the present application also provides a cloud hard disk processing device based on anti-affinity strategy for implementing the cloud hard disk processing method based on anti-affinity strategy involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more cloud hard disk processing device embodiments based on anti-affinity strategy provided below can be referred to the limitations of the cloud hard disk processing method based on anti-affinity strategy above, and will not be repeated here.

[0105] In an exemplary embodiment, Figure 8 As shown, a cloud hard disk processing device 1 based on an anti-affinity strategy is provided, comprising: an acquisition module 10, a determination module 20 and a processing module 30, wherein:

[0106] The acquisition module 10 is used to respond to the cloud hard disk processing instruction, determine the target cloud hard disk group to be transferred into by the target cloud hard disk, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0107] The determination module 20 is used to determine the target storage pool from each candidate storage pool based on the anti-affinity policy, according to the cloud hard disk ownership information and the current usage information of each candidate storage pool;

[0108] The processing module 30 is used to associate the target cloud hard disk with the target storage pool so that the target cloud hard disk can perform data processing based on the target storage pool.

[0109] In an exemplary embodiment, the determination module 20 includes:

[0110] A first determination unit is used to determine whether there is a cloud hard disk in the target cloud hard disk group according to the cloud hard disk ownership information;

[0111] A second determination unit is configured to, if yes, determine the target storage pool from the candidate storage pools based on the anti-affinity policy, according to the cloud hard disk ownership information and the current usage information of each candidate storage pool;

[0112] The third determining unit is configured to determine the target storage pool from the candidate storage pools according to the current usage information of the candidate storage pools if no.

[0113] In an exemplary embodiment, the second determining unit is specifically configured to:

[0114] According to the cloud hard disk ownership information, determine the storage pool where the cloud hard disk already exists in the target cloud hard disk group; eliminate the storage pool where the existing cloud hard disk exists from each candidate storage pool to obtain each candidate storage pool; according to the current usage information of each candidate storage pool, determine the target storage pool from each candidate storage pool.

[0115] In an exemplary embodiment, the current usage information includes a current usage rate; further, the third determining unit is specifically configured to:

[0116] The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

[0117] In an exemplary embodiment, when the cloud hard disk processing instruction is a cloud hard disk migration instruction, the processing module 30 is specifically used to:

[0118] Add the target cloud disk to the target cloud disk group and hot migrate the data stored in the original storage pool of the target cloud disk to the target storage pool.

[0119] In an exemplary embodiment, when the cloud hard disk processing instruction is a cloud hard disk creation instruction, the processing module 30 is specifically used to:

[0120] Create a target cloud disk in the target cloud disk group based on the target storage pool.

[0121] Each module in the cloud hard disk processing device based on the anti-affinity strategy can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0122] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store business data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a cloud hard disk processing method based on an anti-affinity strategy is implemented.

[0123] Those skilled in the art will understand that Fig. 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0125] In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to which the target cloud hard disk is to be transferred, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0126] Based on the anti-affinity policy, the target storage pool is determined from each candidate storage pool according to the cloud disk ownership information and the current usage information of each candidate storage pool;

[0127] Associate the target cloud disk with the target storage pool so that the target cloud disk can process data based on the target storage pool.

[0128] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0129] According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; if so, based on the anti-affinity policy, determine the target storage pool from each candidate storage pool according to the cloud hard disk ownership information and the current usage information of each candidate storage pool; if not, determine the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0130] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0131] According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; if so, determine the target storage pool from each candidate storage pool according to the cloud hard disk ownership information and the current usage information of each candidate storage pool; if not, determine the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0132] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0133] The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

[0134] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0135] Add the target cloud disk to the target cloud disk group and hot migrate the data stored in the original storage pool of the target cloud disk to the target storage pool.

[0136] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0137] Create a target cloud disk in the target cloud disk group based on the target storage pool.

[0138] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0139] In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to which the target cloud hard disk is to be transferred, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0140] Based on the anti-affinity policy, the target storage pool is determined from each candidate storage pool according to the cloud disk ownership information and the current usage information of each candidate storage pool;

[0141] Associate the target cloud disk with the target storage pool so that the target cloud disk can process data based on the target storage pool.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0143] According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; if so, based on the anti-affinity policy, determine the target storage pool from each candidate storage pool according to the cloud hard disk ownership information and the current usage information of each candidate storage pool; if not, determine the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; if so, determine the target storage pool from each candidate storage pool according to the cloud hard disk ownership information and the current usage information of each candidate storage pool; if not, determine the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0147] The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] Add the target cloud disk to the target cloud disk group and hot migrate the data stored in the original storage pool of the target cloud disk to the target storage pool.

[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0151] Create a target cloud disk in the target cloud disk group based on the target storage pool.

[0152] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0153] In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to which the target cloud hard disk is to be transferred, and obtain the cloud hard disk ownership information of the target cloud hard disk group;

[0154] Based on the anti-affinity policy, the target storage pool is determined from each candidate storage pool according to the cloud disk ownership information and the current usage information of each candidate storage pool;

[0155] Associate the target cloud disk with the target storage pool so that the target cloud disk can process data based on the target storage pool.

[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0157] According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; if so, based on the anti-affinity policy, determine the target storage pool from each candidate storage pool according to the cloud hard disk ownership information and the current usage information of each candidate storage pool; if not, determine the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; if so, determine the target storage pool from each candidate storage pool according to the cloud hard disk ownership information and the current usage information of each candidate storage pool; if not, determine the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] Add the target cloud disk to the target cloud disk group and hot migrate the data stored in the original storage pool of the target cloud disk to the target storage pool.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] Create a target cloud disk in the target cloud disk group based on the target storage pool.

[0166] It should be noted that the data involved in this application (including but not limited to business data stored in the cloud hard disk, etc.) are all data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0167] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0168] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0169] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A cloud hard disk processing method based on anti-affinity strategy, characterized in that: The method comprises: In response to the cloud hard disk processing instruction, determine the target cloud hard disk group to be transferred to by the target cloud hard disk, and obtain the cloud hard disk ownership information of the target cloud hard disk group; Based on the anti-affinity strategy, according to the cloud hard disk ownership information and the current usage information of each candidate storage pool, determine the target storage pool from each candidate storage pool; The target cloud hard disk is associated with the target storage pool so that the target cloud hard disk can perform data processing based on the target storage pool.

2. The method according to claim 1, characterized in that The anti-affinity strategy is based on the cloud hard disk ownership information and the current usage information of each candidate storage pool, and determines the target storage pool from each candidate storage pool, including: According to the cloud hard disk ownership information, determine whether there is a cloud hard disk in the target cloud hard disk group; If yes, based on the anti-affinity strategy, according to the cloud hard disk ownership information and the current usage information of each candidate storage pool, determine the target storage pool from each candidate storage pool; If not, the target storage pool is determined from the candidate storage pools according to the current usage information of the candidate storage pools.

3. The method according to claim 2, characterized in that The anti-affinity strategy is based on the cloud hard disk ownership information and the current usage information of each candidate storage pool, and determines the target storage pool from each candidate storage pool, including: Determine the storage pool where the existing cloud hard disk in the target cloud hard disk group is located according to the cloud hard disk ownership information; Eliminate the storage pool where the existing cloud hard disk is located from each candidate storage pool to obtain each candidate storage pool; A target storage pool is determined from among the candidate storage pools according to current usage information of the candidate storage pools.

4. The method according to claim 2, characterized in that: The current usage information includes a current usage rate; The step of determining the target storage pool from each candidate storage pool according to the current usage information of each candidate storage pool includes: The storage pool with the lowest current usage rate among the candidate storage pools is selected as the target storage pool.

5. The method according to claim 1, characterized in that: In a case where the cloud hard disk processing instruction is a cloud hard disk migration instruction, associating the target cloud hard disk with the target storage pool includes: The target cloud hard disk is added to the target cloud hard disk group, and the data stored in the original storage pool of the target cloud hard disk is hot migrated to the target storage pool.

6. The method according to claim 1, characterized in that In a case where the cloud hard disk processing instruction is a cloud hard disk creation instruction, associating the target cloud hard disk with the target storage pool includes: Based on the target storage pool, create the target cloud hard disk in the target cloud hard disk group.

7. A cloud hard disk processing device based on anti-affinity strategy, characterized in that: The device comprises: An acquisition module, configured to respond to a cloud hard disk processing instruction, determine a target cloud hard disk group to be transferred into by a target cloud hard disk, and acquire cloud hard disk ownership information of the target cloud hard disk group; A determination module, configured to determine a target storage pool from each candidate storage pool based on an anti-affinity policy and according to the cloud hard disk ownership information and current usage information of each candidate storage pool; The processing module is used to associate the target cloud hard disk with the target storage pool so that the target cloud hard disk can perform data processing based on the target storage pool.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and system for dispatching cloud computed resources

    CN103248659A

  • Cloud host orderly management method and system, terminal and storage medium

    CN111858174A

  • Cloud host cluster high-availability processing method and system, electronic equipment and storage medium

    CN113949712A

  • Anti-affinity scheduling method and device for creating cloud host and medium

    CN115061823A

  • Cloud server anti-affinity processing method, device, storage medium and system

    CN117834635A