A method for handling hard disk failures based on cloud hosts

By generating memory disks in the cloud host and pretending to be a failed hard disk, the problem of hard disk failure in the existing technology caused by cloud host startup failure is solved, and no perception replacement is achieved in the event of hard disk failure, improving the reliability and availability of cloud hosts.

CN116069555BActive Publication Date: 2025-08-26CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211435122.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2025-08-26
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

In the prior art, when the physical machine runs Intel's spdk software to provide the physical machine nvme ssd hard disk to the cloud host through vhost-user-blk technology, it cannot hot-replace the vhost-user-blk disk, and the hard disk fails to start the cloud host, affecting the reliability and availability of the data center.

Method used

Through the interaction between the vhost-user-blk protocol and the virtio protocol, a memory disk is generated and disguised as a failed hard disk, accepts IO access, and generates a new memory disk in the memory to replace the failed hard disk, supports vhost-user-blk protocol access, and realizes hot replacement hard disk unawareness.

Benefits of technology

It realizes that the cloud host can replace the hard disk without restarting the hard disk when the hard disk fails, improves the reliability and availability of the cloud host, ensures the normal operation of other data disk services, and avoids the failure scenarios of failed startup of the cloud host.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116069555B_ABST
    Figure CN116069555B_ABST
Patent Text Reader

Abstract

The present invention discloses a cloud host-based hard disk fault handling method, which relates to the technical field of computer hard disks. The cloud host-based hard disk fault handling method, upon discovering that a physical machine hard disk has failed and cannot access the system, generates a memory disk in memory that is consistent with the metadata of the failed hard disk. The memory disk is then accessed and the received access request is accepted. This method allows the cloud host to be unaware of the hard disk replacement, improving cloud host availability, resolving the "hard disk failure causing cloud host startup failure" failure scenario, improving cloud host reliability, and supporting hot replacement of failed disks without cloud host downtime. When a local disk fails, the cloud host can be started normally, and services on other data disks can operate normally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer hard disks, and in particular to a hard disk failure processing method based on a cloud host. Background Art

[0002] In the era of big data, public cloud customers have increasingly stringent requirements for hard disk performance. To provide high-performance hard disk services, various public cloud vendors have begun to provide local disks and ultra-fast cloud disks. The IOPS of ultra-fast cloud disks is bound to the cloud disk capacity. To obtain high IOPS, you need to purchase large-capacity ultra-fast cloud disks. However, the high price of large-capacity ultra-fast cloud disks makes some customers give up. Local disks can provide high IOPS at a low price to meet the requirements of these customers. The current mainstream local disk solutions are: physical machine vfio technology provides physical machine NVMe SSD hard disks to cloud hosts, and physical machines running Intel's SPDK software use vhost-user-blk technology to provide physical machine NVMe SSD hard disks to cloud hosts.

[0003] Among them, the method of using Intel's SPDK software on a physical machine to provide the physical machine NVMe SSD hard disk to the cloud host through the vhost-user-Blk technology is more flexible. Compared with the physical machine VFIO technology to provide the physical machine NVMe SSD hard disk to the cloud host, it has significant advantages. However, the method of using Intel's SPDK software on a physical machine to provide the physical machine NVMe SSD hard disk to the cloud host through the vhost-user-Blk technology also has certain defects, mainly manifested in: 1. The vhost-user-Blk disk cannot be hot-replaced, and the cloud host needs to be restarted to replace the disk; 2. When the physical hard disk fails, the SPDK process cannot create the corresponding vhost-user-BlkController. At this time, if the QEMU cloud host cannot be successfully started after a normal / abnormal power-off, this will bring an unexpected failure scenario, namely "the hard disk failure causes the cloud host to fail to start". When the data center cannot replace the failed hard disk in time, the impact of the failure will be even worse. Summary of the Invention

[0004] In response to the shortcomings of the existing technology, the present invention provides a hard disk failure handling method based on a cloud host, which solves the problem that when a local disk fails, it should not affect the business of other data disks, because the cloud host usually mounts multiple data disks (local disks or cloud disks, or both), which run services with different reliability.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: A hard disk failure processing method based on a cloud host, comprising:

[0006] Use the vhost-user-blk protocol for control plane interaction;

[0007] Then use the virtio protocol for normal IO access;

[0008] Determine whether the physical machine NVMe SSD is connected to the system. The physical machine NVMe SSD provides access to the cloud host through the IO of the Intel SPDK software;

[0009] If connected to the system, it can directly access the physical machine NVMe SSD disk and read data directly through the Virtio protocol;

[0010] If the system cannot be accessed, a new memory disk is generated in the memory and accepts IO access from the physical machine NVMe SSD disk;

[0011] Use the Virtio protocol to access the original faulty disk normally again.

[0012] Furthermore, the data of the memory disk is consistent with the metadata of the faulty hard disk. The memory disk only has metadata but no data or data space.

