Cloud system disk repair method and device, electronic equipment and storage medium

CN116932124BActive Publication Date: 2026-10-09BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210335750.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2026-10-09
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

[0005]鉴于此,为解决现有技术中的通过人工修改配置文件的方式对损坏的系统盘进行修复,不仅耗费人力且效率低下的技术问题,本发明实施例提供一种云系统盘修复方法、装置、电子设备及存储介质

Benefits of technology

[0066] The technical solution provided by this invention, upon receiving a system disk repair request, determines an available second virtual machine instance from the cloud platform. The system disk repair request instructs the repair of a faulty system disk mounted on a first virtual machine instance in the cloud platform. The system disk mounted on the first virtual machine instance is then mounted as a data disk to the second virtual machine instance, allowing the second virtual machine instance to perform the repair. After the second virtual machine instance has completed the repair, the data disk is remounted as a system disk back to the first virtual machine instance. This enables automatic system disk repair without manual modification of configuration files, improving repair efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116932124B_ABST
    Figure CN116932124B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a cloud system disk repair method and device, electronic equipment and storage medium, comprising: determining a usable second virtual machine instance from a cloud platform after receiving a system disk repair request, wherein the system disk repair request is used to indicate fault repair of a system disk mounted by a first virtual machine instance in the cloud platform; mounting the system disk mounted by the first virtual machine instance as a data disk to the second virtual machine instance, so as to perform fault repair on the data disk by the second virtual machine instance; and after determining that the second virtual machine instance completes repair on the data disk, remounting the data disk as a system disk to the first virtual machine instance. Thus, automatic repair of the system disk can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the cloud field, and in particular to a cloud system disk repair method, apparatus, electronic device and storage medium. Background Technology

[0002] A cloud server / virtual machine instance refers to a basic computing component consisting of a CPU, memory, operating system, and cloud disk. The cloud disk is divided into a system disk and a data disk. The system disk is used to install the operating system, while the data disk is used to store other data besides the operating system.

[0003] In practical applications, there is a possibility that the system disk mounted on the virtual machine instance may be damaged due to abnormal power outages, abnormal shutdowns, or other reasons.

[0004] Currently, damaged system disks are generally repaired by manually modifying configuration files, which is not only labor-intensive but also inefficient. Summary of the Invention

[0005] In view of this, in order to solve the technical problem that repairing damaged system disks by manually modifying configuration files in the prior art is not only labor-intensive but also inefficient, this invention provides a cloud system disk repair method, device, electronic device and storage medium.

[0006] In a first aspect, embodiments of the present invention provide a cloud system disk repair method, including:

[0007] Upon receiving a system disk repair request, a second available virtual machine instance is determined from the cloud platform. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to be repaired.

[0008] The system disk mounted on the first virtual machine instance is mounted as a data disk to the second virtual machine instance, so that the second virtual machine instance can perform fault repair on the data disk;

[0009] After confirming that the second virtual machine instance has completed the repair of the data disk, the data disk is remounted as a system disk to the first virtual machine instance.

[0010] In one possible implementation, mounting the system disk of the first virtual machine instance as a data disk to the second virtual machine instance includes:

[0011] The system disk mounted on the first virtual machine instance is uninstalled according to the preset system disk uninstallation process.

[0012] Change the properties of the uninstalled system disk to a data disk;

[0013] According to the preset data disk mounting process, the data disk is mounted to the second virtual machine instance.

[0014] In one possible implementation, after unmounting the system disk mounted on the first virtual machine instance, the method further includes:

[0015] The system disk information is stored on the first virtual machine instance;

[0016] The instance identifier of the first virtual machine instance is stored in the metadata of the system disk;

[0017] The step of remounting the data disk as a system disk to the first virtual machine instance includes:

[0018] According to the preset data disk uninstallation process, the repaired data disk is uninstalled from the second virtual machine instance;

