技术领域Technical Field
本申请涉及计算机技术领域,特别涉及一种RAID卡管理系统、方法、设备、产品及介质。The present application relates to the field of computer technology, and in particular to a RAID card management system, method, device, product and medium.
背景技术Background technique
在SCSI(Small Computer System Interface,一种连接计算机及其外围IO设备的接口标准)系统中,一般可以查询硬盘信息、扩展卡地址、RAID(Redundant Arrays ofIndependent Disks,独立冗余磁盘阵列)卡等信息,但SCSI系统不支持RAID卡的管理配置。RAID卡用于向硬盘发送读写指令,必须配备相应的配置管理;否则,在RAID卡出现故障时,将难以准确诊断RAID卡问题所在。In the SCSI (Small Computer System Interface, an interface standard for connecting computers and their peripheral IO devices) system, you can generally query hard disk information, expansion card addresses, RAID (Redundant Arrays of Independent Disks) card information, but the SCSI system does not support the management and configuration of RAID cards. RAID cards are used to send read and write instructions to hard disks, and must be equipped with corresponding configuration management; otherwise, when a RAID card fails, it will be difficult to accurately diagnose the problem with the RAID card.
因此,如何对RAID卡进行管理,是本领域技术人员需要解决的问题。Therefore, how to manage the RAID card is a problem that those skilled in the art need to solve.
发明内容Summary of the invention
有鉴于此,本申请的目的在于提供一种RAID卡管理系统、方法、设备、产品及介质,以对RAID卡进行管理。其具体方案如下:In view of this, the purpose of this application is to provide a RAID card management system, method, device, product and medium to manage RAID cards. The specific scheme is as follows:
第一方面,本申请提供了一种RAID卡管理系统,包括:读写接口模块、RAID卡管理模块、与所述读写接口模块和所述RAID卡管理模块连接的RAID卡驱动、以及与所述RAID卡驱动连接的RAID卡;In a first aspect, the present application provides a RAID card management system, including: a read-write interface module, a RAID card management module, a RAID card driver connected to the read-write interface module and the RAID card management module, and a RAID card connected to the RAID card driver;
所述读写接口模块和所述RAID卡驱动通过第一通信通道连接,所述RAID卡管理模块和所述RAID卡驱动通过第二通信通道连接;The read/write interface module and the RAID card driver are connected via a first communication channel, and the RAID card management module and the RAID card driver are connected via a second communication channel;
所述读写接口模块,用于通过所述第一通信通道和第一协议传输读写命令至所述RAID卡驱动,以使所述RAID卡驱动根据所述读写命令对所述RAID卡进行相应读写操作;The read/write interface module is used to transmit read/write commands to the RAID card driver through the first communication channel and the first protocol, so that the RAID card driver performs corresponding read/write operations on the RAID card according to the read/write commands;
所述RAID卡管理模块,用于通过所述第二通信通道和第二协议传输管理命令至所述RAID卡驱动,以使所述RAID卡驱动根据所述管理命令对所述RAID卡进行相应管理操作。The RAID card management module is used to transmit management commands to the RAID card driver through the second communication channel and the second protocol, so that the RAID card driver performs corresponding management operations on the RAID card according to the management commands.
另一方面,所述RAID卡管理模块具体用于:On the other hand, the RAID card management module is specifically used for:
获取所述管理命令;Obtaining the management command;
将所述管理命令传输至所述RAID卡驱动;Transmitting the management command to the RAID card driver;
相应地,所述RAID卡驱动用于:Accordingly, the RAID card driver is used to:
按照所述第二协议封装所述管理命令,得到封装后管理命令;encapsulate the management command according to the second protocol to obtain an encapsulated management command;
将所述封装后管理命令暂存至预设的命令管理缓存池;Temporarily storing the encapsulated management command in a preset command management buffer pool;
若满足命令发送条件,则在所述命令管理缓存池中查询所述封装后管理命令,并将查询到的所述封装后管理命令发送至所述RAID卡。If the command sending condition is met, the command management buffer pool is queried for the encapsulated management command, and the queried encapsulated management command is sent to the RAID card.
另一方面,所述RAID卡驱动具体用于:On the other hand, the RAID card driver is specifically used for:
判断所述命令管理缓存池中是否存在未处理的命令;Determine whether there is an unprocessed command in the command management buffer pool;
若存在,则执行在所述命令管理缓存池中查询所述封装后管理命令,并将查询到的所述封装后管理命令发送至所述RAID卡的步骤。If so, the step of querying the command management buffer pool for the encapsulated management command and sending the queried encapsulated management command to the RAID card is performed.
另一方面,所述RAID卡驱动用于:On the other hand, the RAID card driver is used for:
将查询到的所述封装后管理命令以DMA方式发送至所述RAID卡。The queried encapsulated management command is sent to the RAID card in DMA mode.
另一方面,所述RAID卡驱动用于:On the other hand, the RAID card driver is used for:
为所述管理命令分配命令标识信息和用户编号;Allocating command identification information and a user number to the management command;
按照所述第二协议封装所述管理命令、所述命令标识信息和所述用户编号,得到所述封装后管理命令;所述封装后管理命令还包括:功能码、帧长度、帧偏移地址、预留字段和负载数据。The management command, the command identification information and the user number are encapsulated according to the second protocol to obtain the encapsulated management command; the encapsulated management command also includes: a function code, a frame length, a frame offset address, a reserved field and load data.
另一方面,所述RAID卡驱动用于:On the other hand, the RAID card driver is used for:
创建所述封装后管理命令的命令描述符;Creating a command descriptor for the encapsulated management command;
将所述命令描述符写入所述RAID卡中的寄存器;Writing the command descriptor into a register in the RAID card;
相应地,所述RAID卡用于:Accordingly, the RAID card is used for:
从所述寄存器读取所述命令描述符;Reading the command descriptor from the register;
根据所述命令描述符查询并处理所述封装后管理命令。The encapsulated management command is queried and processed according to the command descriptor.
另一方面,所述RAID卡用于:On the other hand, the RAID card is used for:
发送所述封装后管理命令的响应消息至所述RAID卡驱动,并创建所述响应消息的响应描述符;Sending a response message of the encapsulated management command to the RAID card driver, and creating a response descriptor of the response message;
将所述响应描述符写入所述RAID卡驱动的回复队列;Writing the response descriptor into the reply queue of the RAID card driver;
相应地,所述RAID卡驱动用于:Accordingly, the RAID card driver is used to:
从所述回复队列读取所述响应描述符;reading the response descriptor from the reply queue;
根据所述响应描述符查询并处理所述响应消息。The response message is queried and processed according to the response descriptor.
另一方面,所述RAID卡用于:On the other hand, the RAID card is used for:
以DMA方式发送所述封装后管理命令的响应消息至所述RAID卡驱动。The response message of the encapsulated management command is sent to the RAID card driver in DMA mode.
另一方面,所述RAID卡驱动用于:On the other hand, the RAID card driver is used for:
将所述响应消息暂存至预设的响应管理缓存池;Temporarily storing the response message in a preset response management buffer pool;
若满足响应处理条件,则根据所述响应描述符在所述响应管理缓存池中查询所述响应消息,并将查询到的所述响应消息通过所述第二通信通道以DMA方式发送至所述RAID卡管理模块;If the response processing condition is met, query the response message in the response management buffer pool according to the response descriptor, and send the queried response message to the RAID card management module through the second communication channel in DMA mode;
相应地,所述RAID卡管理模块用于:Accordingly, the RAID card management module is used for:
若所述响应消息为成功响应消息,则根据所述响应消息中的用户编号,将所述响应消息发送至相应用户端。If the response message is a successful response message, the response message is sent to the corresponding user terminal according to the user ID in the response message.
另一方面,所述RAID卡驱动具体用于:On the other hand, the RAID card driver is specifically used for:
若所述响应消息响应超时或未接收到所述响应消息,则重启所述响应消息的发送设备;所述发送设备为所述RAID卡、所述RAID卡连接的扩展芯片和/或所述扩展芯片连接的硬盘。If the response message times out or the response message is not received, the sending device of the response message is restarted; the sending device is the RAID card, the expansion chip connected to the RAID card and/or the hard disk connected to the expansion chip.
另一方面,所述RAID卡用于:On the other hand, the RAID card is used for:
若所述响应消息为失败响应消息,则从无应答队列获取系统应答消息帧地址;If the response message is a failure response message, obtaining the system response message frame address from the no response queue;
以DMA方式将所述响应消息写入所述系统应答消息帧地址;Writing the response message into the system response message frame address in DMA mode;
将所述系统应答消息帧地址写入所述响应描述符。The system response message frame address is written into the response descriptor.
另一方面,所述管理命令用于设置所述RAID卡的运行状态、使能所述RAID卡的端口、下载固件、模拟读写命令、模拟任务管理命令、配置所述RAID卡的参数和查询所述RAID卡的参数。On the other hand, the management command is used to set the operating state of the RAID card, enable the port of the RAID card, download firmware, simulate read and write commands, simulate task management commands, configure the parameters of the RAID card and query the parameters of the RAID card.
另一方面,所述RAID卡连接有至少一个扩展芯片,所述至少一个扩展芯片连接有至少一个硬盘。On the other hand, the RAID card is connected to at least one expansion chip, and the at least one expansion chip is connected to at least one hard disk.
另一方面,本申请提供了一种RAID卡管理方法,应用于上述任一项所述的系统,包括:On the other hand, the present application provides a RAID card management method, applied to any of the above-mentioned systems, including:
通过第一通信通道和第一协议使所述系统中的读写接口模块传输读写命令至所述系统中的RAID卡驱动,以使所述RAID卡驱动根据所述读写命令对所述系统中的RAID卡进行相应读写操作;所述读写接口模块和所述RAID卡驱动通过所述第一通信通道连接;The read/write interface module in the system transmits a read/write command to a RAID card driver in the system through a first communication channel and a first protocol, so that the RAID card driver performs corresponding read/write operations on the RAID card in the system according to the read/write command; the read/write interface module and the RAID card driver are connected through the first communication channel;
通过第二通信通道和第二协议使所述系统中的RAID卡管理模块传输管理命令至所述RAID卡驱动,以使所述RAID卡驱动根据所述管理命令对所述RAID卡进行相应管理操作;所述RAID卡管理模块和所述RAID卡驱动通过所述第二通信通道连接。Through the second communication channel and the second protocol, the RAID card management module in the system transmits management commands to the RAID card driver, so that the RAID card driver performs corresponding management operations on the RAID card according to the management commands; the RAID card management module and the RAID card driver are connected through the second communication channel.
另一方面,本申请提供了一种电子设备,包括:On the other hand, the present application provides an electronic device, including:
存储器,用于存储计算机程序;Memory for storing computer programs;
处理器,用于执行所述计算机程序,以实现前述公开的RAID卡管理方法。The processor is used to execute the computer program to implement the aforementioned disclosed RAID card management method.
另一方面,本申请提供了一种非易失性存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述公开的RAID卡管理方法。On the other hand, the present application provides a non-volatile storage medium for storing a computer program, wherein the computer program implements the aforementioned disclosed RAID card management method when executed by a processor.
另一方面,本申请提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现前述公开的RAID卡管理方法的步骤。On the other hand, the present application provides a computer program product, including a computer program/instruction, which implements the steps of the aforementioned disclosed RAID card management method when executed by a processor.
可见,本申请的有益效果为:读写接口模块和RAID卡管理模块分别有自己独立的通信通道,即:第一通信通道和第二通信通道,第一通信通道以第一协议传输读写命令给RAID卡驱动,而第二通信通道以第二协议传输管理命令给RAID卡驱动,由此实现了读写操作和管理操作的独立传输;并且,读写接口模块和RAID卡管理模块共用RAID卡驱动至RAID卡的PCIe通道,在不增加硬件复杂性的前提下,实现了RAID卡的有效管理。It can be seen that the beneficial effects of the present application are: the read-write interface module and the RAID card management module each have their own independent communication channels, namely: a first communication channel and a second communication channel, the first communication channel transmits read-write commands to the RAID card driver using a first protocol, and the second communication channel transmits management commands to the RAID card driver using a second protocol, thereby realizing independent transmission of read-write operations and management operations; and, the read-write interface module and the RAID card management module share the PCIe channel from the RAID card driver to the RAID card, thereby realizing effective management of the RAID card without increasing the complexity of the hardware.
相应地,本申请提供的一种RAID卡管理方法、设备、计算机程序产品及非易失性存储介质,也同样具有上述技术效果。Correspondingly, a RAID card management method, device, computer program product and non-volatile storage medium provided by the present application also have the above-mentioned technical effects.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
图1为本申请公开的一种RAID卡管理系统示意图;FIG1 is a schematic diagram of a RAID card management system disclosed in the present application;
图2为本申请公开的另一种RAID卡管理系统示意图;FIG2 is a schematic diagram of another RAID card management system disclosed in the present application;
图3为本申请公开的一种RAID卡管理流程图;FIG3 is a RAID card management flow chart disclosed in the present application;
图4为本申请公开的一种电子设备示意图;FIG4 is a schematic diagram of an electronic device disclosed in the present application;
图5为本申请提供的一种服务器结构图;FIG5 is a server structure diagram provided by the present application;
图6为本申请提供的一种终端结构图。FIG6 is a diagram of a terminal structure provided by the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other examples obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
目前,SCSI系统中可以查询硬盘信息、扩展卡地址、RAID卡等信息,但SCSI系统不支持RAID卡的管理配置。RAID卡用于向硬盘发送读写指令,必须配备相应的配置管理;否则,在RAID卡出现故障时,将难以准确诊断RAID卡问题所在。为此,本申请提供了一种RAID卡管理方案,能够在不增加硬件复杂性的前提下,实现了RAID卡的有效管理和配置。At present, the SCSI system can query hard disk information, expansion card address, RAID card and other information, but the SCSI system does not support the management and configuration of RAID cards. RAID cards are used to send read and write instructions to hard disks, and must be equipped with corresponding configuration management; otherwise, when a RAID card fails, it will be difficult to accurately diagnose the problem of the RAID card. To this end, the present application provides a RAID card management solution that can achieve effective management and configuration of RAID cards without increasing hardware complexity.
参见图1所示,本申请实施例公开了一种RAID卡管理系统,包括:读写接口模块、RAID卡管理模块、与读写接口模块和RAID卡管理模块连接的RAID卡驱动、以及与RAID卡驱动连接的RAID卡。RAID卡驱动与RAID卡之间的通信通道为PCIe(Peripheral ComponentInterconnect Express,一种高速串行通信互联标准)通道。As shown in FIG1 , the embodiment of the present application discloses a RAID card management system, including: a read-write interface module, a RAID card management module, a RAID card driver connected to the read-write interface module and the RAID card management module, and a RAID card connected to the RAID card driver. The communication channel between the RAID card driver and the RAID card is a PCIe (Peripheral Component Interconnect Express, a high-speed serial communication interconnection standard) channel.
其中,读写接口模块和RAID卡驱动通过第一通信通道连接,RAID卡管理模块和RAID卡驱动通过第二通信通道连接。The read/write interface module and the RAID card driver are connected via a first communication channel, and the RAID card management module and the RAID card driver are connected via a second communication channel.
其中,读写接口模块,用于通过第一通信通道和第一协议传输读写命令至RAID卡驱动,以使RAID卡驱动根据读写命令对RAID卡进行相应读写操作。The read/write interface module is used to transmit the read/write command to the RAID card driver through the first communication channel and the first protocol, so that the RAID card driver performs corresponding read/write operations on the RAID card according to the read/write command.
RAID卡管理模块,用于通过第二通信通道和第二协议传输管理命令至RAID卡驱动,以使RAID卡驱动根据管理命令对RAID卡进行相应管理操作。管理命令用于设置RAID卡的运行状态、使能RAID卡的端口、下载固件、模拟读写命令、模拟任务管理命令、配置RAID卡的参数和查询RAID卡的参数。具体可参见表1。The RAID card management module is used to transmit management commands to the RAID card driver through the second communication channel and the second protocol, so that the RAID card driver performs corresponding management operations on the RAID card according to the management commands. The management commands are used to set the operating status of the RAID card, enable the port of the RAID card, download firmware, simulate read and write commands, simulate task management commands, configure the parameters of the RAID card, and query the parameters of the RAID card. For details, please refer to Table 1.
表1Table 1
其中,设置RAID卡的运行状态记为:IOC_INIT;使能芯片端口记为:PORT_ENABLE;下载固件记为:FW_DOWNLOAD;模拟下发SCSI的IO命令记为:SCSI_IO_REQUEST;模拟下发任务管理命令记为:SCSI_TASK_MGMT;配置芯片参数记为:CONFIG;查询芯片参数记为:IOC_FACTS。Among them, setting the running status of the RAID card is recorded as: IOC_INIT; enabling the chip port is recorded as: PORT_ENABLE; downloading the firmware is recorded as: FW_DOWNLOAD; simulating the sending of SCSI IO commands is recorded as: SCSI_IO_REQUEST; simulating the sending of task management commands is recorded as: SCSI_TASK_MGMT; configuring chip parameters is recorded as: CONFIG; querying chip parameters is recorded as: IOC_FACTS.
在本实施例中,通过第二通信通道和第二协议传输管理命令至RAID卡驱动的过程包括:RAID卡管理模块获取管理命令;将管理命令传输至RAID卡驱动;相应地,RAID卡驱动按照第二协议封装管理命令,得到封装后管理命令;将封装后管理命令暂存至预设的命令管理缓存池;若满足命令发送条件,则在命令管理缓存池中查询封装后管理命令,并将查询到的封装后管理命令发送至RAID卡。In this embodiment, the process of transmitting a management command to a RAID card driver through a second communication channel and a second protocol includes: the RAID card management module obtains a management command; the management command is transmitted to the RAID card driver; accordingly, the RAID card driver encapsulates the management command according to the second protocol to obtain an encapsulated management command; the encapsulated management command is temporarily stored in a preset command management buffer pool; if the command sending condition is met, the encapsulated management command is queried in the command management buffer pool, and the queried encapsulated management command is sent to the RAID card.
其中,是否满足命令发送条件具体为:判断命令管理缓存池中是否存在未处理的命令。相应地,RAID卡驱动具体用于:判断命令管理缓存池中是否存在未处理的命令;若存在,则执行在命令管理缓存池中查询封装后管理命令,并将查询到的封装后管理命令发送至RAID卡的步骤。Whether the command sending condition is met is specifically: judging whether there are unprocessed commands in the command management buffer pool. Accordingly, the RAID card driver is specifically used to: judge whether there are unprocessed commands in the command management buffer pool; if there are, perform the steps of querying the encapsulated management command in the command management buffer pool, and sending the queried encapsulated management command to the RAID card.
在一种实施方式中,RAID卡驱动将查询到的封装后管理命令以DMA方式发送至RAID卡。也就是说:管理命令本身以DMA方式实现快速传输。In one implementation, the RAID card driver sends the queried packaged management command to the RAID card in DMA mode, that is, the management command itself is quickly transmitted in DMA mode.
在一种实施方式中,RAID卡驱动用于:为管理命令分配命令标识信息和用户编号;按照第二协议封装管理命令、命令标识信息和用户编号,得到封装后管理命令;封装后管理命令还包括:功能码、帧长度、帧偏移地址、预留字段和负载数据。第二协议可以为私有协议,在一种示例中,第二协议对于管理命令的帧格式定义可参照表2,对于响应消息的帧格式定义可参照表3。In one embodiment, the RAID card driver is used to: assign command identification information and a user number to the management command; encapsulate the management command, the command identification information and the user number according to the second protocol to obtain the encapsulated management command; the encapsulated management command also includes: a function code, a frame length, a frame offset address, a reserved field and load data. The second protocol can be a private protocol. In one example, the second protocol can refer to Table 2 for the frame format definition of the management command, and can refer to Table 3 for the frame format definition of the response message.
表2Table 2
表3table 3
需要说明的是,芯片状态为RAID卡的IOC的状态。封装后管理命令对应有相应的命令描述符。在一种实施方式中,RAID卡驱动用于:创建封装后管理命令的命令描述符;将命令描述符写入RAID卡中的寄存器;相应地,RAID卡用于:从寄存器读取命令描述符;根据命令描述符查询并处理封装后管理命令。It should be noted that the chip status is the status of the IOC of the RAID card. The post-encapsulation management command corresponds to a corresponding command descriptor. In one embodiment, the RAID card driver is used to: create a command descriptor for the post-encapsulation management command; write the command descriptor to the register in the RAID card; accordingly, the RAID card is used to: read the command descriptor from the register; query and process the post-encapsulation management command according to the command descriptor.
为了加快数据传输效率,本实施例中的RAID卡与RAID卡驱动通过DMA方式或RDMA方式进行数据交换。在一种实施方式中,RAID卡用于:发送封装后管理命令的响应消息至RAID卡驱动,并创建响应消息的响应描述符;将响应描述符写入RAID卡驱动的回复队列;相应地,RAID卡驱动用于:从回复队列读取响应描述符;根据响应描述符查询并处理响应消息。其中,RAID卡用于:以DMA方式发送封装后管理命令的响应消息至RAID卡驱动。In order to speed up data transmission efficiency, the RAID card in this embodiment exchanges data with the RAID card driver via DMA or RDMA. In one embodiment, the RAID card is used to: send a response message of the encapsulated management command to the RAID card driver, and create a response descriptor of the response message; write the response descriptor to the reply queue of the RAID card driver; accordingly, the RAID card driver is used to: read the response descriptor from the reply queue; query and process the response message according to the response descriptor. Among them, the RAID card is used to: send the response message of the encapsulated management command to the RAID card driver via DMA.
在一种实施方式中,RAID卡驱动用于:将响应消息暂存至预设的响应管理缓存池;若满足响应处理条件,则根据响应描述符在响应管理缓存池中查询响应消息,并将查询到的响应消息通过第二通信通道以DMA方式发送至RAID卡管理模块;相应地,RAID卡管理模块用于:若响应消息为成功响应消息,则根据响应消息中的用户编号,将响应消息发送至相应用户端。In one embodiment, the RAID card driver is used to: temporarily store the response message in a preset response management buffer pool; if the response processing conditions are met, query the response message in the response management buffer pool according to the response descriptor, and send the queried response message to the RAID card management module through the second communication channel in DMA mode; accordingly, the RAID card management module is used to: if the response message is a successful response message, send the response message to the corresponding user end according to the user number in the response message.
相应地,RAID卡驱动在确定响应消息响应超时或未接收到响应消息时,重启响应消息的发送设备;在一种示例中,发送设备为RAID卡、RAID卡连接的扩展芯片和/或扩展芯片连接的硬盘。Accordingly, when the RAID card driver determines that the response message has timed out or has not received the response message, it restarts the device sending the response message; in one example, the sending device is a RAID card, an expansion chip connected to the RAID card, and/or a hard disk connected to the expansion chip.
在一种实施方式中,RAID卡用于:若响应消息为失败响应消息,则从无应答队列获取系统应答消息帧地址;以DMA方式将响应消息写入系统应答消息帧地址;将系统应答消息帧地址写入响应描述符。In one embodiment, the RAID card is used to: if the response message is a failure response message, obtain the system response message frame address from the no response queue; write the response message to the system response message frame address in DMA mode; write the system response message frame address into the response descriptor.
在一种实施方式中,RAID卡连接有至少一个扩展芯片,至少一个扩展芯片连接有至少一个硬盘。In one implementation, the RAID card is connected to at least one expansion chip, and the at least one expansion chip is connected to at least one hard disk.
可见,本实施例中,读写接口模块和RAID卡管理模块分别有自己独立的通信通道,即:第一通信通道和第二通信通道,第一通信通道以第一协议传输读写命令给RAID卡驱动,而第二通信通道以第二协议传输管理命令给RAID卡驱动,由此实现了读写操作和管理操作的独立传输;并且,读写接口模块和RAID卡管理模块共用RAID卡驱动至RAID卡的PCIe通道,在不增加硬件复杂性的前提下,实现了RAID卡的有效管理。It can be seen that in this embodiment, the read-write interface module and the RAID card management module each have their own independent communication channels, namely: a first communication channel and a second communication channel. The first communication channel transmits read-write commands to the RAID card driver using a first protocol, while the second communication channel transmits management commands to the RAID card driver using a second protocol, thereby realizing independent transmission of read-write operations and management operations; and, the read-write interface module and the RAID card management module share the PCIe channel from the RAID card driver to the RAID card, thereby realizing effective management of the RAID card without increasing the complexity of the hardware.
下面对本申请实施例提供的一种RAID卡管理方法进行介绍,下文描述的一种RAID卡管理方法与本文描述的其他实施例可以相互参照。A RAID card management method provided in an embodiment of the present application is introduced below. The RAID card management method described below can be referenced to other embodiments described in this document.
本申请提供了一种RAID卡管理方法,应用于上述实施例所述的RAID卡管理系统,该系统包括:读写接口模块、RAID卡管理模块、与读写接口模块和RAID卡管理模块连接的RAID卡驱动、以及与RAID卡驱动连接的RAID卡;读写接口模块和RAID卡驱动通过第一通信通道连接,RAID卡管理模块和RAID卡驱动通过第二通信通道连接。The present application provides a RAID card management method, which is applied to the RAID card management system described in the above embodiment, the system comprising: a read-write interface module, a RAID card management module, a RAID card driver connected to the read-write interface module and the RAID card management module, and a RAID card connected to the RAID card driver; the read-write interface module and the RAID card driver are connected via a first communication channel, and the RAID card management module and the RAID card driver are connected via a second communication channel.
具体的,本实施例提供的方法包括:通过第一通信通道和第一协议使读写接口模块传输读写命令至RAID卡驱动,以使RAID卡驱动根据读写命令对RAID卡进行相应读写操作;通过第二通信通道和第二协议使RAID卡管理模块传输管理命令至RAID卡驱动,以使RAID卡驱动根据管理命令对RAID卡进行相应管理操作。Specifically, the method provided in this embodiment includes: enabling the read-write interface module to transmit read-write commands to the RAID card driver through a first communication channel and a first protocol, so that the RAID card driver performs corresponding read-write operations on the RAID card according to the read-write commands; enabling the RAID card management module to transmit management commands to the RAID card driver through a second communication channel and a second protocol, so that the RAID card driver performs corresponding management operations on the RAID card according to the management commands.
在一种实施方式中,通过第二通信通道和第二协议使RAID卡管理模块传输管理命令至RAID卡驱动,以使RAID卡驱动根据管理命令对RAID卡进行相应管理操作,包括:RAID卡管理模块获取管理命令;将管理命令传输至RAID卡驱动;相应地,RAID卡驱动按照第二协议封装管理命令,得到封装后管理命令;将封装后管理命令暂存至预设的命令管理缓存池;若满足命令发送条件,则在命令管理缓存池中查询封装后管理命令,并将查询到的封装后管理命令通过第二通信通道发送至RAID卡。In one embodiment, a RAID card management module transmits a management command to a RAID card driver through a second communication channel and a second protocol, so that the RAID card driver performs corresponding management operations on the RAID card according to the management command, including: the RAID card management module obtains the management command; transmits the management command to the RAID card driver; accordingly, the RAID card driver encapsulates the management command according to the second protocol to obtain an encapsulated management command; temporarily stores the encapsulated management command in a preset command management buffer pool; if the command sending condition is met, the command management buffer pool is queried for the encapsulated management command, and the queried encapsulated management command is sent to the RAID card through the second communication channel.
在一种实施方式中,RAID卡驱动具体用于:判断命令管理缓存池中是否存在未处理的命令;若存在,则执行在命令管理缓存池中查询封装后管理命令,并将查询到的封装后管理命令通过第二通信通道发送至RAID卡的步骤。In one embodiment, the RAID card driver is specifically used to: determine whether there are unprocessed commands in the command management buffer pool; if so, execute the step of querying the encapsulated management command in the command management buffer pool, and sending the queried encapsulated management command to the RAID card through the second communication channel.
在一种实施方式中,RAID卡驱动用于:将查询到的封装后管理命令通过第二通信通道以DMA方式发送至RAID卡。In one implementation, the RAID card driver is used to send the queried post-encapsulation management command to the RAID card via the second communication channel in a DMA manner.
在一种实施方式中,RAID卡驱动用于:为管理命令分配命令标识信息和用户编号;按照第二协议封装管理命令、命令标识信息和用户编号,得到封装后管理命令;封装后管理命令还包括:功能码、帧长度、帧偏移地址、预留字段和负载数据。In one embodiment, the RAID card driver is used to: assign command identification information and a user number to a management command; encapsulate the management command, the command identification information and the user number according to a second protocol to obtain an encapsulated management command; the encapsulated management command also includes: a function code, a frame length, a frame offset address, a reserved field and load data.
在一种实施方式中,RAID卡驱动用于:创建封装后管理命令的命令描述符;将命令描述符写入RAID卡中的寄存器;相应地,RAID卡用于:从寄存器读取命令描述符;根据命令描述符查询并处理封装后管理命令。In one implementation, the RAID card driver is used to: create a command descriptor for the encapsulated management command; write the command descriptor to a register in the RAID card; accordingly, the RAID card is used to: read the command descriptor from the register; query and process the encapsulated management command according to the command descriptor.
在一种实施方式中,RAID卡用于:发送封装后管理命令的响应消息至RAID卡驱动,并创建响应消息的响应描述符;将响应描述符写入RAID卡驱动的回复队列;相应地,RAID卡驱动用于:从回复队列读取响应描述符;根据响应描述符查询并处理响应消息。In one embodiment, the RAID card is used to: send a response message of the encapsulated management command to the RAID card driver, and create a response descriptor for the response message; write the response descriptor to a reply queue of the RAID card driver; accordingly, the RAID card driver is used to: read the response descriptor from the reply queue; query and process the response message according to the response descriptor.
在一种实施方式中,RAID卡用于:以DMA方式发送封装后管理命令的响应消息至RAID卡驱动。In one implementation, the RAID card is used to send a response message of the encapsulated management command to the RAID card driver in a DMA manner.
在一种实施方式中,RAID卡用于:将响应消息暂存至预设的响应管理缓存池;若满足响应处理条件,则根据响应描述符在响应管理缓存池中查询响应消息,并将查询到的响应消息通过第二通信通道以DMA方式发送至RAID卡管理模块;相应地,RAID卡管理模块用于:若响应消息为成功响应消息,则根据响应消息中的用户编号,将响应消息发送至相应用户端。In one embodiment, the RAID card is used to: temporarily store the response message in a preset response management buffer pool; if the response processing conditions are met, query the response message in the response management buffer pool according to the response descriptor, and send the queried response message to the RAID card management module through the second communication channel in DMA mode; accordingly, the RAID card management module is used to: if the response message is a successful response message, send the response message to the corresponding user end according to the user number in the response message.
在一种实施方式中,RAID卡驱动具体用于:若响应消息响应超时或未接收到响应消息,则重启响应消息的发送设备;发送设备为RAID卡、RAID卡连接的扩展芯片和/或扩展芯片连接的硬盘。In one embodiment, the RAID card driver is specifically used to: restart the sending device of the response message if the response message times out or no response message is received; the sending device is a RAID card, an expansion chip connected to the RAID card and/or a hard disk connected to the expansion chip.
在一种实施方式中,RAID卡用于:若响应消息为失败响应消息,则从无应答队列获取系统应答消息帧地址;以DMA方式将响应消息写入系统应答消息帧地址;将系统应答消息帧地址写入响应描述符。In one embodiment, the RAID card is used to: if the response message is a failure response message, obtain the system response message frame address from the no response queue; write the response message to the system response message frame address in DMA mode; write the system response message frame address into the response descriptor.
在一种实施方式中,管理命令用于设置RAID卡的运行状态、使能RAID卡的端口、下载固件、模拟读写命令、模拟任务管理命令、配置RAID卡的参数和查询RAID卡的参数。In one embodiment, the management command is used to set the operating status of the RAID card, enable the port of the RAID card, download firmware, simulate read and write commands, simulate task management commands, configure RAID card parameters, and query RAID card parameters.
在一种实施方式中,RAID卡连接有至少一个扩展芯片,至少一个扩展芯片连接有至少一个硬盘。In one implementation, the RAID card is connected to at least one expansion chip, and the at least one expansion chip is connected to at least one hard disk.
可见,本实施例中,读写接口模块和RAID卡管理模块分别有自己独立的通信通道,即:第一通信通道和第二通信通道,第一通信通道以第一协议传输读写命令给RAID卡驱动,而第二通信通道以第二协议传输管理命令给RAID卡驱动,由此实现了读写操作和管理操作的独立传输;并且,读写接口模块和RAID卡管理模块共用RAID卡驱动至RAID卡的PCIe通道,在不增加硬件复杂性的前提下,实现了RAID卡的有效管理。It can be seen that in this embodiment, the read-write interface module and the RAID card management module each have their own independent communication channels, namely: a first communication channel and a second communication channel. The first communication channel transmits read-write commands to the RAID card driver using a first protocol, while the second communication channel transmits management commands to the RAID card driver using a second protocol, thereby realizing independent transmission of read-write operations and management operations; and, the read-write interface module and the RAID card management module share the PCIe channel from the RAID card driver to the RAID card, thereby realizing effective management of the RAID card without increasing the complexity of the hardware.
请参见图2,在RAID卡驱动模块中构建RAID卡驱动时设立两条独立通道,分别处理SCSI命令和管理命令。其中一条通道专注于SCSI系统与RAID卡之间的IO命令交互,而另一条则专门用于管理模块与RAID卡之间的管理命令沟通。这种设计能够确保管理命令执行的清晰度和效率,优化了整体性能。Please refer to Figure 2. When building the RAID card driver in the RAID card driver module, two independent channels are set up to process SCSI commands and management commands respectively. One channel is dedicated to the IO command interaction between the SCSI system and the RAID card, while the other is dedicated to the management command communication between the management module and the RAID card. This design can ensure the clarity and efficiency of the management command execution and optimize the overall performance.
其中,管理模块可借此专用管理通道发送并接收管理信息。同时,明确用户所需查询与设置的RAID卡管理信息及其帧格式,最终实现高效的信息交互流程。The management module can use this dedicated management channel to send and receive management information. At the same time, it can clarify the RAID card management information and its frame format that the user needs to query and set, and finally realize an efficient information exchange process.
具体的,管理模块中实现的功能包括:Specifically, the functions implemented in the management module include:
(1)获取用户的管理命令请求。(1) Obtain the user's management command request.
(2)根据用户需求组织和RAID卡交互的帧格式,然后把组织完成的帧格式下发给RAID卡固件。(2) Organize the frame format for interaction with the RAID card according to user requirements, and then send the organized frame format to the RAID card firmware.
(3)调用RAID卡驱动提供的接口,把命令情况放到管理命令请求的内存缓存中。(3) Call the interface provided by the RAID card driver and put the command status into the memory cache of the management command request.
(4)等待RAID卡/IOC的命令返回信息,根据返回信息进行解析,回显给用户。IOC(IO Controller)为RAID卡芯片。(4) Wait for the command return information from the RAID card/IOC, parse the returned information, and display it back to the user. IOC (IO Controller) is the RAID card chip.
RAID卡驱动中实现的功能包括:The functions implemented in the RAID card driver include:
(1)创建管理模块请求命令的缓存池、命令返回的缓存池,管理模块接收到用户请求后,把请求命令放到命令请求的内存缓存池中,RAID卡/IOC返回的命令返回放到命令返回的缓存池。(1) Create a cache pool for management module request commands and a cache pool for command returns. After receiving a user request, the management module puts the request command into the memory cache pool for command requests and puts the command returned by the RAID card/IOC into the cache pool for command returns.
(2)为每个使用该通道的用户起一个ID;在多用户同时使用该通道进行数据交互的时候,可以通过用户ID判断是哪个用户下发命令。进而把返回的数据返回给对应的用户。(2) Give each user who uses the channel an ID; when multiple users use the channel to interact with data at the same time, the user ID can be used to determine which user issued the command. Then the returned data is returned to the corresponding user.
(3)判断缓存池中是否有请求命令,如果存在请求命令,把请求命令发送给RAID卡/IOC。(3) Determine whether there is a request command in the cache pool. If there is a request command, send the request command to the RAID card/IOC.
(4)接收RAID卡/IOC的发送来的命令返回信息,并把返回信息放内存缓存池中。(4) Receive the command return information sent by the RAID card/IOC and put the return information into the memory buffer pool.
(5)解析命令返回信息,根据用户ID,返回对应的用户。(5) Parse the command return information and return the corresponding user based on the user ID.
(6)专门开启一个线程由于检测交互命令超时,在用户把命令下发给RAID卡时候,RAID卡驱动需要记录下发的每条命令的时间,在检测命令错误线程中,检测命令是否在规定时间返回。(6) A special thread is opened to detect interactive command timeouts. When the user sends a command to the RAID card, the RAID card driver needs to record the time of each command sent. In the command error detection thread, it is checked whether the command returns within the specified time.
其中,如果指令正常返回,把指令从异常线程缓存中删除;如果指令超时返回,进行异常指令的修复;异常指令的修复策略:重启对应指令的设备(硬盘、扩展芯片等)。Among them, if the instruction returns normally, the instruction is deleted from the abnormal thread cache; if the instruction returns with a timeout, the abnormal instruction is repaired; the repair strategy for the abnormal instruction is: restart the device corresponding to the instruction (hard disk, expansion chip, etc.).
RAID卡/IOC中实现的功能包括:The functions implemented in the RAID card/IOC include:
(1)接收RAID卡驱动下发的指令,并且解析对应的指令。(1) Receive instructions from the RAID card driver and parse the corresponding instructions.
(2)根据接收的指令,返回对应的信息。(2) Return corresponding information according to the received instructions.
管理模块、RAID驱动和RAID卡/IOC之间的交互可参照图3,图3中的标号表示执行顺序。具体过程包括:The interaction between the management module, RAID driver and RAID card/IOC can be seen in Figure 3, where the numbers in Figure 3 represent the execution order. The specific process includes:
(1)RAID卡管理模块程序接收来自用户的请求。(1) The RAID card management module program receives requests from users.
(2)RAID卡驱动程序从其未使用的帧池中分配系统请求消息帧(具体分配命令的ID、用户的ID等),并构建指令帧内的请求消息(即负载)。(2) The RAID card driver allocates a system request message frame (specifically allocates the command ID, user ID, etc.) from its unused frame pool and constructs the request message (i.e., payload) within the command frame.
(3)RAID卡驱动程序创建指令帧请求描述符(请求的描述符)。描述符用于取真正的数据。(3) The RAID card driver creates a command frame request descriptor (request descriptor). The descriptor is used to retrieve the actual data.
(4)RAID卡驱动程序将请求描述符写入寄存器。其中,用户获得在I/O的持续时间内的系统请求消息帧的所有权。(4) The RAID card driver writes the request descriptor into the register, where the user obtains ownership of the system request message frame for the duration of the I/O.
(5)RAID卡/IOC主要的任务包括:(5) The main tasks of the RAID card/IOC include:
a、从请求描述符后队列中读取描述符。a. Read the descriptor from the queue after the request descriptor.
b、使用DMA将请求消息拉到本地消息帧。b. Use DMA to pull the request message to the local message frame.
(6)RAID卡/IOC根据DevHandle处理请求消息并将I/O发送到目标。(6) The RAID card/IOC processes the request message according to the DevHandle and sends the I/O to the target.
(7)RAID卡/IOC收到目标的答复。(7) The RAID card/IOC receives a response from the target.
(8)如果I/O状态为成功,RAID卡/IOC将写入指令成功应答描述符写入中断,其中包含来自请求描述符发送到位于主机驱动程序内存中的回复描述符后队列,并生成系统中断。此时,RAID卡驱动程序重新获得系统请求消息帧的所有权。具体的数据以DMA方式传输。(8) If the I/O status is successful, the RAID card/IOC writes the write command success response descriptor to the interrupt, which contains the reply descriptor queue from the request descriptor to the host driver memory, and generates a system interrupt. At this time, the RAID card driver regains ownership of the system request message frame. The specific data is transferred in DMA mode.
(9)如果输入/输出状态不成功,IOC将执行以下操作,包括:(9) If the input/output status is unsuccessful, the IOC will perform the following operations, including:
a、从无应答队列(未响应超时的命令)中弹出系统应答消息帧地址。a. Pop up the system response message frame address from the no-response queue (commands that have not responded to the timeout).
b、使用DMA将指令错误回复消息传输到系统回复消息帧。b. Use DMA to transfer the command error reply message to the system reply message frame.
c、写入地址应答描述符,其中包含系统应答消息帧地址和SMID值从请求描述符到位于主机驱动程序内存中的回复描述符后队列,并生成系统中断。此时,RAID卡驱动程序重新获得系统请求消息帧的所有权。c. Write the address response descriptor, which contains the system response message frame address and SMID value from the request descriptor to the reply descriptor queue located in the host driver's memory, and generate a system interrupt. At this point, the RAID card driver regains ownership of the system request message frame.
(10)主机驱动程序处理中断并从应答描述符后队列中读取新条目。之后读取描述符时,主机驱动程序会将其标记为未使用。(10) The host driver processes the interrupt and reads a new entry from the reply descriptor back queue. When the descriptor is read thereafter, the host driver marks it as unused.
(11)RAID卡驱动程序更新其回复描述符后队列头索引,并将此新值(新的描述符)写入回复后主机索引寄存器(其中包括存描述符的队列)。(11) The RAID card driver updates its reply descriptor post-queue head index and writes this new value (new descriptor) to the reply post-host index register (which includes the queue where the descriptor is stored).
(12)如果在步骤(9)中使用了系统应答消息帧,则主机驱动程序执行以下操作,包括:a.将SRMFA(回复的数据)写入无应答队列的尾部条目,并更新其尾部索引。b.将此新索引值写入“无应答主机索引”寄存器。这使得系统回复消息帧再次可供RAID卡/IOC使用。(12) If the system reply message frame was used in step (9), the host driver performs the following operations, including: a. Writing SRMFA (the data of the reply) to the tail entry of the no reply queue and updating its tail index. b. Writing this new index value to the "no reply host index" register. This makes the system reply message frame available to the RAID card/IOC again.
(13)RAID卡驱动程序向操作系统发送完成状态,以进行I/O操作。(13) The RAID card driver sends a completion status to the operating system to perform the I/O operation.
可见,本实施例在RAID卡驱动模块单独构造一个路径和RAID卡进行传输数据,交互自定义私有的管理命令(如表1、表2和表3所示),实现对RAID卡信息的查询或者设置。但在管理命令和IO命令经过RAID卡驱动模块后,管理命令和IO命令共用PCIe通道和RAID卡进行传输数据。RAID卡固件接收到驱动传输的命令,RAID卡固件进行解析命令,然后根据解析得到的功能码,执行相应的命令。It can be seen that in this embodiment, a path is constructed separately in the RAID card driver module to transmit data with the RAID card, and private management commands are interactively customized (as shown in Table 1, Table 2 and Table 3) to query or set the RAID card information. However, after the management command and the IO command pass through the RAID card driver module, the management command and the IO command share the PCIe channel and the RAID card to transmit data. The RAID card firmware receives the command transmitted by the driver, parses the command, and then executes the corresponding command according to the function code obtained by the parsing.
下面对本申请实施例提供的一种电子设备进行介绍,下文描述的一种电子设备与本文描述的其他实施例可以相互参照。本申请实施例提供的电子设备可以是读写接口模块、RAID卡管理模块、RAID卡驱动或RAID卡。The electronic device provided in the embodiment of the present application is introduced below, and the electronic device described below can refer to other embodiments described in this article. The electronic device provided in the embodiment of the present application can be a read-write interface module, a RAID card management module, a RAID card driver or a RAID card.
参见图4所示,本申请实施例公开了一种电子设备,包括:As shown in FIG4 , an embodiment of the present application discloses an electronic device, including:
存储器401,用于保存计算机程序;Memory 401, used for storing computer programs;
处理器402,用于执行所述计算机程序,以实现上述任意实施例公开的方法。The processor 402 is used to execute the computer program to implement the method disclosed in any of the above embodiments.
在本实施例中,计算机程序可以具体实现以下步骤:通过第一通信通道和第一协议使读写接口模块传输读写命令至RAID卡驱动,以使RAID卡驱动根据读写命令对RAID卡进行相应读写操作;通过第二通信通道和第二协议使RAID卡管理模块传输管理命令至RAID卡驱动,以使RAID卡驱动根据管理命令对RAID卡进行相应管理操作。In this embodiment, the computer program can specifically implement the following steps: through the first communication channel and the first protocol, the read-write interface module transmits the read-write command to the RAID card driver, so that the RAID card driver performs corresponding read-write operations on the RAID card according to the read-write command; through the second communication channel and the second protocol, the RAID card management module transmits the management command to the RAID card driver, so that the RAID card driver performs corresponding management operations on the RAID card according to the management command.
在本实施例中,计算机程序可以具体实现以下步骤:RAID卡管理模块获取管理命令;将管理命令传输至RAID卡驱动。In this embodiment, the computer program can specifically implement the following steps: the RAID card management module obtains the management command; and transmits the management command to the RAID card driver.
在本实施例中,计算机程序可以具体实现以下步骤:按照第二协议封装管理命令,得到封装后管理命令;将封装后管理命令暂存至预设的命令管理缓存池;若满足命令发送条件,则在命令管理缓存池中查询封装后管理命令,并将查询到的封装后管理命令通过第二通信通道发送至RAID卡。In this embodiment, the computer program can specifically implement the following steps: encapsulate the management command according to the second protocol to obtain the encapsulated management command; temporarily store the encapsulated management command in a preset command management cache pool; if the command sending conditions are met, query the encapsulated management command in the command management cache pool, and send the queried encapsulated management command to the RAID card through the second communication channel.
在本实施例中,计算机程序可以具体实现以下步骤:判断命令管理缓存池中是否存在未处理的命令;若存在,则执行在命令管理缓存池中查询封装后管理命令,并将查询到的封装后管理命令通过第二通信通道发送至RAID卡的步骤。In this embodiment, the computer program can specifically implement the following steps: determine whether there are any unprocessed commands in the command management cache pool; if so, execute the step of querying the encapsulated management command in the command management cache pool, and sending the queried encapsulated management command to the RAID card through the second communication channel.
在本实施例中,计算机程序可以具体实现以下步骤:将查询到的封装后管理命令通过第二通信通道以DMA方式发送至RAID卡。In this embodiment, the computer program may specifically implement the following steps: sending the queried packaged management command to the RAID card via the second communication channel in DMA mode.
在本实施例中,计算机程序可以具体实现以下步骤:为管理命令分配命令标识信息和用户编号;按照第二协议封装管理命令、命令标识信息和用户编号,得到封装后管理命令;封装后管理命令还包括:功能码、帧长度、帧偏移地址、预留字段和负载数据。In this embodiment, the computer program can specifically implement the following steps: assign command identification information and user number to the management command; encapsulate the management command, command identification information and user number according to the second protocol to obtain the encapsulated management command; the encapsulated management command also includes: function code, frame length, frame offset address, reserved field and load data.
在本实施例中,计算机程序可以具体实现以下步骤:创建封装后管理命令的命令描述符;将命令描述符写入RAID卡中的寄存器。In this embodiment, the computer program can specifically implement the following steps: creating a command descriptor of the encapsulated management command; and writing the command descriptor into a register in the RAID card.
在本实施例中,计算机程序可以具体实现以下步骤:从寄存器读取命令描述符;根据命令描述符查询并处理封装后管理命令。In this embodiment, the computer program can specifically implement the following steps: reading a command descriptor from a register; and querying and processing the encapsulated management command according to the command descriptor.
在本实施例中,计算机程序可以具体实现以下步骤:发送封装后管理命令的响应消息至RAID卡驱动,并创建响应消息的响应描述符;将响应描述符写入RAID卡驱动的回复队列。In this embodiment, the computer program can specifically implement the following steps: sending a response message of the encapsulated management command to the RAID card driver and creating a response descriptor of the response message; writing the response descriptor into the reply queue of the RAID card driver.
在本实施例中,计算机程序可以具体实现以下步骤:从回复队列读取响应描述符;根据响应描述符查询并处理响应消息。In this embodiment, the computer program may specifically implement the following steps: reading a response descriptor from a reply queue; and querying and processing a response message according to the response descriptor.
在本实施例中,计算机程序可以具体实现以下步骤:以DMA方式发送封装后管理命令的响应消息至RAID卡驱动。In this embodiment, the computer program may specifically implement the following steps: sending a response message of the encapsulated management command to the RAID card driver in a DMA manner.
在本实施例中,计算机程序可以具体实现以下步骤:将响应消息暂存至预设的响应管理缓存池;若满足响应处理条件,则根据响应描述符在响应管理缓存池中查询响应消息,并将查询到的响应消息通过第二通信通道以DMA方式发送至RAID卡管理模块。In this embodiment, the computer program can specifically implement the following steps: temporarily storing the response message in a preset response management buffer pool; if the response processing conditions are met, querying the response message in the response management buffer pool according to the response descriptor, and sending the queried response message to the RAID card management module via the second communication channel in DMA mode.
在本实施例中,计算机程序可以具体实现以下步骤:若响应消息为成功响应消息,则根据响应消息中的用户编号,将响应消息发送至相应用户端。In this embodiment, the computer program may specifically implement the following steps: if the response message is a successful response message, the response message is sent to the corresponding user terminal according to the user number in the response message.
在本实施例中,计算机程序可以具体实现以下步骤:若响应消息响应超时或未接收到响应消息,则重启响应消息的发送设备;发送设备为RAID卡、RAID卡连接的扩展芯片和/或扩展芯片连接的硬盘。In this embodiment, the computer program can specifically implement the following steps: if the response message times out or the response message is not received, restart the device sending the response message; the sending device is a RAID card, an expansion chip connected to the RAID card and/or a hard disk connected to the expansion chip.
在本实施例中,计算机程序可以具体实现以下步骤:若响应消息为失败响应消息,则从无应答队列获取系统应答消息帧地址;以DMA方式将响应消息写入系统应答消息帧地址;将系统应答消息帧地址写入响应描述符。In this embodiment, the computer program can specifically implement the following steps: if the response message is a failure response message, obtain the system response message frame address from the no-response queue; write the response message to the system response message frame address in DMA mode; write the system response message frame address into the response descriptor.
进一步的,本申请实施例还提供了一种电子设备。其中,上述电子设备既可以是如图5所示的服务器,也可以是如图6所示的终端。图5和图6均是根据一示例性实施例示出的电子设备结构图,图中的内容不能被认为是对本申请的使用范围的任何限制。Furthermore, an embodiment of the present application also provides an electronic device. The electronic device can be a server as shown in FIG5 or a terminal as shown in FIG6. FIG5 and FIG6 are both electronic device structure diagrams according to an exemplary embodiment, and the contents in the diagrams cannot be regarded as any limitation on the scope of use of the present application.
图5为本申请实施例提供的一种服务器的结构示意图。该服务器具体可以包括:至少一个处理器、至少一个存储器、电源、通信接口、输入输出接口和通信总线。其中,所述存储器用于存储计算机程序,所述计算机程序由所述处理器加载并执行,以实现前述任一实施例公开的RAID卡管理中的相关步骤。FIG5 is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input/output interface, and a communication bus. The memory is used to store a computer program, which is loaded and executed by the processor to implement the relevant steps in the RAID card management disclosed in any of the aforementioned embodiments.
本实施例中,电源用于为服务器上的各硬件设备提供工作电压;通信接口能够为服务器创建与外界设备之间的数据传输通道,其所遵循的通信协议是能够适用于本申请技术方案的任意通信协议,在此不对其进行具体限定;输入输出接口,用于获取外界输入数据或向外界输出数据,其具体的接口类型可以根据具体应用需要进行选取,在此不进行具体限定。In this embodiment, the power supply is used to provide working voltage for each hardware device on the server; the communication interface can create a data transmission channel between the server and external devices, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
另外,存储器作为资源存储的载体,可以是只读存储器、随机存储器、磁盘或者光盘等,其上所存储的资源包括操作系统、计算机程序及数据等,存储方式可以是短暂存储或者永久存储。In addition, the memory as a carrier for resource storage can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include operating system, computer programs and data, etc. The storage method can be temporary storage or permanent storage.
其中,操作系统用于管理与控制服务器上的各硬件设备以及计算机程序,以实现处理器对存储器中数据的运算与处理,其可以是Windows Server、Netware、Unix、Linux等。计算机程序除了包括能够用于完成前述任一实施例公开的RAID卡管理方法的计算机程序之外,还可以进一步包括能够用于完成其他特定工作的计算机程序。数据除了可以包括应用程序的更新信息等数据外,还可以包括应用程序的开发商信息等数据。The operating system is used to manage and control the hardware devices and computer programs on the server to realize the operation and processing of the data in the memory by the processor, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the RAID card management method disclosed in any of the above embodiments, the computer program can further include computer programs that can be used to complete other specific tasks. In addition to data such as application update information, the data can also include data such as application developer information.
图6为本申请实施例提供的一种终端的结构示意图,该终端具体可以包括但不限于智能手机、平板电脑、笔记本电脑或台式电脑等。FIG6 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. The terminal may specifically include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
通常,本实施例中的终端包括有:处理器和存储器。Generally, the terminal in this embodiment includes: a processor and a memory.
其中,处理器可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器还可以包括AI(ArtificialIntelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。Among them, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
存储器可以包括一个或多个计算机非易失性存储介质,该计算机非易失性存储介质可以是非暂态的。存储器还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器至少用于存储以下计算机程序,其中,该计算机程序被处理器加载并执行之后,能够实现前述任一实施例公开的由终端侧执行的RAID卡管理方法中的相关步骤。另外,存储器所存储的资源还可以包括操作系统和数据等,存储方式可以是短暂存储或者永久存储。其中,操作系统可以包括Windows、Unix、Linux等。数据可以包括但不限于应用程序的更新信息。The memory may include one or more computer non-volatile storage media, which may be non-transitory. The memory may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor, it can implement the relevant steps in the RAID card management method performed by the terminal side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include but is not limited to update information of the application.
在一些实施例中,终端还可包括有显示屏、输入输出接口、通信接口、传感器、电源以及通信总线。In some embodiments, the terminal may also include a display screen, an input/output interface, a communication interface, a sensor, a power supply, and a communication bus.
本领域技术人员可以理解,图6中示出的结构并不构成对终端的限定,可以包括比图示更多或更少的组件。Those skilled in the art will appreciate that the structure shown in FIG. 6 does not limit the terminal and may include more or fewer components than those shown in the figure.
下面对本申请实施例提供的一种非易失性存储介质进行介绍,下文描述的一种非易失性存储介质与本文描述的其他实施例可以相互参照。A non-volatile storage medium provided in an embodiment of the present application is introduced below. The non-volatile storage medium described below can be cross-referenced with other embodiments described herein.
一种非易失性存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述实施例公开的RAID卡管理方法。其中,非易失性存储介质为计算机可读的非易失性存储介质,其作为资源存储的载体,可以是只读存储器、随机存储器、磁盘或者光盘等,其上所存储的资源包括操作系统、计算机程序及数据等,存储方式可以是短暂存储或者永久存储。A non-volatile storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the RAID card management method disclosed in the above-mentioned embodiment. The non-volatile storage medium is a computer-readable non-volatile storage medium, which, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system, a computer program and data, etc., and the storage method may be temporary storage or permanent storage.
下面对本申请实施例提供的一种计算机程序产品进行介绍,下文描述的一种计算机程序产品与本文描述的其他实施例可以相互参照。A computer program product provided in an embodiment of the present application is introduced below. The computer program product described below can be referenced to other embodiments described in this document.
一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现前述公开的RAID卡管理方法的步骤。A computer program product includes a computer program/instruction, which implements the steps of the aforementioned disclosed RAID card management method when executed by a processor.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的非易失性存储介质中。The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of non-volatile storage medium known in the art.
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410853491.8ACN118409712B (en) | 2024-06-28 | 2024-06-28 | RAID card management system, method, equipment, product and medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410853491.8ACN118409712B (en) | 2024-06-28 | 2024-06-28 | RAID card management system, method, equipment, product and medium |
| Publication Number | Publication Date |
|---|---|
| CN118409712Atrue CN118409712A (en) | 2024-07-30 |
| CN118409712B CN118409712B (en) | 2024-10-01 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410853491.8AActiveCN118409712B (en) | 2024-06-28 | 2024-06-28 | RAID card management system, method, equipment, product and medium |
| Country | Link |
|---|---|
| CN (1) | CN118409712B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119828985A (en)* | 2025-03-17 | 2025-04-15 | 山东云海国创云计算装备产业创新中心有限公司 | RAID card hard disk control system, method, equipment and medium based on expansion capability set |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115176428A (en)* | 2020-01-21 | 2022-10-11 | 哲库科技有限公司 | Command and response descriptor handling in a software and hardware interworking system |
| CN115657961A (en)* | 2022-11-11 | 2023-01-31 | 苏州浪潮智能科技有限公司 | RAID disk array management method, system, electronic device and storage medium |
| US20230195637A1 (en)* | 2020-04-17 | 2023-06-22 | Zte Corporation | On-chip cache apparatus, on-chip cache read-write method, and computer-readable medium |
| CN117294400A (en)* | 2023-09-26 | 2023-12-26 | 杭州海康机器人股份有限公司 | Data transmission method and device and electronic equipment |
| CN117369734A (en)* | 2023-12-08 | 2024-01-09 | 浪潮电子信息产业股份有限公司 | Storage resource management system, method and storage virtualization system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115176428A (en)* | 2020-01-21 | 2022-10-11 | 哲库科技有限公司 | Command and response descriptor handling in a software and hardware interworking system |
| US20230195637A1 (en)* | 2020-04-17 | 2023-06-22 | Zte Corporation | On-chip cache apparatus, on-chip cache read-write method, and computer-readable medium |
| CN115657961A (en)* | 2022-11-11 | 2023-01-31 | 苏州浪潮智能科技有限公司 | RAID disk array management method, system, electronic device and storage medium |
| CN117294400A (en)* | 2023-09-26 | 2023-12-26 | 杭州海康机器人股份有限公司 | Data transmission method and device and electronic equipment |
| CN117369734A (en)* | 2023-12-08 | 2024-01-09 | 浪潮电子信息产业股份有限公司 | Storage resource management system, method and storage virtualization system |
| Title |
|---|
| 朱勇 等: "嵌入式RAID数据通道的逻辑描述", 《小型微型计算机系统》, 29 February 2004 (2004-02-29)* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119828985A (en)* | 2025-03-17 | 2025-04-15 | 山东云海国创云计算装备产业创新中心有限公司 | RAID card hard disk control system, method, equipment and medium based on expansion capability set |
| CN119828985B (en)* | 2025-03-17 | 2025-05-23 | 山东云海国创云计算装备产业创新中心有限公司 | RAID card hard disk control system, method, equipment and medium based on expansion capability set |
| Publication number | Publication date |
|---|---|
| CN118409712B (en) | 2024-10-01 |
| Publication | Publication Date | Title |
|---|---|---|
| CN113900982B (en) | Distributed heterogeneous acceleration platform communication method, system, device and medium | |
| CN111651384B (en) | Register reading and writing method, chip, subsystem, register set and terminal | |
| CN112100090A (en) | Data access request processing method, device, medium and memory mapping controller | |
| CN116431190B (en) | Firmware upgrading method and device, BMC chip, server and medium | |
| WO2025152506A1 (en) | Data processing system and method, device and nonvolatile readable storage medium | |
| CN118409712A (en) | A RAID card management system, method, device, product and medium | |
| CN118484136A (en) | A distributed storage system, data processing method, device and medium | |
| KR20200001208A (en) | Convergence Semiconductor Apparatus and Operation Method Thereof, Stacked Memory Apparatus Having the Same | |
| US10853255B2 (en) | Apparatus and method of optimizing memory transactions to persistent memory using an architectural data mover | |
| TW434491B (en) | Increasing I/O performance through storage of packetized operational information in local memory | |
| CN115905095A (en) | USB drive-free communication method, device, electronic equipment and storage medium | |
| EP4426037A1 (en) | Computing task scheduling apparatus, computing apparatus, computing task scheduling method and computing method | |
| US20220137998A1 (en) | Storage virtualization device supporting virtual machine, operation method thereof, and operation method of system having the same | |
| CN101373438B (en) | Method, system and apparatus for managing basic input and output system | |
| CN118860507A (en) | Business interaction system, method, storage medium, and electronic device | |
| CN118689741A (en) | Information management method, device, medium and program product | |
| CN118689660A (en) | Method, device, medium and computer program product for dynamically displaying management information | |
| CN112580086B (en) | Configuration file access protection method, device, equipment and storage medium | |
| CN110096366A (en) | A kind of configuration method, device and the server of isomery memory system | |
| CN112732176B (en) | SSD (solid State disk) access method and device based on FPGA (field programmable Gate array), storage system and storage medium | |
| CN111966303B (en) | Data processing method, system, equipment and readable storage medium | |
| CN113626087A (en) | Method, system and device for data communication between host and BMC | |
| CN116302007B (en) | Disk array firmware upgrade method, device, equipment, medium and disk array card | |
| US20250147783A1 (en) | Computer-executed method, system, and computer-readable storage medium | |
| CN118519942A (en) | Access method, system, device and storage medium of device simulator |
| 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |