Storage system and storage method

By introducing an IO management controller into the storage system, the host interacts with the flash memory device through the IO management controller, which solves the problem that the host needs to directly handle the underlying details of the flash memory device, and reduces the operation and maintenance burden of the host.

CN120066403AActive Publication Date: 2025-05-30SUZHOU DAPU MICROELECTRONICS TECH CO LTD

Patent Information

Application Number
CN202411970005.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-30
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the prior art, the host needs to directly interact with the flash memory device to understand and process the underlying usage details of the flash memory device, resulting in an increase in the operation and maintenance burden of the host.

Method used

It provides a storage system, including a host, an IO management controller and a flash memory device. The host sends commands to the flash memory device through an IO management controller. The IO management controller controls the flash memory device to perform data operations according to the mapping relationship between the virtual disk and the flash memory device.

Benefits of technology

By blocking the usage details of flash memory devices, the IO management controller completes the management of flash memory devices, reducing the operation and maintenance burden of the host.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066403A_ABST
    Figure CN120066403A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of storage device application, and discloses a storage system and a storage method.The storage system comprises a host, an I < O > management controller and at least one flash memory device, the host is used for sending a first command to the I < O > management controller, and the host comprises at least one virtual disk; the I O management controller is used for controlling the flash memory device to execute data operation according to the first command and the mapping relation between the virtual disk and the flash memory device. The host comprises at least one virtual disk, and the I O management controller is used for controlling the flash memory device to execute the data operation according to the first command sent by the host and the mapping relation between the virtual disk and the flash memory device, so that the use details of the flash memory device can be shielded from the host, the management of the flash memory device is completed by the I O management controller, and the management efficiency is improved. And the operation and maintenance burden of the host is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage device applications, and particularly to a storage system and a storage method. Background Art

[0002] Flash devices, such as Solid State Drives (SSDs), are storage devices using semiconductor flash memory (NAND Flash) as the medium. Currently, when using flash devices, the host needs to directly interact with them to manage and monitor the flash devices.

[0003] In the process of implementing this application, the inventors found that there are at least the following problems in the prior art: The host directly faces the flash device and needs to understand and handle the underlying usage details of the flash device, thus increasing the operation and maintenance burden of the host. Summary of the Invention

[0004] Embodiments of this application aim to provide a storage system and a storage method to reduce the operation and maintenance burden of the host.

[0005] Embodiments of this application provide the following technical solutions:

[0006] In a first aspect, an embodiment of this application provides a storage system, which includes a host, an IO management controller, and at least one flash device. Among them,

[0007] The host is connected to the IO management controller and the flash device, and is used to send a first command to the IO management controller. Among them, the host includes at least one virtual disk;

[0008] The IO management controller is connected to the host and the flash device, and is used to control the flash device to perform data operations according to the first command and the mapping relationship between the virtual disk and the flash device.

[0009] In a second aspect, an embodiment of this application provides a storage method, which is applied to the storage system in the first aspect. The storage method includes:

[0010] Based on the host sending a first command to the IO management controller;

[0011] According to the first command and the mapping relationship between the virtual disk and the flash device, control the flash device to perform data operations through the IO management controller.

[0012] In a third aspect, an embodiment of this application further provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor is caused to execute the storage method in the second aspect.

[0013] Fourthly, an embodiment of the present application provides a computer program product, which includes instructions or a program. When the instructions or the program are executed by a processor, the processor is caused to execute the computer program of the storage method in the second aspect.

[0014] The beneficial effects of the embodiments of the present application are as follows: Different from the prior art, a storage system provided by the embodiments of the present application includes a host, an IO management controller, and at least one flash device. Among them, the host is connected to the IO management controller and the flash device, and is used to send a first command to the IO management controller. The host includes at least one virtual disk; the IO management controller is connected to the host and the flash device, and is used to control the flash device to perform data operations according to the first command and the mapping relationship between the virtual disk and the flash device.

[0015] By including at least one virtual disk in the host, and the IO management controller being used to control the flash device to perform data operations according to the command sent by the host and the mapping relationship between the virtual disk and the flash device, the present application can shield the host from the usage details of the flash device, and the management of the flash device is completed by the IO management controller, thereby reducing the operation and maintenance burden of the host. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplary illustrations do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0017] Figure 1 is a schematic structural diagram of a flash device provided by an embodiment of the present application;

[0018] Figure 2 is a schematic structural diagram of a computing storage system provided by an embodiment of the present application;

[0019] Figure 3 is a schematic structural diagram of a storage system provided by an embodiment of the present application;

[0020] Figure 4 is a detailed schematic structural diagram of a storage system provided by an embodiment of the present application;

[0021] Figure 5 is a schematic diagram of a data domain provided by an embodiment of the present application;

[0022] Figure 6 is a schematic flowchart of a storage method provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts fall within the scope of protection of this application.

[0024] In addition, the technical features involved in the various embodiments of this application described below can be combined with each other as long as they do not conflict with each other.

[0025] A flash memory device, such as a solid state drive (SSD), is a storage device using semiconductor flash memory (NAND Flash) as the medium.

[0026] Please refer to Figure 1 , Figure 1 which is a schematic structural diagram of a flash memory device provided by an embodiment of this application;

[0027] Figure 1 Taking a flash memory device that supports the transparent compression function and adopts the Non-Volatile Memory Express (NVMe) protocol as an example. Among them, transparent compression is a compression technology that does not require user perception or intervention, and the flash memory device will automatically compress the data before writing it into the flash memory.

[0028] As Figure 1 shown, the flash memory device 100 includes a compression and decompression module 101, a control module 102, an internal bus 103, an interface 104, an NVMe controller 105, a cache controller 106, a cache module 107, a flash memory controller 108, and a flash memory array 109.

[0029] The compression and decompression module 101 is connected to the control module 102 and the internal bus 103, and is used to compress and / or decompress data. Among them, the compression and decompression module 101 includes a Compress / Decompress Engine.

[0030] The control module 102 is connected to the compression and decompression module 101 and the internal bus 103, and is used as a control arithmetic unit to manage the internal system of the flash memory device 100. Among them, the control module 102 includes a Central Processing Unit (CPU).

[0031] The internal bus 103 connects the compression and decompression module 101, the control module 102, the NVMe controller 105, and the flash controller 108, and is used to implement data and command transmission between various modules inside the flash memory device 100.

[0032] The interface 104 connects the NVMe controller 105 and is used for communication between the host (not shown in the figure) and the flash memory device 100. Among them, the interface 104 is a Peripheral Component Interconnect Express (PCIe) interface.

[0033] The NVMe controller 105 connects the internal bus 103 and the interface 104, and is responsible for data transmission, protocol parsing, and flash memory management.

[0034] The cache controller 106 connects the internal bus 103 and the cache module 107, and is used to manage the cache module 107.

[0035] The cache module 107 connects the cache controller 106 and the flash controller 108, and is used to cache the algorithm table. Among them, the cache unit includes a Dynamic Random Access Memory (DRAM).

[0036] The flash controller 108 connects the internal bus 103, the cache module 107, and the flash memory array 109, and is used to manage the flash memory array 109. Among them, the flash controller 108 is a flash controller that adopts the Open NAND Flash Interface (ONFI) standard.

[0037] The flash memory array 109 (NAND Flash Array), as a storage unit, is used to store data, including user data and system data. The flash memory array generally presents multiple channels (Channel, CH), and one channel is independently connected to a group of flash memory arrays. For example: Channel 0, Channel 1,..., Channel x are respectively independently connected to a group of flash memory arrays. The characteristic of flash memory (NAND Flash) is that it must be erased before writing, and each flash memory has a limited number of erasure times.

[0038] It can be seen that the flash memory device 100 compresses the data through its internal compression and decompression module 101 and then writes the data into the flash memory, which can store more valid data without changing the capacity, reduce read-write conflicts, improve the mixed read-write performance, and reduce the user cost. Moreover, since it does not rely on the host's compression / decompression operation, the host can use more resources for other tasks.

[0039] Currently, when using a flash memory device, the host needs to directly interact with it to manage and monitor the flash memory device.

[0040] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a compute-storage system provided by an embodiment of the present application;

[0041] As Figure 2 shown, the compute-storage system 200 includes a host 201 and at least one flash memory device 100. The host 201 includes an application 211 and an operating system 212. The operating system 212 includes an NVMe interface 2121, an NVMe driver 2122, and a PCIe driver 2123.

[0042] Among them, the host 201 is communicatively connected to the flash memory device 100. The host 201 is used to manage the flash memory device 100, and the flash memory device 100 is used to store data.

[0043] The application 211 refers to various software running on the operating system 212. The operating system 212 (Operating System, OS) is a system software that manages the hardware and software resources of the host 201 and is used to control and coordinate the work of each part of the host 201. The NVMe interface 2121 is used for communication between the application 211 and the NVMe driver 2122.

[0044] The NVMe driver 2122 is used to convert the storage requests received by the NVMe interface 2121 into commands compliant with the NVMe protocol and communicate with the flash memory device 100 through the PCIe driver 2123.

[0045] The PCIe driver 2123 is used for underlying data transmission between the host 201 and the flash memory device 100 through the PCIe bus. It sends the commands and data packets generated by the NVMe driver 2122 to the flash memory device 100 through the PCIe protocol and receives the data or status information returned by the flash memory device 100.

[0046] When using the flash memory device, the application 211 directly uses the device name generated by the flash memory device 100 in the operating system 212, and the read and write operations are directly sent to the underlying flash memory device 100 through the NVMe driver 2122. The monitoring system (not shown in the figure) of the application 211 or the host 201 needs to periodically check the capacity and health status of the flash memory device 100. If it detects that the capacity or health status exceeds the set safety threshold, then the application 211 needs to process the relevant alarm information and perform data migration if necessary to prevent the CSSD from having a problem of excessive writing.

[0047] It can be seen that since the host directly faces the flash device and needs to understand and handle the underlying usage details of the flash device, the operation and maintenance burden of the host is increased. For example, when the capacity of the flash device exceeds the set security threshold and an alarm is triggered, the host needs to process the alarm content and perform operations such as data migration, increasing the operation and maintenance burden.