[0019] The first virtual machine instance is determined from the cloud platform based on the instance identifier stored in the metadata of the unloaded data disk;

[0020] Verify whether the disk information stored on the first virtual machine instance is consistent with the disk information of the unmounted data disk;

[0021] If they match, the unmounted data disk will be remounted as the system disk to the first virtual machine instance.

[0022] In one possible implementation, after determining an available second virtual machine instance from the cloud platform, the method further includes:

[0023] The system disk fault information is sent to the second virtual machine instance so that the second virtual machine instance can repair the system disk based on the fault information, wherein the system disk repair request carries the fault information.

[0024] In one possible implementation, determining an available second virtual machine instance from the cloud platform includes:

[0025] Determine the running status of each virtual machine instance in the cloud platform;

[0026] Virtual machine instances that are running normally are identified as candidate virtual machine instances;

[0027] Determine the number of data disks mounted for each of the candidate virtual machine instances;

[0028] The candidate virtual machine instances that meet the set conditions are determined as the second virtual machine instance.

[0029] In one possible implementation, after remounting the data disk as a system disk to the first virtual machine instance, the method further includes:

[0030] Output a prompt message to suggest modifying the virtual system login information on the first virtual machine instance;

[0031] If feedback information corresponding to the prompt message is received within a preset time period, the login information of the virtual system on the first virtual machine instance is modified based on the feedback information.

[0032] If no feedback information corresponding to the prompt message is received within the preset time period, then it is determined that the current login information of the virtual system on the first virtual machine instance will remain unchanged.

[0033] In one possible implementation, after remounting the data disk as a system disk to the first virtual machine instance, the method further includes:

[0034] Delete the disk information of the system disk stored on the first virtual machine instance, and / or delete the instance identifier of the first virtual machine instance stored in the metadata of the system disk.

[0035] Secondly, embodiments of the present invention provide a cloud system disk repair device, comprising:

[0036] The determination module is used to determine an available second virtual machine instance from the cloud platform after receiving a system disk repair request. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to perform fault repair.

[0037] The data disk mounting module is used to mount the system disk mounted on the first virtual machine instance as a data disk to the second virtual machine instance, so that the second virtual machine instance can perform fault repair on the data disk;

[0038] The system disk mounting module is used to remount the data disk as a system disk to the first virtual machine instance after determining that the second virtual machine instance has completed the repair of the data disk.

[0039] In one possible implementation, the data disk mounting module is specifically used for:

[0040] The system disk mounted on the first virtual machine instance is uninstalled according to the preset system disk uninstallation process.

[0041] Change the properties of the uninstalled system disk to a data disk;

[0042] According to the preset data disk mounting process, the data disk is mounted to the second virtual machine instance.

[0043] In one possible implementation, the device further includes a storage module, the storage module being used for:

[0044] The system disk information is stored on the first virtual machine instance;

[0045] The instance identifier of the first virtual machine instance is stored in the metadata of the system disk;

[0046] The system disk mounting module is specifically used for:

[0047] According to the preset data disk uninstallation process, the repaired data disk is uninstalled from the second virtual machine instance;

[0048] The first virtual machine instance is determined from the cloud platform based on the instance identifier stored in the metadata of the unloaded data disk;

[0049] Verify whether the disk information stored on the first virtual machine instance is consistent with the disk information of the unmounted data disk;

[0050] If they match, the unmounted data disk will be remounted as the system disk to the first virtual machine instance.

[0051] In one possible implementation, the apparatus further includes a transmitting module, the transmitting module being configured to:

[0052] The system disk fault information is sent to the second virtual machine instance so that the second virtual machine instance can repair the system disk based on the fault information, wherein the system disk repair request carries the fault information.

[0053] In one possible implementation, the determining module is specifically used for:

[0054] Determine the running status of each virtual machine instance in the cloud platform;

[0055] Virtual machine instances that are running normally are identified as candidate virtual machine instances;

[0056] Determine the number of data disks mounted for each of the candidate virtual machine instances;

