Method for operating storage device, storage device and storage system
By dividing the disk into a log area and a data area in the storage system, and performing dual write operations on multiple disks, combined with the in-disk log solution, the problems of writing holes and data recovery are solved, and the performance of the storage device is improved. and reliability.
Patent Information
- Application Number
- CN201910455931.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-27
- Filing Date
- 2019-05-29
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2039-05-29
AI Technical Summary
Existing storage systems are prone to write-hole problems during data writing operations, and it is difficult to effectively recover data in the event of power failure or disk failure, affecting the performance and reliability of storage devices.
By dividing multiple disks into log areas and data areas, first perform a write operation in the log area, and then perform a second write operation on multiple disks in the same array to ensure the final storage of data in the data area, and Implement an in-disk logging scheme in the logging scheme to avoid the use of additional components for replay writing or data recovery in the event of a failure.
It effectively prevents the occurrence of write holes, improves the performance and reliability of the storage device, and ensures the consistency and recoverability of data in the event of a failure.
Smart Images

Figure CN110955610B_ABST
Abstract
Description
[0001] This application claims the priority benefit of Korean Patent Application No. 10-2018-0114813 filed on September 27, 2018 in the Korean Intellectual Property Office (KIPO), the contents of which are incorporated herein by reference in their entirety. Technical Field
[0002] Example embodiments relate generally to semiconductor integrated circuits, and more particularly, to a method of operating a memory device, a memory device performing the method, and a memory system including the memory device. Background Art
[0003] The storage system includes a host device and a storage device, and the storage device may be a memory system including a memory controller and a memory device or only including a memory device. In the storage system, the host device and the storage device are connected to each other through various interface standards (such as Universal Flash Storage (UFS), Serial Advanced Technology Attachment (SATA), Small Computer System Interface (SCSI), Serial Attached SCSI (SAS), Embedded Multimedia Card (eMMC), etc.).
[0004] Recently, for data persistence and performance purposes, many storage systems use a log scheme. Such a storage system stores two copies of data: one in the log part and the other in the data part. In such a storage system, additional elements or devices may be required to establish the log part. Summary of the invention
[0005] At least one example embodiment of the present disclosure provides a method of operating a memory device capable of preventing a write-hole in a data write operation.
[0006] At least one example embodiment of the present disclosure provides a storage device that performs the method and is capable of preventing a write hole in a data write operation.
[0007] At least one example embodiment of the present disclosure provides a storage system including the storage device.
[0008] According to an example embodiment, in a method of operating a storage device including a plurality of disks, the plurality of disks are respectively divided into a plurality of log areas and a plurality of data areas. When a write command to a plurality of target disks among the plurality of disks is received, a first write operation is performed to store the target data to be written in the log areas of the plurality of target disks. The plurality of target disks are included in the same array. After the first write operation is completed, a second write operation is performed to store the target data in the data areas of the plurality of target disks.
[0009] According to an example embodiment, a storage device includes: a plurality of disks, each configured to be divided into a plurality of log areas and a plurality of data areas. When a write command to a plurality of target disks among the plurality of disks is received, a first write operation is performed to store the target data to be written in the log areas of the plurality of target disks, the plurality of target disks being included in the same array. After the first write operation is completed, a second write operation is performed to store the target data in the data areas of the plurality of target disks.
[0010] According to an example embodiment, a storage system includes: a host device and a storage device. The storage device is controlled by the host device and includes a plurality of disks respectively divided into a plurality of log areas and a plurality of data areas. When a write command and target data to be written are provided from the host device, the storage device performs a first write operation to store the target data in the log areas of a plurality of target disks among the plurality of disks, and performs a second write operation after the first write operation is completed to store the target data in the data areas of the plurality of target disks. The plurality of target disks are included in the same array.
[0011] According to an example embodiment, a method performed by a nonvolatile memory system includes: (1) receiving a first write command from a host device external to the nonvolatile memory system; (2) in response to the first write command, performing a first write operation to write first target data received from the host device into a first physical location of the nonvolatile memory system associated with a first logical address; and (3) after completing the first write command, performing a second write operation so that the physical address of the nonvolatile memory system storing the first target data is identified by a second logical address different from the first logical address.
[0012] In the method of operating a storage device, an in-disk log scheme may be implemented so that each of the plurality of disks has a log area for itself, and the log scheme may be adopted without additional elements or devices in the storage device. In addition, when a power failure and / or a disk failure occurs, a replay write operation or a data recovery operation may be effectively performed based on the log scheme (e.g., the in-disk log scheme). Therefore, the performance and reliability of the storage device may be improved or enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Illustrative, non-limiting example embodiments will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings.
[0014] Figure 1 is a flowchart illustrating a method of operating a memory device according to example embodiments.
[0015] Figure 2 is a block diagram illustrating a memory device and a memory system including the memory device according to example embodiments.
[0016] Figure 3 is a diagram illustrating an example of a log area included in a storage device according to an example embodiment.
[0017] Figure 4 It shows execution Figure 1 A flowchart of an example of a first write operation and a second write operation in a method.
[0018] Figure 5A , Figure 5B , Figure 5C , Figure 5D and Figure 6 Is used to describe Figure 4 Schematic diagram of a first write operation and a second write operation in FIG.
[0019] Figure 7 It shows execution Figure 1 Flowchart of another example of the first write operation and the second write operation in the method.
[0020] Figure 8 and Fig. 9 Is used to describe Figure 7 Schematic diagram of a first write operation and a second write operation in FIG.
[0021] Fig.10 It shows execution Figure 1 Flowchart of another example of the first write operation and the second write operation in the method.
[0022] Fig.11 Is used to describe Fig.10 Schematic diagram of a first write operation and a second write operation in FIG.
[0023] Fig.12 is a flowchart illustrating a method of operating a memory device according to example embodiments.
[0024] Fig.13 It shows execution Fig.12 A flowchart of an example of a method for replaying a write operation.
[0025] Fig.14A , Fig. 14B , Fig. 14C and Fig.15 Is used to describe Fig.13 Schematic diagram of the replay write operation in .
[0026] Fig.16 is a diagram illustrating another example of a log area included in a storage device according to example embodiments.
[0027] Fig.17 It shows execution Fig.12A flowchart of another example of a replay write operation in a method.
[0028] Fig.18A , Fig.18B and Fig.18C Is used to describe Fig.17 Schematic diagram of the replay write operation in .
[0029] Fig.19 is a flowchart illustrating a method of operating a memory device according to example embodiments.
[0030] Fig. 20 It shows execution Fig.19 A flow chart of an example of a method for performing data recovery operations.
[0031] Fig.21A , Fig. 21B and Fig. 21C Is used to describe Fig. 20 An illustration of a data recovery operation in .
[0032] Fig. 22 It shows execution Fig.19 A flowchart of another example of a data recovery operation in a method.
[0033] Fig.23A , Fig. 23B and Fig.23C Is used to describe Fig. 22 An illustration of a data recovery operation in .
[0034] Fig.24 is a diagram illustrating another example of a log area included in a storage device according to example embodiments.
[0035] Fig.25 It is shown that the Fig.24 0066] A diagram of an example of a metablock in a log area of .
[0036] Fig.26 It shows execution Fig.19 A flowchart of another example of a data recovery operation in a method.
[0037] Fig.27A , Fig.27B and Fig.27C Is used to describe Fig.26 An illustration of a data recovery operation in .
[0038] Fig.28 is a block diagram illustrating a memory device and a memory system including the memory device according to example embodiments.
[0039] Fig.29 is a block diagram illustrating an electronic system according to example embodiments. DETAILED DESCRIPTION
[0040] Various example embodiments will be described more fully with reference to the accompanying drawings showing the embodiments. However, the present disclosure can be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. Throughout this application, the same reference numerals represent the same elements.
[0041] Figure 1 is a flowchart illustrating a method of operating a memory device according to example embodiments.
[0042] Reference Figure 1 The storage device for executing or implementing the method according to the example embodiment includes a plurality of disks, each of which forms an independent storage space.
[0043] In addition, the storage device is provided with a redundant array of independent disks (RAID) architecture to improve operating speed and stability. A storage device with a RAID architecture generally includes multiple disks (e.g., multiple non-volatile memory devices), and input data is distributed on multiple disks. A storage device with a RAID architecture can improve operating speed by accessing multiple disks in parallel (or simultaneously). In addition, a storage device with a RAID architecture can store parity data together with the input data. Therefore, although physical errors occur during writing data to multiple disks and / or reading data from multiple disks, a storage device with a RAID architecture can use co-stored parity data to recover erroneous (or "damaged") data. In this way, a storage device with a RAID architecture provides enhanced data reliability or stability.
[0044] In the method of operating a storage device according to an example embodiment, a plurality of disks are divided into a plurality of log areas and a plurality of data areas, respectively (step S100). In other words, each of the plurality of disks may have a log area or write log for itself internally (e.g., to temporarily store data by itself).
[0045] In some example embodiments, step S100 may be performed at the time of manufacturing the storage device or at the initial operation time of the storage device to set multiple log areas and multiple data areas in multiple disks. After the time of manufacturing the storage device or the initial operation time of the storage device, step S100 may be replaced by loading the result of setting multiple log areas and multiple data areas.
[0046] When a write command to multiple target disks among the multiple disks is received, a first write operation is performed to store the target data to be written in the log area of the multiple target disks (step S200). The multiple target disks are included in the same array (e.g., the same array of the RAID architecture). After the first write operation is completed, a second write operation is performed to store the target data in the data area of the multiple target disks (step S300). In other words, the target data may be first written in the log area, and then, after the write operation to the log area is completed, the target data may be written in the data area (e.g., the final location).
[0047] After the second write operation is completed, the target data stored in the log area of the plurality of target disks may be released (step S400). If the second write operation is successfully completed, the target data stored in the log area of the plurality of target disks may no longer be needed, so the target data may be released from the log area.
[0048] The storage device according to the example embodiment is driven based on a log scheme or a log file system. In the log scheme, an area called "log" is prepared. When a specific write operation occurs, the data and / or metadata are first stored in the log area, rather than directly in the storage location of the storage device. All data and metadata associated with a write operation are stored in the log area, and such data and metadata streams are grouped into transaction units. In this way, several transactions are written to the log area, and then, based on background jobs, jobs or tasks, a specific transaction that is completely written to the log area is written to the storage location (e.g., the final location of the data area) of the storage device. If all data and metadata included in a specific transaction are completely stored in the data area, the specific transaction is deleted from the log area to obtain space in the log area required for another write operation.
[0049] In the case of using the log scheme as described above, the consistency of the storage device can be maintained even if a power failure occurs on the storage device. For example, if a specific write operation is interrupted by a power failure, the results of the specific write operation will be retained in the data area and the log area respectively. According to the log file system, the write operation that has been written to the data area but has been interrupted can be a job in the form of a transaction that is completely and completely written to the log area. In this example, by scanning the log area when the storage device is restarted or remounted (remount), the interrupted write operation can be completed quickly. While being written in the log area, another write operation may have been interrupted. In this example, unfinished transactions will be stored in the log area, and by ignoring unfinished transactions when restarting or remounting the storage device, the consistency of the file system can be maintained. In other words, by taking steps to recover or ignore all situations that may occur during a power failure, the consistency of the storage device can be maintained.
[0050] In a method of operating a storage device according to an example embodiment, an in-disk journaling scheme may be implemented so that each of a plurality of disks has a journal area for itself, and the journaling scheme may be adopted without additional elements or devices in the storage device. In addition, when a power failure and / or a disk failure occurs, based on the journaling scheme (e.g., the in-disk journaling scheme), a replay write operation or a data recovery operation may be effectively performed. Therefore, the performance and data reliability of the storage device may be improved or enhanced.
[0051] Figure 2 is a block diagram illustrating a memory device and a memory system including the memory device according to example embodiments.
[0052] Reference Figure 2 , the storage system 100 includes a host device 200 and a storage device 300 .
[0053] The host device 200 controls the overall operation of the memory system 100. The host device 200 may include a processor 210 and a host memory 220.
[0054] The processor 210 may control the operation of the host device 200. For example, the processor 210 may execute an operating system (OS). The operating system may include a file system for file management and a device driver for controlling peripheral devices including the storage device 300 at an operating system layer. For example, the processor 210 may include at least one of various processing units (e.g., a central processing unit (CPU), etc.).
[0055] The host memory 220 may store instructions and / or data executed and / or processed by the processor 210. The host memory 220 may be any memory device having a relatively high or fast operating speed. For example, the host memory 220 may include at least one of various volatile memory devices (e.g., dynamic random access memory (DRAM) etc.).
[0056] The storage device 300 is accessed by the host device 200 and includes a plurality of disks 310, 320, ..., 330. Each of the plurality of disks 310-330 is divided into a respective log area JA and a respective data area DA. As described above, the data area DA is an area where data will be actually stored, and the log area JA is an area for a log scheme, wherein data is temporarily and pre-stored in the log area JA before being stored in the data area DA. For example, the size of the data area DA may be larger than the size of the log area JA.
[0057] Each of the plurality of disks 310 to 330 may be an independent storage space. Each of the plurality of disks 310 to 330 may be any memory device that is accessed by the host device 200 in units of memory blocks. For example, each of the plurality of disks 310 to 330 may include at least one of various non-volatile memory devices (e.g., electrically erasable programmable read-only memory (EEPROM), flash memory, phase change random access memory (PRAM), resistive random access memory (RRAM), nano floating gate memory (NFGM), polymer random access memory (PoRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), etc.).
[0058] In some example embodiments, each of the plurality of disks 310-330 may include only one nonvolatile memory device. In other example embodiments, each of the plurality of disks 310-330 may include a plurality of nonvolatile memory devices and a memory controller for controlling the plurality of nonvolatile memory devices. For example, each of the plurality of disks 310-330 may be one of a solid state drive (SSD), a multimedia card (MMC), an embedded multimedia card (eMMC), a universal flash memory (UFS), etc.
[0059] When a write command WCMD, a write address WADDR, and target data WDAT to be written are provided from the host device 200, the storage device 300 performs a first write operation to store the target data WDAT in the log area JA of multiple target disks included in the same array, and performs a second write operation after the first write operation is completed to store the target data WDAT in the data area DA of the multiple target disks. After the second write operation is completed, the storage device 300 may release the target data WDAT stored in the log area JA of the multiple target disks. In other words, the storage device 300 may execute or implement, based on a request from the host device 200. Figure 1 Steps S100, S200, S300 and S400 in FIG.
[0060] In some example embodiments, the storage device 300 may be connected to the host device 200 via a block accessible interface, wherein the block accessible interface may include, for example, a Serial Advanced Technology Attachment (SATA) bus, a Non-Volatile Memory Express (NVMe) bus, a Serial Attached SCSI (SAS) bus, etc. The storage device 300 may provide the block accessible interface to the host device 200 using a block accessible address space corresponding to the access size of the plurality of disks 310-330 to allow access to data stored in the plurality of disks 310-330 in units of memory blocks.
[0061] In some example embodiments, Figure 2 The storage system 100 may be a software RAID system that sets a RAID architecture on an operating system of the host device 200 without requiring an additional RAID controller.
[0062] Figure 3 is a diagram illustrating an example of a log area included in a storage device according to an example embodiment.
[0063] Figure 3 The four disks (eg, Figure 5A Hereinafter, the exemplary embodiment will be described based on an example in which four disks form an array (e.g., a group of disks) and a write operation is performed on four disks in an array at a time (e.g., an example in which the plurality of target disks include four disks).
[0064] Reference Figure 3, the log areas JA1~JA4 may include: super blocks SB1, SB2, SB3 and SB4; meta blocks MB01, MB02, MB03, MB04, MB11, MB12, MB13 and MB14; and data blocks D01, D02, D03, P0, D11, D12, P1, D13, D21, D22, D23, P2, P3, D31, D32, D33, D41, D42, D43, P4, P5, D51, D52, D53, D61, D62, P6 and D63.
[0065] Hereinafter, the term "data block" may be used to include a block for storing actual data to be stored and a block for storing parity data about the actual data. In some cases, only a "block storing actual data to be stored" may be referred to as a data block, and a block storing parity data may be referred to as a parity block.
[0066] The write operation to the storage device 300 may be performed in stripe units and in transaction units. A stripe may represent a unit that is written to multiple target disks at one time. Figure 1 As described above, a transaction may represent a unit for grouping or bundling specific data of a log scheme. A stripe may include actual data to be stored and parity data about the actual data. A transaction may include two or more stripes.
[0067] exist Figure 3 In the example of , data blocks D01, D02, D03 and P0 may form a stripe STR0, data blocks D11, D12, P1 and D13 may form a stripe STR1, data blocks D21, D22, D23 and P2 may form a stripe STR2, data blocks P3, D31, D32 and D33 may form a stripe STR3, data blocks D41, D42, D43 and P4 may form a stripe STR4, data blocks P5, D51, D52 and D53 may form a stripe STR5, and data blocks D61, D62, P6 and D63 may form a stripe STR6. In addition, stripes STR0, STR1, STR2 and STR3 may form a transaction TRS0, and stripes STR4, STR5 and STR6 may form a transaction TRS1. The last digit in the reference number of each transaction may represent a transaction identification (ID). For example, the transaction ID may increase sequentially.
[0068] Super blocks SB1-SB4 may store key information or main information of log areas JA1-JA4. For example, each of super blocks SB1-SB4 may store initial transaction information associated with an initial transaction and size information of each of log areas JA1-JA4, wherein the initial transaction information indicates the starting point of the replay write operation. The initial transaction may be the first transaction valid at the time when the replay write operation is performed due to a power failure or a system crash. For example, the initial transaction information may include ID information of the initial transaction and commit information indicating a block offset within the log area of the initial transaction. For example, one log area may include one super block.
[0069] Metablocks MB01-MB14 may store information associated with the current transaction (e.g., corresponding to or each transaction), specifically, information required for the current transaction and information of each block included in the current transaction. For example, the information associated with the current transaction may include ID information of the current transaction, final location block address information of the current transaction, attribute information of the current transaction, and checksum information for checking the validity of metadata and data blocks in the current transaction. For example, the number of metablocks in one log area may be substantially equal to the number of transactions.
[0070] Data blocks D01-D63 may store data of the current transaction. For example, the data of the current transaction may include actual data to be stored and parity data about the actual data. The first alphabetical characters "D" and "P" in the reference number of each data block may represent the actual data and parity data, respectively.
[0071] For example, the first super block SB1 may store key information or main information of the first log area JA1. The first super block SB1 may include first initial transaction information associated with the first initial transaction of the first log area JA1 (e.g., ID information and commit information of the first initial transaction) and size information of the first log area JA1. For example, if the first initial transaction is transaction TRS1, the ID information of the first initial transaction may be "1", and the commit information of the first initial transaction may be "6" which is the number of blocks from the first super block SB1 to the metablock MB11 of the transaction TRS1. Similarly, the second super block SB2, the third super block SB3, and the fourth super block SB4 may store key information or main information of the second log area JA2, the third log area JA3, and the fourth log area JA4, respectively.
[0072] Metablock MB01 may store information associated with transaction TRS0. In metablock MB01, the ID information of the current transaction may be "0", the final location block address information of the current transaction may include the block addresses (e.g., physical addresses) at which data blocks D01, D11, D21, and P3 will be stored in the first data area of the first disk including the first log area JA1, the attribute information of the current transaction may include the attributes of the data blocks D01, D11, D21, and P3, and the checksum information of the current transaction may include a checksum for checking the validity of the data blocks D01, D11, D21, and P3. Similarly, metablocks MB02, MB03, and MB04 may respectively store information associated with transaction TRS0, and metablocks MB11, MB12, MB13, and MB14 may respectively store information associated with transaction TRS1.
[0073] In some example embodiments, at least a portion of the information stored in superblocks SB1-SB4 and metablocks MB01-MB14 may be shared by multiple target disks included in the same array. For example, initial transaction information among the information stored in superblocks SB1-SB4 may be shared by multiple target disks, and final location block address information and attribute information of the current transaction stored in metablocks MB01-MB14 may be shared by multiple target disks included in the same array.
[0074] In other words, the first super block SB1 can store the first initial transaction information of the first log area JA1, and can also store the initial transaction information of other log areas JA2 to JA4. In addition, the meta block MB01 can store the final location block addresses and attributes of data blocks D01, D11, D21, and P3, and can also store the final location block addresses and attributes of other data blocks D02, D12, D22, D31, D03, P1, D23, D32, P0, D13, P2, and D33 included in the same transaction (e.g., TRS0). As will be described later, such shared information can be used for replay write operations and / or data recovery operations performed after a power failure and / or a disk failure.
[0075] Figure 4 It shows execution Figure 1 A flowchart of an example of a first write operation and a second write operation in a method. Figure 5A , Figure 5B , Figure 5C , Figure 5D and Figure 6 Is used to describe Figure 4 Schematic diagram of a first write operation and a second write operation in FIG.
[0076] Reference Figure 1 , Figure 4 , Figure 5A , Figure 5B , Figure 5C , Figure 5D and Figure 6 , when performing the first write operation and the second write operation, such as Figure 5A As shown in FIG. 1 , target data DX1, DX2, DX3, and PX to be written may first be prepared in the host memory 220 included in the host device 200. For example, the target data DX1, DX2, DX3, and PX may correspond to one stripe.
[0077] like Figure 5B As shown in , based on a write command (e.g., Figure 2 During the first write operation, the target data DX1, DX2, DX3, and PX may be provided from the host memory 220 outside the storage device 300.
[0078] For example, Figure 6 As shown in , the first data DX1 included in the target data DX1, DX2, DX3 and PX may be stored in the first data block D01 in the first disk DISK1 included in the target disks DISK1 to DISK4 (step S210). The first data block D01 may have a first physical block address PBA0 among the physical block addresses PBA0, PBA1, ..., PBA10, PBA11. In addition, the first logical block address LBA10 among the logical block addresses LBA10, LBA11, ..., LBA1000, LBA1001 may be mapped to the first physical block address PBA0 of the first data block D01 (step S220). The first logical block address LBA10 may indicate the log area JA1 of the first disk DISK1. Figure 6 The arrow ① in the figure can correspond to Figure 4 In step S210, Figure 6 The arrow ② in the figure can correspond to Figure 4 Step S220 in .
[0079] Similarly, other data DX2, DX3, and PX may be respectively stored in data blocks included in other disks DISK2 to DISK4, and corresponding logical block addresses may be respectively mapped with corresponding physical block addresses.
[0080] like Figure 5C As shown in , after the first write operation is completed, a second write operation may be performed to store the target data DX1, DX2, DX3, and PX at once to the data areas DA1-DA4 of the target disks DISK1-DISK4 (step S300). Figure 4In the example of FIG. 3 , during the second write operation, target data DX1 , DX2 , DX3 , and PX may be provided from the host memory 220 outside the storage device 300 .
[0081] For example, Figure 6 As shown in , the first data DX1 may be stored in the second data block DP1 included in the first disk DISK1 (step S310). The second data block DP1 may be distinguished from the first data block DO1 and may have a second physical block address PBA10 different from the first physical block address PBA0. In addition, a second logical block address LBA1000 different from the first logical block address LBA10 may be mapped to the second physical block address PBA10 of the second data block DP1 (step S320). The second logical block address LBA1000 may indicate the data area DA1 of the first disk DISK1. Figure 6 The arrow ③ in the figure can correspond to Figure 4 In step S310, Figure 6 The arrow ④ in the figure can correspond to Figure 4 Step S320 in .
[0082] Similarly, other data DX2, DX3 and PX may be stored in other data blocks included in other disks DISK2 to DISK4, respectively, and corresponding logical block addresses may be mapped to corresponding physical block addresses, respectively.
[0083] like Figure 5D As shown in FIG. 1 , after the second write operation is completed, the target data DX1, DX2, DX3, and PX may be released (step S400). The target data DX1, DX2, DX3, and PX in the host memory 220 may be released, and the target data DX1, DX2, DX3, and PX stored in the log areas JA1 to JA4 of the target disks DISK1 to DISK4 may also be released. For example, Figure 6 As shown in , the mapping between the first logical block address LBA10 and the first physical block address PBA0 may be released (step S410). Figure 6 The X mark ⑤ in the figure can correspond to Figure 4 Step S410 in .
[0084] In some example embodiments, the first data DX1 stored in the first data block D01 may not be erased or deleted while releasing the mapping in step S410. In other words, the operation of step S410 may be sufficient to release the address mapping, and the first data DX1 in the log area JA1 may be deleted later by a background job.
[0085] exist Figure 4In the example of , the target data DX1, DX2, DX3, and PX may be received twice from the external host memory 220, and the target data DX1, DX2, DX3, and PX may be physically written twice in the target disks DISK1 to DISK4. In addition, the log areas JA1 to JA4 and the data areas DA1 to DA4 of the target disks DISK1 to DISK4 may be logically and physically distinguished from each other.
[0086] although Figure 5A , Figure 5B , Figure 5C and Figure 5D It is shown that the first write operation and the second write operation are continuously performed on one stripe, but actually the first write operation may be performed on one transaction including a plurality of stripes, and the second write operation may be performed on the same transaction after the first write operation is completed.
[0087] Figure 7 It shows execution Figure 1 Flowchart of another example of the first write operation and the second write operation in the method. Figure 8 and Fig. 9 Is used to describe Figure 7 The first write operation and the second write operation in FIG. Figure 4 , Figure 5A , Figure 5B , Figure 5C , Figure 5D and Figure 6 Repeated description of .
[0088] Reference Figure 1 , Figure 7 , Figure 8 and Fig. 9 , the first write operation can be done with reference to Figure 5A and Figure 5B The first write operation described is essentially the same, Figure 7 Steps S210 and S220 in Figure 4 Steps S210 and S220 in are substantially the same. Fig. 9 The arrows ① and ② in the figure can be respectively Figure 6 The arrows ① and ② in the figure are basically the same.
[0089] like Figure 8 As shown in , after the first write operation is completed, a second write operation may be performed to store the target data DX1, DX2, DX3, and PX in the data areas DA1-DA4 of the target disks DISK1-DISK4 at once (step S300). Figure 7 In the example of FIG. 2 , during the second write operation, the target data DX1 , DX2 , DX3 , and PX may be provided internally in the storage device 300 instead of being provided from the external host memory 220 .
[0090] For example, Fig. 9 As shown in, the second logical block address LBA1000 indicating the data area DA1 of the first disk DISK1 can be mapped to the first physical block address PBA0 of the first data block D01, and at the same time, the mapping between the first logical block address LBA10 indicating the log area JA1 of the first disk DISK1 and the first physical block address PBA0 is released (step S330). Fig. 9 The arrow and X mark ③' in the figure can correspond to Figure 7 Step S330 in .
[0091] In some example embodiments, based on a move command received from the host device 200 or a move command generated internally by the storage device 300 , the address mapping release operation and the address remapping operation in step S330 may be performed substantially simultaneously or concurrently.
[0092] In some example embodiments, when referring to Figure 7 When performing the second write operation, the Figure 1 Step S400 in .
[0093] Fig.10 It shows execution Figure 1 Flowchart of another example of the first write operation and the second write operation in the method. Fig.11 Is used to describe Fig.10 The first write operation and the second write operation in FIG. Figure 4 , Figure 5A , Figure 5B , Figure 5C , Figure 5D , Figure 6 and Figure 8 Repeated description of .
[0094] Reference Figure 1 , Figure 8 , Fig.10 and Fig.11 , the first write operation can be done with reference to Figure 5A and Figure 5B The first write operation described is essentially the same, Fig.10 Steps S210 and S220 in Figure 4 Steps S210 and S220 in are substantially the same. Fig.11 The arrows ① and ② in the figure can be respectively Figure 6 The arrows ① and ② in the figure are basically the same.
[0095] After the first write operation is completed, you can refer to Figure 8 The second writing operation described above is similarly performed to the second writing operation (step S300). Fig.11 As shown in , the second logical block address LBA1000 indicating the data area DA1 of the first disk DISK1 can be mapped to the first physical block address PBA0 of the first data block D01, while maintaining the mapping between the first logical block address LBA10 indicating the log area JA1 of the first disk DISK1 and the first physical block address PBA0 (step S340). Fig.11 The arrow ③" in the figure can correspond to Fig.10 Step S340 in .
[0096] In some example embodiments, the address copy mapping operation in step S340 may be performed based on a share command received from the host device 200 or generated internally by the storage device 300 .
[0097] As reference Figure 5D As described above, after the second write operation is completed, the target data DX1, DX2, DX3 and PX may be released (step S400). Fig.11 As shown in , the mapping between the first logical block address LBA10 and the first physical block address PBA0 may be released (step S410). Fig.11 The X mark ④ in the figure can correspond to Fig.10 Step S410 in , and Fig.10 Step S410 in Figure 4 The step S410 in is basically the same.
[0098] and Figure 7 Different examples can be found in Fig.10 The address copy mapping operation in the example is followed by the address mapping release operation, and thus, power failure and / or disk failure can be handled or responded to more effectively.
[0099] exist Figure 7 and Fig.10 In the example of , the target data DX1, DX2, DX3, and PX can be received from the external host memory 220 at one time, and the target data DX1, DX2, DX3, and PX can be physically written into the target disks DISK1 to DISK4 at one time, so the data writing cost can be reduced. In addition, the log areas JA1 to JA4 and the data areas DA1 to DA4 of the target disks DISK1 to DISK4 can be logically distinguished from each other, but may not be physically distinguished from each other.
[0100] Fig.12 is a flowchart illustrating a method of operating a storage device according to an example embodiment. Figure 1 Repeated description of .
[0101] Reference Fig.12 , in a method of operating a storage device according to example embodiments, Fig.12Step S100 in Figure 1 The step S100 in is basically the same.
[0102] When the storage device is restarted after a power failure occurs on the storage device, a replay write operation is performed on the data areas of the multiple target disks based on the log areas of the multiple target disks (step S500). In other words, the inconsistency of the file system due to the power failure can be prevented, and the consistency of the file system can be maintained using the log areas of the multiple target disks.
[0103] In some example embodiments, the replay write operation may be performed when the storage device is restarted after a power failure occurs during at least one of the first write operation and the second write operation. Fig.12 However, Figure 1 At least one of steps S200 and S300 in Fig.12 Between steps S100 and S500 in .
[0104] Fig.13 It shows execution Fig.12 A flowchart of an example of a method for replaying a write operation. Fig.14A , Fig. 14B , Fig. 14C and Fig.15 Is used to describe Fig.13 Schematic diagram of the replay write operation in . Fig.14A In the following figures, reference numerals representing super blocks, meta blocks, and data blocks may also be used to represent information and / or data stored in super blocks, meta blocks, and data blocks, respectively.
[0105] Reference Figure 3 , Fig.12 , Fig.13 , Fig.14A , Fig. 14B , Fig. 14C and Fig.15 When performing a replay write operation, the super blocks SB1-SB4 may be read from the log areas JA1-JA4 of the target disks DISK1-DISK4 immediately after the storage system 100 is restarted after a power failure to determine the starting point of the replay write operation (step S510).
[0106] For example, Fig.14A As shown in , the read super blocks SB1-SB4 may be sent to the host memory 220 outside the storage device 300. The host device 200 may determine the starting point of the playback write operation based on the initial transaction information included in the super blocks SB1-SB4. In order to determine the starting point of the playback write operation, the initial transaction information included in the super blocks SB1-SB4 may be shared by multiple target disks included in the same array.
[0107] In some example embodiments, when ID information of initial transactions included in all super blocks SB1 ˜ SB4 are substantially identical to one another, a transaction corresponding to the same ID may be selected as a starting point for replaying a write operation.
[0108] In other example embodiments, when the ID information of the initial transactions included in the super blocks SB1 to SB4 are different from each other, the transaction corresponding to the smallest ID may be selected as the starting point for replaying the write operation. For example, when the ID information of the initial transactions included in the super blocks SB1, SB3, and SB4 is "1" and the ID information of the initial transaction included in the super block SB2 is "0", it may be determined that the transaction TRS0 corresponding to the smallest ID has not been released in the log areas JA1 to JA4, and thus the transaction TRS0 may be selected as the starting point for replaying the write operation (e.g., the replaying the write operation may start from the transaction TRS0).
[0109] The validity may be checked by reading the metablock and the data block associated with the starting point of the replay write operation from the log areas JA1 ˜ JA4 of the target disks DISK1 ˜ DISK4 (step S520 ).
[0110] For example, Fig. 14B As shown in , when transaction TRS0 is selected as the starting point of the replay write operation as described above, metablocks MB01 to MB04 for transaction TRS0 among metablocks MB and data blocks D01, D02, D03, and P0 for transaction TRS0 among data blocks D / P can be read out and sent to the external host memory 220. Fig. 14B It is shown that only some data blocks D01, D02, D03 and P0 of transaction TRS0 are read out, but in fact all data blocks D01, D02, D03, P0, D11, D12, P1, D13, D21, D22, D23, P2, P3, D31, D32 and D33 of transaction TRS0 can be read out.
[0111] In some example embodiments, an operation of reading information of all data blocks D01 ˜ D33 in transaction TRS0 and comparing it with checksum information of metablocks MB01 ˜ MB04 may be performed for validity check.
[0112] When it is checked in step S520 that the read metablock and the read data block are valid, the data included in the read data block may be written into the data areas DA1 ˜ DA4 of the target disks DISK1 ˜ DISK4 (step S530 ).
[0113] In some example embodiments, Fig. 14CAs shown in FIG. 1 , data blocks D01, D02, D03, and P0 may be received from the external host memory 220 and written into the data areas DA1 to DA4. In other words, Fig. 14C The operation can be similar to Figure 5C operation.
[0114] In other example embodiments, Fig.15 As shown in FIG. 1 , data blocks D01, D02, D03, and P0 may be provided internally in the storage device 300, rather than being provided from the external host memory 220, and written into the data areas DA1 to DA4. In other words, Fig.15 The operation can be similar to Figure 8 operation, and can be based on reference Fig. 9 and Fig.11 One of the described move commands and share commands is executed internally.
[0115] When the read metablock and the read data block are invalid, steps S520 and S530 may be repeated for the next or subsequent transaction (eg, transaction TRS1). In this way, all valid transactions in the log areas JA1-JA4 may be written into the data areas DA1-DA4.
[0116] Fig.16 is a diagram showing another example of a log area included in a storage device according to an example embodiment. Figure 3 Repeated description of .
[0117] Reference Fig.16 , the log areas JA1-JA4 may include super blocks SB1-SB4, meta blocks MB01-MB14, data blocks D01-D63, and commit blocks CB01, CB02, CB03, CB04, CB11, CB12, CB13, and CB14. Fig.16 In the example, data blocks D01, D02, D03 and P0 can form a stripe STR0, data blocks D11, D12, P1 and D13 can form a stripe STR1, data blocks D21, D22, D23 and P2 can form a stripe STR2, data blocks P3, D31, D32 and D33 can form a stripe STR3, data blocks D41, D42, D43 and P4 can form a stripe STR4, data blocks P5, D51, D52 and D53 can form a stripe STR5, and data blocks D61, D62, P6 and D63 can form a stripe STR6. In addition, stripes STR0, STR1, STR2 and STR3 can form a transaction TRS0', and stripes STR4, STR5 and STR6 can form a transaction TRS1'.
[0118] Apart from Fig.16 The example also includes submission blocks CB01 to CB14. Fig.16 The example can be compared with Figure 3 The examples are basically the same.
[0119] The commit blocks CB01-CB14 can ensure that the write operation of the current transaction has been successfully completed. In other words, the commit blocks can be used to ensure that all data blocks / parity blocks included in a transaction have been completely written into the log areas JA1-JA4.
[0120] Since the commit block is the last block in a transaction, the position of the commit block in a transaction can be determined using the metablock. For example, the metablock itself can know the number of data blocks / parity blocks, so the position of the commit block can be obtained based on the number of data blocks / parity blocks. Therefore, in the case of a system restart, the position of the commit block can be checked by reading only the metablock, and the validity check can be performed without reading the data blocks / parity blocks.
[0121] Fig.17 It shows execution Fig.12 A flowchart of another example of a replay write operation in a method. Fig.18A , Fig.18B and Fig. 18C Is used to describe Fig.17 The following diagram will be omitted for details about the replay write operation. Fig.13 , Fig.14A , Fig. 14B , Fig. 14C and Fig.15 Repeated description of .
[0122] Reference Fig.12 , Fig.16 , Fig.17 , Fig.18A , Fig.18B and 18C , when performing a replay write operation, Fig.17 Step S510 in Fig.13 The step S510 in is basically the same as that in Fig.18A The operation can be Fig.14A The operation is basically the same.
[0123] The validity may be checked by reading the metablock and the commit block associated with the starting point of the replay write operation from the log areas JA1 ˜ JA4 of the target disks DISK1 ˜ DISK4 (step S540 ).
[0124] For example, Fig.18B As shown in , when transaction TRS0 is selected as the starting point for replaying the write operation, metablocks MB01-MB04 for transaction TRS0 among metablocks MB and commit blocks CB01-CB04 for transaction TRS0 among commit blocks CB can be read out and sent to the external host memory 220.
[0125] When it is checked in step S540 that the read metablock and the read commit block are valid, data included in data blocks corresponding to the read metablock and the read commit block may be written to data areas DA1-DA4 of target disks DISK1-DISK4 (step S550).
[0126] For example, Fig.18C As shown in FIG. 1 , data blocks D01 , D02 , D03 , and P0 may be provided internally in the storage device 300 and written in the data areas DA1 ˜ DA4 . Fig. 18C The operation can be Fig.15 The operations are basically the same and can be performed internally based on one of the move command and the share command.
[0127] exist Fig.17 In the example of FIG. 1 , data blocks D01, D02, D03, and P0 are not sent to the external host memory 220, so data blocks D01, D02, D03, and P0 are not transmitted to the external host memory 220. Fig. 14C , and are not written to the data areas DA1-DA4. In addition, validity can be checked relatively simply by using commit blocks CB01-CB04 instead of comparing the checksum information of all data blocks in the transaction with the checksum information of the metablock. Therefore, the restart time can be reduced to have improved performance.
[0128] Fig.19 is a flowchart illustrating a method of operating a storage device according to an example embodiment. Figure 1 and Fig.12 Repeated description of .
[0129] Reference Fig.19 , in a method of operating a storage device according to example embodiments, Fig.19 Step S100 in Figure 1 The step S100 in is basically the same.
[0130] When a power failure occurs on the storage device and the storage device is restarted after a disk failure occurs on at least one target disk, a data recovery operation is performed on the failed disk (step S600).
[0131] After the data recovery operation is performed, a replay write operation is performed on the data areas of the plurality of target disks based on the log areas of the plurality of target disks (step S700). Fig.19 Step S700 in may be similar to Fig.12 Step S500 in .
[0132] Although not in Fig.19 However, Figure 1At least one of steps S200 and S300 in may be included in Fig.19 Between steps S100 and S600 in .
[0133] Fig. 20 It shows execution Fig.19 A flow chart of an example of a method for performing data recovery operations. Fig.21A , Fig. 21B and Fig. 21C Is used to describe Fig. 20 An illustration of a data recovery operation in .
[0134] Reference Figure 3 , Fig.19 , Fig. 20 , Fig.21A , Fig. 21B and Fig. 21C As shown, when a data recovery operation is performed, a spare disk may be used to replace a failed disk (step S610).
[0135] For example, Fig.21A As shown in FIG. 1 , a disk failure may occur on the second disk DISK2 among the target disks DISK1 to DISK4 (eg, Fig.21A In this example, Fig. 21B As shown in FIG. , the second disk DISK2 can be replaced by the spare disk DISKSP.
[0136] The spare disk DISKSP may be one of the plurality of disks 310-330 included in the storage device 300, which is not used during normal operation and can be used to replace a failed disk when a disk fails. Like the normal disks DISK1-DISK4, the spare disk DISKSP may also be divided into a log area JASP and a data area DASP.
[0137] When a disk failure occurs, all super blocks SB2, meta blocks MB and data blocks D / P in the log area JA2 of the second disk DISK2 and data blocks of the data area DA2 may be damaged. Data recovery operations can be performed using data in other undamaged disks DISK1, DISK3 and DISK4 in the same array.
[0138] For example, a first recovery operation may be performed to recover a log area JASP of a spare disk DISKSP corresponding to a log area JA2 of a failed disk DISK2 based on log areas JA1, JA3, and JA4 of disks DISK1, DISK3, and DISK4 except for the failed disk DISK2 among the plurality of target disks (step S620). In addition, a second recovery operation may be performed to recover a data area DASP of a spare disk DISKSP corresponding to a data area DA2 of a failed disk DISK2 based on data areas DA1, DA3, and DA4 of disks DISK1, DISK3, and DISK4 except for the failed disk DISK2 among the plurality of target disks (step S630).
[0139] exist Fig. 20 In the example, Fig. 21C As shown in , the first recovery operation and the second recovery operation may be performed substantially simultaneously or concurrently. Fig. 21C Arrow in and may correspond to a first recovery operation, Fig. 21C Arrow in and The first recovery operation and the second recovery operation may correspond to the second recovery operation. The first recovery operation and the second recovery operation may be performed based on at least one of a normal or general recovery algorithm. As a result of the first recovery operation and the second recovery operation, data substantially identical to the data stored in the disk DISK2 may be recovered.
[0140] After the data recovery operation is completed, you can refer to Figure 3 to Figure 1 8 to perform the replay write operation.
[0141] Fig. 22 It shows execution Fig.19 A flowchart of another example of a data recovery operation in a method. Fig.23A , Fig. 23B and Fig.23C Is used to describe Fig. 22 The following diagram shows the data recovery operation in the example. Fig. 20 , Fig.21A , Fig. 21B and Fig. 21C Repeated description of .
[0142] Reference Figure 3 , Fig.19 , Fig. 22 , Fig.23A , Fig. 23B and Fig.23C , when performing data recovery operations, Fig. 22 Step S610 in Fig. 20 The step S610 in is basically the same as that in FIG. Fig.21A and Fig. 21B As shown in FIG. , the failed disk DISK2 can be replaced by the spare disk DISKSP.
[0143] and Fig. 20 As in the example of , the first recovery operation and the second recovery operation can be performed to recover the data in the failed disk DISK2. Fig. 20 Unlike the example Fig. 22 In the example of , the first recovery operation and the second recovery operation may be sequentially performed. In addition, the storage device 300 may operate in a degraded mode after the first recovery operation is completed until the second recovery operation and the playback write operation are completed.
[0144] For example, Fig.23A As shown in . Only the first recovery operation may be performed first to recover the log area JASP of the spare disk DISKSP (step S620 ). Fig. 22 Step S620 in Fig. 20 The step S620 in is basically the same as that in Fig.23A Arrow in and Can be used with Fig. 21C Arrow in and Basically the same. To reduce data recovery time, the recovery operation can be performed by checking only the valid log area.
[0145] When the first restore operation is completed, Fig. 23B As shown in FIG. 6 , the valid blocks of the log areas JA1, JASP, JA3, and JA4 may be sent to the external host memory 220, and a data structure for searching the sent valid blocks may be formed (step S625). From the time when the data structure is formed, the storage device 300 may operate in the degraded mode (step S640).
[0146] like Fig.23C As shown in FIG. 6 , after the first restore operation is completed and after the data structure is formed, a second restore operation may be performed to restore the data area DASP of the spare disk DISKSP (step S650 ). Fig. 22 Step S650 in Fig. 20 The step S630 in is basically the same as that in Fig.23C Arrow in and Can be used with Fig. 21C Arrow in and Basically the same.
[0147] After the data recovery operation is completed, you can refer to Figure 13 to Figure 1 8 to perform the replay write operation.
[0148] Typically, a storage device can operate in a degraded mode capable of accessing data in a failed disk through a combination of multiple normal disks during a data recovery operation. However, since the valid latest data of the log area is not reflected in the data area, Fig. 20 In the example of FIG. 5 , the degraded mode will not be used, and therefore, the storage device will not be accessed until the data recovery operation and the replay write operation are completed.
[0149] exist Fig. 22 In the example of , the log area may be restored first, the restored data in the log area may be sent to the host memory 220 to form a data structure, and then the degraded mode may be used during the data recovery operation and the playback write operation. For example, when an access request is received from the host device 200 during operation in the degraded mode, the data structure of the log area formed in the host memory 220 may be searched to check whether the latest data exists in the log area and reflect the latest data. If the access request is not related to the data in the log area, the data in the data area may be reflected. When the recovery of the data area is completed, the valid data of the log area may be reflected in the data area, the degraded mode may be terminated, and the storage device 300 may begin to operate in the normal mode. Therefore, the performance of the storage device 300 may be improved or enhanced.
[0150] Fig.24 is a diagram illustrating another example of a log area included in a storage device according to example embodiments. Fig.25 It is shown that the Fig.24 The following diagram shows an example of a metablock in the log area of . Figure 3 Repeated description of .
[0151] Reference Fig.24 , the log areas JA1~JA4 may include super blocks SB1~SB4, meta blocks MB01~MB14 and data blocks D01, D02, D03, P0, D12, P1, D13, D21, P2, P3, D31, D32, D33, D42, P4, P5, D51, D52, D53, D61, D62, P6 and D63.
[0152] and Figure 3 In contrast, only modified data blocks in one stripe may be stored in Fig.24 In the log area JA1~JA4.
[0153] exist Figure 3In the example of , when existing data (or old data) is updated by new data, all data blocks included in one stripe are not always modified. For example, some data blocks may be modified and some other data blocks may be kept. However, the write operation should always be performed in units of stripes, so even if only a part of the data blocks is modified, both the modified data blocks and the unmodified data blocks should be written to the data area at once. For example, in Figure 3 In the process, all data blocks D01, D02, D03 and P0 in stripe STR0 can be written to log areas JA1~JA4 regardless of whether they are modified, and then data blocks D01, D02, D03 and P0 in log areas JA1~JA4 can be written to data areas DA1~DA4.
[0154] On the other hand, Fig.24 In the example, only modified data blocks can be written to log areas JA1~JA4. For example, in stripe STR0, all data blocks D01, D02 and D03 can be modified and written, so parity block P0 can be modified and written. In stripe STR1, only some data blocks D12 and D13 can be modified and written, data block D11 will not be modified and will not be written, so parity block P1 can be modified and written. If one or more data blocks in a stripe are modified, the parity block should always be modified. When stripe STR1 is to be written to data areas DA1~DA4, blocks D12, P1 and D13 in log areas JA2, JA3 and JA4 and existing data blocks (for example, D11) in data area DA1 can be used to write stripe STR1 to data areas DA1~DA4.
[0155] Similarly, in stripes STR2 and STR3, only some data blocks D21, D31, D32, and D33 can be modified and written, so parity blocks P2 and P3 can be modified and written. In stripes STR4, STR5, and STR6, only some data blocks D42, D51, D52, D53, D61, D62, and D63 can be modified and written, so parity blocks P4, P5, and P6 can be modified and written.
[0156] As described above, by storing only modified data blocks, the storage space of the log areas JA1-JA4 can be saved. Such a scheme may be referred to as a small write scheme or a small write optimization operation scheme.
[0157] Reference Fig.25 ,exist Fig.25 An example of metablocks MB01 to MB04 corresponding to transaction TRS0 is shown in FIG.
[0158] As reference Fig.24 As described above, when only modified data blocks are stored in the log areas JA1-JA4, it can be marked in the meta-block that the unmodified blocks have not been written into the log area.
[0159] For example, since data blocks D01, D21, and P3 of stripes STR0, STR2, and STR3 are written in the log area JA1 of disk DISK1, and block P3 stores parity data, "existence (EST)" may be marked in the attributes of stripes STR0, STR2, and STR3, and "non-existence (NEST)" may be marked in the attributes of stripe STR1. In addition, "parity (PRT)" may be marked in the attributes of stripe STR3. Similarly, the attributes of stripes STR0, STR1, STR2, and STR3 in disks DISK2, DISK3, ... may be marked.
[0160] Furthermore, since the block addresses of the disks included in the same stripe are arranged on the same row, "next non-address (NADDR)" may be marked in the attribute of the last stripe STR3 of the disk DISK1, and the final position block addresses of the disks DISK2, DISK3, ... may be omitted. In other words, when "non-address (NADDR)" is marked, the final position block addresses of the other disks DISK2, DISK3, ... may be substantially the same as the final position block address of the disk DISK1.
[0161] In addition, in the case of using the small write scheme, since the offsets of metablocks included in the same transaction are different from each other, the offset information of metablocks of all disks can be recorded in the super block. Metablocks MB01-MB04 can share the final location block address information and attribute information.
[0162] Fig.26 It shows execution Fig.19 A flowchart of another example of a data recovery operation in a method. Fig.27A , Fig.27B and Fig.27C Is used to describe Fig.26 The following diagram shows the data recovery operation in the example. Fig. 20 , Fig.21A , Fig. 21B , Fig. 21C , Fig. 22 , Fig.23A , Fig. 23B and Fig.23C Repeated description of .
[0163] Reference Fig.19 , Fig.24 , Fig.25 , Fig.26 , Fig.27A , Fig.27B and Fig.27C , when performing data recovery operations, Fig.26 Step S610 in Fig. 20 The step S610 in is basically the same as that in FIG. Fig.27A and Fig.27B As shown in FIG. , the failed disk DISK4 can be replaced by the spare disk DISKSP.
[0164] and Fig. 20 As in the example of , the first recovery operation and the second recovery operation can be performed to recover the data in the failed disk DISK4. Fig.26 In the example, because the data is based on the reference Fig.24 and Fig.25 The described small write scheme is stored so that the recovery operation of the log area can be changed.
[0165] For example, a first recovery operation may be performed to recover the log area JASP of the spare disk DISKSP corresponding to the log area JA4 of the failed disk DISK4 based on the log areas and data areas of the disks DISK1, DISK2, and DISK3 except the failed disk DISK4 among the plurality of target disks (step S660). Since the modified data block DX1N and the modified parity block PXN are stored in the log areas JA1 and JA4, respectively, and since the unmodified data blocks DX20 and DX30 are stored in the data areas DA2 and DA3, respectively, the log area JA4 may be recovered by using the log area JA1 and the data areas DA2 and DA3. Fig.27C Arrow in and May correspond to a first recovery operation.
[0166] A second recovery operation may be performed to recover the data area DASP of the spare disk DISKSP (step S670). Step S670 may be performed in conjunction with Fig. 20 The same as step S630, is performed simultaneously with the first recovery operation, or can be performed simultaneously with the first recovery operation. Fig. 22 As in step S650, it is performed after the first recovery operation is completed.
[0167] Fig.28 is a block diagram illustrating a storage device and a storage system including the storage device according to an example embodiment. Figure 2 Repeated description of .
[0168] Reference Fig.28 , the storage system 100a includes a host device 200 and a storage device 300a.
[0169] Apart from Fig.28 The storage device 300a in the embodiment further includes a storage controller 301. Fig.28The storage system 100a and the storage device 300a in the embodiment may be respectively Figure 2 The storage system 100 and the storage device 300 are basically the same.
[0170] The memory controller 301 may control the operation of the memory device 300 a . Fig.28 The storage system 100a may be a hardware RAID system, in which the RAID architecture has a RAID controller (eg, storage controller 301).
[0171] Although not in Fig.28 Although not shown in FIG. 3 , the storage device 300 a may further include an auxiliary power supply connected to the storage controller 301 .
[0172] Fig.29 is a block diagram illustrating an electronic system according to example embodiments.
[0173] Reference Fig.29 , the electronic system 4000 includes at least one processor 4100 , a communication module 4200 , a display / touch module 4300 , a storage device 4400 , and a buffer memory 4500 .
[0174] The processor 4100 controls the operation of the electronic system 4000. The processor 4100 may execute an operating system and at least one application to provide an Internet browser, a game, a video, etc. The communication module 4200 is implemented to perform wireless or wired communication with an external device. The display / touch module 4300 is implemented to display data processed by the processor 4100 and / or receive data through a touch pad. The storage device 4400 is implemented to store user data and is driven based on a method of operating a storage device according to an example embodiment. The buffer memory 4500 temporarily stores data for processing the operation of the electronic system 4000.
[0175] The present disclosure may be applied to various electronic devices and electronic systems including storage devices and storage systems. For example, the present disclosure may be applied to systems such as mobile phones, smart phones, tablet computers, laptop computers, personal digital assistants (PDAs), portable multimedia players (PMPs), digital cameras, portable game consoles, music players, video cameras, video players, navigation devices, wearable devices, Internet of Things (IoT) devices, Internet of Everything (IoE) devices, e-book readers, virtual reality (VR) devices, augmented reality (AR) devices, robotic devices, etc.
[0176] As is conventional in the art, embodiments may be described and illustrated in accordance with the blocks that perform the functions described. These blocks, which may be referred to herein as units or modules, are physically implemented by analog and / or digital circuits such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, hard-wired circuits, etc., and may be selectively driven by firmware and / or software. The circuit may, for example, be implemented in one or more semiconductor chips, or may be implemented on substrate supports such as printed circuit boards, etc. The circuits constituting the blocks may be implemented by dedicated hardware, or by a processor (e.g., one or more programmed microprocessors and associated circuits) or by a combination of dedicated hardware that performs some functions of the blocks and processors that perform other functions of the blocks. Without departing from the scope of the present disclosure, each block of the embodiment may be physically divided into two or more interacting and discrete blocks. Similarly, without departing from the scope of the present disclosure, the blocks of the embodiments may be physically combined into more complex blocks.
[0177] The foregoing is an illustration of example embodiments and is not to be construed as limiting the example embodiments. Although some example embodiments have been described, those skilled in the art will readily appreciate that many modifications are possible in the example embodiments without materially departing from the novel teachings and advantages of the example embodiments. Therefore, all such modifications are intended to be included within the scope of the example embodiments defined in the claims. Therefore, it will be understood that the foregoing is an illustration of various example embodiments and is not to be construed as being limited to the specific example embodiments disclosed, and that modifications to the disclosed example embodiments and other example embodiments are intended to be included within the scope of the appended claims.
Claims
1. A method for operating a storage device comprising a plurality of disks, the method include: Dividing the plurality of disks into a plurality of log areas and a plurality of data areas respectively; When receiving a write command to a plurality of target disks among the plurality of disks, performing a first write operation to write the target data to be written from the external host memory to the log areas of the plurality of target disks, the plurality of target disks being included in the same array; as well as After the first write operation is completed, a second write operation is performed to write the target data from the external host memory into the data areas of the plurality of target disks.
2. The method according to claim 1, in, The steps of performing a first write operation include: storing first data included in the target data in a first data block included in a first disk among the plurality of target disks, the first data block having a first physical block address; and Mapping a first logical block address indicating a log area of a first disk to a first physical block address, The steps of performing the second write operation include: storing the first data in a second data block included in the first disk, the second data block having a second physical block address; and A second logical block address indicating the data area of the first disk is mapped with the second physical block address.
3. The method according to claim 1, further comprising: include: After the second write operation is completed, the target data stored in the log areas of the plurality of target disks are released.
4. The method according to claim 1, in, performing each of the first write operation and the second write operation on the plurality of target disks at a time in units of stripes and in units of transactions including two or more stripes, Each of the plurality of log areas comprises: A super block configured to: store initial transaction information associated with an initial transaction indicating a starting point of a replay write operation and size information of each of the plurality of log areas; A meta-block configured to: store identification information of a current transaction, final location block address information of the current transaction, attribute information of the current transaction, and checksum information for checking validity of the current transaction; and Data blocks are configured to store data for the current transaction.
5. The method according to claim 4, in, At least a portion of the information stored in the superblock and the metablock is shared by the plurality of target disks included in the same array.
6. The method according to claim 4, in, Each of the plurality of log areas further includes a commit block configured to ensure that a write operation of a current transaction is successfully completed.
7. The method according to claim 4, in, Only modified data blocks among the data blocks in one stripe are stored in the plurality of log areas.
8. The method according to claim 4, further comprising: include: When the storage device is restarted after a power failure occurs on the storage device, a replay write operation is performed on the data areas of the plurality of target disks based on the log areas of the plurality of target disks.
9. The method according to claim 8, in, The steps to perform a replay write operation include: Determining a starting point for a replay write operation by reading super blocks from log areas of the plurality of target disks; checking validity by reading metablocks and data blocks associated with a starting point of a replay write operation from log areas of the plurality of target disks; and When the read metablock and the read data block are valid, data included in the read data block is written into data areas of the plurality of target disks.
10. The method according to claim 9, in, An operation of writing the data included in the data blocks into the data areas of the plurality of target disks is internally performed by the storage device based on a move command or a share command.
11. The method according to claim 8, in, The steps to perform a replay write operation include: Determining a starting point for a replay write operation by reading super blocks from log areas of the plurality of target disks; checking validity by reading metablocks and commit blocks associated with starting points of replaying write operations from log areas of the plurality of target disks; and When the read metablock and the read commit block are valid, writing data included in the read data blocks into data areas of the plurality of target disks, the data blocks being included in log areas of the plurality of target disks and corresponding to the metablock and the commit block, The commit block is included in the log area and is configured to ensure that the write operation of the current transaction is successfully completed.
12. The method according to claim 1, further comprising: include: When a power failure occurs on the storage device and the storage device is restarted after a disk failure occurs on a first disk among the plurality of target disks, a data recovery operation is performed on the first disk.
13. The method according to claim 12, in, The steps to perform a data recovery operation include: Replace the first plate with the spare plate; performing a first recovery operation to recover a log area of a spare disk corresponding to the log area of the first disk based on the log areas of disks other than the first disk among the plurality of target disks; and Based on the data areas of disks other than the first disk among the plurality of target disks, a second recovery operation is performed to recover the data area of the spare disk corresponding to the data area of the first disk.
14. The method according to claim 13, in, The first recovery operation and the second recovery operation are performed simultaneously.
15. The method according to claim 13, in, The second restore operation is performed after the first restore operation is completed.
16. The method according to claim 12, in, The steps to perform a data recovery operation include: Replace the first plate with the spare plate; performing a first recovery operation to recover a log area of a spare disk corresponding to the log area of the first disk based on the log areas and data areas of disks other than the first disk among the plurality of target disks; and Based on the data areas of disks other than the first disk among the plurality of target disks, a second recovery operation is performed to recover the data area of the spare disk corresponding to the data area of the first disk.
17. A storage device, include: The plurality of disks are configured to be divided into a plurality of log areas and a plurality of data areas respectively, wherein: When a write command to a plurality of target disks among the plurality of disks is received, a first write operation is performed to write the target data to be written from the external host memory to the log areas of the plurality of target disks, the plurality of target disks being included in the same array, After the first write operation is completed, a second write operation is performed to write the target data from the external host memory into the data areas of the plurality of target disks.
18. A storage system, include: Host device; as well as A storage device is controlled by a host device and includes a plurality of disks, wherein the plurality of disks are configured to be respectively divided into a plurality of log areas and a plurality of data areas, wherein: When a write command and target data to be written are provided from the host device, the storage device is configured to: perform a first write operation to write the target data from the external host memory to the log areas of the plurality of target disks among the plurality of disks, and perform a second write operation to write the target data from the external host memory to the data areas of the plurality of target disks after the first write operation is completed, The plurality of target disks are included in the same array.
