Storage system and storage method

By introducing an IO management controller to manage flash memory devices, the problem of the host needing to directly handle the low-level details of flash memory devices is solved, thus reducing the operational burden.

CN120066403BActive Publication Date: 2025-12-05SUZHOU DAPU MICROELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The host directly interacts with the flash memory device, requiring an understanding and handling of the underlying usage details of the flash memory device, which increases the operational burden.

Method used

An I/O management controller is introduced to manage the flash memory device, shielding the host from the details of flash memory device usage. The host only needs to interact with the I/O management controller, which controls data operations based on the mapping relationship between the virtual disk and the flash memory device.

Benefits of technology

It reduces the operational burden on the host by shielding the usage details of flash memory devices through the IO management controller, thus simplifying host management operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066403B_ABST
    Figure CN120066403B_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the application field of storage devices, and discloses a storage system and a storage method, the storage system comprising a host, an I / O management controller and at least one flash memory device, wherein the host is used for sending a first command to the I / O management controller, the host comprising at least one virtual disk; the I / O management controller is used for controlling the flash memory device to perform a data operation according to the first command and a mapping relationship between the virtual disk and the flash memory device. Through the host comprising at least one virtual disk, the I / O management controller is used for controlling the flash memory device to perform a data operation according to the first command sent by the host and the mapping relationship between the virtual disk and the flash memory device, the application can shield the use details of the flash memory device from the host, and the management of the flash memory device is completed by the I / O management controller, so that 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] The present application relates to the field of storage devices, and particularly relates to a storage system and a storage method. BACKGROUND

[0002] A flash memory device, for example, a solid state drive (SSD), is a storage device using a semiconductor flash memory (NAND Flash) as a medium. At present, when using the flash memory device, a host needs to directly interact with the flash memory device to realize management and monitoring of the flash memory device.

[0003] In the implementation of the present application, the inventors have found that at least the following problem exists in the prior art: the host directly faces the flash memory device, and needs to understand and handle the underlying usage details of the flash memory device, thereby increasing the operation and maintenance burden of the host. SUMMARY

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

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

[0006] In a first aspect, embodiments of the present application provide a storage system, which comprises a host, an IO management controller and at least one flash memory device, wherein,

[0007] The host is connected with the IO management controller and the flash memory device, and is configured to send a first command to the IO management controller, wherein the host comprises at least one virtual disk.

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

[0009] In a second aspect, embodiments of the present application provide a storage method, which is applied to the storage system of the first aspect, and the storage method comprises:

[0010] The host sends a first command to the IO management controller;

[0011] The IO management controller controls the flash memory device to perform a data operation according to the first command and a mapping relationship between the virtual disk and the flash memory device.

[0012] In a third aspect, embodiments of the present application further provide a nonvolatile computer readable storage medium, which stores computer executable instructions, and when the computer executable instructions are executed by a processor, the processor executes the storage method of the second aspect.

[0013] In a fourth aspect, an embodiment of the present application provides a computer program product, which comprises instructions or programs, and when the instructions or programs are executed by a processor, the processor executes the computer program of the storage method of the second aspect.

[0014] The beneficial effects of the embodiments of the present application are that: different from the prior art, the storage system provided by the embodiments of the present application comprises a host, an IO management controller and at least one flash device, wherein the host is connected with the IO management controller and the flash device, and is configured to send a first command to the IO management controller, the host comprises at least one virtual disk; the IO management controller is connected with the host and the flash device, and is configured to control the flash device to perform a data operation according to the first command and a mapping relationship between the virtual disk and the flash device.

[0015] By means of the host comprising at least one virtual disk, and the IO management controller being configured to control the flash device to perform a data operation 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 use details of the flash device from the host, 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 DRAWINGS

[0016] One or more embodiments are illustrated by way of example in the figures that are part of this document, and which illustrate by way of example the principles of the embodiments. The embodiments are not limited to the examples of drawings. Elements having the same reference numerals in the figures indicate like elements unless expressly stated otherwise. The drawings in the figures are not to scale and are for purposes of illustration only.

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

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

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

[0020] Figure 4 is a detailed structural schematic 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 flow schematic diagram of a storage method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0024] In addition, the technical features involved in each of the embodiments of the present application described below can be combined with each other as long as there is no conflict.

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

[0026] Please refer to Figure 1 , Figure 1 is a structural schematic diagram of a flash memory device provided by the embodiments of the present application;

[0027] Figure 1 Take a flash memory device supporting transparent compression function and using a non-volatile memory express (NVMe) interface protocol as an example. The transparent compression is a compression technology without user awareness or intervention, and the flash memory device automatically compresses data before writing into the flash memory.

[0028] As shown in Figure 1 , 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 with the control module 102 and the internal bus 103, and is configured to compress and / or decompress data. The compression and decompression module 101 includes a compression and decompression engine.

[0030] The control module 102 is connected with the compression and decompression module 101 and the internal bus 103, and is configured to serve as a control operation unit and manage the internal system of the flash memory device 100. The control module 102 includes a central processing unit (CPU).

[0031] An internal bus 103 is connected to the compression and decompression module 101, the control module 102, the NVMe controller 105, and the flash controller 108, and is used to transmit data and commands between the modules in the flash device 100.

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

[0033] The NVMe controller 105 is connected to the internal bus 103 and the interface 104, and is used to be responsible for data transmission, protocol analysis, and flash management.

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

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

[0036] The flash controller 108 is connected to the internal bus 103, the cache module 107, and the flash array 109, and is used to manage the flash array 109. The flash controller 108 is an Open NAND Flash Interface (ONFI) flash controller.

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

[0038] As can be seen, the flash device 100 can store more effective data, reduce read-write conflicts, improve mixed read-write performance, and reduce user costs by compressing the data through the internal compression and decompression module 101 and then writing the data to the flash. Moreover, since the compression / decompression operation is independent of the host, the host can use more resources for other tasks.