[0057] The candidate virtual machine instances that meet the set conditions are determined as the second virtual machine instance.

[0058] In one possible implementation, the device further includes an output module, the output module being configured to:

[0059] Output a prompt message to suggest modifying the virtual system login information on the first virtual machine instance;

[0060] If feedback information corresponding to the prompt message is received within a preset time period, the login information of the virtual system on the first virtual machine instance is modified based on the feedback information.

[0061] If no feedback information corresponding to the prompt message is received within the preset time period, then it is determined that the current login information of the virtual system on the first virtual machine instance will remain unchanged.

[0062] In one possible implementation, the apparatus further includes a deletion module, the deletion module being configured to:

[0063] Delete the disk information of the system disk stored on the first virtual machine instance, and / or delete the instance identifier of the first virtual machine instance stored in the metadata of the system disk.

[0064] Thirdly, embodiments of the present invention provide an electronic device, including: a processor and a memory, wherein the processor is configured to execute a cloud system disk repair program stored in the memory to implement the cloud system disk repair method described in any one of the first aspects.

[0065] Fourthly, embodiments of the present invention provide a storage medium storing one or more programs, which can be executed by one or more processors to implement the cloud system disk repair method described in any one aspect.

[0066] The technical solution provided by this invention, upon receiving a system disk repair request, determines an available second virtual machine instance from the cloud platform. The system disk repair request instructs the repair of a faulty system disk mounted on a first virtual machine instance in the cloud platform. The system disk mounted on the first virtual machine instance is then mounted as a data disk to the second virtual machine instance, allowing the second virtual machine instance to perform the repair. After the second virtual machine instance has completed the repair, the data disk is remounted as a system disk back to the first virtual machine instance. This enables automatic system disk repair without manual modification of configuration files, improving repair efficiency. Attached Figure Description

[0067] Figure 1 This is a schematic diagram illustrating an application scenario of the cloud system disk repair method provided in this embodiment of the invention;

[0068] Figure 2 A flowchart illustrating an embodiment of a cloud system disk repair method provided by this invention;

[0069] Figure 3 A flowchart illustrating an embodiment of system disk uninstallation provided by this invention;

[0070] Figure 4 A flowchart illustrating an embodiment of system disk mounting provided by this invention;

[0071] Figure 5 This invention provides an execution logic for mounting a system disk to a virtual machine instance.

[0072] Figure 6 A block diagram illustrating an embodiment of a cloud system disk repair device provided in this invention;

[0073] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0075] The following is an illustrative description of the application scenarios of the cloud system disk repair method provided in the embodiments of the present invention:

[0076] See Figure 1 This is a schematic diagram illustrating an application scenario of the cloud system disk repair method provided in this embodiment of the invention. Figure 1 The cloud platform 10 shown includes multiple virtual machine instances; here we only take virtual machine instances 11 to 13 as an example.

[0077] Optionally, Cloud Platform 10 adopts the nova architecture, which includes NovaAPI, NovaCompute, Novaunimq, and CinderAPI. NovaAPI serves as the portal for the entire nova component, handling all requests to Nova first. NovaCompute is a daemon responsible for managing the lifecycle of virtual machine instances. Novaunimq is responsible for consuming and sending messages, aggregating notification messages from various components. CinderAPI is OpenStack's block storage service, providing volumes for nova virtual machines.

[0078] The cloud system disk repair method provided by the present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0079] See Figure 2 This is a flowchart illustrating an embodiment of a cloud system disk repair method provided by the present invention. As an embodiment, this method can be applied to... Figure 1 The example cloud platform 10. (e.g.) Figure 2 As shown, the method may include the following steps:

[0080] Step 201: After receiving the system disk repair request, determine an available second virtual machine instance from the cloud platform. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to be repaired.

