CN115167784A - Data writing method, device, equipment and storage medium - Google Patents

Data writing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115167784A
CN115167784A CN202211075892.2A CN202211075892A CN115167784A CN 115167784 A CN115167784 A CN 115167784A CN 202211075892 A CN202211075892 A CN 202211075892A CN 115167784 A CN115167784 A CN 115167784A
Authority
CN
China
Prior art keywords
random access
access memory
controller
party
data
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
CN202211075892.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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211075892.2A priority Critical patent/CN115167784A/en
Publication of CN115167784A publication Critical patent/CN115167784A/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/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0625Power saving in storage systems
    • 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/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本申请涉及存储技术领域,公开了一种数据写入方法、装置、设备及存储介质,包括:将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;目标数据为输入目标控制器中的数据;当存储阵列异常掉电,则通过设置于存储阵列中的备电模块仅对备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得控制组件将第三方非易失性随机访问存储器的缓存空间中写入的目标数据存储至第三方非易失性随机访问存储器的非易失性介质中。本申请当存储阵列发生异常掉电,备电模块只需为第三方非易失性随机访问存储器和控制组件供电,实现备电模块小型化下的高效率数据写入,同时保证数据可靠性。

Figure 202211075892

The present application relates to the field of storage technology, and discloses a data writing method, apparatus, device and storage medium, including: writing target data into a cache of a third-party non-volatile random access memory connected to a target controller of a storage array space; the target data is the data input into the target controller; when the storage array is powered off abnormally, only the control components in the controller where the backup power module is located and the third party are not easily accessible through the backup power module set in the storage array. The volatile random access memory supplies power, so that the control component stores the target data written in the cache space of the third-party non-volatile random access memory to the non-volatile medium of the third-party non-volatile random access memory. In this application, when the storage array is abnormally powered down, the backup power module only needs to supply power to the third-party non-volatile random access memory and control components, so as to realize high-efficiency data writing under the miniaturization of the backup power module, while ensuring data reliability.

Figure 202211075892

Description

一种数据写入方法、装置、设备及存储介质A data writing method, device, equipment and storage medium

技术领域technical field

本发明涉及存储技术领域,特别涉及一种数据写入方法、装置、设备及存储介质。The present invention relates to the field of storage technology, and in particular, to a data writing method, apparatus, device and storage medium.

背景技术Background technique

存储阵列作为保存数据的设备,数据可靠性极其重要。存储阵列设备输入的交流电源异常掉电时,存储控制器内存中的数据未写入非易失性介质中,可能会丢失。通常存储阵列设备会内置备电模块BBU(Battery Backup Unit)提供备用电源,确保存储阵列的处理器把内存中的数据保存到非易失性介质,如硬盘、固态硬盘SSD (Solid-State Disk)等。As a storage array is a device for storing data, data reliability is extremely important. When the AC power input to the storage array device is abnormally powered off, the data in the memory of the storage controller is not written to the non-volatile medium and may be lost. Usually, the storage array device will have a built-in backup power module BBU (Battery Backup Unit) to provide backup power to ensure that the processor of the storage array saves the data in the memory to non-volatile media, such as hard disks, solid-state drives (SSDs) (Solid-State Disk) Wait.

现有技术中,如果存储阵列设备异常掉电,备电模块给每个控制器最小单元供电,关键器件包括:处理器、内存条、SSD系统盘、复杂可编程逻辑器件(CPLD,ComplexProgrammable Logic Device)等。随着存储阵列控制器的高性能设计,备电功耗越来越大,需要备电模块提供的能量越来越大,而备电模块的电芯能量密度没有显著提升,备电模块需要的电芯数量增加,导致备电模块体积越来越大,存储阵列产品设计难以满足。In the prior art, if the storage array device loses power abnormally, the backup power module supplies power to the smallest unit of each controller, and the key components include: processors, memory sticks, SSD system disks, and Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device). )Wait. With the high-performance design of the storage array controller, the power consumption of backup power is increasing, and the energy required by the backup power module is increasing. However, the energy density of the battery cells of the backup power module has not been significantly improved. The increase in the number of battery cells leads to an increasing volume of backup power modules, which is difficult to meet the design of storage array products.

因此,如何实现存储阵列中的备电模块小型化是本领域技术人员亟待解决的技术问题。Therefore, how to realize the miniaturization of the backup power module in the storage array is a technical problem to be solved urgently by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种数据写入方法、装置、设备及存储介质,实现备电模块小型化下的高效率数据写入,同时保证数据可靠性。其具体方案如下:In view of this, the purpose of the present invention is to provide a data writing method, device, equipment and storage medium, which can realize high-efficiency data writing under the miniaturization of the backup power module, and at the same time ensure data reliability. Its specific plan is as follows:

本申请的第一方面提供了一种数据写入方法,包括:A first aspect of the present application provides a data writing method, comprising:

将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述目标控制器中的数据;Writing the target data into the cache space of a third-party non-volatile random access memory connected to the target controller of the storage array; wherein the target data is the data input into the target controller;

当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。When the storage array is powered off abnormally, the backup power module disposed in the storage array only supplies power to the control component in the controller where the backup power module is located and the third-party non-volatile random access memory, so that the The control component stores the target data written in the cache space of the third-party non-volatile random access memory into a non-volatile medium of the third-party non-volatile random access memory.

可选的,所述将目标数据写入与存储阵列连接的第三方非易失性随机访问存储器的缓存空间之前,还包括:Optionally, before writing the target data into the cache space of the third-party non-volatile random access memory connected to the storage array, the method further includes:

控制所述目标控制器侧的服务器通过I/O接口向所述目标控制器输入所述目标数据,并将所述目标数据写入所述目标控制器的缓存空间;Controlling the server on the side of the target controller to input the target data to the target controller through the I/O interface, and write the target data into the cache space of the target controller;

所述将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间之后,还包括:After writing the target data into the cache space of the third-party non-volatile random access memory connected to the target controller of the storage array, the method further includes:

将所述目标控制器的缓存空间中的所述目标数据的数据类型进行修改,以使写入所述目标控制器的缓存空间中所述目标数据能被清除或替换。The data type of the target data in the cache space of the target controller is modified, so that the target data written in the cache space of the target controller can be cleared or replaced.

可选的,所述将所述目标数据写入所述目标控制器的缓存空间之后,还包括:Optionally, after writing the target data into the cache space of the target controller, the method further includes:

控制所述目标控制器对所述目标数据对应的I/O操作进行判断,若为写操作,则执行将所述目标数据写入所述第三方非易失性随机访问存储器的缓存空间的步骤。Control the target controller to judge the I/O operation corresponding to the target data, and if it is a write operation, execute the step of writing the target data into the cache space of the third-party non-volatile random access memory .

可选的,所述将目标数据写入与存储阵列连接的第三方非易失性随机访问存储器的缓存空间之后,还包括:Optionally, after writing the target data into the cache space of the third-party non-volatile random access memory connected to the storage array, the method further includes:

控制所述目标控制器对所述目标数据进行分析得到所述目标数据的管理信息,并将所述管理信息发送至所述存储阵列中的其他控制器,以能通过其他控制器按照所述管理信息从所述第三方非易失性随机访问存储器中索引到相应数据。Controlling the target controller to analyze the target data to obtain management information of the target data, and sending the management information to other controllers in the storage array, so that the other controllers can manage according to the management information. Information is indexed to corresponding data from the third party non-volatile random access memory.

可选的,所述将所述管理信息发送至所述存储阵列中的其他控制器,包括:Optionally, the sending the management information to other controllers in the storage array includes:

将所述管理信息发送至所述存储阵列中的其他控制器的缓存空间中。The management information is sent to the cache space of other controllers in the storage array.

可选的,所述将所述管理信息发送至所述存储阵列中的其他控制器之后,还包括:Optionally, after sending the management information to other controllers in the storage array, the method further includes:

控制所述目标控制器向所述服务器发送确认信息,以使所述服务器在接收到所述确认信息后确认写入操作完成。The target controller is controlled to send confirmation information to the server, so that the server confirms that the writing operation is completed after receiving the confirmation information.

可选的,所述将控制所述目标控制器对所述目标数据进行分析得到所述目标数据的管理信息之后,还包括:Optionally, after controlling the target controller to analyze the target data to obtain the management information of the target data, the method further includes:

将所述管理信息写入所述第三方非易失性随机访问存储器的缓存空间中,以使所述控制组件在存储阵列异常掉电将所述目标数据存储至所述非易失性介质中时,所述控制组件同时将所述第三方非易失性随机访问存储器的缓存空间中写入的所述管理信息存储至所述非易失性介质中。Writing the management information into the cache space of the third-party non-volatile random access memory, so that the control component stores the target data in the non-volatile medium when the storage array is powered off abnormally At the same time, the control component stores the management information written in the cache space of the third-party non-volatile random access memory into the non-volatile medium at the same time.

