WO2015149577A1 - Storage system, storage device and data storage method - Google Patents

Storage system, storage device and data storage method Download PDF

Info

Publication number
WO2015149577A1
WO2015149577A1 PCT/CN2015/071031 CN2015071031W WO2015149577A1 WO 2015149577 A1 WO2015149577 A1 WO 2015149577A1 CN 2015071031 W CN2015071031 W CN 2015071031W WO 2015149577 A1 WO2015149577 A1 WO 2015149577A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
storage
service data
cache
unit
Prior art date
Application number
PCT/CN2015/071031
Other languages
French (fr)
Chinese (zh)
Inventor
张洪岽
王娜
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015149577A1 publication Critical patent/WO2015149577A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2015Redundant power supplies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/21Employing a record carrier using a specific recording technology
    • G06F2212/214Solid state disk

Definitions

  • the present invention relates to the field of data storage, and in particular, to a storage system, a storage device, and a data storage method.
  • a first-level cache (Cache) is usually provided in the existing storage system.
  • the storage system When writing data, the storage system firstly receives and caches the data sent by the front-end service through the Cache, and then moves the data to the memory with slow writing speed.
  • the cache cache is a volatile storage unit, the cached data is also lost when the system is powered off.
  • the existing storage system usually sets backup power to the central processing unit and the memory portion, and divides a part of the memory into a cache of the memory.
  • the backup power supply is separately powered by the central processing unit and the memory, and the central processing unit controls the memory to enter the self-refresh mode, thereby avoiding data loss in the memory.
  • the self-refresh mode of the memory can only be maintained for a period of time. If the external power supply is still not restored before the backup power is exhausted, the data in the memory will also be lost, and the protection performance is better. Low; Secondly, the memory capacity in the system is limited, and the part divided into Cache is less, which cannot meet the cache requirement of the large-capacity memory, thereby limiting the capacity expansion of the storage system.
  • the present invention provides a storage system, a memory, a data protection method, and a control unit.
  • the technical solution is as follows:
  • the front-end interface is configured to receive service data, and send the service data to a cache unit of at least one of the plurality of storage devices;
  • the at least one storage device is configured to receive the service data and cache the cache unit to the at least one storage device; when the external power source is powered off, the backup power source that starts the at least one storage device is the The at least one storage device is powered to write the service data in the cache unit of the at least one storage device to the non-volatile storage unit of the at least one storage device.
  • the front end interface sends the service data to a cache unit of the at least one of the plurality of storage devices, specifically:
  • the front end interface sends the service data to the controller, and the controller sends the service data to a cache unit of the at least one storage device;
  • each of the backup power sources supplies power to one of the storage devices.
  • the at least one storage device is configured to close the at least after the service data is completely written into the non-volatile storage unit of the at least one storage device A backup power source for a storage device.
  • the at least one storage device is configured to cache the service data to a cache unit of the at least one storage device when the external power source resumes power supply.
  • a storage device in a second aspect, is provided, the storage device being used in a storage system as described above, the storage device comprising: a cache unit, a non-volatile storage unit, a data receiving module, a first cache module, and a power supply Starting the module and writing the module;
  • the data receiving module is configured to receive service data sent by the front end interface
  • the first cache module is configured to cache the service data to the cache unit
  • the power boot module is configured to start standby power of the storage device when the external power source is powered off The source supplies power to the storage device;
  • the writing module is configured to write the service data in the cache unit to the non-volatile storage unit.
  • the data receiving module is specific
  • the method is configured to receive the service data that is sent by the front end interface by using a direct memory access.
  • a power-off module configured to turn off the backup power after the write module completely writes the service data to the non-volatile storage unit.
  • the storage device further includes:
  • a second cache module configured to cache the service data to the cache unit when the external power source resumes power supply.
  • a data storage method is provided, the method being used in a storage device as described above, the storage device comprising a cache unit and a non-volatile storage unit; the method comprising:
  • the backup power source that starts the storage device supplies power to the storage device, and writes the service data in the cache unit to the non-volatile storage unit.
  • the receiving the service data sent by the front end interface includes:
  • the method further includes:
  • the backup power source is turned off.
  • the method further includes:
  • the service data is buffered to the cache unit.
  • the received service data is sent to the cache unit in the storage device through the front-end interface.
  • the storage device starts the backup power of the storage device, and writes the service data in the cache unit to the non-volatile device.
  • the volatile storage unit solves the problem that the data in the memory is lost due to the external power supply still not recovering the power supply before the backup power source is exhausted, and the protection performance is improved.
  • the cache setting of the controller is composed of the cache unit of each storage device, and the cache unit is used as the cache of the non-volatile storage unit in the storage device.
  • the storage system only needs to increase the number of storage devices, that is, the storage capacity can be performed.
  • the invention solves the problem that the memory capacity of the storage system in the prior art is limited, and the cache requirement of the large-capacity non-volatile storage unit cannot be satisfied, and the effect of improving the expansion performance of the storage system is achieved.
  • FIG. 1 is a system configuration diagram of a storage system according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for storing a data according to an embodiment of the present invention
  • the front-end interface 102 is configured to receive service data, and send the service data to a cache unit 106a of at least one of the plurality of storage devices 106;
  • the storage system can include a front end interface 202, a controller 204, and a plurality of storage devices 206; an external power supply 208 powering the front end interface 202, the controller 204, and the storage device 206; each of the storage devices 206 The buffer unit 206a and the non-volatile storage unit 206b; wherein the cache of the controller 204 is composed of the cache unit of the plurality of storage devices 206a;
  • the controller of the storage system may not set a separate cache, but distribute the cache of the controller to each storage device, and the cache list in each storage device
  • the yuan assumes the role of the controller's cache.
  • the cache unit of each storage device may be set as a prefetchable memory space, so that the controller can directly access the address in the cache unit of each storage device, for example, the CPU may directly The data is written to the specified address in the cache unit, or the CPU can directly read the data in the specified address of the cache unit.
  • the front-end interface 202 is configured to receive service data, and send the service data to the cache unit 206a of the at least one of the plurality of storage devices 206;
  • a front-end interface can send the same service data to two or more storage devices.
  • data in one storage device is lost, backup data in other storage devices can be enabled, thereby improving data security.
  • Sex When data in one storage device is lost, backup data in other storage devices can be enabled, thereby improving data security.
  • the front-end interface 202 may send the service data to the controller 204, and the controller 204 sends the service data to the cache unit 206b of the at least one storage device 206; or the front-end interface
  • the service data may also be sent to the cache unit 206b of the one less storage device 206 by direct memory access.
  • the service data may be sent to the controller first, and the service data is written by the controller to the cache unit in the storage device, or the front-end interface may also pass DMA (Direct Memory Access).
  • the direct memory access engine queries the controller for the address of the cache unit included in the storage device, and sends the service data directly to the storage device according to the queried address.
  • the at least one storage device 206 is configured to receive the service data and cache the buffer unit 206a of the at least one storage device 206; when the external power source 208 is powered down, start the at least one storage device 206
  • the backup power source 210 supplies power to the at least one storage device 206, and writes the service data in the cache unit 206a of the at least one storage device 206 to the non-volatile storage unit 206b of the at least one storage device 206.
  • the standby power supply may be in an initial state when the controller detects the external power supply drop point, and may control the standby power supply to start to supply power to the storage device; or, the standby power supply may be set to a voltage slightly lower than The voltage of the external power supply is always on. Because the external power supply voltage is slightly higher, when the external power supply works normally, the storage device is powered by the external power supply. When the external power supply is powered off, the backup power supply starts to supply power.
  • the controller may send a power failure notification to each storage device, and after receiving the power failure notification, the storage device transfers the data in the cache unit to the nonvolatile storage unit to Avoid losing data in the cache unit after the backup power is exhausted.
  • AC/DC Alternating Current/Direct Current, AC input/DC output
  • the cache unit may be composed of a static random storage chip, or may be composed of a dynamic random access memory chip, such as a DDR (Double Data Rate Synchronous Dynamic Random Access Memory) 2, DDR3 or DDR4 particles.
  • the cache unit capacity is smaller than the non-volatile memory unit, but the read/write speed is fast.
  • Each of the backup power sources 210 supplies power to one of the storage devices 206.
  • the storage device can be set to be powered by a separate backup power supply.
  • the backup power supplies fails, only the storage device corresponding to the backup power supply is affected, and other storage devices can still work.
  • the at least one storage device 206 is configured to turn off the backup power source 210 of the at least one storage device 206 after the service data is completely written into the non-volatile storage unit 206b of the at least one storage device 206.
  • the backup power source usually uses a battery to store the power, and if the battery continues to discharge when the discharge exceeds the discharge end voltage value, the internal pressure of the battery may increase, and the reversibility of the positive and negative active materials may be affected. Damage, resulting in a significant reduction in battery capacity.
  • the backup power supply can be controlled to stop the power supply.
  • the service data cached in the cache unit may be data to be accessed by the controller in the storage system. Therefore, when the external power source resumes power supply, the storage device may write the service data stored by the cache unit before the power failure to the cache unit again. So that the controller can quickly access the read. For example, when the external power supply of the storage system is restored, the controller sends a power restoration notification to each storage device. After receiving the power restoration notification, the storage device detects that the external power supply resumes power supply, and then starts to further detect whether the storage system is completely restored. Normally, if it is detected that the storage system is completely restored, the stored service data in the cache unit before the power failure is resumed from the non-volatile storage unit and written back to the cache unit.
  • control unit After the control unit writes the data back to the cache unit, the control unit notifies the storage system to restore the data storage or data read.
  • the service unit may also rewrite the stored service data in the cache unit from the non-volatile storage unit back to the cache unit after the power-off notification is received.
  • the storage device 206 is further configured to control the backup power source 210 to start charging after detecting that the external power source 208 resumes power supply.
  • the cache setting of the controller is composed of a cache unit of each storage device, and the cache unit is used as a cache of a non-volatile storage unit in the storage device, and the storage system only needs to increase storage.
  • the number of devices can expand the storage capacity, which solves the problem that the memory capacity of the storage system in the prior art is limited, and cannot meet the cache requirement of the large-capacity non-volatile storage unit, thereby improving the expansion performance of the storage system.
  • the storage device is further configured to control the standby power supply to stop the power supply after detecting that the data is completely written into the non-volatile storage unit, thereby avoiding over-discharge of the standby power supply, thereby improving the service life of the device.
  • FIG. 3 is a schematic structural diagram of a storage device according to an embodiment of the present invention.
  • the storage device may be a general-purpose storage device such as a hard disk for use in the data storage system as shown in FIG. 1 or FIG. 2 above.
  • the storage system includes: a front end interface, a controller, and a plurality of storage devices; the external power supply supplies power to the front end interface, the controller, and the storage device; the storage device may include: a cache unit 301, a nonvolatile storage unit 302, and data.
  • the cache of the controller is composed of cache units of a plurality of storage devices;
  • the data receiving module 303 is configured to receive service data sent by the front end interface.
  • the first cache module 304 is configured to cache the service data to the cache unit 301;
  • the power startup module 305 is configured to: when the external power is powered off, start the backup power of the storage device to supply power to the storage device;
  • the writing module 306 is configured to write the service data in the cache unit 301 to the non-volatile storage unit 302.
  • the storage device receives the service data sent by the front-end interface and caches the cache unit.
  • the storage device starts the backup power of the storage device, and the cache unit is The service data is written into the non-volatile storage unit, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the protection performance is improved.
  • the storage device provided by the embodiment of the present invention, by setting the cache unit of the storage device as a component of the cache of the controller and using the cache unit as a cache of the non-volatile storage unit, the storage system only needs to increase the number of storage devices. That is, the storage capacity can be expanded, which solves the problem that the memory capacity of the storage system in the prior art is limited, and cannot meet the cache requirement of the large-capacity non-volatile storage unit, thereby achieving the effect of improving the expansion performance of the storage system.
  • FIG. 4 is a schematic structural diagram of a storage device according to an embodiment of the present invention.
  • the storage device may be a general-purpose storage device such as a hard disk for use in the data storage system as shown in FIG. 1 or FIG. 2 above.
  • the storage system includes: a front end interface, a controller, and a plurality of storage devices; the external power supply supplies power to the front end interface, the controller, and the storage device; the storage device may include: a cache unit 401, a nonvolatile storage unit 402, and data. a receiving module 403, a first cache module 404, a power boot module 405, and a write module 406; the cache of the controller is composed of cache units of a plurality of storage devices;
  • the data receiving module 403 is configured to receive service data sent by the front end interface
  • the first cache module 404 is configured to cache the service data to the cache unit 401;
  • the power boot module 405 is configured to start a backup power of the storage device to supply power to the storage device when the external power source is powered off;
  • the writing module 406 is configured to write the service data in the cache unit 401 to the non-volatile storage unit 402.
  • the controller (such as the central processing unit CPU) may not set a separate cache, but distribute the controller's cache to each storage device, and the cache in each storage device.
  • the unit assumes the role of the controller's cache.
  • the cache unit of each storage device can be set as a prefetchable memory space, so that the controller can directly access the address in the cache unit of each storage device, for example, the CPU can directly write data to the specified address in the cache unit. Or, the CPU can also directly read the data in the specified address of the cache unit.
  • the data receiving module 403 is specifically configured to receive the service data sent by the controller, where the data service is sent by the front end interface to the controller; or specifically, the front end interface is sent by using a direct memory access form.
  • the business data is specifically configured to receive the service data sent by the controller, where the data service is sent by the front end interface to the controller; or specifically, the front end interface is sent by using a direct memory access form.
  • the business data is specifically configured to receive the service data sent by the controller, where the data service is sent by the front end interface to the controller; or specifically, the front end interface is sent by using a direct memory access form.
  • the service data may be sent to the controller first, and the service data is written by the controller to the cache unit in the storage device, or the front-end interface may also pass DMA (Direct Memory Access).
  • the direct memory access engine queries the controller for the address of the cache unit included in the storage device, and sends the service data directly to the storage device according to the queried address.
  • the standby power supply may be in an initial state when the controller detects the external power supply drop point, and may control the standby power supply to start to supply power to the storage device; or, the standby power supply may be set to a voltage slightly lower than The voltage of the external power supply is always on. Because the external power supply voltage is slightly higher, when the external power supply works normally, the storage device is powered by the external power supply. When the external power supply is powered off, the backup power supply starts to supply power.
  • the controller may send a power-off notification to each storage device, and the storage device receives the power-off notification. Transfer the data in the cache unit to the non-volatile storage unit to prevent the data in the cache unit from being lost after the backup power is exhausted.
  • AC/DC Alternating Current/Direct Current
  • the cache unit may be composed of a static random storage chip, or may be composed of a dynamic random access memory chip, such as a DDR (Double Data Rate Synchronous Dynamic Random Access Memory) 2, DDR3 or DDR4 particles.
  • the cache unit capacity is smaller than the non-volatile memory unit, but the read/write speed is fast.
  • each backup power supply only supplies power to one storage device.
  • the controller may send a power-off notification to each storage device, and the storage device receives the power-off notification. Transfer the data in the cache unit to the non-volatile storage unit to prevent the data in the cache unit from being lost after the backup power is exhausted.
  • AC/DC Alternating Current/Direct Current
  • Step 608 When the external power source resumes power supply, the service data is buffered to the cache unit.
  • the service data cached in the cache unit may be data to be accessed by the controller in the storage system. Therefore, when the external power source resumes power supply, the storage device may write the service data stored by the cache unit before the power failure to the cache unit again. So that the controller can quickly access the read. For example, when the external power supply of the storage system is restored, the controller sends a power restoration notification to each storage device. After receiving the power restoration notification, the storage device detects that the external power supply resumes power supply, and then starts to further detect whether the storage system is completely restored. Normally, if it is detected that the storage system is completely restored, the stored service data in the cache unit before the power failure is resumed from the non-volatile storage unit and written back to the cache unit.
  • control unit After the control unit writes the data back to the cache unit, the control unit notifies the storage system to resume the data storage or the data read service; or the control unit may restart the stored service data in the cache unit before the power is cut off after receiving the power restoration notification.
  • the cache unit is written back from the non-volatile memory unit.
  • the data storage method receives the service data sent by the front-end interface and caches the cache unit.
  • the storage device starts the backup power of the storage device, and the cache unit is
  • the service data in the non-volatile storage unit is solved, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the protection performance is improved.
  • the data storage method provided by the embodiment of the present invention controls the standby power supply to stop the power supply after detecting that the data is completely written into the non-volatile storage unit, thereby avoiding the over-discharge of the standby power supply and achieving the effect of improving the service life of the device.
  • the storage device provided by the foregoing embodiment stores data
  • only the division of each functional module is described.
  • the function distribution may be completed by different functional modules according to requirements.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the storage device provided by the foregoing embodiment is in the same concept as the data storage method embodiment, and the specific implementation process is described in the method embodiment. Said.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

A storage system, a storage device and a data storage method, which relate to the field of data storage. The storage system comprises a front-end interface (102), a controller (104), and a storage device (106). The storage device (106) comprises a cache unit (106a) and a nonvolatile storage unit (106b). Service data is sent to the cache unit (106a) of the storage device (106) through the front-end interface (102); the storage device (106) receives the serve data and caches the service data to the cache unit (106a); when an external power source (108) is powered down, a standby power source (110) is started to supply power to the storage device (106), and the service data in the cache unit (106a) is written to the nonvolatile storage unit (106b). The received service data is sent to the cache unit (106a) in the storage device (106) through the front-end interface (102), and when the external power source (108) is powered down, the storage device (106) starts the standby power source (110) and writes the service data in the cache unit (106a) to the nonvolatile storage unit (106b), so as to solve the problem in the prior art that data in a memory is lost because the external power source (108) does not restore power supply before the electric quantity of the standby power source (110) is used up, thereby achieving the effect of improving protection performance.

Description

存储系统、存储设备及数据存储方法Storage system, storage device and data storage method 技术领域Technical field
本发明涉及数据存储领域,特别涉及一种存储系统、存储设备及数据存储方法。The present invention relates to the field of data storage, and in particular, to a storage system, a storage device, and a data storage method.
背景技术Background technique
为了提高I/O(In put/Out put,输入/输出)应对能力,现有的存储系统中通常设置有一级高速缓存(Cache)。在写入数据时,存储系统首先通过Cache快速接收并缓存前端业务发送的数据,再将数据搬移到写入速度较慢的存储器中。In order to improve the I/O (Input/Out put) response capability, a first-level cache (Cache) is usually provided in the existing storage system. When writing data, the storage system firstly receives and caches the data sent by the front-end service through the Cache, and then moves the data to the memory with slow writing speed.
由于高速缓存Cache为易失性存储单元,在系统断电时,其中缓存的数据也会丢失。为了在系统断电时能够有效保护缓存中的数据,现有的存储系统通常对中央处理器和内存部分设置备份电源,并将一部分内存划分为存储器的Cache,当系统外部电源断电时,启动备份电源为中央处理器和内存单独供电,中央处理器控制内存进入自刷新模式,从而避免内存中的数据丢失。Since the cache cache is a volatile storage unit, the cached data is also lost when the system is powered off. In order to effectively protect the data in the cache when the system is powered off, the existing storage system usually sets backup power to the central processing unit and the memory portion, and divides a part of the memory into a cache of the memory. When the external power supply of the system is powered off, the system starts. The backup power supply is separately powered by the central processing unit and the memory, and the central processing unit controls the memory to enter the self-refresh mode, thereby avoiding data loss in the memory.
现有技术至少存在以下问题:The prior art has at least the following problems:
首先,受限于备份电源的电量,内存的自刷新模式通常只能维持一段时间,若在备份电源的电量耗尽之前外部电源依然没有恢复供电,则内存中的数据同样会丢失,保护性能较低;其次,系统中的内存容量有限,划分为Cache的部分更少,无法满足大容量存储器的缓存需求,从而限制了存储系统的容量扩展。First of all, limited by the power of the backup power supply, the self-refresh mode of the memory can only be maintained for a period of time. If the external power supply is still not restored before the backup power is exhausted, the data in the memory will also be lost, and the protection performance is better. Low; Secondly, the memory capacity in the system is limited, and the part divided into Cache is less, which cannot meet the cache requirement of the large-capacity memory, thereby limiting the capacity expansion of the storage system.
发明内容Summary of the invention
为了解决现有技术中备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,以及系统中的内存容量有限,无法满足大容量的非易失性存储单元的缓存需求,从而限制了存储系统的容量扩展的问题,本发明实施例提供了一种存储系统、存储器、数据保护方法及控制单元。所述技术方案如下:In order to solve the problem that the backup power supply in the prior art is exhausted before the power is exhausted, the data in the memory is lost, and the memory capacity in the system is limited, and the cache of the large-capacity non-volatile storage unit cannot be satisfied. The present invention provides a storage system, a memory, a data protection method, and a control unit. The technical solution is as follows:
第一方面,提供了一种存储系统,所述存储系统包括:前端接口、控制器和若干个存储设备;外部电源为所述前端接口、所述控制器和所述存储设备供 电;每个所述存储设备包括:缓存单元和非易失性存储单元;其中,所述控制器的缓存由所述若干个存储设备的缓存单元组成;In a first aspect, a storage system is provided, the storage system comprising: a front end interface, a controller, and a plurality of storage devices; an external power supply for the front end interface, the controller, and the storage device Each of the storage devices includes: a cache unit and a non-volatile storage unit; wherein the cache of the controller is composed of cache units of the plurality of storage devices;
所述前端接口,用于接收业务数据,并向所述若干个存储设备中的至少一个存储设备的缓存单元发送所述业务数据;The front-end interface is configured to receive service data, and send the service data to a cache unit of at least one of the plurality of storage devices;
所述至少一个存储设备,用于接收所述业务数据,并缓存到所述至少一个存储设备的缓存单元;当所述外部电源掉电时,启动所述至少一个存储设备的备用电源为所述至少一个存储设备供电,将所述至少一个存储设备的缓存单元中的所述业务数据写入所述至少一个存储设备的非易失性存储单元。The at least one storage device is configured to receive the service data and cache the cache unit to the at least one storage device; when the external power source is powered off, the backup power source that starts the at least one storage device is the The at least one storage device is powered to write the service data in the cache unit of the at least one storage device to the non-volatile storage unit of the at least one storage device.
在第一方面的第一种可能实现方式中,所述前端接口向所述若干个存储设备中的至少一个存储设备的缓存单元发送所述业务数据,具体包括:In a first possible implementation manner of the first aspect, the front end interface sends the service data to a cache unit of the at least one of the plurality of storage devices, specifically:
所述前端接口向所述控制器发送所述业务数据,所述控制器将所述业务数据发送至所述至少一个存储设备的缓存单元;The front end interface sends the service data to the controller, and the controller sends the service data to a cache unit of the at least one storage device;
或者,or,
所述前端接口通过直接内存访问形式将所述业务数据发送至所述少一个存储设备的缓存单元。The front end interface sends the service data to a cache unit of the one storage device by a direct memory access form.
在第一方面的第二种可能实现方式中,每个所述备用电源为一个所述存储设备供电。In a second possible implementation of the first aspect, each of the backup power sources supplies power to one of the storage devices.
在第一方面的第三种可能实现方式中,所述至少一个存储设备,用于在将所述业务数据完全写入所述至少一个存储设备的非易失性存储单元后,关闭所述至少一个存储设备的备用电源。In a third possible implementation manner of the first aspect, the at least one storage device is configured to close the at least after the service data is completely written into the non-volatile storage unit of the at least one storage device A backup power source for a storage device.
在第一方面的第四种可能实现方式中,所述至少一个存储设备,用于当所述外部电源恢复供电时,将所述业务数据缓存至所述至少一个存储设备的缓存单元。In a fourth possible implementation manner of the first aspect, the at least one storage device is configured to cache the service data to a cache unit of the at least one storage device when the external power source resumes power supply.
第二方面,提供了一种存储设备,所述存储设备用于如上所述的存储系统,所述存储设备包括:缓存单元、非易失性存储单元、数据接收模块、第一缓存模块、电源启动模块以及写入模块;In a second aspect, a storage device is provided, the storage device being used in a storage system as described above, the storage device comprising: a cache unit, a non-volatile storage unit, a data receiving module, a first cache module, and a power supply Starting the module and writing the module;
所述数据接收模块,用于接收前端接口发送的业务数据;The data receiving module is configured to receive service data sent by the front end interface;
所述第一缓存模块,用于将所述业务数据缓存至所述缓存单元;The first cache module is configured to cache the service data to the cache unit;
所述电源启动模块,用于当外部电源掉电时,启动所述存储设备的备用电 源为所述存储设备供电;The power boot module is configured to start standby power of the storage device when the external power source is powered off The source supplies power to the storage device;
所述写入模块,用于将所述缓存单元中的所述业务数据写入所述非易失性存储单元。The writing module is configured to write the service data in the cache unit to the non-volatile storage unit.
在第二方面的第一种可能实现方式中,所述数据接收模块具体In a first possible implementation manner of the second aspect, the data receiving module is specific
用于接收控制器发送的所述业务数据,所述数据业务由所述前端接口发送给所述控制器;或者,Receiving, by the controller, the service data, where the data service is sent by the front end interface to the controller; or
具体用于接收所述前端接口通过直接内存访问形式发送的所述业务数据。Specifically, the method is configured to receive the service data that is sent by the front end interface by using a direct memory access.
在第二方面的第二种可能实现方式中,所述存储设备还包括:In a second possible implementation manner of the second aspect, the storage device further includes:
电源关闭模块,用于在所述写入模块将所述业务数据完全写入所述非易失性存储单元后,关闭所述备用电源。And a power-off module, configured to turn off the backup power after the write module completely writes the service data to the non-volatile storage unit.
在第二方面的第三种可能实现方式中,所述存储设备还包括:In a third possible implementation manner of the second aspect, the storage device further includes:
第二缓存模块,用于当所述外部电源恢复供电时,将所述业务数据缓存至所述缓存单元。And a second cache module, configured to cache the service data to the cache unit when the external power source resumes power supply.
第三方面,提供了一种数据存储方法,所述方法用于如上所述的存储设备中,所述存储设备包含有缓存单元和非易失性存储单元;所述方法包括:In a third aspect, a data storage method is provided, the method being used in a storage device as described above, the storage device comprising a cache unit and a non-volatile storage unit; the method comprising:
接收前端接口发送的业务数据;Receiving service data sent by the front end interface;
将所述业务数据缓存至所述缓存单元;Caching the service data to the cache unit;
当外部电源掉电时,启动所述存储设备的备用电源为所述存储设备供电,并将所述缓存单元中的所述业务数据写入所述非易失性存储单元。When the external power source is powered down, the backup power source that starts the storage device supplies power to the storage device, and writes the service data in the cache unit to the non-volatile storage unit.
在第三方面的第一种可能实现方式中,所述接收前端接口发送的业务数据,包括:In a first possible implementation manner of the third aspect, the receiving the service data sent by the front end interface includes:
接收控制器发送的所述业务数据,所述数据业务由所述前端接口发送给所述控制器;Receiving, by the controller, the service data, where the data service is sent by the front end interface to the controller;
或者,or,
接收所述前端接口通过直接内存访问形式发送的所述业务数据。Receiving the service data sent by the front end interface in the form of direct memory access.
在第三方面的第二种可能实现方式中,所述方法还包括:In a second possible implementation manner of the third aspect, the method further includes:
在将所述业务数据完全写入所述非易失性存储单元后,关闭所述备用电源。After the service data is completely written to the non-volatile storage unit, the backup power source is turned off.
在第三方面的第三种可能实现方式中,所述方法还包括: In a third possible implementation manner of the third aspect, the method further includes:
当所述外部电源恢复供电时,将所述业务数据缓存至所述缓存单元。When the external power source resumes power supply, the service data is buffered to the cache unit.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
首先,通过前端接口将接收到的业务数据发送给存储设备中的缓存单元,当所述外部电源掉电时,存储设备启动该存储设备的备用电源,并将缓存单元中的业务数据写入非易失性存储单元,解决了现有技术中因备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,达到提高保护性能的效果。First, the received service data is sent to the cache unit in the storage device through the front-end interface. When the external power supply is powered off, the storage device starts the backup power of the storage device, and writes the service data in the cache unit to the non-volatile device. The volatile storage unit solves the problem that the data in the memory is lost due to the external power supply still not recovering the power supply before the backup power source is exhausted, and the protection performance is improved.
其次,通过将控制器的缓存设置由各个存储设备的缓存单元组成,将缓存单元作为存储设备中的非易失性存储单元的Cache,存储系统只需要增加存储设备的数目即可以对存储容量进行扩展,解决了现有技术中存储系统的内存容量有限,无法满足大容量的非易失性存储单元的缓存需求的问题,达到提高存储系统扩展性能的效果。Secondly, the cache setting of the controller is composed of the cache unit of each storage device, and the cache unit is used as the cache of the non-volatile storage unit in the storage device. The storage system only needs to increase the number of storage devices, that is, the storage capacity can be performed. The invention solves the problem that the memory capacity of the storage system in the prior art is limited, and the cache requirement of the large-capacity non-volatile storage unit cannot be satisfied, and the effect of improving the expansion performance of the storage system is achieved.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是本发明一个实施例提供的存储系统的系统构成图;1 is a system configuration diagram of a storage system according to an embodiment of the present invention;
图2是本发明另一实施例提供的存储系统的系统构成图;2 is a system configuration diagram of a storage system according to another embodiment of the present invention;
图3是本发明一个实施例提供的存储设备的结构示意图;3 is a schematic structural diagram of a storage device according to an embodiment of the present invention;
图4是本发明另一实施例提供的存储设备的结构示意图;4 is a schematic structural diagram of a storage device according to another embodiment of the present invention;
图5是本发明一个实施例提供的数据存储方法的方法流程图;FIG. 5 is a flowchart of a method for storing a data according to an embodiment of the present invention; FIG.
图6是本发明另一实施例提供的数据存储方法的方法流程图。FIG. 6 is a flowchart of a method for storing a data according to another embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
请参考图1,其示出了本发明一个实施例提供的存储系统的系统构成图。 该存储系统可以包括:前端接口102、控制器104和若干个存储设备106;外部电源108为所述前端接口102、所述控制器104和所述存储设备106供电;每个所述存储设备106包括:缓存单元106a和非易失性存储单元106b;其中,所述控制器104的缓存由所述若干个存储设备106的缓存单元组成106a;Referring to FIG. 1, a system configuration diagram of a storage system according to an embodiment of the present invention is shown. The storage system can include a front end interface 102, a controller 104, and a plurality of storage devices 106; an external power supply 108 powering the front end interface 102, the controller 104, and the storage device 106; each of the storage devices 106 The buffer unit 106a and the non-volatile storage unit 106b; wherein the cache of the controller 104 is composed of the cache unit of the plurality of storage devices 106a;
所述前端接口102,用于接收业务数据,并向所述若干个存储设备106中的至少一个存储设备106的缓存单元106a发送所述业务数据;The front-end interface 102 is configured to receive service data, and send the service data to a cache unit 106a of at least one of the plurality of storage devices 106;
所述至少一个存储设备106,用于接收所述业务数据,并缓存到所述至少一个存储设备106的缓存单元106a;当所述外部电源108掉电时,启动所述至少一个存储设备106的备用电源110为所述至少一个存储设备106供电,将所述至少一个存储设备106的缓存单元106a中的所述业务数据写入所述至少一个存储设备106的非易失性存储单元106b。The at least one storage device 106 is configured to receive the service data and cache the buffer unit 106a of the at least one storage device 106; when the external power source 108 is powered off, start the at least one storage device 106 The backup power source 110 supplies power to the at least one storage device 106, and writes the service data in the cache unit 106a of the at least one storage device 106 to the non-volatile storage unit 106b of the at least one storage device 106.
综上所述,本发明实施例提供的存储系统,通过前端接口将接收到的业务数据发送给存储设备中的缓存单元,当所述外部电源掉电时,存储设备启动该存储设备的备用电源,并将缓存单元中的业务数据写入非易失性存储单元,解决了现有技术中因备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,达到提高保护性能的效果。In summary, the storage system provided by the embodiment of the present invention sends the received service data to the cache unit in the storage device through the front-end interface, and when the external power supply is powered off, the storage device starts the backup power of the storage device. And writing the service data in the cache unit to the non-volatile storage unit, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the improvement is achieved. The effect of protection performance.
其次,本发明实施例提供的存储系统,通过将控制器的缓存设置由各个存储设备的缓存单元组成,将缓存单元作为存储设备中的非易失性存储单元的Cache,存储系统只需要增加存储设备的数目即可以对存储容量进行扩展,解决了现有技术中存储系统的内存容量有限,无法满足大容量的非易失性存储单元的缓存需求的问题,达到提高存储系统扩展性能的效果。In the storage system provided by the embodiment of the present invention, the cache setting of the controller is composed of a cache unit of each storage device, and the cache unit is used as a cache of a non-volatile storage unit in the storage device, and the storage system only needs to increase storage. The number of devices can expand the storage capacity, which solves the problem that the memory capacity of the storage system in the prior art is limited, and cannot meet the cache requirement of the large-capacity non-volatile storage unit, thereby improving the expansion performance of the storage system.
请参考图2,其示出了本发明一个实施例提供的存储系统的系统构成图。该存储系统可以包括:前端接口202、控制器204和若干个存储设备206;外部电源208为所述前端接口202、所述控制器204和所述存储设备206供电;每个所述存储设备206包括:缓存单元206a和非易失性存储单元206b;其中,所述控制器204的缓存由所述若干个存储设备206的缓存单元组成206a;Referring to FIG. 2, a system configuration diagram of a storage system according to an embodiment of the present invention is shown. The storage system can include a front end interface 202, a controller 204, and a plurality of storage devices 206; an external power supply 208 powering the front end interface 202, the controller 204, and the storage device 206; each of the storage devices 206 The buffer unit 206a and the non-volatile storage unit 206b; wherein the cache of the controller 204 is composed of the cache unit of the plurality of storage devices 206a;
其中,存储系统的控制器(比如中央处理器CPU)可以不设置独立的缓存,而是将控制器的缓存分布到各个存储设备中,由各个存储设备中的缓存单 元承担控制器的缓存的作用。具体的,在存储系统初始化时,可以将各个存储设备的缓存单元设置为可预取的内存空间,以便控制器可以对各个存储设备的缓存单元中的地址进行直接访问,比如,CPU可以直接向缓存单元中的指定地址写入数据,或者,CPU也可以直接读取缓存单元的指定地址中的数据。The controller of the storage system (such as the central processing unit CPU) may not set a separate cache, but distribute the cache of the controller to each storage device, and the cache list in each storage device The yuan assumes the role of the controller's cache. Specifically, when the storage system is initialized, the cache unit of each storage device may be set as a prefetchable memory space, so that the controller can directly access the address in the cache unit of each storage device, for example, the CPU may directly The data is written to the specified address in the cache unit, or the CPU can directly read the data in the specified address of the cache unit.
所述前端接口202,用于接收业务数据,并向所述若干个存储设备206中的至少一个存储设备206的缓存单元206a发送所述业务数据;The front-end interface 202 is configured to receive service data, and send the service data to the cache unit 206a of the at least one of the plurality of storage devices 206;
在存储系统中,前端接口可以将同一份业务数据发送给两个或者两个以上的存储设备,在一个存储设备中的数据丢失时,可以启用其它存储设备中的备份数据,从而提高数据的安全性。In a storage system, a front-end interface can send the same service data to two or more storage devices. When data in one storage device is lost, backup data in other storage devices can be enabled, thereby improving data security. Sex.
其中,所述前端接口202可以向所述控制器204发送所述业务数据,所述控制器204将所述业务数据发送至所述至少一个存储设备206的缓存单元206b;或者,所述前端接口202也可以通过直接内存访问形式将所述业务数据发送至所述少一个存储设备206的缓存单元206b。The front-end interface 202 may send the service data to the controller 204, and the controller 204 sends the service data to the cache unit 206b of the at least one storage device 206; or the front-end interface The service data may also be sent to the cache unit 206b of the one less storage device 206 by direct memory access.
具体的,前端接口向存储设备发送业务数据时,可以先将业务数据发送给控制器,由控制器将业务数据写入存储设备中的缓存单元,或者,前端接口也可以通过DMA(Direct Memory Access,直接内存访问)引擎向控制器查询存储设备包含的缓存单元的地址,并根据查询到的地址将业务数据直接发送给存储设备。Specifically, when the front-end interface sends the service data to the storage device, the service data may be sent to the controller first, and the service data is written by the controller to the cache unit in the storage device, or the front-end interface may also pass DMA (Direct Memory Access). The direct memory access engine queries the controller for the address of the cache unit included in the storage device, and sends the service data directly to the storage device according to the queried address.
所述至少一个存储设备206,用于接收所述业务数据,并缓存到所述至少一个存储设备206的缓存单元206a;当所述外部电源208掉电时,启动所述至少一个存储设备206的备用电源210为所述至少一个存储设备206供电,将所述至少一个存储设备206的缓存单元206a中的所述业务数据写入所述至少一个存储设备206的非易失性存储单元206b。The at least one storage device 206 is configured to receive the service data and cache the buffer unit 206a of the at least one storage device 206; when the external power source 208 is powered down, start the at least one storage device 206 The backup power source 210 supplies power to the at least one storage device 206, and writes the service data in the cache unit 206a of the at least one storage device 206 to the non-volatile storage unit 206b of the at least one storage device 206.
其中,备用电源在初始时可以为关闭状态,当控制器检测出外部电源掉点后,可以控制该备用电源开启,开始为存储设备供电;或者,也可以将备用电源的电压设置为略低于外部电源的电压,备用电源始终处于开启状态,由于外部电源电压略高,所以当外部电源正常工作时,存储设备由外部电源供电,当外部电源掉电后,备用电源才开始供电。The standby power supply may be in an initial state when the controller detects the external power supply drop point, and may control the standby power supply to start to supply power to the storage device; or, the standby power supply may be set to a voltage slightly lower than The voltage of the external power supply is always on. Because the external power supply voltage is slightly higher, when the external power supply works normally, the storage device is powered by the external power supply. When the external power supply is powered off, the backup power supply starts to supply power.
在存储系统的外部电源,比如AC/DC(Alternating Current/Direct Current, 交流输入/直流输出)电源断电时,控制器可以向各个存储设备发送断电通知,存储设备接收到该断电通知后,将缓存单元中的数据转移到非易失性存储单元中,以避免缓存单元中的数据在备用电源电量耗尽后丢失。External power supply to the storage system, such as AC/DC (Alternating Current/Direct Current, AC input/DC output) When the power is cut off, the controller may send a power failure notification to each storage device, and after receiving the power failure notification, the storage device transfers the data in the cache unit to the nonvolatile storage unit to Avoid losing data in the cache unit after the backup power is exhausted.
其中,缓存单元可以由静态随机存储芯片组成,也可以由动态随即存储芯片,比如DDR(Double Data Rate Synchronous Dynamic Random Access Memory,双倍速率同步动态随机存储器)2、DDR3或者DDR4颗粒组成。缓存单元容量相比非易失性存储单元较小,但读写速度快。The cache unit may be composed of a static random storage chip, or may be composed of a dynamic random access memory chip, such as a DDR (Double Data Rate Synchronous Dynamic Random Access Memory) 2, DDR3 or DDR4 particles. The cache unit capacity is smaller than the non-volatile memory unit, but the read/write speed is fast.
其中,每个所述备用电源210为一个所述存储设备206供电。Each of the backup power sources 210 supplies power to one of the storage devices 206.
为了进一步提高备用电源的备份效果,可以将存储设备都设置由单独的备用电源供电,当其中一个备用电源失效时,只影响该备用电源对应的存储设备,而其它存储设备依然可以工作。To further improve the backup effect of the backup power supply, the storage device can be set to be powered by a separate backup power supply. When one of the backup power supplies fails, only the storage device corresponding to the backup power supply is affected, and other storage devices can still work.
所述至少一个存储设备206,用于在将所述业务数据完全写入所述至少一个存储设备206的非易失性存储单元206b后,关闭所述至少一个存储设备206的备用电源210。The at least one storage device 206 is configured to turn off the backup power source 210 of the at least one storage device 206 after the service data is completely written into the non-volatile storage unit 206b of the at least one storage device 206.
其中,备用电源通常使用电池来存储电量,而电池在放电过程中,若在超过放电的终止电压值时继续放电,则可能会造成电池内压升高,正、负极活性物质的可逆性遭到损坏,从而使电池的容量产生明显减少。为了避免备用电源因为过放电而损坏,提高器件使用寿命,存储设备在检测到缓存单元中存储的数据已经全部转移到非易失性存储单元中之后,可以控制备用电源停止供电。Among them, the backup power source usually uses a battery to store the power, and if the battery continues to discharge when the discharge exceeds the discharge end voltage value, the internal pressure of the battery may increase, and the reversibility of the positive and negative active materials may be affected. Damage, resulting in a significant reduction in battery capacity. In order to prevent the backup power supply from being damaged due to over-discharge and increasing the service life of the device, after the storage device detects that the data stored in the cache unit has all been transferred to the non-volatile storage unit, the backup power supply can be controlled to stop the power supply.
所述至少一个存储设备206,用于当所述外部电源210恢复供电时,将所述业务数据缓存至所述至少一个存储设备的缓存单元206a。The at least one storage device 206 is configured to cache the service data to the cache unit 206a of the at least one storage device when the external power source 210 resumes power supply.
其中,缓存单元中缓存的业务数据可能是存储系统中的控制器待访问的数据,因此,在外部电源恢复供电时,存储设备可以将缓存单元在断电之前存储的业务数据再次写回缓存单元,以便控制器快速访问读取。具体比如,当存储系统的外部电源恢复供电时,控制器向各个存储设备发送供电恢复通知,存储设备接收到该供电恢复通知后,检测出外部电源恢复供电,则开始进一步检测存储系统是否完全恢复正常,若检测出存储系统完全恢复正常,则开始将断电前缓存单元中的存储的业务数据重新从非易失性存储单元中写回缓存单元。控制单元在将数据写回缓存单元完成后,通知存储系统恢复数据存储或者数据读 取业务;或者,控制单元也可以在接收到供电恢复通知后即将断电前缓存单元中的存储的业务数据重新从非易失性存储单元中写回缓存单元。The service data cached in the cache unit may be data to be accessed by the controller in the storage system. Therefore, when the external power source resumes power supply, the storage device may write the service data stored by the cache unit before the power failure to the cache unit again. So that the controller can quickly access the read. For example, when the external power supply of the storage system is restored, the controller sends a power restoration notification to each storage device. After receiving the power restoration notification, the storage device detects that the external power supply resumes power supply, and then starts to further detect whether the storage system is completely restored. Normally, if it is detected that the storage system is completely restored, the stored service data in the cache unit before the power failure is resumed from the non-volatile storage unit and written back to the cache unit. After the control unit writes the data back to the cache unit, the control unit notifies the storage system to restore the data storage or data read. The service unit may also rewrite the stored service data in the cache unit from the non-volatile storage unit back to the cache unit after the power-off notification is received.
存储设备206,还用于在检测出外部电源208恢复供电后,控制备用电源210开始充电。The storage device 206 is further configured to control the backup power source 210 to start charging after detecting that the external power source 208 resumes power supply.
综上所述,本发明实施例提供的存储系统,通过前端接口将接收到的业务数据发送给存储设备中的缓存单元,当所述外部电源掉电时,存储设备启动该存储设备的备用电源,并将缓存单元中的业务数据写入非易失性存储单元,解决了现有技术中因备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,达到提高保护性能的效果。In summary, the storage system provided by the embodiment of the present invention sends the received service data to the cache unit in the storage device through the front-end interface, and when the external power supply is powered off, the storage device starts the backup power of the storage device. And writing the service data in the cache unit to the non-volatile storage unit, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the improvement is achieved. The effect of protection performance.
其次,本发明实施例提供的存储系统,通过将控制器的缓存设置由各个存储设备的缓存单元组成,将缓存单元作为存储设备中的非易失性存储单元的Cache,存储系统只需要增加存储设备的数目即可以对存储容量进行扩展,解决了现有技术中存储系统的内存容量有限,无法满足大容量的非易失性存储单元的缓存需求的问题,达到提高存储系统扩展性能的效果。In the storage system provided by the embodiment of the present invention, the cache setting of the controller is composed of a cache unit of each storage device, and the cache unit is used as a cache of a non-volatile storage unit in the storage device, and the storage system only needs to increase storage. The number of devices can expand the storage capacity, which solves the problem that the memory capacity of the storage system in the prior art is limited, and cannot meet the cache requirement of the large-capacity non-volatile storage unit, thereby improving the expansion performance of the storage system.
另外,本发明实施例提供的存储系统,存储设备还用于在检测出数据完全写入非易失性存储单元后,控制备用电源停止供电,避免备用电源过放电,达到提高器件使用寿命的效果。In addition, in the storage system provided by the embodiment of the present invention, the storage device is further configured to control the standby power supply to stop the power supply after detecting that the data is completely written into the non-volatile storage unit, thereby avoiding over-discharge of the standby power supply, thereby improving the service life of the device. .
请参考图3,其示出了本发明一个实施例提供的存储设备的结构示意图。该存储设备可以是硬盘等通用存储设备,用于如上述图1或图2所示的数据存储系统中。其中,该存储系统包括:前端接口、控制器和若干个存储设备;外部电源为前端接口、控制器和存储设备供电;该存储设备可以包括:缓存单元301、非易失性存储单元302、数据接收模块303、第一缓存模块304、电源启动模块305以及写入模块306;控制器的缓存由若干个存储设备的缓存单元组成;Please refer to FIG. 3, which is a schematic structural diagram of a storage device according to an embodiment of the present invention. The storage device may be a general-purpose storage device such as a hard disk for use in the data storage system as shown in FIG. 1 or FIG. 2 above. The storage system includes: a front end interface, a controller, and a plurality of storage devices; the external power supply supplies power to the front end interface, the controller, and the storage device; the storage device may include: a cache unit 301, a nonvolatile storage unit 302, and data. a receiving module 303, a first cache module 304, a power boot module 305, and a write module 306; the cache of the controller is composed of cache units of a plurality of storage devices;
所述数据接收模块303,用于接收前端接口发送的业务数据;The data receiving module 303 is configured to receive service data sent by the front end interface.
所述第一缓存模块304,用于将所述业务数据缓存至所述缓存单元301;The first cache module 304 is configured to cache the service data to the cache unit 301;
所述电源启动模块305,用于当外部电源掉电时,启动所述存储设备的备用电源为所述存储设备供电; The power startup module 305 is configured to: when the external power is powered off, start the backup power of the storage device to supply power to the storage device;
所述写入模块306,用于将所述缓存单元301中的所述业务数据写入所述非易失性存储单元302。The writing module 306 is configured to write the service data in the cache unit 301 to the non-volatile storage unit 302.
综上所述,本发明实施例提供的存储设备,通过接收前端接口发送的业务数据并缓存的缓存单元,当外部电源掉电时,存储设备启动该存储设备的备用电源,并将缓存单元中的业务数据写入非易失性存储单元,解决了现有技术中因备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,达到提高保护性能的效果。In summary, the storage device provided by the embodiment of the present invention receives the service data sent by the front-end interface and caches the cache unit. When the external power supply is powered off, the storage device starts the backup power of the storage device, and the cache unit is The service data is written into the non-volatile storage unit, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the protection performance is improved.
其次,本发明实施例提供的存储设备,通过将存储设备的缓存单元设置为控制器的缓存的组成部分,将缓存单元作为非易失性存储单元的Cache,存储系统只需要增加存储设备的数目即可以对存储容量进行扩展,解决了现有技术中存储系统的内存容量有限,无法满足大容量的非易失性存储单元的缓存需求的问题,达到提高存储系统扩展性能的效果。The storage device provided by the embodiment of the present invention, by setting the cache unit of the storage device as a component of the cache of the controller and using the cache unit as a cache of the non-volatile storage unit, the storage system only needs to increase the number of storage devices. That is, the storage capacity can be expanded, which solves the problem that the memory capacity of the storage system in the prior art is limited, and cannot meet the cache requirement of the large-capacity non-volatile storage unit, thereby achieving the effect of improving the expansion performance of the storage system.
请参考图4,其示出了本发明一个实施例提供的存储设备的结构示意图。该存储设备可以是硬盘等通用存储设备,用于如上述图1或图2所示的数据存储系统中。其中,该存储系统包括:前端接口、控制器和若干个存储设备;外部电源为前端接口、控制器和存储设备供电;该存储设备可以包括:缓存单元401、非易失性存储单元402、数据接收模块403、第一缓存模块404、电源启动模块405以及写入模块406;控制器的缓存由若干个存储设备的缓存单元组成;Please refer to FIG. 4, which is a schematic structural diagram of a storage device according to an embodiment of the present invention. The storage device may be a general-purpose storage device such as a hard disk for use in the data storage system as shown in FIG. 1 or FIG. 2 above. The storage system includes: a front end interface, a controller, and a plurality of storage devices; the external power supply supplies power to the front end interface, the controller, and the storage device; the storage device may include: a cache unit 401, a nonvolatile storage unit 402, and data. a receiving module 403, a first cache module 404, a power boot module 405, and a write module 406; the cache of the controller is composed of cache units of a plurality of storage devices;
所述数据接收模块403,用于接收前端接口发送的业务数据;The data receiving module 403 is configured to receive service data sent by the front end interface;
所述第一缓存模块404,用于将所述业务数据缓存至所述缓存单元401;The first cache module 404 is configured to cache the service data to the cache unit 401;
所述电源启动模块405,用于当外部电源掉电时,启动所述存储设备的备用电源为所述存储设备供电;The power boot module 405 is configured to start a backup power of the storage device to supply power to the storage device when the external power source is powered off;
所述写入模块406,用于将所述缓存单元401中的所述业务数据写入所述非易失性存储单元402。The writing module 406 is configured to write the service data in the cache unit 401 to the non-volatile storage unit 402.
在图1或图2所示的存储系统中,控制器(比如中央处理器CPU)可以不设置独立的缓存,而是将控制器的缓存分布到各个存储设备中,由各个存储设备中的缓存单元承担控制器的缓存的作用。具体的,在存储系统初始化时, 可以将各个存储设备的缓存单元设置为可预取的内存空间,以便控制器可以对各个存储设备的缓存单元中的地址进行直接访问,比如,CPU可以直接向缓存单元中的指定地址写入数据,或者,CPU也可以直接读取缓存单元的指定地址中的数据。In the storage system shown in FIG. 1 or FIG. 2, the controller (such as the central processing unit CPU) may not set a separate cache, but distribute the controller's cache to each storage device, and the cache in each storage device. The unit assumes the role of the controller's cache. Specifically, when the storage system is initialized, The cache unit of each storage device can be set as a prefetchable memory space, so that the controller can directly access the address in the cache unit of each storage device, for example, the CPU can directly write data to the specified address in the cache unit. Or, the CPU can also directly read the data in the specified address of the cache unit.
所述数据接收模块403具体用于接收控制器发送的所述业务数据,所述数据业务由所述前端接口发送给所述控制器;或者具体用于接收所述前端接口通过直接内存访问形式发送的所述业务数据。The data receiving module 403 is specifically configured to receive the service data sent by the controller, where the data service is sent by the front end interface to the controller; or specifically, the front end interface is sent by using a direct memory access form. The business data.
具体的,前端接口向存储设备发送业务数据时,可以先将业务数据发送给控制器,由控制器将业务数据写入存储设备中的缓存单元,或者,前端接口也可以通过DMA(Direct Memory Access,直接内存访问)引擎向控制器查询存储设备包含的缓存单元的地址,并根据查询到的地址将业务数据直接发送给存储设备。Specifically, when the front-end interface sends the service data to the storage device, the service data may be sent to the controller first, and the service data is written by the controller to the cache unit in the storage device, or the front-end interface may also pass DMA (Direct Memory Access). The direct memory access engine queries the controller for the address of the cache unit included in the storage device, and sends the service data directly to the storage device according to the queried address.
其中,备用电源在初始时可以为关闭状态,当控制器检测出外部电源掉点后,可以控制该备用电源开启,开始为存储设备供电;或者,也可以将备用电源的电压设置为略低于外部电源的电压,备用电源始终处于开启状态,由于外部电源电压略高,所以当外部电源正常工作时,存储设备由外部电源供电,当外部电源掉电后,备用电源才开始供电。The standby power supply may be in an initial state when the controller detects the external power supply drop point, and may control the standby power supply to start to supply power to the storage device; or, the standby power supply may be set to a voltage slightly lower than The voltage of the external power supply is always on. Because the external power supply voltage is slightly higher, when the external power supply works normally, the storage device is powered by the external power supply. When the external power supply is powered off, the backup power supply starts to supply power.
在存储系统的外部电源,比如AC/DC(Alternating Current/Direct Current,交流输入/直流输出)电源断电时,控制器可以向各个存储设备发送断电通知,存储设备接收到该断电通知后,将缓存单元中的数据转移到非易失性存储单元中,以避免缓存单元中的数据在备用电源电量耗尽后丢失。When the external power supply of the storage system, such as AC/DC (Alternating Current/Direct Current), is powered off, the controller may send a power-off notification to each storage device, and the storage device receives the power-off notification. Transfer the data in the cache unit to the non-volatile storage unit to prevent the data in the cache unit from being lost after the backup power is exhausted.
其中,缓存单元可以由静态随机存储芯片组成,也可以由动态随即存储芯片,比如DDR(Double Data Rate Synchronous Dynamic Random Access Memory,双倍速率同步动态随机存储器)2、DDR3或者DDR4颗粒组成。缓存单元容量相比非易失性存储单元较小,但读写速度快。The cache unit may be composed of a static random storage chip, or may be composed of a dynamic random access memory chip, such as a DDR (Double Data Rate Synchronous Dynamic Random Access Memory) 2, DDR3 or DDR4 particles. The cache unit capacity is smaller than the non-volatile memory unit, but the read/write speed is fast.
其中,每个备用电源只为一个存储设备供电。Among them, each backup power supply only supplies power to one storage device.
为了进一步提高备用电源的备份效果,可以将存储设备都设置由单独的备用电源供电,当其中一个备用电源失效时,只影响该备用电源对应的存储设备,而其它存储设备依然可以工作。 To further improve the backup effect of the backup power supply, the storage device can be set to be powered by a separate backup power supply. When one of the backup power supplies fails, only the storage device corresponding to the backup power supply is affected, and other storage devices can still work.
所述存储设备还包括:The storage device further includes:
电源关闭模块407,用于在所述写入模块406将所述业务数据完全写入所述非易失性存储单元402后,关闭所述备用电源。The power-off module 407 is configured to turn off the backup power after the write module 406 completely writes the service data to the non-volatile storage unit 402.
其中,备用电源通常使用电池来存储电量,而电池在放电过程中,若在超过放电的终止电压值时继续放电,则可能会造成电池内压升高,正、负极活性物质的可逆性遭到损坏,从而使电池的容量产生明显减少。为了避免备用电源因为过放电而损坏,提高器件使用寿命,存储设备在检测到缓存单元中存储的数据已经全部转移到非易失性存储单元中之后,可以控制备用电源停止供电。Among them, the backup power source usually uses a battery to store the power, and if the battery continues to discharge when the discharge exceeds the discharge end voltage value, the internal pressure of the battery may increase, and the reversibility of the positive and negative active materials may be affected. Damage, resulting in a significant reduction in battery capacity. In order to prevent the backup power supply from being damaged due to over-discharge and increasing the service life of the device, after the storage device detects that the data stored in the cache unit has all been transferred to the non-volatile storage unit, the backup power supply can be controlled to stop the power supply.
所述存储设备还包括:The storage device further includes:
第二缓存模块408,用于当所述外部电源恢复供电时,将所述业务数据缓存至所述缓存单元401。The second cache module 408 is configured to cache the service data to the cache unit 401 when the external power source resumes power supply.
其中,缓存单元中缓存的业务数据可能是存储系统中的控制器待访问的数据,因此,在外部电源恢复供电时,存储设备可以将缓存单元在断电之前存储的业务数据再次写回缓存单元,以便控制器快速访问读取。具体比如,当存储系统的外部电源恢复供电时,控制器向各个存储设备发送供电恢复通知,存储设备接收到该供电恢复通知后,检测出外部电源恢复供电,则开始进一步检测存储系统是否完全恢复正常,若检测出存储系统完全恢复正常,则开始将断电前缓存单元中的存储的业务数据重新从非易失性存储单元中写回缓存单元。控制单元在将数据写回缓存单元完成后,通知存储系统恢复数据存储或者数据读取业务;或者,控制单元也可以在接收到供电恢复通知后即将断电前缓存单元中的存储的业务数据重新从非易失性存储单元中写回缓存单元。The service data cached in the cache unit may be data to be accessed by the controller in the storage system. Therefore, when the external power source resumes power supply, the storage device may write the service data stored by the cache unit before the power failure to the cache unit again. So that the controller can quickly access the read. For example, when the external power supply of the storage system is restored, the controller sends a power restoration notification to each storage device. After receiving the power restoration notification, the storage device detects that the external power supply resumes power supply, and then starts to further detect whether the storage system is completely restored. Normally, if it is detected that the storage system is completely restored, the stored service data in the cache unit before the power failure is resumed from the non-volatile storage unit and written back to the cache unit. After the control unit writes the data back to the cache unit, the control unit notifies the storage system to resume the data storage or the data read service; or the control unit may restart the stored service data in the cache unit before the power is cut off after receiving the power restoration notification. The cache unit is written back from the non-volatile memory unit.
综上所述,本发明实施例提供的存储设备,通过接收前端接口发送的业务数据并缓存的缓存单元,当外部电源掉电时,存储设备启动该存储设备的备用电源,并将缓存单元中的业务数据写入非易失性存储单元,解决了现有技术中因备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,达到提高保护性能的效果。In summary, the storage device provided by the embodiment of the present invention receives the service data sent by the front-end interface and caches the cache unit. When the external power supply is powered off, the storage device starts the backup power of the storage device, and the cache unit is The service data is written into the non-volatile storage unit, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the protection performance is improved.
其次,本发明实施例提供的存储设备,通过将存储设备的缓存单元设置为控制器的缓存的组成部分,将缓存单元作为非易失性存储单元的Cache,存储系统只需要增加存储设备的数目即可以对存储容量进行扩展,解决了现有技术 中存储系统的内存容量有限,无法满足大容量的非易失性存储单元的缓存需求的问题,达到提高存储系统扩展性能的效果。The storage device provided by the embodiment of the present invention, by setting the cache unit of the storage device as a component of the cache of the controller and using the cache unit as a cache of the non-volatile storage unit, the storage system only needs to increase the number of storage devices. That is, the storage capacity can be expanded to solve the prior art. The memory capacity of the storage system is limited, and the problem of the cache requirement of the large-capacity non-volatile storage unit cannot be met, thereby achieving the effect of improving the expansion performance of the storage system.
另外,本发明实施例提供的存储设备,在检测出数据完全写入非易失性存储单元后,控制备用电源停止供电,避免备用电源过放电,达到提高器件使用寿命的效果。In addition, the storage device provided by the embodiment of the present invention controls the standby power supply to stop the power supply after detecting that the data is completely written into the non-volatile storage unit, thereby avoiding the over-discharge of the standby power supply and achieving the effect of improving the service life of the device.
请参考图5,其示出了本发明一个实施例提供的数据存储方法的方法流程图。该数据存储方法可以用于在图3或图4所示的存储设备中避免高速缓存中的数据在外部电源断电时丢失。该存储设备可以是硬盘等通用存储设备,可以用于大容量的数据存储系统中。如图1或图2所示,该存储系统包括:前端接口、控制器和若干个存储设备;外部电源为前端接口、控制器和存储设备供电;存储设备包括:缓存单元和非易失性存储单元;控制器的缓存由若干个存储设备的缓存单元组成。该数据存储方法可以包括:Please refer to FIG. 5, which is a flowchart of a method for storing a data according to an embodiment of the present invention. The data storage method can be used to prevent data in the cache from being lost when the external power is turned off in the storage device shown in FIG. 3 or 4. The storage device can be a general-purpose storage device such as a hard disk and can be used in a large-capacity data storage system. As shown in FIG. 1 or FIG. 2, the storage system includes: a front end interface, a controller, and a plurality of storage devices; the external power supply supplies power to the front end interface, the controller, and the storage device; and the storage device includes: a cache unit and nonvolatile storage. Unit; the controller's cache consists of cache units for several storage devices. The data storage method can include:
步骤502,接收前端接口发送的业务数据;Step 502: Receive service data sent by the front end interface.
步骤504,将该业务数据缓存至缓存单元;Step 504: Cache the service data to a cache unit.
步骤506,当外部电源掉电时,启动该存储设备的备用电源为该存储设备供电,并将该缓存单元中的该业务数据写入非易失性存储单元。Step 506: When the external power source is powered off, the backup power source that starts the storage device supplies power to the storage device, and writes the service data in the cache unit to the non-volatile storage unit.
综上所述,本发明实施例提供的数据存储方法,通过接收前端接口发送的业务数据并缓存的缓存单元,当外部电源掉电时,存储设备启动该存储设备的备用电源,并将缓存单元中的业务数据写入非易失性存储单元,解决了现有技术中因备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,达到提高保护性能的效果。In summary, the data storage method provided by the embodiment of the present invention receives the service data sent by the front-end interface and caches the cache unit. When the external power supply is powered off, the storage device starts the backup power of the storage device, and the cache unit is The service data in the non-volatile storage unit is solved, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the protection performance is improved.
请参考图6,其示出了本发明一个实施例提供的数据存储方法的方法流程图。该数据存储方法可以用于在图3或图4所示的存储设备中避免高速缓存中的数据在外部电源断电时丢失。该存储设备可以是硬盘等通用存储设备,可以用于大容量的数据存储系统中。如图1或图2所示,该存储系统包括:前端接口、控制器和若干个存储设备;外部电源为前端接口、控制器和存储设备供电;存储设备包括:缓存单元和非易失性存储单元;控制器的缓存由若干个存储设 备的缓存单元组成。该数据存储方法可以包括:Please refer to FIG. 6, which is a flowchart of a method for storing a data according to an embodiment of the present invention. The data storage method can be used to prevent data in the cache from being lost when the external power is turned off in the storage device shown in FIG. 3 or 4. The storage device can be a general-purpose storage device such as a hard disk and can be used in a large-capacity data storage system. As shown in FIG. 1 or FIG. 2, the storage system includes: a front end interface, a controller, and a plurality of storage devices; the external power supply supplies power to the front end interface, the controller, and the storage device; and the storage device includes: a cache unit and nonvolatile storage. Unit; the controller's cache consists of several storage devices The backup cache unit is composed. The data storage method can include:
步骤602,接收前端接口发送的业务数据,将该业务数据缓存至缓存单元;Step 602: Receive service data sent by the front-end interface, and cache the service data to the cache unit.
具体的,可以接收控制器发送的该业务数据,该数据业务由前端接口发送给控制器;或者,可以接收前端接口通过直接内存访问形式发送的业务数据。Specifically, the service data sent by the controller may be received, where the data service is sent by the front end interface to the controller; or the service data sent by the front end interface by using a direct memory access may be received.
具体的,前端接口向存储设备发送业务数据时,可以先将业务数据发送给控制器,由控制器将业务数据写入存储设备中的缓存单元,或者,前端接口也可以通过DMA(Direct Memory Access,直接内存访问)引擎向控制器查询存储设备包含的缓存单元的地址,并根据查询到的地址将业务数据直接发送给存储设备。Specifically, when the front-end interface sends the service data to the storage device, the service data may be sent to the controller first, and the service data is written by the controller to the cache unit in the storage device, or the front-end interface may also pass DMA (Direct Memory Access). The direct memory access engine queries the controller for the address of the cache unit included in the storage device, and sends the service data directly to the storage device according to the queried address.
步骤604,当外部电源掉电时,启动该存储设备的备用电源为该存储设备供电,并将该缓存单元中的该业务数据写入非易失性存储单元; Step 604, when the external power supply is powered off, start the backup device of the storage device to supply power to the storage device, and write the service data in the cache unit to the non-volatile storage unit;
其中,备用电源在初始时可以为关闭状态,当控制器检测出外部电源掉点后,可以控制该备用电源开启,开始为存储设备供电;或者,也可以将备用电源的电压设置为略低于外部电源的电压,备用电源始终处于开启状态,由于外部电源电压略高,所以当外部电源正常工作时,存储设备由外部电源供电,当外部电源掉电后,备用电源才开始供电。The standby power supply may be in an initial state when the controller detects the external power supply drop point, and may control the standby power supply to start to supply power to the storage device; or, the standby power supply may be set to a voltage slightly lower than The voltage of the external power supply is always on. Because the external power supply voltage is slightly higher, when the external power supply works normally, the storage device is powered by the external power supply. When the external power supply is powered off, the backup power supply starts to supply power.
在存储系统的外部电源,比如AC/DC(Alternating Current/Direct Current,交流输入/直流输出)电源断电时,控制器可以向各个存储设备发送断电通知,存储设备接收到该断电通知后,将缓存单元中的数据转移到非易失性存储单元中,以避免缓存单元中的数据在备用电源电量耗尽后丢失。When the external power supply of the storage system, such as AC/DC (Alternating Current/Direct Current), is powered off, the controller may send a power-off notification to each storage device, and the storage device receives the power-off notification. Transfer the data in the cache unit to the non-volatile storage unit to prevent the data in the cache unit from being lost after the backup power is exhausted.
其中,缓存单元可以由静态随机存储芯片组成,也可以由动态随即存储芯片,比如DDR(Double Data Rate Synchronous Dynamic Random Access Memory,双倍速率同步动态随机存储器)2、DDR3或者DDR4颗粒组成。缓存单元容量相比非易失性存储单元较小,但读写速度快。The cache unit may be composed of a static random storage chip, or may be composed of a dynamic random access memory chip, such as a DDR (Double Data Rate Synchronous Dynamic Random Access Memory) 2, DDR3 or DDR4 particles. The cache unit capacity is smaller than the non-volatile memory unit, but the read/write speed is fast.
为了进一步提高备用电源的备份效果,可以将存储设备都设置由单独的备用电源供电,即每个备用电源只为一个存储设备供电。当其中一个备用电源失效时,只影响该备用电源对应的存储设备,而其它存储设备依然可以工作。In order to further improve the backup effect of the backup power supply, the storage devices can be set to be powered by a separate backup power supply, that is, each backup power supply only supplies power to one storage device. When one of the backup power supplies fails, only the storage device corresponding to the backup power source is affected, and other storage devices can still work.
步骤606,在将该业务数据完全写入非易失性存储单元后,关闭备用电源; Step 606, after the service data is completely written into the non-volatile storage unit, the standby power is turned off;
其中,备用电源通常使用电池来存储电量,而电池在放电过程中,若在超 过放电的终止电压值时继续放电,则可能会造成电池内压升高,正、负极活性物质的可逆性遭到损坏,从而使电池的容量产生明显减少。为了避免备用电源因为过放电而损坏,提高器件使用寿命,存储设备在检测到缓存单元中存储的数据已经全部转移到非易失性存储单元中之后,可以控制备用电源停止供电。Among them, the backup power source usually uses a battery to store the power, and the battery is in the process of discharging, if it is super When the discharge voltage of the overdischarge continues to discharge, the internal pressure of the battery may increase, and the reversibility of the active materials of the positive and negative electrodes may be damaged, so that the capacity of the battery is significantly reduced. In order to prevent the backup power supply from being damaged due to over-discharge and increasing the service life of the device, after the storage device detects that the data stored in the cache unit has all been transferred to the non-volatile storage unit, the backup power supply can be controlled to stop the power supply.
步骤608,当外部电源恢复供电时,将该业务数据缓存至该缓存单元。Step 608: When the external power source resumes power supply, the service data is buffered to the cache unit.
其中,缓存单元中缓存的业务数据可能是存储系统中的控制器待访问的数据,因此,在外部电源恢复供电时,存储设备可以将缓存单元在断电之前存储的业务数据再次写回缓存单元,以便控制器快速访问读取。具体比如,当存储系统的外部电源恢复供电时,控制器向各个存储设备发送供电恢复通知,存储设备接收到该供电恢复通知后,检测出外部电源恢复供电,则开始进一步检测存储系统是否完全恢复正常,若检测出存储系统完全恢复正常,则开始将断电前缓存单元中的存储的业务数据重新从非易失性存储单元中写回缓存单元。控制单元在将数据写回缓存单元完成后,通知存储系统恢复数据存储或者数据读取业务;或者,控制单元也可以在接收到供电恢复通知后即将断电前缓存单元中的存储的业务数据重新从非易失性存储单元中写回缓存单元。The service data cached in the cache unit may be data to be accessed by the controller in the storage system. Therefore, when the external power source resumes power supply, the storage device may write the service data stored by the cache unit before the power failure to the cache unit again. So that the controller can quickly access the read. For example, when the external power supply of the storage system is restored, the controller sends a power restoration notification to each storage device. After receiving the power restoration notification, the storage device detects that the external power supply resumes power supply, and then starts to further detect whether the storage system is completely restored. Normally, if it is detected that the storage system is completely restored, the stored service data in the cache unit before the power failure is resumed from the non-volatile storage unit and written back to the cache unit. After the control unit writes the data back to the cache unit, the control unit notifies the storage system to resume the data storage or the data read service; or the control unit may restart the stored service data in the cache unit before the power is cut off after receiving the power restoration notification. The cache unit is written back from the non-volatile memory unit.
综上所述,本发明实施例提供的数据存储方法,通过接收前端接口发送的业务数据并缓存的缓存单元,当外部电源掉电时,存储设备启动该存储设备的备用电源,并将缓存单元中的业务数据写入非易失性存储单元,解决了现有技术中因备份电源的电量耗尽之前外部电源依然没有恢复供电而导致内存中的数据丢失的问题,达到提高保护性能的效果。In summary, the data storage method provided by the embodiment of the present invention receives the service data sent by the front-end interface and caches the cache unit. When the external power supply is powered off, the storage device starts the backup power of the storage device, and the cache unit is The service data in the non-volatile storage unit is solved, which solves the problem that the data in the memory is lost due to the external power supply still not being restored before the power of the backup power source is exhausted, and the protection performance is improved.
其次,本发明实施例提供的数据存储方法,在检测出数据完全写入非易失性存储单元后,控制备用电源停止供电,避免备用电源过放电,达到提高器件使用寿命的效果。Secondly, the data storage method provided by the embodiment of the present invention controls the standby power supply to stop the power supply after detecting that the data is completely written into the non-volatile storage unit, thereby avoiding the over-discharge of the standby power supply and achieving the effect of improving the service life of the device.
需要说明的是:上述实施例提供的存储设备在进行数据的存储时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的存储设备与数据存储方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘 述。It should be noted that, when the storage device provided by the foregoing embodiment stores data, only the division of each functional module is described. In an actual application, the function distribution may be completed by different functional modules according to requirements. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the storage device provided by the foregoing embodiment is in the same concept as the data storage method embodiment, and the specific implementation process is described in the method embodiment. Said.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (13)

  1. 一种存储系统,其特征在于,所述存储系统包括:前端接口、控制器和若干个存储设备;外部电源为所述前端接口、所述控制器和所述存储设备供电;每个所述存储设备包括:缓存单元和非易失性存储单元;其中,所述控制器的缓存由所述若干个存储设备的缓存单元组成;A storage system, comprising: a front end interface, a controller, and a plurality of storage devices; an external power supply supplies power to the front end interface, the controller, and the storage device; each of the storage The device includes: a cache unit and a non-volatile storage unit; wherein the cache of the controller is composed of a cache unit of the plurality of storage devices;
    所述前端接口,用于接收业务数据,并向所述若干个存储设备中的至少一个存储设备的缓存单元发送所述业务数据;The front-end interface is configured to receive service data, and send the service data to a cache unit of at least one of the plurality of storage devices;
    所述至少一个存储设备,用于接收所述业务数据,并缓存到所述至少一个存储设备的缓存单元;当所述外部电源掉电时,启动所述至少一个存储设备的备用电源为所述至少一个存储设备供电,将所述至少一个存储设备的缓存单元中的所述业务数据写入所述至少一个存储设备的非易失性存储单元。The at least one storage device is configured to receive the service data and cache the cache unit to the at least one storage device; when the external power source is powered off, the backup power source that starts the at least one storage device is the The at least one storage device is powered to write the service data in the cache unit of the at least one storage device to the non-volatile storage unit of the at least one storage device.
  2. 根据权利要求1所述的存储系统,其特征在于,所述前端接口向所述若干个存储设备中的至少一个存储设备的缓存单元发送所述业务数据,具体包括:The storage system according to claim 1, wherein the front-end interface sends the service data to a cache unit of at least one of the plurality of storage devices, specifically:
    所述前端接口向所述控制器发送所述业务数据,所述控制器将所述业务数据发送至所述至少一个存储设备的缓存单元;The front end interface sends the service data to the controller, and the controller sends the service data to a cache unit of the at least one storage device;
    或者,or,
    所述前端接口通过直接内存访问形式将所述业务数据发送至所述少一个存储设备的缓存单元。The front end interface sends the service data to a cache unit of the one storage device by a direct memory access form.
  3. 根据权利要求1所述的存储系统,其特征在于,每个所述备用电源为一个所述存储设备供电。The storage system of claim 1 wherein each of said backup power supplies powers one of said storage devices.
  4. 根据权利要求1所述的存储系统,其特征在于,所述至少一个存储设备,用于在将所述业务数据完全写入所述至少一个存储设备的非易失性存储单元后,关闭所述至少一个存储设备的备用电源。The storage system according to claim 1, wherein said at least one storage device is configured to close said service data after said service data is completely written to said non-volatile storage unit of said at least one storage device At least one backup power source for the storage device.
  5. 根据权利要求1所述的存储系统,其特征在于,所述至少一个存储设备,用于当所述外部电源恢复供电时,将所述业务数据缓存至所述至少一个存 储设备的缓存单元。The storage system according to claim 1, wherein the at least one storage device is configured to buffer the service data to the at least one storage when the external power source resumes power supply The cache unit of the storage device.
  6. 一种存储设备,其特征在于,所述存储设备用于如权利要求1至5任一所述的存储系统,所述存储设备包括:缓存单元、非易失性存储单元、数据接收模块、第一缓存模块、电源启动模块以及写入模块;A storage device, wherein the storage device is used in a storage system according to any one of claims 1 to 5, the storage device comprising: a cache unit, a non-volatile storage unit, a data receiving module, and a a cache module, a power boot module, and a write module;
    所述数据接收模块,用于接收前端接口发送的业务数据;The data receiving module is configured to receive service data sent by the front end interface;
    所述第一缓存模块,用于将所述业务数据缓存至所述缓存单元;The first cache module is configured to cache the service data to the cache unit;
    所述电源启动模块,用于当外部电源掉电时,启动所述存储设备的备用电源为所述存储设备供电;The power boot module is configured to start a backup power of the storage device to supply power to the storage device when the external power source is powered off;
    所述写入模块,用于将所述缓存单元中的所述业务数据写入所述非易失性存储单元。The writing module is configured to write the service data in the cache unit to the non-volatile storage unit.
  7. 根据权利要求6所述的存储设备,其特征在于,所述数据接收模块具体用于接收控制器发送的所述业务数据,所述数据业务由所述前端接口发送给所述控制器;或者,The storage device according to claim 6, wherein the data receiving module is specifically configured to receive the service data sent by a controller, where the data service is sent by the front end interface to the controller; or
    具体用于接收所述前端接口通过直接内存访问形式发送的所述业务数据。Specifically, the method is configured to receive the service data that is sent by the front end interface by using a direct memory access.
  8. 根据权利要求6所述的存储设备,其特征在于,所述存储设备还包括:The storage device according to claim 6, wherein the storage device further comprises:
    电源关闭模块,用于在所述写入模块将所述业务数据完全写入所述非易失性存储单元后,关闭所述备用电源。And a power-off module, configured to turn off the backup power after the write module completely writes the service data to the non-volatile storage unit.
  9. 根据权利要求6所述的存储设备,其特征在于,所述存储设备还包括:The storage device according to claim 6, wherein the storage device further comprises:
    第二缓存模块,用于当所述外部电源恢复供电时,将所述业务数据缓存至所述缓存单元。And a second cache module, configured to cache the service data to the cache unit when the external power source resumes power supply.
  10. 一种数据存储方法,其特征在于,所述方法用于如权利要求6至10任一所述的存储设备中,所述存储设备包含有缓存单元和非易失性存储单元;所述方法包括:A data storage method, wherein the method is used in a storage device according to any one of claims 6 to 10, the storage device comprising a cache unit and a non-volatile storage unit; :
    接收前端接口发送的业务数据; Receiving service data sent by the front end interface;
    将所述业务数据缓存至所述缓存单元;Caching the service data to the cache unit;
    当外部电源掉电时,启动所述存储设备的备用电源为所述存储设备供电,并将所述缓存单元中的所述业务数据写入所述非易失性存储单元。When the external power source is powered down, the backup power source that starts the storage device supplies power to the storage device, and writes the service data in the cache unit to the non-volatile storage unit.
  11. 根据权利要求10所述的方法,其特征在于,所述接收前端接口发送的业务数据,包括:The method according to claim 10, wherein the receiving the service data sent by the front end interface comprises:
    接收控制器发送的所述业务数据,所述数据业务由所述前端接口发送给所述控制器;Receiving, by the controller, the service data, where the data service is sent by the front end interface to the controller;
    或者,or,
    接收所述前端接口通过直接内存访问形式发送的所述业务数据。Receiving the service data sent by the front end interface in the form of direct memory access.
  12. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method of claim 10, wherein the method further comprises:
    在将所述业务数据完全写入所述非易失性存储单元后,关闭所述备用电源。After the service data is completely written to the non-volatile storage unit, the backup power source is turned off.
  13. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method of claim 10, wherein the method further comprises:
    当所述外部电源恢复供电时,将所述业务数据缓存至所述缓存单元。 When the external power source resumes power supply, the service data is buffered to the cache unit.
PCT/CN2015/071031 2014-04-03 2015-01-19 Storage system, storage device and data storage method WO2015149577A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410133653.7A CN103942160B (en) 2014-04-03 2014-04-03 Storage system, storage device and date storage method
CN201410133653.7 2014-04-03

Publications (1)

Publication Number Publication Date
WO2015149577A1 true WO2015149577A1 (en) 2015-10-08

Family

ID=51189832

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/071031 WO2015149577A1 (en) 2014-04-03 2015-01-19 Storage system, storage device and data storage method

Country Status (2)

Country Link
CN (1) CN103942160B (en)
WO (1) WO2015149577A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109655094A (en) * 2017-10-11 2019-04-19 巴鲁夫股份有限公司 Sensor device, sensing system and the method for running sensor device
US20220132424A1 (en) * 2019-02-08 2022-04-28 Schreder S.A. Managing a Network Comprising Multiple Communication Devices
CN115437853A (en) * 2022-11-07 2022-12-06 四川省华存智谷科技有限责任公司 Cache data protection method and system under system abnormal restart

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942160B (en) * 2014-04-03 2018-08-21 华为技术有限公司 Storage system, storage device and date storage method
CN106104492A (en) * 2014-12-25 2016-11-09 华为技术有限公司 A kind of method of data backup, Apparatus and system
CN106919474A (en) * 2015-12-28 2017-07-04 中移(苏州)软件技术有限公司 A kind of data cached guard method and device
CN107797946B (en) * 2016-09-06 2021-06-29 中车株洲电力机车研究所有限公司 Vehicle-mounted storage device
CN107678682A (en) * 2017-08-16 2018-02-09 芜湖恒天易开软件科技股份有限公司 Method for the storage of charging pile rate
CN111968694A (en) * 2020-09-07 2020-11-20 湖南国科微电子股份有限公司 Data protection device, storage equipment and storage system
CN113419977B (en) * 2021-05-28 2023-03-21 济南浪潮数据技术有限公司 PCIE equipment management system in server and server
CN113722158B (en) * 2021-10-08 2022-08-30 亿次网联(杭州)科技有限公司 Electronic equipment, power failure protection method and device thereof, and storage medium
CN113726619A (en) * 2021-10-08 2021-11-30 亿次网联(杭州)科技有限公司 Family cloud server
CN113946290B (en) * 2021-10-14 2023-06-06 西安紫光国芯半导体有限公司 Memory device and memory system based on three-dimensional heterogeneous integration
CN114153649B (en) * 2021-12-09 2023-04-14 合肥康芯威存储技术有限公司 Data storage device, control method thereof and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183801A (en) * 2007-12-07 2008-05-21 杭州华三通信技术有限公司 Power-off protection method, system and device
CN101458668A (en) * 2008-12-19 2009-06-17 成都市华为赛门铁克科技有限公司 Caching data block processing method and hard disk
CN101609435A (en) * 2009-03-24 2009-12-23 成都市华为赛门铁克科技有限公司 A kind of method of power failure of equipment, electronic equipment and network system
CN102870100A (en) * 2012-06-30 2013-01-09 华为技术有限公司 Data buffer device, data storage system and method
CN103049070A (en) * 2012-12-27 2013-04-17 加弘科技咨询(上海)有限公司 Cache data power failure protection method and computer equipment
CN103942160A (en) * 2014-04-03 2014-07-23 华为技术有限公司 Storage system, storage device and data storage method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008293426A (en) * 2007-05-28 2008-12-04 Toshiba Corp Information processor and its data recording method
CN103455449B (en) * 2013-08-29 2016-12-28 华为技术有限公司 Non-volatile memory medium access method, data-updating method and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183801A (en) * 2007-12-07 2008-05-21 杭州华三通信技术有限公司 Power-off protection method, system and device
CN101458668A (en) * 2008-12-19 2009-06-17 成都市华为赛门铁克科技有限公司 Caching data block processing method and hard disk
CN101609435A (en) * 2009-03-24 2009-12-23 成都市华为赛门铁克科技有限公司 A kind of method of power failure of equipment, electronic equipment and network system
CN102870100A (en) * 2012-06-30 2013-01-09 华为技术有限公司 Data buffer device, data storage system and method
CN103049070A (en) * 2012-12-27 2013-04-17 加弘科技咨询(上海)有限公司 Cache data power failure protection method and computer equipment
CN103942160A (en) * 2014-04-03 2014-07-23 华为技术有限公司 Storage system, storage device and data storage method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109655094A (en) * 2017-10-11 2019-04-19 巴鲁夫股份有限公司 Sensor device, sensing system and the method for running sensor device
CN109655094B (en) * 2017-10-11 2021-11-05 巴鲁夫股份有限公司 Sensor device, sensor system and method for operating a sensor device
US20220132424A1 (en) * 2019-02-08 2022-04-28 Schreder S.A. Managing a Network Comprising Multiple Communication Devices
CN115437853A (en) * 2022-11-07 2022-12-06 四川省华存智谷科技有限责任公司 Cache data protection method and system under system abnormal restart
CN115437853B (en) * 2022-11-07 2023-03-10 四川省华存智谷科技有限责任公司 Cache data protection method and system under system abnormal restart