[0081] exist Figure 1 In the application scenario shown, cloud platform 10 receives a system disk repair request via NovaAPI. This system disk repair request instructs for fault repair of the system disk mounted on the first virtual machine instance in the cloud platform. Here, the first virtual machine refers to the virtual machine in the cloud platform whose system disk has failed.

[0082] After receiving the system disk repair request, cloud platform 10 determines an available virtual machine instance (hereinafter referred to as the second virtual machine instance) from the cloud platform. Specifically, NovaCompute in cloud platform 10 can monitor the running status of each virtual machine instance. Therefore, cloud platform 10 can determine an available second virtual machine instance from the cloud platform based on the monitoring results of NovaCompute.

[0083] Furthermore, in the case where the cloud platform includes two or more available virtual machine instances, as an optional implementation, the cloud platform 10 may randomly select one of the virtual machine instances as the second virtual machine instance.

[0084] As another optional implementation, the cloud platform can first identify virtual machine instances that are running normally as candidate virtual machine instances, then determine the number of data disks mounted on each candidate virtual machine instance, and identify the candidate virtual machine instances whose number of mounted data disks meets the set conditions as the second virtual machine instances.

[0085] Here, the conditions can include: the number of mounted data disks is the minimum, or the number of mounted data disks is less than a preset threshold.

[0086] For example, suppose Figure 1In the first virtual machine instance where the system disk failed, virtual machine instance 11 is selected from virtual machine instances 12 and 13 to ensure it is running normally. Assuming both instances 12 and 13 are normal, the number of mounted data disks is then determined. Virtual machine instance 12 is assumed to have one mounted data disk, and virtual machine instance 13 is assumed to have two mounted data disks. Finally, virtual machine instance 12, with the fewest mounted data disks, is selected as the second virtual machine instance.

[0087] Step 202: Mount the system disk mounted on the first virtual machine instance as a data disk to the second virtual machine instance so that the second virtual machine instance can repair the data disk.

[0088] It should be noted that currently each virtual machine instance can only mount one system disk, but can mount multiple data disks. Therefore, in this embodiment of the invention, the system disk mounted by the first virtual machine instance is mounted as a data disk to the second virtual machine instance, so that the second virtual machine instance can repair the faulty data disk (that is, the system disk that was previously mounted by the first virtual machine instance).

[0089] As an example, the system disk mounted on the first virtual machine instance can be mounted as a data disk to the second virtual machine instance through the following steps: unmount the system disk mounted on the first virtual machine instance according to the preset system disk unmounting process, modify the attributes of the unmounted system disk to data disk, and mount the data disk to the second virtual machine instance according to the preset data disk mounting process.

[0090] Specifically, such as Figure 3 The diagram illustrates the process of unloading the system disk of the first virtual machine instance. First, the nova component receives the unloading request for the system disk via the NovaAPI. Then, the NovaAPI checks if the first virtual machine instance has been shut down. Upon confirming that the first virtual machine instance is shut down, the NovaAPI updates the task state of the first virtual machine instance to "detaching_sys_disk" (uninstalling the system disk) and sends the unloading request to NovaCompute. NovaCompute sends "detach_volume.start" (end uninstalling the system disk) to Novaunimq, preparing to begin unloading the system disk, and then calls libvirt to execute the unloading operation. The exception rollback method during disk unloading remains unchanged.

[0091] Furthermore, after unmounting the system disk, the mount records added on the Cinder side are cleaned up during the process of mounting the system disk, preparing for subsequent disk mounting, and the system disk status is changed to "available". At the same time, the status of the first virtual machine instance is updated to "no mounted system disk" and the "unmounted system disk" status is cleared.

[0092] In this embodiment, the properties of the unmounted system disk with a status of "available" are changed to data disk, and then the data disk is mounted to the second virtual machine instance using the nova component.

[0093] Optionally, after unmounting the system disk mounted on the first virtual machine instance, the disk information of the system disk can be stored on the first virtual machine instance; the instance identifier of the first virtual machine instance can be stored in the metadata of the system disk.