[0039] Currently, when using a flash memory device, a host needs to directly interact with it to implement management and monitoring of the flash memory device.

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

[0041] As Figure 2 shown, the computing 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, and 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 in communication connection with 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 system software for managing 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 request received by the NVMe interface 2121 into a command conforming to the NVMe protocol, and communicates 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 command and data packet 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 operating system 212, and the read-write operation is directly issued 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 check the capacity and health status of the flash memory device 100 regularly, and if it is detected that the capacity or health condition exceeds the set safety threshold, the application 211 needs to process the related alarm information, and perform data migration if necessary, to prevent the CSSD from writing too much.

[0047] It can be seen that, since the host directly faces the flash device, the underlying usage details of the flash device need to be understood and handled, which increases the operation and maintenance burden of the host. For example, when the capacity of the flash device exceeds the set safety threshold and triggers an alarm, the host needs to handle the alarm content and perform data migration and other operations, increasing the operation and maintenance burden.

[0048] Based on this, the embodiment of the present application provides a storage system, which manages the flash device through the IO management controller, and masks the usage details of the flash device to the host, thereby reducing the operation and maintenance burden of the host.

[0049] Please refer to Figure 3 , Figure 3 is a structural schematic diagram of a storage system provided by the embodiment 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, and the host 301 includes at least one virtual disk 311. Among them, Figure 3 Take one flash device 100 and one virtual disk 311 as an example.

[0051] The host 301 connects 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 the 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 connects 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, and 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 a corresponding read operation or write operation.

[0055] The flash memory device 100 is connected with the host 301 and the IO management controller 302, and is used for performing 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 data stored in the flash memory device 100 and transmits the data to the host 301, or the flash memory device 100 performs a write operation, that is, obtains data stored in the host 301 and writes the data into the flash memory device 100.

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

[0057] As Figure 4 indicated, 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. 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] The IO management controller 302 is in communication connection with each flash memory device 100 through the PCIe system 315, and the components of the host 301 are in communication connection through an internal bus. The IO management controller 302 and each flash memory device 100 are PCIe devices, and the host 301, the IO management controller 302 and the flash memory device 100 are in communication through an NVMe protocol.

[0059] The application program 312 is in communication connection with the operating system 314, and is used for sending a first command by using the virtual disk 311. The application program 312 refers to various software running on the operating system 314, and the specific type of the application program 312 can be set by a person skilled in the art according to the use of the host, which is not limited herein.

[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 in communication connection with the operating system 314, and is used for sending a device configuration command or a disk creation command to the IO management controller 302 through the character device 3141, or creating the virtual disk 311 in the operating system 314 based on a control command sent by the IO management controller 302.

[0062] The command management tool 313 is an application program running on the operating system 314, and the command management tool 313 includes but is not limited to a 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 memory 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 in the operating system 314.

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

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

[0065] The character device 3141 is connected with 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 calling of the command management tool 313, or send a control command sent by the IO management controller 302 to the command management tool 313. The character device 3141 is an 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 the character device 3141.

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

[0068] In the embodiment of the present application, the operating system 314 includes a base address (Base Address Register, BAR) space, the IO management controller 302 includes a storage space, and each flash device 100 includes a configuration space. The base address space is a 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, the configuration space is a register set used for configuration and management of the flash device 100 (as a PCIe device), and the storage space includes but is not limited to a dynamic random-access memory (Dynamic Random-Access Memory, DRAM), for example, the storage space is a double data rate synchronous dynamic random-access memory (Double Data Rate synchronous dynamic random-access memory, DDR SDRAM).

[0069] Before the host 301 sends the first command to the IO management controller 302, the host is also used to send a device configuration command to the IO management controller, and the IO management controller is also used to: according to the device configuration command, performing an outbound address configuration operation and an inbound address configuration operation on each flash device, so as to realize that the IO management controller can access the configuration space of each flash device, and each flash device can access the storage space of the IO management controller.

[0070] 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 the first command to the IO management controller 302, the host is used to send a device configuration command to the IO management controller based on the command management tool and the PCIe system. The device configuration command includes 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. The specific content of the device information of the flash device can be input by a user into the command management tool 313. The device configuration command is a NVMe custom command (VU command), and the VU command is a command left by the NVMe protocol framework to 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 configured to perform an outbound address configuration operation and an inbound address configuration operation on each flash 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, and performs an outbound address configuration operation by using a Peer-to-Peer Communication (P2P) technology of the PCIe system 315 to establish an address mapping relationship between a base address space of the host 301 and a storage space of the IO management controller 302, and performs an inbound address configuration operation to establish an address mapping relationship between the storage space of the IO management controller 302 and a configuration space of each flash device 100. It can be understood that the outbound address configuration operation and the inbound address configuration operation only need to be performed 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 device 100 inserted into the host 301; through the inbound address configuration operation, each flash device 100 can access the storage space of the IO management controller 302, so as to be able to access the command submission queue and the command completion queue stored in the storage space of the IO management controller 302 in the subsequent process.

[0076] In the embodiment of the present application, the IO management controller 302 further comprises an NVMe Target Driver. After the outbound address configuration operation and the inbound address configuration operation are completed, the IO management controller 302 is further configured to perform initialization of the NVMe protocol through the configuration space of each flash device 100.

[0077] Specifically, the IO management controller 302 accesses the configuration space of each flash device 100 through the NVMe Target Driver to complete the initialization of the related NVMe protocol.

[0078] In the embodiment of the present application, the IO management controller 302 can be recognized by the host 301 as a standard NVMe device, and the host 301 can interact with the IO management controller 302 through the standard NVMe protocol without needing to care about the complex implementation of the device bottom layer. Moreover, the host 301 can directly use the NVMe driver provided by the operating system 314 to recognize the IO management controller 302 without needing to install the customized driver provided by the manufacturer.

[0079] In the embodiment of the present application, before the host 301 sends the 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 the disk creation command to the IO management controller based on the command management tool and the 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 (i.e. the flash device) corresponding to the virtual disk. 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 into 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, and 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 an NVMe virtual disk with a fixed capacity 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 identifies it as a standard NVMe block device.

[0085] In the embodiment of the present application, the flash device 100 has a compression function, for example: the flash device 100 is a flash device supporting transparent compression function and adopting a Non-Volatile Memory Express (NVMe) protocol.

[0086] Since different types of data have different compressibility, for example, a text file is usually more compressible than a video file that has been compressed, which makes the actual available capacity of the flash memory device depend on the data characteristics, that is, the capacity is unpredictable. Compared with the existing scheme in which the user (through an application) directly faces the object of the flash memory device, there is a difference problem between the actual capacity and the initial capacity of the device. The present application provides a fixed-capacity general block device view (virtual disk) for the upper-layer application through the IO management controller. The user directly faces the virtual disk, and the capacity of the virtual disk is constant. In combination with subsequent data distribution and capacity alarm of the flash memory device 100 managed by the IO management controller, the difference problem between the actual capacity and the initial setting capacity of the flash memory device can be handled.

[0087] In the embodiment of the present application, when the virtual disk is created, the IO management controller is further configured to: establish a mapping relationship between the virtual disk and the flash memory device. The mapping relationship between the virtual disk and the flash memory 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 whose data domain type is a single-device domain and the flash memory device, and the second mapping relationship is the mapping relationship between any virtual disk whose data domain type is a multi-device domain and the flash memory device.

[0088] In some embodiments, the data domain type includes a single-device domain, which means that the data domain of the virtual disk contains only one flash memory device, that is, the virtual disk corresponds to only one flash memory 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 a flash memory device in an idle state from the plurality of flash memory devices, and establish a first mapping relationship between the virtual disk and the flash memory device.

[0090] The flash memory device in an idle state is a flash memory device that does not store any valid data, and the first mapping relationship includes a corresponding relationship between the number of the virtual disk and the serial number of the flash memory device.

[0091] Specifically, when the data domain type of any virtual disk 311 is a single-device domain, the IO management controller 302 selects a flash memory device 100 that does not store any valid data from the plurality of flash memory 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 memory device 100. The first mapping relationship is stored in the mapping table, so that all storage resources of the flash memory device 100 are only used by the virtual disk 311 and are not shared with other virtual disks.

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

[0093] When the data domain type of any virtual disk is the multi-device domain, the IO management controller is specifically configured to: select a plurality of first flash devices matching the device quantity from the plurality of flash devices in descending order of 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] The segmentation refers to slicing the overall capacity of the virtual disk into a plurality of strips according to the preset strip capacity, and the strip refers to the smallest continuous data block of the capacity of the virtual disk divided according to the preset strip capacity. The strip distribution refers to the storage layout of the strip mapped to the plurality of first flash devices after the capacity of the virtual disk is divided by the strip.

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