可选的,所述数据写入方法,还包括:Optionally, the data writing method further includes:

设置多个所述第三方非易失性随机访问存储器,并在多个所述第三方非易失性随机访问存储器的缓存空间中写入所述目标数据;Setting up a plurality of the third-party non-volatile random access memories, and writing the target data in the cache spaces of the plurality of third-party non-volatile random access memories;

当存储阵列异常掉电,则通过多个所述备电模块仅对所述备电模块所在控制器中的所述控制组件和至少一个所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将至少一个所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。When the storage array is powered off abnormally, the plurality of backup power modules only supply power to the control component and at least one third-party non-volatile random access memory in the controller where the backup power modules are located, so that The control component stores the target data written in the cache space of the at least one third-party non-volatile random access memory into a non-volatile medium of the third-party non-volatile random access memory.

可选的,所述存储阵列为双控制器存储阵列,所述第三方非易失性随机访问存储器为双端口非易失性随机访问存储器;其中,所述第三方非易失性随机访问存储器的两个端口分别与所述存储阵列中的两个控制器连接。Optionally, the storage array is a dual-controller storage array, and the third-party non-volatile random access memory is a dual-port non-volatile random access memory; wherein the third-party non-volatile random access memory The two ports of the storage array are respectively connected with the two controllers in the storage array.

可选的,所述存储阵列中的各个控制器中均设置有所述备电模块;Optionally, each controller in the storage array is provided with the backup power module;

所述通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,包括:The supplying power only to the control component and the third-party non-volatile random access memory in the controller where the backup power module is located through the backup power module disposed in the storage array, including:

从所述存储阵列中的全部控制器中确定出一个控制器作为备电控制器,并通过所述备电控制器中的所述备电模块仅对所述备电控制器中的所述控制组件和所述第三方非易失性随机访问存储器进行供电。One controller is determined from all the controllers in the storage array as the backup power controller, and only the controller in the backup power controller is controlled by the backup power module in the backup power controller. components and the third-party non-volatile random access memory are powered.

可选的,所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中,还包括:Optionally, the control component stores the target data written in the cache space of the third-party non-volatile random access memory to the non-volatile medium of the third-party non-volatile random access memory , which also includes:

所述控制组件生成第一存储指令并将所述第一存储指令下发至所述第三方非易失性随机访问存储器中的主控芯片,以便所述主控芯片根据所述第一存储指令将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的所述非易失性介质中。The control component generates a first storage instruction and sends the first storage instruction to the main control chip in the third-party non-volatile random access memory, so that the main control chip can store the instruction according to the first storage instruction The target data written in the cache space of the third-party non-volatile random access memory is stored in the non-volatile medium of the third-party non-volatile random access memory.

可选的,所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中之后,还包括:Optionally, the control component stores the target data written in the cache space of the third-party non-volatile random access memory to the non-volatile medium of the third-party non-volatile random access memory After that, it also includes:

所述控制组件生成关闭指令并执行所述关闭指令,以使所述备电控制器中的所述备电模块停止对所述控制组件和所述第三方非易失性随机访问存储器进行供电。The control component generates a shutdown command and executes the shutdown command, so that the backup power module in the backup power controller stops supplying power to the control component and the third-party non-volatile random access memory.

本申请的第二方面提供了一种数据写入装置,包括:A second aspect of the present application provides a data writing device, comprising:

第一缓存模块,用于将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述目标控制器中的数据;a first cache module, used to write target data into the cache space of a third-party non-volatile random access memory connected to a target controller of a storage array; wherein the target data is data input into the target controller ;

备电缓存模块,用于当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。The backup power cache module is used for when the storage array is abnormally powered down, the backup power module arranged in the storage array only checks the control components in the controller where the backup power module is located and the third-party non-volatile The random access memory supplies power, so that the control component stores the target data written in the cache space of the third-party non-volatile random access memory to the non-volatile memory of the third-party non-volatile random access memory. in a volatile medium.

本申请的第三方面提供了一种电子设备,所述电子设备包括处理器和存储器;其中所述存储器用于存储计算机程序,所述计算机程序由所述处理器加载并执行以实现前述数据写入方法。A third aspect of the present application provides an electronic device, which includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the aforementioned data writing enter method.

本申请的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机可执行指令,所述计算机可执行指令被处理器加载并执行时,实现前述数据写入方法。A fourth aspect of the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are loaded and executed by a processor, the aforementioned data writing is implemented method.

本申请中,先将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述目标控制器中的数据;当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。可见,本申请引入同时具有缓存和非易失性介质的第三方非易失性随机访问存储器,在利用存储阵列写入数据时,同时写入第三方非易失性随机访问存储器的缓存内,当存储阵列发生异常掉电,备电模块只需为第三方非易失性随机访问存储器和控制组件供电,在控制组件的指示下将缓存中的数据再次写入非易失性介质,备电模块的备电功耗不受存储阵列控制器的高性能设计影响,能够降低备电功耗,实现备电模块小型化,同时保证数据写入效率及数据可靠性。In this application, the target data is first written into the cache space of the third-party non-volatile random access memory connected to the target controller of the storage array; wherein, the target data is the data input into the target controller; when If the storage array is abnormally powered off, the backup power module provided in the storage array only supplies power to the control component in the controller where the backup power module is located and the third-party non-volatile random access memory, so that all The control component stores the target data written in the cache space of the third-party non-volatile random access memory into a non-volatile medium of the third-party non-volatile random access memory. It can be seen that the present application introduces a third-party non-volatile random access memory that has both a cache and a non-volatile medium. When using the storage array to write data, it is simultaneously written into the cache of the third-party non-volatile random access memory. When the storage array is powered off abnormally, the backup power module only needs to supply power to the third-party non-volatile random access memory and the control component, and under the instruction of the control component, the data in the cache is written to the non-volatile medium again, and the backup power The backup power consumption of the module is not affected by the high-performance design of the storage array controller, which can reduce the backup power consumption, realize the miniaturization of the backup power module, and ensure the data writing efficiency and data reliability.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.

图1为本申请提供的一种数据写入方法流程图;1 is a flowchart of a data writing method provided by the application;

图2为本申请提供的一种具体的数据写入方法示意图;2 is a schematic diagram of a specific data writing method provided by the application;

图3为本申请提供的一种双控制器存储阵列的数据写入架构图;3 is a data writing architecture diagram of a dual-controller storage array provided by the present application;

图4为本申请提供的一种具体的数据写入方法流程图;4 is a flowchart of a specific data writing method provided by the application;

图5为本申请提供的一种现有技术中双控存储阵列I/O数据写操作流程架构;FIG. 5 provides a prior art dual-control storage array I/O data write operation flow structure provided by the present application;

图6为本申请提供的一种本申请方案中双控存储阵列I/O数据写操作流程架构;FIG. 6 provides the application for a dual-control storage array I/O data write operation process architecture in the solution of the application;

图7为本申请提供的一种数据写入装置结构示意图;7 is a schematic structural diagram of a data writing device provided by the application;

图8为本申请提供的一种数据写入电子设备结构图。FIG. 8 is a structural diagram of a data writing electronic device provided by the present application.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

目前,如果存储阵列设备异常掉电,通常存储阵列设备内置备电模块(BBU)会给每个控制器最小单元供电提供备用电源,确保存储阵列的处理器把内存中的数据保存到非易失性介质。然而随着存储阵列控制器的高性能设计,备电功耗越来越大,需要备电模块提供的能量越来越大,而备电模块的电芯能量密度没有显著提升,备电模块需要的电芯数量增加,导致备电模块体积越来越大,存储阵列产品设计难以满足。针对上述技术缺陷,本申请提供一种数据写入方案,当存储阵列发生异常掉电,备电模块只需为第三方非易失性随机访问存储器和控制组件供电,实现备电模块小型化下的高效率数据写入,同时保证数据可靠性。At present, if the storage array device loses power abnormally, the built-in backup power module (BBU) of the storage array device usually provides backup power for the smallest unit of each controller, ensuring that the processor of the storage array saves the data in the memory to the non-volatile sexual medium. However, with the high-performance design of the storage array controller, the power consumption of the backup power is increasing, and the energy required by the backup power module is increasing. The increase in the number of battery cells required for the storage array results in an increasing volume of backup power modules, making it difficult to meet the requirements of storage array product design. In view of the above technical defects, the present application provides a data writing solution. When the storage array is abnormally powered down, the backup power module only needs to supply power to the third-party non-volatile random access memory and control components, thereby realizing the miniaturization of the backup power module. high-efficiency data writing, while ensuring data reliability.

图1为本申请实施例提供的一种数据写入方法流程图。参见图1所示,该数据写入方法包括:FIG. 1 is a flowchart of a data writing method provided by an embodiment of the present application. Referring to Figure 1, the data writing method includes:

S11:将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述目标控制器中的数据。S11: Write target data into a cache space of a third-party non-volatile random access memory connected to a target controller of the storage array; wherein the target data is data input into the target controller.

本实施例中,存储阵列包括多个控制器、数据盘SSD及第三方非易失性随机访问存储器。所述第三方非易失性随机访问存储器与多个所述控制器连接,从而可以通过所述第三方非易失性随机访问存储器进行数据同步存储。所述第三方非易失性随机访问存储器表示为NVRAM(NON-Volatile Random Access Memory),属于断电后仍能保持数据的一种随机存取存储器。所述第三方非易失性随机访问存储器包括缓存(如DRAM)和非易失性介质(如Flash),其中,设置DRAM是为了提高缓存效率。In this embodiment, the storage array includes a plurality of controllers, data disk SSDs, and third-party non-volatile random access memory. The third-party non-volatile random access memory is connected to a plurality of the controllers, so that data can be stored synchronously through the third-party non-volatile random access memory. The third-party non-volatile random access memory is represented as NVRAM (NON-Volatile Random Access Memory), which is a random access memory that can retain data even after a power failure. The third-party non-volatile random access memory includes a cache (such as DRAM) and a non-volatile medium (such as Flash), wherein the DRAM is set to improve cache efficiency.

本实施例中,在服务器向存储阵列的目标控制器输入目标数据时,将所述目标数据写入与所述目标控制器连接的所述第三方非易失性随机访问存储器的缓存空间。其中,所述目标数据为输入所述存储阵列的所述目标控制器中的数据,一般为I/O数据。In this embodiment, when the server inputs target data to the target controller of the storage array, the target data is written into the cache space of the third-party non-volatile random access memory connected to the target controller. The target data is data input into the target controller of the storage array, and is generally I/O data.

具体的,所述存储阵列为双控制器存储阵列,所述第三方非易失性随机访问存储器为双端口非易失性随机访问存储器。其中,所述第三方非易失性随机访问存储器的两个端口分别与所述存储阵列中的两个控制器连接。即上述存储阵列包括双控制器,存储阵列系统设计支持双控制器分别访问双端口NVRAM盘,且NVRAM盘的DRAM容量够大(例如大于16GB),满足存储阵列写缓存空间要求。在这种情况下,控制器、处理器可直接读写操作NVRAM盘的DRAM空间,类似处理器对远端内存操作,此I/O读写操作延时极低,与传统存储阵列操作性能一致。Specifically, the storage array is a dual-controller storage array, and the third-party non-volatile random access memory is a dual-port non-volatile random access memory. Wherein, the two ports of the third-party non-volatile random access memory are respectively connected with the two controllers in the storage array. That is, the above storage array includes dual controllers. The storage array system design supports dual controllers to access dual-port NVRAM disks, and the DRAM capacity of the NVRAM disk is large enough (eg, greater than 16GB) to meet the storage array write cache space requirements. In this case, the controller and processor can directly read and write the DRAM space of the NVRAM disk, similar to the processor operating on the remote memory. The I/O read and write operations have extremely low latency, which is consistent with the performance of traditional storage arrays. .

S12:当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。S12: When the storage array is powered off abnormally, the backup power module disposed in the storage array only supplies power to the control component in the controller where the backup power module is located and the third-party non-volatile random access memory , so that the control component stores the target data written in the cache space of the third-party non-volatile random access memory into the non-volatile medium of the third-party non-volatile random access memory.

本实施例中,存储阵列的备电模块供电跨背板,能给NVRAM盘供电。当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。In this embodiment, the power supply of the backup power module of the storage array spans the backplane and can supply power to the NVRAM disk. When the storage array is powered off abnormally, the backup power module disposed in the storage array only supplies power to the control component in the controller where the backup power module is located and the third-party non-volatile random access memory, so that the The control component stores the target data written in the cache space of the third-party non-volatile random access memory into a non-volatile medium of the third-party non-volatile random access memory.

可以理解,所述存储阵列的控制器中设置有备电模块,可以根据实际条件选择任意一个控制器中的备电模块进行供电,本实施例对此不进行限定。如果存储阵列出现异常掉电,备电模块只需对NVRAM盘、控制器的所述控制组件,如CPLD等供电,CPLD通知NVRAM盘将其DRAM中写入的所述目标数据(I/O数据)写入其Flash中。It can be understood that the controller of the storage array is provided with a backup power module, and any backup power module in the controller can be selected to supply power according to actual conditions, which is not limited in this embodiment. If the storage array is powered off abnormally, the backup power module only needs to supply power to the NVRAM disk and the control components of the controller, such as the CPLD, and the CPLD notifies the NVRAM disk to write the target data (I/O data) written in its DRAM. ) into its Flash.

进一步的,为了提高系统存储容错率,避免NVRAM盘损坏导致数据丢失,本实施例可以设置多个所述第三方非易失性随机访问存储器,并在多个所述第三方非易失性随机访问存储器的缓存空间中写入所述目标数据。当存储阵列异常掉电,则通过多个所述备电模块仅对所述备电模块所在控制器中的所述控制组件和至少一个所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将至少一个所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。Further, in order to improve the system storage fault tolerance rate and avoid data loss caused by damage to the NVRAM disk, in this embodiment, multiple third-party non-volatile random access memories may be set, and multiple third-party non-volatile random access The target data is written in the cache space of the access memory. When the storage array is powered off abnormally, the plurality of backup power modules only supply power to the control component and at least one third-party non-volatile random access memory in the controller where the backup power modules are located, so that The control component stores the target data written in the cache space of the at least one third-party non-volatile random access memory into a non-volatile medium of the third-party non-volatile random access memory.

可见,本申请实施例先将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述存储阵列的目标控制器中的数据;当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。本申请实施例引入同时具有缓存和非易失性介质的第三方非易失性随机访问存储器,在利用存储阵列写入数据时,同时写入第三方非易失性随机访问存储器的缓存内,当存储阵列发生异常掉电,备电模块只需为第三方非易失性随机访问存储器和控制组件供电,在控制组件的指示下将缓存中的数据再次写入非易失性介质,备电模块的备电功耗不受存储阵列控制器的高性能设计影响,能够降低备电功耗,实现备电模块小型化,同时保证数据写入效率及数据可靠性。It can be seen that in this embodiment of the present application, the target data is first written into the cache space of the third-party non-volatile random access memory connected to the target controller of the storage array; wherein the target data is input to the target controller of the storage array When the storage array is abnormally powered down, the backup power module arranged in the storage array will only access the control components in the controller where the backup power module is located and the third-party non-volatile random access memory. supplying power, so that the control component stores the target data written in the cache space of the third-party non-volatile random access memory to the non-volatile medium of the third-party non-volatile random access memory middle. The embodiment of the present application introduces a third-party non-volatile random access memory that has both a cache and a non-volatile medium. When data is written by using the storage array, it is simultaneously written into the cache of the third-party non-volatile random access memory. When the storage array is powered off abnormally, the backup power module only needs to supply power to the third-party non-volatile random access memory and the control component, and under the instruction of the control component, the data in the cache is written to the non-volatile medium again, and the backup power The backup power consumption of the module is not affected by the high-performance design of the storage array controller, which can reduce the backup power consumption, realize the miniaturization of the backup power module, and ensure the data writing efficiency and data reliability.

图2为本申请实施例提供的一种具体的数据写入方法流程图。参见图2所示,该数据写入方法包括:FIG. 2 is a flowchart of a specific data writing method provided by an embodiment of the present application. Referring to Figure 2, the data writing method includes:

S21:控制存储阵列的目标控制器侧的服务器通过I/O接口向所述目标控制器输入所述目标数据,并将所述目标数据写入所述目标控制器的缓存空间。S21: The server on the target controller side that controls the storage array inputs the target data to the target controller through an I/O interface, and writes the target data into the cache space of the target controller.