[0048] Based on this, the embodiments of the present application provide a storage system that manages flash devices through an IO management controller, shielding the usage details of the flash devices from the host, thereby reducing the operation and maintenance burden of the host.

[0049] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a storage system provided by the embodiments of the present application;

[0050] As Figure 3 shown, the storage system 300 includes a host 301, an IO management controller 302, and at least one flash device 100. The host 301 includes at least one virtual disk 311. Among them, Figure 3 Taking one flash device 100 and one virtual disk 311 as an example.

[0051] The host 301 is connected to the IO management controller 302 and the flash device 100, and is used to send a first command to the IO management controller 302. Among them, the first command is a command sent by the host 301 to the IO management controller 302, and the first command includes a read command or a write command.

[0052] Specifically, the host 301 sends a first command to the IO management controller 302 so that the IO management controller 302 controls the corresponding flash device 100 to perform a data operation according to the first command.

[0053] The IO management controller 302 is connected to the host 301 and the flash device 100, and is used to control the flash device 100 to perform a data operation according to the first command and the mapping relationship between the virtual disk and the flash device. Among them, the data operation includes a read operation or a write operation.

[0054] Specifically, the IO management controller 302 receives the first command sent by the host 301, determines the flash device 100 that needs to perform a data operation according to the first command and the mapping relationship between the virtual disk and the flash device, and controls the flash device 100 to perform the corresponding read operation or write operation.

[0055] A flash memory device 100 is connected to a host 301 and an IO management controller 302 and is used to perform data operations. For example, under the control of the IO management controller 302, the flash memory device 100 performs a read operation, that is, reads the data stored in the flash memory device 100 and transfers the data to the host 301; or, the flash memory device 100 performs a write operation, that is, obtains the data stored in the host 301 and writes the data into the flash memory device 100.

[0056] Please refer to Figure 4 , Figure 4 which is a detailed structural schematic diagram of a storage system provided by an embodiment of the present application;

[0057] As Figure 4 shown, the storage system 300 includes a host 301, an IO management controller 302, and at least one flash memory device 100. The host 301 includes an application program 312, a command management tool 313, an operating system 314, and a PCIe system 315. Among them, the operating system 314 includes a character device 3141 and at least one virtual disk 311. Figure 4 Taking two virtual disks 311 and two flash memory devices 100 as an example.

[0058] Among them, the IO management controller 302 is communicatively connected to each flash memory device 100 through the PCIe system 315, and the components of the host 301 are communicatively connected through an internal bus. The IO management controller 302 and each flash memory device 100 are both PCIe devices, and the host 301, the IO management controller 302, and the flash memory device 100 all communicate through the NVMe protocol.

[0059] The application program 312 is communicatively connected to the operating system 314 and is used to send a first command to the virtual disk 311. Among them, the application program 312 refers to various software running on the operating system 314. The specific type of the application program 312 can be set by those skilled in the art according to the use of the host, and no limitation is made here.

[0060] Specifically, the application program 312 directly performs read and write operations on the virtual disk 311, so that the IO management controller 302 distributes actual input / output (IO) commands (for example: the first command) to one or more different flash memory devices 100.

[0061] The command management tool 313 is communicatively connected to the operating system 314 and is used to send a device configuration command or a disk creation command to the IO management controller 302 through the character device 3141, or create a virtual disk 311 in the operating system 314 based on the control command sent by the IO management controller 302.

[0062] Among them, the command management tool 313 is an application running on the operating system 314. The command management tool 313 includes, but is not limited to, a command-line interface tool (Command-Line Interface, CLI). The device configuration command is used to instruct the IO management controller 302 to perform an outbound address configuration operation and an inbound address configuration operation on each flash device. The disk creation command is used to instruct the IO management controller 302 to create the virtual disk 311 through the command management tool 313, and the control command is used to instruct the command management tool 313 to create the virtual disk 311 within the operating system 314.

[0063] The operating system 314 communicates with and connects to the application 312 and the command management tool 313, and is used to manage the hardware and software resources of the host 201. Among them, the operating system 314 further includes an NVMe driver and a PCIe driver.

[0064] Among them, the virtual disk 311 is a virtual storage area created by the IO management controller 302 through the command management tool 313 within the operating system 314, and the host 301 recognizes each virtual disk 311 as a standard NVMe block device.

[0065] Among them, the character device 3141 communicates with and connects to the command management tool 313 and the PCIe system 315, and is used to send a device configuration command or a disk creation command to the IO management controller 302 under the invocation of the command management tool 313, or send the control command sent by the IO management controller 302 to the command management tool 313. Among them, the character device 3141 is the NVMe character device corresponding to the IO management controller 302.

[0066] Specifically, after the IO management controller 302 is inserted into the host 301, the host 301 manages the IO management controller 302 through the NVMe driver to generate the character device 3141, so that the command management tool 313 and the IO management controller 302 complete command interaction through this character device 3141.

[0067] The PCIe system 315 communicates with and connects to the operating system 314, the IO management controller 302, and the flash device 100, and is used to connect the host 301, the IO management controller 302, and the flash device 100. It provides a high-speed point-to-point communication channel for devices through the PCIe bus protocol.

[0068] In an embodiment of the present application, the operating system 314 includes a base address (BaseAddress Register, BAR) space, the IO management controller 302 includes a storage space, and each flash memory device 100 includes a configuration space. Among them, the base address space is the mapped area of each flash memory device 100 (as a PCIe device) in the physical memory space of the host 301, the storage space is used to store the mapping relationship between the virtual disk and the flash memory device, and the configuration space is a set of registers for configuring and managing the flash memory device 100 (as a PCIe device). The storage space includes, but is not limited to, Dynamic Random-Access Memory (DRAM). For example, the storage space is Double DataRate synchronous dynamic random-access memory (DDR SDRAM).

[0069] Before the host 301 sends a first command to the IO management controller 302, the host is further configured to send a device configuration command to the IO management controller. The IO management controller is further configured to: perform an outbound address configuration operation and an inbound address configuration operation on each flash memory device according to the device configuration command, so as to enable the IO management controller to access the configuration space of each flash memory device, and each flash memory device to access the storage space of the IO management controller.

[0070] Among them, the outbound address configuration operation (Outbound configuration) is used to configure the address mapping relationship between the base address space and the storage space, and the inbound address configuration operation (Inbound configuration) is used to configure the address mapping relationship between the storage space and each configuration space.

[0071] Specifically, before the host 301 sends a first command to the IO management controller 302, the host is configured to: send a device configuration command to the IO management controller based on a command management tool and a PCIe system. Among them, the device configuration command includes the device information of each flash memory device. The device information of the flash memory device includes, but is not limited to, the host base address corresponding to the flash memory device, the capacity of the flash memory device, and the serial number of the flash memory device. The specific content of the device information of the flash memory device can be input by the user to the command management tool 313. The device configuration command is an NVMe custom command (VU command), and the VU command is a command left by the NVMe protocol framework for manufacturers to allow manufacturers to customize.

[0072] Specifically, the command management tool 313 sends the device configuration command to the IO management controller 302 through the character device 3141 and the PCIe system 315.

[0073] Specifically, before the host 301 sends the first command to the IO management controller 302, the IO management controller is used to: perform outbound address configuration operations and inbound address configuration operations on each flash memory device based on the device information and the PCIe system.

[0074] Specifically, the IO management controller 302 receives the device configuration command sent by the host 301, implements the outbound address configuration operation through the peer-to-peer communication (P2P) technology of the PCIe system 315, establishes the address mapping relationship between the base address space of the host 301 and the storage space of the IO management controller 302, and implements the inbound address configuration operation to establish the address mapping relationship between the storage space of the IO management controller 302 and the configuration space of each flash memory device 100. It can be understood that the outbound address configuration operation and the inbound address configuration operation only need to be implemented through the PCIe system 315, and do not need to be transferred through other modules of the host 301.

[0075] Through the outbound address configuration operation, the firmware running in the IO management controller 302 can access the base address space of the host 301, so that the IO management controller 302 can manage each flash memory device 100 inserted into the host 301; through the inbound address configuration operation, each flash memory device 100 can access the storage space of the IO management controller 302, so as to facilitate subsequent access to the command submission queue and command completion queue stored in the storage space of the IO management controller 302.

[0076] In the embodiment of the present application, the IO management controller 302 also includes an NVMe target driver (NVMe TargetDriver). After completing the outbound address configuration operation and the inbound address configuration operation, the IO management controller 302 is also used to: initialize the NVMe protocol through the configuration space of each flash memory device 100.

[0077] Specifically, the IO management controller 302 accesses the configuration space of each flash memory device 100 through the NVMe target driver to complete the initialization of the relevant NVMe protocol.

[0078] In the embodiment of the present application, the IO management controller 302 can be identified as a standard NVMe device by the host 301, and the host 301 can interact with the IO management controller 302 through the standard NVMe protocol without having to worry about the complex implementation of the underlying device. In addition, the host 301 can directly use the NVMe driver that comes with the operating system 314 to identify the IO management controller 302, without having to install a customized driver provided by the manufacturer.

[0079] In an embodiment of the present application, before the host 301 sends a first command to the IO management controller 302, the host is further configured to send a disk creation command to the IO management controller, and the IO management controller is further configured to: create a virtual disk in the host according to the disk creation command.

[0080] Specifically, the host is specifically configured to: send a disk creation command to the IO management controller based on a command management tool and a PCIe system. The disk creation command includes the data domain type of the virtual disk and the capacity of the virtual disk. The data domain type is the type of the data domain, and the data domain is the data storage area corresponding to the virtual disk (i.e., the flash device). The specific content of the data domain type of the virtual disk and the capacity of the virtual disk can be input by the user to the command management tool 313.

[0081] Specifically, the command management tool 313 sends the device configuration command to the IO management controller 302 through the character device 3141 and the PCIe system 315.

[0082] Specifically, the IO management controller is specifically configured to: create a virtual disk in the host based on the capacity of the virtual disk, the command management tool, and the NVMe protocol.

[0083] Specifically, the IO management controller 302 receives the disk creation command sent by the host 301, sends a control command to the host 301, and then transmits the control command to the command management tool 313 through the PCIe system 315 and the character device 3141. The command management tool 313 creates a fixed-capacity NVMe virtual disk in the operating system 314 according to the control command. The control command includes the capacity of the virtual disk.

[0084] It can be understood that the virtual disk 311 is created based on the NVMe protocol, and each virtual disk 311 corresponds to an NVMe namespace of the IO management controller 302. Each virtual disk 311 is independent, and the host will recognize it as a standard NVMe block device.

[0085] In an embodiment of the present application, the flash device 100 has a compression function. For example, the flash device 100 is a flash device that supports the transparent compression function and adopts the Non-Volatile Memory Express (NVMe) protocol.

[0086] Since different types of data have different compressibilities. For example, text files are usually easier to compress than already compressed video files. This makes the actual available capacity of the flash device depend on the data characteristics, that is, the capacity is unpredictable. Compared with the existing solutions where the user directly faces the flash device (through the application), there is a difference between the actual capacity and the initial capacity of the device. In this application, the IO management controller provides a view of a regular block device with a fixed capacity (virtual disk) for the upper-layer application. The user directly faces the virtual disk, and the capacity of the virtual disk remains unchanged. Combined with the subsequent management of the data distribution and capacity warning of the flash device 100 by the IO management controller, the difference between the actual capacity and the initially set capacity of the flash device can be handled.

[0087] In an embodiment of this application, when creating a virtual disk, the IO management controller is further configured to: establish a mapping relationship between the virtual disk and the flash device. Among them, the mapping relationship between the virtual disk and the flash device is stored in the storage space of the IO management controller through a mapping table. The mapping relationship includes a first mapping relationship or a second mapping relationship. The first mapping relationship is the mapping relationship between any virtual disk with a single-device domain data domain type and the flash device, and the second mapping relationship is the mapping relationship between any virtual disk with a multi-device domain data domain type and the flash device.

[0088] In some embodiments, the data domain type includes a single-device domain. The single-device domain means that the data domain of the virtual disk only contains one flash device, that is, the virtual disk corresponds to only one flash device.

[0089] When the data domain type of any virtual disk is a single-device domain, the IO management controller is specifically configured to: select an idle flash device from several flash devices and establish a first mapping relationship between the virtual disk and the flash device.

[0090] Among them, the idle flash device is a flash device that does not store any valid data. The first mapping relationship includes the correspondence between the number of the virtual disk and the serial number of the flash device.

[0091] Specifically, when the data domain type of any virtual disk 311 is a single-device domain, the IO management controller 302 selects an idle flash device 100 that does not store any valid data from several flash devices 100 it is connected to, and establishes a first mapping relationship between the number of the virtual disk 311 and the serial number of the flash device 100, and stores the first mapping relationship in the mapping table. Thus, all the storage resources of the flash device 100 are only used by the virtual disk 311 and will not be shared with other virtual disks.

[0092] In some embodiments, the data domain type includes a multi-device domain, which refers to that the data domain of a virtual disk contains multiple flash devices, that is, the virtual disk corresponds to multiple flash devices. When the data domain type of the virtual disk is a multi-device domain, the disk creation command further includes the number of devices, and the number of devices is the number of the first flash devices corresponding to a virtual disk. The first flash devices are allocated to the virtual disk in the order of decreasing remaining capacity. Specifically, the value of the number of devices can be input by the user through the command management tool 313.

[0093] When the data domain type of any virtual disk is a multi-device domain, the IO management controller is specifically configured to: select multiple first flash devices that match the number of devices from several flash devices in the order of decreasing remaining capacity; segment the capacity of the virtual disk according to a preset strip capacity to determine the strip distribution corresponding to the virtual disk; and establish a second mapping relationship between the virtual disk and each first flash device according to the strip distribution corresponding to the virtual disk.

[0094] Among them, the segmentation process refers to slicing the overall capacity of the virtual disk into multiple strips according to the preset strip capacity, and a strip refers to the smallest continuous data block obtained by dividing the capacity of the virtual disk according to the preset strip capacity. The strip distribution refers to the storage layout obtained by mapping the strips to multiple first flash devices after dividing the capacity of the virtual disk into strips.

[0095] The preset strip capacity is the capacity of each strip, and the preset strip capacity can be set by those skilled in the art according to the capacities of the virtual disk and the flash devices, and is not limited herein. Exemplarily, the preset strip capacity is 1GB. The second mapping relationship includes the mapping relationship between the number of the virtual disk, the serial number of the first flash device, the number of each strip, and the logical address (Logical Block Address, LBA) range corresponding to each strip on the first flash device. The logical address range can be represented by the starting logical address and the address length.

[0096] Specifically, the IO management controller 302 obtains the remaining capacity of each flash device 100 connected thereto, sorts these flash devices 100 in descending order of the remaining capacity to obtain a sorting result, and sequentially selects multiple flash devices 100 from the sorting result according to the number of devices as the first flash devices corresponding to the virtual disk. According to a preset strip capacity, the capacity of the virtual disk is segmented to slice the capacity of the virtual disk into multiple strips, thereby determining the strip distribution corresponding to the virtual disk. A first flash device is sequentially assigned to each strip according to the strip distribution, and a logical address range is assigned to each strip in the corresponding first flash device, thereby establishing a second mapping relationship between the virtual disk and each first flash device, and storing the second mapping relationship in the mapping table. Among them, the method of sequentially assigning a first flash device to each strip includes but is not limited to the Round-Robin method.

[0097] For example, when the number of devices of virtual disk 1 (virtual disk 311 numbered 1) is 2, the IO management controller 302 selects 2 flash devices 100 with the largest remaining capacity from several flash devices 100 connected thereto. For example: flash device 1 (flash device 100 numbered 1) and flash device 2 (flash device 100 numbered 2). The capacity of virtual disk 1 is segmented to obtain strip 0, strip 1, and strip 2. By the Round-Robin method, flash device 1 is assigned to strip 0, flash device 2 is assigned to strip 1, and flash device 1 is assigned to strip 2. Then, a logical address range is assigned to each strip in the corresponding first flash device, thereby establishing a second mapping relationship between virtual disk 1 and flash device 1, and a second mapping relationship between virtual disk 1 and flash device 2.

[0098] Subsequently, the data to be written corresponding to virtual disk 1 will be stored in the corresponding flash device 1 and flash device 2 through strip 0, strip 1, and strip 2 in a Round-Robin manner.

[0099] Please refer to Figure 5 , Figure 5 which is a schematic diagram of a data domain provided by an embodiment of the present application;

[0100] As Figure 5 shown, the data domain type of virtual disk 0 is a single-device domain, and virtual disk 0 only corresponds to flash device 0. The data domain type of virtual disk 1 is a multi-device domain, and virtual disk 1 corresponds to flash device 1 and flash device 2. Virtual disk 1 corresponds to 3 strips: strip 0, strip 1, and strip 2. The disk 1 strip 0 area is the storage area corresponding to strip 0 of virtual disk 1 in flash device 1, the disk 1 strip 1 area is the storage area corresponding to strip 1 of virtual disk 1 in flash device 2, and the disk 1 strip 2 area is the storage area corresponding to strip 2 of virtual disk 1 in flash device 1.

[0101] Taking Figure 5 as an example, the first mapping relationship between virtual disk 0 and flash device 0 can be expressed as: virtual disk 0 - flash device 0. The second mapping relationship between virtual disk 1 and flash device 1 can be expressed as: virtual disk 1 - stripe 0 - flash device 1 - (starting logical address, address length); virtual disk 1 - stripe 2 - flash device 1 - (starting logical address, address length). The second mapping relationship between virtual disk 1 and flash device 2 can be expressed as: virtual disk 1 - stripe 1 - flash device 2 - (starting logical address, address length).

[0102] In the embodiment of the present application, by setting the data domain type and establishing the mapping relationship between the virtual disk and the flash device according to the user-specified data domain type, the present application can, after the virtual disk is successfully created, store the data to be written corresponding to the virtual disk on the flash device within the data domain corresponding to the virtual disk, and these flash devices carry the data of the virtual disk.

[0103] In the embodiment of the present application, the host 301 further includes a memory space for storing data. Each flash device 100 corresponds to a command submission queue and a command completion queue, and the command submission queue and the command completion queue are stored in the storage space of the IO management controller 302. The command submission queue is used to store the second command corresponding to the flash device 100, the command completion queue is used to store the command completion information, the second command is used to instruct the flash device 100 to perform data operations, and the command completion information is used to indicate that the flash device 100 has completed the execution of the second command.

[0104] It can be understood that through the outbound address configuration operation and the inbound address configuration operation, each flash device 100 can access the storage space of the IO management controller 302 to access its corresponding command submission queue and command completion queue.

[0105] When sending the first command to the IO management controller 302, the host 301 is specifically configured to: send the first command to the target virtual disk based on the application program; and send the first command to the IO management controller based on the target virtual disk and the PCIe system.

[0106] Among them, the first command is an NVMe command sent by the application program to the target virtual disk, the first command is a read command or a write command, the read command is an operation instruction for requesting to read data from the virtual disk, and the write command is an operation instruction for requesting to write data to the virtual disk. The target virtual disk is the virtual disk that receives and processes the first command.

[0107] The first command includes an operation code, a host memory address, the number of the NVMe namespace corresponding to the target virtual disk, and the logical address of the target virtual disk. The operation code is used to identify the type of the first command, i.e., a read command or a write command. The host memory address includes a first host memory address or a second host memory address.

[0108] Specifically, when the first command is a write command, the host memory address in the first command is the first host memory address. When the first command is a read command, the host memory address in the first command is the second host memory address. The first host memory address is the address of the data to be written to the flash device (i.e., the data to be written mentioned above) in the memory space of the host 301, and the second memory address is the address in the memory space of the host 301 where the data read from the flash device 100 needs to be written.

[0109] Specifically, the application 311 sends the first command to the target virtual disk, and the target virtual disk calls the NVMe driver to send the first command to the IO management controller 302, that is, transmits the first command to the IO management controller 302 through the PCIe system 315.

[0110] When controlling the flash device to perform a data operation, the IO management controller 302 is specifically configured to: receive and parse the first command to determine the number of the target virtual disk and the host memory address; determine the target flash device according to the number of the target virtual disk and the mapping relationship between each virtual disk and the flash device; construct a second command based on the host memory address, and write the second command into the command submission queue corresponding to the target flash device.

[0111] Among them, the target flash device is the flash device that needs to perform a data operation this time, and the second command is an NVMe command sent by the IO management controller 302 to the target flash device.

[0112] Specifically, the IO management controller 302 receives and parses the first command to obtain the host memory address and the number of the NVMe namespace, determines the number of the target virtual disk according to the number of the NVMe namespace, and searches the mapping table according to the number of the target virtual disk and the logical address of the target virtual disk to determine the target flash device and the target address corresponding to the first command. The IO management controller 302 constructs a second command based on the host memory address, and writes the second command into the command submission queue corresponding to the target flash device. Among them, the target address is the logical address corresponding to the logical address of the target virtual disk in the target flash device.

[0113] In the embodiments of the present application, the IO management controller 302 is only responsible for the management of commands and the data distribution management of the flash device, and does not participate in the actual data transfer. The host 301 directly transfers data with each flash device 100 through the Direct Memory Access (DMA) technology.

[0114] The target flash device is specifically configured to: based on the PCIe system, read the command submission queue corresponding to the target flash device from the IO management controller to obtain a second command; based on the second command and the PCIe system, access the storage area corresponding to the host memory address to transfer the target data; after the target data transfer is completed, write command completion information to the command completion queue corresponding to the target flash device based on the PCIe system.

[0115] Wherein, the target data is the data to be written to the target flash device or the data read from the target flash device.

[0116] Specifically, the target flash device reads the command submission queue corresponding to the target flash device from the IO management controller 302 through the PCIe system 315 to obtain a second command. The target flash device parses the second command to obtain the host memory address and the target address, and accesses the storage area corresponding to the host memory address in the host 301 through the PCIe system 315 to transfer the target data through the DMA technology. After the target data transfer is completed, the target flash device writes command completion information to the command completion queue corresponding to the target flash device in the IO management controller 302 through the PCIe system 315.

[0117] In some embodiments, the target data includes first target data or second target data. The first target data is the data stored in the target flash device, and the second target data is the data stored in the host.

[0118] When the second command is a write command, when accessing the storage area corresponding to the host memory address in the host 301 through the PCIe system 315, the target flash device is specifically configured to: read the storage area corresponding to the first host memory address to obtain the second target data, and transfer the second target data through the PCIe system 315. Thus, the second target data is stored in the flash medium.

[0119] When the second command is a read command, before accessing the storage area corresponding to the host memory address in the host 301 through the PCIe system 315, the target flash device is further configured to: read the first target data from the flash medium according to the target address. Thus, when accessing the storage area corresponding to the second host memory address in the host 301 through the PCIe system 315, the first target data is transferred to the storage area corresponding to the second host memory address in the host 301.

[0120] In an embodiment of the present application, each virtual disk 3111 corresponds to a command queue, and the command queue is stored in the host 301.

[0121] The IO management controller is further configured to: read command completion information, and write the command completion information into the command queue corresponding to the target virtual disk based on the PCIe system, so that the host determines that the first command has been executed.

[0122] Specifically, the IO management controller 302 reads the command completion information from the command submission queue corresponding to the target flash device, and writes the command completion information into the command queue corresponding to the target virtual disk based on the PCIe system 315, so that the host 301 reads the command completion information and determines that the first command has been executed.

[0123] The host 301 is further configured to: read the command completion information from the command queue corresponding to the target virtual disk, and call a callback function to send information to the application program 312 to notify the application program 312 that the first command has been executed.

[0124] In an embodiment of the present application, the NVMe virtual disk can be recognized by the application program 312 as a standard NVMe block device. By accessing the virtual disk 311 through the application program 312, the IO management controller 302 controls the flash device 100 to perform data operations according to the mapping relationship between the virtual disk and the flash device. The present application can complete the management of the flash device 100 by the IO management controller 302, shielding the usage details of the flash device 100 from the host 301, thereby reducing the operation and maintenance burden of the host.

[0125] In some embodiments, the flash device 100 has a transparent compression function, that is, the flash device 100 is specifically configured to: obtain host data, and store the host data in the flash medium after compression. The host data is the second target data in the above text. Specifically, after obtaining the second target data, the flash device 100 compresses the second target data and stores it in the flash medium.

[0126] In some embodiments, the flash device 100 is further configured to set a compression ratio, where the compression ratio is the ratio of the amount of original data to the amount of compressed data. The original data is the second target data, and the compressed data is the compressed second target data. For example: when the compression ratio is 1:2, if the stored data has a compression rate characteristic of 1:2, and the physical available capacity of the flash of the flash device 100 is 3.2TB, then the logical available capacity corresponding to the flash device 100 displayed in the operating system 314 is 6.4TB.

[0127] Due to the variability of data types, the actual compression ratio will change. When the remaining capacity of the flash memory device 100 is less than the preset capacity, the flash memory device 100 will issue a capacity warning. At this time, it is necessary to process the data stored in the flash memory device 100. For example, data migration is performed to reduce the probability of the flash memory device 100 entering the read-only state.

[0128] In the embodiment of the present application, the IO management controller is further configured to process the flash memory device that issues a capacity warning. Specifically, the IO management controller is configured to:

[0129] Poll every preset time to determine the remaining capacity of each flash memory device; when the remaining capacity of any flash memory device is less than the preset capacity, determine the second flash memory device and the first virtual disk; allocate a new stripe for the first virtual disk, and establish a third mapping relationship between the first virtual disk and the second flash memory device; when the target flash memory device corresponding to the first command is the second flash memory device, control the second flash memory device to perform the corresponding data operation.

[0130] Among them, the preset time is the interval time for performing this polling operation. The preset time can be set by those skilled in the art according to the actual capacity of the flash memory device, and no limitation is made here. The second flash memory device is the flash memory device with the largest remaining capacity among several flash memory devices. The first virtual disk is the virtual disk corresponding to the flash memory device with the remaining capacity less than the preset capacity. The third mapping relationship includes the mapping relationship between the number of the first virtual disk, the serial number of the second flash memory device, the number of the new stripe, and the logical address range corresponding to the new stripe in the second flash memory device.

[0131] The preset capacity is the maximum value of the remaining capacity of the flash memory device when a capacity warning occurs. The preset capacity can be set by those skilled in the art according to the actual capacity of the flash memory device, and no limitation is made here. Exemplarily, the preset capacity is 5% of the total capacity of the flash memory device.

[0132] Specifically, the IO management controller 302 polls every preset time to determine the remaining capacity of each flash memory device 100. When the remaining capacity of any flash memory device 100 is less than the preset capacity, determine the first virtual disk corresponding to the flash memory device 100, and select a flash memory device 100 with the largest remaining capacity from several flash memory devices 100 as the second flash memory device. The IO management controller 302 allocates a new stripe for the first virtual disk, allocates a logical address range for the new stripe in the second flash memory device, thereby establishing a third mapping relationship between the first virtual disk and the second flash memory device, and stores the third mapping relationship in the mapping table.

[0133] To Figure 5For example, if the remaining capacity of the flash memory device 2 is less than the preset capacity, the first virtual disk is the virtual disk 1, and the second flash memory device is the flash memory device X (the flash memory device 100 numbered X). A new stripe is allocated for the virtual disk 1. For example, if the new stripe is the stripe X, the third mapping relationship between the virtual disk 1 and the flash memory device X can be expressed as: virtual disk 1 - stripe X - flash memory device X - (starting logical address, address length). At this time, the flash memory device 2 only undertakes the read and write requests for the stripes in the existing mapping relationships recorded in the mapping table.

[0134] Further, after the IO management controller 302 obtains the first command, if the IO management controller 302 determines that the target flash memory device corresponding to the first command is the second flash memory device, the IO management controller 302 controls the second flash memory device to perform corresponding data operations. Among them, the specific steps of the second flash memory device are similar to those of the target flash memory device in the above text and will not be elaborated here.

[0135] In some embodiments, the host 301 further includes an alarm system, and the alarm system is used to monitor the first alarm information sent by the IO management controller 302. When the remaining capacity of each flash memory device 100 is less than the preset capacity, that is, when each flash memory device 100 has a capacity alarm, the IO management controller 302 is used to send the first alarm information to the host 301, where the first alarm information is used to prompt the user to add a new flash memory device 100 to the host 301.

[0136] Specifically, the IO management controller 302 sends the prompt information to the command management tool 313 through the PCIe system 315 and the character device 3141 to prompt the user to add a new flash memory device 100 to the host 301.

[0137] In some embodiments, since there are still write requests for the stripes carried by the flash memory device with a capacity alarm, the IO management controller is also used for data migration. Among them, the mapping table is also used to store the metadata information of each stripe corresponding to the flash memory device, and the metadata information is generated based on the mapping relationship between each virtual disk and the flash memory device. The metadata information includes the number of the flash memory device, the number of the virtual disk corresponding to the flash memory device, the number of each stripe corresponding to the flash memory device, and the amount of data already stored in the storage area corresponding to the flash memory device for each stripe. The amount of data already stored is the data length of the written data. For Figure 5 example, the metadata information of the stripe 0 of the virtual disk 1 corresponding to the flash memory device 1 includes: the amount of data already stored in the disk 1 stripe 0 area of the flash memory device 1 for the stripe 0 of the virtual disk 1.

[0138] The IO management controller 302 is specifically used for:

[0139] Based on the mapping relationship between each virtual disk and the flash device, determine the target strip in the third flash device; perform data migration on the data corresponding to the target strip to move the data from the third flash device to the fourth flash device; delete the second mapping relationship corresponding to the target strip, and establish a mapping relationship between the target strip and the fourth flash device; send an erase command to the third flash device to release the storage area corresponding to the target strip in the third flash device.

[0140] Among them, the third flash device is a flash device with a remaining capacity less than the preset capacity, the target strip is the strip with the largest amount of stored data corresponding to the third flash device, and the fourth flash device is the flash device with the largest remaining capacity among several flash devices.

[0141] Specifically, the IO management controller 302 queries the metadata information in the mapping table to determine the amount of stored data in each strip corresponding to the third flash device in the corresponding storage area of the third flash device, and takes the strip with the largest corresponding amount of stored data as the target strip. The IO management controller 302 selects a flash device 100 with the largest remaining capacity from several flash devices 100 connected to it as the fourth flash device, and migrates the data in the storage area corresponding to the target strip in the third flash device to the fourth flash device.

[0142] The IO management controller 302 deletes the second mapping relationship corresponding to the target strip in the mapping table and establishes a mapping relationship between the target strip and the fourth flash device. For Figure 5 example, if the target strip is strip 0 of virtual disk 1, the second mapping relationship corresponding to strip 0 of virtual disk 1 is: virtual disk 1 - strip 0 - flash device 1 - (starting logical address, address length), and this mapping relationship is deleted in the mapping table. If the third flash device is flash device X, the mapping relationship between the target strip and the fourth flash device is: virtual disk 1 - strip 0 - flash device X - (starting logical address, address length), and this mapping relationship is added to the mapping table.

[0143] In some embodiments, the data migration policy is configurable. The alarm system of the host 301 is also used to monitor the second alarm information sent by the IO management controller 302. The IO management controller 302 is used to: when detecting that the remaining capacity of any flash device is less than the preset capacity, send the second alarm information to the host 301; receive the data migration instruction sent by the host 301 and perform data migration according to the data migration instruction. Among them, the second alarm information is used to notify the user that a capacity alarm has occurred in the flash device so that the user can determine whether to perform data migration. The data migration instruction is used to instruct the IO management controller 302 to perform data migration.

[0144] Specifically, the IO management controller 302 sends a second warning message to the host 301 to notify the user that a capacity warning has occurred in the flash memory device 100. The warning system of the host 301 obtains the second warning message and sends it to the application program, so that the user can determine whether to perform data migration.

[0145] When the user determines to perform data migration, the command management tool 313 sends a data migration instruction to the IO management controller 302 through the character device 3141 and the PCIe system 315. The IO management controller 302 receives the data migration instruction and performs data migration according to the data migration instruction.

[0146] It can be understood that whether the IO management controller 302 automatically performs data migration when detecting that the remaining capacity of any flash memory device is less than the preset capacity, or performs data migration after obtaining the data migration instruction, the data migration is completed under the management of the IO management controller 302, and there is no need for the host 301 to perform data migration.

[0147] In the embodiment of the present application, when the remaining capacity of any flash memory device 100 is less than the preset capacity, that is, when a capacity warning occurs, the IO management controller 302 allocates a new stripe and a second flash memory device to the first virtual disk, and establishes a mapping relationship between the first virtual disk and the second flash memory device, and the IO management controller 302 performs data migration. Compared with the existing solution where the host needs to process warning content and perform data migration and other operations, which increases the operation and maintenance burden, the host in the present application does not need to process the operation and maintenance management tasks related to the flash memory device, reducing the operation and maintenance burden of the host.

[0148] In some embodiments, the IO management controller 302 also has a health check function, and the health check function is used to monitor and check the health indicators of each flash memory device 100. Among them, the health indicators include but are not limited to temperature and log information (SMART log). The warning system of the host 301 is also used to monitor the third warning message sent by the IO management controller 302. The third warning message is used to prompt the user to replace the flash memory device.

[0149] The IO management controller 302 is specifically used for: polling and determining the health indicators of each flash memory device every preset time; when the health indicator of any flash memory device is greater than the preset indicator threshold, sending a third warning message to the host 301 to prompt the user to replace the flash memory device. Among them, the preset indicator threshold can be set by those skilled in the art according to the storage unit type, application environment, etc. of the flash memory device, and no limitation is made here.

[0150] In some embodiments, before the user replaces the flash device, the IO management controller 302 is further configured to: receive a data migration instruction sent by the host 301, and perform data migration according to the data migration instruction to migrate all the data stored in the flash device to other flash devices.

[0151] In the embodiments of the present application, by accessing the flash device in the form of an NVMe ordinary block device (virtual disk) through an application program, the present application can increase the number of flash devices serving as actual data storage disks without increasing the operation and maintenance burden of the host. Through the function that the compression ratio of the flash device can be set, the present application can set the maximum compression ratio for the flash device. For example, when the host 301 is a 24-slot server, first insert 12 flash devices 100 and set the compression ratio to 1:2. Then the logical available capacity actually available to the host 301 is the sum of the flash physical available capacities of 24 flash devices 100. Subsequently, according to the operation and maintenance prompt information of the IO management controller 302 (such as: the first warning information), simply add new flash devices as needed in the idle slots to reduce the probability that the flash device enters an abnormal state such as read-only due to excessive data writing.

[0152] In the embodiments of the present application, by controlling the flash device to perform data operations and management operations such as capacity warning and health check through the IO management controller 302, the present application can shield the host 301 from the usage details of the flash device 100. The host 301 only needs to manage the virtual disk, so that while the host 301 makes full use of the compression function of the flash device, there is no management and operation and maintenance burden, and the user only needs to focus on the application program itself.

[0153] In the embodiments of the present application, by providing a storage system, the storage system includes a host, an IO management controller, and at least one flash device. Among them, the host is connected to the IO management controller and the flash device, and is configured to send a first command to the IO management controller, and the host includes at least one virtual disk; the IO management controller is connected to the host and the flash device, and is configured to control the flash device to execute data operations according to the first command and the mapping relationship between the virtual disk and the flash device.

[0154] By including at least one virtual disk in the host, and the IO management controller is configured to control the flash device to execute data operations according to the command sent by the host and the mapping relationship between the virtual disk and the flash device, the present application can shield the host from the usage details of the flash device, and the management of the flash device is completed by the IO management controller, thereby reducing the operation and maintenance burden of the host.

[0155] Please refer to Figure 6 , Figure 6 which is a schematic flowchart of a storage method provided by the embodiments of the present application;

[0156] In an embodiment of the present application, the storage method is applied to the storage system 300 in any of the above embodiments. The storage system 300 includes a host 301, an IO management controller 302, and at least one flash device 100. The host 301 includes at least one virtual disk 311.

[0157] As Figure 6 shown, the storage method includes:

[0158] Step S601: Based on the host, send a first command to the IO management controller;

[0159] Specifically, the host 301 sends a first command to the IO management controller 302. Among them, the first command is a read command or a write command.

[0160] In an embodiment of the present application, the host further includes a command management tool, a character device, a base address space, and a PCIe system. The IO management controller 302 includes a storage space, and each flash device 100 includes a configuration space. Among them, the base address space is the mapping area of each flash device 100 (as a PCIe device) in the physical memory space of the host 301. The storage space is used to store the mapping relationship between the virtual disk and the flash device, and the configuration space is a register set for configuring and managing the flash device 100 (as a PCIe device).

[0161] In an embodiment of the present application, before sending the first command from the host to the IO management controller, the storage method further includes: sending a device configuration command from the host to the IO management controller; according to the device configuration command, performing an outbound address configuration operation and an inbound address configuration operation on each flash device through the IO management controller.

[0162] Among them, the device configuration command includes the device information of each flash device, and the device information of the flash device includes, but is not limited to, the host base address corresponding to the flash device, the capacity of the flash device, and the serial number of the flash device.

[0163] Specifically, the command management tool 313 sends the device configuration command to the IO management controller 302 through the character device 3141 and the PCIe system 315. The IO management controller 302 receives the device configuration command sent by the host 301, and through the peer-to-peer communication (P2P) technology of the PCIe system 315, implements the outbound address configuration operation, establishes the address mapping relationship between the base address space of the host 301 and the storage space of the IO management controller 302, and implements the inbound address configuration operation, establishes the address mapping relationship between the storage space of the IO management controller 302 and the configuration space of each flash device 100.

[0164] Through the outbound address configuration operation, the firmware running in the IO management controller 302 can access the base address space of the host 301, so that the IO management controller 302 can manage each flash memory device 100 inserted into the host 301; through the inbound address configuration operation, each flash memory device 100 can access the storage space of the IO management controller 302, so as to facilitate subsequent access to the command submission queue and command completion queue stored in the storage space of the IO management controller 302.

[0165] In the embodiment of the present application, the IO management controller 302 also includes an NVMe target driver. After completing the outbound address configuration operation and the inbound address configuration operation, the storage method further includes: initializing the NVMe protocol based on the configuration space of the IO management controller and each flash memory device 100.

[0166] Specifically, the IO management controller 302 accesses the configuration space of each flash memory device 100 through the NVMe target driver to complete the initialization of the relevant NVMe protocol.

[0167] In the embodiment of the present application, the IO management controller 302 can be identified as a standard NVMe device by the host 301, and the host 301 can interact with the IO management controller 302 through the standard NVMe protocol without having to worry about the complex implementation of the underlying device. In addition, the host 301 can directly use the NVMe driver that comes with the operating system 314 to identify the IO management controller 302, without having to install a customized driver provided by the manufacturer.

[0168] In an embodiment of the present application, before sending a first command to the IO management controller based on the host, the storage method also includes: sending a disk creation command to the IO management controller based on the host; and creating a virtual disk in the host through the IO management controller according to the disk creation command.

[0169] The disk creation command includes the data domain type of the virtual disk and the capacity of the virtual disk. The data domain type is the type of the data domain, and the data domain is the data storage area (ie, the flash memory device) corresponding to the virtual disk.

[0170] The step of sending a disk creation command to the IO management controller based on the host includes: sending a disk creation command to the IO management controller based on a command management tool and a PCIe system.

