Method for implementing distributed block storage, distributed block storage system and device

CN122777064APending Publication Date: 2026-09-18SINA TECH (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611159008.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

在存储单元的数量较大时,建立的存储单元与对应的子系统之间的连接的数量也较大,由此可能会带来资源消耗增加和可扩展性变差的问题

Benefits of technology

[0025] This application provides a computer-readable storage medium storing a computer program or instructions thereon, which, when executed by a processor, implements the steps of any method provided in this application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122777064A_ABST
    Figure CN122777064A_ABST
Patent Text Reader

Abstract

This application provides a method, system, and apparatus for implementing distributed block storage. The method is executed by a distributed block storage system, which includes a host and a metadata service. The method includes: the host sending an allocation request to the metadata service; the host including multiple storage units; the metadata service allocating at least one subsystem to the multiple storage units in the host according to the allocation request; the subsystem managing the hardware storage device associated with the subsystem; and, where at least two first storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is one of the at least one subsystems and is associated with the same hardware storage device. This application reduces resource consumption, lowers connection management complexity, and improves the scalability of the distributed block storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to distributed block storage technology, and more particularly to a method for implementing distributed block storage, a distributed block storage system, and an apparatus. Background Technology

[0002] Distributed block storage technology has been widely used in cloud computing, databases, and high-performance computing. To improve data read and write performance and enable flexible data distribution, a distributed block storage device is typically divided into multiple fixed-size storage units (such as chunks), with each storage unit corresponding to storage space in the hardware storage device.

[0003] When multiple storage units in a distributed block storage device need to be accessed, a connection needs to be established between each storage unit and its corresponding subsystem. When the number of storage units is large, the number of connections between these units and their corresponding subsystems also increases, potentially leading to increased resource consumption and reduced scalability. Summary of the Invention

[0004] This application provides a method, system, and apparatus for implementing distributed block storage, which can reduce resource consumption, reduce connection management complexity, and improve the scalability of the distributed block storage system.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides a method for implementing distributed block storage, which is executed by a distributed block storage system including a host and a metadata service. The method includes: the host sending an allocation request to the metadata service, wherein the host includes multiple storage units; the metadata service allocating at least one subsystem to the multiple storage units in the host according to the allocation request; wherein the subsystem is used to manage the hardware storage device associated with the subsystem; in the case that at least two first storage units among the multiple storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is a subsystem of at least one subsystem and is associated with the same hardware storage device.

[0007] This application provides a method for implementing distributed block storage. The method is executed by a distributed block storage system, which includes a host and a metadata service. The metadata service allocates at least one subsystem to multiple storage units on the host. Each subsystem manages hardware storage devices associated with it. The method includes: the host sending an operation request to a first subsystem, wherein the operation request includes identification information of a first namespace and operation information; the first subsystem is a subsystem allocated by the metadata service to at least two first storage units among the multiple storage units and belonging to one of the at least one subsystem; the first subsystem includes multiple namespaces corresponding to the at least two first storage units; the first subsystem sending the operation information to the first namespace corresponding to the identification information; and the first subsystem sending an operation result to the host, wherein the operation result is obtained after the first namespace in the first subsystem executes the operation information.

[0008] This application provides a distributed block storage system, which includes a host and a metadata service. The host is used to send an allocation request to the metadata service, wherein the host includes multiple storage units. The metadata service is used to allocate at least one subsystem to the multiple storage units in the host according to the allocation request. The subsystem is used to manage the hardware storage device associated with the subsystem. When at least two first storage units in the multiple storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is a subsystem of at least one subsystem and is associated with the same hardware storage device.

[0009] In some embodiments, there is a direct connection between the host and the first subsystem, wherein the direct connection is shared by at least two first storage units.

[0010] In some embodiments, the direct connection includes a first direct connection and a second direct connection. The first direct connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management. The second direct connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0011] In some embodiments, the plurality of storage units further includes one or more second storage units, each second storage unit corresponding to a hardware storage device, and a second subsystem allocated to each second storage unit is a subsystem of at least one subsystem and is associated with a hardware storage device corresponding to each second storage unit; the host has a connection with each second subsystem; the connection between the host and each second subsystem includes a first connection and a second connection; the first connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management; the second connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0012] In some embodiments, the host is configured to send a first request to the metadata service, wherein the first request is configured to request the allocation of a subsystem for the newly added third storage unit; the metadata service is configured to allocate the first subsystem to the third storage unit in response to the third storage unit being mapped to the same hardware storage device corresponding to at least two first storage units.

[0013] In some embodiments, the host is configured to send a second request to the metadata service, wherein the second request is configured to request the removal of the mapping relationship between the first subsystem and any first storage unit; in response to the second request, the metadata service removes the mapping relationship between the first subsystem and any first storage unit.

[0014] This application provides a distributed block storage system, which includes a host and a metadata service. The metadata service is used to allocate at least one subsystem to multiple storage units in the host. The subsystem is used to manage the hardware storage devices associated with the subsystem. The host is used to send an operation request to a first subsystem, wherein the operation request includes identification information of a first namespace and operation information. The first subsystem is a subsystem allocated by the metadata service to at least two first storage units among the multiple storage units and belongs to at least one of the at least one subsystem. The first subsystem includes multiple namespaces corresponding to the at least two first storage units respectively. The first subsystem is used to send the operation information to the first namespace corresponding to the identification information. The first subsystem is also used to send an operation result to the host, wherein the operation result is obtained after the first namespace in the first subsystem executes the operation information.

[0015] In some embodiments, the host is further configured to perform the following steps: when the operation request is a first operation request related to management, the host sends a first operation request to the first subsystem through a first direct connection between the host and the first subsystem; when the operation request is a second operation request related to input or output, the host sends a second operation request to the first subsystem through a second direct connection between the host and the first subsystem.

[0016] This application provides an implementation apparatus for distributed block storage, applied to a distributed block storage system, which includes a host and a metadata service. The apparatus includes: an allocation request sending module, used by the host to send an allocation request to the metadata service, wherein the host includes multiple storage units; and an allocation module, used by the metadata service to allocate at least one subsystem to the multiple storage units in the host according to the allocation request; wherein the subsystem is used to manage the hardware storage device associated with the subsystem; and when at least two first storage units among the multiple storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is one of the at least one subsystems and is associated with the same hardware storage device.

[0017] In some embodiments, the above-described distributed block storage implementation apparatus further includes: an establishment module for establishing a direct connection between the host and the first subsystem, wherein the direct connection is shared by at least two first storage units.

[0018] In some embodiments, the direct connection includes a first direct connection and a second direct connection. The first direct connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management. The second direct connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0019] In some embodiments, the plurality of storage units further includes one or more second storage units, each second storage unit corresponding to a hardware storage device, and a second subsystem allocated to each second storage unit is a subsystem of at least one subsystem and is associated with a hardware storage device corresponding to each second storage unit; the establishment module is further configured to establish a connection between the host and each second subsystem; wherein the connection between the host and each second subsystem includes a first connection and a second connection; the first connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management; the second connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0020] In some embodiments, the above-described distributed block storage implementation apparatus further includes: a first request sending module, configured to send a first request to a metadata service, wherein the first request is used to request the allocation of a subsystem for a newly added third storage unit; and an allocation module, configured to allocate the first subsystem to the third storage unit in response to the third storage unit being mapped to the same hardware storage device corresponding to at least two first storage units.

[0021] In some embodiments, the above-described distributed block storage implementation apparatus further includes: a second request sending module, configured to send a second request to a metadata service, wherein the second request is configured to request the removal of the mapping relationship between the first subsystem and any first storage unit; and a removal module, configured to, in response to the second request, remove the mapping relationship between the first subsystem and any first storage unit.

[0022] This application provides an implementation apparatus for distributed block storage, applied to a distributed block storage system. The distributed block storage system includes a host and a metadata service. The metadata service is used to allocate at least one subsystem to multiple storage units in the host. The subsystem is used to manage hardware storage devices associated with the subsystem. The apparatus includes: a first sending module, used by the host to send an operation request to the first subsystem, wherein the operation request includes identification information of a first namespace and operation information; the first subsystem is a subsystem allocated by the metadata service to at least two first storage units among the multiple storage units and belongs to at least one subsystem; the first subsystem includes multiple namespaces corresponding to the at least two first storage units respectively; a second sending module, used by the first subsystem to send the operation information to the first namespace corresponding to the identification information; and a third sending module, used by the first subsystem to send an operation result to the host, wherein the operation result is obtained after the first namespace in the first subsystem executes the operation information.

[0023] In some embodiments, the first sending module is further configured to send a first operation request to the first subsystem via a first direct connection between the host and the first subsystem when the operation request is a first operation request related to management; and to send a second operation request to the first subsystem via a second direct connection between the host and the first subsystem when the operation request is a second operation request related to input or output.

[0024] This application provides an electronic device, including: a processor; and a memory for storing computer programs or instructions; wherein the processor executes the computer programs or instructions to implement the steps in any of the methods provided in this application.

[0025] This application provides a computer-readable storage medium storing a computer program or instructions thereon, which, when executed by a processor, implements the steps of any method provided in this application.

[0026] This application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps of any method provided in this application.

[0027] The technical solution provided by the embodiments of this application can include the following beneficial effects: the host sends an allocation request to the metadata service, and the metadata service responds to the allocation request by allocating at least one subsystem to multiple storage units in the host. When the multiple storage units include at least two first storage units corresponding to the same hardware storage device, the metadata service allocates one first subsystem associated with the same hardware storage device within the at least one subsystem to the at least two first storage units. Thus, allocating one first subsystem to at least two first storage units, compared to allocating a different first subsystem to each first storage unit, reduces the number of allocated first subsystems. This, in turn, reduces the number of connections established when establishing a connection between the first subsystem and the host, thereby reducing resource consumption, reducing connection management complexity, and improving the scalability of the distributed block storage system.

[0028] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0030] Figure 1 This is a structural block diagram of a distributed block storage system according to an exemplary embodiment.

[0031] Figure 2 This is a flowchart illustrating an implementation method of distributed block storage according to an exemplary embodiment.

[0032] Figure 3 This is a flowchart illustrating another implementation method of distributed block storage according to an exemplary embodiment.

[0033] Figure 4 This is a structural block diagram of another distributed block storage system according to an exemplary embodiment.

[0034] Figure 5 This is a structural block diagram of another distributed block storage system according to an exemplary embodiment.

[0035] Figure 6 This is a structural block diagram illustrating an implementation apparatus for distributed block storage according to an exemplary embodiment.

[0036] Figure 7 This is a structural block diagram illustrating another implementation apparatus for distributed block storage according to an exemplary embodiment.

[0037] Figure 8This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0039] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0040] In the following description, the terms “first, second, third, fourth, fifth” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second, third, fourth, fifth” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0041] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0042] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.

[0043] With the development of non-volatile memory express (NVMe) technology, distributed block storage systems based on the NVMe architecture (NVMe over fabrics, NVMe-oF) have been widely used. In NVMe-oF, the host (also known as the client) connects to the NVMe target via a network and performs corresponding operations through the NVMe protocol.

[0044] The host side can be a distributed block storage device (block device), which typically provides storage resources from multiple remote storage nodes (such as hardware storage devices). A block device can include multiple storage units, such as multiple chunks; a block device can be a chunk-based block device. The NVMe target side can be an NVMe-oF target side, or a service process, which manages the corresponding hardware storage device. An NVMe target side can include one or more NVMe subsystems, and each NVMe subsystem can include a namespace. Hardware storage devices can include hard disks, such as NVMe disks.

[0045] Here, the NVMe subsystem is a logical entity defined in the NVMe protocol, which is responsible for managing storage resources and providing NVMe services to the outside world; the namespace is the logical block address space that can be accessed in the NVMe protocol; the NVMe target can be implemented through the storage performance development kit (SPDK), which is an open source tool.

[0046] In one example, one NVMe target corresponds to one NVMe hard drive, and one NVMe hard drive corresponds to one or more storage units.

[0047] In high-performance distributed block storage applications, one approach is to divide the block device into multiple fixed-size storage units, each of which is independently mapped to storage resources on a hardware storage device. This storage unit-based architecture enables flexible data distribution and improves concurrent access performance.

[0048] To ensure isolation and security between different block devices and different storage units, related technologies employ a scheme of creating an NVMe subsystem for each storage unit (i.e., each chunk). When a host accesses at least one storage unit contained within that host, it needs to connect to the NVMe subsystem corresponding to that storage unit. Based on this, when a host accesses an NVMe subsystem in an NVMe target device, an independent remote direct memory access (RDMA) connection needs to be established for each NVMe subsystem. Specifically, an RDMA connection corresponding to an NVMe subsystem includes at least one admin queue pair (admin-qp) RDMA connection and one input / output queue pair (I / O-qp) RDMA connection.

[0049] In some embodiments, the management queue to the RDMA connection can be used at least to transmit management-related operation requests and operation results corresponding to those requests; the management queue to the RDMA connection can also be used to transmit other requests and operation results, which is not limited in this embodiment. In some embodiments, the input / output queue to the RDMA connection can be used at least to transmit input or output-related operation requests and data associated with those requests; the input / output queue to the RDMA connection can also be used to transmit other requests, operation results, data, etc., which is not limited in this embodiment.

[0050] In some embodiments, when the number of storage units on the host side is large, for example, the number of storage units is 1000 and the number of NVMe subsystems corresponding to the storage units is 1000, then the host side needs to establish at least 2000 RDMA connections.

[0051] Therefore, the approach of creating an NVMe subsystem for each storage unit has the following problems in actual deployment and expansion: Since each NVMe subsystem needs to establish an independent RDMA connection, the number of RDMA connections increases linearly with the number of storage units. Furthermore, in practical applications, RDMA network cards and operating systems typically limit the number of queue pairs. When the number of RDMA connections is too large, it may lead to the following problems:

[0052] 1. RDMA network card resources are exhausted;

[0053] 2. The operating system cannot create more queue pairs;

[0054] 3. Increased complexity in managing connections within distributed block storage systems;

[0055] 4. Distributed block storage systems consume more memory and central processing unit (CPU) resources.

[0056] Therefore, in distributed block storage systems containing a large number of storage units, the number of RDMA connections affects the scalability of the distributed block storage system. How to reduce the number of RDMA connections in a distributed block storage system, thereby reducing resource consumption and improving the scalability of the distributed block storage system, is a problem that needs to be solved.

[0057] The following section introduces distributed block storage systems in related technologies.

[0058] Figure 1 This is a structural block diagram illustrating a distributed block storage system according to an exemplary embodiment. For example... Figure 1 As shown: The distributed block storage system includes: host 100, NVMe target 101, NVMe target 102, NVMe target 103, NVMe hard disk 104, NVMe hard disk 105, and NVMe hard disk 106. The host terminal 100 includes storage units 1001, 1002, 1003, and 1004; the NVMe target terminal 101 includes subsystem 1011, which includes namespace 10111; the NVMe target terminal 102 includes subsystems 1021 and 1022, which include namespace 10211 and namespace 10221; the NVMe target terminal 103 includes subsystem 1031, which includes namespace 10311; there are two RDMA connections between the host terminal 100 and subsystem 1011, two RDMA connections between the host terminal 100 and subsystem 1021, two RDMA connections between the host terminal 100 and subsystem 1022, and two RDMA connections between the host terminal 100 and subsystem 1031.

[0059] In some embodiments, Figure 1Storage unit 1001 corresponds to NVMe hard drive 104, which in turn corresponds to NVMe target 101. NVMe hard drive 104 is associated with subsystem 1011 within NVMe target 101. Storage unit 1001 corresponds to subsystem 1011, and also corresponds to namespace 10111 within subsystem 1011. Storage units 1002 and 1003 both correspond to NVMe hard drive 105, which corresponds to NVMe target 102. NVMe hard drive 105 is associated with subsystems 1021 and 1022 within NVMe target 102. Unit 1002 corresponds to subsystem 1021, and storage unit 1002 corresponds to namespace 10211 in subsystem 1021. Storage unit 1003 corresponds to subsystem 1022, and storage unit 1003 corresponds to namespace 10221 in subsystem 1022. Storage unit 1004 corresponds to NVMe hard disk 106, NVMe hard disk 106 corresponds to NVMe target terminal 103, NVMe hard disk 106 is associated with subsystem 1031 in NVMe target terminal 103, storage unit 1004 corresponds to subsystem 1031, and storage unit 1004 corresponds to namespace 10311 in subsystem 1031.

[0060] In some embodiments, Figure 1 The two RDMA connections between the host 100 and each corresponding subsystem can be: management queue to RDMA connection and input / output queue to RDMA connection.

[0061] In some embodiments, Figure 1 Storage unit 1001 can communicate with subsystem 1011 via an RDMA connection between host 100 and subsystem 1011, so that namespace 10111 in subsystem 1011 can perform corresponding operations; storage unit 1002 can communicate with subsystem 1021 via an RDMA connection between host 100 and subsystem 1021, so that namespace 10211 in subsystem 1021 can perform corresponding operations; storage unit 1003 can communicate with subsystem 1022 via an RDMA connection between host 100 and subsystem 1022, so that namespace 10221 in subsystem 1022 can perform corresponding operations; storage unit 1004 can communicate with subsystem 1031 via an RDMA connection between host 100 and subsystem 1031, so that namespace 10311 in subsystem 1031 can perform corresponding operations.

[0062] In some embodiments, Figure 1 The host 100 requires a separate RDMA connection to access the subsystem corresponding to each storage unit.

[0063] In some embodiments, Figure 1 The storage units 1001 to 1004 in the embodiment can have the same capacity, for example, 2GB; the storage units 1001 to 1004 can also have different capacities, which is not limited in this embodiment.

[0064] In some embodiments, Figure 1 NVMe target terminals 101 to 104 can receive and process operation requests from host terminal 100. Each NVMe target terminal can expose its own subsystems and the namespaces included in the subsystems. Each NVMe target terminal can translate the operation requests from host terminal 100 into operations on the NVMe hard drives corresponding to each NVMe target terminal. Figure 1 The NVMe target in the system can mount one or more subsystems.

[0065] In some embodiments, Figure 1 In Figure 1 Subsystems 1011, 1021, 1022, and 1031 can be NVMe subsystems or other subsystems, and no restrictions are imposed in this embodiment.

[0066] In some embodiments, Figure 1 NVMe hard drives 104 to 106 are all hardware storage devices with fixed storage capacities. Each NVMe hard drive can correspond to one or more storage units. For example, a 2GB storage unit corresponds to a 2GB storage space, and the 2GB storage space is located in the NVMe hard drive corresponding to the 2GB storage unit.

[0067] In some embodiments, Figure 1 The number of storage units, NVMe target devices, subsystems, namespaces, and NVMe hard drives involved are for illustrative purposes only, and the embodiments of this application do not impose specific limitations on them.

[0068] This application provides a method, system, and apparatus for implementing distributed block storage, which can solve the problems caused by a large number of storage units on the host side in related technologies.

[0069] In this embodiment, the host sends an allocation request to the metadata service. In response, the metadata service allocates at least one subsystem to multiple storage units on the host. If the multiple storage units include at least two first storage units corresponding to the same hardware storage device, the metadata service allocates one first subsystem associated with the same hardware storage device within the at least one subsystem to the at least two first storage units. Thus, allocating one first subsystem to at least two first storage units reduces the number of allocated first subsystems compared to allocating a different first subsystem to each first storage unit. This reduces the number of connections established when establishing a connection between the first subsystem and the host, thereby reducing resource consumption, connection management complexity, and improving the scalability of the distributed block storage system.

[0070] In some embodiments, the distributed block storage implementation method provided in this application can be executed by a distributed block storage system, which can be deployed in an electronic device. The electronic device may include a terminal, a server, or a combination of a terminal and a server. This application does not specifically limit this.

[0071] In some embodiments, the terminal may be a smartphone, tablet computer, laptop computer, desktop computer, etc., but is not limited to these; the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The server may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms; the terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiments of this application.

[0072] Figure 2 This is a flowchart illustrating an implementation method of distributed block storage according to an exemplary embodiment. For example... Figure 2 As shown, this method is executed by a distributed block storage system, which includes a host and a metadata service. The method mainly includes the following steps:

[0073] In step 201, the host sends an allocation request to the metadata service.

[0074] In step 202, the metadata service allocates at least one subsystem to multiple storage units in the host based on the allocation request.

[0075] In some embodiments, the host in step 201 can be a distributed block storage device (hereinafter referred to as a block device), such as a chunk-based block device. The host can also be other devices, which are not limited in this embodiment. The host can include multiple storage units; the multiple storage units can be obtained by the metadata service dividing the total virtual space capacity according to a fixed size capacity or a non-fixed size capacity; the capacity of different storage units can be the same or different, which are not limited in this embodiment.

[0076] In some embodiments, the metadata service in step 201 can be a service process that can be used to build the mapping relationship between storage units, NVMe target terminals, subsystems, namespaces, and hardware storage devices.

[0077] In some embodiments, the allocation request in step 201 is used to request the metadata service to allocate at least one subsystem to multiple storage units in the host. The subsystem can be an NVMe subsystem or other subsystems, and no limitation is made in this embodiment.

[0078] In some embodiments, for step 202, after receiving the allocation request sent by the host, the metadata service allocates at least one subsystem to the multiple storage units included in the host in response to the allocation request.

[0079] In some embodiments, for step 202, the number of storage units corresponding to each hardware storage device may be determined by the metadata service; the same hardware storage device includes storage space corresponding to each of the at least two first storage units.

[0080] In some embodiments, for step 202, when at least two first storage units out of a plurality of storage units are mapped to the same hardware storage device (i.e., at least two first storage units correspond to the same hardware storage device (which may be referred to as the first hardware storage device), the metadata service responds to the allocation request sent by the host and allocates a first subsystem for the at least two first storage units. Here, the first subsystem is one of at least one subsystem and is associated with the same hardware storage device. Thus, at least two first storage units out of a plurality of storage units are mapped to a first subsystem associated with the same hardware storage device.

[0081] In this embodiment of the application, by allocating a first subsystem to at least two first storage units through the above steps 201 to 202, compared to allocating a different first subsystem to each first storage unit, the number of allocated first subsystems can be reduced. As a result, when establishing a connection between the first subsystem and the host, the number of connections established can be reduced, thereby reducing resource consumption, reducing connection management complexity, and improving the scalability of the distributed block storage system.

[0082] In some embodiments, for step 202, where the plurality of storage units further include one or more second storage units, each second storage unit corresponding to a hardware storage device (which may be referred to as a second hardware storage device), the metadata service, in response to an allocation request sent by the host, allocates a second subsystem to each second storage unit. The second subsystem allocated to each second storage unit is a subsystem within at least one subsystem and is associated with the hardware storage device corresponding to each second storage unit. Thus, different second storage units are mapped to different second subsystems, creating a one-to-one correspondence between the second storage units and the second subsystems.

[0083] In some embodiments, after step 202, the above-described method for implementing distributed block storage may further include: establishing a direct connection between the host and the first subsystem, wherein the direct connection is shared by at least two first storage units.

[0084] Understandably, after the metadata service allocates a first subsystem to at least two first storage units on the host side, the distributed block storage system can establish a direct connection between the host side and the first subsystem. This direct connection can be established using software or tools deployed within the distributed block storage system; it can be an RDMA connection. Thus, compared to allocating a different first subsystem to each first storage unit and establishing a connection between each first storage unit and its corresponding first subsystem on the host side, at least two first storage units can share this direct connection, reducing the number of connections established and thereby lowering resource consumption.

[0085] In some embodiments, the direct connection includes a first direct connection and a second direct connection. The first direct connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management. The second direct connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0086] Here, operation requests related to management and operation requests related to input or output are two different types of operation requests. Operation requests related to management can include management-related operation information, such as management commands. Management commands can include at least one of the following: commands to create or delete input / output queue pairs, commands to query device information, commands for namespace management, download commands, and reset commands. Management commands can also include other management-related commands, which are not limited in this embodiment. Operation requests related to input or output can include input or output-related operation information, such as commands to read or write data, and non-management commands.

[0087] Understandably, the first direct connection can be a management queue to an RDMA connection, and the second direct connection can be an input / output queue to an RDMA connection. Thus, by transmitting different types of operation requests and related operation results or data through the first and second direct connections respectively, the processing capacity for operation requests can be improved, processing efficiency increased, and time saved.

[0088] In some embodiments, the plurality of storage units further include one or more second storage units, each second storage unit corresponding to a hardware storage device, and the second subsystem allocated to each second storage unit is a subsystem of at least one subsystem and is associated with a hardware storage device corresponding to each second storage unit; after step 202, the above-described method for implementing distributed block storage may further include: establishing a connection between the host and each second subsystem.

[0089] Here, the connection between the host and each second subsystem can be an RDMA connection; the connection between the host and each second subsystem can include a first connection and a second connection. The first connection can be a management queue to RDMA connection, and the second connection can be an input / output queue to RDMA connection. The first connection is used to transmit management-related operation requests and the operation results corresponding to the management-related operation requests; the second connection is used to transmit input or output-related operation requests and the data associated with the input or output-related operation requests. The second hardware storage device includes storage space corresponding to the first storage unit.

[0090] Understandably, after the metadata service assigns a second subsystem to each second storage unit in the host, the distributed block storage system can establish a connection between the host and each second subsystem. This connection can be established using software or tools deployed within the distributed block storage system. In this way, each second subsystem can communicate with the second storage unit mapped to that subsystem in the host through an independent connection between the host and the corresponding subsystem. This ensures isolation between different storage units, avoids interference, and improves the reliability and security of communication.

[0091] In some embodiments, the NVMe target can be deployed in a distributed block storage system, and the subsystem can be deployed in the NVMe target. Based on this, for step 202 above, the metadata service can also determine the NVMe target corresponding to each storage unit (such as the first storage unit and the second storage unit) among multiple storage units.

[0092] In some embodiments, the mapping relationship between subsystems, hardware storage devices, and NVMe target terminals can be as follows: each subsystem corresponds to a hardware storage device, each hardware storage device corresponds to an NVMe target terminal, and each NVMe target terminal contains a subsystem.

[0093] In some embodiments, since each hardware storage device corresponds to one NVMe target, at least two first storage units among multiple storage units are mapped to the same hardware storage device, which can mean that at least two first storage units are mapped to the same NVMe target associated with the same hardware storage device (i.e., at least two first storage units are located on the same NVMe target associated with the same hardware storage device), and the first subsystem allocated to at least two first storage units is located in the same NVMe target associated with the same hardware storage device.

[0094] In some embodiments, since each hardware storage device corresponds to one NVMe target, the second storage unit in a plurality of storage units corresponding to one hardware storage device can mean that each second storage unit is mapped to an NVMe target associated with the hardware storage device corresponding to the second storage unit (i.e., different second storage units are located on different NVMe target), and the second subsystem allocated to each second storage unit is located in the NVMe target associated with the hardware storage device corresponding to the second storage unit.

[0095] In some embodiments, the above-described distributed block storage implementation method may further include: a metadata service sending a first configuration request to a first NVMe target associated with the same hardware storage device to which at least two first storage units are mapped, the first configuration request being used to request the first NVMe target to establish a namespace for each first storage unit; and the first NVMe target responding to the first configuration request establishing a namespace for each first storage unit in the first subsystem.

[0096] Here, each namespace included in the first subsystem has identification information, which distinguishes the namespaces corresponding to different first storage units. The identification information of the namespace can be the namespace's identifier (ID) or other information that can distinguish the namespaces; this embodiment does not impose any restrictions. Thus, by establishing a namespace for each first storage unit through the first NVMe target terminal, the host terminal can distinguish different namespaces by the namespace's identification information when accessing the namespace corresponding to each first storage unit. This facilitates the host terminal's access to the namespaces corresponding to different first storage units, enabling the namespaces to perform corresponding operations.

[0097] In some embodiments, the above-described distributed block storage implementation method may further include: a metadata service sending a second configuration request to a second NVMe target associated with a hardware storage device corresponding to each second storage unit; the second configuration request requesting the second NVMe target to establish a namespace for each second storage unit; and the NVMe target responding to the second configuration request by establishing a namespace for the second storage unit in the second subsystem mapped to each second storage unit. Thus, by establishing a namespace for each second storage unit through the second NVMe target, the host can easily access the namespace corresponding to the second storage unit, enabling the namespace to perform corresponding operations.

[0098] In some embodiments, the host-side storage units may further include other storage units (such as a third storage unit, a fourth storage unit, a fifth storage unit, a sixth storage unit, etc.). Since each of these other storage units has an associated hardware storage device, a mapped subsystem, and an associated third NVMe target, the metadata service sending a third configuration request to the associated third NVMe target enables the associated third NVMe target to respond to the third configuration request and establish a namespace for each storage unit within the mapped subsystem. Thus, by establishing a namespace for each storage unit through the associated third NVMe target, the host-side can easily access the namespace corresponding to each storage unit, enabling the namespace to perform corresponding operations.

[0099] In some embodiments, after step 202, the above-described distributed block storage implementation method may further include: the host sending a first request to the metadata service; in response to the third storage unit being mapped to the same hardware storage device corresponding to at least two first storage units, the metadata service allocating the first subsystem to the third storage unit.

[0100] Here, the first request is used to request the allocation of a subsystem for the newly added third storage unit.

[0101] Understandably, after the metadata service has allocated at least one subsystem to the multiple storage units included on the host, when the metadata service receives a first request from the host, and the third storage unit is mapped to the same hardware storage device corresponding to at least two first storage units, the metadata service will allocate the first subsystem associated with the same hardware storage device to the third storage unit. This allows existing first subsystems to be reused, avoiding the allocation of a new, unused subsystem to the third storage unit. Furthermore, the third storage unit can share the direct connection between the host and the first subsystem, reducing the number of connections established, thereby reducing resource consumption, lowering connection management complexity, and improving the scalability of the distributed block storage system.

[0102] In some embodiments, after step 202, the above-described method for implementing distributed block storage may further include: the host sending a second request to the metadata service; in response to the second request, the metadata service releasing the mapping relationship between the first subsystem and any first storage unit.

[0103] Here, the second request is used to request the removal of the mapping relationship between the first subsystem and any first storage unit. To distinguish any first storage unit that needs to have its mapping relationship with the first subsystem removed, this first storage unit can be referred to as the fourth storage unit.

[0104] Understandably, after the metadata service has allocated at least one subsystem to the multiple storage units included on the host, when the metadata service receives a second request from the host, since the second request requests the unmapping of the mapping relationship between the first subsystem and any first storage unit, the metadata service unmaps the first subsystem to any first storage unit. In this way, when a first storage unit is deleted, the mapping relationship between the first subsystem and the first storage unit can be unmapped, reducing the number of storage units managed by the first subsystem.

[0105] In some embodiments, after the metadata service removes the mapping relationship between the first subsystem and the fourth storage unit (i.e., any of the first storage units mentioned above), the implementation method of the distributed block storage may further include: the metadata service sending a fourth configuration request to a fourth NVMe target associated with a hardware storage device corresponding to the fourth storage unit; the fourth configuration request requesting the fourth NVMe target to delete the namespace corresponding to the fourth storage unit; and the fourth NVMe target responding to the fourth configuration request deleting the namespace corresponding to the fourth storage unit in the first subsystem. Thus, deleting the namespace reduces the number of namespaces managed by the first subsystem.

[0106] In some embodiments, after step 202, the above-described distributed block storage implementation method may further include: the host sending a third request to the metadata service; in response to the fifth storage unit being mapped to the same hardware storage device corresponding to a second storage unit, the metadata service assigning a second subsystem associated with the hardware storage device corresponding to the second storage unit to the fifth storage unit.

[0107] Here, the third request is used to request the allocation of a subsystem for the newly added fifth storage unit.

[0108] Understandably, after the metadata service has allocated at least one subsystem to the multiple storage units included on the host, when the metadata service receives a third request from the host, and the fifth storage unit is mapped to the same hardware storage device corresponding to a second storage unit, the metadata service will allocate the second subsystem associated with the hardware storage device corresponding to the second storage unit to the fifth storage unit. This allows for the reuse of existing second subsystems, avoids allocating a new, unused subsystem to the fifth storage unit, and enables the fifth storage unit to share the connection between the host and the second subsystem, reducing the number of connections established. This, in turn, reduces resource consumption, lowers connection management complexity, and improves the scalability of the distributed block storage system.

[0109] In some embodiments, after step 202, the above-described distributed block storage implementation method may further include: the host sending a fourth request to the metadata service; in response to the sixth storage unit being the second storage unit, the metadata service releasing the mapping relationship between the second subsystem and the sixth storage unit.

[0110] Here, the fourth request is used to request the removal of the mapping relationship between the subsystem corresponding to the sixth storage unit and the sixth storage unit.

[0111] Understandably, after the metadata service has allocated at least one subsystem to the multiple storage units included on the host, when the metadata service receives a fourth request from the host, and the sixth storage unit is the second storage unit, the metadata service removes the mapping relationship between the second subsystem and the sixth storage unit. In this way, when the sixth storage unit is deleted, the mapping relationship between the second subsystem and the sixth storage unit can be removed, thus releasing the second subsystem.

[0112] In some embodiments, after the metadata service removes the mapping relationship between the second subsystem and the sixth storage unit, the above-described distributed block storage implementation method may further include: the metadata service sending a fifth configuration request to a fifth NVMe target associated with a hardware storage device corresponding to the sixth storage unit; the fifth configuration request requesting the fifth NVMe target to delete the namespace corresponding to the sixth storage unit; and the fifth NVMe target responding to the fifth configuration request deleting the namespace corresponding to the sixth storage unit in the second subsystem. Thus, the second subsystem can be released by deleting the namespace.

[0113] In some embodiments, the distributed block storage implementation method provided in this application has the following advantages:

[0114] 1. Reduce the number of RDMA connections: Since at least two first storage units can be mapped to a first subsystem associated with the same hardware storage device, and multiple namespaces corresponding to multiple first storage units can be deployed in the first subsystem, at least two first storage units can share a direct connection between the host and the first subsystem, through which they can access the namespaces corresponding to at least two first storage units respectively.

[0115] 2. Reduce RDMA network card resource consumption: Multiple storage units share direct connections between the host and subsystems, which can reduce the number of queue pairs (such as management queue pairs, input / output queue pairs), thereby reducing RDMA network card resource consumption.

[0116] 3. Improve the scalability of distributed block storage systems: When the host contains a large number of storage units, the storage space corresponding to each storage unit can be accessed through a small number of RDMA connections, thereby reducing the number of RDMA connections while maintaining the scalability of the distributed block storage system structure.

[0117] 4. Reduce system management complexity: Reducing the number of RDMA connections can simplify connection management and improve system stability.

[0118] 5. Supports large-scale deployment of distributed block storage systems: Through subsystem allocation methods, the number of RDMA connections can be controlled while ensuring the scalability of the distributed block storage system.

[0119] Figure 3 This is a flowchart illustrating another implementation method of distributed block storage according to an exemplary embodiment. Figure 3 As shown, this method is executed by a distributed block storage system, which includes a host and a metadata service. The metadata service is used to allocate at least one subsystem to multiple storage units in the host. The subsystem is used to manage the hardware storage devices associated with the subsystem (see...). Figure 2 The descriptions in the relevant embodiments are omitted here. The method mainly includes the following steps:

[0120] In step 301, the host sends an operation request to the first subsystem.

[0121] In step 302, the first subsystem sends the operation information to the first namespace corresponding to the identification information.

[0122] In step 303, the first subsystem sends the operation result to the host.

[0123] In some embodiments, the first subsystem in step 301 is a subsystem belonging to at least one subsystem that is allocated by the metadata service to at least two of the multiple storage units; the first subsystem includes multiple namespaces corresponding to the at least two first storage units respectively.

[0124] In some embodiments, the operation request in step 301 includes identification information and operation information of the first namespace.

[0125] In some embodiments, the operation request in step 301 may include at least one of an operation request related to management and an operation request related to input or output. When the operation request is a management-related operation request, the operation information included in the operation request is management-related operation information; when the operation request is an input or output-related operation request, the operation information included in the operation request is input or output-related operation information.

[0126] In some embodiments, for step 301, since the first subsystem includes multiple namespaces, the operation request sent by the host to the first subsystem includes the identification information and operation information of the first namespace.

[0127] In some embodiments, for step 302, after the first subsystem receives the operation request sent by the host, it sends the operation information to the first namespace corresponding to the identification information based on the identification information in the operation request.

[0128] In some embodiments, the operation result in step 303 is obtained after executing the operation information in the first namespace of the first subsystem.

[0129] In some embodiments, for step 303, the first namespace performs an operation corresponding to the operation information on the first storage space to obtain an operation result. The first storage space is the storage space corresponding to the first storage unit in the same hardware storage device that corresponds to the first namespace. Then the first subsystem sends the operation result to the host.

[0130] In one embodiment, for step 303, if the operation information is a management command, the first namespace executes the operation related to the management command, obtains the operation result corresponding to the management command, and the first subsystem sends the operation result to the host. In one embodiment, for step 303, if the operation information is a read data command, the first namespace executes the operation of reading data from the first storage space, obtains the read data, and the first subsystem sends the read data to the host. In one embodiment, for step 303, if the operation information is a write data command, the first namespace executes the operation of writing data to the first storage space, and the first subsystem can send a successful write data operation result to the host.

[0131] Thus, through steps 301 to 303 above, the management process related to the first namespace and the I / O access process related to input or output can be realized through the identification information of the first namespace.

[0132] In some embodiments, step 301 may further include: if the operation request is a first operation request related to management, the host sends a first operation request to the first subsystem through a first direct connection between the host and the first subsystem; if the operation request is a second operation request related to input or output, the host sends a second operation request to the first subsystem through a second direct connection between the host and the first subsystem.

[0133] Understandably, the first operation request and the second operation request are different operation requests. The host sends the first operation request to the first subsystem through the first direct connection, and the host sends the second operation request to the first subsystem through the second direct connection. This allows different types of operation requests to be transmitted through different direct connections, thereby improving the processing capacity of operation requests, increasing processing efficiency, and saving time.

[0134] In some embodiments, the second subsystem includes a namespace corresponding to a second storage unit, and the above-described distributed block storage implementation method may further include: step a, the host sends an operation request to the second subsystem, wherein the operation request includes operation information; step b, the second subsystem sends the operation information to the second namespace included in the second subsystem; step c, the second subsystem sends an operation result to the host, wherein the operation result is obtained by the second namespace in the second subsystem executing the operation information.

[0135] Understandably, since the second subsystem includes a namespace (i.e., the second namespace), the operation request sent by the host to the second subsystem includes operation information, but this operation request does not need to include the identification information of the second namespace. After receiving the operation request from the host, the second subsystem sends the operation information to the second namespace. The second namespace performs the operation corresponding to the operation information on the second storage space to obtain the operation result. This second storage space is the storage space corresponding to the second storage unit in a hardware storage device mapped to the second storage unit corresponding to the second namespace. Then, the second subsystem sends the operation result to the host. In this way, the above method can realize management processes related to management and I / O access processes related to input or output.

[0136] In some embodiments, step a may further include: if the operation request sent by the host to the second subsystem is a first operation request related to management, the host sends the first operation request to the second subsystem through the first connection between the host and the second subsystem; if the operation request sent by the host to the second subsystem is a second operation request related to input or output, the host sends the second operation request to the second subsystem through the second connection between the host and the second subsystem.

[0137] Understandably, the first operation request and the second operation request are different operation requests. The host sends the first operation request to the second subsystem through the first connection, and the host sends the second operation request to the second subsystem through the second connection. This allows different types of operation requests to be transmitted through different connections, thereby improving the processing capacity of operation requests, increasing processing efficiency, and saving time.

[0138] In some embodiments, the distributed block storage implementation method provided in this application can be applied to NVMe-oF-based remote block storage systems, NVMe-oF-based distributed block storage systems, SPDK-based NVMe-oF storage systems, high-performance distributed block storage systems based on RDMA networks, etc., to reduce the number of RDMA connections and improve system scalability.

[0139] The following describes the distributed block storage system corresponding to the implementation method of the distributed block storage provided in the embodiments of this application.

[0140] Based on the same inventive concept, embodiments of this application provide a distributed block storage system to execute the above-described distributed block storage implementation method. Figure 4 This is a structural block diagram of another distributed block storage system according to an exemplary embodiment. For example... Figure 4 As shown, the distributed block storage system mainly includes: a host 401 and a metadata service 402; the host 401 is used to send allocation requests to the metadata service, wherein the host includes multiple storage units; the metadata service 402 is used to allocate at least one subsystem to the multiple storage units in the host according to the allocation request; wherein the subsystem is used to manage the hardware storage device associated with the subsystem; when at least two first storage units in the multiple storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is a subsystem of at least one subsystem and is associated with the same hardware storage device.

[0141] In some embodiments, there is a direct connection between the host 401 and the first subsystem, wherein the direct connection is shared by at least two first storage units.

[0142] In some embodiments, the direct connection includes a first direct connection and a second direct connection. The first direct connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management. The second direct connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0143] In some embodiments, the plurality of storage units further includes one or more second storage units, each second storage unit corresponding to a hardware storage device, and a second subsystem allocated to each second storage unit is a subsystem of at least one subsystem and is associated with a hardware storage device corresponding to each second storage unit; the host 401 is connected to each second subsystem; the connection between the host and each second subsystem includes a first connection and a second connection; the first connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management; the second connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0144] In some embodiments, host 401 is configured to send a first request to metadata service 402, wherein the first request is configured to request the allocation of a subsystem for the newly added third storage unit; metadata service 402 is configured to allocate the first subsystem to the third storage unit in response to the third storage unit being mapped to the same hardware storage device corresponding to at least two first storage units.

[0145] In some embodiments, the host 401 is configured to send a second request to the metadata service 402, wherein the second request is configured to request the removal of the mapping relationship between the first subsystem and any first storage unit; the metadata service 402 is configured to remove the mapping relationship between the first subsystem and any first storage unit in response to the second request.

[0146] Regarding the distributed block storage system in the above embodiments, the specific methods by which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0147] Based on the same inventive concept, embodiments of this application provide a distributed block storage system to execute the above-described distributed block storage implementation method. (Reference) Figure 4The distributed block storage system mainly includes: a host 401 and a metadata service 402; the metadata service 402 is used to allocate at least one subsystem to multiple storage units in the host; the subsystem is used to manage the hardware storage devices associated with the subsystem; the host 401 is used to send an operation request to the first subsystem, wherein the operation request includes identification information of the first namespace and operation information; the first subsystem is a subsystem allocated by the metadata service to at least two first storage units among the multiple storage units and belongs to at least one subsystem; the first subsystem includes multiple namespaces corresponding to the at least two first storage units respectively; the first subsystem is used to send the operation information to the first namespace corresponding to the identification information; the first subsystem is also used to send the operation result to the host, wherein the operation result is obtained after the first namespace in the first subsystem executes the operation information.

[0148] In some embodiments, the host terminal 401 is further configured to perform the following steps: when the operation request is a first operation request related to management, the host terminal 401 sends a first operation request to the first subsystem through a first direct connection between the host terminal 401 and the first subsystem; when the operation request is a second operation request related to input or output, the host terminal 401 sends a second operation request to the first subsystem through a second direct connection between the host terminal 401 and the first subsystem.

[0149] Regarding the distributed block storage system in the above embodiments, the specific methods by which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0150] Figure 5 This is a structural block diagram of another distributed block storage system according to an exemplary embodiment. For example... Figure 5As shown: The distributed block storage system includes: host 500, NVMe target 501, NVMe target 502, NVMe target 503, NVMe hard disk 504, NVMe hard disk 505, and NVMe hard disk 506. The host end 500 includes a second storage unit 5001, a first storage unit 5002, a first storage unit 5003, and a second storage unit 5004. The NVMe target end 501 includes a second subsystem 5011, which includes a namespace 50111. The NVMe target end 502 includes a first subsystem 5021, which includes namespaces 50211 and 50212. The NVMe target end 503 includes a second subsystem 5031, which includes a namespace 50311. The host end 500 and the second subsystem 5011 are connected by a first connection and a second connection. The host end 500 and the first subsystem 5021 are connected by a first direct connection and a second direct connection. The host end 500 and the second subsystem 5031 are connected by a first connection and a second connection. The first storage unit 5002 and the first storage unit 5003 share the first direct connection and the second direct connection.

[0151] In some embodiments, Figure 5 The second storage unit 5001 corresponds to NVMe hard drive 504, which corresponds to NVMe target terminal 501. NVMe hard drive 504 is associated with the second subsystem 5011 in NVMe target terminal 501, and the namespace 50111 in the second subsystem 5011 corresponds to the second storage unit 5001. The first storage units 5002 and 5003 both correspond to NVMe hard drive 505, which corresponds to NVMe target terminal 502. NVMe hard drive 505 is associated with the first subsystem 5021 in NVMe target terminal 502. Both the first storage unit 5002 and the first storage unit 5003 correspond to the first subsystem 5021. The namespace 50211 in the first subsystem 5021 corresponds to the first storage unit 5002, and the namespace 50212 in the first subsystem 5021 corresponds to the first storage unit 5003. The second storage unit 5004 corresponds to the NVMe hard disk 506. The NVMe hard disk 506 corresponds to the NVMe target terminal 503. The NVMe hard disk 506 is associated with the second subsystem 5031 in the NVMe target terminal 503. The namespace 50311 in the second subsystem 5031 corresponds to the second storage unit 5004.

[0152] In some embodiments, Figure 5The second storage unit 5001 can communicate with the second subsystem 5011 through the first connection and the second connection between the host 500 and the second subsystem 5011, so that the namespace 50111 in the second subsystem 5011 can perform corresponding operations; the first storage unit 5002 can communicate with the first subsystem 5021 through the first direct connection and the second direct connection between the host 500 and the first subsystem 5021, so that the namespace 50211 in the first subsystem 5021 can perform corresponding operations; the first storage unit 5003 can communicate with the first subsystem 5021 through the first direct connection and the second direct connection between the host 500 and the first subsystem 5021, so that the namespace 50212 in the first subsystem 5021 can perform corresponding operations; the second storage unit 5004 can communicate with the second subsystem 5031 through the first connection and the second connection between the host 500 and the second subsystem 5031, so that the namespace 50311 in the second subsystem 5031 can perform corresponding operations.

[0153] In some embodiments, Figure 5 The second storage unit 5001, the first storage unit 5002, the first storage unit 5003, and the second storage unit 5004 can have the same capacity, for example, 2GB; the second storage unit 5001, the first storage unit 5002, the first storage unit 5003, and the second storage unit 5004 can also have different capacities, which is not limited in the embodiments of this application.

[0154] In some embodiments, Figure 5 NVMe target terminals 501 to 504 can receive and process operation requests from host terminal 500. Each NVMe target terminal can expose its own subsystems and the namespaces included in the subsystems. Each NVMe target terminal can translate the operation requests from host terminal 500 into operations on the NVMe hard drives corresponding to each NVMe target terminal. Figure 5 Each NVMe target can mount one subsystem.

[0155] In some embodiments, Figure 5 The second subsystem 5011, the first subsystem 5021, and the second subsystem 5031 can be NVMe subsystems or other subsystems, and no restrictions are imposed in this embodiment.

[0156] In some embodiments, Figure 5NVMe drives 504 to 506 are all hardware storage devices with fixed storage capacities. Each NVMe drive can correspond to one or more storage units. For example, a 2GB storage unit corresponds to a 2GB storage space, which is located on the NVMe drive corresponding to the 2GB storage unit.

[0157] In some embodiments, Figure 5 The number of the first storage unit, second storage unit, NVMe target terminal, first subsystem, second subsystem, namespace, and NVMe hard disk involved in this application is only for illustrative purposes and is not specifically limited in this embodiment.

[0158] Based on the same inventive concept, this application provides an implementation apparatus for distributed block storage, which is applied to a distributed block storage system and can execute the above-described implementation method for distributed block storage. Figure 6 This is a structural block diagram illustrating an implementation apparatus for distributed block storage according to an exemplary embodiment. Figure 6 As shown, the device mainly includes: an allocation request sending module 601, used by the host to send an allocation request to the metadata service, wherein the host includes multiple storage units; and an allocation module 602, used by the metadata service to allocate at least one subsystem to the multiple storage units in the host according to the allocation request; wherein the subsystem is used to manage the hardware storage device associated with the subsystem; and in the case where at least two first storage units in the multiple storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is a subsystem of at least one subsystem and is associated with the same hardware storage device.

[0159] In some embodiments, the above-described distributed block storage implementation apparatus further includes: an establishment module for establishing a direct connection between the host and the first subsystem, wherein the direct connection is shared by at least two first storage units.

[0160] In some embodiments, the direct connection includes a first direct connection and a second direct connection. The first direct connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management. The second direct connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0161] In some embodiments, the plurality of storage units further includes one or more second storage units, each second storage unit corresponding to a hardware storage device, and a second subsystem allocated to each second storage unit is a subsystem of at least one subsystem and is associated with a hardware storage device corresponding to each second storage unit; the establishment module is further configured to establish a connection between the host and each second subsystem; wherein the connection between the host and each second subsystem includes a first connection and a second connection; the first connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management; the second connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

[0162] In some embodiments, the above-described distributed block storage implementation apparatus further includes: a first request sending module, configured to send a first request to a metadata service, wherein the first request is configured to request the allocation of a subsystem for a newly added third storage unit; and an allocation module 602, configured to allocate a first subsystem to a third storage unit in response to the third storage unit being mapped to the same hardware storage device corresponding to at least two first storage units.

[0163] In some embodiments, the above-described distributed block storage implementation apparatus further includes: a second request sending module, configured to send a second request to a metadata service, wherein the second request is configured to request the removal of the mapping relationship between the first subsystem and any first storage unit; and a removal module, configured to, in response to the second request, remove the mapping relationship between the first subsystem and any first storage unit.

[0164] 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.

[0165] Based on the same inventive concept, embodiments of this application provide an implementation apparatus for distributed block storage, applied to a distributed block storage system, the distributed block storage system including a host and a metadata service; the metadata service is used to allocate at least one subsystem to multiple storage units in the host; the subsystem is used to manage the hardware storage devices associated with the subsystem; the implementation apparatus for distributed block storage provided in embodiments of this application can execute the above-described implementation method for distributed block storage. Figure 7 This is a structural block diagram illustrating another implementation apparatus for distributed block storage according to an exemplary embodiment. Figure 7As shown, the device mainly includes: a first sending module 701, used by the host to send an operation request to a first subsystem, wherein the operation request includes identification information of a first namespace and operation information; the first subsystem is a subsystem that is allocated by a metadata service to at least two of the multiple storage units and belongs to at least one subsystem; the first subsystem includes multiple namespaces corresponding to the at least two first storage units respectively; a second sending module 702, used by the first subsystem to send the operation information to the first namespace corresponding to the identification information; and a third sending module 703, used by the first subsystem to send an operation result to the host, wherein the operation result is obtained by the first namespace in the first subsystem executing the operation information.

[0166] In some embodiments, the first sending module 701 is further configured to send a first operation request to the first subsystem through a first direct connection between the host and the first subsystem when the operation request is a first operation request related to management; and to send a second operation request to the first subsystem through a second direct connection between the host and the first subsystem when the operation request is a second operation request related to input or output.

[0167] 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.

[0168] Based on the same inventive concept, embodiments of this application provide an electronic device that can be used to implement the above-described distributed block storage implementation method. Figure 8 This is a structural block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a tablet device, a personal digital assistant, etc.

[0169] Reference Figure 8 The electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.

[0170] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0171] Memory 804 is configured to store various types of data to support operation on electronic device 800. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, and videos. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0172] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0173] Multimedia component 808 includes a screen that provides an output interface between electronic device 800 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When electronic device 800 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0174] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0175] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0176] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 may detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or one of its components, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include an optical sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.

[0177] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 8G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID), infrared data association (IrDA), ultra-wideband (UWB), Bluetooth (BT), and other technologies.

[0178] In an exemplary embodiment, the electronic device 800 may be implemented by 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), controllers, microcontrollers, microprocessors, or other electronic components.

[0179] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions. When the computer program or executable instructions are executed by a processor, the processor performs the methods described in this application embodiment, for example... Figure 2 The implementation method of distributed block storage shown is, for example, Figure 3 The implementation method of distributed block storage is shown.

[0180] This application provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the electronic device to perform the distributed block storage implementation method described above in this application.

[0181] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0182] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0183] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0184] As an example, computer-executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0185] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

[0186] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.

[0187] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for implementing distributed block storage, characterized in that, The method is executed by a distributed block storage system, which includes a host and a metadata service; the method includes: The host sends an allocation request to the metadata service, wherein the host includes multiple storage units; The metadata service allocates at least one subsystem to the plurality of storage units in the host according to the allocation request; wherein the subsystem is used to manage the hardware storage device associated with the subsystem; when at least two first storage units in the plurality of storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is one of the at least one subsystems and is associated with the same hardware storage device.

2. The method according to claim 1, characterized in that, The method further includes: A direct connection is established between the host and the first subsystem, wherein the direct connection is shared by the at least two first storage units.

3. The method according to claim 2, characterized in that, The direct connection includes a first direct connection and a second direct connection. The first direct connection is used to transmit management-related operation requests and operation results corresponding to the management-related operation requests. The second direct connection is used to transmit operation requests related to input or output, and data associated with the operation requests related to input or output.

4. The method according to any one of claims 1 to 3, characterized in that, The plurality of storage units further includes one or more second storage units, each second storage unit corresponding to a hardware storage device, and a second subsystem allocated to each second storage unit is one of the at least one subsystems and is associated with the hardware storage device corresponding to each second storage unit; the method further includes: Establish a connection between the host and each second subsystem; wherein the connection between the host and each second subsystem includes a first connection and a second connection; the first connection is used to transmit operation requests related to management and operation results corresponding to the operation requests related to management; the second connection is used to transmit operation requests related to input or output and data associated with the operation requests related to input or output.

5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The host sends a first request to the metadata service, wherein the first request is used to request the allocation of a subsystem for the newly added third storage unit; In response to the third storage unit being mapped to the same hardware storage device corresponding to the at least two first storage units, the metadata service assigns the first subsystem to the third storage unit.

6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The host sends a second request to the metadata service, wherein the second request is used to request the removal of the mapping relationship between the first subsystem and any first storage unit; In response to the second request, the metadata service removes the mapping relationship between the first subsystem and any first storage unit.

7. A method for implementing distributed block storage, characterized in that, This is executed by a distributed block storage system, which includes a host and a metadata service; the metadata service is used to allocate at least one subsystem to multiple storage units in the host. The subsystem is used to manage hardware storage devices associated with the subsystem; the method includes: The host sends an operation request to the first subsystem, wherein the operation request includes identification information and operation information of the first namespace; the first subsystem is a subsystem that is allocated by the metadata service to at least two of the plurality of storage units and belongs to the at least one subsystem; the first subsystem includes a plurality of namespaces corresponding to the at least two first storage units respectively; The first subsystem sends the operation information to the first namespace corresponding to the identification information; The first subsystem sends the operation result to the host, wherein the operation result is obtained by the first namespace in the first subsystem executing the operation information.

8. The method according to claim 7, characterized in that, The host sends an operation request to the first subsystem, including: When the operation request is a first operation request related to management, the host sends the first operation request to the first subsystem through the first direct connection between the host and the first subsystem. When the operation request is a second operation request related to input or output, the host sends the second operation request to the first subsystem through a second direct connection between the host and the first subsystem.

9. A distributed block storage system, characterized in that, The distributed block storage system includes a host and a metadata service; The host is used to send an allocation request to the metadata service, wherein the host includes multiple storage units; The metadata service is used to allocate at least one subsystem to the plurality of storage units in the host according to the allocation request; wherein the subsystem is used to manage the hardware storage device associated with the subsystem; when at least two first storage units in the plurality of storage units are mapped to the same hardware storage device, the first subsystem allocated to the at least two first storage units is a subsystem of the at least one subsystem and is associated with the same hardware storage device.

10. An implementation apparatus for distributed block storage, characterized in that, This is applied to a distributed block storage system, which includes a host and a metadata service; the metadata service is used to allocate at least one subsystem to multiple storage units in the host. The subsystem is used to manage hardware storage devices associated with the subsystem; the apparatus includes: The first sending module is used to send an operation request from the host to the first subsystem, wherein the operation request includes identification information and operation information of the first namespace; the first subsystem is a subsystem that is allocated by the metadata service to at least two of the plurality of storage units and belongs to the at least one subsystem; the first subsystem includes a plurality of namespaces corresponding to the at least two first storage units respectively; The second sending module is used for the first subsystem to send the operation information to the first namespace corresponding to the identification information; The third sending module is used for the first subsystem to send the operation result to the host, wherein the operation result is obtained after the first namespace in the first subsystem executes the operation information.