本实施例中,输入存储阵列中的目标数据一般是由主机侧服务器写入的,首先控制存储阵列的目标控制器侧的服务器通过I/O接口向所述目标控制器输入所述目标数据。图3为本实施例提供的一种双控制器存储阵列的数据写入架构图,包括两个控制器(控制器0和控制器1)、两个NVRAM盘(NVRAM盘0和NVRAM盘1)及多个(X个)I/O卡。其中,图3中的服务器0为目标控制器侧的服务器,控制器0为所述目标存储器。输入所述目标存储器的所述目标数据直接写入所述目标控制器的缓存空间。也即主机侧服务器把I/O数据写入控制器0的DRAM(DDR中),控制器0分析I/O数据类型、用途、更新或保存的地址等;In this embodiment, the target data input into the storage array is generally written by the server on the host side. First, the server on the target controller side of the storage array is controlled to input the target data to the target controller through the I/O interface. FIG. 3 is a data writing architecture diagram of a dual-controller storage array provided in this embodiment, including two controllers (controller 0 and controller 1), and two NVRAM disks (NVRAM disk 0 and NVRAM disk 1) and multiple (X) I/O cards. The server 0 in FIG. 3 is the server on the target controller side, and the controller 0 is the target memory. The target data input to the target memory is directly written into the cache space of the target controller. That is, the host-side server writes the I/O data into the DRAM (DDR) of the controller 0, and the controller 0 analyzes the I/O data type, purpose, updated or saved address, etc.;

S22:控制所述目标控制器对所述目标数据对应的I/O操作进行判断,若为写操作,则将所述目标数据写入与所述存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间。S22: Control the target controller to judge the I/O operation corresponding to the target data, and if it is a write operation, write the target data into a third-party non-volatile operation connected to the target controller of the storage array Cache space of volatile random access memory.

S23:将所述目标控制器的缓存空间中的所述目标数据的数据类型进行修改,以使写入所述目标控制器的缓存空间中所述目标数据能被清除或替换。S23: Modify the data type of the target data in the cache space of the target controller, so that the target data written in the cache space of the target controller can be cleared or replaced.

本实施例中,在将所述目标数据写入所述目标控制器的缓存空间之后,控制所述目标控制器对所述目标数据对应的I/O操作进行判断,若为写操作,则将所述目标数据写入与所述存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间。如果判断I/O操作为Write类型,控制器0将写入的所述目标数据保留在其DRAM,并写入NVRAM盘的DRAM中。In this embodiment, after the target data is written into the cache space of the target controller, the target controller is controlled to judge the I/O operation corresponding to the target data. The target data is written into a cache space of a third-party non-volatile random access memory connected to a target controller of the storage array. If it is judged that the I/O operation is of the Write type, the controller 0 keeps the written target data in its DRAM, and writes it into the DRAM of the NVRAM disk.

本实施例中,同时将所述目标控制器的缓存空间中的所述目标数据的数据类型进行修改,以使写入所述目标控制器的缓存空间中所述目标数据能被清除或替换。例如,控制器0将其DRAM中的I/O数据变为Read类型,在此之后,Read类型的所述目标数据可以被清除或者替换。In this embodiment, the data type of the target data in the cache space of the target controller is modified at the same time, so that the target data written in the cache space of the target controller can be cleared or replaced. For example, the controller 0 changes the I/O data in its DRAM to the Read type, after which the target data of the Read type can be cleared or replaced.

S24:控制所述目标控制器对所述目标数据进行分析得到所述目标数据的管理信息,并将所述管理信息发送至所述存储阵列中的其他控制器,以能通过其他控制器按照所述管理信息从所述第三方非易失性随机访问存储器中索引到相应数据。S24: Control the target controller to analyze the target data to obtain management information of the target data, and send the management information to other controllers in the storage array, so that the other controllers can follow the required The management information is indexed to corresponding data from the third-party non-volatile random access memory.

本实施例中,为了将所述目标数据同步至存储阵列中的其他控制器,还需要对所述目标数据进行分析以获取所述目标数据的管理信息。即控制所述目标控制器对所述目标数据进行分析得到所述目标数据的管理信息。具体的,把I/O数据写到控制器0的DRAM之后,控制器0需要分析I/O数据类型、用途、更新或保存的地址等,此为所述管理信息。所述管理信息起到数据索引的作用,将所述管理信息发送至所述存储阵列中的其他控制器,以能通过其他控制器按照所述管理信息从所述第三方非易失性随机访问存储器中索引到相应数据。In this embodiment, in order to synchronize the target data to other controllers in the storage array, the target data also needs to be analyzed to obtain management information of the target data. That is, the target controller is controlled to analyze the target data to obtain management information of the target data. Specifically, after writing the I/O data to the DRAM of the controller 0, the controller 0 needs to analyze the I/O data type, usage, updated or saved address, etc., which is the management information. The management information acts as a data index, and the management information is sent to other controllers in the storage array, so that other controllers can access non-volatile random access from the third party according to the management information The corresponding data is indexed into the memory.

S25:将所述管理信息写入所述第三方非易失性随机访问存储器的缓存空间中,以使所述控制组件在存储阵列异常掉电将所述目标数据存储至所述非易失性介质中时,所述控制组件同时将所述第三方非易失性随机访问存储器的缓存空间中写入的所述管理信息存储至所述非易失性介质中。S25: Write the management information into the cache space of the third-party non-volatile random access memory, so that the control component stores the target data in the non-volatile memory when the storage array is powered off abnormally When stored in the medium, the control component simultaneously stores the management information written in the cache space of the third-party non-volatile random access memory into the non-volatile medium.

本实施例中,为了避免异常掉电时,各控制器DRAM中的所述管理信息丢失,可以将所述管理信息写入所述第三方非易失性随机访问存储器的缓存空间中,以使所述控制组件在存储阵列异常掉电将所述目标数据存储至所述非易失性介质中时,所述控制组件同时将所述第三方非易失性随机访问存储器的缓存空间中写入的所述管理信息存储至所述非易失性介质中。当上电恢复之后,服务器需要读取所述目标数据时,先将所述非易失性介质中的所述数据及相应的所述管理信息写入NVRAM盘的DRAM中,然后再将NVRAM盘的DRAM中的所述管理信息写入服务器输入读操作的控制器即可。需要注意,步骤S22-步骤S26的执行顺序不固定。In this embodiment, in order to avoid the loss of the management information in the DRAM of each controller during an abnormal power failure, the management information may be written into the cache space of the third-party non-volatile random access memory, so that the When the control component stores the target data in the non-volatile medium when the storage array is abnormally powered off, the control component simultaneously writes the third-party non-volatile random access memory into the cache space The management information is stored in the non-volatile medium. After the power is restored, when the server needs to read the target data, it first writes the data in the non-volatile medium and the corresponding management information into the DRAM of the NVRAM disk, and then writes the NVRAM disk to the DRAM. The management information in the DRAM can be written into the controller of the server input read operation. It should be noted that the execution order of step S22-step S26 is not fixed.

S26:控制所述目标控制器向所述服务器发送确认信息,以使所述服务器在接收到所述确认信息后确认写入操作完成。S26: Control the target controller to send confirmation information to the server, so that the server confirms that the writing operation is completed after receiving the confirmation information.

本实施例中,当所述管理信息写入存储阵列的其他控制器之后,需要进一步控制所述目标控制器向所述服务器发送确认信息,以使所述服务器在接收到所述确认信息后确认写入操作完成。也即,完整的存储阵列I/O数据写操作流程中,控制器0需要向主机侧的服务器发送信息,确认I/O写操作完成,由服务器确认写操作结束。In this embodiment, after the management information is written into other controllers of the storage array, the target controller needs to be further controlled to send confirmation information to the server, so that the server confirms the confirmation after receiving the confirmation information The write operation is complete. That is, in the complete storage array I/O data write operation process, controller 0 needs to send information to the server on the host side to confirm that the I/O write operation is completed, and the server confirms the end of the write operation.

S27:当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。S27: When the storage array is powered off abnormally, the backup power module disposed in the storage array only supplies power to the control component in the controller where the backup power module is located and the third-party non-volatile random access memory , so that the control component stores the target data written in the cache space of the third-party non-volatile random access memory into the non-volatile medium of the third-party non-volatile random access memory.

本实施例中,关于上述步骤S27的具体过程,可以参考前述实施例中公开的相应内容,在此不再进行赘述。In this embodiment, for the specific process of the foregoing step S27, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