[0096] Specifically, the IO management controller 302 acquires the remaining capacities of each flash device 100 connected thereto, sorts the flash devices 100 in descending order of the remaining capacities, obtains a sorting result, and sequentially selects a plurality of 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 a plurality of strips, so as to determine the strip distribution corresponding to the virtual disk. Each strip is sequentially assigned a first flash device according to the strip distribution, a logical address range is allocated to each strip in the corresponding first flash device, so as to establish a second mapping relationship between the virtual disk and each first flash device, and the second mapping relationship is stored in the mapping table. The way of sequentially assigning a first flash device to each strip includes but is not limited to a Round-Robin mode.

[0097] For example: when the number of devices of the virtual disk 1 (the virtual disk 1 311 numbered 1) is 2, the IO management controller 302 selects two flash devices 100 with the largest remaining capacities from a plurality of 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 the virtual disk 1 is segmented to obtain strip 0, strip 1, and strip 2, and the flash device 1 is assigned to strip 0, the flash device 2 is assigned to strip 1, and the flash device 1 is assigned to strip 2 by the Round-Robin mode, and then a logical address range is allocated to each strip in the corresponding first flash device, so as to establish a second mapping relationship between the virtual disk 1 and the flash device 1, and a second mapping relationship between the virtual disk 1 and the flash device 2.

[0098] Subsequent data to be written corresponding to the virtual disk 1 will be stored in the corresponding flash device 1 and flash device 2 by strip 0, strip 1, and strip 2 in a round-robin manner.

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

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

[0101] by Figure 5 For example, the first mapping relationship between virtual disk 0 and flash memory device 0 can be represented as: Virtual disk 0 - Flash memory device 0. The second mapping relationship between virtual disk 1 and flash memory device 1 can be represented as: Virtual disk 1 - Stripe 0 - Flash memory device 1 - (Starting logical address, address length); Virtual disk 1 - Stripe 2 - Flash memory device 1 - (Starting logical address, address length). The second mapping relationship between virtual disk 1 and flash memory device 2 can be represented as: Virtual disk 1 - Stripe 1 - Flash memory device 2 - (Starting logical address, address length).

[0102] In this embodiment, by setting a data domain type, a mapping relationship between the virtual disk and the flash memory device is established according to the data domain type specified by the user. After the virtual disk is successfully created, the data to be written to the virtual disk is stored on the flash memory device in the data domain corresponding to the virtual disk, and the data of the virtual disk is carried by these flash memory devices.

[0103] In this embodiment, the host 301 further includes memory space for storing data. Each flash memory device 100 corresponds to a command submission queue and a command completion queue, which are stored in the storage space of the I / O management controller 302. The command submission queue stores the second command corresponding to the flash memory device 100, and the command completion queue stores command completion information. The second command instructs the flash memory device 100 to perform data operations, and the command completion information indicates that the flash memory device 100 has completed executing the second command.

[0104] It is understandable that, through outbound address configuration operations and inbound address configuration operations, 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.

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

[0106] The first command is an NVMe command sent by the application to the target virtual disk. This first command can be either a read command or a write command. A read command requests data to be read from the virtual disk, while a write command requests data to be written 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, a number of an NVMe namespace corresponding to the target virtual disk, and a 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 an address of data to be written into the flash device (i.e., the data to be written in the foregoing) in the memory space of the host 301, and the second memory address is an address to which data read from the flash device 100 needs to be written into the memory space of the host 301.

[0109] Specifically, the application program 312 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, i.e., transmits the first command to the IO management controller 302 through the PCIe system 315.

[0110] When controlling the flash device to perform the 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; and construct a second command based on the host memory address and write the second command into a command submission queue corresponding to the target flash device.

[0111] The target flash device is the flash device that needs to perform the 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, and determines the number of the target virtual disk according to the number of the NVMe namespace. According to the number of the target virtual disk and the logical address of the target virtual disk, the mapping table is searched to determine the target flash device corresponding to the first command and a target address. The IO management controller 302 constructs a second command based on the host memory address and writes the second command into a command submission queue corresponding to the target flash device. The target address is a 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 and each flash device 100 directly transmit data 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 transmit target data; and based on the PCIe system, write command completion information to the command completion queue corresponding to the target flash device after the target data transmission is completed.

[0115] The target data is data to be written into the target flash device or 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, accesses the storage area corresponding to the host memory address in the host 301 through the PCIe system 315, and transmits the target data through the DMA technology. After the target data transmission is completed, the target flash device writes the 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 data stored in the target flash device, and the second target data is 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 transmit the second target data through the PCIe system 315. Thus, the second target data is stored to 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 transmitted to the storage area corresponding to the second host memory address in the host 301.

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

[0121] The IO management controller is also configured to read the 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 is 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 is executed.

[0123] The host 301 is also 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 312 to notify the application 312 that the first command is executed.

[0124] In the embodiment of the present application, the NVMe virtual disk can be recognized by the application 312 as a standard NVMe block device, and the virtual disk 311 is accessed by the application 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, and shield the use 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 compressed host data to the flash medium. Wherein, the host data is the second target data in the above, and specifically, the flash device 100 stores the compressed second target data to the flash medium after obtaining the second target data.

[0126] In some embodiments, the flash device 100 is also configured to set a compression ratio, and the compression ratio is the ratio of the data amount of the original data to the 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 flash physical available capacity of the flash device 100 is 3.2TB, the logical available capacity corresponding to the flash device 100 in the operating system 314 is 6.4TB.

[0127] Since the data type is variable, the actual compression ratio varies, when the remaining capacity of the flash device 100 is less than the preset capacity, the flash device 100 performs capacity warning, at this time, the data stored in the flash device 100 needs to be processed, for example, data migration is performed, so as to reduce the probability of the flash device 100 entering the read-only state.

[0128] In the embodiment of the application, the IO management controller is further configured to process the flash device that appears the capacity warning. The IO management controller is specifically configured to:

[0129] determine the remaining capacity of each flash device every preset time; when the remaining capacity of any flash device is less than a preset capacity, determine a second flash device and a 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 device; when the target flash device corresponding to the first command is the second flash device, control the second flash device to perform the corresponding data operation.

[0130] The preset time is an interval time for performing the polling operation, and the preset time can be set by the person skilled in the art according to the actual capacity of the flash device, which is not limited herein. The second flash device is a flash device with the largest remaining capacity among the plurality of flash devices, the first virtual disk is a virtual disk corresponding to the flash device with the remaining capacity less than the preset capacity, and the third mapping relationship includes the number of the first virtual disk, the serial number of the second flash device, the number of the new stripe, and the mapping relationship between the new stripe and the logical address range corresponding to the second flash device.

[0131] The preset capacity is the maximum value of the remaining capacity of the flash device when the capacity warning appears, and the preset capacity can be set by the person skilled in the art according to the actual capacity of the flash device, which is not limited herein. For example, the preset capacity is 5% of the total capacity of the flash device.

[0132] Specifically, the IO management controller 302 determines the remaining capacity of each flash device 100 every preset time, and when the remaining capacity of any flash device 100 is less than a preset capacity, determines a first virtual disk corresponding to the flash device 100, and selects a flash device 100 with the largest remaining capacity from the plurality of flash devices 100 as a second flash 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 device, thereby establishing a third mapping relationship between the first virtual disk and the second flash device, and storing the third mapping relationship to the mapping table.

[0133] For example, Figure 5For example, if the remaining capacity of the flash memory device 2 is less than the preset capacity, the first virtual disk is virtual disk 1, the second flash memory device is flash memory device X (the flash memory device 100 numbered X), a new stripe is allocated for the virtual disk 1, for example, the new stripe is stripe X, and the third mapping relationship between the virtual disk 1 and the flash memory device X can be represented as: virtual disk 1-stripe X-flash memory device X-(start logical address, address length). At this time, the flash memory device 2 only bears the read and write requests of the stripes in the existing mapping relationship 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 a corresponding data operation. The specific steps of the second flash memory device are similar to those of the target flash memory device, and will not be described here.

[0135] In some embodiments, the host 301 further includes an alarm system for monitoring 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 configured 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 the stripes borne by the flash memory device with the capacity alarm still have write requests, the IO management controller is further configured to perform data migration. The mapping table is further configured to store metadata information of each stripe corresponding to the flash memory device, which 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 stored data amount of each stripe in the storage area corresponding to the flash memory device, and the stored data amount is the data length of the written data. For example, Figure 5 For example, the metadata information of stripe 0 of virtual disk 1 corresponding to the flash memory device 1 includes the stored data amount of stripe 0 of virtual disk 1 in the disk 1 stripe 0 area of the flash memory device 1.

[0138] The IO management controller 302 is specifically configured to:

[0139] determine a target stripe in the third flash memory device based on the mapping relationship between each virtual disk and the flash memory device; perform data migration on data corresponding to the target stripe to move the data from the third flash memory device to a fourth flash memory device; delete the second mapping relationship corresponding to the target stripe and establish a mapping relationship between the target stripe and the fourth flash memory device; and send 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.

[0140] The third flash memory device is a flash memory device with a remaining capacity less than a preset capacity, the target stripe is a stripe corresponding to the third flash memory device with a largest amount of stored data, and the fourth flash memory device is a flash memory device with a largest remaining capacity among the plurality of flash memory devices.

[0141] Specifically, the IO management controller 302 queries the metadata information in the mapping table, determines the amount of stored data of each stripe corresponding to the third flash memory device in the corresponding storage area of the third flash memory device, and takes the stripe with the largest amount of stored data as the target stripe. The IO management controller 302 selects a flash memory device 100 with a largest remaining capacity from the plurality of flash memory devices 100 connected thereto 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.

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

[0143] In some embodiments, the data migration strategy is configurable. The alarm system of the host 301 is further configured to monitor the second alarm information sent by the IO management controller 302. The IO management controller 302 is configured to: send the second alarm information to the host 301 when detecting that the remaining capacity of any flash memory device is less than the preset capacity; receive a data migration instruction sent by the host 301, and perform data migration according to the data migration instruction. The second alarm information is used to notify the user that the flash memory device has a capacity alarm, so that the user determines 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 second alarm information to the host 301 to inform the user that the flash device 100 has a capacity alarm. The alarm system of the host 301 acquires the second alarm information and sends it to the application program, so that the user determines 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 device is less than the preset capacity or performs data migration after acquiring the data migration instruction, the data migration is completed under the management of the IO management controller 302, and the host 301 does not need to perform data migration.

[0147] In the embodiments of the present application, when the remaining capacity of any flash device 100 is less than the preset capacity, that is, when a capacity alarm occurs, the IO management controller 302 allocates a new stripe to the first virtual disk and the second flash device, establishes a mapping relationship between the first virtual disk and the second flash device, and performs data migration by the IO management controller 302. Compared with the existing scheme in which the host needs to process alarm content and perform data migration and the like, increasing the operation and maintenance burden, in the present application, the host does not need to process operation and maintenance management tasks related to the flash 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, which is used to monitor and check the health indicators of each flash device 100. The health indicators include, but are not limited to, temperature and log information (SMART log). The alarm system of the host 301 is also used to monitor third alarm information sent by the IO management controller 302. The third alarm information is used to prompt the user to replace the flash device.

[0149] The IO management controller 302 is specifically configured to: poll to determine the health indicators of each flash device every preset time; and when the health indicators of any flash device are greater than a preset indicator threshold, send third alarm information to the host 301 to prompt the user to replace the flash device. The preset indicator threshold can be set by a person skilled in the art according to the type of the storage unit of the flash device, the application environment, and the like, which is not limited herein.

[0150] In some embodiments, before the user replaces the flash memory 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, so as to migrate all data stored in the flash memory device to another flash memory device.

[0151] In the embodiments of the present application, by using the application program to read and write access the flash memory device in the form of an NVMe general block device (virtual disk), the present application can increase the number of flash memory devices as actual data storage disks without increasing the operation and maintenance burden of the host. By the function of setting the compression ratio of the flash memory device, the present application can set the maximum compression ratio for the flash memory device. For example, when the host 301 is a 24-slot server, 12 flash memory devices 100 are inserted first, and the compression ratio is set to 1:2. Therefore, the host 301 can actually use the sum of the flash memory physical available capacities of the 24 flash memory devices 100. Subsequently, only according to the operation and maintenance prompt information (for example, the first alarm information) of the IO management controller 302, new flash memory devices can be added in the idle slots as needed to reduce the probability of the flash memory device entering the read-only or other abnormal state due to too much data writing.

[0152] In the embodiments of the present application, by controlling the flash memory device to perform data operations and performing capacity alarm, health check and other management operations by the IO management controller 302, the present application can shield the use details of the flash memory device 100 from the host 301. The host 301 only needs to manage the virtual disk, so that the host 301 can fully utilize the compression function of the flash memory device without any 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, a storage system is provided, which includes a host, an IO management controller and at least one flash memory device. The host is connected with the IO management controller and the flash memory device, and is configured to send a first command to the IO management controller. The host includes at least one virtual disk. The IO management controller is connected with the host and the flash memory device, and is configured to control the flash memory device to perform data operations according to the first command and a mapping relationship between the virtual disk and the flash memory device.

[0154] By the host including at least one virtual disk, the IO management controller is configured to control the flash memory device to perform data operations according to the command sent by the host and the mapping relationship between the virtual disk and the flash memory device. The present application can shield the use details of the flash memory device from the host, and the management of the flash memory 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 is a flowchart of a storage method provided by the embodiments of the present application;

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

[0157] As shown in the figure, the storage method comprises the following steps. Figure 6

[0158] Step S601: sending a first command from the host to the IO management controller;

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

[0160] In the embodiment of the present application, the host further comprises a command management tool, a character device, a base address space and a PCIe system. The IO management controller 302 comprises a storage space, and each flash device 100 comprises a configuration space. The base address space is a 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. The configuration space is a register set used for configuration and management of the flash device 100 (as a PCIe device).

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

[0162] The device configuration command comprises device information of each flash device, and the device information of the flash device comprises 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 performs the outbound address configuration operation by using the Peer-to-Peer Communication (P2P) technology of the PCIe system 315 to establish the address mapping relationship between the base address space of the host 301 and the storage space of the IO management controller 302, and performs 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 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 device 100 inserted into the host 301; through the inbound address configuration operation, each flash device 100 can access the storage space of the IO management controller 302, so as to subsequently be able to access the command submission queue and the 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 further comprises an NVMe target driver. After the outbound address configuration operation and the inbound address configuration operation are completed, the storage method further comprises: based on the configuration space of the IO management controller and each flash device 100, performing initialization of the NVMe protocol.

