CN115145492A - Method and system for managing physical disk under RAID controller - Google Patents

Method and system for managing physical disk under RAID controller Download PDF

Info

Publication number
CN115145492A
CN115145492A CN202210906226.2A CN202210906226A CN115145492A CN 115145492 A CN115145492 A CN 115145492A CN 202210906226 A CN202210906226 A CN 202210906226A CN 115145492 A CN115145492 A CN 115145492A
Authority
CN
China
Prior art keywords
physical disk
command
sqe
transparent transmission
cqe
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210906226.2A
Other languages
Chinese (zh)
Inventor
李幸远
王江
孙华锦
李树青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202210906226.2A priority Critical patent/CN115145492A/en
Publication of CN115145492A publication Critical patent/CN115145492A/en
Pending legal-status Critical Current

Links

Images

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/0604Improving or facilitating administration, e.g. storage management
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • 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/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Abstract

The invention provides a method, a system, a storage medium and equipment for managing physical disks under a RAID controller, wherein the method comprises the following steps: constructing a physical disk transparent transmission command SQE; sending a physical disk transparent transmission command SQE to the RAID controller; reading a transparent transmission command operation code in DW0 in a received physical disk transparent transmission command SQE to confirm that the physical disk transparent transmission command SQE is a physical disk transparent transmission command; reading DW2 in a physical disk transparent transmission command SQE, and acquiring a physical disk ID to determine the type of a target physical disk; constructing a physical disk command SQE based on the type of the target physical disk; sending the SQE to a target physical disk and waiting for the target physical disk to return to a CQE of the physical disk; and constructing a pass-through command CQE based on the physical disk CQE and returning the pass-through command CQE. According to the invention, the host directly sends the command to the physical disk under the RAID controller through the RAID controller, thereby reducing the complex reading of the RAID management interface and improving the flexibility of the interface.

Description