[0013] Furthermore, the memory disk can support vhost-user-blk protocol access

[0014] Furthermore, when the cloud host reads and writes data through the virtio protocol, the memory disk returns an IO error to the accessed IO.

[0015] Furthermore, after the memory disk is generated, it disguises the IO access to the external cloud host as the original faulty disk and receives the IO request of the original faulty disk.

[0016] Furthermore, the memory disk returns an IO ERROR when performing service read and write requests, which appears to the virtual host as a faulty disk that cannot be read or written.

[0017] Furthermore, the memory disk can normally support access control commands.

[0018] Furthermore, the Intel spdk software is accessed again and directly accesses the nvme ssd disk through the vhost-user-blk protocol.

[0019] Furthermore, the newly generated memory disk in the memory is directly deleted and the data access between vhost-user-blk and virtio is cut off.

[0020] A hard disk fault processing device based on a cloud host, comprising:

[0021] Interaction module, used for control-plane interaction of the vhost-user-blk protocol;

[0022] Access module, used for normal IO access via virtio protocol;

[0023] The judgment module is used to provide the cloud host with physical machine NVMe SSD disk access through Intel SPDK software to determine whether the physical machine NVMe SSD is connected to the system;

[0024] If connected to the system, it can directly access the physical machine NVMe SSD disk and read data directly through the Virtio protocol;

[0025] The generation module, based on the judgment module, generates a new memory disk in the memory if it cannot access the system, and accepts IO access from the physical machine NVMe SSD disk;

[0026] Use the Virtio protocol to access the original faulty disk normally again.

[0027] The present invention has the following beneficial effects:

[0028] When it is discovered that the physical machine hard disk fails and cannot be connected to the system, a memory disk with the same metadata as the failed hard disk is generated in the memory. Then, by accessing the memory disk, the received access request is accepted, so that the cloud host can replace the hard disk without being aware of it, improving the availability of the cloud host, solving the failure scenario of "hard disk failure causing cloud host startup failure", improving the reliability of the cloud host, and supporting hot replacement of failed disks without stopping the cloud host. When the local disk fails, the cloud host can be pulled up normally, and the business on other data disks can run normally.

[0029] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 Automatically generate a memory disk flow chart for the present invention;

[0031] Figure 2 This is the original disk access flow chart of the present invention. DETAILED DESCRIPTION

[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0033] In the description of the present invention, it should be understood that the terms "opening", "upper", "lower", "thickness", "top", "middle", "length", "inside", "around" and the like indicating orientation or positional relationship are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the components or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0034] See also Figure 1-2 The embodiment of the present invention provides a technical solution: a hard disk failure processing method based on a cloud host, comprising:

[0035] Use the vhost-user-blk protocol for control plane interaction;

[0036] Then use the virtio protocol for normal IO access;

[0037] Determine whether the physical machine NVMe SSD is connected to the system. The physical machine NVMe SSD provides access to the cloud host through the IO of the Intel SPDK software;

[0038] If connected to the system, it can directly access the physical machine NVMe SSD disk and read data directly through the Virtio protocol;

[0039] If the system cannot be accessed, a new memory disk is generated in the memory and accepts IO access from the physical machine NVMe SSD disk;

[0040] Use the Virtio protocol to access the original faulty disk normally again.

[0041] Specifically, if Figure 1 As shown in the figure, the data on the memory disk is consistent with the metadata of the faulty hard disk. The memory disk only has metadata, no data or data space.

[0042] In this implementation scheme, the memory disk is generated mainly for normal IO access to the virtio protocol.

[0043] Specifically, the memory disk can support vhost-user-blk protocol access.

[0044] In this implementation, the reliability and availability of the cloud host are greatly improved by supporting interactive access via the vhost-user-blk protocol.

[0045] Specifically, when the cloud host reads and writes data through the virtio protocol, the memory disk returns an IO ERROR for the accessed IO.

[0046] Specifically, after the memory disk is generated, it disguises the IO access to the external cloud host as the original faulty disk and receives the IO request of the original faulty disk.

[0047] In this implementation scheme, the IO request received from the original faulty disk is mainly used to provide access feedback to the virtio of the guestOS.

[0048] Specifically, the memory disk returns an IO ERROR when performing business read and write requests, which appears to the virtual host as a faulty disk that cannot be read or written.

[0049] In this implementation, since the memory disk only has metadata but no data or data space, the read and write requests will be returned as IO ERROR, so the guestOS virtio feedback is a faulty disk that cannot be read or written.

[0050] Specifically, the memory disk can normally support access control commands.

[0051] In this embodiment, the access control command can be a virtio discovery, or it can be the disk uuid, capacity, sector size, etc., where the obtained data is consistent with the original faulty disk.

[0052] Specifically, the Intel spdk software is re-accessed and directly accesses the nvmessd disk through the vhost-user-blk protocol.

[0053] In this implementation scheme, the original failed disk can be directly accessed by reconnecting it to vhost-user-blk, and virtio can read the data on the original disk.

[0054] Specifically, the new memory disk generated in the memory is directly deleted and the data access between vhost-user-blk and virtio is cut off.

[0055] In this embodiment, a new memory disk is generated in the memory for deletion, that is, a memory disk with only metadata is generated to disguise as the original disk and receive access requests from the original disk, thereby completing the hot replacement of the failed disk without stopping the server.

[0056] A hard disk fault processing device based on a cloud host, comprising:

[0057] Interaction module, used for control-plane interaction of the vhost-user-blk protocol;

[0058] Access module, used for normal IO access via virtio protocol;

[0059] The judgment module is used to provide the cloud host with physical machine NVMe SSD disk access through Intel SPDK software to determine whether the physical machine NVMe SSD is connected to the system;

[0060] If connected to the system, it can directly access the physical machine NVMe SSD disk and read data directly through the Virtio protocol;

[0061] The generation module, based on the judgment module, generates a new memory disk in the memory if it cannot access the system, and accepts IO access from the physical machine NVMe SSD disk;

[0062] Use the Virtio protocol to access the original faulty disk normally again.

[0063] In this implementation scheme, the interaction module is used to perform control plane interaction on the vhost-user-blk protocol, thereby realizing the interaction between QEMU and the storage software. Then, the access module is used to perform normal IO access to the virtio protocol. Then, the judgment module is used to determine whether the physical machine nvme ssd is connected to the system. If the IO access is connected to the system, the physical machine nvmessd disk is directly accessed and data is directly read through the virtio protocol.

[0064] If the system cannot be connected, a new memory disk is generated in the memory and accepts IO access from the physical machine NVMe SSD disk. Virtio returns IO ERROR to the business read and write requests. The original failed disk can be directly accessed by reconnecting it to vhost-user-blk, and Virtio can read the data on the original disk.

[0065] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0066] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for handling hard disk failure based on a cloud host, characterized in that: include: Use the vhost-user-blk protocol for control plane interaction; Then use the virtio protocol for normal IO access; Determine whether the physical machine NVMe SSD is connected to the system. The physical machine NVMe SSD provides access to the cloud host through the IO of the Intel SPDK software; If connected to the system, it can directly access the physical machine NVMe SSD disk and read data directly through the Virtio protocol; If the system cannot be accessed, a new memory disk is generated in the memory and accepts IO access from the physical machine NVMe SSD disk; Use the virtio protocol to access the original faulty disk normally again; After being generated, the memory disk disguises the IO access to the external cloud host as the original faulty disk and receives the IO request of the original faulty disk.

2. The cloud host-based hard disk failure handling method according to claim 1, characterized in that: The data of the memory disk is consistent with the metadata of the faulty hard disk. The memory disk only has metadata but no data or data space.

3. The cloud host-based hard disk failure handling method according to claim 2, characterized in that: The memory disk supports vhost-user-blk protocol access.

4. The cloud host-based hard disk failure handling method according to claim 3, characterized in that: When the cloud host reads and writes data through the virtio protocol, the memory disk returns an IO ERROR to the accessed IO.

5. The cloud host-based hard disk failure handling method according to claim 4, characterized in that: The memory disk returns IO ERROR when performing business read and write requests, which appears to the virtual host as a faulty disk that cannot be read or written.

6. The cloud host-based hard disk failure handling method according to claim 1, characterized in that: The memory disk can normally support access control commands.

7. The method for handling hard disk failure based on a cloud host according to claim 1, characterized in that: The Intel spdk software is connected again and directly accesses the nvme ssd disk through the vhost-user-blk protocol.

8. The cloud host-based hard disk failure handling method according to claim 7, characterized in that: The newly generated memory disk in the memory is directly deleted and the data access between vhost-user-blk and virtio is cut off.

9. A hard disk fault handling device based on a cloud host, characterized in that: include: Interaction module, used for control-plane interaction of the vhost-user-blk protocol; Access module, used for normal IO access via virtio protocol; The judgment module is used to provide the cloud host with physical machine NVMe SSD disk access through Intel SPDK software to determine whether the physical machine NVMe SSD is connected to the system; If connected to the system, it can directly access the physical machine NVMe SSD disk and read data directly through the Virtio protocol; The generation module, based on the judgment module, generates a new memory disk in the memory if it cannot access the system, and accepts IO access from the physical machine NVMe SSD disk; Use the virtio protocol to access the original faulty disk normally again; After being generated, the memory disk disguises the IO access to the external cloud host as the original faulty disk and receives the IO request of the original faulty disk.

Citation Information

Patent Citations

  • Shared memory mechanism to support fast transport of sq / cq pair communication between SSD device driver in virtualization environment and physical SSD

    CN112352221A

  • Hard disk mounting method, system, equipment and medium

    CN114064202A