[0166] Specifically, the IO management controller 302 accesses the configuration space of each flash device 100 through the NVMe target driver, and completes the initialization work of the related NVMe protocol.

[0167] In the embodiment of the present application, the IO management controller 302 can be recognized by the host 301 as a standard NVMe device, and the host 301 can interact with the IO management controller 302 through the standard NVMe protocol without needing to care about the complex implementation of the device bottom layer. Moreover, the host 301 can directly use the NVMe driver provided by the operating system 314 to recognize the IO management controller 302, without needing to install the customized driver provided by the manufacturer.

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

[0169] The disk creation command comprises a data domain type of the virtual disk and a 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 (i.e. the flash device) corresponding to the virtual disk.

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

[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] The step of creating the virtual disk in the host according to the disk creation command through the IO management controller includes: sending a control command to the command management tool based on the IO management controller, the PCIe system and the character device; and creating the virtual disk in the operating system through the command management tool according to the control command. 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 an NVMe virtual disk with a fixed capacity 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 is recognized by the host as a standard NVMe block device.

[0175] In the embodiment of the application, the storage method further includes: when the virtual disk is created, establishing a mapping relationship between the virtual disk and the flash memory device based on the IO management controller. The mapping relationship between the virtual disk and the flash memory 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 type and the flash memory device, and the second mapping relationship is the mapping relationship between any virtual disk with a multi-device domain type and the flash memory device.

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

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

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

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

[0180] The step of establishing a mapping relationship between a virtual disk and a flash memory device based on the IO management controller includes: when the data domain type of any virtual disk is a multi-device domain, selecting multiple first flash memory devices from the flash memory devices in descending order of remaining capacity, so as to match the device quantity; 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 memory 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 memory device 100 connected thereto, sorts these flash memory devices 100 in descending order of remaining capacity, obtains a sorting result, and selects multiple flash memory devices 100 from the sorting result in order according to the device quantity, as the first flash memory devices corresponding to the virtual disk. The capacity of the virtual disk is segmented according to a preset strip capacity to slice the capacity of the virtual disk into multiple strips, so as to determine the strip distribution corresponding to the virtual disk. Each strip is sequentially assigned a first flash memory device according to the strip distribution, and a logical address range is allocated for each strip in the corresponding first flash memory device, so as to establish a second mapping relationship between the virtual disk and each first flash memory device, and store the second mapping relationship in the mapping table. The way of sequentially assigning a first flash memory device to each strip includes but is not limited to a Round-Robin mode.

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

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

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

[0185] The first command is an NVMe command sent by the application program to the target virtual disk, and 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 into the virtual disk. The target virtual disk is a virtual disk that receives and processes the first command.

[0186] The first command includes an operation code, a host memory address, a number of an NVMe namespace corresponding to the target virtual disk, and a logical address of the target virtual disk. The operation code is used to identify the type of the first command, i.e. the read command or the write command. The host memory address includes the first host memory address or the 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 into the flash device (i.e. the data to be written in the above) in the memory space of the host 301, and the second memory address is the address of the data read from the flash device 100 to be written into the memory space of the host 301.

[0188] Step S612: sending 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, i.e. transmits the first command to the IO management controller 302 through the PCIe system 315.

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

[0191] Specifically, the IO management controller controls the flash device to perform data operation according to the first command and the mapping relationship between the virtual disk and the flash device. The data operation includes reading operation or writing operation.

[0192] In the embodiments 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 a 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 the corresponding command submission queue and the command completion queue.

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

[0195] The step S621 comprises: receiving and parsing the first command by the IO management controller to determine the number of the target virtual disk and the host memory address.

[0196] 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] The step S622 comprises: determining 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.

[0199] Specifically, the IO management controller 302 determines the target flash memory device and the target address corresponding to the first command according to the number of the target virtual disk and the logical address of the target virtual disk by searching the mapping table. The target address is the logical address corresponding to the logical address of the target virtual disk in the target flash memory device.

[0200] The step S623 comprises: constructing the second command based on the host memory address, and writing 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 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 transmits data with each flash device 100 through the direct memory access (DMA) technology.

[0203] Step S624: reading 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 the second command.

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

[0206] 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, reading the storage area corresponding to the host memory address based on the target flash device to obtain second target data, and storing the second target data to the flash medium.

[0209] 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 to the target address of the flash medium.

[0211] In the embodiments 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 to the command completion queue corresponding to the target flash device in the IO management controller based on the target flash device.

[0212] Specifically, after the first target data or the second target data is transmitted, 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 embodiments 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 comprises: 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, calls a callback function to send information to the application 312 to notify the application 312 that the first command execution is completed.

[0215] In the embodiments of the present application, the NVMe virtual disk can be recognized by the application 312 as a standard NVMe block device, and the virtual disk 311 is accessed by the application 312. The IO management controller 302 controls the flash device 100 to perform data operation 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, and shield the use 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 supporting transparent compression function using Non-Volatile Memory Express (NVMe) interface protocol.

[0217] The storage method further comprises: 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 device comprises: setting a compression ratio, and compressing the second target data according to the compression ratio to obtain compressed second target data. The compression ratio of the flash device is the ratio of the data amount of the original data to the data amount of the 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 flash physical available capacity of the flash device 100 is 3.2 TB, the corresponding logical available capacity of the flash device 100 displayed in the operating system 314 is 6.4 TB.

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

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

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

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

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

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

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