Method and system for managing physical disk under RAID controller
Technical Field
The invention relates to the technical field of computer data storage, in particular to the technical field of physical disk management under a RAID controller, and specifically relates to a method, a system, a storage medium and equipment for physical disk management under the RAID controller.
Background
Since the physical disks Disk 1 to Disk N are directly connected to the RAID controller and not directly connected to the host, the discovery and management of the physical disks can only be performed by the RAID controller, and the host cannot see the physical disks. If the host wants to send commands to the physical disk directly through the RAID controller, it can only be implemented by extending a new dedicated command interface over the RAID management command interface. The general procedure is such that: first, the host issues a command to the RAID controller to obtain specific information on the physical disks. After the RAID controller receives the command, the corresponding physical disk command is constructed according to the type of the physical disk and is sent to the physical disk, and after the physical disk returns data, the RAID controller reconstructs the data and returns the data to the host. This approach to obtaining every information for a physical disk necessitates the RAID controller to construct a command, which results in the RAID controller having to implement an interface for each command for each disk.
Since the physical disks connected to the RAID controller are made of multiple protocols, such as NVMe disks, SAS disks, and SATA disks, which follow different protocols on the command interface, if one command is extended on the RAID management interface corresponding to each command of each disk, the number of commands of the RAID management interface cannot be controlled. And because the different manufacturers of the physical disks cause the different command sets supported by the manufacturers, the manufacturer-defined commands may exist, and this causes the possibility that the method for extending the special commands cannot cover all types of physical disk commands. Resulting in an inability to fully determine the RAID management module requirements within the RAID controller, which can lead to implementation difficulties.
Therefore, in order to solve the problem, a general command interface needs to be provided to reduce the complex read of the RAID management interface and improve the flexibility of the interface.
Disclosure of Invention
In view of the above, the present invention is directed to a method, system, storage medium and apparatus for improved physical disk management under RAID controller, so as to improve the coverage and flexibility of the test.
In view of the above objects, in one aspect, the present invention provides a method for managing physical disks under a RAID controller, where the method includes the following steps:
constructing a physical disk transparent transmission command SQE;
sending the SQE to the RAID controller;
reading a transparent transmission command operation code in DW0 in the received physical disk transparent transmission command SQE to confirm that the physical disk transparent transmission command SQE is a physical disk transparent transmission command;
reading DW2 in the SQE to obtain a physical disk ID so as to determine the type of a target physical disk;
constructing a physical disk command SQE based on the type of the target physical disk;
sending the SQE to the target physical disk and waiting for the target physical disk to return to a physical disk CQE; and
and constructing a pass-through command CQE on the basis of the physical disk CQE, and returning the pass-through command CQE.
In some embodiments of a method of physical disk management under a RAID controller according to the present invention, "constructing a physical disk transparent transfer command SQE" comprises the steps of:
filling the transparent transmission command operation code and the host command identifier into DW0 in the SQE;
respectively filling the physical disk ID and the operation code of the transparent transmission command in the transparent transmission command into DW2 and DW3 of the physical disk transparent transmission command SQE; and
and copying the contents of other fields in the transparent transmission command to corresponding fields of the SQE.
In some embodiments of a method of physical disk management under a RAID controller according to the present invention, "construct physical disk command SQE" comprises the steps of:
filling the passthrough command operation code in DW3 of the physical disk passthrough command SQE into DW0 of the physical disk command SQE;
regenerating a new physical disk command identifier and populating DW0 of the physical disk SQE; and
and copying the contents of other fields in the SQE to corresponding positions in the SQE.
In some embodiments of a method of physical disk management under a RAID controller according to the present invention, "constructing a pass-through command CQE" comprises the steps of:
filling the host command identifier in DW0 of the physical disk transparent transmission command SQE into DW3 of the transparent transmission command CQE;
copying DW0 and DW1 in the physical disk CQE returned by the target physical disk to corresponding positions in the transparent transmission command CQE; and
and copying the state information bit in the DW3 in the physical disk CQE returned by the target physical disk to the corresponding position in the transparent transmission command CQE.
In some embodiments of a method of physical disk management under a RAID controller according to the present invention, "constructing a physical disk transparent transfer command SQE" comprises the steps of:
filling the transparent transmission command operation code and the host command identifier into DW0 in the SQE;
respectively filling the physical disk ID and the operation code of the transparent transmission command in the transparent transmission command into DW2 and DW3 of the physical disk transparent transmission command SQE; and
and filling FIS frames in the transparent transmission commands into the physical disk transparent transmission commands SQE DW10 to DW14 or filling CDB frames in the transparent transmission commands into the physical disk transparent transmission commands SQE DW10 to DW13.
In some embodiments of the method for physical disk management under a RAID controller according to the present invention, when there is a data transfer phase in the command to be transparently transferred, a PRP data structure is constructed according to the NVMe standard and DW6 to DW9 fields of the physical disk transparently transfer command SQE are filled in.
In some embodiments of a method of physical disk management under a RAID controller in accordance with the present invention,
upon determining that the type of the target physical disk is a SATA disk, constructing a physical disk command SQE comprises either a SATA controller that takes a FIS out of DWs 10-14 of the physical disk passthrough command SQE and fills in the target physical disk, or
Upon determining that the type of the target physical disk is a SAS disk, constructing a physical disk command SQE includes a SAS controller that fetches CDB from DW10 through DW13 of the physical disk pass-through command SQE and fills in the target physical disk.
In some embodiments of the method of physical disk management under a RAID controller according to the present invention, "construct physical disk command SQE" further comprises the steps of:
and taking out the PRP data structure from DW6 to DW9 of the physical disk transparent transmission command SQE, and constructing a SATA data buffer descriptor structure according to the requirement of the SATA controller or constructing a SAS data buffer descriptor structure according to the requirement of the SAS controller.
In some embodiments of the method of physical disk management under a RAID controller according to the present invention, the method further comprises:
after the target physical disk receives the physical disk command SQE, operating the SATA controller or the SAS controller to send the physical disk command SQE to the target physical disk.
In some embodiments of the method for physical disk management under a RAID controller according to the present invention, when there is a data transmission phase in the command to be transparently transferred, the SATA controller or the SAS controller completes data transfer between the data buffer of the host and the target physical disk.
In some embodiments of a method of physical disk management under a RAID controller according to the present invention, "constructing a pass-through command CQE" comprises the steps of:
filling the command execution state in the physical disk CQE returned by the SATA controller or the SAS controller into the state in the DW3 in the transparent transmission command CQE;
filling the returned state data in the physical disk CQE into DW0 of the transparent transmission command CQE; and
and copying the returned state information bit in the DW3 in the physical disk CQE to the corresponding position in the transparent transmission command CQE.
In another aspect of the present invention, a system for managing physical disks under a RAID controller is further provided, where the system includes:
a transparent transmission command SQE construction module configured to construct a physical disk transparent transmission command SQE;
the transparent transmission command SQE sending module is configured to send the physical disk transparent transmission command SQE to the RAID controller;
a command confirmation module, configured to read a passthrough command operation code in DW0 in the received physical disk passthrough command SQE to confirm that the physical disk passthrough command SQE is a physical disk passthrough command;
a physical disk type confirmation module, configured to read DW2 in the physical disk transparent transmission command SQE, and obtain a physical disk ID to determine the type of a target physical disk;
a physical disk command SQE construction module configured to construct a physical disk command SQE by the construction module based on the type of the target physical disk;
a physical disk command SQE processing module configured to send the physical disk command SQE to the target physical disk and wait for the target physical disk to return to a physical disk CQE; and
and the transparent transmission command CQE processing module is configured to construct a transparent transmission command CQE based on the physical disk CQE and return the transparent transmission command CQE.
In still another aspect of the present invention, there is also provided a computer-readable storage medium storing computer program instructions, which when executed, implement any one of the above methods for physical disk management under a RAID controller according to the present invention.
In still another aspect of the present invention, there is provided a computer apparatus including a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to perform any one of the above methods for physical disk management under a RAID controller according to the present invention.
The invention has at least the following beneficial technical effects: the invention provides a physical disk management mode under an SOCRAID controller, which can realize that any command aiming at different types of physical disks is packaged in an NVMe command through the design and the method steps provided by the invention, and can finish the processing of any physical disk command issued by a host through the forwarding operation flow aiming at each type of physical disk on an RAID controller. The processing of commands is only dependent on the type of physical disc and is independent of the commands. Therefore, the operation of realizing a specific physical disk command by the RAID controller is omitted, the design of an interface of the RAID controller is simplified, and the development difficulty is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
In the figure:
FIG. 1 is a schematic block diagram illustrating an embodiment of a method of physical disk management under a RAID controller in accordance with the present invention;
FIG. 2 illustrates a basic format of a SQE format in a method for managing physical disks under a RAID controller according to the present invention;
fig. 3 illustrates a basic format of a command parameter in the SQE format in a physical disk transparent transfer command format in the method for managing physical disks under a RAID controller according to the present invention when a target physical disk is an NVMe disk;
FIG. 4 shows a basic format of command parameters in the SQE format of the physical disk transparent transmission command format in the method for managing physical disks under a RAID controller according to the present invention when the target physical disk is an SAS disk;
FIG. 5 shows a basic format of command parameters in a SQE format for a physical disk transparent transfer command in a method for managing physical disks under a RAID controller according to the present invention when a target physical disk is a SATA disk;
FIG. 6 illustrates a basic format of a physical disk CQE in the method of physical disk management under a RAID controller according to the present invention;
FIG. 7 is a schematic diagram illustrating a transition from a physical disk transparent transfer command SQE to a physical disk command SQE in the method for managing physical disks under a RAID controller according to the present invention;
FIG. 8 illustrates the storage locations of FISs in DW10 through DW14 in the physical disk transparent transfer command SQE in the method for physical disk management under a RAID controller according to the present invention;
FIG. 9 illustrates the storage locations of CDB in DW10 through DW13 in the physical disk transparent transfer command SQE in the method for physical disk management under RAID controller according to the present invention;
FIG. 10 is a schematic block diagram illustrating an embodiment of a system for physical disk management under a RAID controller in accordance with the present invention;
FIG. 11 is a schematic diagram illustrating an embodiment of a computer-readable storage medium to implement a method of physical disk management under a RAID controller in accordance with the present invention;
FIG. 12 is a schematic hardware diagram of an embodiment of a computer apparatus for implementing a method of physical disk management under a RAID controller according to the present invention;
FIG. 13 shows a schematic diagram of a RAID controller connection architecture with a host and physical disks according to the prior art.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two non-identical entities with the same name or different parameters, and it is understood that "first" and "second" are only used for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements does not include all of the other steps or elements inherent in the list.
The RAID redundant array technology combines a plurality of disk devices to form a storage array group, and aims to improve performance and increase redundancy to protect data.
RAID cards, which are devices implementing RAID technology, are typically implemented as PCIe devices on a computer system, connected to a host through a PCIe bus. The core component on the RAID card is a RAID controller. As shown in fig. 13, the interface with the host of the RAID controller in the prior art complies with NVMe (a PCIe-based storage device specification for SSD host interface for high speed solid state disk) protocol standard, and extends RAID management commands on the NVMe host interface for completing operations related to RAID management.
The invention aims to provide a method, which realizes a universal command interface on an RAID controller management interface based on an NVMe host machine interface, and can ensure that a host machine directly sends commands to a physical disk under the control of an RAID through the RAID controller, thereby reducing the complex reading of the RAID management interface and improving the flexibility of the interface.
In this regard, in a first aspect of the invention, a method 100 for physical disk management under a RAID controller is provided. FIG. 1 is a schematic block diagram illustrating an embodiment of a method of physical disk management under a RAID controller in accordance with the present invention. In the embodiment shown in fig. 1, the method comprises:
step S10: constructing a physical disk transparent transmission command SQE;
step S20: sending the physical disk transparent transmission command SQE to the RAID controller;
step S30: reading a transparent transmission command operation code in DW0 in the received physical disk transparent transmission command SQE to confirm that the physical disk transparent transmission command SQE is a physical disk transparent transmission command;
step S40: reading DW2 in the SQE to obtain a physical disk ID so as to determine the type of a target physical disk;
step S50: constructing a physical disk command SQE based on the type of the target physical disk;
step S60: sending the SQE to the target physical disk and waiting for the target physical disk to return to a CQE;
step S70: and constructing a pass-through command CQE on the basis of the physical disk CQE, and returning the pass-through command CQE.
The SQE (scheduling Queue Entry) submits Queue entries for commands, each Entry corresponding to a host command to the NVMe device. The CQE (Completion Queue Entry) is an Entry of the command Completion Queue, and each Entry corresponds to a command Completion data structure reported by the NVMe controller. The NVMe controller reports CQEs to CQs for each command issued by the host.
The physical disk transparent transmission command is used for directly sending a command to a physical disk under the RAID controller through the RAID controller, and comprises a command format and a command response format.
The format of the physical disk transparent transfer command is an NVMe command, which is a data structure called SQE format, wherein the SQE is 64 bytes long and is divided into 16 double words (DW 0-DW 15), and the SQE includes an operation code of the command and parameters of the command. The data format is basically as shown in fig. 2.
In the context of figure 2 of the drawings,
(1) the physical disk transparent transmission command operation code belongs to a manufacturer-specified operation code (Combined Opcode) range specified by NVMe standard, and has a value of any one of C0h to FFh;
(2) the command identifier is an identifier assigned by the host to construct the command for associating the command with a response to the command;
(3) physical disc identifier type: since there may be multiple and multiple physical disks under the RAID controller, the identifier here is used to set to which physical disk the physical disk pass-through command is sent;
(4) data pointer: if data is sent from the host to the physical disk or the physical disk returns the data to the host in the process of executing the command by the physical disk, the pointer points to a section of buffer area of the memory area of the host and is used for storing the data;
(5) command parameters: the command parameters here are of different types depending on the type of target physical disk-NVMe, SAS, SATA. The following is introduced separately:
if the target physical disk is an NVMe disk, the command parameters are as shown in FIG. 3, where (1) the physical disk command NVMe command opcode is a command opcode to be sent to the NVMe physical disk; (2) the NVMe command parameter is (1) a command parameter corresponding to the physical disk NVMe command.
If the target physical disk is a SAS disk, the command parameters are as shown in FIG. 4. Wherein, the CDB (command descriptor block) is a data structure for encapsulating SCSI protocol commands. SCSI (Small Computer System Interface) is a protocol specification commonly used for hard disk interfaces.
If the target physical disk is a SATA disk, the command parameters are as shown in FIG. 5. Wherein the FIS (Frame Information Structure) is a data Structure for encapsulating SATA hard disk commands.
The physical disk pass-through command response is used for the RAID controller to return the execution state of the command to the host, and is mainly used for indicating whether the command is executed successfully or not. The NVMe command response is a data structure called CQE, 16 bytes in length with 4 double-word constructs (DW 0-DW 3). The response format of the physical disk pass-through command is shown in fig. 6, where:
(1) a command identifier from (1) the command identifier in the physical disk pass-through command, indicating to which command the command response is to be responded;
(2) the command status code indicates the success or failure of command execution;
(3) is a parameter related to the status of the command result.
In a preferred embodiment of the method for managing physical disks under a RAID controller according to the present invention, constructing the SQE comprises the following steps:
filling the transparent transmission command operation code and the host command identifier into DW0 in a physical disk transparent transmission command SQE;
respectively filling the physical disk ID and the operation code of the transparent transmission command in the transparent transmission command into DW2 and DW3 of a physical disk transparent transmission command SQE; and
and copying the contents of other fields in the transparent transmission command to corresponding fields of the SQE.
Constructing the physical disk command SQE comprises the following steps:
filling the operation code of the command to be transparently transmitted in the DW3 of the physical disk transparent transmission command SQE into the DW0 of the physical disk command SQE;
regenerate the new physical disk command identifier and fill in DW0 of physical disk SQE; and
and copying the contents of other fields in the SQE to corresponding positions in the SQE.
The construction of the transparent transmission command CQE comprises the following steps:
filling a host command identifier in DW0 of the physical disk transparent transmission command SQE into DW3 of the transparent transmission command CQE;
copying DW0 and DW1 in a physical disk CQE returned by the target physical disk to corresponding positions in a transparent transmission command CQE; and
and copying the state information bit in the DW3 in the physical disk CQE returned by the target physical disk to the corresponding position in the transparent transmission command CQE.
The above preferred embodiment corresponds to a flow in which the host directly sends a command to the physical disk through a disk-transparent-transfer command when the physical disk is an NVMe disk. Specifically, the flow is as follows:
1. the host constructs a physical disk transparent transmission command SQE:
filling the operation code of the physical disk transparent transmission command and the host command identifier generated by the host into DW0 of the physical disk transparent transmission command SQE, respectively filling the ID of the physical disk and the operation code of the transparent transmission command into DW2 and DW3 of the physical disk transparent transmission command SQE, and copying the contents of other fields, DW1 and DW 4-DW 15 of the transparent transmission command into the corresponding fields of the physical disk transparent transmission command SQE;
2. the host sends a constructed physical disk transparent transmission command SQE to the RAID controller;
3. the RAID controller receives a physical disk transparent transmission command SQE, reads an operation code in a command DW0, and judges that the command is a physical disk transparent transmission command;
4. the RAID controller reads DW2 in the physical disk transparent transmission command, acquires a physical disk ID, and judges that the target physical disk is an NVMe disk according to the ID;
5. the RAID controller constructs a physical disk command SQE sent to the physical disk:
the operation code of the command to be transparently transmitted is taken out from the DW3 of the physical disk transparent transmission command SQE and is filled in the DW0 of the physical disk command SQE, the RAID controller regenerates a new physical disk command identifier and is filled in the DW0 of the physical disk command SQE, the DW1, DW 4-DW 15 are taken out from the physical disk transparent transmission command SQE and are copied to corresponding positions in the physical command SQE, and FIG. 7 shows the conversion from the physical disk transparent transmission command SQE to the physical disk command SQE;
6. sending a physical disk command SQE to a physical disk, and waiting for the physical disk to return to a physical disk CQE;
7. the RAID controller constructs a pass-through command CQE and returns the command CQE to the host:
and taking out the identifier of the transparent transmission command from the SQE 0, filling the identifier into the DW3 in the CQE, copying the DW0 and the DW1 in the returned CQE of the physical disk to corresponding positions in the transparent transmission command CQE, and copying the state information bit in the DW3 in the returned CQE of the physical disk to corresponding positions in the transparent transmission command CQE.
In addition, in another preferred embodiment of the method of physical disk management under a RAID controller according to the present invention,
the method for constructing the SQE comprises the following steps:
filling the transparent transmission command operation code and the host command identifier into DW0 in a physical disk transparent transmission command SQE;
respectively filling the physical disk ID and the operation code of the transparent transmission command in the transparent transmission command into DW2 and DW3 of a physical disk transparent transmission command SQE; and
and filling FIS frames in the command to be transmitted through into the physical disk transmission through commands SQE 10 to DW14 or filling CDB frames in the command to be transmitted through into the physical disk transmission through commands SQE 10 to DW13.
And when a data transmission stage exists in the transparent transmission command, constructing a PRP data structure according to the NVMe standard and filling DW 6-DW 9 fields of the SQE.
The construct physical disk command SQE includes a SATA controller that fetches an FIS from DW10 to DW14 of the physical disk pass-through command SQE and fills in the target physical disk when it is determined that the type of the target physical disk is a SATA disk, or a SAS controller that fetches a CDB from DW10 to DW13 of the physical disk pass-through command SQE and fills in the target physical disk when it is determined that the type of the target physical disk is a SAS disk.
Constructing the physical disk command SQE further comprises the steps of:
and taking out the PRP data structure from DW6 to DW9 of the physical disk transparent transmission command SQE, and constructing a SATA data buffer descriptor structure according to the requirement of a SATA controller or constructing a SAS data buffer descriptor structure according to the requirement of a SAS controller.
The method also includes, after the target physical disk receives the physical disk command SQE, operating the SATA controller or the SAS controller to send the physical disk command SQE to the target physical disk.
When the transparent transmission command has a data transmission stage, the SATA controller or the SAS controller completes data transfer between the data buffer area of the host and the target physical disk.
The construction of the pass-through command CQE comprises the following steps:
filling the command execution state in the physical disk CQE returned by the SATA controller or the SAS controller into the state in the DW3 in the transparent transmission command CQE;
filling the returned state data in the physical disk CQE into DW0 of the transparent transmission command CQE; and
the status information bit in DW3 in the returned physical disk CQE is copied to the corresponding location in the pass-through command CQE.
The above preferred embodiment corresponds to a process in which the host directly sends a command to the physical disk through a disk pass-through command when the physical disk is a SATA disk or a SAS disk.
Specifically, when the physical disk is the SATA disk, the flow of the host directly sending the command to the physical disk through the physical disk transparent transfer command is as follows:
1. the host constructs a physical disk transparent transmission command SQE:
and filling the physical disk transparent transmission command operation code and the command identifier generated by the host into DW0 of the physical disk transparent transmission command SQE, respectively filling the physical disk ID and the transparent transmission command operation code into DW2 and DW3 of the physical disk transparent transmission command SQE, and filling SATA command FIS frames into SQE DW 10-DW 14. The length of the FIS is 20 bytes, the storage positions of the FIS in DW10 to DW14 of the CQE are shown in FIG. 8, if the command has a data transmission stage, a PRP data structure is constructed according to the NVMe standard, and DW 6-DW 9 fields of the SQE are filled in;
2. the host sends a constructed physical disk transparent transmission command SQE to the RAID controller;
3. the RAID controller receives a physical disk transparent transmission command SQE, reads an operation code in DW0 of the physical disk transparent transmission command, and judges that the operation code is a physical disk transparent transmission command;
4. and reading the DW2 in the transparent transmission command of the physical disk by the RAID controller to acquire the ID of the physical disk. And judging that the target physical disk is an SATA disk according to the ID;
5. the RAID controller constructs a physical disk command SQE and sends the SQE to the SATA physical disk:
taking out FIS from DW 10-DW 14 of physical disk transparent transmission command SQE, filling in SATA controller, if there is data transmission stage, taking out PRP data structure from DW 6-DW 9 of physical disk transparent transmission command SQE, and constructing SATA data buffer descriptor structure according to SATA controller requirement;
6. operating the SATA controller to send commands to the SATA disk. If the data transmission stage exists, the SATA controller completes the data transfer between the host data buffer area and the disk;
7. the RAID controller constructs a pass-through command CQE and returns the command CQE to the host:
and filling the command execution state returned by the SATA controller into the state in the DW3 in the pass-through command CQE, filling the data into the DW0 of the pass-through command CQE if the SATA controller returns detailed state data, and copying the state information bit in the DW3 in the returned physical disk CQE to the corresponding position in the pass-through command CQE.
Specifically, when the physical disk is an SAS disk, the flow process of the host directly sending a command to the physical disk through the physical disk transparent transmission command is as follows:
1. the host constructs a physical disk transparent transmission command SQE:
filling the operation code of the physical disk transparent transmission command and the command identifier generated by the host into DW0 of the SQE, respectively filling the ID of the physical disk and the operation code of the transparent transmission command into DW2 and DW3 of the SQE, and filling the CDB frame of the SCSI command into SQE DW 10-DW 13. The length of CDB is 16 bytes at most, the CDB is stored in DW10 to DW13 of CQE as shown in FIG. 9, if the command has a data transmission stage, a PRP data structure is constructed according to NVMe standard, and DW 6-DW 9 fields of a physical disk transparent transmission command SQE are filled;
2. the host sends a constructed physical disk transparent transmission command SQE to the RAID controller;
3. the RAID controller receives a physical disk transparent transmission command SQE, reads an operation code in DW0 of the physical disk transparent transmission command, and judges that the operation code is a physical disk transparent transmission command;
4. reading DW2 in the transparent transmission command of the physical disk by the RAID controller, acquiring an ID of the physical disk, and judging that the target physical disk is an SAS disk according to the ID;
5. the RAID controller constructs a physical disk command SQE and sends the SQE to the SAS physical disk:
taking out CDB from DW 10-DW 13 of the transparent transmission command SQE, filling the CDB into an SAS controller, if a data transmission stage exists, taking out PRP data structure from DW 6-DW 9 of the transparent transmission command SQE, and constructing an SAS data buffer descriptor structure according to the requirements of the SAS controller;
6. and operating the SAS controller and sending the physical disk command SQE to the SAS disk. If the data transmission stage exists, the SAS controller completes data transfer between the host data buffer area and the disk;
7. the RAID controller constructs a transparent transmission command CQE and returns the command CQE to the host:
and filling the command execution state returned by the SAS controller into the state in the DW3 in the pass-through command CQE, filling the data into the DW0 in the pass-through command CQE if the SAS controller returns detailed state data, and copying the state information bit in the DW3 in the returned physical disk CQE to the corresponding position in the pass-through command CQE.
In a second aspect of the present invention, a system 200 for physical disk management under a RAID controller is also provided. FIG. 10 illustrates a schematic block diagram of an embodiment of a system 200 for physical disk management under a RAID controller in accordance with the present invention. As shown in fig. 10, the system includes:
a transparent transmission command SQE construction module 210 configured to construct a physical disk transparent transmission command SQE;
the transparent transmission command SQE sending module 220 is configured to send the physical disk transparent transmission command SQE to the RAID controller;
a command confirmation module 230 configured to read a passthrough command operation code in DW0 in the received physical disk passthrough command SQE to confirm that the physical disk passthrough command SQE is a physical disk passthrough command;
a physical disk type confirmation module 240 configured to read DW2 in the physical disk transparent transfer command SQE and obtain a physical disk ID to determine the type of the target physical disk;
a physical disk command SQE construction module 250 configured to construct a physical disk command SQE based on the type of target physical disk;
a physical disk command SQE processing module 260 configured to send a physical disk command SQE to the target physical disk and wait for the target physical disk to return a physical disk CQE; and
and the transparent transmission command CQE processing module 270 is configured to construct a transparent transmission command CQE based on the physical disk CQE and return the transparent transmission command CQE.
In a third aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, and fig. 11 is a schematic diagram of a computer-readable storage medium illustrating a method for physical disk management under a RAID controller according to an embodiment of the present invention. As shown in fig. 11, the computer-readable storage medium 300 stores computer program instructions 310, the computer program instructions 310 being executable by a processor. The computer program instructions 310 when executed implement the method of any of the embodiments described above.
It should be understood that all of the embodiments, features and advantages set forth above with respect to the method for physical disk management under a RAID controller according to the present invention are equally applicable, without conflict with one another, to the system and storage medium for physical disk management under a RAID controller according to the present invention.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer device 400, comprising a memory 420 and a processor 410, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the method of any one of the above embodiments.
Fig. 12 is a schematic hardware configuration diagram of an embodiment of a computer apparatus for executing a method for managing physical disks under a RAID controller according to the present invention. Taking the computer device 400 shown in fig. 12 as an example, the computer device includes a processor 410 and a memory 420, and may further include: an input device 430 and an output device 440. The processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means, such as the bus connection in fig. 6. Input device 430 may receive input numeric or character information and generate signal inputs related to physical disk management under the RAID controller. The output device 440 may include a display device such as a display screen.
The memory 420 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the resource monitoring method in the embodiment of the present application. The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of the resource monitoring method, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 420 may optionally include memory located remotely from processor 410, which may be connected to local modules over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 410 executes various functional applications of the server and data processing by executing nonvolatile software programs, instructions and modules stored in the memory 420, that is, implements the resource monitoring method of the above-described method embodiment.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile 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), which can act as external cache memory. By way of example and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for managing physical disks under a RAID controller is characterized by comprising the following steps:
constructing a physical disk transparent transmission command SQE;
sending the SQE to the RAID controller;
reading a transparent transmission command operation code in DW0 in the received physical disk transparent transmission command SQE to confirm that the physical disk transparent transmission command SQE is a physical disk transparent transmission command;
reading DW2 in the physical disk transparent transmission command SQE, and acquiring a physical disk ID to determine the type of a target physical disk;
constructing a physical disk command SQE based on the type of the target physical disk;
sending the SQE to the target physical disk and waiting for the target physical disk to return to a physical disk CQE; and
and constructing a pass-through command CQE based on the physical disk CQE, and returning the pass-through command CQE.
2. The method according to claim 1, wherein the constructing the SQE comprises the steps of:
filling the transparent transmission command operation code and the host command identifier into DW0 in the SQE;
respectively filling the physical disk ID and the operation code of the transparent transmission command in the transparent transmission command into DW2 and DW3 of the physical disk transparent transmission command SQE; and
and copying the contents of other fields in the transparent transmission command to corresponding fields of the SQE.
3. The method of claim 2, wherein the constructing the physical disk command SQE comprises the steps of:
filling the unvarnished command operation code in DW3 of the physical disk unvarnished command SQE into DW0 of the physical disk command SQE;
regenerating a new physical disk command identifier and populating DW0 of the physical disk SQE; and
and copying the contents of other fields in the SQE to corresponding positions in the SQE.
4. The method of claim 3, wherein the constructing the pass-through command CQE comprises the steps of:
filling the host command identifier in DW0 of the physical disk transparent transmission command SQE into DW3 of the transparent transmission command CQE;
copying DW0 and DW1 in the physical disk CQE returned by the target physical disk to corresponding positions in the transparent transmission command CQE; and
and copying the state information bit in the DW3 in the physical disk CQE returned by the target physical disk to the corresponding position in the transparent transmission command CQE.
5. The method of claim 1, wherein the constructing the physical disk pass-through command SQE comprises the steps of:
filling the transparent transmission command operation code and the host command identifier into DW0 in the SQE;
respectively filling the physical disk ID and the operation code of the transparent transmission command in the transparent transmission command into DW2 and DW3 of the physical disk transparent transmission command SQE; and
filling FIS frames in the transparent transmission commands into the physical disk transparent transmission commands SQE DW10 to DW14 or filling CDB frames in the transparent transmission commands into the physical disk transparent transmission commands SQE DW10 to DW13;
and when a data transmission stage exists in the command to be transparently transmitted, constructing a PRP data structure according to the NVMe standard and filling DW 6-DW 9 fields of the SQE.
6. The method of claim 5,
upon determining that the type of the target physical disk is a SATA disk, constructing a physical disk command SQE includes taking FISs from DWs 10-14 of the physical disk pass-through command SQE and populating SATA controllers in the target physical disk, or
Upon determining that the type of the target physical disk is a SAS disk, constructing a physical disk command SQE includes a SAS controller that fetches CDB from DW10 through DW13 of the physical disk pass-through command SQE and fills in the target physical disk.
7. The method of claim 6, wherein constructing the physical disk command SQE further comprises the steps of:
and taking out the PRP data structure from DW6 to DW9 of the physical disk transparent transmission command SQE, and constructing a SATA data buffer descriptor structure according to the requirement of the SATA controller or constructing a SAS data buffer descriptor structure according to the requirement of the SAS controller.
8. The method of claim 6, further comprising:
after the target physical disk receives the physical disk command SQE, operating the SATA controller or the SAS controller to send the physical disk command SQE to the target physical disk; and
and when a data transmission stage exists in the command to be transparently transmitted, the SATA controller or the SAS controller completes data transfer between the data buffer area of the host and the target physical disk.
9. The method of claim 6, wherein the constructing a pass-through command CQE comprises the steps of:
filling the command execution state in the physical disk CQE returned by the SATA controller or the SAS controller into the state in the DW3 in the transparent transmission command CQE;
filling the returned state data in the physical disk CQE into DW0 of the transparent transmission command CQE; and
and copying the returned state information bit in the DW3 in the physical disk CQE to the corresponding position in the transparent transmission command CQE.
10. A system for physical disk management under a RAID controller, comprising:
a transparent transmission command SQE construction module configured to construct a physical disk transparent transmission command SQE;
the transparent transmission command SQE sending module is configured to send the physical disk transparent transmission command SQE to the RAID controller;
a command confirmation module, configured to read a passthrough command operation code in DW0 in the received physical disk passthrough command SQE to confirm that the physical disk passthrough command SQE is a physical disk passthrough command;
a physical disk type confirmation module, configured to read DW2 in the physical disk transparent transmission command SQE, and obtain a physical disk ID to determine a type of a target physical disk;
a physical disk command SQE construction module configured to construct a physical disk command SQE by the construction module based on the type of the target physical disk;
a physical disk command SQE processing module configured to send the physical disk command SQE to the target physical disk and wait for the target physical disk to return to a physical disk CQE; and
and the transparent transmission command CQE processing module is configured to construct a transparent transmission command CQE based on the physical disk CQE and return the transparent transmission command CQE.
CN202210906226.2A 2022-07-29 2022-07-29 Method and system for managing physical disk under RAID controller Pending CN115145492A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210906226.2A CN115145492A (en) 2022-07-29 2022-07-29 Method and system for managing physical disk under RAID controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210906226.2A CN115145492A (en) 2022-07-29 2022-07-29 Method and system for managing physical disk under RAID controller

Publications (1)

Publication Number Publication Date
CN115145492A true CN115145492A (en) 2022-10-04

Family

ID=83415089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210906226.2A Pending CN115145492A (en) 2022-07-29 2022-07-29 Method and system for managing physical disk under RAID controller

Country Status (1)

Country Link
CN (1) CN115145492A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599309A (en) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) NVMe disk array data processing method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599309A (en) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) NVMe disk array data processing method, device, equipment and storage medium
CN115599309B (en) * 2022-11-30 2023-02-24 苏州浪潮智能科技有限公司 NVMe disk array data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11275530B2 (en) Method, system, and related device for NAS data access
US20190163364A1 (en) System and method for tcp offload for nvme over tcp-ip
CN111930676B (en) Method, device, system and storage medium for communication among multiple processors
EP3660686B1 (en) Method and device for transmitting data processing request
EP3678026A1 (en) Data check method, device and network card
CN114388040B (en) Method for notifying progress and capturing programmable atomic operation
US11403023B2 (en) Method of organizing a programmable atomic unit instruction memory
CN115145492A (en) Method and system for managing physical disk under RAID controller
CN110781107B (en) Low-delay fusion IO control method and device based on DRAM interface
CN113794764A (en) Request processing method and medium for server cluster and electronic device
JP2009502072A (en) FlexRay communication module, FlexRay communication control device, and method for transmitting a message between a FlexRay communication connection and a FlexRay subscriber device
CN110870286B (en) Fault tolerance processing method and device and server
CN112463067A (en) Data protection method and equipment in NVMe-oF scene
US8645586B2 (en) SCSI reservation status information on a SAN disk
US11698791B2 (en) On-demand programmable atomic kernel loading
US11734173B2 (en) Memory access bounds checking for a programmable atomic operator
US8315269B1 (en) Device, method, and protocol for data transfer between host device and device having storage interface
CN116166198A (en) Data transmission method, device, system and storage medium
WO2014077451A1 (en) Network distributed file system and method using iscsi storage system
JP7363344B2 (en) Memory control device and control method
US20230052076A1 (en) Systems, methods, and apparatus for associating computational device functions with compute engines
EP3999972B1 (en) An apparatus and method for processing flush requests within a packet network
CN116701084A (en) Bus protocol verification method, device, equipment, storage medium and program product
CN115827212A (en) Data processing method, device and system
CN115914332A (en) TCP connection establishing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination