A cloud server disaster recovery method, apparatus, electronic equipment, and storage medium.
By setting a threshold for the number of mounts based on the performance indicators of storage devices and performing multiple mounts during cloud server disaster recovery operations, the problem of storage pool mount failures was resolved, and the success rate of disaster recovery operations was improved.
Patent Information
- Application Number
- CN202410706244.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-05-31
AI Technical Summary
In existing technologies, during the primary/standby switchover and primary/standby rollback processes of cloud server disaster recovery operations, storage pool mounting failures are common, resulting in a low success rate.
Before mounting the storage pool, set a threshold for the number of mounts based on the performance metrics of the storage device, and perform multiple mount operations within the threshold until the underlying storage volume of the storage device becomes readable and writable before mounting.
This improved the success rate of mounting storage pools, thereby increasing the overall success rate of disaster recovery operations.
Smart Images

Figure CN118337606B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a cloud host disaster recovery method, apparatus, electronic device, and storage medium. Background Technology
[0002] CMP (Cloud Management Platform) integrates cloud management, virtualization cloud platform, and container cloud platform, realizing unified scheduling and management of underlying computing, storage, network, and security resources in cloud data centers. It enables dynamic changes in business operations and intelligent management of resources. Through effective monitoring and flexible scheduling of large-scale hardware resources, it ensures the security and reliability of user data. While improving the overall resource utilization of the data center, it greatly improves the efficiency of IT (Information Technology) operations and maintenance, and reduces the maintenance costs of the data center.
[0003] Disaster recovery refers to the process of restoring business operations after a disaster. It involves establishing one or more identical IT systems in geographically dispersed locations, allowing for failover or simultaneous service provision, with the aim of maximizing business continuity. When a business system fails unexpectedly, the entire system can be restored remotely, enabling continued service provision.
[0004] For disaster recovery operations related to these technologies, during the primary-backup switchover process, when the primary storage pool in the primary center is unloaded, there may be mounting failures when mounting the backup storage pool in the backup center. Similarly, during the primary-backup failover process, there may be mounting failures when mounting the primary storage pool in the primary center, resulting in a low success rate for primary-backup switchover and primary-backup failover operations.
[0005] Therefore, improving the success rate of disaster recovery operations is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0006] The purpose of this application is to provide a cloud server disaster recovery method, apparatus, electronic device, and storage medium, which improves the success rate of disaster recovery operations.
[0007] To achieve the above objectives, this application provides a cloud host disaster recovery method applied to a protection group, wherein the protection group includes a first cloud host, a second cloud host, a first storage pool and a first storage device corresponding to the first cloud host, and a second storage pool and a second storage device corresponding to the second cloud host.
[0008] The method includes:
[0009] When a primary / backup switch of a cloud server is required, the first cloud server is changed from the primary cloud server to the backup cloud server, and the first storage pool is unloaded.
[0010] Obtain performance metrics information of the second storage device, and determine a mount count threshold based on the metrics information; wherein the mount count threshold is negatively correlated with the performance of the second storage device as represented by the metrics information;
[0011] If the second storage pool is successfully mounted, the second cloud host is changed from a backup cloud host to a primary cloud host. If the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the process of mounting the second storage pool is restarted. If the current mounting count is equal to the mounting count threshold, the first storage pool is mounted through a rollback operation, and the first cloud host is changed from a backup cloud host to a primary cloud host.
[0012] Before changing the first cloud host from the primary cloud host to the backup cloud host, the process also includes:
[0013] Verify the status of the protection group. If the protection group is under protection, then execute the step of changing the first cloud host from the primary cloud host to the backup cloud host.
[0014] Modifying the first cloud host from a primary cloud host to a backup cloud host includes:
[0015] Control the shutdown of the first cloud host and change the first cloud host from the primary cloud host to the backup cloud host;
[0016] Accordingly, the second cloud host will be changed from a backup cloud host to a primary cloud host, including:
[0017] Control the second cloud host to power on, and change the second cloud host from a backup cloud host to a primary cloud host.
[0018] After unloading the first storage pool, the process also includes:
[0019] Switch the direction of the protection group from the first cloud host to the second cloud host to the second cloud host to the first cloud host.
[0020] Unloading the first storage pool includes:
[0021] The cloud management platform unloads the first storage pool by calling the interface of the virtualization resource pool and generates a first call record in the log file; wherein, the first call record includes a timestamp of unloading the first storage pool and first interaction information between the cloud management platform and the virtualization resource pool;
[0022] Accordingly, mounting the second storage pool includes:
[0023] The virtualization resource pool mounts the second storage pool by calling the storage device system and generates a second call record in the log file; wherein, the second call record includes a timestamp of mounting the second storage pool and second interaction information between the virtualization resource pool and the storage device system;
[0024] Accordingly, after mounting the first storage pool through a rollback operation and changing the first cloud host from a backup cloud host to a primary cloud host, the process also includes:
[0025] Upload the log file to perform primary / standby switchover fault analysis based on the log file.
[0026] The process of obtaining performance metrics information of the second storage device and determining a mount count threshold based on the metric information includes:
[0027] Obtain indicator information for multiple performance metrics of the second storage device;
[0028] Determine the impact index of multiple performance indicators, and identify the target performance indicator with the largest impact index;
[0029] The indicator level is determined based on the indicator information of the target performance indicator, and the mount count threshold is determined based on the indicator level; wherein, the indicator level is negatively correlated with the performance of the second storage device characterized by the indicator information of the target performance indicator, and the mount count threshold is positively correlated with the indicator level.
[0030] This also includes:
[0031] When a primary / backup failover of a cloud host is required, the status of the protection group is checked. If the protection group is in a protected state, the second cloud host is shut down and changed from a primary cloud host to a backup cloud host.
[0032] The cloud management platform unloads the second storage pool by calling the interface of the virtualization resource pool and generates a third call record in the log file; wherein, the third call record includes a timestamp of unloading the second storage pool and third interaction information between the cloud management platform and the virtualization resource pool;
[0033] Switch the direction of the protection group from the second cloud host to the first cloud host to the first cloud host to the second cloud host;
[0034] Obtain the indicator information of multiple performance indicators of the first storage device, determine the influence index of the multiple performance indicators, and determine the target performance indicator with the largest influence index.
[0035] The indicator level is determined based on the indicator information of the target performance indicator, and the mount number threshold is determined based on the indicator level; wherein, the indicator level is negatively correlated with the performance of the second storage device characterized by the indicator information of the target performance indicator, and the mount number threshold is positively correlated with the indicator level;
[0036] The virtualization resource pool mounts the first storage pool by calling the storage device system and generates a fourth call record in the log file; wherein, the fourth call record includes a timestamp of mounting the first storage pool and a fourth interaction information between the virtualization resource pool and the storage device system;
[0037] If the mounting is successful, control the first cloud host to power on and change the first cloud host from the backup cloud host to the primary cloud host;
[0038] If the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the process re-enters the virtualization resource pool and mounts the first storage pool by calling the storage device system. If the current mounting count is equal to the mounting count threshold, the second storage pool is mounted through a rollback operation, the second cloud host is changed from a backup cloud host to a primary cloud host, and the log file is uploaded to perform primary / backup failover analysis based on the log file.
[0039] To achieve the above objectives, this application provides a cloud host disaster recovery device applied to a protection group, the protection group including a first cloud host, a second cloud host, a first storage pool and a first storage device corresponding to the first cloud host, and a second storage pool and a second storage device corresponding to the second cloud host;
[0040] The device includes:
[0041] The unloading module is used to change the first cloud host from the primary cloud host to the backup cloud host and unload the first storage pool when a primary-backup switch of the cloud host is required.
[0042] The determination module is used to obtain performance index information of the second storage device and determine a mount count threshold based on the index information; wherein the mount count threshold is negatively correlated with the performance of the second storage device characterized by the index information.
[0043] The mounting module is used to mount the second storage pool. If the mounting is successful, the second cloud host is changed from a backup cloud host to a primary cloud host. If the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the step of mounting the second storage pool is restarted. If the current mounting count is equal to the mounting count threshold, the first storage pool is mounted through a rollback operation, and the first cloud host is changed from a backup cloud host to a primary cloud host.
[0044] To achieve the above objectives, this application provides an electronic device, comprising:
[0045] Memory, used to store computer programs;
[0046] A processor is used to implement the steps of the cloud host disaster recovery method described above when executing the computer program.
[0047] To achieve the above objectives, this application provides a non-volatile storage medium storing a computer program, which, when executed by a processor, implements the steps of the cloud host disaster recovery method described above.
[0048] To achieve the above objectives, this application provides a computer program product storing a computer program, which, when executed by a processor, implements the steps of the cloud host disaster recovery method described above.
[0049] As can be seen from the above scheme, the cloud host disaster recovery method provided in this application is applied to a protection group, which includes a first cloud host, a second cloud host, a first storage pool and a first storage device corresponding to the first cloud host, and a second storage pool and a second storage device corresponding to the second cloud host. The method includes: when a primary / backup switch of the cloud host is required, the first cloud host is changed from the primary cloud host to the backup cloud host, and the first storage pool is unloaded; the performance index information of the second storage device is obtained, and the mounting count threshold is determined according to the index information; wherein, the mounting count threshold is negatively correlated with the performance of the second storage device represented by the index information; the second storage pool is mounted, and if the mounting is successful, the second cloud host is changed from the backup cloud host to the primary cloud host; if the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the step of mounting the second storage pool is re-entered; if the current mounting count is equal to the mounting count threshold, the first storage pool is mounted through a rollback operation, and the first cloud host is changed from the backup cloud host to the primary cloud host.
[0050] The cloud server disaster recovery method provided in this application sets a corresponding mount count threshold based on the performance indicators of the second storage device before mounting the second storage pool. Within this threshold, multiple mount operations are performed on the second storage pool to ensure that the underlying storage volume in the second storage device is out of read-only mode. The second storage pool is then mounted when the underlying storage volume is in read-write mode, thus improving the mount success rate of the second storage pool and consequently increasing the success rate of the disaster recovery operation. This application also discloses a cloud server disaster recovery device, an electronic device, a non-volatile storage medium, and a computer program product, all of which achieve the same technical effects.
[0051] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The drawings are used to provide a further understanding of this disclosure and constitute a part of the specification. They are used together with the following detailed description to explain this disclosure, but do not constitute a limitation of this disclosure. In the drawings:
[0053] Figure 1 This is a flowchart illustrating a cloud server disaster recovery method according to an exemplary embodiment;
[0054] Figure 2 A flowchart illustrating another cloud server disaster recovery method according to an exemplary embodiment;
[0055] Figure 3 This application provides a structural diagram of a cloud host disaster recovery system in one application embodiment;
[0056] Figure 4 A flowchart of primary / standby switching is provided in one application embodiment of this application;
[0057] Figure 5 This is a structural diagram illustrating a cloud server disaster recovery device according to an exemplary embodiment;
[0058] Figure 6 This is a structural diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0059] 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 a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Furthermore, in the embodiments of this application, "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0060] The disaster recovery solution for the relevant technologies is as follows: The cloud management platform implements the disaster recovery function of the cloud hosts by calling the disaster recovery interface provided by ICS (InCloud Sphere, virtualized resource pool). The cloud hosts are backed up in the primary and backup centers. When the primary center fails, a primary-backup switch can be performed, that is, the cloud hosts in the backup center are started and services are running. When the primary center recovers, a primary-backup switchback operation can be performed to start the cloud hosts in the primary center and run services. Specifically, the primary-backup switch operation involves the cloud management platform operating the protection group to perform the primary-backup switch. During the primary-backup switch, the status of the protection group is first checked. When the protection group status is "under protection," the primary center operations are as follows: the primary cloud host is shut down and changed to a backup cloud host; the primary storage pool is unloaded; then, the ICS interface is called to switch the direction. After a successful direction switch, the direction changes from primary storage to backup storage to backup storage to primary storage. The backup center operations are as follows: the backup storage pool is mounted; the backup cloud host is powered on and changed to a primary cloud host to run services. The primary / standby failover operation is specifically performed by the cloud management platform's operation protection group. The standby center's operations include: shutting down the standby cloud host, renaming it to a standby cloud host, unloading the standby storage pool, and then calling the ICS interface to switch the direction. After a successful direction switch, the direction changes from standby storage to primary storage to primary storage to standby storage. The primary center's operations include: mounting the primary storage pool, powering on the primary cloud host, renaming it to a primary cloud host, and continuing business operations.
[0061] For the aforementioned disaster recovery scheme, during the primary / standby switchover process, after the primary storage pool in the primary center is unloaded, the standby storage pool in the standby center may fail to mount. Similarly, during the primary / standby fallback process, the primary storage pool in the primary center may also fail to mount. This is because when ICS calls the underlying storage, the underlying storage volume may be in a read-only state for a period of time due to storage performance issues. This causes the storage pool to fail to mount, and it needs to wait for a period of time until it becomes read-write before it can be successfully mounted. This leads to a probabilistic failure rate in the protection group's primary / standby switchover and fallback operations. When the storage system performance is good and fast, the success rate of primary / standby switchover and fallback operations is high; when the storage system performance is poor and slow, these operations are more prone to failure.
[0062] Therefore, in this application, before mounting the storage pool, a corresponding mounting count threshold is set based on the performance indicators of the storage device corresponding to the storage pool to be mounted. Within the mounting count threshold, multiple mounting operations are performed on the storage pool to ensure that the underlying storage volume in the storage device is out of read-only state. The mounting operation of the storage pool is performed when the underlying storage volume in the storage device is in read-write state, thereby improving the mounting success rate of the storage pool and thus improving the success rate of disaster recovery operations.
[0063] This application discloses a cloud server disaster recovery method, which improves the success rate of disaster recovery operations.
[0064] See Figure 1 A flowchart illustrating a cloud server disaster recovery method according to an exemplary embodiment is shown below. Figure 1 As shown, it includes:
[0065] S101: When it is necessary to perform a primary / backup switch of the cloud host, the first cloud host is changed from the primary cloud host to the backup cloud host, and the first storage pool is unloaded.
[0066] This embodiment applies to a protection group, which includes a first cloud host, a second cloud host, a first storage pool and a first storage device corresponding to the first cloud host, a second storage pool and a second storage device corresponding to the second cloud host. The first cloud host is the current primary cloud host, its corresponding first storage pool is the current primary storage pool, and its first storage device is the current primary storage device. The second cloud host is the current backup cloud host, its corresponding second storage pool is the current backup storage pool, and its second storage device is the current backup storage device.
[0067] In practice, when the protection group needs to perform a primary / backup switch, the status of the protection group is checked. If the protection group is in a protected state, the first cloud host is shut down and the first cloud host is changed from the primary cloud host to the backup cloud host. Then, the first storage pool is unloaded and the direction of the protection group is switched from the first cloud host to the second cloud host to the second cloud host to the first cloud host.
[0068] As a preferred implementation, unloading the first storage pool includes: the cloud management platform unloading the first storage pool by calling the interface of the virtualization resource pool, and generating a first call record in the log file; wherein, the first call record includes a timestamp of unloading the first storage pool and first interaction information between the cloud management platform and the virtualization resource pool;
[0069] In practice, during the primary / standby switchover, log files are carried out. The cloud management platform unloads the first storage pool by calling the virtualization resource pool's interface, generating a first call record in the log file. This record includes the timestamp of the unloading of the first storage pool and the interaction information between the cloud management platform and the virtualization resource pool. Then, the cloud management platform switches the protection group's direction from the first cloud host to the second cloud host to the second cloud host through the virtualization resource pool's interface.
[0070] S102: Obtain the performance index information of the second storage device, and determine the mount count threshold based on the index information; wherein the mount count threshold is negatively correlated with the performance of the second storage device characterized by the index information;
[0071] In this embodiment, before mounting the second storage pool, the volume_driver of the second storage device returns real-time performance metrics of the second storage device. These metrics may include CPU (Central Processing Unit) utilization, memory utilization, network speed, and network latency. This performance metrics information is saved to a database. When mounting the second storage pool is required, the performance metrics of the second storage device are retrieved from the database. A mount count threshold is determined based on these metrics, and the mount count threshold is negatively correlated with the performance of the second storage device as represented by the metrics. Better performance of the second storage device means a faster transition from read-only to read-write state for the underlying storage volume, allowing for a lower mount count threshold. Conversely, poorer performance means a slower transition from read-only to read-write state for the underlying storage volume, requiring a higher mount count threshold to ensure the second storage pool is mounted only when the underlying storage volume is in a read-write state.
[0072] In a preferred embodiment, obtaining performance index information of the second storage device and determining a mount count threshold based on the index information includes: obtaining index information of multiple performance indicators of the second storage device; determining the influence index of the multiple performance indicators and determining the target performance indicator with the largest influence index; determining the index level based on the index information of the target performance indicator and determining the mount count threshold based on the index level; wherein the index level is negatively correlated with the performance of the second storage device characterized by the index information of the target performance indicator, and the mount count threshold is positively correlated with the index level.
[0073] In practical implementation, multiple performance indicators of the second storage device are obtained, and the corresponding indicator level is determined based on the indicator information of the target performance indicator with the greatest impact. For example, CPU utilization and memory utilization are expressed as percentages and divided into indicator levels: 0-20% is considered excellent performance (Level 1); 20%-40% is considered good performance (Level 2); 40%-60% is considered good performance (Level 3); 60%-80% is considered critical performance (Level 4); and above 80% is considered poor performance (Level 5). Similarly, network latency of 1-50 seconds is considered normal (Level 1); 50-100 seconds is considered average (Level 2); 100-200 seconds is considered poor (Level 3); 200-500 seconds is considered very poor (Level 4); and network latency greater than 500 seconds is considered extremely poor (Level 5). Furthermore, the threshold for the number of mounts can be determined based on the indicator level. For example, the threshold for the number of mounts corresponding to Level 1 can be set to 5 times, Level 2 can be set to 8 times, Level 3 can be set to 10 times, Level 4 can be set to 15 times, and Level 5 can be set to 20 times.
[0074] In a preferred embodiment, determining the influence index of the plurality of performance indicators includes: determining the influence index of the plurality of performance indicators based on the performance of the second storage device characterized by the indicator information of the plurality of performance indicators; wherein the influence index is negatively correlated with the performance of the second storage device characterized by the indicator information of the performance indicators.
[0075] In practical implementation, the impact index of a performance indicator is determined based on the performance of the second storage device as represented by the performance indicator information. The better the performance of the second storage device as represented by the performance indicator information, the lower the impact index of that performance indicator; conversely, the worse the performance of the second storage device as represented by the performance indicator information, the higher the impact index of that performance indicator. Furthermore, the performance indicator with the largest impact index is determined as the target performance indicator, that is, the worst performance indicator of the second storage device as represented by the indicator information is determined as the target performance indicator. A mount count threshold is determined based on the target performance indicator information to ensure that when the mount count reaches the threshold, the underlying storage volume in the second storage device can transition from a read-only state, improving the success rate of subsequent mounts to the second storage pool, and thus improving the success rate of disaster recovery operations.
[0076] S103: Mount the second storage pool. If the mounting is successful, change the second cloud host from the backup cloud host to the primary cloud host. If the mounting fails, determine whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, re-enter the step of mounting the second storage pool. If the current mounting count is equal to the mounting count threshold, mount the first storage pool through a rollback operation and change the first cloud host from the backup cloud host to the primary cloud host.
[0077] In practice, the system continuously attempts to mount the second storage pool within the mounting count threshold. If the mounting is successful, the second cloud host is powered on and changed from a backup cloud host to a primary cloud host. If the mounting count still fails after reaching the mounting count threshold, a rollback operation is performed, the first storage pool is mounted, and the first cloud host is changed back from a backup cloud host to a primary cloud host.
[0078] As a preferred embodiment, mounting the second storage pool includes: the virtualization resource pool mounting the second storage pool by calling the storage device system, and generating a second call record in the log file; wherein, the second call record includes a timestamp of mounting the second storage pool and second interaction information between the virtualization resource pool and the storage device system.
[0079] In practice, the virtualization resource pool calls the storage device system to mount the second storage pool and generates a second call record in the log file, which includes the timestamp of mounting the second storage pool and the interaction information between the virtualization resource pool and the storage device system.
[0080] As a preferred implementation, after mounting the first storage pool through a rollback operation and changing the first cloud host from a backup cloud host to a primary cloud host, the method further includes: uploading the log file to perform primary / backup switchover fault analysis based on the log file.
[0081] In practice, if the mounting attempt still fails after reaching the mounting threshold, the log file will be sent to the UI (User Interface) of the cloud management platform after the rollback operation. Based on the displayed content, developers can quickly locate the fault or performance problem and solve it.
[0082] The cloud host disaster recovery method provided in this application sets a corresponding mount count threshold based on the performance indicators of the second storage device before mounting the second storage pool. Within the mount count threshold, the second storage pool is mounted multiple times to ensure that the underlying storage volume in the second storage device is out of read-only state. The second storage pool is mounted when the underlying storage volume in the second storage device is in read-write state, thereby improving the mounting success rate of the second storage pool and thus improving the success rate of disaster recovery operations.
[0083] This application discloses another cloud server disaster recovery method, specifically:
[0084] See Figure 2 A flowchart illustrating another cloud server disaster recovery method according to an exemplary embodiment, such as... Figure 2 As shown, it includes:
[0085] S201: When a primary / backup switchover of a cloud host is required, the status of the protection group is checked. If the protection group is in a protected state, the second cloud host is shut down and the second cloud host is changed from a primary cloud host to a backup cloud host.
[0086] In practice, when the protection group needs to perform a primary / backup switchover, the status of the protection group is checked. If the protection group is in a protected state, the second cloud host is shut down and changed from the primary cloud host to the backup cloud host.
[0087] S202: The cloud management platform unloads the second storage pool by calling the interface of the virtualization resource pool and generates a third call record in the log file; wherein, the third call record includes a timestamp of unloading the second storage pool and third interaction information between the cloud management platform and the virtualization resource pool;
[0088] In practice, log files are carried during the primary / standby switchover. The cloud management platform unloads the second storage pool by calling the virtualization resource pool's interface and generates a third call record in the log file, which includes the timestamp of unloading the second storage pool and the interaction information between the cloud management platform and the virtualization resource pool.
[0089] S203: Switch the direction of the protection group from the second cloud host to the first cloud host to the first cloud host to the second cloud host;
[0090] In practice, the cloud management platform switches the protection group direction from the second cloud host to the first cloud host and from the first cloud host to the second cloud host by calling the virtualization resource pool interface.
[0091] S204: Obtain the indicator information of multiple performance indicators of the first storage device, determine the influence index of the multiple performance indicators, and determine the target performance indicator with the largest influence index.
[0092] S205: Determine the indicator level based on the indicator information of the target performance indicator, and determine the mount number threshold based on the indicator level; wherein, the indicator level is negatively correlated with the performance of the second storage device characterized by the indicator information of the target performance indicator, and the mount number threshold is positively correlated with the indicator level;
[0093] In practice, the indicator information of multiple performance indicators of the first storage device is obtained, the corresponding indicator level is determined based on the indicator information of the target performance indicator with the greatest impact, and the threshold for the number of mounts is determined based on the indicator level.
[0094] S206: The virtualization resource pool mounts the first storage pool by calling the storage device system and generates a fourth call record in the log file; wherein, the fourth call record includes a timestamp of mounting the first storage pool and fourth interaction information between the virtualization resource pool and the storage device system;
[0095] In practice, the virtualization resource pool calls the storage device system to mount the first storage pool and generates a fourth call record in the log file, which includes the timestamp of mounting the first storage pool and the interaction information between the virtualization resource pool and the storage device system.
[0096] S207: If the mounting is successful, control the first cloud host to power on and change the first cloud host from the backup cloud host to the primary cloud host;
[0097] S208: If mounting fails, determine whether the current mounting count is less than the mounting count threshold; if yes, proceed to step S206 again; if yes, proceed to S209.
[0098] S209: By performing a rollback operation, mount the second storage pool, change the second cloud host from a backup cloud host to a primary cloud host, and upload the log file to perform primary / backup failover analysis based on the log file.
[0099] In practice, the system continuously attempts to mount the first storage pool within a certain number of mounting attempts. If the mounting is successful, the first cloud host is powered on and changed from a backup cloud host to a primary cloud host. If the mounting attempts still fail after reaching the threshold, a rollback operation is performed, mounting the second storage pool is initiated, and the second cloud host is changed back from a backup cloud host to a primary cloud host. Log files are then sent to the UI of the cloud management platform for display. Based on the displayed content, developers can quickly locate faults or performance issues and resolve them.
[0100] The cloud server disaster recovery method provided in this application sets a corresponding mount count threshold based on the performance indicators of the first storage device before mounting the first storage pool. Within the mount count threshold, the first storage pool is mounted multiple times to ensure that the underlying storage volume in the first storage device is out of read-only state. The first storage pool is mounted when the underlying storage volume in the first storage device is in read-write state, thereby improving the mounting success rate of the first storage pool and thus improving the success rate of primary-standby failover.
[0101] The following describes an application embodiment of the cloud server disaster recovery system provided in this application. Figure 3 As shown, the cloud management platform is used for primary / standby switching or primary / standby rollback of cloud hosts. The cloud management platform connects to the primary virtualization resource pool and the standby virtualization resource pool respectively. The primary virtualization resource pool includes a primary storage pool, and the standby virtualization resource pool includes a standby storage pool. The primary virtualization resource pool is connected to the primary storage device, and the standby virtualization resource pool is connected to the standby storage device. Data synchronization is performed between the primary storage device and the standby storage device. Both the primary storage device and the standby storage device include the volume_driver.
[0102] The flowchart for primary / standby switchover is as follows: Figure 4 As shown, it includes the following steps:
[0103] Step 1: When the cloud management platform performs a primary / standby switchover for the protection group, it carries a custom document and first verifies the status of the protection group. When the protection group is in a protected state, it shuts down the primary cloud host in the protection group and changes it to a standby cloud host. The cloud management platform calls the ICS interface to unload the primary storage pool. The specific time point and the specific interaction information between the cloud management platform and ICS are recorded in the custom document. If there are any error messages, they are highlighted. Then, the ICS interface is called to switch the protection group direction.
[0104] Step 2: Before mounting the backup storage pool, the system's volume_driver first returns real-time data on metrics such as CPU utilization, memory utilization, and network speed, and stores this data in a database. When mounting the backup storage pool, the system retrieves the current CPU utilization, memory utilization, and network speed from the database. The metric with the highest impact is selected, and a mounting frequency threshold is determined based on this threshold. The backup storage pool is then mounted within this threshold. After successful mounting, the backup cloud host is powered on and designated as the primary cloud host. A custom log document continues to record specific timestamps and interactions between the ICS and storage system, highlighting any error messages. This creates a detailed three-layer log record of the cloud management platform, ICS resource pool, and storage system.
[0105] Step 3: If mounting fails within the mounting attempt threshold, a rollback operation is performed first. The primary storage pool is then mounted, and the primary cloud host is powered on and renamed as the primary cloud host. Detailed logs are then sent to the UI module (located on the cloud management platform) for display. Based on the displayed content, developers can quickly locate and resolve faulty or performance issues.
[0106] The following describes a cloud server disaster recovery device provided in the embodiments of this application. The cloud server disaster recovery device described below and the cloud server disaster recovery method described above can be referred to each other.
[0107] See Figure 5 A structural diagram of a cloud server disaster recovery device is shown according to an exemplary embodiment, such as... Figure 5 As shown, it includes:
[0108] The unloading module 501 is used to change the first cloud host from the primary cloud host to the backup cloud host and unload the first storage pool when a primary-backup switch of the cloud host is required.
[0109] The determining module 502 is used to obtain the performance index information of the second storage device and determine the mount number threshold based on the index information; wherein the mount number threshold is negatively correlated with the performance of the second storage device characterized by the index information.
[0110] Mounting module 503 is used to mount the second storage pool. If the mounting is successful, the second cloud host is changed from a backup cloud host to a primary cloud host. If the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the step of mounting the second storage pool is restarted. If the current mounting count is equal to the mounting count threshold, the first storage pool is mounted through a rollback operation, and the first cloud host is changed from a backup cloud host to a primary cloud host.
[0111] The cloud server disaster recovery device provided in this application embodiment sets a corresponding mount count threshold based on the performance index information of the second storage device before mounting the second storage pool. Within the mount count threshold, the second storage pool is mounted multiple times to ensure that the underlying storage volume in the second storage device is out of read-only state. The second storage pool is mounted when the underlying storage volume in the second storage device is in read-write state, thereby improving the mounting success rate of the second storage pool and thus improving the success rate of disaster recovery operations.
[0112] Based on the above embodiments, as a preferred implementation, the unloading module 501 is specifically used to: when a primary / backup switch of a cloud host is required, verify the status of the protection group; if the protection group is in a protected state, change the first cloud host from the primary cloud host to the backup cloud host, and unload the first storage pool.
[0113] Based on the above embodiments, as a preferred embodiment, the unloading module 501 is specifically used to: control the first cloud host to shut down and change the first cloud host from a primary cloud host to a backup cloud host;
[0114] Accordingly, the mounting module 503 is specifically used to: control the second cloud host to power on, and change the second cloud host from a backup cloud host to a primary cloud host.
[0115] Based on the above embodiments, as a preferred embodiment, it further includes:
[0116] The switching module is used to switch the direction of the protection group from the first cloud host to the second cloud host to the second cloud host to the first cloud host.
[0117] Based on the above embodiments, as a preferred implementation, the unloading module 501 is specifically used for: the cloud management platform unloading the first storage pool by calling the interface of the virtualization resource pool, and generating a first call record in the log file; wherein, the first call record includes a timestamp of unloading the first storage pool and first interaction information between the cloud management platform and the virtualization resource pool;
[0118] Accordingly, the mounting module 503 is specifically used for: the virtualization resource pool mounting the second storage pool by calling the storage device system, and generating a second call record in the log file; wherein, the second call record includes a timestamp of mounting the second storage pool and second interaction information between the virtualization resource pool and the storage device system; after mounting the first storage pool through a rollback operation and changing the first cloud host from a backup cloud host to a primary cloud host, the log file is uploaded to perform primary / backup switchover fault analysis based on the log file.
[0119] Based on the above embodiments, as a preferred implementation, the determining module 502 is specifically used to: acquire indicator information of multiple performance indicators of the second storage device; determine the influence index of the multiple performance indicators, and determine the target performance indicator with the largest influence index; determine the indicator level according to the indicator information of the target performance indicator, and determine the mount number threshold according to the indicator level; wherein, the indicator level is negatively correlated with the performance of the second storage device characterized by the indicator information of the target performance indicator, and the mount number threshold is positively correlated with the indicator level.
[0120] Based on the above embodiments, as a preferred embodiment, it further includes:
[0121] The primary / standby failover module is used to verify the status of the protection group when a primary / standby failover of a cloud host is required. If the protection group is in a protected state, it controls the second cloud host to shut down and changes the second cloud host from the primary cloud host to the standby cloud host. The cloud management platform unloads the second storage pool by calling the virtualization resource pool interface and generates a third call record in the log file. The third call record includes a timestamp of unloading the second storage pool and third interaction information between the cloud management platform and the virtualization resource pool. The direction of the protection group is switched from the second cloud host to the first cloud host to the first cloud host to the second cloud host. The module obtains the indicator information of multiple performance indicators of the first storage device, determines the impact index of multiple performance indicators, and determines the target performance indicator with the largest impact index. The module determines the indicator level based on the indicator information of the target performance indicator and determines the mount number threshold based on the indicator level. The indicator level and the indicator information of the target performance indicator represent... The performance of the second storage device is negatively correlated with the performance of the index level, and the mount count threshold is positively correlated with the index level. The virtualization resource pool mounts the first storage pool by calling the storage device system and generates a fourth call record in the log file. The fourth call record includes a timestamp of mounting the first storage pool and fourth interaction information between the virtualization resource pool and the storage device system. If the mount is successful, the first cloud host is powered on and changed from a backup cloud host to a primary cloud host. If the mount fails, it is determined whether the current mount count is less than the mount count threshold. If the current mount count is less than the mount count threshold, the virtualization resource pool re-enters the step of mounting the first storage pool by calling the storage device system. If the current mount count is equal to the mount count threshold, the second storage pool is mounted by a rollback operation, the second cloud host is changed from a backup cloud host to a primary cloud host, and the log file is uploaded for primary / backup failover analysis based on the log file.
[0122] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0123] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device. Figure 6 This is a structural diagram of an electronic device according to an exemplary embodiment, such as... Figure 6 As shown, the electronic device includes:
[0124] Communication interface 1 enables information exchange with other devices, such as network devices;
[0125] Processor 2 is connected to communication interface 1 to enable information exchange with other devices and, when running computer programs, executes the cloud host disaster recovery method provided by one or more of the above-mentioned technical solutions. The computer program is stored on memory 3.
[0126] Of course, in practical applications, the various components in an electronic device are coupled together through bus system 4. It can be understood that bus system 4 is used to achieve communication and connection between these components. In addition to the data bus, bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 6 The general will label all buses as Bus System 4.
[0127] The memory 3 in this embodiment is used to store various types of data to support the operation of the electronic device. Examples of such data include any computer program used to operate on the electronic device.
[0128] It is understood that memory 3 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 3 described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0129] The methods disclosed in the embodiments of this application can be applied to processor 2, or implemented by processor 2. Processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 2 or by instructions in the form of software. The processor 2 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 2 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 3. Processor 2 reads the program in memory 3 and completes the steps of the aforementioned method in combination with its hardware.
[0130] When processor 2 executes the program, it implements the corresponding processes in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.
[0131] In an exemplary embodiment, this application also provides a non-volatile storage medium storing a computer program that can be executed by a processor 2 to perform the steps described in the aforementioned method.
[0132] In an exemplary embodiment, this application also provides a computer program product, including a computer program executed by a processor 2 to perform the steps described in the aforementioned method.
[0133] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to computer program instructions. The aforementioned computer program can be stored in a non-volatile storage medium, and when executed, it performs the steps of the above method embodiments. Alternatively, if the integrated units of this application are implemented as software functional modules and sold or used as independent products, they can also be stored in a non-volatile storage medium. Based on this understanding, the technical solutions of the embodiments 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 non-volatile storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, network device, etc.) to execute all or part of the methods described in the various embodiments of this application.
[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A cloud server disaster recovery method, characterized in that, Applied to a protection group, the protection group includes a first cloud host, a second cloud host, a first storage pool and a first storage device corresponding to the first cloud host, and a second storage pool and a second storage device corresponding to the second cloud host; The method includes: When a primary / backup switch of a cloud server is required, the first cloud server is changed from the primary cloud server to the backup cloud server, and the first storage pool is unloaded. Obtain performance metrics information of the second storage device, and determine a mount count threshold based on the metrics information; wherein the mount count threshold is negatively correlated with the performance of the second storage device as represented by the metrics information; If the second storage pool is successfully mounted, the second cloud host is changed from a backup cloud host to a primary cloud host. If the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the process of mounting the second storage pool is restarted. If the current mounting count is equal to the mounting count threshold, the first storage pool is mounted through a rollback operation, and the first cloud host is changed from a backup cloud host to a primary cloud host.
2. The cloud server disaster recovery method according to claim 1, characterized in that, Before changing the first cloud host from the primary cloud host to the backup cloud host, the process also includes: Verify the status of the protection group. If the protection group is under protection, then execute the step of changing the first cloud host from the primary cloud host to the backup cloud host.
3. The cloud server disaster recovery method according to claim 1, characterized in that, Changing the first cloud host from the primary cloud host to the backup cloud host includes: Control the shutdown of the first cloud host and change the first cloud host from the primary cloud host to the backup cloud host; Accordingly, the second cloud host will be changed from a backup cloud host to a primary cloud host, including: Control the second cloud host to power on, and change the second cloud host from a backup cloud host to a primary cloud host.
4. The cloud server disaster recovery method according to claim 1, characterized in that, After unloading the first storage pool, the process also includes: Switch the direction of the protection group from the first cloud host to the second cloud host to the second cloud host to the first cloud host.
5. The cloud server disaster recovery method according to claim 1, characterized in that, Unloading the first storage pool includes: The cloud management platform unloads the first storage pool by calling the interface of the virtualization resource pool and generates a first call record in the log file; wherein, the first call record includes a timestamp of unloading the first storage pool and first interaction information between the cloud management platform and the virtualization resource pool; Accordingly, mounting the second storage pool includes: The virtualization resource pool mounts the second storage pool by calling the storage device system and generates a second call record in the log file; wherein, the second call record includes a timestamp of mounting the second storage pool and second interaction information between the virtualization resource pool and the storage device system; Accordingly, after mounting the first storage pool through a rollback operation and changing the first cloud host from a backup cloud host to a primary cloud host, the process also includes: Upload the log file to perform primary / standby switchover fault analysis based on the log file.
6. The cloud server disaster recovery method according to claim 1, characterized in that, Obtain performance metrics information of the second storage device, and determine a mount count threshold based on the metric information, including: Obtain indicator information for multiple performance metrics of the second storage device; Determine the impact index of multiple performance indicators, and identify the target performance indicator with the largest impact index; The indicator level is determined based on the indicator information of the target performance indicator, and the mount count threshold is determined based on the indicator level; wherein, the indicator level is negatively correlated with the performance of the second storage device characterized by the indicator information of the target performance indicator, and the mount count threshold is positively correlated with the indicator level.
7. The cloud server disaster recovery method according to claim 1, characterized in that, Also includes: When a primary / backup failover of a cloud host is required, the status of the protection group is checked. If the protection group is in a protected state, the second cloud host is shut down and changed from a primary cloud host to a backup cloud host. The cloud management platform unloads the second storage pool by calling the interface of the virtualization resource pool and generates a third call record in the log file; wherein, the third call record includes a timestamp of unloading the second storage pool and third interaction information between the cloud management platform and the virtualization resource pool; Switch the direction of the protection group from the second cloud host to the first cloud host to the first cloud host to the second cloud host; Obtain the indicator information of multiple performance indicators of the first storage device, determine the influence index of the multiple performance indicators, and determine the target performance indicator with the largest influence index. The indicator level is determined based on the indicator information of the target performance indicator, and the mount number threshold is determined based on the indicator level; wherein, the indicator level is negatively correlated with the performance of the second storage device characterized by the indicator information of the target performance indicator, and the mount number threshold is positively correlated with the indicator level; The virtualization resource pool mounts the first storage pool by calling the storage device system and generates a fourth call record in the log file; wherein, the fourth call record includes a timestamp of mounting the first storage pool and a fourth interaction information between the virtualization resource pool and the storage device system; If the mounting is successful, control the first cloud host to power on and change the first cloud host from the backup cloud host to the primary cloud host; If the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the process re-enters the virtualization resource pool and mounts the first storage pool by calling the storage device system. If the current mounting count is equal to the mounting count threshold, the second storage pool is mounted through a rollback operation, the second cloud host is changed from a backup cloud host to a primary cloud host, and the log file is uploaded to perform primary / backup failover analysis based on the log file.
8. A cloud server disaster recovery device, characterized in that, Applied to a protection group, the protection group includes a first cloud host, a second cloud host, a first storage pool and a first storage device corresponding to the first cloud host, and a second storage pool and a second storage device corresponding to the second cloud host; The device includes: The unloading module is used to change the first cloud host from the primary cloud host to the backup cloud host and unload the first storage pool when a primary-backup switch of the cloud host is required. The determination module is used to obtain performance index information of the second storage device and determine a mount count threshold based on the index information; wherein the mount count threshold is negatively correlated with the performance of the second storage device characterized by the index information. The mounting module is used to mount the second storage pool. If the mounting is successful, the second cloud host is changed from a backup cloud host to a primary cloud host. If the mounting fails, it is determined whether the current mounting count is less than the mounting count threshold. If the current mounting count is less than the mounting count threshold, the step of mounting the second storage pool is restarted. If the current mounting count is equal to the mounting count threshold, the first storage pool is mounted through a rollback operation, and the first cloud host is changed from a backup cloud host to a primary cloud host.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the cloud host disaster recovery method as described in any one of claims 1 to 7 when executing the computer program.
10. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a computer program, which, when executed, implements the steps of the cloud host disaster recovery method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Cross-data center intra-city disaster recovery method, device and equipment based on cloud platform
CN113821384A
Storage mounting method and device, electronic equipment and computer readable storage medium
CN115421663A