[0226] In some embodiments, the method further comprises: when the remaining capacity of any flash memory device is less than the preset capacity, performing data migration on the data stored in the flash memory device based on the IO management controller. The mapping table is also used to store the metadata information of each stripe corresponding to the flash memory device, which 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 of each stripe in the storage area corresponding to the flash memory device, and the data length of the written data.

[0227] The step of performing data migration on the data stored in the flash memory device based on the IO management controller comprises: determining a 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; and 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] The third flash memory device is the flash memory device with a remaining capacity less than the preset capacity, the target stripe is the stripe corresponding to the third flash memory device with the largest amount of stored data, and the fourth flash memory device is the flash memory device with the largest remaining capacity among the plurality of flash memory devices.

[0229] Specifically, the IO management controller 302 queries the metadata information in the mapping table, determines the amount of stored data of each stripe corresponding to the third flash memory device in the corresponding storage area of the third flash memory device, and selects the stripe with the largest 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 the plurality of flash memory devices 100 connected thereto 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 stripe in the mapping table, and establishes a mapping relationship between the target stripe and the fourth flash device. For example, if the target stripe is stripe 0 of virtual disk 1, the second mapping relationship corresponding to stripe 0 of virtual disk 1 is: virtual disk 1-stripe 0-flash device 1-(start logical address, address length), and the mapping relationship is deleted in the mapping table. If the third flash device is flash device X, the mapping relationship between the target stripe and the fourth flash device is: virtual disk 1-stripe 0-flash device X-(start logical address, address length), and the mapping relationship is added in the mapping table. Figure 5 For example, if the target stripe is stripe 0 of virtual disk 1, the second mapping relationship corresponding to stripe 0 of virtual disk 1 is: virtual disk 1-stripe 0-flash device 1-(start logical address, address length), and the mapping relationship is deleted in the mapping table. If the third flash device is flash device X, the mapping relationship between the target stripe and the fourth flash device is: virtual disk 1-stripe 0-flash device X-(start logical address, address length), and the mapping relationship is added in the mapping table.

[0231] In some embodiments, the data migration strategy is configurable. The storage method further comprises: when it is detected that the remaining capacity of any flash device is less than the preset capacity, sending, by the IO management controller, second alarm information to the host 301; receiving, by the IO management controller, a data migration instruction sent by the host 301, and performing data migration according to the data migration instruction. The second alarm information is used to inform the user that the flash device has a capacity alarm, so that the user determines 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 second alarm information to the host 301 to inform the user that the flash device 100 has a capacity alarm. The alarm system of the host 301 acquires the second alarm information and sends it to the application program, so that the user determines whether to perform data migration.

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

[0234] It can be understood that whether the IO management controller 302 automatically performs data migration when it is detected that the remaining capacity of any flash device is less than the preset capacity or performs data migration after receiving the data migration instruction, the data migration is completed under the management of the IO management controller 302, and the host 301 does not need 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 the preset capacity, i.e., when the capacity warning occurs, the IO management controller 302 allocates a new stripe to the first virtual disk and the second flash memory device, establishes the mapping relationship between the first virtual disk and the second flash memory device, and performs data migration by the IO management controller 302. Compared with the existing scheme in which the host needs to process the warning content and perform data migration and other operations, increasing the operation and maintenance burden, in the present application, the host 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.

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

[0237] The storage method also includes: based on the IO management controller, polling to determine the health indicators of each flash memory device every preset time; when the health indicators of any flash memory device are greater than the preset indicator threshold, sending third warning information to the host 301 to prompt the user to replace the flash memory device. The third warning information is used to prompt the user to replace the flash memory device, and the preset indicator threshold can be set by the person skilled in the art according to the type of the storage unit of the flash memory device, the application environment, etc., which is not limited here.

[0238] In some embodiments, the host 301 also includes an alarm system, which is used to monitor the first warning information, the second warning information and the third warning information 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 the data migration instruction sent by the host, and migrating all 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, the flash device is accessed by the application program in the form of an NVMe general block device (virtual disk), and the number of flash devices as actual data storage disks can be increased without increasing the operation and maintenance burden of the host. By setting the compression ratio of the flash device, the maximum compression ratio of the flash device can be set, for example, when the host 301 is a 24-slot server, 12 flash devices 100 are inserted first, and the compression ratio is set to 1:2, then the host 301 can actually use the logical available capacity of the sum of the flash physical available capacities of the 24 flash devices 100, and subsequently only needs to add new flash devices according to the operation and maintenance prompt information (for example, the first alarm information) of the IO management controller 302 in the idle slot as needed to reduce the probability of the flash device entering the read-only state due to too much data being written.

[0241] In the embodiment of the present application, the IO management controller 302 controls the flash device to perform data operations and performs capacity alarm, health check and other management operations, and the application can shield the use details of the flash device from the host 301. The host 301 only needs to manage the virtual disk, so that the host 301 can fully utilize the compression function of the flash device without any management and operation and maintenance burden, and the user only needs to focus on the application program itself.

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

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

[0244] The embodiment of the present application also provides a non-volatile computer storage medium, which stores computer executable instructions. The computer executable instructions 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 each step described.

[0245] The embodiment of the present application further provides a computer program product, which comprises one or more program codes stored in a nonvolatile computer readable storage medium. The processor reads the program codes from the nonvolatile computer readable storage medium, and the processor executes the program codes to complete the method steps of the storage method provided in the above embodiment.

[0246] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program codes related to hardware, and the program can be stored in a nonvolatile computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.

