WO2024098907A1 - 固态硬盘访问控制方法、装置、计算机设备和存储介质 - Google Patents

固态硬盘访问控制方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2024098907A1
WO2024098907A1 PCT/CN2023/116126 CN2023116126W WO2024098907A1 WO 2024098907 A1 WO2024098907 A1 WO 2024098907A1 CN 2023116126 W CN2023116126 W CN 2023116126W WO 2024098907 A1 WO2024098907 A1 WO 2024098907A1
Authority
WO
WIPO (PCT)
Prior art keywords
solid
state
controller
nvme
controller nodes
Prior art date
Application number
PCT/CN2023/116126
Other languages
English (en)
French (fr)
Inventor
彭云武
邹雨
江博
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024098907A1 publication Critical patent/WO2024098907A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/073Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a memory management context, e.g. virtual memory or cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the technical field of solid state drive access control, and in particular to a solid state drive access control method, device, computer equipment and storage medium.
  • the storage array achieves high reliability and high availability through hardware redundant architecture design, disk array (RAID) and other software technologies.
  • NVMe is the abbreviation of Non-Volatile Memory Express, which refers to the non-volatile memory host controller interface specification.
  • SSD is the abbreviation of Solid-State Disk, which refers to solid-state drive.
  • NVMe SSD currently only has a single port (Sing Port) and a dual port (Dual Port), which can be connected to 1 controller node and 2 controller nodes respectively; the centralized storage array uses dual controller nodes + dual-port NVMe SSD to achieve 1+1 redundancy. If the NVMe SSD directly provides 4 ports (ports) or supports the SR IOV feature, the system can realize 4-controller sharing of NVMe SSD, achieving higher reliability and availability of 1+3 redundancy.
  • NVMe SSD needs to support 1 PF (Page File) and 4 VFs (Virtual Functions); each controller node is connected to the NVMe SSD through a PCIe switch (high-speed serial computer expansion bus standard switch); the CPU (central processing unit) built into the PCIe switch configures the PF of the NVMe SSD to ensure that each VF is mapped to the corresponding Node, and the Node[3:0] corresponds to the SSD's VF[3:0] one-to-one.
  • PCIe switch high-speed serial computer expansion bus standard switch
  • the four nodes can access the same NVMe SSD, realizing four-controller shared access to the NVMe SSD; the current mainstream NVMe SSD None of them support SR-IOV features, so the NVMe backend 4-controller sharing of the architecture shown in Figure 1 cannot be commercialized.
  • the inventors realize that there are no 4-port NVMe SSDs in the industry, which makes it difficult to improve the redundancy of data transmission and the reliability is not high.
  • the present application provides a solid state hard disk access control method, the method comprising:
  • first mapping connection relationship is a mapping connection between the controller node and the real capacity space of the NVMe solid-state drive
  • second mapping connection relationship is a mapping connection between the controller node and the virtual space of the NVMe solid-state drive
  • the controller node corresponding to the first mapping connection relationship When any NVMe solid-state drive is accessed, in response to the first mapping connection relationship being normal, the controller node corresponding to the first mapping connection relationship performs input and output read and write operations on the accessed NVMe solid-state drive, or, in response to the first mapping connection relationship being abnormal, one of the remaining controller nodes is selected as a backup controller for the accessed NVMe solid-state drive, and the second mapping connection relationship between the backup controller and the accessed NVMe solid-state drive is modified to the first mapping connection relationship.
  • the number m+1 of controller nodes is also synchronously obtained
  • each NVMe solid state drive When setting each NVMe solid state drive to form a first mapping connection relationship with one of the controller nodes and to form a second mapping connection relationship with the remaining controller nodes, specifically includes:
  • controller nodes m+1 one real capacity space and m virtual spaces are built for each NVMe SSD, and the virtual space is a placeholder;
  • the real capacity space corresponding to each NVMe solid-state drive is mapped to a controller node to form a first mapping connection relationship; and the virtual space corresponding to the NVMe solid-state drive is respectively mapped to the remaining controller nodes to form a second mapping connection relationship.
  • the number n+1 of NVMe solid-state drives is also synchronously obtained; where n is greater than or equal to m.
  • n+1 real capacity spaces in the n+1 NVMe solid-state drives arranged in a row are mapped to the m+1 controller nodes respectively; in response to n being greater than m, the m+1 NVMe solid-state drives arranged in a row are set as a group according to the arrangement order of the NVMe solid-state drives, and the m+1 real capacity spaces in the group are mapped to the m+1 controller nodes respectively, and the remaining groups map the real capacity spaces to different controller nodes according to the same mapping rule.
  • the second mapping connection relationship between the backup controller and the accessed NVMe solid-state drive is modified to the first mapping connection relationship, including: replacing the virtual space of the backup controller with the real capacity space of the accessed NVMe solid-state drive through the NVMe solid-state drive hot access method.
  • the method when selecting one of the remaining controller nodes as a backup controller for the accessed NVMe solid-state drive, the method further includes:
  • an alarm message is issued.
  • a plurality of PCIe switches are provided, and each controller node (Node) is connected to the NVMe solid-state drive through each PCIe switch;
  • each NVMe solid-state drive is set to form a first mapping connection relationship with one of the controller nodes, and a second mapping connection relationship with the remaining controller nodes;
  • a normal PCIe switch among the remaining PCIe switches is modified from an off state to an on state.
  • changing the closed state of a normal PCIe switch among the remaining PCIe switches to an open state includes: detecting whether the remaining PCIe switches are normal one by one; If the PCIe switch is normal, select a normal PCIe switch and change its closed state to an open state; or, in response to the abnormalities of the remaining PCIe switches, delete the abnormal PCIe switch and detect again to determine whether the remaining PCIe switches are normal, until at least one PCIe switch is normal.
  • the present application provides a solid state hard disk access control device, the device comprising:
  • a power-on detection module used to detect all controller nodes and all NVMe solid-state drives connected to the PCIe switch, where each NVMe solid-state drive is connected to all controller nodes through the PCIe switch;
  • a mapping path management module used to set a first mapping connection relationship between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship between each NVMe solid-state drive and the remaining controller nodes;
  • the first mapping connection relationship is a mapping connection between the controller node and the real capacity space of the NVMe solid-state drive
  • the second mapping connection relationship is a mapping connection between the controller node and the virtual space of the NVMe solid-state drive
  • the access management module is used to, when any NVMe solid-state hard disk is accessed, in response to the first mapping connection relationship being normal, perform input and output read and write operations on the accessed NVMe solid-state hard disk through the controller node corresponding to the first mapping connection relationship, or, in response to the first mapping connection relationship being abnormal, select one from the remaining controller nodes as a backup controller for the accessed NVMe solid-state hard disk, and modify the second mapping connection relationship between the backup controller and the accessed NVMe solid-state hard disk to the first mapping connection relationship.
  • the power-on detection module is also used to detect the number of PCIe switches.
  • each controller node is connected to the NVMe solid-state drive through each PCIe switch;
  • the mapping path management module is also used to, corresponding to each PCIe switch, set a first mapping connection relationship between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship between each NVMe solid-state drive and the remaining controller nodes;
  • the access management module is also used to set one of the PCIe switches to an on state and the remaining PCIe switches to a off state; in response to the PCIe switch initially set to an on state failing to connect, a normal PCIe switch among the remaining PCIe switches is changed from an off state to an on state.
  • the present application provides a computer device, including one or more memories, one or more processors, and computer-readable instructions stored in the one or more memories and executable on the one or more processors, wherein the one or more processors execute the computer-readable instructions to implement the solid-state hard disk access method. Ask about the steps of the control method.
  • the present application provides a non-volatile computer-readable storage medium having computer-readable instructions stored thereon.
  • the computer-readable instructions are executed by one or more processors, the steps of the above-mentioned solid-state hard disk access control method are implemented.
  • Figure 1 is a schematic diagram of the connection structure of an existing NVMe SSD
  • FIG2 is an application schematic diagram of a solid state drive access control method in one or more embodiments of the present application.
  • FIG3 is an application principle diagram of a solid state drive access control method in another one or more embodiments of the present application.
  • FIG4 is a flow chart of a solid state drive access control method in one or more embodiments of the present application.
  • FIG5 is a structural block diagram of a solid state drive access control device in one or more embodiments of the present application.
  • FIG. 6 is a diagram of the internal structure of a computer device in one or more embodiments of the present application.
  • the current mainstream NVMe SSDs do not support the SR-IOV feature, so the NVMe backend multi-controller shared access path cannot be commercialized, which makes it difficult to improve the redundancy of data transmission and the reliability is low.
  • this application provides a solid state drive access control method.
  • PCIe Synthetic Mode PCIe synthesis module
  • BIOS and PCIe driver PCIe resources are reserved in advance through BIOS and PCIe driver, controller node fault detection, fast fault switching when a fault occurs, and system software can identify the difference between SSD and Place Holder to avoid illegal access; only ordinary NVMe SSD is needed to realize NVMe SSD 4-controller sharing, meet 1+3 redundancy, and meet the needs of high reliability.
  • the NVMe 4-node system has the following processing strategies for scenarios such as normal power-on and controller node abnormality:
  • the NVMe 4-node system is powered on normally.
  • the PCIe device is scanned and the NVMe SSD physical space + virtual space Place Holder method is used to apply for PCIe reserved resource space from the four controller nodes respectively.
  • the real capacity space of the NVMe SSD is only mapped to one controller node, and the other three controller nodes are mapped to the virtual space Place Holder.
  • the shaded box SSD[0:n] is the real capacity space of the SSD
  • the unshaded box SSD[0:n]-PH is the virtual space Place Holder.
  • the business software can correctly identify the difference between the real space of NVMe SSD and the virtual space Place Holder to avoid illegal access to the SSD data storage space; during normal operation, each controller node only accesses the mapped NVMe SSD real capacity space to complete IO read and write operations. For example, the real capacity space of SSD0 corresponding to Node 0, the real capacity space of SSD1 corresponding to Node 1, etc.
  • the real capacity space of SSD[0:n] can implement IO read and write operations, while the real capacity space of SSD[0:n]-PH corresponding to the virtual space Place Holder cannot implement IO read and write operations.
  • a controller node fails and goes offline.
  • the system cluster synchronizes this fault status to the remaining controller nodes and selects a backup controller.
  • the virtual space Place Holder of the selected backup controller is replaced with the real capacity space of the NVMe SSD to ensure the normal use of this NVMe SSD. For example, if controller node 3 fails, the real capacity space of SSD3 can be arbitrarily mapped to controller nodes 1 ⁇ 2 ⁇ 3.
  • PCIe Switch PCIe Switch
  • Node controller node
  • NVMe SSD NVMe solid-state drive
  • centralized storage uses an NVMe 4-node system consisting of a dual-port NVMe SSD, 2 PCIe Switch dual-planes, and 4 controller nodes; it supports 1+3 redundancy of controller nodes, 1+1 redundancy of dual-plane PCIe Switch, and NVMe supports dual-port access. All modules are redundantly designed with no single point of failure; the system reliability and availability are higher.
  • the dual-port NVMe SSD realizes the connection mode of two ports through two PCIe Switch dual planes.
  • the box SSD[0:n]-P0 marked with dotted shadow in the figure is the real capacity space accessible to SSD-Port0;
  • the box SSD[0:n]-P1 marked with diagonal shadow is the real capacity space accessible to SSD-Port1;
  • the unshaded box SSD[0:n]-PH is the virtual space Place Holder.
  • the dual-port NVMe SSD realizes the connection mode of two ports through two PCIe Switch dual planes, which can further increase the number of redundant settings of the access path, further improve the redundancy of data transmission, and have higher reliability.
  • the present application also provides some other embodiments.
  • the following steps are included:
  • Step S1 detecting all controller nodes and all NVMe solid-state drives connected to a PCIe switch, wherein each NVMe solid-state drive is connected to all controller nodes via a PCIe switch;
  • Step S2 setting a first mapping connection relationship between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship between each NVMe solid-state drive and the remaining controller nodes;
  • the first mapping connection relationship is a mapping connection between the controller node and the real capacity space of the NVMe solid-state drive
  • the second mapping connection relationship is a mapping connection between the controller node and the virtual space of the NVMe solid-state drive;
  • Step S3 when any NVMe solid-state drive is accessed, if the first mapping connection relationship is normal, the controller node corresponding to the first mapping connection relationship performs input, output, read and write operations on the accessed NVMe solid-state drive; if the first mapping connection relationship is abnormal, one of the remaining controller nodes is selected as a backup controller for the accessed NVMe solid-state drive, and the backup controller is connected to the accessed NVMe solid-state drive.
  • the second mapping connection relationship between the NVMe solid-state drives is modified to the first mapping connection relationship.
  • NVMe is the abbreviation of Non-Volatile Memory Express, which refers to the non-volatile memory host controller interface specification.
  • SSD is the abbreviation of Solid-State Disk, which refers to solid-state hard disk.
  • PCIe switch is the abbreviation of PCIe switch, which refers to the high-speed serial computer expansion bus standard switch.
  • step S1 of this embodiment when detecting all controller nodes and all NVMe solid-state drives connected to the PCIe switch, the number m+1 of controller nodes is also synchronously obtained.
  • step S2 of this embodiment when setting a first mapping connection relationship between each NVMe solid-state drive and one of the controller nodes and a second mapping connection relationship between each NVMe solid-state drive and the remaining controller nodes, the method specifically includes:
  • controller nodes m+1 one real capacity space and m virtual spaces are built for each NVMe SSD, and the virtual space is a placeholder;
  • the real capacity space corresponding to each NVMe solid-state drive is mapped to a controller node to form a first mapping connection relationship; the virtual space corresponding to the NVMe solid-state drive is respectively mapped to the remaining controller nodes to form a second mapping connection relationship.
  • step S1 of this embodiment when detecting all controller nodes and all NVMe solid-state drives connected to the PCIe switch, the number n+1 of NVMe solid-state drives is also synchronously obtained; wherein n is greater than or equal to m. Wherein m and n are both positive integers.
  • the n+1 real capacity spaces in the consecutively arranged n+1 NVMe solid-state drives are mapped to the m+1 controller nodes respectively according to the arrangement order of the NVMe solid-state drives; when n is greater than m, the consecutively arranged m+1 NVMe solid-state drives are set as a group according to the arrangement order of the NVMe solid-state drives, and the m+1 real capacity spaces in the group are mapped to the m+1 controller nodes respectively, and the remaining groups map the real capacity spaces to different controller nodes according to the same mapping rule.
  • step S3 of this embodiment the second mapping connection relationship between the standby controller and the accessed NVMe solid-state hard disk is modified to the first mapping connection relationship, including: replacing the virtual space of the standby controller with the real space of the accessed NVMe solid-state hard disk through the NVMe solid-state hard disk hot access mode; Measure space.
  • step S3 of this embodiment when selecting one of the remaining controller nodes as a backup controller for the accessed NVMe solid-state drive, it also includes:
  • PCIe resources can be reserved in advance through BIOS and PCIe driver, controller node fault detection can be carried out, fault switching can be performed quickly when a fault occurs, and the system software can identify the difference between SSD and Place Holder to avoid illegal access.
  • This embodiment preferably uses 4 controller nodes.
  • the processing strategies for scenarios such as normal power-on of the NVMe 4-node system and controller node abnormality are as follows:
  • the NVMe 4-node system is powered on normally.
  • the PCIe device is scanned and the NVMe SSD physical space + virtual space Place Holder method is used to apply for PCIe reserved resource space from the four controller nodes respectively.
  • the real capacity space of the NVMe SSD is only mapped to one controller node, and the other three controller nodes are mapped to the virtual space Place Holder.
  • the shaded box SSD[0:n] is the real capacity space of the SSD
  • the unshaded box SSD[0:n]-PH is the virtual space Place Holder.
  • the business software can correctly identify the difference between the real space of NVMe SSD and the virtual space Place Holder to avoid illegal access to the SSD data storage space; during normal operation, each controller node only accesses the mapped NVMe SSD real capacity space to complete IO read and write operations. For example, the real capacity space of SSD0 corresponding to Node 0, the real capacity space of SSD1 corresponding to Node 1, etc.
  • the real capacity space of SSD[0:n] can implement IO read and write operations, while the real capacity space of SSD[0:n]-PH corresponding to the virtual space Place Holder cannot implement IO read and write operations.
  • a controller node fails and goes offline.
  • the system cluster synchronizes this fault status to the remaining controller nodes and selects a backup controller.
  • the virtual space Place Holder of the selected backup controller is replaced with the real capacity space of the NVMe SSD to ensure the Normal use of NVMe SSD. For example, if controller node 3 fails, the real capacity space of SSD3 can be mapped to controller nodes 1 ⁇ 2 ⁇ 3 at will.
  • PCIe Switch PCIe Switch
  • Node controller node
  • NVMe SSD NVMe solid-state drive
  • step S1 of this embodiment when detecting all controller nodes and all NVMe solid-state drives connected to the PCIe switch, the number m+1 of controller nodes and the number n+1 of NVMe solid-state drives connected to each PCIe switch are also synchronously obtained.
  • step S2 of this embodiment corresponding to each PCIe switch, a first mapping connection relationship is formed between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship is formed between each NVMe solid-state drive and the remaining controller nodes.
  • one of the PCIe switches is set to an on state, and the other PCIe switches are set to an off state.
  • the off state of a normal PCIe switch among the other PCIe switches is changed to an on state.
  • changing the closed state of a normal PCIe switch among the remaining PCIe switches to the open state includes: detecting whether the remaining PCIe switches are normal one by one; if so, selecting a normal PCIe switch and changing its closed state to the open state; if not, deleting the abnormal PCIe switch, and detecting again to determine whether the remaining PCIe switches are normal, until at least one PCIe switch remains normal.
  • step S2 of this embodiment the real capacity space and virtual space corresponding to each NVMe solid-state drive are mapped to different controller nodes respectively, including:
  • the real The capacity space is mapped to the m+1 controller nodes corresponding to each PCIe switch.
  • n is greater than or equal to m.
  • m and n are both positive integers.
  • the n+1 real capacity spaces in the consecutively arranged n+1 NVMe solid-state drives are respectively mapped to the m+1 controller nodes corresponding to each PCIe switch; wherein different PCIe switches correspond to different NVMe solid-state drives where the real capacity spaces in the same controller node are located;
  • the consecutively arranged m+1 NVMe solid-state drives are set as a group, and the m+1 real capacity spaces in the group are respectively mapped to the m+1 controller nodes corresponding to each PCIe switch, wherein different PCIe switches correspond to different NVMe solid-state drives where the real capacity spaces in the same controller node are located; the remaining groups map the real capacity spaces to different controller nodes according to the same mapping rule.
  • the dual-port NVMe SSD realizes the connection mode of two ports through two PCIe Switch dual planes, which can further increase the number of redundant settings of the access path, further improve the redundancy of data transmission, and have higher reliability.
  • each controller node is set to only access the mapped NVMe solid-state hard disk real capacity space, thereby avoiding illegal access to the solid-state hard disk data storage space.
  • multiple controller nodes can modify their mapped virtual space to real capacity space to access the NVMe solid-state hard disk, thereby realizing redundant settings of multiple access paths, improving the redundancy of data transmission, and having high reliability.
  • sub-steps or stages may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • a solid state hard disk access control device 10 comprising: It includes: a power-on detection module 1, a mapping path management module 2, and an access management module 3.
  • the power-on detection module 1 is used to detect all controller nodes and all NVMe solid-state drives connected to the PCIe switch, wherein each NVMe solid-state drive is connected to all controller nodes through the PCIe switch; the power-on detection module 1 is also used to synchronously detect all controller nodes and all NVMe solid-state drives connected to the PCIe switch, wherein each NVMe solid-state drive is connected to all controller nodes through the PCIe switch.
  • the mapping path management module 2 is used to set a first mapping connection relationship between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship between each NVMe solid-state drive and the remaining controller nodes;
  • the first mapping connection relationship is a mapping connection between the controller node and the real capacity space of the NVMe solid-state drive
  • the second mapping connection relationship is a mapping connection between the controller node and the virtual space of the NVMe solid-state drive
  • a first mapping connection relationship is set between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship is formed between each NVMe solid-state drive and the remaining controller nodes;
  • the first mapping connection relationship is a mapping connection between the controller node and the real capacity space of the NVMe solid-state drive
  • the second mapping connection relationship is a mapping connection between the controller node and the virtual space of the NVMe solid-state drive.
  • the access management module 3 is used to map the real capacity space corresponding to each NVMe solid-state hard disk to a controller node to form a first mapping connection relationship; the virtual space corresponding to the NVMe solid-state hard disk is respectively mapped to the remaining controller nodes to form a second mapping connection relationship; the first mapping connection relationship is a mapping connection between the controller node and the real capacity space of the NVMe solid-state hard disk, and the second mapping connection relationship is a mapping connection between the controller node and the virtual space of the NVMe solid-state hard disk.
  • the controller node corresponding to the first mapping connection relationship performs input and output read and write operations on the accessed NVMe solid-state hard disk; if the first mapping connection relationship is abnormal, one of the remaining controller nodes is selected as a backup controller for the accessed NVMe solid-state hard disk, and the second mapping connection relationship between the backup controller and the accessed NVMe solid-state hard disk is modified to the first mapping connection relationship.
  • mapping path management module 2 of this embodiment when a first mapping connection relationship is formed between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship is formed between each NVMe solid-state drive and the remaining controller nodes, it specifically includes:
  • controller nodes m+1 one real capacity space and m virtual spaces are built for each NVMe SSD, and the virtual space is a placeholder;
  • the real capacity space corresponding to each NVMe solid-state drive is mapped to a controller node to form a first mapping connection relationship; the virtual space corresponding to the NVMe solid-state drive is respectively mapped to the remaining controller nodes to form a second mapping connection relationship.
  • n is greater than or equal to m; wherein m and n are both positive integers.
  • the n+1 real capacity spaces in the consecutively arranged n+1 NVMe solid-state drives are mapped to the m+1 controller nodes respectively according to the arrangement order of the NVMe solid-state drives; when n is greater than m, the consecutively arranged m+1 NVMe solid-state drives are set as a group according to the arrangement order of the NVMe solid-state drives, and the m+1 real capacity spaces in the group are mapped to the m+1 controller nodes respectively, and the remaining groups map the real capacity spaces to different controller nodes according to the same mapping rule.
  • any NVMe solid state drive when any NVMe solid state drive is accessed, it includes:
  • a standby controller for the accessed NVMe solid-state drive is selected from the remaining controller nodes, and the virtual space of the standby controller is replaced with the real capacity space of the accessed NVMe solid-state drive through the NVMe solid-state drive hot access method.
  • the second mapping connection relationship between the backup controller and the accessed NVMe solid-state hard disk is modified to the first mapping connection relationship, including: replacing the virtual space of the backup controller with the real capacity space of the accessed NVMe solid-state hard disk through the NVMe solid-state hard disk hot access method.
  • the access management module 3 of this embodiment when selecting one of the remaining controller nodes as a backup controller for the accessed NVMe solid-state drive, it also includes:
  • each controller node (Node) is connected to the NVMe solid-state drive through each PCIe switch.
  • the power-on detection module 1 When detecting all controller nodes and all NVMe solid-state drives connected to the PCIe switch, the power-on detection module 1 is also used to detect the number of PCIe switches, and synchronously obtain the number m+1 of controller nodes and the number n+1 of NVMe solid-state drives connected to each PCIe switch.
  • the mapping path management module 2 is also used to correspond to each PCIe switch, and to set a first mapping connection relationship between each NVMe solid-state drive and one of the controller nodes, and a second mapping connection relationship between each NVMe solid-state drive and the remaining controller nodes.
  • the access management module 3 is also used to set one of the PCIe switches to an on state and the other PCIe switches to an off state.
  • the PCIe switch initially set to an on state cannot be connected, the off state of a normal PCIe switch among the other PCIe switches is changed to an on state.
  • the real capacity space in the consecutively arranged NVMe solid-state drives is mapped to the m+1 controller nodes corresponding to each PCIe switch.
  • n is greater than or equal to m; wherein m and n are both positive integers.
  • the n+1 real capacity spaces in the consecutively arranged n+1 NVMe solid-state drives are respectively mapped to the m+1 controller nodes corresponding to each PCIe switch; wherein different PCIe switches correspond to different NVMe solid-state drives where the real capacity spaces in the same controller node are located;
  • the consecutively arranged m+1 NVMe solid-state drives are set as a group, and the m+1 real capacity spaces in the group are respectively mapped to the m+1 controller nodes corresponding to each PCIe switch, wherein different PCIe switches correspond to different NVMe solid-state drives where the real capacity spaces in the same controller node are located; the remaining groups map the real capacity spaces to different controller nodes according to the same mapping rule.
  • each controller node is set to access only the mapped NVMe SSD real capacity space, thereby avoiding illegal access to SSD data.
  • multiple controller nodes can modify their mapped virtual space into real capacity space to access the NVMe solid-state drive, realizing redundant settings of multiple access paths, improving the redundancy of data transmission, and high reliability.
  • each module in the above-mentioned solid-state hard disk access control device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device which may be a server, and its internal structure diagram may be shown in FIG6.
  • the computer device includes one or more processors, one or more memories, a network interface, and a database connected via a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used to store solid-state hard disk access control data.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer-readable instructions are executed by one or more processors, a solid-state hard disk access control method is implemented.
  • FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
  • a computer device comprising one or more memories, one or more processors, and computer-readable instructions stored in the one or more memories and executable on the one or more processors, wherein the one or more processors implement the steps of a solid-state hard disk access control method when executing the computer-readable instructions.
  • a non-volatile computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, the solid-state hard disk access Ask about the steps of the control method.
  • Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Hardware Redundancy (AREA)

Abstract

本申请公开了一种固态硬盘访问控制方法、装置、计算机设备和存储介质。所述方法包括:检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘;设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;当任意一个NVMe固态硬盘被访问时,若所述第一映射连接关系异常,则在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,把所述备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系。

Description

固态硬盘访问控制方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请要求于2022年11月10日提交中国专利局,申请号为202211404833.5,申请名称为“固态硬盘访问控制方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及固态硬盘访问控制技术领域,尤其涉及一种固态硬盘访问控制方法、装置、计算机设备和存储介质。
背景技术
存储阵列通过硬件冗余架构设计、磁盘阵列(RAID)等软件技术,实现高可靠和高可用。
NVMe是Non-Volatile Memory Express的简称,表示非易失性内存主机控制器接口规范。SSD是Solid-State Disk的简称,表示固态硬盘。作为存储介质的NVMe SSD,当前只有单端口(Sing Port)和双端口(Dual Port),分别可接1个控制器节点、2个控制器节点;集中式存储阵列采用双控制器节点+双端口NVMe SSD实现1+1冗余。如果NVMe SSD直接出4个Port(端口)或者支持SR IOV特性,系统能实现NVMe SSD的4控共享,达到1+3冗余的更高可靠性和可用度。
如图1所示,NVMe SSD需要支持1个PF(Page File,页面文件)和4个VF(Virtual Function,虚拟功能);每个控制器节点(Node)通过PCIe switch(高速串行计算机扩展总线标准开关)与NVMe SSD连通;PCIe Switch内置的CPU(中央处理器)通过配置NVMe SSD的PF,确保每个VF分别映射给对应的Node(节点),Node[3:0]与SSD的VF[3:0]的一一对应,4个Node都能访问同一个NVMe SSD,实现NVMe SSD的4控共享访问;目前主流的NVMe SSD 均不支持SR-IOV特性,因此图1所示架构的NVMe后端4控共享还不能产品化。然而,发明人意识到,目前业界也未出现4个Port(端口)的NVMe SSD,难以提高数据传输的冗余性,可靠性不高。
发明内容
本申请根据第一方面提供了一种固态硬盘访问控制方法,该方法包括:
检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘,其中每个NVMe固态硬盘通过PCIe开关与所有的控制器节点连接;
设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接;及
当任意一个NVMe固态硬盘被访问时,响应于第一映射连接关系正常,通过第一映射连接关系对应的控制器节点对该被访问的NVMe固态硬盘进行输入输出读写操作,或,响应于第一映射连接关系异常,在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,把备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系。
在其中一些实施例中,在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取控制器节点的数量m+1;
设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系时,具体包括:
根据控制器节点数量m+1,对应每个NVMe固态硬盘构建1个真实容量空间和m个虚拟空间,虚拟空间为占位符;
将每个NVMe固态硬盘对应的真实容量空间映射至一个控制器节点中形成第一映射连接关系;及,将该NVMe固态硬盘对应的虚拟空间分别映射至其余的控制器节点中形成第二映射连接关系。
在其中一些实施例中,在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取NVMe固态硬盘的数量n+1;其中n大于等于m。
在其中一些实施例中,响应于n等于m,按照NVMe固态硬盘的排列顺序, 将连续排列的n+1个NVMe固态硬盘中的n+1个真实容量空间分别映射至m+1个控制器节点中;响应于n大于m,按照NVMe固态硬盘的排列顺序,将连续排列的m+1个NVMe固态硬盘设为一组,该组中的m+1个真实容量空间分别映射至m+1个控制器节点中,其余组按照相同的映射规律将真实容量空间分别映射至不同的控制器节点中。
在其中一些实施例中,把备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系,包括:通过NVMe固态硬盘热接入方式,把备用控制器的虚拟空间替换成该被访问的NVMe固态硬盘的真实容量空间。
在其中一些实施例中,在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器时,还包括:
逐一检测其余控制器节点是否正常;响应于其余控制器节点正常,选取检测正常的一个控制器节点作为该被访问的NVMe固态硬盘的备用控制器,或,响应于其余控制器节点异常,删除出现异常的控制器节点,再次检测判断剩余的控制器节点是否正常,直至剩余至少一个控制器节点为正常。
在其中一些实施例中,在逐一检测其余控制器节点是否正常时,响应于剩余的控制器节点均异常,发出报警信息。
在其中一些实施例中,PCIe开关设有多个,每个控制器节点(Node)通过每个PCIe开关与NVMe固态硬盘连通;
在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取每个PCIe开关上连接的控制器节点的数量m+1及NVMe固态硬盘的数量n+1;
对应每个PCIe开关,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;及
设置其中的一个PCIe开关为开启状态,其余的PCIe开关为关闭状态。
在其中一些实施例中,在当初始设置为开启状态的PCIe开关无法连通时,将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态。
在其中一些实施例中,将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态,包括:逐一检测其余的PCIe开关是否正常;响应于其余的 PCIe开关正常,选取检测正常的一个PCIe开关,并将其关闭状态修改为开启状态,或,响应于其余的PCIe开关异常,删除出现异常的PCIe开关,再次检测判断剩余的PCIe开关是否正常,直至剩余至少一个PCIe开关为正常。
在其中一些实施例中,在逐一检测其余PCIe开关是否正常时,响应于剩余的PCIe开关均异常,发出报警信息。
本申请根据另一方面提供了一种固态硬盘访问控制装置,装置包括:
上电检测模块,用于检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘,其中每个NVMe固态硬盘通过PCIe开关与所有的控制器节点连接;
映射路径管理模块,用于设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接;及
访问管理模块,用于在当任意一个NVMe固态硬盘被访问时,响应于第一映射连接关系正常,通过第一映射连接关系对应的控制器节点对该被访问的NVMe固态硬盘进行输入输出读写操作,或,响应于第一映射连接关系异常,在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,把备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系。
在其中一些实施例中,上电检测模块还用于检测PCIe开关的数量,响应于PCIe开关设有多个,每个控制器节点通过每个PCIe开关与NVMe固态硬盘连通;映射路径管理模块还用于对应每个PCIe开关,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;访问管理模块还用于设置其中的一个PCIe开关为开启状态,其余的PCIe开关为关闭状态;响应于初始设置为开启状态的PCIe开关无法连通,将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态。
本申请根据再一方面提供了一种计算机设备,包括一个或多个存储器、一个或多个处理器及存储在一个或多个存储器上并可在一个或多个处理器上运行的计算机可读指令,一个或多个处理器执行计算机可读指令时实现上述固态硬盘访 问控制方法的步骤。
本申请根据又一方面提供了一种非易失性计算机可读存储介质,其上存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时实现上述固态硬盘访问控制方法的步骤。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为现有的一种NVMe SSD的连接结构示意图;
图2为本申请一个或多个实施例中固态硬盘访问控制方法的应用原理图;
图3为本申请另一个或多个实施例中固态硬盘访问控制方法的应用原理图;
图4为本申请一个或多个实施例中固态硬盘访问控制方法的流程示意图;
图5为本申请一个或多个实施例中固态硬盘访问控制装置的结构框图;
图6为本申请一个或多个实施例中计算机设备的内部结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
如背景技术所述,目前主流的NVMe SSD均不支持SR-IOV特性,因此NVMe后端多控共享访问路径还不能产品化,导致难以提高数据传输的冗余性,可靠性不高。
为解决上述问题,本申请提供了一种固态硬盘访问控制方法。基于Broadcom公司PCIe4.0 Switch的PCIe Synthetic Mode(PCIe合成模块),通过BIOS和PCIe驱动提前预留PCIe资源、控制器节点故障检测、发生故障能快速进行故障切换、系统软件能识别SSD和Place Holder(占位符)区别,避免非法访问;只需普通NVMe SSD即可实现NVMe SSD 4控共享,满足1+3冗余,满足高可靠性的需 求。
如图2,NVMe 4节点系统,正常上电、控制器节点异常等场景处理策略如下:
(1)NVMe 4节点系统正常上电,BIOS自检过程中,扫描PCIe设备,采用NVMe SSD实体空间+虚拟空间Place Holder方式分别向4个控制器节点申请PCIe预留资源空间;NVMe SSD的真实容量空间只映射给1个控制器节点,其他3个控制器节点映射的是虚拟空间Place Holder。
图2中有阴影标识的方框SSD[0:n]为SSD真实容量空间、无阴影的方框SSD[0:n]-PH为虚拟空间Place Holder。
(2)业务软件能正确识别NVMe SSD的真实空间、虚拟空间Place Holder的差异,避免非法访问SSD数据存储空间;正常运行时,每个控制器节点只对映射的NVMe SSD真实容量空间进行访问,完成IO读写操作。例如Node 0对应的SSD0真实容量空间、Node1对应的SSD1真实容量空间等。SSD真实容量空间SSD[0:n]可实现IO读写操作,而虚拟空间Place Holder对应的SSD[0:n]-PH却无法实现IO读写操作,只有一个控制器节点对应SSD真实容量空间,避免了非法访问SSD数据存储空间。
(3)异常出现时,某个控制器节点故障离线,系统集群同步此故障状态给其余控制器节点,选出1个备用控制器;通过NVMe SSD热接入方式,把选出的备用控制器的虚拟空间Place Holder替换成NVMe SSD真实容量空间,保障此NVMe SSD的正常使用。例如控制器节点3故障,SSD3的真实容量空间可以任意映射给控制器节点1\2\3。
(4)极端异常时,4个控制器节点故障3个,所有的NVMe SSD都可以采用热接入方式,把分配给正常控制器节点的虚拟空间Place Holder替换成NVMe SSD真实容量空间;实现控制器节点1+3冗余的高可用,保障所有NVMe SSD的业务连续性。
本申请技术方案带来的有益效果包括:(1)采用PCIe4.0 Switch、通用NVMe SSD等已量产的芯片、部件等,系统整机采用现有成熟技术(控制器节点故障监控并同步给集群软件、集群软件完成故障节点切换等),业务软件实现NVMe SSD的4控共享访问,达到1+3冗余的高可靠和高可用要求;相比NVMe Over Fabric 方案,硬件系统方案更简洁,成本更低。(2)后续支持SR-IOV的NVMe SSD上市成为主流后,系统硬件无需重新设计,通过软件适配修改,也可以实现NVMe SSD的4控共享。
本申请基于上述实施例相同的发明构思,提供了另一些实施例,在这些实施例中,PCIe开关(PCIe Switch)设有多个,每个控制器节点(Node)通过每个PCIe开关与NVMe固态硬盘(NVMe SSD)连通。
如图3所示,集中式存储采用双端口NVMe SSD、2个PCIe Switch双平面、4个控制器节点组成的NVMe 4节点系统;支持控制器节点1+3冗余、双平面PCIe Switch支持1+1冗余、NVMe支持双端口访问,所有模块均实现冗余设计,无单点故障;系统可靠性和可用度更高。
在图3中,双端口NVMe SSD通过2个PCIe Switch双平面实现了两个端口的连接方式,图中点状阴影标识的方框SSD[0:n]-P0为SSD-Port0可访问的真实容量空间;斜线阴影标识的方框SSD[0:n]-P1为SSD-Port1可访问的真实容量空间;无阴影的方框SSD[0:n]-PH为虚拟空间Place Holder。
可理解的是,双端口NVMe SSD通过2个PCIe Switch双平面实现了两个端口的连接方式,能够进一步增加访问路径的冗余设置数量,进一步提高了数据传输的冗余性,可靠性更高。
在上述实施例的基础上,本申请还提供了另一些实施例,在该实施例中,,如图4所示,包括以下步骤:
步骤S1,检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘,其中每个NVMe固态硬盘通过PCIe开关与所有的控制器节点连接;
步骤S2,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接;
步骤S3,当任意一个NVMe固态硬盘被访问时,若第一映射连接关系正常,通过第一映射连接关系对应的控制器节点对该被访问的NVMe固态硬盘进行输入输出读写操作;若第一映射连接关系异常,则在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,把备用控制器与该被访问的 NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系。
其中,NVMe是Non-Volatile Memory Express的简称,表示非易失性内存主机控制器接口规范。SSD是Solid-State Disk的简称,表示固态硬盘。PCIe开关是PCIe switch的简称,表示高速串行计算机扩展总线标准开关。
在本实施例步骤S1中,在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取控制器节点的数量m+1。
在本实施例步骤S2中,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系时,具体包括:
根据控制器节点数量m+1,对应每个NVMe固态硬盘构建1个真实容量空间和m个虚拟空间,虚拟空间为占位符;
将每个NVMe固态硬盘对应的真实容量空间映射至一个控制器节点中形成第一映射连接关系;将该NVMe固态硬盘对应的虚拟空间分别映射至其余的控制器节点中形成第二映射连接关系。
可理解的是,按照控制器节点的排列顺序,依次将连续排列的NVMe固态硬盘中的真实容量空间分别映射至m+1个控制器节点中。
具体的,在本实施例步骤S1中,在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取NVMe固态硬盘的数量n+1;其中n大于等于m。其中m、n均为正整数,本实施例优选控制器节点的数量m+1为4,m=3,即为4个控制器节点,只需普通NVMe SSD即可实现NVMe SSD 4控共享,满足1+3冗余,满足高可靠性的需求。
当n等于m时,按照NVMe固态硬盘的排列顺序,将连续排列的n+1个NVMe固态硬盘中的n+1个真实容量空间分别映射至m+1个控制器节点中;当n大于m时,按照NVMe固态硬盘的排列顺序,将连续排列的m+1个NVMe固态硬盘设为一组,该组中的m+1个真实容量空间分别映射至m+1个控制器节点中,其余组按照相同的映射规律将真实容量空间分别映射至不同的控制器节点中。
在本实施例步骤S3中,把备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系,包括:通过NVMe固态硬盘热接入方式,把备用控制器的虚拟空间替换成该被访问的NVMe固态硬盘的真实容 量空间。
在本实施例步骤S3中,在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器时,还包括:
逐一检测其余控制器节点是否正常;若是,则选取检测正常的一个控制器节点作为该被访问的NVMe固态硬盘的备用控制器;若否,则删除出现异常的控制器节点,再次检测判断剩余的控制器节点是否正常,直至剩余至少一个控制器节点为正常;若剩余的控制器节点均异常,则发出报警信息。
在使用时,基于Broadcom公司PCIe4.0 Switch的PCIe Synthetic Mode(PCIe合成模块),通过BIOS和PCIe驱动提前预留PCIe资源、控制器节点故障检测、发生故障能快速进行故障切换、系统软件能识别SSD和Place Holder(占位符)区别,避免非法访问。
本实施例优选为4个控制器节点,NVMe 4节点系统正常上电、控制器节点异常等场景处理策略如下:
(1)NVMe 4节点系统正常上电,BIOS自检过程中,扫描PCIe设备,采用NVMe SSD实体空间+虚拟空间Place Holder方式分别向4个控制器节点申请PCIe预留资源空间;NVMe SSD的真实容量空间只映射给1个控制器节点,其他3个控制器节点映射的是虚拟空间Place Holder。
图2中有阴影标识的方框SSD[0:n]为SSD真实容量空间、无阴影的方框SSD[0:n]-PH为虚拟空间Place Holder。
(2)业务软件能正确识别NVMe SSD的真实空间、虚拟空间Place Holder的差异,避免非法访问SSD数据存储空间;正常运行时,每个控制器节点只对映射的NVMe SSD真实容量空间进行访问,完成IO读写操作。例如Node 0对应的SSD0真实容量空间、Node1对应的SSD1真实容量空间等。SSD真实容量空间SSD[0:n]可实现IO读写操作,而虚拟空间Place Holder对应的SSD[0:n]-PH却无法实现IO读写操作,只有一个控制器节点对应SSD真实容量空间,避免了非法访问SSD数据存储空间。
(3)异常出现时,某个控制器节点故障离线,系统集群同步此故障状态给其余控制器节点,选出1个备用控制器;通过NVMe SSD热接入方式,把选出的备用控制器的虚拟空间Place Holder替换成NVMe SSD真实容量空间,保障此 NVMe SSD的正常使用。例如控制器节点3故障,SSD3的真实容量空间可以任意映射给控制器节点1\2\3。
(4)极端异常时,4个控制器节点故障3个,所有的NVMe SSD都可以采用热接入方式,把分配给正常控制器节点的虚拟空间Place Holder替换成NVMe SSD真实容量空间;实现控制器节点1+3冗余的高可用,保障所有NVMe SSD的业务连续性。
在上述实施例的基础上,本申请还提供了另一些实施例,在该实施例中,PCIe开关(PCIe Switch)设有多个,每个控制器节点(Node)通过每个PCIe开关与NVMe固态硬盘(NVMe SSD)连通。
在本实施例步骤S1中,在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取每个PCIe开关上连接的控制器节点的数量m+1及NVMe固态硬盘的数量n+1。
在本实施例步骤S2中,对应每个PCIe开关,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系。
本实施例中,还设置其中的一个PCIe开关为开启状态,其余的PCIe开关为关闭状态。当任意一个NVMe固态硬盘被访问时,在当初始设置为开启状态的PCIe开关无法连通时,将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态。
具体的,将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态,包括:逐一检测其余的PCIe开关是否正常;若是,则选取检测正常的一个PCIe开关,并将其关闭状态修改为开启状态;若否,则删除出现异常的PCIe开关,再次检测判断剩余的PCIe开关是否正常,直至剩余至少一个PCIe开关为正常。
在逐一检测其余PCIe开关是否正常时,若剩余的PCIe开关均异常,则发出报警信息。
请参阅图2、图3,在本实施例步骤S2中,将每个NVMe固态硬盘对应的真实容量空间和虚拟空间分别映射至不同的控制器节点中,包括:
按照控制器节点的排列顺序,依次将连续排列的NVMe固态硬盘中的真实 容量空间分别映射至每个PCIe开关对应的m+1个控制器节点中。
具体的,其中n大于等于m。其中m、n均为正整数,本实施例优选控制器节点的数量m+1为4,m=3,即为4个控制器节点,只需普通NVMe SSD即可实现NVMe SSD 4控共享,满足1+3冗余,满足高可靠性的需求。
当n等于m时,按照NVMe固态硬盘的排列顺序,将连续排列的n+1个NVMe固态硬盘中的n+1个真实容量空间分别映射至每个PCIe开关对应的m+1个控制器节点中;其中不同的PCIe开关对应同一个控制器节点中的真实容量空间所在的NVMe固态硬盘不同;当n大于m时,按照NVMe固态硬盘的排列顺序,将连续排列的m+1个NVMe固态硬盘设为一组,该组中的m+1个真实容量空间分别映射至每个PCIe开关对应的m+1个控制器节点中,其中不同的PCIe开关对应同一个控制器节点中的真实容量空间所在的NVMe固态硬盘不同;其余组按照相同的映射规律将真实容量空间分别映射至不同的控制器节点中。
可理解的是,双端口NVMe SSD通过2个PCIe Switch双平面实现了两个端口的连接方式,能够进一步增加访问路径的冗余设置数量,进一步提高了数据传输的冗余性,可靠性更高。
在上述实施例的固态硬盘访问控制方法中,通过将每个NVMe固态硬盘对应的真实容量空间和虚拟空间分别映射至不同的控制器节点中,设置每个控制器节点只对映射的NVMe固态硬盘真实容量空间进行访问,避免了非法访问固态硬盘数据存储空间的情形,而且多个控制器节点均可将其映射的虚拟空间修改为真实容量空间后实现对NVMe固态硬盘的访问,实现了多个访问路径的冗余设置,提高了数据传输的冗余性,可靠性高。
应该理解的是,虽然图4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图5所示,提供了一种固态硬盘访问控制装置10,包 括:上电检测模块1、映射路径管理模块2、访问管理模块3。
上电检测模块1用于检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘,其中每个NVMe固态硬盘通过PCIe开关与所有的控制器节点连接;上电检测模块1还用于同步检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘,其中每个NVMe固态硬盘通过PCIe开关与所有的控制器节点连接。
映射路径管理模块2用于设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接;具体的,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接。
访问管理模块3用于将每个NVMe固态硬盘对应的真实容量空间映射至一个控制器节点中形成第一映射连接关系;将该NVMe固态硬盘对应的虚拟空间分别映射至其余的控制器节点中形成第二映射连接关系;第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接。具体当任意一个NVMe固态硬盘被访问时,若第一映射连接关系正常,通过第一映射连接关系对应的控制器节点对该被访问的NVMe固态硬盘进行输入输出读写操作;若第一映射连接关系异常,则在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,把备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系。
在本实施例映射路径管理模块2中,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系时,具体包括:
根据控制器节点数量m+1,对应每个NVMe固态硬盘构建1个真实容量空间和m个虚拟空间,虚拟空间为占位符;
将每个NVMe固态硬盘对应的真实容量空间映射至一个控制器节点中形成第一映射连接关系;将该NVMe固态硬盘对应的虚拟空间分别映射至其余的控制器节点中形成第二映射连接关系。
可理解为:按照控制器节点的排列顺序,依次将连续排列的NVMe固态硬盘中的真实容量空间分别映射至m+1个控制器节点中。
具体的,其中n大于等于m;其中m、n均为正整数,本实施例优选控制器节点的数量m+1为4,m=3,即为4个控制器节点,只需普通NVMe SSD即可实现NVMe SSD 4控共享,满足1+3冗余,满足高可靠性的需求。
当n等于m时,按照NVMe固态硬盘的排列顺序,将连续排列的n+1个NVMe固态硬盘中的n+1个真实容量空间分别映射至m+1个控制器节点中;当n大于m时,按照NVMe固态硬盘的排列顺序,将连续排列的m+1个NVMe固态硬盘设为一组,该组中的m+1个真实容量空间分别映射至m+1个控制器节点中,其余组按照相同的映射规律将真实容量空间分别映射至不同的控制器节点中。
在本实施例访问管理模块3中,在任意一个NVMe固态硬盘被访问时,包括:
当映射有该NVMe固态硬盘的真实容量空间的控制器节点出现故障离线时,将出现故障离线的控制器节点状态传输给其余控制器节点;
在其余控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,通过NVMe固态硬盘热接入方式,把备用控制器的虚拟空间替换成该被访问的NVMe固态硬盘的真实容量空间。
也就是说,把备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系,包括:通过NVMe固态硬盘热接入方式,把备用控制器的虚拟空间替换成该被访问的NVMe固态硬盘的真实容量空间。
在本实施例访问管理模块3中,在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器时,还包括:
逐一检测其余控制器节点是否正常;若是,则选取检测正常的一个控制器节点作为该被访问的NVMe固态硬盘的备用控制器;若否,则删除出现异常的控制器节点,再次检测判断剩余的控制器节点是否正常,直至剩余至少一个控制器节点为正常;若剩余的控制器节点均异常,则发出报警信息。
在本实施例中,PCIe开关设有多个,每个控制器节点(Node)通过每个PCIe开关与NVMe固态硬盘连通。
上电检测模块1在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还用于检测PCIe开关的数量,同步获取每个PCIe开关上连接的控制器节点的数量m+1及NVMe固态硬盘的数量n+1。
映射路径管理模块2还用于对应每个PCIe开关,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系。
访问管理模块3还用于设置其中的一个PCIe开关为开启状态,其余的PCIe开关为关闭状态。在当初始设置为开启状态的PCIe开关无法连通时,将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态。
此时,将每个NVMe固态硬盘对应的真实容量空间和虚拟空间分别映射至不同的控制器节点中,包括:
按照控制器节点的排列顺序,依次将连续排列的NVMe固态硬盘中的真实容量空间分别映射至每个PCIe开关对应的m+1个控制器节点中。
在本实施例中,其中n大于等于m;其中m、n均为正整数,本实施例优选控制器节点的数量m+1为4,m=3,即为4个控制器节点,只需普通NVMe SSD即可实现NVMe SSD 4控共享,满足1+3冗余,满足高可靠性的需求。
当n等于m时,按照NVMe固态硬盘的排列顺序,将连续排列的n+1个NVMe固态硬盘中的n+1个真实容量空间分别映射至每个PCIe开关对应的m+1个控制器节点中;其中不同的PCIe开关对应同一个控制器节点中的真实容量空间所在的NVMe固态硬盘不同;当n大于m时,按照NVMe固态硬盘的排列顺序,将连续排列的m+1个NVMe固态硬盘设为一组,该组中的m+1个真实容量空间分别映射至每个PCIe开关对应的m+1个控制器节点中,其中不同的PCIe开关对应同一个控制器节点中的真实容量空间所在的NVMe固态硬盘不同;其余组按照相同的映射规律将真实容量空间分别映射至不同的控制器节点中。
上述固态硬盘访问控制装置10中,通过将每个NVMe固态硬盘对应的真实容量空间和虚拟空间分别映射至不同的控制器节点中,设置每个控制器节点只对映射的NVMe固态硬盘真实容量空间进行访问,避免了非法访问固态硬盘数据 存储空间的情形,而且多个控制器节点均可将其映射的虚拟空间修改为真实容量空间后实现对NVMe固态硬盘的访问,实现了多个访问路径的冗余设置,提高了数据传输的冗余性,可靠性高。
关于固态硬盘访问控制装置的具体限定可以参见上文中对于固态硬盘访问控制方法的限定,在此不再赘述。上述固态硬盘访问控制装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的一个或多个处理器、一个或多个存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储固态硬盘访问控制数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被一个或多个处理器执行时以实现一种固态硬盘访问控制方法。
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种计算机设备,包括一个或多个存储器、一个或多个处理器及存储在一个或多个存储器上并可在一个或多个处理器上运行的计算机可读指令,一个或多个处理器执行计算机可读指令时实现一种固态硬盘访问控制方法的步骤。
关于一个或多个处理器执行计算机可读指令时实现步骤的具体限定可以参见上文中对于固态硬盘访问控制的方法的限定,在此不再赘述。
在一个实施例中,提供了一种非易失性计算机可读存储介质,其上存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时实现上述固态硬盘访 问控制方法的步骤。
关于计算机可读指令被一个或多个处理器执行时实现步骤的具体限定可以参见上文中对于固态硬盘访问控制的方法的限定,在此不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (21)

  1. 一种固态硬盘访问控制方法,其特征在于,包括:
    检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘,其中每个NVMe固态硬盘通过PCIe开关与所有的控制器节点连接;
    设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;所述第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,所述第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接;及
    当任意一个NVMe固态硬盘被访问时,响应于所述第一映射连接关系正常,通过所述第一映射连接关系对应的控制器节点对该被访问的NVMe固态硬盘进行输入输出读写操作,或,响应于所述第一映射连接关系异常,在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,把所述备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系。
  2. 根据权利要求1所述的固态硬盘访问控制方法,其特征在于,
    在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取所述控制器节点的数量m+1。
  3. 根据权利要求2所述的固态硬盘访问控制方法,其特征在于,
    设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系时,具体包括:
    根据控制器节点数量m+1,对应每个NVMe固态硬盘构建1个真实容量空间和m个虚拟空间;及
    将每个NVMe固态硬盘对应的真实容量空间映射至一个控制器节点中形成第一映射连接关系;将该NVMe固态硬盘对应的虚拟空间分别映射至其余的控制器节点中形成第二映射连接关系。
  4. 根据权利要求3所述的固态硬盘访问控制方法,其特征在于,所述真实容量空间能实现IO读写操作,所述虚拟空间不能实现IO读写操作。
  5. 根据权利要求3所述的固态硬盘访问控制方法,其特征在于,所述虚拟空间为占位符。
  6. 根据权利要求3所述的固态硬盘访问控制方法,其特征在于,将每个NVMe固态硬盘对应的真实容量空间和虚拟空间分别映射至不同的控制器节点中,具体包括:
    按照所述控制器节点的排列顺序,依次将连续排列的NVMe固态硬盘中的真实容量空间分别映射至每个PCIe开关对应的m+1个控制器节点中。
  7. 根据权利要求6所述的固态硬盘访问控制方法,其特征在于,所述控制器节点的数量m+1为4,m=3,即为4个控制器节点。
  8. 根据权利要求2所述的固态硬盘访问控制方法,其特征在于,在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取所述NVMe固态硬盘的数量n+1;其中n大于等于m。
  9. 根据权利要求8所述的固态硬盘访问控制方法,其特征在于,
    响应于n等于m,按照NVMe固态硬盘的排列顺序,将连续排列的n+1个NVMe固态硬盘中的n+1个真实容量空间分别映射至m+1个控制器节点中。
  10. 根据权利要求8所述的固态硬盘访问控制方法,其特征在于,
    响应于n大于m,按照NVMe固态硬盘的排列顺序,将连续排列的m+1个NVMe固态硬盘设为一组,该组中的m+1个真实容量空间分别映射至m+1个控制器节点中,其余组按照相同的映射规律将真实容量空间分别映射至不同的控制器节点中。
  11. 根据权利要求8所述的固态硬盘访问控制方法,其特征在于,当n等于m时或n大于m时,不同的PCIe开关对应同一个控制器节点中的真实容量空间所在的NVMe固态硬盘不同。
  12. 根据权利要求1所述的固态硬盘访问控制方法,其特征在于,把所述备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系,包括:通过NVMe固态硬盘热接入方式,把所述备用控制器的虚拟空间替换成该被访问的NVMe固态硬盘的真实容量空间。
  13. 根据权利要求12所述的固态硬盘访问控制方法,其特征在于,在所述其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器时,还包括:
    逐一检测其余控制器节点是否正常;响应于其余控制器节点正常,选取检测 正常的一个控制器节点作为该被访问的NVMe固态硬盘的备用控制器,或,响应于其余控制器节点正常异常,删除出现异常的控制器节点,再次检测判断剩余的控制器节点是否正常,直至剩余至少一个控制器节点为正常。
  14. 根据权利要求13所述的固态硬盘访问控制方法,其特征在于,在逐一检测其余控制器节点是否正常时,响应于剩余的控制器节点均异常,发出报警信息。
  15. 根据权利要求1所述的固态硬盘访问控制方法,其特征在于,所述PCIe开关设有多个,每个控制器节点通过每个PCIe开关与NVMe固态硬盘连通;
    在检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘时,还同步获取每个PCIe开关上连接的所述控制器节点的数量m+1及所述NVMe固态硬盘的数量n+1;
    对应每个PCIe开关,设置每个NVMe固态硬盘与其中一个控制器节点之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;及
    设置其中的一个PCIe开关为开启状态,其余的PCIe开关为关闭状态。
  16. 根据权利要求15所述的固态硬盘访问控制方法,其特征在于,响应于初始设置为开启状态的PCIe开关无法连通,将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态。
  17. 根据权利要求16所述的固态硬盘访问控制方法,其特征在于,所述将其余的PCIe开关中一个正常的PCIe开关的关闭状态修改为开启状态,包括:
    逐一检测其余的PCIe开关是否正常;响应于其余的PCIe开关正常,选取检测正常的一个PCIe开关,并将其关闭状态修改为开启状态;响应于其余的PCIe开关异常,删除出现异常的PCIe开关,再次检测判断剩余的PCIe开关是否正常,直至剩余至少一个PCIe开关为正常。
  18. 根据权利要求13所述的固态硬盘访问控制方法,其特征在于,在逐一检测其余PCIe开关是否正常时,响应于剩余的PCIe开关均异常,发出报警信息。
  19. 一种固态硬盘访问控制装置,其特征在于,所述装置包括:
    上电检测模块,用于检测连接至PCIe开关的所有控制器节点及所有NVMe固态硬盘,其中每个NVMe固态硬盘通过PCIe开关与所有的控制器节点连接;
    映射路径管理模块,用于设置每个NVMe固态硬盘与其中一个控制器节点 之间形成第一映射连接关系,与其余的控制器节点之间形成第二映射连接关系;所述第一映射连接关系为控制器节点与该NVMe固态硬盘的真实容量空间的映射连接,所述第二映射连接关系为控制器节点与该NVMe固态硬盘的虚拟空间的映射连接;及
    访问管理模块,用于在当任意一个NVMe固态硬盘被访问时,响应于所述第一映射连接关系正常,通过所述第一映射连接关系对应的控制器节点对该被访问的NVMe固态硬盘进行输入输出读写操作,或,响应于所述第一映射连接关系异常,在其余的控制器节点中选出一个作为该被访问的NVMe固态硬盘的备用控制器,把所述备用控制器与该被访问的NVMe固态硬盘之间的第二映射连接关系修改为第一映射连接关系。
  20. 一种计算机设备,包括一个或多个存储器、一个或多个处理器及存储在一个或多个存储器上并可在一个或多个处理器上运行的计算机可读指令,其特征在于,所述一个或多个处理器执行所述计算机可读指令时实现权利要求1至18中任一项所述方法的步骤。
  21. 一种非易失性计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被一个或多个处理器执行时实现权利要求1至18中任一项所述的方法的步骤。
PCT/CN2023/116126 2022-11-10 2023-08-31 固态硬盘访问控制方法、装置、计算机设备和存储介质 WO2024098907A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211404833.5 2022-11-10
CN202211404833.5A CN115454359B (zh) 2022-11-10 2022-11-10 固态硬盘访问控制方法、装置和计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2024098907A1 true WO2024098907A1 (zh) 2024-05-16

Family

ID=84295761

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/116126 WO2024098907A1 (zh) 2022-11-10 2023-08-31 固态硬盘访问控制方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN115454359B (zh)
WO (1) WO2024098907A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115454359B (zh) * 2022-11-10 2023-03-24 苏州浪潮智能科技有限公司 固态硬盘访问控制方法、装置和计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050097243A1 (en) * 2003-10-07 2005-05-05 Hitachi, Ltd. Storage path control method
CN101727297A (zh) * 2008-10-30 2010-06-09 株式会社日立制作所 存储装置、存储控制器内部网络的数据路径故障切换方法
US20140380028A1 (en) * 2013-06-21 2014-12-25 Ati Technologies Ulc Virtualized Device Reset
US20180246833A1 (en) * 2017-02-28 2018-08-30 Cisco Technology, Inc. DYNAMIC PARTITION OF PCIe DISK ARRAYS BASED ON SOFTWARE CONFIGURATION / POLICY DISTRIBUTION
CN115454359A (zh) * 2022-11-10 2022-12-09 苏州浪潮智能科技有限公司 固态硬盘访问控制方法、装置和计算机设备和存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102405460B (zh) * 2009-02-11 2016-05-04 艾梵尼达有限公司 虚拟存储系统及其运行方法
CN104571934B (zh) * 2013-10-18 2018-02-06 华为技术有限公司 一种内存访问的方法、设备和系统
CN106020723B (zh) * 2016-05-19 2019-10-25 记忆科技(深圳)有限公司 一种简化NVMe固态硬盘的方法
US10949303B2 (en) * 2017-12-11 2021-03-16 Fungible, Inc. Durable block storage in data center access nodes with inline erasure coding
CN114489497B (zh) * 2022-01-14 2024-05-28 深圳市汇川技术股份有限公司 数据映射方法、服务端以及计算机可读存储介质
CN114860387B (zh) * 2022-06-08 2023-04-18 无锡众星微系统技术有限公司 一种面向虚拟化存储应用的hba控制器i/o虚拟化方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050097243A1 (en) * 2003-10-07 2005-05-05 Hitachi, Ltd. Storage path control method
CN101727297A (zh) * 2008-10-30 2010-06-09 株式会社日立制作所 存储装置、存储控制器内部网络的数据路径故障切换方法
US20140380028A1 (en) * 2013-06-21 2014-12-25 Ati Technologies Ulc Virtualized Device Reset
US20180246833A1 (en) * 2017-02-28 2018-08-30 Cisco Technology, Inc. DYNAMIC PARTITION OF PCIe DISK ARRAYS BASED ON SOFTWARE CONFIGURATION / POLICY DISTRIBUTION
CN115454359A (zh) * 2022-11-10 2022-12-09 苏州浪潮智能科技有限公司 固态硬盘访问控制方法、装置和计算机设备和存储介质