[0094] The disk information includes slot information and the system disk ID, used to identify the system disk; the instance identifier includes the ID of the first virtual machine instance, used to identify the first virtual machine instance. Since the system disk can only be mounted back to the source virtual machine instance, after unmounting the system disk mounted on the first virtual machine instance, NovaCompute adds the first virtual machine instance's ID to the system disk's metadata. This allows for quick location of the first virtual machine instance when mounting the system disk back. Furthermore, NovaCompute adds the system disk's disk information to the first virtual machine instance's metadata for verification purposes when mounting the system disk back to the first virtual machine instance.

[0095] Step 203: After confirming that the second virtual machine instance has completed the repair of the data disk, remount the data disk as the system disk to the first virtual machine instance.

[0096] In this embodiment, after the second virtual machine instance completes the repair of the data disk, it sends a repair completion message to the repair system. After receiving the repair completion message, the repair system determines that the second virtual machine instance has completed the repair of the data disk, and then modifies the attributes of the data disk back to the system disk. The repaired system disk is then remounted to the first virtual machine instance using the nova component. The abnormal rollback method of the mounted disk remains unchanged.

[0097] As an example, the data disk can be remounted as a system disk to the first virtual machine instance through the following steps:

[0098] According to the preset data disk unloading process, the repaired data disk is unloaded from the second virtual machine instance; based on the instance identifier stored in the metadata of the unloaded data disk, the first virtual machine instance is determined from the cloud platform; the disk information stored on the determined first virtual machine instance is verified to be consistent with the disk information of the unloaded data disk; if consistent, the unloaded data disk is remounted as a system disk to the first virtual machine instance.

[0099] In this embodiment, the Nova component can be used to unload the repaired data disk from the second virtual machine instance. After the unloading is completed, the attributes of the data disk are modified to system disk, and the first virtual machine instance is determined from the cloud platform based on the instance identifier stored in the system disk metadata.

[0100] like Figure 4 The diagram illustrates the system disk mounting process. First, the nova component receives the system disk mounting request via the NovaAPI. Then, it verifies the first virtual machine instance and the system disk using the NovaAPI. Specifically, it compares the disk information of the system disk with the disk information stored on the first virtual machine instance. If the comparison results are consistent, the system disk is determined to be the system disk that was unmounted from the first virtual machine instance.

[0101] Next, the drive letter of the system disk is obtained, the "task status" of the first virtual machine instance is updated to "attaching_sys_disk" (mounting system disk), and the mount request is sent to NovaCompute. NovaCompute sends "attach_volume.start" (mount start message) to Novaunimq, preparing to start mounting the system disk. Then, libvirt is called to perform the mount operation, and a mount record is added on the Cinder side to record the mount information of the system disk. The status of the system disk is changed to mountable. At the same time, the task status "mounting system disk" is cleared, and the status of the first virtual machine instance is updated to "running". Thus, the system disk is mounted to the location corresponding to the drive letter in the first virtual machine instance.

[0102] After successful mounting, the mapping relationship between the first virtual machine instance and the system disk is recorded on the nova side, indicating that the system disk has been successfully mounted to the first virtual machine instance. This method ensures that the repaired system disk can be remounted to the original virtual machine instance.

[0103] Optionally, after remounting the data disk as a system disk to the first virtual machine instance, the disk information of the system disk stored on the first virtual machine instance is deleted via NovaCompute, and / or the instance identifier of the first virtual machine instance stored in the metadata of the system disk is deleted, thereby clearing useless data in the metadata of the first virtual machine instance and the system disk.

[0104] The technical solution provided by this invention, upon receiving a system disk repair request, determines an available second virtual machine instance from the cloud platform. The system disk repair request instructs the repair of the system disk mounted on the first virtual machine instance in the cloud platform. The system disk mounted on the first virtual machine instance is then mounted as a data disk to the second virtual machine instance, where the second virtual machine instance performs the repair. After the second virtual machine instance has completed the repair, the data disk is remounted as a system disk back to the first virtual machine instance. This enables automatic repair of the system disk without requiring manual modification of configuration files, thus improving repair efficiency.

[0105] Optionally, after remounting the data disk as a system disk to the first virtual machine instance, a prompt message can be output to prompt modification of the virtual system login information on the first virtual machine instance; if feedback information corresponding to the prompt message is received within a preset time period, the login information of the virtual system on the first virtual machine instance is modified based on the feedback information; if no feedback information corresponding to the prompt message is received within the preset time period, the current login information of the virtual system on the first virtual machine instance is maintained unchanged.

[0106] In this embodiment, the output may include sending to a preset terminal or displaying using a visualization component, and the login information may include a password and / or a key. A prompt message is used to prompt the user to modify the virtual system login information on the first virtual machine instance, and the feedback information is the login information that the user wishes to modify.

[0107] Specifically, after remounting the repaired system disk to the first virtual machine instance, a prompt message is output. If feedback information corresponding to the prompt message is received within a preset time period, the login information of the virtual system on the first virtual machine instance is modified by NovaCompute based on the feedback information. If no feedback information corresponding to the prompt message is received within the preset time period, the current login information of the virtual system on the first virtual machine instance is maintained unchanged, wherein the password modification and binding key rollback methods remain unchanged.

[0108] Specifically, NovaCompute modifies the login information of the virtual system on the first virtual machine instance based on the feedback information. This involves obtaining the key or password information from the feedback information through NovaCompute, sending a notification set_admin_password.start / attach_key_pair.start (a message indicating the start of setting the password or key), modifying the password of the first virtual machine instance or rebinding the key, and sending a notification set_admin_password.end / attach_key_pair.end (a message indicating completion of setting the password or binding the key).

[0109] This solution allows users to be prompted to modify their login information when the system disk is remounted back to the first virtual machine instance, and the information is modified based on user feedback, thereby improving system security.

[0110] Figure 5 The diagram illustrates the execution logic provided by an embodiment of the present invention for remounting a repaired system disk to a first virtual machine instance.

[0111] Corresponding to the aforementioned embodiments of the cloud system disk repair method, the present invention also provides embodiments of the cloud system disk repair device.

[0112] See Figure 6 This is a block diagram illustrating an embodiment of a cloud system disk repair device provided by an embodiment of the present invention. Figure 6 As shown, the device includes:

[0113] The determination module 601 is used to determine an available second virtual machine instance from the cloud platform after receiving a system disk repair request. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to be repaired.

[0114] The data disk mounting module 602 is used to mount the system disk mounted on the first virtual machine instance as a data disk to the second virtual machine instance, so that the second virtual machine instance can perform fault repair on the data disk.

[0115] The system disk mounting module 603 is used to remount the data disk as a system disk to the first virtual machine instance after determining that the second virtual machine instance has completed the repair of the data disk.

[0116] In one possible implementation, the data disk mounting module is specifically used for:

[0117] Uninstall the system disk mounted on the first virtual machine instance according to the preset system disk uninstallation process;

[0118] Change the properties of the uninstalled system disk to a data disk;

[0119] Following the preset data disk mounting procedure, the data disk is mounted to the second virtual machine instance.

[0120] In one possible implementation, the device further includes a storage module, the storage module being used for:

[0121] Store the system disk information on the first virtual machine instance;

[0122] The instance identifier of the first virtual machine instance is stored in the metadata of the system disk;

[0123] The system disk mounting module is specifically used for:

[0124] Following the preset data disk uninstallation process, the repaired data disk is uninstalled from the second virtual machine instance;

[0125] The first virtual machine instance is determined from the cloud platform based on the instance identifier stored in the metadata of the unloaded data disk;

[0126] Verify whether the disk information stored on the first identified virtual machine instance is consistent with the disk information of the unmounted data disk;