[0247] The device or equipment embodiments described above are only schematic, and the unit modules illustrated as separate components can or can not be physically separated, and the components illustrated as module units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network module units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0248] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions or the part that contributes to the related art can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments 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, and not to limit them; under the idea of the present application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of the different aspects of the present application as described above. In order to be brief, they are not provided in detail; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part 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 by, The storage system comprises a host, an IO management controller and at least one flash device, wherein, the host is connected with the IO management controller and the flash device, and is configured to send a first command to the IO management controller, wherein the host comprises at least one virtual disk; the IO management controller is connected with the host and the flash device, and is configured to control the flash device to perform a data operation according to the first command and a mapping relationship between the virtual disk and the flash device; the host further comprises a command management tool, a base address space and a PCIe system, the IO management controller is connected with each flash device through the PCIe system, the IO management controller comprises a storage space, and each flash device comprises a configuration space; the host is further configured to: send a device configuration command to the IO management controller based on the command management tool and the PCIe system, wherein the device configuration command comprises device information of each flash device; the IO management controller is further configured to: perform an outbound address configuration operation and an inbound address configuration operation on each flash device based on the device information and the PCIe system; wherein the outbound address configuration operation is configured to configure an address mapping relationship between the base address space and the storage space, and the inbound address configuration operation is configured to configure an address mapping relationship between the storage space and each configuration space.

2. The system of claim 1, wherein, the host and the IO management controller communicate through an NVMe protocol; the host is further configured to: send a disk creation command to the IO management controller based on the command management tool and the PCIe system, wherein the disk creation command comprises a data domain type of a virtual disk and a capacity of the virtual disk, and the data domain type comprises a single-device domain; the IO management controller is further 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; when the data domain type of any virtual disk is a single-device domain, select one flash device in an idle state from a plurality of flash devices, and establish a first mapping relationship between the virtual disk and the flash device.

3. The system of claim 2, wherein, the data domain type comprises a multi-device domain, and the disk creation command further comprises a device quantity, which is a quantity of first flash devices corresponding to one virtual disk; the IO management controller is further configured to: when the data domain type of any virtual disk is a multi-device domain, select a plurality of first flash devices matched with the device quantity from a plurality of flash devices in descending order of residual capacity; segment the capacity of the virtual disk according to a preset strip capacity to determine a strip distribution corresponding to the virtual disk; establish a second mapping relationship between the virtual disk and each first flash device according to the strip distribution corresponding to the virtual disk; wherein the second mapping relationship comprises a number of the virtual disk, a serial number of the first flash device, a number of each strip and a mapping relationship between each strip and a logical address range corresponding to the first flash device.

4. The system of claim 1, wherein, The host further comprises an application program, the data operation comprises 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 a target virtual disk based on the application program, wherein the first command comprises a read command or a write command; sending the first command to the IO management controller based on the target virtual disk and the PCIe system; The IO management controller is specifically used for: receiving and analyzing the first command to determine the number of the target virtual disk and a host memory address; determining a target flash memory device according to the number of the target virtual disk and a mapping relationship between each virtual disk and a flash memory device; constructing a second command based on the host memory address and writing the second command into the command submission queue corresponding to the target flash memory device.

5. The system of claim 4, wherein, 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: reading the command submission queue corresponding to the target flash memory device from the IO management controller based on the PCIe system to obtain the second command; accessing a storage area corresponding to the host memory address based on the second command and the PCIe system to transmit target data, wherein the target data is data to be written into the target flash memory device or data read from the target flash memory device; after the transmission of the target data is completed, writing command completion information into the command completion queue corresponding to the target flash memory device based on the PCIe system; The IO management controller is further used for: reading the command completion information and writing 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 execution of the first command is completed.

6. The system of any one of claims 1-5, wherein The flash memory device is specifically used for: obtaining host data and storing the host data to a flash memory medium after compression; The IO management controller is further used for: 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 a 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 a 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; allocating a new stripe to the first virtual disk and establishing a third mapping relationship between the first virtual disk and the second flash memory device, wherein the third mapping relationship comprises the number of the first virtual disk, the serial number of the second flash memory device, the number of the new stripe, and the mapping relationship between the new stripe and the logical address range corresponding to the second flash memory device; when the target flash memory device corresponding to the first command is the second flash memory device, controlling the second flash memory device to perform a corresponding data operation.

7. The system of claim 6, wherein, The IO management controller is further used for: determine a target stripe in a third flash memory device based on the mapping relationship between each virtual disk and the 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 corresponding to the third flash memory device with a largest amount of stored data; perform data migration on 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 a largest remaining capacity among the plurality of flash memory devices; delete the second mapping relationship corresponding to the target stripe and establish a mapping relationship between the target stripe and the fourth flash memory device; send an erase command to the third flash memory device to release a storage area corresponding to the target stripe in the third flash memory device.

8. A storage method characterized by comprising: The method is applied to the storage system of any one of claims 1-7, and the method comprises: sending, by the host, a first command to the IO management controller; controlling, by the IO management controller, the flash memory device to perform a data operation according to the first command and the mapping relationship between the virtual disk and the flash memory device.

9. The method of claim 8, wherein, The host further comprises an application program and a PCIe system, and the sending, by the host, of the first command to the IO management controller comprises: sending, by the application program, a first command to a target virtual disk, wherein the first command comprises a read command or a write command; sending, by the target virtual disk and the PCIe system, the first command to the IO management controller.

10. The method of claim 9, wherein, 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 comprises a read operation or a write operation, and the flash memory device comprises a flash memory medium; The controlling, by the IO management controller, of the flash memory device to perform a data operation according to the first command and the mapping relationship between the virtual disk and the flash memory device comprises: receiving and analyzing, by the IO management controller, the first command to determine a number of the target virtual disk and a host memory address; determining, according to the number of the target virtual disk and the mapping relationship between each virtual disk and the flash memory device, a target flash memory device; constructing, by the IO management controller, 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, by the target flash memory device, the command submission queue corresponding to the target flash memory device to obtain the second command; when the second command is a read command, reading, by the target flash memory device, first target data stored in the target flash memory device and transmitting, by the PCIe system, the first target data to a storage area corresponding to the host memory address; when the second command is a write command, reading, by the target flash memory device, a storage area corresponding to the host memory address to obtain second target data and storing, by the target flash memory device, the second target data into 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