Also Published As

Publication number Publication date
CN115454359B (zh) 2023-03-24
CN115454359A (zh) 2022-12-09

Similar Documents

Publication Publication Date Title
US8479037B1 (en) Distributed hot-spare storage in a storage cluster
TWI450087B (zh) 複數個磁碟陣列系統之資料儲存方法及資料儲存系統
US7971013B2 (en) Compensating for write speed differences between mirroring storage devices by striping
JP5523468B2 (ja) 直接接続ストレージ・システムのためのアクティブ−アクティブ・フェイルオーバー
US20060253749A1 (en) Real-time memory verification in a high-availability system
WO2024098907A1 (zh) 固态硬盘访问控制方法、装置、计算机设备和存储介质
WO2018054079A1 (zh) 一种存储文件的方法、第一虚拟机及名称节点
JP6282482B2 (ja) プログラマブル回路装置、コンフィギュレーション情報修復方法
WO2017167106A1 (zh) 存储系统
CN114868117A (zh) 通过控制总线进行的对等存储设备消息传送
US10860224B2 (en) Method and system for delivering message in storage system
WO2021012169A1 (zh) 一种提高存储系统可靠性的方法和相关装置
CN112835516A (zh) 一种raid卡监控管理方法、系统及装置
JP5511546B2 (ja) フォールトトレラントの計算機システム、複数の物理サーバとストレージ装置とに接続されるスイッチ装置、及び、サーバ同期制御方法
WO2022226997A1 (zh) 存储单元的访问方法、修复方法、裸片和存储芯片
US20170085645A1 (en) Storage system that includes a plurality of routing circuits and a plurality of node modules connected thereto
EP3869314A1 (en) Control device switching method, control device and storage system
US9641613B2 (en) Volume hierarchy download in a storage area network
WO2020224646A1 (zh) 一种存储设备的磨损均衡方法、装置及相关设备
US20240184726A1 (en) System for monitoring and controlling host selection for a multi-host capable pci-e device
WO2023046129A1 (zh) 计算机设备、处理数据的方法及计算机系统
US10705905B2 (en) Software-assisted fine-grained data protection for non-volatile memory storage devices
WO2023143039A1 (zh) 一种数据处理方法及装置
EP4184306A1 (en) Redundant array of independent disks card, command processing method, and storage device and system
JP6930153B2 (ja) パス切替装置、パス切替方法及びパス切替プログラム、並びに、コンピュータシステム