A method, system, apparatus, and media for hybrid raid construction
By establishing a remapping space between the host and the storage disk and adopting an address and interrupt remapping mechanism, the problem of storage disk information exposure in hybrid RAID systems is solved, and access isolation between the storage disk and the host is achieved, thereby improving system security and flexibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2026-03-03
AI Technical Summary
Existing hybrid RAID systems pose a security risk during construction by directly exposing storage disk information to the operating system, as well as the risk of confusion and erroneous operations due to similar storage device names.
By establishing a remapping space between the host and the storage disk, and employing address remapping and interrupt remapping mechanisms, a host driver based on the hardware remapping space is constructed to hide the storage disk device information and expose only the RAID block device, thereby achieving access isolation between the storage disk and the host.
It improves the security of hybrid RAID systems, avoids the risk of storage disk information being directly exposed to the operating system, reduces erroneous operations, and enhances the flexibility and security of the system.
Smart Images

Figure CN115098407B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage, and more particularly to a method, system, device, and medium for constructing hybrid RAID. Background Technology
[0002] In existing technologies, the construction of RAID (Redundant Array of Independent Disks) is generally divided into software RAID, hardware RAID, and hybrid RAID. Hardware RAID typically uses a RAID card to implement RAID functionality; software RAID typically uses software and external storage disks connected to a storage disk controller to implement RAID functionality, such as SATA (Serial ATA), SAS (Serial Attached SCSI), and NVMe (Non-Volatile Memory Express) interfaces; hybrid RAID typically operates under a Linux operating system environment, using md (Multiple Devices driver for Linux) software and external storage disks connected to a storage disk controller to implement some of the RAID software functions, while using corresponding hardware to implement some of the RAID hardware functions. Hardware RAID systems are complex, costly, and highly secure; software RAID systems are easy to implement, low-cost, and less secure. Hybrid RAID systems fall somewhere in between, offering greater flexibility.
[0003] In existing technologies, there are relatively few implementation examples of hybrid RAID systems in both software and hardware. For instance, in Intel's VROC (Virtual RAID on CPU) system, the hardware VMD unit completely exposes the storage disk information to the operating system software, which then calls the VMD software to complete the RAID system construction. For servers or specific application scenarios, directly exposing the storage disk information to the operating system software can lead to the operating system being able to directly read, write, partition, or format the storage disks even when they are not part of a RAID group, posing a security risk. Furthermore, if multiple storage devices exist in the system, the similar names can easily cause confusion between devices configured in RAID via software and those directly used by the operating system without being configured in RAID, leading to the risk of erroneous operations. Summary of the Invention
[0004] In view of this, the present invention proposes a method, system, device, and medium for constructing hybrid RAID. Specifically, the method for constructing hybrid RAID proposes a remapping space between the host and the storage disk, and a host driver based on this remapping space. This involves employing "address remapping and interrupt remapping" and providing hardware based on these mechanisms to implement the host driver software. The host operating system only perceives the RAID block devices of the storage disks, hiding the storage disk devices themselves. This avoids the security risks associated with directly exposing storage disk information to the host operating system during hybrid RAID construction.
[0005] To achieve the above objectives, one aspect of the present invention provides a method for constructing a hybrid RAID, the method comprising the following steps: establishing a remapping space between a host and the storage disk based on information of the storage disk to achieve isolation of access between the storage disk and the host; establishing a host driver for the remapping space based on the remapping space, and implementing RAID management of the storage disk by the remapping space through the host driver.
[0006] In some embodiments, establishing a remapping space between the host and the storage disk based on the storage disk information to achieve isolation of access between the storage disk and the host includes: remapping the address of the storage disk based on the PCIe (Peripheral Component Interconnect Express) address and I / O (Input / Output) address of the storage disk; establishing an interrupt remapping of the storage disk based on the interrupt of the storage disk; and establishing a remapping space between the storage disk and the host based on the address remapping and the interrupt remapping to achieve the interval of access between the storage disk and the host.
[0007] In some embodiments, implementing RAID management of the storage disk through the host driver in the remapped space includes encapsulating the RAID function of the storage disk and access to the storage disk.
[0008] In another aspect, the present invention provides a system for constructing hybrid RAID, the system comprising the following modules: a storage disk encapsulation controller module configured to establish a remapping space between a host and the storage disk based on information of the storage disk, so as to achieve isolation of access between the storage disk and the host; and a host driver module configured to establish a host driver for the remapping space based on the remapping space, and to implement RAID management of the storage disk by the remapping space through the host driver.
[0009] In some embodiments, the storage disk encapsulation controller module includes: a PCIe-EP (Peripheral Component Interconnect Express EndPoint PCIe) submodule, configured to connect and communicate with a host; a PCIe-RC (Peripheral Component Interconnect Express Root Complex PCIe) interface submodule, configured to connect and communicate with different storage disks; an address translation submodule, configured to perform address translation between PCIe-EP bus requests and PCIe-RC bus requests; and an interrupt mapping submodule, configured to map interrupts from the PCIe-RC interface submodule to the PCIe-EP submodule.
[0010] In some embodiments, the storage disk encapsulation controller module further includes an FW (Firmware) submodule, which is configured to initialize the storage disk encapsulation controller module and manage the storage disks connected to the PCIe-RC interface submodule.
[0011] In some embodiments, the host driver module includes: a PCIe-EP driver submodule configured to implement the PCIe bus-based driver for the storage disk encapsulation controller module; a BLK interface driver submodule configured to implement the BLK layer interface-based driver for the storage disk encapsulation controller module; an address translation driver submodule configured to translate the PCIe-EP bus address to the address of the storage disk accessed by the storage disk encapsulation controller module; and an interrupt mapping driver submodule configured to translate the PCIe-EP side interrupt request configuration to the interrupt request of the storage disk accessed by the storage disk encapsulation controller module.
[0012] In some embodiments, the host driver module further includes: a virtual storage disk driver submodule, configured to manage the storage disk connected to the storage disk encapsulation controller module; a RAID driver submodule, configured to implement RAID algorithms and I / O functions in the corresponding operating system; and a RAID / storage disk management driver submodule, configured to implement drivers for RAID and storage disk management.
[0013] In another aspect of the present invention, a computer device is also provided, including at least one processor; and a memory storing computer instructions executable on the processor, the instructions, when executed by the processor, implementing the steps of any of the methods described above.
[0014] In another aspect of the present invention, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements any of the method steps described above.
[0015] This invention offers at least the following advantages: It proposes a method, system, device, and medium for constructing hybrid RAID. The proposed method isolates access between the storage disk and the host by building a hardware-level remapping space between the storage disk and the host, and a software-level host driver based on this remapping space. This avoids the risk of the storage disk information being directly exposed to the host operating system during the hybrid RAID construction process. The host cannot directly identify the storage disk information; it can only identify the remapping space information and indirectly access the storage disk through the host driver based on the remapping space. Furthermore, RAID-related functions are not implemented in the remapping space, thus improving the system security of the hybrid RAID. Additionally, since the RAID functionality is implemented by the host driver, the software RAID portion of the hybrid RAID system can be constructed and modified more conveniently and flexibly. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0017] Figure 1 A schematic diagram illustrating an embodiment of a method for constructing a hybrid RAID provided by the present invention;
[0018] Figure 2 A schematic diagram illustrating a preferred embodiment of step S1 in a method for constructing a hybrid RAID provided by the present invention;
[0019] Figure 3 A schematic diagram illustrating a preferred embodiment of step S2 in a method for constructing a hybrid RAID provided by the present invention;
[0020] Figure 4 A schematic diagram illustrating an embodiment of a system for constructing hybrid RAID provided by the present invention;
[0021] Figure 5 A schematic diagram of an embodiment of a storage disk packaging controller module for constructing a hybrid RAID system provided by the present invention;
[0022] Figure 6 A schematic diagram of an embodiment of a host driver module for constructing a hybrid RAID system provided by the present invention;
[0023] Figure 7 This is a schematic diagram of the data flow during address translation in a storage disk encapsulation controller module for constructing a hybrid RAID system, provided by the present invention.
[0024] Figure 8 A schematic diagram illustrating the implementation of a host driver module for constructing a hybrid RAID system in a Linux system, as provided by this invention.
[0025] Figure 9 A schematic diagram illustrating an embodiment of a computer device provided by the present invention;
[0026] Figure 10 This is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0027] The following describes embodiments of the present invention. However, it should be understood that the disclosed embodiments are merely examples, and other embodiments may take various alternative forms.
[0028] Furthermore, it should be noted that all uses of the terms "first" and "second" in the embodiments of this invention are for the purpose of distinguishing two entities or parameters with the same name but different names. Therefore, "first" and "second" are merely for convenience of expression and should not be construed as limiting the embodiments of this invention. Subsequent embodiments will not elaborate on this further. The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements may include not only those elements but also elements not expressly listed or inherent to those processes, methods, articles, or apparatuses.
[0029] One or more embodiments of this application will now be described with reference to the accompanying drawings.
[0030] Based on the above objectives, a first aspect of the present invention provides an embodiment of a method for constructing hybrid RAID. Figure 1 The diagram shown is an embodiment of a method for constructing a hybrid RAID according to the present invention. Figure 1 As shown, a method for constructing a hybrid RAID according to an embodiment of the present invention includes the following steps:
[0031] S1. Based on the information of the storage disk, a remapping space is established between the host and the storage disk to achieve isolation of access between the storage disk and the host;
[0032] S2. Based on the remapping space, establish a host driver for the remapping space, and implement RAID management of the storage disk through the host driver.
[0033] Figure 2 The diagram shown is a preferred embodiment of step S1 in a hybrid RAID construction method provided by the present invention, including:
[0034] S101. Implement address remapping of the storage disk based on the PCIe address and I / O address of the storage disk;
[0035] S102. Establish an interrupt remapping for the storage disk based on the interrupt of the storage disk; and
[0036] S103. Based on the address remapping and the interrupt remapping, a remapping space is established between the storage disk and the host to achieve isolation of access between the storage disk and the host.
[0037] By using address remapping and interrupt remapping—that is, remapping the PCIeCFG and I / O address space of the storage disk and the physical disk interrupts—the storage information is re-encapsulated and mapped, restricting direct host access to the storage disk and preventing the storage disk's information from being exposed to the host. This achieves the goal of protecting the storage disk during hybrid RAID construction. Furthermore, it is understood that establishing a remapping space through address remapping and interrupt remapping to isolate access between the storage disk and the host is a preferred embodiment of this invention. In practical applications, this method is not the only option; other methods can be used to construct the remapping space to achieve the same effect, and these methods are also within the scope of this invention.
[0038] Figure 3 The diagram shown is a preferred embodiment of step S2 in a hybrid RAID construction method provided by the present invention, including:
[0039] S201. Establish a host driver for the remapping space based on the remapping space;
[0040] S202. Encapsulate the RAID function of the storage disk and the access to the storage disk, and implement the RAID management of the storage disk by the remapping space through the host driver.
[0041] The host driver software is implemented by establishing a remapping space between the host and the storage disk. RAID functionality and access to the storage disk are encapsulated within the BLK driver, completing the software RAID function based on the BLK driver interface. Therefore, the host operating system only perceives the RAID block devices, hiding the storage disk devices.
[0042] Based on the above objectives, a second aspect of the embodiments of the present invention proposes a system for constructing hybrid RAID. Figure 4 The diagram shown is a schematic representation of an embodiment of a system for constructing hybrid RAID provided by the present invention. Figure 4 As shown, the system for constructing hybrid RAID provided by the present invention includes the following modules: a storage disk encapsulation controller module 011, configured to establish a remapping space between the host and the storage disk based on the information of the storage disk, so as to realize the isolation of access between the storage disk and the host; and a host driver module 012, configured to establish a host driver for the remapping space based on the remapping space, and realize the RAID management of the storage disk by the remapping space through the host driver.
[0043] Figure 5 The present invention illustrates a storage disk encapsulation controller module 011 for a hybrid RAID-based system, comprising: a PCIe-EP submodule 0111, configured to connect and communicate with a host; a PCIe-RC interface submodule 0112, configured to connect and communicate with different storage disks, specifically SSDs connected to a PCIe NVMe interface; an address translation submodule 0113, configured to translate addresses between PCIe-EP bus requests and PCIe-RC bus requests; an interrupt mapping submodule 0114, configured to map interrupts from the PCIe-RC interface submodule to the PCIe-EP submodule; and an FW submodule 0115, configured to initialize the storage disk encapsulation controller module and manage the storage disks connected to the PCIe-RC interface submodule. Communication between modules is achieved through their internal interconnect NoC (Network on Chip).
[0044] Figure 6The present invention illustrates a host driver module 012 for a hybrid RAID-based system, comprising: a PCIe-EP driver submodule 0121, configured to drive the storage disk encapsulation controller module based on the PCIe bus; a BLK interface driver submodule 0122, configured to drive the storage disk encapsulation controller module based on the BLK layer interface; an address translation driver submodule 0123, configured to translate the PCIe-EP bus address to the address of the storage disk accessed by the storage disk encapsulation controller module; and an interrupt mapping driver submodule 0124, configured to translate the interrupt request configuration on the PCIe-EP side to the interrupt request of the storage disk accessed by the storage disk encapsulation controller module. The system includes: a virtual storage disk driver submodule, configured to manage the storage disk connected to the storage disk encapsulation controller module; a RAID driver submodule 0125, configured to implement RAID algorithms and I / O functions in the corresponding operating system; a RAID / storage disk management driver submodule 0126, configured to drive RAID and the management of the storage disk; and a virtual storage disk driver submodule 0127, configured to manage and operate PCIe / NVMe SSD devices connected to the RC interface.
[0045] In a second aspect of the present invention, in a preferred embodiment, according to the above description, a system for constructing a hybrid RAID includes a storage disk encapsulation controller module 011 and a host driver module 012, as well as the aforementioned modules included in each module. In a preferred and specific embodiment, the number of RCs is 4, the reserved mapping address space of each RC is 1TB, and each RC is configured with 4 SSD (Solid State Disk) devices. Based on the above-described address mapping process, the following is true:
[0046] (1) The PCIe-EP configuration space on the host side adds a custom CAP attribute linked list field according to the PCIe protocol. The CAP content includes the BAR space where the RC device is remapped, the number of RC devices, RC device list information, such as the number of SSD devices contained in each RC, and other information.
[0047] (2) Host-side PCIe-EP device I / O Mem space refers to the address window content of the BAR space defined in the above CAP attribute linked list field. The address window content of the BAR space includes the space content of multiple RC address remappings.
[0048] (3) The space remapped by a single RC device includes the remapped content of multiple SSD disk device spaces.
[0049] (4) The remapping space content of a single SSD disk device includes the management information and remapping address information of the SSD disk address remapping.
[0050] (5) The management information for remapping a single SSD disk includes the device identifier of the SSD disk, device attributes, base address of remapping, offset of the remapping window of the configuration space relative to the base address of remapping, window size of configuration space remapping, offset of the remapping window of each BAR of the SSD disk relative to the base address of remapping, window size of each BAR space remapping, etc.
[0051] (6) The PCIe spaces of a single SSD physical disk device are mapped according to the address to which the management information belongs.
[0052] During initialization, FW submodule 0115 checks the status of PCIe-EP submodule 0111, uses host address 0 as the base address of the mapping space, configures the iATU unit (Internal Address TranslateUnit) of address translation submodule 0113, and completes the conversion from host address to NOC address.
[0053] When the host needs to change the mapping location of the space, it sends a configuration command to the device. After receiving the configuration command, the FW submodule 0115 reconfigures the iATU unit of the address mapping submodule 0113 to modify the host mapping start address to the newly specified start address of the host.
[0054] After completing the address translation configuration on the PCIe-EP submodule 0111 side, FW submodule 0115 scans the controller status of PCIe-RC interface submodule 0112, reserves space for each NVMe-SSD device, and allocates an area. FW submodule 0115 configures the iATU unit of address translation submodule 0113 to complete the translation of the NOC address to the address allocated to the NVMe-SSD device by PCIe-RC interface submodule 0112.
[0055] Interrupt mapping submodule 0114 intercepts MSI / MSI-X interrupts (Message Signaled Interrupts / Extended Message Signaled Interrupts) sent by the storage disk from PCIe-RC interface submodule 0112, encapsulates them into MemoryWrite packets, and sends them to interrupt mapping submodule 0114 via PCIe-RC interface submodule 0112. Interrupt mapping submodule 0114 then sends the Memory Write packets to the host via address translation submodule 0113.
[0056] During data conversion, the data stream for address translation in the storage disk encapsulation controller module 011 is as follows: Figure 7 As shown, Figure 7 The diagram illustrates the data flow during address translation in a storage disk encapsulation controller module 011 of a hybrid RAID-based system provided by this invention. The address translation submodule 0113 of the storage disk encapsulation controller module 011 performs address translation via iATU, including address translation for requests initiated by the host, address translation for interrupt events from the storage disk to the host, address translation for DMA (Direct Memory Access) requests from the storage disk to the host memory, and address translation for read / write requests from the storage disk to the host memory.
[0057] Step 1: The request initiated by the host first reaches the PCIe-EP submodule 0111. The PCIe-EP submodule 0111 determines whether it is an access to the storage disk information based on the BAR address information. If it is BAR0 / 1, it returns the basic PCIe information provided by the PCIe-EP submodule 0111. If it is the BAR of the storage disk remapping defined in the CAP information, it proceeds to step 2.
[0058] Step 2: Address translation submodule 0113 translates the PCIe request address into the bus address requested internally by the storage disk encapsulation controller module 011. The internal bus address of the storage disk encapsulation controller module 011 is then translated into the address space of the storage disk on the PCIe-RC interface submodule 0112 via iATU address translation.
[0059] Step 3: PCIe-EP submodule 0111 receives the request for the internal bus address, converts it into a PCIe request, and sends it to the storage disk.
[0060] Step 4: After the storage disk completes the request, it sends the PCIe completion packet to the PCIe-RC interface submodule 0112, which then sends the PCIe completion packet to the address translation submodule 0113.
[0061] Step 5: Address translation submodule 0113 uses iATU to translate the address of the PCIe completion packet of PCIe-RC interface submodule 0112 into an internal bus address message.
[0062] Step 6: The PCIe completion packet, after address translation, arrives at PCIe-EP submodule 0111. PCIe-EP submodule 0111 converts the internal bus address message into a PCIe message and sends it to the host, completing the response processing of the request.
[0063] Step 7: The MSI / MSI-X configuration information for interrupts initiated by the storage disk is configured by the host to the storage disk through steps 1-6. When the storage disk needs to initiate an interrupt, it reads the MSI / MSI-X address and data portions of the storage disk, sends a PCIe write request to the address, and the PPCIe-RC interface submodule 0112 converts the PCIe request into an internal bus address request.
[0064] Step 8: The interrupt write request initiated by the storage disk arrives at the address translation submodule 0113, is converted into a host-side memory address via iATU address, and is sent to the PCIe-EP submodule 0111.
[0065] Step 9: PCIe-EP submodule 0111 converts the internal bus request into a PCIe request and sends it to the host to complete the interrupt message request.
[0066] Steps 10 to 15: Scenarios where a DMA request is initiated for the storage disk;
[0067] Steps 16 to 21: The scenario of initiating read / write requests for the storage disk is similar to the implementation process of steps 1-9 above.
[0068] like Figure 8 As shown, Figure 8 The diagram illustrates a host driver module 012 in a hybrid RAID system built on Linux, where the storage disk is an NVMe SSD and the host driver module 012 is implemented as a block device driver under Linux.
[0069] At the Linux kernel level, the block device driver internally includes RAID functionality, RAID management functionality, storage disk management functionality, and virtual storage disk driver software. At the Linux user level, user-space RAID management tools and disk management tools are provided, enabling operations such as management and status querying of RAID and SSD disks. `virtual_nvme_dev` is the SSD disk device interface generated by the virtual storage disk driver software, which is repackaged based on address translation and interrupt translation functions. This interface is internal to the kernel driver module; the driver does not register the device with the Linux system and is invisible to the Linux system. This driver provides interfaces related to Admin queue operations and IO queue operations at the kernel level. The Admin queue is used for management operations initiated by the RAID / storage disk management driver software module on the storage disk; the IO queue is used by the RAID driver submodule to issue data read / write IO operations to each storage disk. After the RAID device driver starts, it will create the device / dev / raid_blk_dev0 as the management device interface, and generate logical volumes according to RAID management. Each logical volume is a logical storage device to the operating system, such as / dev / raid_blk_dev0p1, and can be used by the Linux system for disk read and write and other storage-related operations.
[0070] The host driver module 012 runs on the host machine. Taking a RAID5 configuration of four NVMe SSDs as an example.
[0071] First, the kernel .ko file of host driver module 012 is loaded. During .ko loading, the kernel driver initializes the device, sends commands to storage disk encapsulation controller module 011 to obtain the physical disk list, establishes the management interface device / dev / raid_blk_dev0, reads the physical disk address mapping, initializes the physical disks, establishes queues, and configures interrupts. Then, the kernel RAID driver module is loaded.
[0072] By default, no RAID groups are created.
[0073] When a new RAID group is created, the RAID / storage disk management tool needs to query the status of all current RAID groups, and then issue a command to query SSD disk information. This command accesses the ` / dev / raid_blk_dev0` management device interface via the user-level management tool, reaching the kernel layer. After parsing the command, the kernel-level RAID / storage disk management driver sends NVMe protocol Identify messages to the Admin queue of each physical disk to obtain the physical disk's NVMe storage information. The user-level RAID management tool then issues a command to create the RAID group, with parameters including the RAID level and physical disk identifiers. Upon receiving this command, the kernel-level RAID management driver begins adding the physical disks to the RAID and initializes the RAID group, creating stripes.
[0074] After a RAID group is successfully created, it cannot be used immediately. A logical volume needs to be created first. A logical volume is a combination of logical sectors based on the RAID group. Creating a new logical volume requires querying the status of all current logical volumes using a RAID / storage disk management tool, and then issuing a command to create the new logical volume. This command accesses the ` / dev / raid_blk_dev0` management device interface through the user-level management tool, reaching the kernel level. The kernel-level RAID management driver parses the command and, based on the RAID group information, allocates a specified number of logical sectors from the RAID group to the logical volume. After successful logical volume creation, a block device is registered at the Linux system level, similar to a logical volume device identifier in the format ` / dev / raid_blk_dev0p1`. Disk read and write operations can then be performed based on this device identifier.
[0075] When the Linux operating system layer operates on the logical volume / dev / raid_blk_dev0p1, it considers the device to be a block device and can initiate read and write requests to that block device. Upon receiving the request, the RAID submodule of the storage disk encapsulation controller module 011's driver software checks the RAID level of the logical volume corresponding to the current request operation, creates a request list, where each unit in the request list corresponds to a request for a physical disk. Based on the requested logical sector number and the configured RAID stripe unit-to-physical disk mapping algorithm (such as a left asymmetric algorithm), it calculates the identification information of the physical disk to be accessed. It then calls the interface provided by the virtual storage disk driver within the kernel driver to send an NVMe read / write request message to the corresponding physical disk. The request message includes the NVMe protocol opcode, namespace identifier (ns_id), starting logical sector number (slba), data length (length), memory address of the data (prp_info), control fields (control, dword12), and dataset management fields (dataset_management, dword13), among other information.
[0076] The system retrieves the memory address of the data requested from the physical disk, obtains the IO data information of the Linux Blk layer, calculates the memory information of the corresponding sector location, converts it into DMA address information using the Linux kernel function dma_map_bvec, performs big / small byte conversion, and fills in the PRP data address information according to the PRP's storage type.
[0077] After all requests to the physical disk are completed, the RAID layer completes one BLK layer I / O data request and sends a response to the BLK layer. If a physical disk request times out, timeout exception handling is performed, along with RAID exception handling, and fault recovery is performed according to the RAID level.
[0078] To achieve the above objectives, a third aspect of the present invention provides a computer device. Figure 9 The diagram shown is a schematic representation of an embodiment of a computer device provided by the present invention. Figure 9 As shown, an embodiment of a computer device provided by the present invention includes the following modules: at least one processor 021; and a memory 022, the memory 022 storing computer instructions 023 that can be executed on the processor 021.
[0079] The present invention also provides a computer-readable storage medium. Figure 10 The diagram shown is a schematic representation of an embodiment of a computer-readable storage medium provided by the present invention. Figure 10 As shown, computer-readable storage medium 031 stores a computer program 032 that, when executed by a processor, performs the methods described above.
[0080] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program for setting system parameters can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.
[0081] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. When the computer program is executed by the processor, it performs the functions defined in the method disclosed in the embodiments of the present invention.
[0082] Furthermore, the above-described method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to perform the functions of the above-described steps or units.
[0083] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.
[0084] In one or more exemplary designs, functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, functionality may be stored as one or more instructions or code on or transmitted via a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one location to another. Storage media may be any available medium accessible to a general-purpose or special-purpose computer. By way of example, and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, or any other medium that may be used to carry or store the required program code in the form of instructions or data structures and is accessible to a general-purpose or special-purpose computer or a general-purpose or special-purpose processor. Furthermore, any connection may be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the aforementioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are all included in the definition of media. As used herein, disks and optical discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0085] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.
[0086] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.
[0087] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0088] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0089] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A method for constructing a hybrid RAID, characterized in that, include: A remapping space is established between the host and the storage disk based on the information of the storage disk, so as to achieve isolation of access between the storage disk and the host; A host driver for the remapped space is established based on the remapped space, and the RAID management of the storage disk by the remapped space is realized through the host driver; The step of implementing RAID management of the storage disk through the host driver includes: encapsulating the RAID function of the storage disk and access to the storage disk, which further includes implementing the RAID function of the storage disk and access to the storage disk by encapsulating the following modules: The PCIe-EP driver submodule is encapsulated and configured to implement the PCIe bus-based driver for the storage disk encapsulation controller module; Encapsulate the BLK interface driver submodule and configure it to implement the BLK layer interface-based driver for the storage disk encapsulation controller module; The encapsulated address translation driver submodule is configured to implement the translation between the PCIe-EP bus address and the address of the storage disk accessed by the storage disk encapsulation controller module; An encapsulated interrupt mapping driver submodule is configured to implement the conversion between the interrupt request configuration on the PCIe-EP side and the interrupt request of the storage disk accessed by the storage disk encapsulation controller module.
2. The method according to claim 1, characterized in that, The establishment of a remapping space between the host and the storage disk based on the storage disk information to achieve isolation of access between the storage disk and the host includes: Address remapping of the storage disk is achieved based on the PCIe address and I / O address of the storage disk; The interrupt remapping of the storage disk is established based on the interrupt of the storage disk; Based on the address remapping and the interrupt remapping, a remapping space is established between the storage disk and the host to achieve isolation of access between the storage disk and the host.
3. A system for constructing hybrid RAID, characterized in that, include: The storage disk encapsulation controller module is configured to establish a remapping space between the host and the storage disk based on the information of the storage disk, so as to achieve isolation of access between the storage disk and the host; A host driver module is configured to establish a host driver based on the remapped space, and to implement RAID management of the storage disk through the remapped space via the host driver; The host driver module includes: PCIe-EP driver submodule, configured to implement the PCIe bus-based driver for the storage disk encapsulation controller module; A BLK interface driver submodule is configured to implement the BLK layer interface-based driver for the storage disk encapsulation controller module. Address translation driver submodule, configured to translate PCIe-EP bus address into address of the storage disk accessed by the storage disk encapsulation controller module; An interrupt mapping driver submodule is configured to implement the conversion between the interrupt request configuration on the PCIe-EP side and the interrupt request of the storage disk accessed by the storage disk encapsulation controller module.
4. The system according to claim 3, characterized in that, The storage disk encapsulation controller module includes: PCIe-EP submodule, configured for connection and communication with the host; PCIe-RC interface submodule, configured to connect and communicate with different storage disks; Address translation submodule, configured to perform address translation between PCIe-EP bus requests and PCIe-RC bus requests; An interrupt mapping submodule is configured to map interrupts from the PCIe-RC interface submodule to the PCIe-EP submodule.
5. The system according to claim 4, characterized in that, The storage disk packaging controller module also includes: The FW submodule is configured to initialize the storage disk encapsulation controller module and manage the storage disks connected to the PCIe-RC interface submodule.
6. The system according to claim 3, characterized in that, The host driver module also includes: A virtual storage disk driver submodule is configured to manage the storage disk connected to the storage disk encapsulation controller module. A RAID driver submodule, configured to implement RAID algorithms and I / O functions in the corresponding operating system; A RAID / storage disk management driver submodule is configured to implement a driver for managing RAID and the storage disk.
7. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-2.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-2.
Citation Information
Patent Citations
Host RAID management method and device based on solid state disk array
CN110569000A
Mechanism to dynamically allocate physical storage device resources in virtualized environments
US20180307521A1