CN113703684A - Data storage method, data reading method and storage system based on RAID - Google Patents

Data storage method, data reading method and storage system based on RAID Download PDF

Info

Publication number
CN113703684A
CN113703684A CN202111009117.2A CN202111009117A CN113703684A CN 113703684 A CN113703684 A CN 113703684A CN 202111009117 A CN202111009117 A CN 202111009117A CN 113703684 A CN113703684 A CN 113703684A
Authority
CN
China
Prior art keywords
data
valid
check
grid
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111009117.2A
Other languages
Chinese (zh)
Other versions
CN113703684B (en
Inventor
罗贤武
蒋一斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yangtze Memory Technologies Co Ltd
Original Assignee
Yangtze Memory Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yangtze Memory Technologies Co Ltd filed Critical Yangtze Memory Technologies Co Ltd
Priority to CN202111009117.2A priority Critical patent/CN113703684B/en
Priority to CN202410620330.4A priority patent/CN118466839A/en
Publication of CN113703684A publication Critical patent/CN113703684A/en
Application granted granted Critical
Publication of CN113703684B publication Critical patent/CN113703684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The application provides a data storage method, a data reading method, a storage system, a host device and a readable medium based on RAID. The data storage method comprises the following steps: receiving data from a host, wherein the data comprises a plurality of valid data and a first check data group which are stored in a grid form, and each data in the first check data group corresponds to a plurality of valid data of the data in a first direction of the grid; calculating a second check data set according to the plurality of valid data, wherein each data in the second check data set corresponds to the plurality of valid data of the data in the second direction of the grid; and storing the plurality of valid data, the first parity data set, and the second parity data set in the memory system. The RAID-based data storage method, the data reading method, the storage system host device and the readable medium can reduce the load of a storage controller in a storage system.

Description

Data storage method, data reading method and storage system based on RAID
Technical Field
The present application relates to the field of data storage/reading technology, and more particularly, to a RAID-based data storage method, a data reading method, a memory system, a host device, and a computer-readable program medium.
Background
RAID (Redundant Array of Independent disks) technology is widely used in memory systems today, and is defined as: a technique for combining multiple disk drives into a single logical unit for data redundancy processing and performance improvement to provide reliability guarantees on the stored data.
RAID technology is ranked differently according to different performance. For the RAID5 scheme, when data in a data block is damaged, the damaged data can be recovered by using the remaining data and corresponding check data. However, the conventional RAID5 scheme can only provide protection when there is one data corruption in each data block, and cannot cope with the situation where more than one data corruption occurs in one data block at the same time.
Thus, to address the situation where more than one data corruption occurs in each data block, a multidimensional RAID scheme arises. In some implementations, the use of a multidimensional RAID scheme requires more parity data in providing protection for the data than conventional RAID schemes. For flash type memory systems (e.g., solid state drives), the RAID modules used to implement the RAID scheme are typically integrated into the flash translation layer of the storage controller. In other words, the memory system generates the check data by the RAID module. However, in the process of encoding and/or decoding a plurality of check data, the load of the memory controller in the memory system may be increased, thereby affecting the process of the memory controller performing other functions. Further, the memory system's interaction with the host and user experience are also affected.
Disclosure of Invention
One aspect of the present application provides a data storage method based on RAID. The data storage method comprises the following steps: receiving data from a host, wherein the data comprises a plurality of valid data and a first check data group which are stored in a grid form, and each data in the first check data group corresponds to a plurality of valid data of the data in a first direction of the grid; calculating a second check data set according to the plurality of valid data, wherein each data in the second check data set corresponds to the plurality of valid data of the data in the second direction of the grid; and storing the plurality of valid data, the first parity data set, and the second parity data set in the memory system.
In some embodiments, the grid is a two-dimensional grid.
In some embodiments, the grid is a three-dimensional grid, the data further includes a third parity data set, each data in the third parity data set corresponds to a plurality of valid data of the data in a third direction of the grid, and the step of storing the plurality of valid data, the first parity data set, and the second parity data set in the memory system includes: the third check data set is stored in the memory system.
In some embodiments, the grid is a three-dimensional grid, and the step of computing the second inspection data set from the plurality of valid data further comprises: and calculating a third verification data set according to the plurality of valid data, wherein each data in the third verification data set corresponds to the plurality of valid data of the data in the third direction of the grid.
In some embodiments, the step of storing the plurality of valid data, the first parity data set, and the second parity data set in the memory system comprises: the third check data set is stored in the memory system.
Another aspect of the present application provides a memory system. The memory system includes: a non-volatile storage device for storing data; and a storage controller, communicatively coupled to the non-volatile storage device, for executing program instructions to control the non-volatile storage device to perform the data storage method of any of the above embodiments.
In another aspect, the present application provides a method for reading data based on RAID. The data is stored in the memory system according to the data storage method of any one of the above embodiments, and at least one error data is generated in the plurality of valid data, wherein the method includes: attempting to restore the erroneous data to valid data based on the second parity data set; and under the condition that at least part of the data failed to attempt to recover, sending the first check data group and the valid data to the host, so that the host recovers error data failed to attempt to recover into valid data according to the first check data group and the valid data.
In some embodiments, after the step of attempting to recover the erroneous data as valid data based on the second parity data set, the method includes: in the event that at least a portion of the error data attempts to recover successfully, valid data is sent to the host.
In some embodiments, in the event of a failure to attempt recovery of at least a portion of the erroneous data, the step of sending the first check data set and the valid data to the host further comprises: and sending the third check data group to the host, so that the host recovers the error data failed in recovery attempt into effective data according to the first check data group, the third check data group and the effective data.
In some embodiments, attempting to recover the erroneous data as valid data based on the second parity data set comprises: based on the second parity data group and the third parity data group, an attempt is made to recover the erroneous data to valid data.
The application also provides a memory system in another aspect. The memory system includes: a non-volatile storage device for storing data; and a storage controller, communicatively connected to the nonvolatile storage device, for executing program instructions to control the nonvolatile storage device to execute the data reading method of any of the above embodiments.
The application also provides a data storage method based on RAID. The data storage method comprises the following steps: calculating a first check data group according to a plurality of valid data in the data stored in the grid form, wherein each data in the first check data group corresponds to a plurality of valid data of the data in the first direction of the grid; and sending the data to the memory system, so that the memory system calculates a second check data set according to a plurality of valid data in the data, and stores the plurality of valid data, the first check data set and the second check data set in the memory system, wherein each data in the second check data set corresponds to the plurality of valid data of the data in the second direction of the grid.
In some embodiments, the grid is a two-dimensional grid.
In some embodiments, the grid is a three-dimensional grid, wherein the step of calculating the first verification data set from a plurality of valid data in the data stored in the form of the grid comprises: and calculating a third check data group according to the plurality of valid data, wherein each data in the third check data group corresponds to the plurality of valid data of the data in the third direction of the grid.
In some embodiments, the data includes a third check data set.
In some embodiments, the grid is a three-dimensional grid, wherein the step of sending data to the memory system comprises: and sending the data to the memory system, so that the memory system calculates a second check data group and a third check data group according to a plurality of valid data in the data, and stores the plurality of valid data, the first check data group, the second check data group and the third check data group in the memory system, wherein each data in the second check data group corresponds to the plurality of valid data of the data in the second direction of the grid, and each data in the third check data group corresponds to the plurality of valid data of the data in the third direction of the grid.
Another aspect of the present application further provides a host device. The host device includes: a host processor; and a host memory communicatively connected to the host processor, wherein the host memory stores a computer program executable by the host processor, and when the computer program is executed by the host processor, the host processor executes the data storage method according to any of the embodiments.
The present application also provides a non-transitory computer-readable program medium storing a computer program for causing a computer to execute the data storage method as any one of the above embodiments.
In another aspect, the present application provides a method for reading data based on RAID. The data is stored in the memory system according to the data storage method of any one of the above embodiments, and at least one error data is generated in the plurality of valid data, wherein the method includes: receiving a first parity data set and valid data in the event of a failure of the memory system to attempt to recover at least part of the error data to valid data based on the second parity data set; and recovering the error data failed in the attempt to recover into the valid data according to the first check data group and the valid data.
In some embodiments, the method further comprises: in the event that the memory system is successful in attempting to recover at least a portion of the error data as valid data based on the second parity data set, valid data is received.
In some embodiments, the step of receiving the first check data set and the valid data comprises: a third check data set is received.
In some embodiments, the step of recovering the error data that failed to attempt recovery as valid data comprises: and recovering the error data failed in the recovery attempt into valid data according to the first check data group, the third check data group and the valid data.
In some embodiments, the step of receiving the first check data set and the valid data comprises: in the event that the memory system fails to attempt to recover at least part of the error data as valid data based on the second parity data set and the third parity data set, the first parity data set and the valid data are received.
Another aspect of the present application further provides a host device. The host device includes: a host processor; and a host memory communicatively connected to the host processor, wherein the host memory stores a computer program executable by the host processor, and when the computer program is executed by the host processor, the host processor executes the data reading method according to any of the above embodiments.
The present application also provides a non-transitory computer-readable program medium storing a computer program for causing a computer to execute the data reading method as any one of the above embodiments.
On the other hand, according to the RAID-based data storage method, the memory system, and the host device according to the embodiments of the present application, at least a part of the check data group is calculated by the RAID program in the host device, and the load of calculating the check data group by the RAID module in the memory system can be reduced.
On the other hand, according to the RAID-based data reading method, the memory system, and the host device according to the embodiments of the present invention, at least a part of error data is recovered by the RAID program in the host device, and the load of recovering the error data by the RAID module in the memory system can be reduced.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is an internal block diagram of a host device and a memory system according to an embodiment of the present application.
FIG. 2 is a flow chart of a RAID-based data storage method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a two-dimensional RAID scheme data storage according to an embodiment of the present application;
FIGS. 4A and 4B are schematic diagrams of data storage for a three-dimensional RAID scheme according to embodiments of the present application;
FIG. 5 is a flow chart of a RAID-based data reading method according to an embodiment of the present application;
FIGS. 6A and 6B are schematic diagrams of data recovery for a two-dimensional RAID scheme according to embodiments of the present application;
FIGS. 7A and 7B are schematic diagrams of data recovery for a three-dimensional RAID scheme according to embodiments of the present application;
FIG. 8 is a flow chart of a RAID-based data storage method according to another embodiment of the present application; and
FIG. 9 is a flow chart of a RAID-based data read method according to another embodiment of the present application.
Detailed Description
For a better understanding of the present application, various aspects of the present application will be described in more detail with reference to the accompanying drawings. It should be understood that the detailed description is merely illustrative of exemplary embodiments of the present application and does not limit the scope of the present application in any way.
The terminology used herein is for the purpose of describing particular example embodiments and is not intended to be limiting. The terms "comprises," "comprising," "includes" and/or "including," when used in this specification, specify the presence of stated features, integers, elements, components, and/or groups thereof, but do not preclude the presence or addition of one or more other features, integers, elements, components, and/or groups thereof.
This description is made with reference to schematic illustrations of exemplary embodiments. The exemplary embodiments disclosed herein should not be construed as limited to the particular shapes and dimensions shown, but are to include various equivalent structures capable of performing the same function, as well as deviations in shapes and dimensions that result, for example, from manufacturing. The locations shown in the drawings are schematic in nature and are not intended to limit the location of the various components.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As used herein, the term "RAID" refers to a "Redundant Array of Independent Disks" technology. It should be understood that although "RAID" refers to any array of independent disks, embodiments of the present application may be implemented on a hardware level using any type of non-volatile storage, such as NAND flash storage.
Fig. 1 is an internal block diagram of a host device 20 and a memory system 10 according to an embodiment of the present application. As shown in fig. 1, the memory system 10 may serve as a secondary memory for the host device 20 and store data accessible by the host device 20. Host device 20 may include, but is not limited to, a mobile phone, MP3 player, laptop computer, desktop computer, game console, television, or in-vehicle infotainment system. According to an interface protocol in which the memory system 10 is connected to the host device 20, the memory system 10 may be configured as a device such as a universal flash memory storage (UFS) device, a Solid State Disk (SSD), a multimedia card in the form of MMC, eMMC, RS-MMC, and micro MMC, a secure digital card in the form of SD, mini SD, and micro SD, a Personal Computer Memory Card International Association (PCMCIA) card type memory device, a Peripheral Component Interconnect (PCI) type memory device, a PCI express (PCI-E) type memory device, a Compact Flash (CF) card, a smart media card, or a memory stick.
Host device 20 may include a host processor 21 and a host memory 22 for controlling the overall operation of memory system 10.
Host processor 21 may perform operations on data and control host device 20 and memory system 10 to perform operations. For example, host processor 21 may control memory system 10 to store data from host memory 22 in memory system 10 or to read data from memory system 10 to host memory 22 via a driver, such as a software program module for driving memory system 10. Specifically, the host processor 21 may control the memory system 10 to perform storage/read operations through the RAID program. The RAID program, in cooperation with the memory system 10, enables continuous data to be stored in the memory system 10 in a grid form, and enables erroneous data to be recovered during reading of the data from the memory system 10, so as to improve the accuracy of reading the data, and also to reduce the load on the memory system 10 to store/read data in a RAID scheme. Notably, the RAID program may be executed using hardware in the host processor 21. Further, the multidimensional RAID scheme will be described in detail below.
Host memory 22 may store instructions and/or data that host processor 21 executes and/or processes. For example, host memory 22 may store instructions and data that perform store/read operations that control memory system 10 in a multidimensional RAID scheme. The host memory 22 may be a storage device having a relatively fast operating speed. The host memory 22 may include at least one of various volatile memories, such as static memory (SRAM) or dynamic memory (DRAM).
Memory system 10 may include a non-volatile memory device 11 and a memory controller 12.
The non-volatile storage 11 may be a storage medium used by the memory system 10 to store data. The non-volatile memory device 11 may have one or more memory dies (die). Each memory die may include a memory cell array, which may include a plurality of memory cells arranged at intersections of word lines and bit lines. Each memory cell may be any one of a single-layer memory cell (SLC) capable of storing one bit of data, a two-layer memory cell (MLC) capable of storing two bits of data, a three-layer memory cell (TLC) capable of storing three bits of data, and a four-layer memory cell (QLC) capable of storing four bits of data. Illustratively, the non-volatile storage device 11 may be a three-dimensional NAND flash memory device, more specifically, the non-volatile storage device 11 may be, for example, a plurality of three-dimensional NAND flash memory devices arranged in parallel to achieve, for example, mass data storage of 256G or more.
The memory controller 12 may control the overall operation of the memory system 10 through firmware driver instructions or algorithms according to requests from the host device 20. The storage controller 12 may also implement functions including a multidimensional RAID scheme, Wear Leveling (Wear Leveling), Garbage Collection (Garbage Collection), Bad Block Management (Bad Block Management), and the like through driving firmware.
FIG. 2 is a flow chart of a method 1000 of RAID-based data storage according to an embodiment of the present application. As shown in fig. 2, the memory system 10 performs steps S110 to S130. The method 1000 permanently stores data temporarily stored in the host memory 22 in the non-volatile storage 11 in a multi-dimensional RAID scheme. The multi-dimensional RAID scheme may include a two-dimensional RAID scheme and a three-dimensional RAID scheme, and is described in detail below. Notably, the method 1000 will be described in detail below in terms of the hardware and/or software of the host device 20 and the memory system 10 described above.
In step S110, the storage controller 12 receives data stored in the grid form from the host device 20 through an interface with the host device 20. In some embodiments, the host device 20 sends the data to the memory system 10 after partial processing of the data in a two-dimensional RAID scheme.
FIG. 3 is a schematic diagram of a two-dimensional RAID scheme data storage according to an embodiment of the present application. As shown in fig. 3, the host processor 21 controls the data stored in the host memory 22 to be stored in the form of a two-dimensional grid 100 through a RAID program, the two-dimensional grid RAID includes a plurality of grid locations, and the data in each grid location is finally written to a storage unit corresponding to a unique physical address of the nonvolatile storage apparatus 11. Illustratively, data in different grid locations may be eventually written to different die memory blocks of the non-volatile memory device 11.
The two-dimensional grid 100 may be divided into a data area 110, a first check area 120, and a second check area 130. The data area 110 may store valid data D (including D1 to D9), the first parity area 120 may store a plurality of first parity data P11 to P15 calculated from the valid data D, and the second parity area 130 may store a plurality of second parity data P21 to P25 calculated from the valid data D. The plurality of first parity data P11-P15 may be referred to as a first parity data group P1, and the plurality of second parity data P21-P25 may be referred to as a second parity data group P2. It should be noted that the valid data D may include pre-written data, such as binary-formed numerical data of symbols, letters, numbers, voice, images, video, or a combination thereof.
In one embodiment, for example, the first verification data P12 is calculated according to the valid data D1, D2, D3, D4 and D5 corresponding thereto in the first direction 101 of the grid. Alternatively, the first check data P12 may be an exclusive or operation value of the valid data D1, D2, D3, D4 and D5, i.e. the value
Figure BDA0003238218260000091
Similarly, the second parity data P22 is calculated according to its corresponding valid data D6, D2, D7, D8 and D9 in the second direction 102 of the grid. Alternatively, the second check data P22 may be an exclusive or operation value of the valid data D6, D2, D7, D8 and D9, i.e.
Figure BDA0003238218260000092
The two-dimensional grid 100 described above includes 6 x 6 grid locations, but the two-dimensional grid may include any number of grid locations to store a corresponding number of valid data and verification data.
It should be noted that in step S110, the host processor 21 calculates the first verification data group P1 from the valid data stored in the host memory 22, and sends the first verification data group P1 to the memory system 10. In other words, the data received by the memory system 10 includes the valid data D and the first check data group P1 obtained after being processed by the RAID program in the host device 20.
Referring again to fig. 2, in step S120, the RAID module 121 in the storage controller 12 calculates a second check data group P2. Further, in step S130, the RAID module 121 in the storage controller 12 stores each of the valid data D, the first check data group P1 obtained after being processed by the RAID program in the host apparatus 20, and the second check data group P2 obtained after being processed by the RAID module 121 in the storage system 10 in the non-volatile storage device 11.
In some embodiments, the host device 20 sends the data to the memory system 10 after partial processing of the data in a three-dimensional RAID scheme. Fig. 4A and 4B are schematic diagrams of data storage in a three-dimensional RAID scheme according to an embodiment of the present application. Fig. 4B shows a schematic diagram of the verification grid 100-P according to the embodiment of the present application. As shown in fig. 4A and 4B, the host processor 21 controls the data stored in the host memory 22 to be stored in the form of the three-dimensional mesh 200 by the RIAD program. The three-dimensional grid 200 includes a plurality of two-dimensional data grids 100-1 to 100-4 arranged in the grid third direction 103 and a check grid 100-P for storing a third check data group P3, and the two-dimensional data grids 100-1 to 100-4 have similar structures and functions to the two-dimensional grid 100 described above, which are not described herein again.
The verification grid 100-P comprises a third verification area 140, and the third verification area 140 corresponds to valid data areas in a plurality of two-dimensional data grids 100-1 to 100-4 arranged in a grid third direction. The third verification area 140 may store a plurality of third verification data calculated according to the valid data D in the plurality of two-dimensional data grids 100-1 to 100-4. The plurality of third parity data may be referred to as a third parity data group P3.
In one embodiment, each third parity data is calculated from its corresponding plurality of valid data D in the third direction 103 of the grid, similar to the first parity data and/or the second parity data. Alternatively, each third parity data may be an exclusive or operation value of a plurality of valid data. The valid data for calculation of the third verification data may be distributed in 100-1 to 100-4 of the two-dimensional data grids arranged in the third direction of the grid.
Referring again to fig. 2, in step S110, the host processor 21 sends the valid data stored in the host memory 22, the calculated first parity data group P1 and the third parity data group P3 to the memory system 10. In other words, the data received by the memory system 10 includes the valid data D and the first parity data group P1 and the third parity data group P3 obtained after being processed by the RAID program in the host device 20.
In step S120, the RAID module 121 in the storage controller 12 calculates the second check data group P2. Further, in step S130, the RAID module 121 in the storage controller 12 stores each of the valid data D, the first check data group P1 and the third check data group P3 obtained after being processed by the RAID program in the host apparatus 20, and the second check data group P2 obtained after being processed by the RAID module 121 in the storage system 10 in the non-volatile storage device 11.
In another embodiment, referring again to FIG. 2, in step 110, host processor 21 sends the valid data stored in host memory 22 and calculated first parity data group P1 to memory system 10. In step S120, the RAID module 121 in the storage controller 12 calculates a second parity data group P2 and a third parity array P3. Further, in step S130, the RAID module 121 in the storage controller 12 stores each of the valid data D, the first check data group P1 obtained after being processed by the RAID program in the host apparatus 20, the second check data group P2 obtained after being processed by the RAID module 121 in the memory system 10, and the third check data group P3 in the non-volatile storage device 11. According to the RAID-based data storage method of the embodiment of the present application, at least a part of the check data group is calculated by the RAID program in the host device, and the load of calculating the check data group by the RAID module in the memory system can be reduced.
FIG. 5 is a flow chart of a RAID-based data read method 2000 in accordance with an embodiment of the present application. As shown in fig. 5, the memory system 10 performs steps S210 to S220. The method 2000 recovers error data stored in the non-volatile storage 11 in a multi-dimensional RAID scheme. Likewise, the multi-dimensional RAID scheme may include a two-dimensional RAID scheme and a three-dimensional RAID scheme, and is described in detail below. Notably, the method 2000 will be described in detail below in terms of the hardware and/or software of the host device 20 and the memory system 10 described above.
It will be understood by those skilled in the art that valid data stored in the nonvolatile memory device 11 may be converted into error data by flipping valid data bits stored in the nonvolatile memory device 11 due to physical states of memory cells or program disturb during storage. Accordingly, the method of reading valid data stored in the nonvolatile memory device 11 may include: the erroneous data is restored to valid data. It should be noted that the error data may be generated due to various reasons, such as a programming error, for example, the actual data pre-written is not consistent with the valid data due to the programming error.
Fig. 6A and 6B are schematic diagrams of data recovery for a two-dimensional RAID scheme according to an embodiment of the present application. In step S210, as shown in fig. 6A, the error data De1, De2, and De3 are distributed within the two-dimensional grid 100. In the case where the data to be read includes error data De1, De2, and De3, the RAID module 121 attempts to recover the error data De1, De2, and De3 from the second parity data P21 and P23. Since the second parity data P21 includes one error data De1 in the data corresponding to the grid second direction 102, the error data De1 can be recovered as valid data according to the second parity data P21 and its corresponding valid data (i.e. data other than the error data De 1) in the grid second direction 102. However, since the second parity data P23 includes two error data De2 and De3 in the data corresponding to the grid second direction 102, the error data De2 and De3 cannot be recovered as valid data by the second parity data P23 and the valid data corresponding to the grid second direction 102 according to the xor operation relationship between the second parity data P23 and the valid data originally in the grid second direction 102. In this case, an attempt to restore all the error data to valid data fails based on the second check data group P2.
It is to be understood that, in a case where each of the second parity data in the second parity data group includes only one error data among the plurality of data corresponding to the second direction of the grid, the one error data may be recovered based on the second parity data. Although the present embodiment describes the case where the RAID module 121 in the memory system 10 can recover at least part of the error data based on the second parity data group, in some embodiments, there is a case where any one of the second parity data in the second parity data group includes more than one error data in the plurality of data corresponding to the second direction of the grid, in this case, the RAID module 121 in the storage controller 12 cannot recover any error data, and thus, attempting to recover at least part of the error data to valid data based on the second parity data group fails.
In some embodiments, if there is any one of the second parity data in the second parity data group, and the plurality of data corresponding to the second direction of the grid includes only one error data, in this case, the RAID module 121 in the storage controller 12 can recover all the error data, and therefore, it is successful to attempt to recover all the error data to valid data according to the second parity data group.
In step S220, in the event of failure to attempt to recover at least part of the error data through step S210, the memory system 10 transmits the first check data group P1 and the valid data D stored in the nonvolatile storage 11 to the host apparatus 20. Similar to the RAID module 121 processing the respective second parity data and the valid data D corresponding thereto in the second parity data group P2 in step S210, the host processor 21 processes the respective first parity data and the valid data D corresponding thereto in the first parity data group P1 by a RAID program to recover the remaining or all error data. In other words, the host processor 21 restores the error data, which failed in the attempt to restore, to valid data by the RAID program.
In some embodiments, fig. 6B shows the distribution of error data after step S210. As shown in fig. 6B, since the first check data P12 includes one error data De2 in the data corresponding to the grid first direction 101, the error data De2 can be recovered as valid data according to the first check data P12 and valid data (i.e., data other than the error data De 2) corresponding to the first check value P12 in the grid first direction 101. Similarly, the error data De3 may be restored to be valid data according to the first check data P13 and the corresponding valid data (i.e., data other than the error data De 3) of the first check value P13 in the first direction 101 of the trellis.
It is understood that after the processing of step S220, the RAID program in the host processor 21 can recover the remaining error data or recover all the error data.
Fig. 7A and 7B are schematic diagrams of data recovery for a three-dimensional RAID scheme according to an embodiment of the present application. In some embodiments, as shown in FIG. 7, in step S210, the error data De1, De2, De3, and De4 are distributed within the two-dimensional data grid 100-1. As described above, the RAID module 121 in the storage controller 12 attempts to perform processing based on the second parity data P22 and P23 in the second parity data group P2 and the valid data thereof corresponding respectively in the grid second direction 102, and the number of error data corresponding respectively in the grid second direction 102 due to the second parity data P22 and P23 is more than one. Therefore, in this step, an attempt to restore at least part of the error data to valid data fails based on the second parity data group P2.
It should be understood that although the embodiment of the present application describes the case where the error data is distributed only in the two-dimensional data grid 100-1, when the error data is also distributed in other two-dimensional data grids, for example, 100-2 to 100-4, the RAID module 121 of the storage controller 12 may attempt to recover part of the error data according to the second parity data in the second parity data group P2, and since the steps of storing the data in the two-dimensional grid form and recovering the error data according to the second parity data group are described in detail above, the present application is not described herein again.
In step S220, in the event that an attempt to recover at least part of the error data fails through step S210, the memory system 10 transmits the first check data group P1, the third check data group P3, and the valid data D stored in the nonvolatile storage 11 to the host apparatus 20. In this step, when valid data is present at the positions corresponding to the error data De1 to De4 in the other two-dimensional data grids 100-2 to 100-4 of the three-dimensional grid 200, the RAID program in the host processor 21 processes the third parity data P31 to P34 in the third parity data group P3 and the corresponding valid data in the grid third direction 103 (as shown in fig. 7B) to restore the error data De1 to De4 to valid data.
It should be understood that, in the case where the error data is distributed in other two-dimensional data grids 100-2-100-4 and part of the error data is recovered after step S210, the RAID program of the host processor 21 will process the third check data group P3 and the first check data group P1 and the corresponding valid data D thereof to recover the remaining or all error data as valid data.
In other embodiments, in the case that the error data is distributed in other two-dimensional data grids, such as 100-2 to 100-4, the RAID module 121 of the storage controller 12 may attempt to recover part of the error data according to the second parity data in the second parity data group P2 and the third parity data in the third parity data group P3, and since the steps of storing the data in the two-dimensional grid form and recovering the error data according to the second parity data group are described in detail above, the description of the present application is omitted here.
In step S220, in the event of failure to attempt to recover at least part of the error data through step S210, the memory system 10 transmits the first check data group P1 and the valid data D stored in the nonvolatile storage 11 to the host apparatus 20. In the case where the error data is distributed in other two-dimensional data grids 100-2-100-4 and part of the error data is recovered after step S210, the RAID program of the host processor 21 processes the first parity data group P1 and the corresponding valid data D to recover the error data that failed to be recovered as valid data. According to the RAID-based data reading method of the embodiment of the present application, at least a part of error data is recovered by the RAID program in the host device, and the load of recovering the error data by the RAID module in the memory system can be reduced.
FIG. 8 is a flow chart of a method 3000 of RAID-based data storage according to another embodiment of the present application. As shown in fig. 8. The host device 20 executes steps S310 to S320. The method 3000 permanently stores data temporarily stored in the host memory 22 in the non-volatile storage 11 in a multi-dimensional RAID scheme. Specifically, method 3000 includes: s310, calculating a first check data group according to a plurality of effective data in the data stored in the grid form, wherein each data in the first check data group corresponds to a plurality of effective data of the data in the first direction of the grid; and S320 sending the data to the memory system, so that the memory system calculates a second parity data set according to a plurality of valid data in the data, and stores the plurality of valid data, the first parity data set, and the second parity data set in the memory system, wherein each data in the second parity data set corresponds to the plurality of valid data of the data in the second direction of the grid.
Since the method for facilitating the host device 20 and the memory system 10 to store data in a multidimensional RAID scheme is described in detail above, the detailed description of the present application is omitted here.
FIG. 9 is a flow chart of a RAID-based data read method 4000 according to another embodiment of the present application. The host device 20 executes steps S410 to S420. The method 4000 recovers error data stored in the nonvolatile storage device 11 in a multi-dimensional RAID scheme. Specifically, the method 4000 comprises: s410, under the condition that the memory system fails to try to recover at least part of error data into valid data according to the second check data group, receiving a first check data group and the valid data; and S420, recovering the error data failed in the recovery attempt into the valid data according to the first check data group and the valid data.
Since the data reading method for facilitating the host device 20 and the memory system 10 to include error data recovery in a multidimensional RAID scheme is described in detail above, the detailed description of the present application is omitted here.
It will be appreciated that the processes described in fig. 8 and 9 may be implemented as computer software programs, in accordance with embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the data storage method 3000 shown in fig. 8 and the data reading method 4000 shown in fig. 9. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
It should be understood by those skilled in the art that although the embodiments of the present application describe a two-dimensional RAID scheme and a multi-dimensional RAID scheme that is a three-dimensional RAID scheme, the embodiments of the present application may be extended to any multi-dimensional RAID scheme.
The above description is only a preferred embodiment of the present application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (25)

1. A RAID-based data storage method, the method comprising:
receiving data from a host, wherein the data comprises a plurality of valid data and a first check data group which are stored in a grid form, and each data in the first check data group corresponds to a plurality of valid data of the data in a first direction of the grid;
calculating a second check-up data set according to the plurality of valid data, wherein each data in the second check-up data set corresponds to a plurality of valid data of the data in a second direction of the grid; and
storing the plurality of valid data, the first parity data set, and the second parity data set in a memory system.
2. The data storage method of claim 1, wherein the grid is a two-dimensional grid.
3. The data storage method of claim 1, wherein the grid is a three-dimensional grid, the data further comprises a third verification data set, each data in the third verification data set corresponding to a plurality of valid data of the data in a third direction of the grid;
storing the plurality of valid data, the first parity data set, and the second parity data set in a memory system comprises:
storing the third check data set in the memory system.
4. The data storage method of claim 1, wherein the grid is a three-dimensional grid, and the step of computing a second inspection data set from the plurality of valid data further comprises:
and calculating a third verification data set according to the plurality of valid data, wherein each data in the third verification data set corresponds to a plurality of valid data of the data in the third direction of the grid.
5. The data storage method of claim 4, wherein the step of storing the plurality of valid data, the first parity data set, and the second parity data set in a memory system comprises:
storing the third check data set in the memory system.
6. A memory system, comprising:
a non-volatile storage device for storing data; and
a storage controller, communicatively coupled to the non-volatile storage device, for executing program instructions to control the non-volatile storage device to perform the data storage method of any of claims 1 to 5.
7. A RAID-based data reading method, wherein the data is stored in the memory system according to the data storage method of any one of claims 1 to 5, and at least one error data is generated in the plurality of valid data, wherein the method comprises:
attempting to restore the error data to valid data based on the second parity data set; and
and under the condition that at least part of the error data fails to attempt to recover, sending the first check data group and the valid data to the host, so that the host recovers the error data failed to attempt to recover into valid data according to the first check data group and the valid data.
8. The data reading method according to claim 7, wherein after the step of attempting to restore the error data to valid data based on the second parity data group, the method further comprises:
and sending the valid data to the host if at least part of the error data is successfully recovered.
9. The data reading method of claim 7, wherein in the event of a failure of at least a portion of the error data recovery attempts, sending the first check data set and the valid data to the host further comprises:
and sending the third check data group to the host, so that the host recovers the error data failed in recovery attempt into valid data according to the first check data group, the third check data group and the valid data.
10. The data reading method according to claim 7, wherein the step of attempting to restore the error data to valid data based on the second parity data group comprises:
attempting to restore the error data to valid data based on the second parity data set and the third parity data set.
11. A memory system, comprising:
a non-volatile storage device for storing data; and
a storage controller, communicatively connected to the non-volatile storage device, for executing program instructions to control the non-volatile storage device to perform the data reading method of any of claims 7 to 10.
12. A RAID-based data storage method, the method comprising:
calculating a first check data group according to a plurality of valid data in the data stored in the grid form, wherein each data in the first check data group corresponds to a plurality of valid data of the data in a first direction of the grid; and
sending the data to a memory system, so that the memory system calculates the second check data set according to a plurality of valid data in the data, and stores the plurality of valid data, the first check data set and the second check data set in the memory system, wherein each data in the second check data set corresponds to a plurality of valid data of the data in a second direction of the grid.
13. The data storage method of claim 12, wherein the grid is a two-dimensional grid.
14. The data storage method of claim 12, wherein the grid is a three-dimensional grid, and wherein the step of calculating the first check data group based on a plurality of valid data in the data stored in the form of the grid comprises:
and calculating a third check data group according to a plurality of valid data, wherein each data in the third check data group corresponds to a plurality of valid data of the data in the third direction of the grid.
15. The data storage method of claim 14, wherein the data comprises the third parity data group.
16. The data storage method of claim 12, wherein the grid is a three-dimensional grid, and wherein sending the data to a memory system comprises:
sending the data to a memory system, so that the memory system calculates the second check data group and the third check data group according to a plurality of valid data in the data, and stores the plurality of valid data, the first check data group, the second check data group and a third check data group in the memory system, wherein each data in the second check data group corresponds to a plurality of valid data of the data in the second direction of the grid, and each data in the third check data group corresponds to a plurality of valid data of the data in the third direction of the grid.
17. A host device, comprising:
a host processor; and
a host memory communicatively coupled to the host processor, wherein the host memory stores a computer program executable by the host processor, and wherein the host processor executes the data storage method of any of claims 12 to 16 when the computer program is executed by the host processor.
18. A non-transitory computer-readable program medium storing a computer program for causing a computer to execute the data storage method according to any one of claims 12 to 16.
19. A RAID-based data reading method, wherein the data is stored in the memory system according to the data storage method of any one of claims 12 to 16, and at least one error data is generated in the plurality of valid data, wherein the data reading method includes:
receiving the first parity data set and the valid data in the event of a failure of the memory system to attempt to recover at least part of the error data to valid data from the second parity data set; and
and restoring the error data which fails to be restored into valid data according to the first check data group and the valid data.
20. A method for reading data according to claim 19, the method further comprising: receiving the valid data in a case where an attempt to restore at least part of the error data to valid data from the second parity data group by the memory system is successful.
21. A method for reading data according to claim 19, wherein the step of receiving the first check data set and the valid data comprises:
and receiving the third check data group.
22. A data reading method according to claim 21, wherein the step of recovering the error data for which recovery attempt failed to be valid data comprises:
and recovering the error data failed in the recovery attempt into valid data according to the first check data group, the third check data group and the valid data.
23. A method for reading data according to claim 19, wherein the step of receiving the first check data set and the valid data comprises:
receiving the first parity data group and the valid data in a case where the memory system fails to attempt to restore at least part of the error data to the valid data based on the second parity data group and the third parity data group.
24. A host device, characterized in that,
a host processor; and
a host memory communicatively coupled to the host processor, wherein the host memory stores a computer program executable by the host processor, and wherein the host processor executes the data storage method of any of claims 19 to 23 when the computer program is executed by the host processor.
25. A non-transitory computer-readable program medium storing a computer program for causing a computer to execute the data reading method according to any one of claims 19 to 23.
CN202111009117.2A 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system Active CN113703684B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111009117.2A CN113703684B (en) 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system
CN202410620330.4A CN118466839A (en) 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111009117.2A CN113703684B (en) 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202410620330.4A Division CN118466839A (en) 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system

Publications (2)

Publication Number Publication Date
CN113703684A true CN113703684A (en) 2021-11-26
CN113703684B CN113703684B (en) 2024-06-11

Family

ID=78657597

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202111009117.2A Active CN113703684B (en) 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system
CN202410620330.4A Pending CN118466839A (en) 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202410620330.4A Pending CN118466839A (en) 2021-08-31 2021-08-31 RAID-based data storage method, data reading method and memory system

Country Status (1)

Country Link
CN (2) CN113703684B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070074095A1 (en) * 2005-09-29 2007-03-29 Paul Langner Method and apparatus for N‘packet level mesh protection
US8316260B1 (en) * 2012-03-23 2012-11-20 DSSD, Inc. Method and system for multi-dimensional raid
CN103339609A (en) * 2010-09-28 2013-10-02 净睿存储股份有限公司 Intra-device data protection in a RAID array
US8554997B1 (en) * 2013-01-18 2013-10-08 DSSD, Inc. Method and system for mirrored multi-dimensional raid
CN104871138A (en) * 2012-11-15 2015-08-26 Dssd股份有限公司 Method and system for multi-dimensional raid reconstruction and defect avoidance
CN109358809A (en) * 2018-09-28 2019-02-19 方信息科技(上海)有限公司 A kind of RAID data storage system and method
CN111415699A (en) * 2019-01-07 2020-07-14 爱思开海力士有限公司 Data storage device and operation method thereof
CN111813609A (en) * 2020-07-23 2020-10-23 深圳大普微电子科技有限公司 Data recovery method in storage medium, data recovery system and related equipment
US20210133029A1 (en) * 2019-10-31 2021-05-06 EMC IP Holding Company LLC Methods for data writing and for data recovery, electronic devices, and program products

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070074095A1 (en) * 2005-09-29 2007-03-29 Paul Langner Method and apparatus for N‘packet level mesh protection
CN103339609A (en) * 2010-09-28 2013-10-02 净睿存储股份有限公司 Intra-device data protection in a RAID array
US8316260B1 (en) * 2012-03-23 2012-11-20 DSSD, Inc. Method and system for multi-dimensional raid
CN104272261A (en) * 2012-03-23 2015-01-07 Dssd股份有限公司 Method and system for multi-dimensional raid
CN107038087A (en) * 2012-03-23 2017-08-11 Dssd股份有限公司 Method and system for multidimensional RAID
CN104871138A (en) * 2012-11-15 2015-08-26 Dssd股份有限公司 Method and system for multi-dimensional raid reconstruction and defect avoidance
US8554997B1 (en) * 2013-01-18 2013-10-08 DSSD, Inc. Method and system for mirrored multi-dimensional raid
CN109358809A (en) * 2018-09-28 2019-02-19 方信息科技(上海)有限公司 A kind of RAID data storage system and method
CN111415699A (en) * 2019-01-07 2020-07-14 爱思开海力士有限公司 Data storage device and operation method thereof
US20210133029A1 (en) * 2019-10-31 2021-05-06 EMC IP Holding Company LLC Methods for data writing and for data recovery, electronic devices, and program products
CN111813609A (en) * 2020-07-23 2020-10-23 深圳大普微电子科技有限公司 Data recovery method in storage medium, data recovery system and related equipment

Also Published As

Publication number Publication date
CN118466839A (en) 2024-08-09
CN113703684B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
US11941257B2 (en) Method and apparatus for flexible RAID in SSD
US7984325B2 (en) Storage control device, data recovery device, and storage system
KR102533389B1 (en) Data storage device for increasing lifetime of device and raid system including the same
KR20180091296A (en) Storage device for processing corrupted meta data and Method of operating the storage device
KR102571747B1 (en) Data storage device and operating method thereof
WO2012140695A1 (en) Storage control apparatus and error correction method
US11010065B2 (en) Read retry method for solid state storage device
US11288183B2 (en) Operating method of memory system and host recovering data with write error
US10860423B2 (en) Method and apparatus for performing dynamic recovery management regarding redundant array of independent disks
CN113722144B (en) Data storage device and data processing method
CN113220221B (en) Memory controller and data processing method
CN113553631A (en) Apparatus and method for protecting data in a memory system
US11798648B2 (en) Apparatus and method for recovering data in a memory system
CN113703684B (en) RAID-based data storage method, data reading method and memory system
US11995224B2 (en) Data storage device and data processing method
US20230126507A1 (en) Apparatus and method for programming data in a memory device
US10114694B2 (en) Method and controller for recovering data in event of program failure and storage system using the same
CN114528145A (en) Storage system, operation method and controller
CN111124290A (en) Redundancy method applied to flash memory storage device and flash memory storage device
CN113377282A (en) Data storage device and data processing method
CN113966499B (en) Data protection method for memory and memory device thereof
US11809748B2 (en) Control method of flash memory controller and associated flash memory controller and electronic device
TWI750811B (en) A data protection system for a memory, a data-writing protection method for a memory, and a data-reading protection method for a memory
CN113420341B (en) Data protection method, data protection equipment and computer system
CN107632902B (en) Method, controller and storage system for replying data in case of programming failure

Legal Events

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