[0127] If they match, the unmounted data disk will be remounted as the system disk to the first virtual machine instance.

[0128] In one possible implementation, the apparatus further includes a transmitting module, the transmitting module being configured to:

[0129] The system disk fault information is sent to the second virtual machine instance so that the second virtual machine instance can repair the system disk based on the fault information. The system disk repair request carries the fault information.

[0130] In one possible implementation, the determining module is specifically used for:

[0131] Determine the running status of each virtual machine instance in the cloud platform;

[0132] Virtual machine instances that are running normally are identified as candidate virtual machine instances;

[0133] Determine the number of data disks mounted for each candidate virtual machine instance;

[0134] The candidate virtual machine instances that meet the set conditions are selected as the second virtual machine instances.

[0135] In one possible implementation, the device further includes an output module, the output module being used for:

[0136] Output a prompt message to indicate whether the virtual system login information on the first virtual machine instance needs to be modified;

[0137] If feedback information corresponding to the prompt message is received within the preset time period, the login information of the virtual system on the first virtual machine instance is modified based on the feedback information.

[0138] If no feedback information corresponding to the prompt message is received within the preset time period, then the current login information of the virtual system on the first virtual machine instance will be maintained unchanged.

[0139] In one possible implementation, the apparatus further includes a deletion module, the deletion module being configured to:

[0140] Delete the disk information of the system disk stored on the first virtual machine instance, and / or delete the instance identifier of the first virtual machine instance stored in the metadata of the system disk.

[0141] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 7 The illustrated electronic device 700 includes at least one processor 701, a memory 702, at least one network interface 704, and other user interfaces 703. The various components in the electronic device 700 are coupled together via a bus system 705. It is understood that the bus system 705 is used to implement communication between these components. In addition to a data bus, the bus system 705 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 7 The general labeled all buses as Bus System 705.

[0142] The user interface 703 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).

[0143] It is understood that the memory 702 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The 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), or flash memory. The 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), 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), Synchlink Dynamic Random Access Memory (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 702 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0144] In some implementations, memory 702 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 7021 and application program 7022.

[0145] The operating system 7021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 7022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this embodiment can be included in the application program 7022.

[0146] In this embodiment of the invention, by calling the program or instructions stored in the memory 702, specifically the program or instructions stored in the application program 7022, the processor 701 executes the method steps provided in each method embodiment, including, for example:

[0147] Upon receiving a system disk repair request, a second available virtual machine instance is determined from the cloud platform. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to be repaired.

[0148] The system disk mounted on the first virtual machine instance is mounted as a data disk to the second virtual machine instance, so that the second virtual machine instance can repair the data disk.

[0149] After confirming that the second virtual machine instance has completed the repair of the data disk, the data disk is remounted as the system disk to the first virtual machine instance.

[0150] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 701. Processor 701 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 701 or by instructions in the form of software. The processor 701 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 702. Processor 701 reads the information in memory 702 and, in conjunction with its hardware, completes the steps of the above method.

[0151] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0152] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0153] The electronic device provided in this embodiment may be as follows: Figure 7The electronic device shown can perform the following: Figure 2 All steps of the Zhongyun system disk repair method, thereby achieving Figure 2 For details on the technical effectiveness of the cloud system disk repair method shown, please refer to [link / reference]. Figure 2 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0154] This invention also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; the memory may also include combinations of the above types of memory.

[0155] When one or more programs in the storage medium can be executed by one or more processors to implement the cloud system disk repair method executed on the electronic device side.

[0156] The processor is used to execute the cloud system disk repair program stored in memory to implement the following steps of the cloud system disk repair method executed on the electronic device side:

[0157] Upon receiving a system disk repair request, a second available virtual machine instance is determined from the cloud platform. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to be repaired.

[0158] The system disk mounted on the first virtual machine instance is mounted as a data disk to the second virtual machine instance, so that the second virtual machine instance can repair the data disk.