可见,本申请实施例先控制存储阵列的目标控制器侧的服务器通过I/O接口向所述目标控制器输入所述目标数据,并将所述目标数据写入所述目标控制器的缓存空间。控制所述目标控制器对所述目标数据进行分析得到所述目标数据的管理信息,控制所述目标控制器根据所述管理信息对所述目标数据对应的I/O操作进行判断,若为写操作,则将所述目标数据写入与所述存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间。并将所述管理信息发送至所述存储阵列中的其他控制器,以能通过其他控制器按照所述管理信息从所述第三方非易失性随机访问存储器中索引到相应数据。在此基础上,将所述目标控制器的缓存空间中的所述目标数据的数据类型进行修改,以使写入所述目标控制器的缓存空间中所述目标数据能被清除或替换。最终控制所述目标控制器向所述服务器发送确认信息,以使所述服务器在接收到所述确认信息后确认写入操作完成。上述方案写入流程性能高,延时低,数据冗余备份的可靠性高。It can be seen that in this embodiment of the present application, the server on the target controller side of the storage array is first controlled to input the target data to the target controller through the I/O interface, and write the target data into the cache space of the target controller . Controlling the target controller to analyze the target data to obtain management information of the target data, and controlling the target controller to judge the I/O operation corresponding to the target data according to the management information. operation, the target data is written into the cache space of the third-party non-volatile random access memory connected to the target controller of the storage array. The management information is sent to other controllers in the storage array, so that other controllers can index corresponding data from the third-party non-volatile random access memory according to the management information. On this basis, the data type of the target data in the cache space of the target controller is modified, so that the target data written into the cache space of the target controller can be cleared or replaced. Finally, the target controller is controlled to send confirmation information to the server, so that the server confirms that the writing operation is completed after receiving the confirmation information. The above solution has high performance in the writing process, low latency, and high reliability of redundant data backup.

图4为本申请实施例提供的一种具体的数据写入方法流程图。参见图4所示,该数据写入方法包括:FIG. 4 is a flowchart of a specific data writing method provided by an embodiment of the present application. Referring to Figure 4, the data writing method includes:

S31:将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述目标控制器中的数据。S31: Write target data into a cache space of a third-party non-volatile random access memory connected to a target controller of the storage array; wherein the target data is data input into the target controller.

关于上述步骤S31的具体过程,可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the specific process of the foregoing step S31, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

S32:当存储阵列异常掉电,则从所述存储阵列中的全部控制器中确定出一个控制器作为备电控制器,并通过所述备电控制器中的所述备电模块仅对所述备电控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电。S32: When the storage array is powered off abnormally, determine one controller from all the controllers in the storage array as the backup power controller, and use the backup power module in the backup power controller to only perform power on all controllers in the storage array. The control components in the backup power controller and the third-party non-volatile random access memory provide power.

本实施例中,所述存储阵列中的各个控制器中均设置有所述备电模块。当存储阵列异常掉电,则从所述存储阵列中的全部控制器中确定出一个控制器作为备电控制器,并通过所述备电控制器中的所述备电模块对所述备电控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电。一般的,可以选择接受主机侧服务器的I/O数据的控制器,如图3中的控制器0,也即可以将图3中的控制器0作为所述备电控制器,通过控制器0的所述备电模块对所述备电控制器中的CPLD组件和NVRAM盘进行供电。In this embodiment, each controller in the storage array is provided with the backup power module. When the storage array is powered off abnormally, a controller is determined from all the controllers in the storage array as a backup power controller, and the backup power module in the backup power controller controls the backup power The control components in the controller and the third-party non-volatile random access memory are powered. Generally, the controller that accepts the I/O data of the server on the host side can be selected, such as the controller 0 in FIG. 3 , that is, the controller 0 in FIG. 3 can be used as the backup power controller. The backup power module supplies power to the CPLD component and the NVRAM disk in the backup power controller.

S33:所述控制组件生成第一存储指令并将所述第一存储指令下发至所述第三方非易失性随机访问存储器中的主控芯片,以便所述主控芯片根据所述第一存储指令将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。S33: The control component generates a first storage instruction and sends the first storage instruction to the main control chip in the third-party non-volatile random access memory, so that the main control chip The storing instruction stores the target data written in the cache space of the third-party non-volatile random access memory into the non-volatile medium of the third-party non-volatile random access memory.

本实施例中,供电之后,所述控制组件生成第一存储指令并将所述第一存储指令下发至所述第三方非易失性随机访问存储器中的主控芯片,所述主控芯片可以为SSD主控。SSD主控根据所述第一存储指令将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。即如果存储阵列出现异常掉电,上述步骤中备电模块只需对NVRAM盘、控制器的CPLD供电,CPLD通过系统告知NVRAM盘,将其DRAM中I/O数据写入其Flash中。In this embodiment, after power is supplied, the control component generates a first storage instruction and sends the first storage instruction to a main control chip in the third-party non-volatile random access memory, and the main control chip Can be the master controller for SSD. The SSD master stores the target data written in the cache space of the third-party non-volatile random access memory to the non-volatile memory of the third-party non-volatile random access memory according to the first storage instruction in sexual medium. That is, if the storage array is abnormally powered down, in the above steps, the backup power module only needs to supply power to the NVRAM disk and the CPLD of the controller. The CPLD informs the NVRAM disk through the system to write the I/O data in its DRAM into its Flash.

S34:所述控制组件生成关闭指令并执行所述关闭指令,以使所述备电控制器中的所述备电模块停止对所述控制组件和所述第三方非易失性随机访问存储器进行供电。S34: The control component generates a shutdown instruction and executes the shutdown instruction, so that the backup power module in the backup power controller stops performing operations on the control component and the third-party non-volatile random access memory powered by.

本实施例中,写I/O的数据安全保存后,会关闭所述备电模块以停止供电。具体为,所述控制组件生成关闭指令并执行所述关闭指令,以使所述备电控制器中的所述备电模块停止对所述控制组件和所述第三方非易失性随机访问存储器进行供电,也即系统通过CPLD关闭备电模块。In this embodiment, after the write I/O data is safely stored, the backup power module will be turned off to stop power supply. Specifically, the control component generates a shutdown instruction and executes the shutdown instruction, so that the backup power module in the backup power controller stops the control component and the third-party non-volatile random access memory Power supply, that is, the system shuts down the backup power module through the CPLD.

本实施例中,当存储阵列异常掉电,则从所述存储阵列中的全部控制器中确定出一个控制器作为备电控制器,并通过所述备电控制器中的所述备电模块对所述备电控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电。供电后,所述控制组件生成第一存储指令并将所述第一存储指令下发至所述第三方非易失性随机访问存储器中的主控芯片,以便所述主控芯片根据所述第一存储指令将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。数据安全写入后,所述控制组件生成关闭指令并执行所述关闭指令,以使所述备电控制器中的所述备电模块停止对所述控制组件和所述第三方非易失性随机访问存储器进行供电。系统通过控制器中的控制组件来开启备电模块为第三方非易失性随机访问存储器及关闭备电模块,提高备电可控性。In this embodiment, when the storage array is powered off abnormally, one controller is determined from all the controllers in the storage array as the backup power controller, and the backup power module in the backup power controller is passed through the controller. Power is supplied to the control components in the backup power controller and the third-party non-volatile random access memory. After power is supplied, the control component generates a first storage instruction and sends the first storage instruction to the main control chip in the third-party non-volatile random access memory, so that the main control chip can A storage instruction stores the target data written in the cache space of the third-party non-volatile random access memory into the non-volatile medium of the third-party non-volatile random access memory. After the data is securely written, the control component generates a shutdown command and executes the shutdown command, so that the backup power module in the backup power controller stops the non-volatile operation of the control component and the third party. Random access memory is powered. The system uses the control components in the controller to turn on the backup power module as a third-party non-volatile random access memory and close the backup power module to improve the controllability of the backup power.

以下为本实施例对现有的存储阵列I/O数据写操作的效果和基于上述方案的存储阵列I/O数据写操作的效果进行的对比文说明,突出本申请方案的优势。The following is a comparative description of the effect of the existing storage array I/O data write operation and the effect of the storage array I/O data write operation based on the above solution in this embodiment, highlighting the advantages of the solution of the present application.

图5为现有技术中双控存储阵列I/O数据写操作流程架构。在判断判断I/O为Write类型后控制器0保留在其DRAM,然后通过PCIe镜像通道把I/O数据写入控制器0的DRAM,做好数据冗余备份。在这种设计下,单控支持2颗处理器、32根DDR5内存条、SSD系统盘,备电功耗越来越大(如表1)。单控制器备电时功耗1000W,如果选择18650的三元锂电芯,需12节组成4串3并。FIG. 5 is a flow structure of an I/O data write operation of a dual-control storage array in the prior art. After judging that the I/O is of the Write type, the controller 0 keeps its DRAM, and then writes the I/O data to the DRAM of the controller 0 through the PCIe mirror channel to make redundant data backup. Under this design, a single controller supports 2 processors, 32 DDR5 memory sticks, and an SSD system disk, and the backup power consumption is increasing (see Table 1). The power consumption of a single controller is 1000W when backing up. If you choose a 18650 ternary lithium battery, you need 12 cells to form 4 strings and 3 parallels.

表1Table 1

器件device 单个功耗(W)Single power consumption (W) 数量quantity 功耗(W)Power consumption (W) 处理器processor 350350 22 700700 内存条RAM 1010 3232 320320 SSDSSD 1515 11 1515 CPLDCPLD 33 11 33 合计total 10381038

图6为本申请方案中双控存储阵列I/O数据写操作流程架构。主机侧服务器把I/O数据写入控制器0的DRAM,控制器0分析I/O数据类型、用途、更新或保存的地址等;如果判断I/O为Write类型,控制器0保留在其DRAM,并写入NVRAM盘的DRAM中;控制器0 ERAM中的I/O数据变为Read类型,可以被清除或替替换;控制器0向控制器1同步管理信息,如I/O数据类型、数据大小、地址、保存在NVRAM的定位地址等信息,确保控制器1可直接获取NVRAM盘中的I/O数据。控制器0向主机侧的服务器发送信息,确认I/O写操作完成;服务器确认写操作结束。上述过程中,存储阵列I/O写操作流程去掉双控数据镜像同步操作,直接写入NVRAM盘DRAM完成I/O写操作。存储阵列异常掉电时,备电模块只需对NVRAM和控制器CPLD供电,确保NVRAM DRAM中的数据安全写入NVRAM的Flash介质中,实现存储阵列控制器的备电模块小型化,降低电芯数量,降低整机重量、空出更多的空间,优化系统散热,或控制器支持更高规格的处理器、数量更多的I/O卡等。FIG. 6 is a flow structure of the I/O data writing operation of the dual-control storage array in the solution of the application. The server on the host side writes the I/O data into the DRAM of controller 0, and controller 0 analyzes the I/O data type, purpose, address to update or save, etc.; DRAM, and write into DRAM of NVRAM disk; I/O data in controller 0 ERAM becomes Read type, which can be cleared or replaced; controller 0 synchronizes management information to controller 1, such as I/O data type , data size, address, location address stored in the NVRAM and other information to ensure that the controller 1 can directly obtain the I/O data in the NVRAM disk. Controller 0 sends information to the server on the host side to confirm that the I/O write operation is completed; the server confirms that the write operation is complete. In the above process, the I/O write operation process of the storage array removes the dual-control data mirror synchronization operation, and directly writes to the NVRAM disk DRAM to complete the I/O write operation. When the storage array is powered off abnormally, the backup power module only needs to supply power to the NVRAM and the controller CPLD, ensuring that the data in the NVRAM DRAM is safely written into the NVRAM Flash medium, realizing the miniaturization of the backup power module of the storage array controller and reducing the number of battery cells. Quantity, reduce the weight of the whole machine, free up more space, optimize system heat dissipation, or the controller supports higher specification processors, more I/O cards, etc.

在本申请方案中,备电模块只需对NVRAM盘、控制器的CPLD等更少的器件供电,可实现备电模块小型化,减轻整机质量。如表2,单控制器备电时功耗<100W,如果选择18650的三元锂电芯,只需3节,组成3串1并;电芯数量减少75%,大幅降低备电模块的体积、重量和成本。In the solution of the present application, the backup power module only needs to supply power to fewer devices such as the NVRAM disk and the CPLD of the controller, which can realize the miniaturization of the backup power module and reduce the quality of the whole machine. As shown in Table 2, the power consumption of a single controller for backup power is less than 100W. If you choose 18650 ternary lithium batteries, only 3 cells are needed to form 3 strings and 1 parallel; the number of cells is reduced by 75%, which greatly reduces the volume of the backup power module, weight and cost.

表2Table 2

器件device 单个功耗(W)Single power consumption (W) 数量quantity 功耗(W)Power consumption (W) NVRAMNVRAM 2020 22 4040 CPLDCPLD 33 11 33 合计total 4343

可以理解,电芯储存电荷,对温度和湿度敏感,具有一定危险性。如果备电模块的电芯数量多,则失效率会变高。当三元锂电芯超过12节时,额定电量有超过100Wh的风险,可能不允许航空运输。备电模块小型化后,电芯数量减少,失效率降低,且无航空运输管制的风险。备电模块体积缩小后,可优化存储阵列的散热,空出更多的空间支持更大功耗的处理器、支持更多的I/O卡等,提高产品规格。It is understandable that batteries store electric charges and are sensitive to temperature and humidity, which is dangerous to some extent. If the number of cells in the backup power module is large, the failure rate will increase. When the ternary lithium battery exceeds 12 cells, the rated power is at risk of exceeding 100Wh, and air transportation may not be allowed. After the backup power module is miniaturized, the number of cells is reduced, the failure rate is reduced, and there is no risk of air transportation control. After the size of the backup power module is reduced, it can optimize the heat dissipation of the storage array, free up more space to support processors with higher power consumption, support more I/O cards, etc., and improve product specifications.

参见图7所示,本申请实施例还相应公开了一种数据写入装置,包括:Referring to FIG. 7 , an embodiment of the present application also discloses a data writing device correspondingly, including:

第一缓存模块11,用于将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述目标控制器中的数据;The first cache module 11 is used to write the target data into the cache space of the third-party non-volatile random access memory connected to the target controller of the storage array; wherein, the target data is input into the target controller. data;

备电缓存模块12,用于当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。The backup power cache module 12 is used for, when the storage array is abnormally powered off, the backup power module arranged in the storage array only checks the control components in the controller where the backup power module is located and the third-party non-volatile The non-volatile random access memory is powered, so that the control component stores the target data written in the cache space of the third-party non-volatile random access memory to the non-volatile random access memory of the third-party non-volatile random access memory. in volatile media.

可见,本申请实施例先将目标数据写入与存储阵列的目标控制器连接的第三方非易失性随机访问存储器的缓存空间;其中,所述目标数据为输入所述目标控制器中的数据;当存储阵列异常掉电,则通过设置于所述存储阵列中的备电模块仅对所述备电模块所在控制器中的控制组件和所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。本申请实施例引入同时具有缓存和非易失性介质的第三方非易失性随机访问存储器,在利用存储阵列写入数据时,同时写入第三方非易失性随机访问存储器的缓存内,当存储阵列发生异常掉电,备电模块只需为第三方非易失性随机访问存储器和控制组件供电,在控制组件的指示下将缓存中的数据再次写入非易失性介质,备电模块的备电功耗不受存储阵列控制器的高性能设计影响,能够降低备电功耗,实现备电模块小型化,同时保证数据写入效率及数据可靠性。It can be seen that in this embodiment of the present application, the target data is first written into the cache space of the third-party non-volatile random access memory connected to the target controller of the storage array; wherein, the target data is the data input into the target controller When the storage array is abnormally powered down, the backup power module arranged in the storage array only supplies power to the control component and the third-party non-volatile random access memory in the controller where the backup power module is located, The control component is caused to store the target data written in the cache space of the third-party non-volatile random access memory into a non-volatile medium of the third-party non-volatile random access memory. The embodiment of the present application introduces a third-party non-volatile random access memory that has both a cache and a non-volatile medium. When data is written by using the storage array, it is simultaneously written into the cache of the third-party non-volatile random access memory. When the storage array is powered off abnormally, the backup power module only needs to supply power to the third-party non-volatile random access memory and the control component, and under the instruction of the control component, the data in the cache is written to the non-volatile medium again, and the backup power The backup power consumption of the module is not affected by the high-performance design of the storage array controller, which can reduce the backup power consumption, realize the miniaturization of the backup power module, and ensure the data writing efficiency and data reliability.

在一些具体实施例中,所述数据写入装置还包括:In some specific embodiments, the data writing device further includes:

第二缓存模块,用于控制所述目标控制器侧的服务器通过I/O接口向所述目标控制器输入所述目标数据,并将所述目标数据写入所述目标控制器的缓存空间;a second cache module, configured to control the server on the target controller side to input the target data to the target controller through an I/O interface, and write the target data into the cache space of the target controller;

操作类型判断模块,用于控制所述目标控制器对所述目标数据对应的I/O操作进行判断,若为写操作,则执行将所述目标数据写入所述第三方非易失性随机访问存储器的缓存空间的步骤;The operation type judgment module is used to control the target controller to judge the I/O operation corresponding to the target data, and if it is a write operation, execute writing the target data into the third-party non-volatile random the step of accessing the cache space of the memory;

数据类型修改模块,用于将所述目标数据的数据类型进行修改,以使写入所述目标控制器的缓存空间中所述目标数据能被清除或替换;a data type modification module, configured to modify the data type of the target data, so that the target data written in the cache space of the target controller can be cleared or replaced;

数据分析模块,用于控制所述目标控制器对所述目标数据进行分析得到所述目标数据的管理信息;a data analysis module, configured to control the target controller to analyze the target data to obtain management information of the target data;

第一发送模块,用于将所述管理信息发送至所述存储阵列中的其他控制器,以能通过其他控制器按照所述管理信息从所述第三方非易失性随机访问存储器中索引到相应数据;The first sending module is configured to send the management information to other controllers in the storage array, so that the other controllers can index from the third-party non-volatile random access memory to the third-party non-volatile random access memory according to the management information. corresponding data;

第二发送模块,用于将所述管理信息写入所述第三方非易失性随机访问存储器的缓存空间中,以使所述控制组件在存储阵列异常掉电将所述目标数据存储至所述非易失性介质中时,所述控制组件同时将所述第三方非易失性随机访问存储器的缓存空间中写入的所述管理信息存储至所述非易失性介质中;A second sending module, configured to write the management information into the cache space of the third-party non-volatile random access memory, so that the control component stores the target data to the third-party non-volatile random access memory when the storage array is powered off abnormally. When stored in the non-volatile medium, the control component simultaneously stores the management information written in the cache space of the third-party non-volatile random access memory into the non-volatile medium;

写入反馈模块,用于控制所述目标控制器向所述服务器发送确认信息,以使所述服务器在接收到所述确认信息后确认写入操作完成;a write feedback module, configured to control the target controller to send confirmation information to the server, so that the server confirms that the write operation is completed after receiving the confirmation information;

存储器备份模块,用于设置多个所述第三方非易失性随机访问存储器,并在多个所述第三方非易失性随机访问存储器的缓存空间中写入所述目标数据;当存储阵列异常掉电,则通过多个所述备电模块仅对所述备电模块所在控制器中的所述控制组件和至少一个所述第三方非易失性随机访问存储器进行供电,使得所述控制组件将至少一个所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的非易失性介质中。A memory backup module, configured to set a plurality of the third-party non-volatile random access memories, and write the target data in the cache spaces of the plurality of third-party non-volatile random access memories; when the storage array In case of abnormal power failure, the plurality of backup power modules only supply power to the control component and at least one third-party non-volatile random access memory in the controller where the backup power modules are located, so that the control The component stores the target data written in the cache space of at least one of the third-party non-volatile random access memory into a non-volatile medium of the third-party non-volatile random access memory.

在一些具体实施例中,所述第一发送模块,具体用于将所述管理信息发送至所述存储阵列中的其他控制器的缓存空间中。In some specific embodiments, the first sending module is specifically configured to send the management information to the cache space of other controllers in the storage array.

在一些具体实施例中,所述备电缓存模块12,具体包括:In some specific embodiments, the backup power cache module 12 specifically includes:

备电模块选择单元,用于从所述存储阵列中的全部控制器中确定出一个控制器作为备电控制器,并通过所述备电控制器中的所述备电模块仅对所述备电控制器中的所述控制组件和所述第三方非易失性随机访问存储器进行供电;The backup power module selection unit is used to determine one controller from all the controllers in the storage array as the backup power controller, and use the backup power module in the backup power controller to select only the backup power controller. the control component in the electrical controller and the third-party non-volatile random access memory for power supply;

缓存单元,用于所述控制组件生成第一存储指令并将所述第一存储指令下发至所述第三方非易失性随机访问存储器中的主控芯片,以便所述主控芯片根据所述第一存储指令将所述第三方非易失性随机访问存储器的缓存空间中写入的所述目标数据存储至所述第三方非易失性随机访问存储器的所述非易失性介质中。a cache unit, used for the control component to generate a first storage instruction and issue the first storage instruction to the main control chip in the third-party non-volatile random access memory, so that the main control chip can The first storage instruction stores the target data written in the cache space of the third-party non-volatile random access memory into the non-volatile medium of the third-party non-volatile random access memory .

在一些具体实施例中,所述数据写入装置还包括:In some specific embodiments, the data writing device further includes:

停止备电模块,用于所述控制组件生成关闭指令并执行所述关闭指令,以使所述备电控制器中的所述备电模块停止对所述控制组件和所述第三方非易失性随机访问存储器进行供电。Stop the backup power module, for the control component to generate a shutdown command and execute the shutdown command, so that the backup power module in the backup power controller stops the non-volatile operation of the control component and the third party powered by random access memory.

进一步的,本申请实施例还提供了一种电子设备。图8是根据一示例性实施例示出的电子设备20结构图,图中的内容不能认为是对本申请的使用范围的任何限制。Further, the embodiments of the present application also provide an electronic device. FIG. 8 is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the contents in the diagram should not be considered as any limitation on the scope of use of the present application.

图8为本申请实施例提供的一种电子设备20的结构示意图。该电子设备20,具体可以包括:至少一个处理器21、至少一个存储器22、电源23、通信接口24、输入输出接口25和通信总线26。其中,所述存储器22用于存储计算机程序,所述计算机程序由所述处理器21加载并执行,以实现前述任一实施例公开的数据写入方法中的相关步骤。另外,本实施例中的电子设备20具体可以为8。FIG. 8 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21 , at least one memory 22 , a power supply 23 , a communication interface 24 , an input and output interface 25 and a communication bus 26 . Wherein, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement relevant steps in the data writing method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may be 8 specifically.

本实施例中,电源23用于为电子设备20上的各硬件设备提供工作电压;通信接口24能够为电子设备20创建与外界设备之间的数据传输通道,其所遵循的通信协议是能够适用于本申请技术方案的任意通信协议,在此不对其进行具体限定;输入输出接口25,用于获取外界输入数据或向外界输出数据,其具体的接口类型可以根据具体应用需要进行选取,在此不进行具体限定。In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is applicable Any communication protocol in the technical solution of the present application is not specifically limited here; the input and output interface 25 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, here No specific limitation is made.

另外,存储器22作为资源存储的载体,可以是只读存储器、随机存储器、磁盘或者光盘等,其上所存储的资源可以包括操作系统221、计算机程序222及数据223等,存储方式可以是短暂存储或者永久存储。In addition, as a carrier for resource storage, the memory 22 can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc. The resources stored on it can include the operating system 221, the computer program 222, the data 223, etc., and the storage method can be short-term storage. or permanent storage.

其中,操作系统221用于管理与控制电子设备20上的各硬件设备以及计算机程序222,以实现处理器21对存储器22中海量数据223的运算与处理,其可以是Windows Server、Netware、Unix、Linux等。计算机程序222除了包括能够用于完成前述任一实施例公开的由电子设备20执行的数据写入方法的计算机程序之外,还可以进一步包括能够用于完成其他特定工作的计算机程序。数据223可以包括电子设备20收集到的目标数据。The operating system 221 is used to manage and control each hardware device and computer program 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows Server, Netware, Unix, Linux etc. The computer program 222 may further include a computer program that can be used to complete other specific tasks in addition to the computer program that can be used to complete the data writing method performed by the electronic device 20 disclosed in any of the foregoing embodiments. Data 223 may include target data collected by electronic device 20 .

进一步的,本申请实施例还公开了一种存储介质,所述存储介质中存储有计算机程序,所述计算机程序被处理器加载并执行时,实现前述任一实施例公开的数据写入方法步骤。Further, an embodiment of the present application also discloses a storage medium, where a computer program is stored in the storage medium, and when the computer program is loaded and executed by a processor, the steps of the data writing method disclosed in any of the foregoing embodiments are implemented. .

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个…”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上对本发明所提供的数据写入方法、装置、设备及存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The data writing method, device, device and storage medium provided by the present invention have been described in detail above. Specific examples are used in this paper to illustrate the principles and implementations of the present invention. The descriptions of the above embodiments are only used to help understanding The method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be It is understood as a limitation of the present invention.

Claims (15)

1. A method of writing data, comprising:
writing the target data into a cache space of a third-party nonvolatile random access memory connected with a target controller of the storage array; wherein the target data is data input into the target controller;
when the storage array is abnormally powered off, the standby power module arranged in the storage array only supplies power to the control component in the controller where the standby power module is located and the third-party nonvolatile random access memory, so that the control component stores the target data written in the cache space of the third-party nonvolatile random access memory into the nonvolatile medium of the third-party nonvolatile random access memory.
2. The data writing method according to claim 1, wherein before writing the target data into the cache space of the third-party nonvolatile random access memory connected to the storage array, the method further comprises:
controlling a server on the side of the target controller to input the target data to the target controller through an I/O (input/output) interface and writing the target data into a cache space of the target controller;
after the target data is written into the cache space of the third-party nonvolatile random access memory connected with the target controller of the storage array, the method further comprises the following steps:
and modifying the data type of the target data in the cache space of the target controller so that the target data written into the cache space of the target controller can be cleared or replaced.
3. The data writing method according to claim 2, wherein after the writing the target data into the cache space of the target controller, further comprising:
and controlling the target controller to judge the I/O operation corresponding to the target data, and if the I/O operation is a write operation, executing the step of writing the target data into the cache space of the third-party nonvolatile random access memory.
4. The data writing method according to claim 2, wherein after the writing the target data into the cache space of the target controller, further comprising:
and controlling the target controller to analyze the target data to obtain management information of the target data, and sending the management information to other controllers in the storage array so as to index corresponding data from the third-party nonvolatile random access memory through the other controllers according to the management information.
5. The data writing method according to claim 4, wherein the sending the management information to other controllers in the storage array comprises:
and sending the management information to the cache spaces of other controllers in the storage array.
6. The data writing method according to claim 4, wherein after sending the management information to other controllers in the storage array, further comprising:
and controlling the target controller to send confirmation information to the server so that the server confirms that the writing operation is completed after receiving the confirmation information.
7. The data writing method according to claim 4, wherein after the target controller is controlled to analyze the target data to obtain the management information of the target data, the method further comprises:
and writing the management information into a cache space of the third-party nonvolatile random access memory, so that when the control component stores the target data into the nonvolatile medium due to abnormal power failure of the storage array, the control component simultaneously stores the management information written into the cache space of the third-party nonvolatile random access memory into the nonvolatile medium.
8. The data writing method according to claim 1, further comprising:
setting a plurality of third-party nonvolatile random access memories, and writing the target data in cache spaces of the plurality of third-party nonvolatile random access memories;
when the storage array is abnormally powered off, the control assembly in the controller of the power backup module and the at least one third-party nonvolatile random access memory are only powered by the plurality of power backup modules, so that the control assembly stores the target data written in the cache space of the at least one third-party nonvolatile random access memory into the nonvolatile medium of the third-party nonvolatile random access memory.
9. The data writing method according to claim 1, wherein the memory array is a dual controller memory array, and the third-party nonvolatile random access memory is a dual port nonvolatile random access memory; and two ports of the third-party nonvolatile random access memory are respectively connected with two controllers in the storage array.
10. The data writing method according to any one of claims 1 to 9, wherein the standby power module is provided in each controller in the storage array;
the power supply for only the control component in the controller where the power supply module is located and the third-party nonvolatile random access memory through the power supply module arranged in the storage array comprises:
determining one controller from all controllers in the storage array as a standby power controller, and only supplying power to the control component in the standby power controller and the third-party nonvolatile random access memory through the standby power module in the standby power controller.
11. The data writing method according to claim 10, wherein the control component stores the target data written in the cache space of the third-party nonvolatile random access memory into a nonvolatile medium of the third-party nonvolatile random access memory, further comprising:
the control component generates a first storage instruction and issues the first storage instruction to a main control chip in the third-party nonvolatile random access memory, so that the main control chip stores the target data written in the cache space of the third-party nonvolatile random access memory into the nonvolatile medium of the third-party nonvolatile random access memory according to the first storage instruction.
12. The data writing method according to claim 10, wherein after the control component stores the target data written in the cache space of the third-party nonvolatile random access memory into the nonvolatile medium of the third-party nonvolatile random access memory, the method further comprises:
the control component generates a closing instruction and executes the closing instruction, so that the power standby module in the power standby controller stops supplying power to the control component and the third-party nonvolatile random access memory.
13. A data writing apparatus, comprising:
the first cache module is used for writing the target data into a cache space of a third-party nonvolatile random access memory connected with a target controller of the storage array; wherein the target data is data input into the target controller;
and the standby power cache module is used for supplying power to the control component in the controller of the standby power module and the third-party nonvolatile random access memory only through the standby power module arranged in the storage array when the storage array is abnormally powered down, so that the control component stores the target data written in the cache space of the third-party nonvolatile random access memory into the nonvolatile medium of the third-party nonvolatile random access memory.
14. An electronic device, comprising a processor and a memory; wherein the memory is used for storing a computer program which is loaded and executed by the processor to implement the data writing method according to any one of claims 1 to 12.
15. A computer-readable storage medium storing computer-executable instructions which, when loaded and executed by a processor, implement a data writing method as claimed in any one of claims 1 to 12.
CN202211075892.2A 2022-09-05 2022-09-05 Data writing method, device, equipment and storage medium Pending CN115167784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211075892.2A CN115167784A (en) 2022-09-05 2022-09-05 Data writing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211075892.2A CN115167784A (en) 2022-09-05 2022-09-05 Data writing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115167784A true CN115167784A (en) 2022-10-11

Family

ID=83482125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211075892.2A Pending CN115167784A (en) 2022-09-05 2022-09-05 Data writing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115167784A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115629713A (en) * 2022-12-06 2023-01-20 苏州浪潮智能科技有限公司 A data synchronization method, device, equipment and medium
CN116185713A (en) * 2023-02-06 2023-05-30 超聚变数字技术有限公司 Power-down protection method for solid state disk, solid state disk and computing device
CN117472294A (en) * 2023-12-28 2024-01-30 合肥康芯威存储技术有限公司 Memory and data processing method thereof
WO2024193142A1 (en) * 2023-03-22 2024-09-26 华为技术有限公司 Storage apparatus and method, device, and storage system
CN118708125A (en) * 2024-08-27 2024-09-27 苏州元脑智能科技有限公司 A write cache space management method, device, medium and computer program product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077246A (en) * 2014-07-02 2014-10-01 浪潮(北京)电子信息产业有限公司 Device for realizing volatile memory backup
CN109085909A (en) * 2018-07-25 2018-12-25 郑州云海信息技术有限公司 A kind of distribution of disk array standby method for electrically and device
CN111679794A (en) * 2020-06-17 2020-09-18 北京中存超为科技有限公司 Method and device for data synchronization in multi-control storage system
CN111880636A (en) * 2020-07-30 2020-11-03 北京浪潮数据技术有限公司 Power-off protection method of storage array and related device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077246A (en) * 2014-07-02 2014-10-01 浪潮(北京)电子信息产业有限公司 Device for realizing volatile memory backup
CN109085909A (en) * 2018-07-25 2018-12-25 郑州云海信息技术有限公司 A kind of distribution of disk array standby method for electrically and device
CN111679794A (en) * 2020-06-17 2020-09-18 北京中存超为科技有限公司 Method and device for data synchronization in multi-control storage system
CN111880636A (en) * 2020-07-30 2020-11-03 北京浪潮数据技术有限公司 Power-off protection method of storage array and related device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115629713A (en) * 2022-12-06 2023-01-20 苏州浪潮智能科技有限公司 A data synchronization method, device, equipment and medium
CN116185713A (en) * 2023-02-06 2023-05-30 超聚变数字技术有限公司 Power-down protection method for solid state disk, solid state disk and computing device
WO2024193142A1 (en) * 2023-03-22 2024-09-26 华为技术有限公司 Storage apparatus and method, device, and storage system
CN117472294A (en) * 2023-12-28 2024-01-30 合肥康芯威存储技术有限公司 Memory and data processing method thereof
CN117472294B (en) * 2023-12-28 2024-04-09 合肥康芯威存储技术有限公司 Memory and data processing method thereof
CN118708125A (en) * 2024-08-27 2024-09-27 苏州元脑智能科技有限公司 A write cache space management method, device, medium and computer program product

Similar Documents

Publication Publication Date Title
CN115167784A (en) Data writing method, device, equipment and storage medium
US20240020024A1 (en) Non-volatile memory storage for multi-channel memory system
US9110669B2 (en) Power management of a storage device including multiple processing cores
US9696922B2 (en) Storage system
CN104407933B (en) A kind of backup method and device of data
US20080091876A1 (en) Storage apparatus and control method thereof
US20180074708A1 (en) Trim management in solid state drives
US10645164B1 (en) Consistent latency for solid state drives
KR102114109B1 (en) Data storage device
US11507307B2 (en) Storage system including a memory controller that enables each storage controller of a plurality of storage controllers to exclusively read and write control information of the memory
CN106066890B (en) Distributed high-performance database all-in-one machine system
US8832355B2 (en) Storage device, storage controlling device, and storage controlling method
CN101710252B (en) Power supply method and power supply device of storage system
CN102541458A (en) A method for improving data writing speed of electronic hard disk
US11537193B2 (en) Shaped and optimized power cycles
CN107122316A (en) A kind of SOC is for method for electrically and SOC
CN105808462B (en) FPGA (field programmable Gate array) -based simulation memory, realization method of simulation memory and computer
WO2024169299A1 (en) Storage method and apparatus, device, and non-volatile readable storage medium
TW201533657A (en) Information processing system and storage device
KR101512741B1 (en) Network-capable RAID controller for a semiconcuctor Storage Device
US12175125B2 (en) Data storage devices, systems, and related methods for grouping commands of doorbell transactions from host devices
CN104050108A (en) Storage device and system and data storage method
US20250028457A1 (en) Highly Efficient SSD Power Management Through PCIe Data Rate Modulation
US9836359B2 (en) Storage and control method of the same
CN113535666A (en) Data writing method and device, database system, storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20221011

RJ01 Rejection of invention patent application after publication