Also Published As

Publication number Publication date
CN103942160B (en) 2018-08-21
CN103942160A (en) 2014-07-23

Similar Documents

Publication Publication Date Title
WO2015149577A1 (en) Storage system, storage device and data storage method
US10438669B2 (en) Flash storage device with data integrity protection
JP6334828B2 (en) Solid state drive with self-refresh power saving mode
US8667331B2 (en) Storage system and control method for storing write data requested by a host computer
US8707096B2 (en) Storage system, data backup method, and system restarting method of a storage system incorporating volatile and nonvolatile memory devices
CN101183801B (en) Power-off protection method, system and device
US20120054520A1 (en) Method and system for reducing power consumption in an emergency shut-down situation
JP6135276B2 (en) Storage device, control device, and control program
US20090198931A1 (en) Information processing apparatus and data backup method
CN101458668A (en) Caching data block processing method and hard disk
US20070006000A1 (en) Using fine-grained power management of physical system memory to improve system sleep
WO2015039422A1 (en) Method for backing up data during memory system power-down, and memory system controller
US10175995B1 (en) Device hibernation control
WO2017114236A1 (en) Charging method and device, and solid state disk
US20160062691A1 (en) Method for controlling memory device to achieve more power saving and related apparatus thereof
WO2019041903A1 (en) Nonvolatile memory based computing device and use method therefor
CN103984645A (en) Data erasing-writing method based on cache coherency of double control
US9697097B2 (en) Storage system and method for controlling storage system
US10430096B2 (en) Hybrid storage device, computer, control device, and power consumption reduction method
CN107608824B (en) Nonvolatile computing device and working method thereof
US20130073792A1 (en) Electronic apparatus using nand flash and memory management method thereof
US20120054524A1 (en) Method and system for reducing power consumption of peripherals in an emergency shut-down
CN114265550A (en) Solid state disk power failure protection method and system
CN108509356B (en) Solid state disk with multistage power-down protection
WO2021082116A1 (en) Operating method for improving startup speed of device with embedded emmc

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15772234

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase
122 Ep: pct application non-entry in european phase

Ref document number: 15772234

Country of ref document: EP

Kind code of ref document: A1