[0171] Specifically, the command management tool 313 sends the device configuration command to the IO management controller 302 through the character device 3141 and the PCIe system 315 .

[0172] Among them, the steps of creating a virtual disk in the host by the IO management controller according to the disk creation command include: sending a control command to the command management tool based on the IO management controller, the PCIe system, and the character device; creating a virtual disk in the operating system by the command management tool according to the control command. Among them, the control command includes the capacity of the virtual disk.

[0173] Specifically, the IO management controller 302 receives the disk creation command sent by the host 301, sends a control command to the host 301, and then transmits the control command to the command management tool 313 through the PCIe system 315 and the character device 3141. The command management tool 313 creates a fixed-capacity NVMe virtual disk in the operating system 314 according to the control command.

[0174] It can be understood that the virtual disk 311 is created based on the NVMe protocol, and each virtual disk 311 corresponds to an NVMe namespace of the IO management controller 302. Each virtual disk 311 is independent, and the host will recognize it as a standard NVMe block device.

[0175] In the embodiment of the present application, the storage method further includes: when creating a virtual disk, establishing a mapping relationship between the virtual disk and the flash device based on the IO management controller. Among them, the mapping relationship between the virtual disk and the flash device is stored in the storage space of the IO management controller through a mapping table, and the mapping relationship includes a first mapping relationship or a second mapping relationship. The first mapping relationship is the mapping relationship between any virtual disk with a single-device domain data domain type and the flash device, and the second mapping relationship is the mapping relationship between any virtual disk with a multi-device domain data domain type and the flash device.

[0176] In some embodiments, the data domain type includes a single-device domain, and the single-device domain means that only one flash device is included in the data domain of the virtual disk. The steps of establishing a mapping relationship between the virtual disk and the flash device based on the IO management controller include: when the data domain type of any virtual disk is a single-device domain, selecting an idle flash device from several flash devices based on the IO management controller, and establishing a first mapping relationship between the virtual disk and the flash device.

[0177] Among them, the idle flash device is a flash device that does not store any valid data, and the first mapping relationship includes the correspondence between the number of the virtual disk and the serial number of the flash device.

[0178] Specifically, when the data domain type of any virtual disk 311 is a single-device domain, the IO management controller 302 selects a flash device 100 that does not store any valid data from several flash devices 100 connected thereto, and establishes a first mapping relationship between the number of the virtual disk 311 and the serial number of the flash device 100, and stores the first mapping relationship in the mapping table. Thus, all storage resources of the flash device 100 are only used by the virtual disk 311 and will not be shared with other virtual disks.

[0179] In some embodiments, the data domain type includes a multi-device domain. The multi-device domain means that the data domain of the virtual disk contains multiple flash devices, that is, the virtual disk corresponds to multiple flash devices. When the data domain type of the virtual disk is a multi-device domain, the disk creation command further includes the number of devices, and the number of devices is the number of first flash devices corresponding to a virtual disk. The first flash devices are flash devices allocated to the virtual disk in descending order of remaining capacity.

[0180] Based on the steps of the IO management controller establishing a mapping relationship between the virtual disk and the flash device, it includes: when the data domain type of any virtual disk is a multi-device domain, selecting multiple first flash devices that match the number of devices from several flash devices in descending order of remaining capacity; segmenting the capacity of the virtual disk according to a preset strip capacity to determine the strip distribution corresponding to the virtual disk; and establishing a second mapping relationship between the virtual disk and each first flash device according to the strip distribution corresponding to the virtual disk.

[0181] Specifically, the IO management controller 302 obtains the remaining capacity of each flash device 100 connected thereto, sorts these flash devices 100 in descending order of remaining capacity to obtain a sorting result, and sequentially selects multiple flash devices 100 from the sorting result according to the number of devices as the first flash devices corresponding to the virtual disk. According to the preset strip capacity, the capacity of the virtual disk is segmented to slice the capacity of the virtual disk into multiple strips, thereby determining the strip distribution corresponding to the virtual disk. A first flash device is sequentially allocated to each strip according to the strip distribution, and a logical address range is allocated to each strip in the corresponding first flash device, thereby establishing a second mapping relationship between the virtual disk and each first flash device, and storing the second mapping relationship in the mapping table. Among them, the method of sequentially allocating a first flash device to each strip includes but is not limited to the Round-Robin method.

[0182] In the embodiment of the present application, step S601 specifically includes steps S611 - S612:

[0183] Step S611: Send a first command to the target virtual disk based on the application program;

[0184] Specifically, the application program 311 sends a first command to the target virtual disk.

[0185] Among them, the first command is an NVMe command sent by the application program to the target virtual disk. The first command is a read command or a write command. The read command is an operation instruction for requesting to read data from the virtual disk, and the write command is an operation instruction for requesting to write data to the virtual disk. The target virtual disk is the virtual disk that receives and processes the first command.

[0186] The first command includes an operation code, a host memory address, the number of the NVMe namespace corresponding to the target virtual disk, and the logical address of the target virtual disk. The operation code is used to identify the type of the first command, that is, a read command or a write command. The host memory address includes a first host memory address or a second host memory address.

[0187] Specifically, when the first command is a write command, the host memory address in the first command is the first host memory address. When the first command is a read command, the host memory address in the first command is the second host memory address. The first host memory address is the address of the data to be written to the flash device (i.e., the data to be written mentioned above) in the memory space of the host 301, and the second memory address is the address where the data read from the flash device 100 needs to be written to the memory space of the host 301.

[0188] Step S612: Send the first command to the IO management controller based on the target virtual disk and the PCIe system.

[0189] Specifically, the target virtual disk calls the NVMe driver to send the first command to the IO management controller 302, that is, transmits the first command to the IO management controller 302 through the PCIe system 315.

[0190] Step S602: Control the flash device to perform a data operation through the IO management controller according to the first command and the mapping relationship between the virtual disk and the flash device.

[0191] Specifically, the IO management controller controls the flash device to perform a data operation according to the first command and the mapping relationship between the virtual disk and the flash device. Among them, the data operation includes a read operation or a write operation.

[0192] In the embodiment of the present application, the flash memory device includes a flash memory medium, and the host 301 further includes a memory space for storing data. Each flash memory device 100 corresponds to a command submission queue and a command completion queue, and the command submission queue and the command completion queue are stored in the storage space of the IO management controller 302. The command submission queue is used to store the second command corresponding to the flash memory device 100, and the command completion queue is used to store command completion information. The second command is used to instruct the flash memory device 100 to perform a data operation, and the command completion information is used to indicate that the flash memory device 100 has completed the execution of the second command.

[0193] It can be understood that through the outbound address configuration operation and the inbound address configuration operation, each flash memory device 100 can access the storage space of the IO management controller 302 to access its corresponding command submission queue and command completion queue.

[0194] In the embodiment of the present application, step S602 specifically includes steps S621 - S626:

[0195] Step S621: Based on the IO management controller, receive and parse the first command to determine the number of the target virtual disk and the host memory address;

[0196] Among them, the target flash memory device is the flash memory device that needs to perform a data operation this time, and the second command is an NVMe command sent by the IO management controller 302 to the target flash memory device.

[0197] Specifically, the IO management controller 302 receives and parses the first command to obtain the host memory address and the number of the NVMe namespace, and determines the number of the target virtual disk according to the number of the NVMe namespace.

[0198] Step S622: According to the number of the target virtual disk and the mapping relationship between each virtual disk and the flash memory device, determine the target flash memory device;

[0199] Specifically, the IO management controller 302 searches the mapping table according to the number of the target virtual disk and the logical address of the target virtual disk to determine the target flash memory device and the target address corresponding to the first command. Among them, the target address is the logical address corresponding to the logical address of the target virtual disk in the target flash memory device.

[0200] Step S623: Based on the host memory address, construct the second command and write the second command into the command submission queue corresponding to the target flash memory device;

[0201] Specifically, the IO management controller 302 constructs the second command based on the host memory address and writes the second command into the command submission queue corresponding to the target flash memory device.

[0202] In the embodiment of the present application, the IO management controller 302 is only responsible for the management of commands and the data distribution management of the flash device, and does not participate in the actual data transfer. The host 301 directly transfers data with each flash device 100 through the Direct Memory Access (DMA) technology.

[0203] Step S624: Read the command submission queue corresponding to the target flash device based on the target flash device to obtain a second command;

[0204] Specifically, the target flash device reads the command submission queue corresponding to the target flash device from the IO management controller 302 through the PCIe system 315 to obtain a second command.

[0205] Step S625: When the second command is a read command, read the first target data based on the target flash device, and transmit the first target data to the storage area corresponding to the host memory address through the PCIe system;

[0206] Wherein, the first target data is the data stored in the target flash device.

[0207] Specifically, the target flash device reads the first target data from the flash medium according to the target address, accesses the storage area corresponding to the second host memory address in the host 301 through the PCIe system 315, and transmits the first target data to the storage area corresponding to the second host memory address in the host 301 through the DMA technology.

[0208] Step S626: When the second command is a write command, read the storage area corresponding to the host memory address based on the target flash device to obtain a second target data, and store the second target data in the flash medium.

[0209] Wherein, the second target data is the data stored in the host.

[0210] Specifically, the target flash device accesses the storage area corresponding to the first host memory address in the host 301 through the PCIe system 315 to read the second target data, and transmits the second target data through the PCIe system 315 and the DMA technology, so as to store the second target data at the target address of the flash medium.

[0211] In the embodiment of the present application, after the transmission of the first target data or the second target data is completed, the storage method further includes: writing command completion information into the command completion queue corresponding to the target flash device stored in the IO management controller based on the target flash device.

[0212] Specifically, after the transmission of the first target data or the second target data is completed, the target flash device writes command completion information to the command completion queue corresponding to the target flash device in the IO management controller 302 through the PCIe system 315.

[0213] In the embodiment of the present application, each virtual disk 3111 corresponds to a command queue, and the command queue is stored in the host 301. After the target flash device writes the command completion information to the corresponding command completion queue, the storage method further includes: reading the command completion information based on the IO management controller, and writing the command completion information to the command queue corresponding to the target virtual disk through the PCIe system, so that the host determines that the first command execution is completed.

[0214] Specifically, the IO management controller 302 reads the command completion information from the command submission queue corresponding to the target flash device, and writes the command completion information to the command queue corresponding to the target virtual disk based on the PCIe system 315. The host 301 reads the command completion information from the command queue corresponding to the target virtual disk, and calls a callback function to send information to the application program 312 to notify the application program 312 that the first command execution is completed.

[0215] In the embodiment of the present application, the NVMe virtual disk can be recognized by the application program 312 as a standard NVMe block device. By accessing the virtual disk 311 through the application program 312, the IO management controller 302 controls the flash device 100 to perform data operations according to the mapping relationship between the virtual disk and the flash device. The present application can complete the management of the flash device 100 by the IO management controller 302, shielding the usage details of the flash device 100 from the host 301, thereby reducing the operation and maintenance burden of the host.

[0216] In some embodiments, the flash device 100 has a compression function. For example, the flash device 100 is a flash device that supports the transparent compression function and adopts the Non-Volatile Memory Express (NVMe) protocol.

[0217] The storage method further includes: compressing the second target data based on the flash device, and storing the compressed second target data to the flash medium.

[0218] In some embodiments, the step of compressing the second target data based on the flash memory device includes: setting a compression ratio and compressing the second target data according to the compression ratio to obtain the compressed second target data. The compression ratio of the flash memory device is the ratio of the amount of the original data to the amount of the compressed data, where the original data is the second target data and the compressed data is the compressed second target data. For example, when the compression ratio is 1:2, if the stored data has a compression rate characteristic of 1:2 and the physical available capacity of the flash memory of the flash memory device 100 is 3.2 TB, the logical available capacity corresponding to the flash memory device 100 displayed in the operating system 314 is 6.4 TB.

[0219] In some embodiments, the method further includes: updating the mapping relationship between the virtual disk and the flash memory device when the remaining capacity of any flash memory device is less than a preset capacity.

[0220] The step of updating the mapping relationship between the virtual disk and the flash memory device includes: polling to determine the remaining capacity of each flash memory device every preset time; when the remaining capacity of any flash memory device is less than the preset capacity, determining a second flash memory device and a first virtual disk; allocating a new strip for the first virtual disk and establishing a third mapping relationship between the first virtual disk and the second flash memory device.

[0221] Specifically, the IO management controller 302 polls to determine the remaining capacity of each flash memory device 100 every preset time. When the remaining capacity of any flash memory device 100 is less than the preset capacity, the IO management controller 302 determines the first virtual disk corresponding to the flash memory device 100 and selects a flash memory device 100 with the largest remaining capacity from several flash memory devices 100 as the second flash memory device. The IO management controller 302 allocates a new strip for the first virtual disk, allocates a logical address range for the new strip in the second flash memory device, thereby establishing a third mapping relationship between the first virtual disk and the second flash memory device, and stores the third mapping relationship in the mapping table.

[0222] In some embodiments, after updating the mapping relationship between the virtual disk and the flash memory device, the storage method further includes: controlling the second flash memory device to perform corresponding data operations when the target flash memory device corresponding to the first command is the second flash memory device.

[0223] Specifically, after the IO management controller 302 obtains the first command, if the IO management controller 302 determines that the target flash memory device corresponding to the first command is the second flash memory device, the IO management controller 302 controls the second flash memory device to perform corresponding data operations.

[0224] In some embodiments, the storage method further includes: when the remaining capacity of each flash memory device is less than a preset capacity, sending a first warning message to the host based on the IO management controller, where the first warning message is used to prompt the user to add a new flash memory device to the host.

[0225] Specifically, the IO management controller 302 sends the prompt message to the command management tool 313 through the PCIe system 315 and the character device 3141 to prompt the user to add a new flash memory device 100 to the host 301.

[0226] In some embodiments, the method further includes: when the remaining capacity of any flash memory device is less than a preset capacity, performing data migration on the data stored in the flash memory device based on the IO management controller. The mapping table is further used to store the metadata information of each stripe corresponding to the flash memory device, and the metadata information is generated based on the mapping relationship between each virtual disk and the flash memory device. The metadata information includes the number of the flash memory device, the number of the virtual disk corresponding to the flash memory device, the number of each stripe corresponding to the flash memory device, the amount of stored data in the storage area corresponding to the flash memory device for each stripe, and the amount of stored data is the data length of the written data.

[0227] Among them, the step of performing data migration on the data stored in the flash memory device based on the IO management controller includes: determining the target stripe in the third flash memory device based on the mapping relationship between each virtual disk and the flash memory device; performing data migration on the data corresponding to the target stripe to move the data from the third flash memory device to the fourth flash memory device; deleting the second mapping relationship corresponding to the target stripe and establishing a mapping relationship between the target stripe and the fourth flash memory device; sending an erase command to the third flash memory device to release the storage area corresponding to the target stripe in the third flash memory device.

[0228] Among them, the third flash memory device is the flash memory device with the remaining capacity less than the preset capacity, the target stripe is the stripe with the largest amount of stored data corresponding to the third flash memory device, and the fourth flash memory device is the flash memory device with the largest remaining capacity among several flash memory devices.

[0229] Specifically, the IO management controller 302 queries the metadata information in the mapping table, determines the amount of stored data in the storage area corresponding to each stripe corresponding to the third flash memory device in the third flash memory device, and uses the stripe with the largest corresponding amount of stored data as the target stripe. The IO management controller 302 selects a flash memory device 100 with the largest remaining capacity from several flash memory devices 100 connected to it as the fourth flash memory device, and migrates the data in the storage area corresponding to the target stripe in the third flash memory device to the fourth flash memory device.

[0230] The IO management controller 302 deletes the second mapping relationship corresponding to the target strip in the mapping table and establishes a mapping relationship between the target strip and the fourth flash device. For Figure 5 example, if the target strip is strip 0 of virtual disk 1, the second mapping relationship corresponding to strip 0 of virtual disk 1 is: virtual disk 1 - strip 0 - flash device 1 - (starting logical address, address length), and this mapping relationship is deleted from the mapping table. If the third flash device is flash device X, the mapping relationship between the target strip and the fourth flash device is: virtual disk 1 - strip 0 - flash device X - (starting logical address, address length), and this mapping relationship is added to the mapping table.

[0231] In some embodiments, the data migration policy is configurable. The storage method further includes: when it is detected that the remaining capacity of any flash device is less than a preset capacity, sending a second warning message to the host 301 based on the IO management controller; receiving a data migration instruction sent by the host 301 based on the IO management controller and performing data migration according to this data migration instruction. Among them, the second warning message is used to notify the user that a capacity warning has occurred for the flash device, so that the user can determine whether to perform data migration. The data migration instruction is used to instruct the IO management controller 302 to perform data migration.

[0232] Specifically, the IO management controller 302 sends a second warning message to the host 301 to notify the user that a capacity warning has occurred for the flash device 100. The warning system of the host 301 obtains the second warning message and sends it to the application program, so that the user can determine whether to perform data migration.

[0233] When the user determines to perform data migration, the command management tool 313 sends the data migration instruction to the IO management controller 302 through the character device 3141 and the PCIe system 315. The IO management controller 302 receives this data migration instruction and performs data migration according to this data migration instruction.

[0234] It can be understood that whether the IO management controller 302 automatically performs data migration when it detects that the remaining capacity of any flash device is less than the preset capacity, or performs data migration after obtaining the data migration instruction, the data migration is completed under the management of the IO management controller 302, and there is no need for the host 301 to perform data migration.

[0235] In the embodiments of the present application, when the remaining capacity of any flash memory device 100 is less than a preset capacity, that is, when a capacity warning occurs, the IO management controller 302 allocates a new stripe and a second flash memory device to the first virtual disk, establishes a mapping relationship between the first virtual disk and the second flash memory device, and the IO management controller 302 performs data migration. Compared with the existing solution where the host needs to process warning content and perform operations such as data migration, which increases the operation and maintenance burden, in the present application, the host does not need to handle the operation and maintenance management tasks related to the flash memory device, reducing the operation and maintenance burden of the host.

[0236] In some embodiments, the IO management controller 302 also has a health check function, and the health check function is used to monitor and check the health indicators of each flash memory device 100. Among them, the health indicators include but are not limited to temperature and log information (SMART log).

[0237] The storage method further includes: based on the IO management controller, polling and determining the health indicators of each flash memory device every preset time; when the health indicator of any flash memory device is greater than a preset indicator threshold, sending a third warning message to the host 301 to prompt the user to replace the flash memory device. Among them, the third warning message is used to prompt the user to replace the flash memory device, and the preset indicator threshold can be set by those skilled in the art according to the storage unit type, application environment, etc. of the flash memory device, and no limitation is made here.

[0238] In some embodiments, the host 301 further includes an alarm system, and the alarm system is used to monitor the first warning message, the second warning message, and the third warning message sent by the IO management controller 302.

[0239] In some embodiments, before the user replaces the flash memory device, the storage method further includes: based on the IO management controller 302, obtaining a data migration instruction sent by the host, and migrating all the data stored in the flash memory device to other flash memory devices according to the data migration instruction.

[0240] In the embodiment of the present application, by accessing the flash device through an application in the manner of an NVMe ordinary block device (virtual disk), the present application can increase the number of flash devices serving as actual data storage disks without increasing the operation and maintenance burden on the host. Through the function of setting the compression ratio of the flash device, the present application can set the maximum compression ratio for the flash device. For example, when the host 301 is a 24-slot server, first insert 12 flash devices 100 and set the compression ratio to 1:2. Then, the logical available capacity actually available to the host 301 is the sum of the flash physical available capacities of 24 flash devices 100. Subsequently, according to the operation and maintenance prompt information of the IO management controller 302 (such as the first warning information), new flash devices can be added as needed in the idle slots to reduce the probability of the flash device entering an abnormal state such as read-only due to excessive data writing.

[0241] In the embodiment of the present application, by controlling the flash device to perform data operations and management operations such as capacity warning and health check through the IO management controller 302, the present application can shield the host 301 from the usage details of the flash device 100. The host 301 only needs to manage the virtual disk, enabling the host 301 to make full use of the compression function of the flash device without any management and operation and maintenance burden. The user only needs to focus on the application itself.

[0242] In the embodiment of the present application, by providing a storage method applied to the storage system in any of the above embodiments, the storage method includes: based on the host sending a first command to the IO management controller; and controlling the flash device to perform a data operation through the IO management controller according to the first command and the mapping relationship between the virtual disk and the flash device.

[0243] By the host sending a first command to the IO management controller and controlling the flash device to perform a data operation through the IO management controller according to the first command and the mapping relationship between the virtual disk and the flash device, the present application can shield the host from the usage details of the flash device. The management of the flash device is completed by the IO management controller, thereby reducing the operation and maintenance burden on the host.

[0244] The embodiment of the present application also provides a non-volatile computer storage medium storing computer-executable instructions, which are executed by one or more processors. For example, the one or more processors can execute the storage method in any of the above method embodiments, for example, execute Figure 6 the described respective steps.

[0245] The embodiments of the present application also provide a computer program product, which includes one or more pieces of program code stored in a non-volatile computer-readable storage medium. The processor reads the program code from the non-volatile computer-readable storage medium and executes the program code to complete the method steps of the storage method provided in the above embodiments.

[0246] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware or by hardware related to program code. The program can be stored in a non-volatile computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, etc.

[0247] The device or equipment embodiments described above are merely illustrative. The unit modules described as separate components may or may not be physically separated, and the components shown as module units may or may not be physical units, that is, they may be located in one place or distributed to multiple network module units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0248] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the related technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0249] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; under the idea of the present application, the technical features in the above embodiments or different embodiments can also be combined, and the steps can be implemented in any order, and there are many other changes in different aspects of the present application as above. For the sake of brevity, they are not provided in detail; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A storage system, characterized in that: The storage system includes a host, an IO management controller and at least one flash memory device, wherein: A host, connected to the IO management controller and the flash memory device, and configured to send a first command to the IO management controller, wherein the host includes at least one virtual disk; The IO management controller is connected to the host and the flash memory device, and is used to control the flash memory device to perform data operations according to the first command and the mapping relationship between the virtual disk and the flash memory device.

2. The system according to claim 1, characterized in that The host further includes a command management tool, a base address space and a PCIe system, the IO management controller is communicatively connected with each of the flash memory devices via the PCIe system, the IO management controller includes a storage space, and each of the flash memory devices includes a configuration space; The host is also used to: Based on the command management tool and the PCIe system, sending a device configuration command to the IO management controller, wherein the device configuration command includes device information of each flash memory device; The IO management controller is also used for: Based on the device information and the PCIe system, perform an outbound address configuration operation and an inbound address configuration operation on each flash memory device; The outbound address configuration operation is used to configure the address mapping relationship between the base address space and the storage space, and the inbound address configuration operation is used to configure the address mapping relationship between the storage space and each of the configuration spaces.

3. The system according to claim 2, characterized in that The host communicates with the IO management controller via the NVMe protocol; The host is also used to: Based on the command management tool and the PCIe system, a disk creation command is sent to the IO management controller, wherein the disk creation command includes a data domain type of the virtual disk and a capacity of the virtual disk, and the data domain type includes a single device domain; The IO management controller is also used for: Creating a virtual disk in the host based on the capacity of the virtual disk, the command management tool and the NVMe protocol; When the data domain type of any virtual disk is a single device domain, a flash memory device in an idle state is selected from a plurality of flash memory devices, and a first mapping relationship between the virtual disk and the flash memory device is established.

4. The system according to claim 3, characterized in that The data domain type includes a multi-device domain, and the disk creation command also includes a device quantity, where the device quantity is the quantity of first flash memory devices corresponding to one virtual disk; The IO management controller is also used for: When the data domain type of any virtual disk is a multi-device domain, selecting a plurality of first flash memory devices matching the number of devices from a plurality of flash memory devices in descending order of remaining capacity; According to the preset stripe capacity, the capacity of the virtual disk is segmented to determine the stripe distribution corresponding to the virtual disk; Establishing a second mapping relationship between the virtual disk and each first flash memory device according to the stripe distribution corresponding to the virtual disk; The second mapping relationship includes a mapping relationship between the number of the virtual disk, the serial number of the first flash memory device, the number of each stripe, and the logical address range corresponding to each stripe of the first flash memory device.

5. The system according to claim 2, characterized in that The host further includes an application program, the data operation includes a write operation or a read operation, each flash memory device corresponds to a command submission queue and a command completion queue, and the command submission queue and the command completion queue are stored in the IO management controller; The host is specifically used for: Sending a first command to the target virtual disk based on the application, wherein the first command includes a read command or a write command; Based on the target virtual disk and the PCIe system, sending the first command to the IO management controller; The IO management controller is specifically used for: Receiving and parsing the first command to determine the number of the target virtual disk and the host memory address; Determine the target flash memory device according to the number of the target virtual disk and the mapping relationship between each virtual disk and the flash memory device; A second command is constructed based on the host memory address, and the second command is written into a command submission queue corresponding to the target flash memory device.

6. The system according to claim 5, characterized in that Each virtual disk corresponds to a command queue, and the command queue is stored in the host; The target flash memory device is specifically used for: Based on the PCIe system, reading a command submission queue corresponding to the target flash memory device from the IO management controller to obtain the second command; Based on the second command and the PCIe system, access the storage area corresponding to the host memory address to transmit the target data, wherein the target data is data to be written to the target flash memory device or data to be read from the target flash memory device; After the target data transmission is completed, writing command completion information to a command completion queue corresponding to the target flash memory device based on the PCIe system; The IO management controller is also used for: The command completion information is read, and based on the PCIe system, the command completion information is written into a command queue corresponding to the target virtual disk, so that the host determines that the execution of the first command is completed.

7. The system according to any one of claims 1 to 6, characterized in that: The flash memory device is specifically used for: Acquire host data, compress the host data and store it in a flash memory medium; The IO management controller is also used for: Polling every preset time to determine the remaining capacity of each flash memory device; When the remaining capacity of any flash memory device is less than the preset capacity, determining a second flash memory device and a first virtual disk, wherein the second flash memory device is a flash memory device with the largest remaining capacity among the plurality of flash memory devices, and the first virtual disk is a virtual disk corresponding to the flash memory device with the remaining capacity less than the preset capacity; Allocate a new stripe for the first virtual disk, and establish a third mapping relationship between the first virtual disk and the second flash memory device, wherein the third mapping relationship includes a mapping relationship between the number of the first virtual disk, the serial number of the second flash memory device, the number of the new stripe, and the logical address range corresponding to the new stripe of the second flash memory device; When the target flash memory device corresponding to the first command is the second flash memory device, the second flash memory device is controlled to perform a corresponding data operation.

8. The system according to claim 7, characterized in that The IO management controller is also used for: Based on the mapping relationship between each virtual disk and the flash memory device, determine the target stripe in the third flash memory device, wherein the third flash memory device is a flash memory device with a remaining capacity less than a preset capacity, and the target stripe is a stripe with the largest amount of stored data corresponding to the third flash memory device; Performing data migration on the data corresponding to the target stripe to move the data from the third flash memory device to a fourth flash memory device, wherein the fourth flash memory device is a flash memory device with the largest remaining capacity among the plurality of flash memory devices; Deleting the second mapping relationship corresponding to the target stripe, and establishing a mapping relationship between the target stripe and a fourth flash memory device; An erase command is sent to the third flash memory device to release a storage area corresponding to the target stripe in the third flash memory device.

9. A storage method, characterized in that: Applied to the storage system according to any one of claims 1 to 8, the method comprises: Sending a first command to the IO management controller based on the host; According to the first command and the mapping relationship between the virtual disk and the flash memory device, the flash memory device is controlled by the IO management controller to perform data operations.

10. The method according to claim 9, characterized in that The host further includes an application and a PCIe system, and the sending of a first command to the IO management controller based on the host includes: Sending a first command to the target virtual disk based on the application, wherein the first command includes a read command or a write command; Based on the target virtual disk and the PCIe system, the first command is sent to the IO management controller.

11. The method according to claim 10, characterized in that Each flash memory device corresponds to a command submission queue and a command completion queue, the command submission queue and the command completion queue are stored in the IO management controller, the data operation includes a read operation or a write operation, and the flash memory device includes a flash memory medium; According to the first command and the mapping relationship between the virtual disk and the flash memory device, controlling the flash memory device to perform data operations through the IO management controller includes: Receiving and parsing the first command based on the IO management controller to determine the number of the target virtual disk and the host memory address; Determine the target flash memory device according to the number of the target virtual disk and the mapping relationship between each virtual disk and the flash memory device; Constructing a second command based on the host memory address, and writing the second command into a command submission queue corresponding to the target flash memory device; Reading a command submission queue corresponding to the target flash memory device based on the target flash memory device to obtain the second command; When the second command is a read command, first target data is read based on the target flash memory device, and the first target data is transmitted to the storage area corresponding to the host memory address through the PCIe system, wherein the first target data is data stored in the target flash memory device; When the second command is a write command, a storage area corresponding to the host memory address is read based on the target flash memory device to obtain second target data, and the second target data is stored in the flash memory medium.

Citation Information

Patent Citations

  • Using a virtual to physical map for direct user space communication with a data storage device

    CN104903868A

  • Virtual disk processing method and related device

    CN109857519A

  • Flash-based accelerator and computing device including the same

    KR101943312B1

  • Storage virtual containers

    US20100262752A1

  • Memory access response merging in a memory hierarchy

    US20220091980A1

Cited By

  • Data read-write path determination method, electronic equipment and readable storage medium

    CN120704620A

  • Data writing consistency guaranteeing method and device based on multi-level collaboration

    CN122086334A