[0159] After confirming that the second virtual machine instance has completed the repair of the data disk, the data disk is remounted as the system disk to the first virtual machine instance.

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

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

[0162] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for repairing a cloud system disk, characterized in that, include: Upon receiving a system disk repair request, a second available virtual machine instance is determined from the cloud platform. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to be repaired. The system disk mounted on the first virtual machine instance is uninstalled according to the preset system disk uninstallation process. The disk information of the system disk is stored on the first virtual machine instance; The instance identifier of the first virtual machine instance is stored in the metadata of the system disk; Change the properties of the uninstalled system disk to a data disk; According to the preset data disk mounting process, the data disk is mounted to the second virtual machine instance so that the second virtual machine instance can perform fault repair on the data disk; After confirming that the second virtual machine instance has completed the repair of the data disk, the repaired data disk is uninstalled from the second virtual machine instance according to the preset data disk uninstallation process; The first virtual machine instance is determined from the cloud platform based on the instance identifier stored in the metadata of the unloaded data disk; Verify whether the disk information stored on the first virtual machine instance is consistent with the disk information of the unmounted data disk; If they match, the unmounted data disk will be remounted as the system disk to the first virtual machine instance.

2. The method according to claim 1, characterized in that, After determining an available second virtual machine instance from the cloud platform, the method further includes: The system disk fault information is sent to the second virtual machine instance so that the second virtual machine instance can repair the system disk based on the fault information, wherein the system disk repair request carries the fault information.

3. The method according to claim 1, characterized in that, The step of determining an available second virtual machine instance from the cloud platform includes: Determine the running status of each virtual machine instance in the cloud platform; Virtual machine instances that are running normally are identified as candidate virtual machine instances; Determine the number of data disks mounted for each of the candidate virtual machine instances; The candidate virtual machine instances that meet the set conditions are determined as the second virtual machine instance.

4. The method according to claim 1, characterized in that, After remounting the data disk as a system disk to the first virtual machine instance, the method further includes: Output a prompt message to suggest modifying the virtual system login information on the first virtual machine instance; If feedback information corresponding to the prompt message is received within a preset time period, the login information of the virtual system on the first virtual machine instance is modified based on the feedback information. If no feedback information corresponding to the prompt message is received within the preset time period, then it is determined that the current login information of the virtual system on the first virtual machine instance will remain unchanged.

5. The method according to claim 1, characterized in that, After remounting the data disk as a system disk to the first virtual machine instance, the method further includes: Delete the disk information of the system disk stored on the first virtual machine instance, and / or delete the instance identifier of the first virtual machine instance stored in the metadata of the system disk.

6. A cloud system disk repair device, characterized in that, include: The determination module is used to determine an available second virtual machine instance from the cloud platform after receiving a system disk repair request. The system disk repair request is used to instruct the system disk mounted on the first virtual machine instance in the cloud platform to perform fault repair. The data disk mounting module is used to unload the system disk mounted on the first virtual machine instance according to the preset system disk unloading process; The disk information of the system disk is stored on the first virtual machine instance; The instance identifier of the first virtual machine instance is stored in the metadata of the system disk; the attributes of the unmounted system disk are modified to data disk; According to the preset data disk mounting process, the data disk is mounted to the second virtual machine instance so that the second virtual machine instance can perform fault repair on the data disk; The system disk mounting module is used to unload the repaired data disk from the second virtual machine instance according to a preset data disk unloading process after determining that the second virtual machine instance has completed the repair of the data disk. The first virtual machine instance is determined from the cloud platform based on the instance identifier stored in the metadata of the unloaded data disk; Verify whether the disk information stored on the first virtual machine instance is consistent with the disk information of the unmounted data disk; if they are consistent, remount the unmounted data disk as a system disk to the first virtual machine instance.

7. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a cloud system disk repair program stored in the memory to implement the cloud system disk repair method according to any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the cloud system disk repair method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cloud host recovery method and device

    CN110990124A