Storage system and method for controlling the storage system

The storage system optimizes data handling by using cache and write log areas to reduce unnecessary writes, enhancing I/O performance and maintaining data reliability by minimizing errors during power loss.

JP7832251B2Active Publication Date: 2026-03-17HITACHI VANTARA LTD
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing storage systems face issues with increased computational load and reduced I/O performance due to multiple writes to storage devices for data updates, which can lead to data errors during power loss, compromising data reliability.

Method used

A storage system with a cache area for temporary data storage, a cache log storage area for update contents, and a write log storage area, allowing for write-back and write-through operations to optimize data handling, reducing unnecessary writes and enhancing reliability.

Benefits of technology

Improves I/O performance by minimizing drive writes while maintaining data reliability through optimized write operations and error recovery mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007832251000001
    Figure 0007832251000001
  • Figure 0007832251000002
    Figure 0007832251000002
  • Figure 0007832251000003
    Figure 0007832251000003
Patent Text Reader

Abstract

To provide a storage system capable of improving I / O performance for a host unit by reducing the number of times writing is performed on a drive to a write request while suppressing the deterioration of data reliability due to errors.SOLUTION: A storage system is configured to, when selected to perform a write-back operation, store the data requested to be written from a host device in the cache area, and after storing the updated contents of the cache area in a cache log storage area, write the data to the data storage area. On the other hand, when the storage system selects to perform a write-through operation, the storage system does not store data in the cache area and cache log storage area, but stores the updated contents of the data storage area in the write log storage area, and then writes the data to the data storage area, and after storing the updated contents of the data storage area in a Write log storage area, write the data to the data storage area.SELECTED DRAWING: Figure 16
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a storage system and a control method for a storage system.

Background Art

[0002] Conventionally, in a storage system, a redundant configuration has been adopted to improve availability and reliability.

[0003] For example, Patent Document 1 discloses the following storage system. That is, the storage system is composed of a plurality of storage nodes having one or more storage devices that provide a storage area, and one or more storage controllers that read and write data to the storage devices corresponding to requests from a host device. This storage system combines the storage controllers on a plurality of storage nodes and manages them as a redundant group. When this storage controller receives a request from a host device, it transfers the data to a plurality of storage controllers that form the same redundant group, and each storage controller stores the data in the storage device of its own storage node.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] In a storage system that associates virtual volumes, which are virtual memory areas, with physical areas on a storage device, and rewrites data in the corresponding area on the storage device in response to write requests to the virtual volumes from the host device, if power is lost while data on the storage device is being rewritten, errors may occur in the data of the area being rewritten (the data becomes corrupted and does not match either the data before or after the rewrite).

[0006] According to the aforementioned Patent Document 1, the storage system, when rewriting data on the storage device, writes the update content to the storage device in advance before performing the update. This allows the system to resolve errors even if an error occurs in the data in the area to be rewritten by applying the previously written update content.

[0007] On the other hand, in this storage system, a single write request received from the host results in two accesses to the storage device (writing the update content and writing the data) for data updates on the storage device. This increases the time or computational load required to process the I / O request, impacting the I / O performance of the host device.

[0008] This invention has been made in view of the above problems, and aims to improve I / O performance for a host device by reducing the number of drive writes in response to write requests while suppressing a decrease in data reliability against errors. [Means for solving the problem]

[0009] To achieve the above objective, the present invention provides a storage system comprising one or more storage nodes, each having a non-volatile storage device, a storage controller for processing the reading and writing of data to and from the storage device, and a volatile memory, wherein the memory has a cache area for temporarily storing data related to write requests from a higher-level device, the storage device has a cache log storage area for storing the updated contents of the cache area, a data storage area for permanently storing data related to the write request, and a write log storage area for storing the updated contents of the data storage area, and the storage controller switches between a write-back operation, in which it stores the data related to the write request in the cache area and the cache log storage area before responding to the higher-level device and then writing to the data storage area after the response, and a write-through operation, in which it writes to the data storage area and then responds to the higher-level device, the write-back operation writes data to the data storage area without writing the updated contents of the data storage area to the write log storage area, and the write-through operation writes the updated contents of the data storage area to the write log storage area before writing data to the data storage area. [Effects of the Invention]

[0010] According to the present invention, it is possible to improve I / O performance for the host device by reducing the number of drive writes in response to write requests while suppressing a decrease in data reliability due to errors. [Brief explanation of the drawing]

[0011] [Figure 1] An explanatory diagram of the light processing (lightback) according to Embodiment 1. [Figure 2] An explanatory diagram of the light processing (light-through) according to Embodiment 1. [Figure 3] An explanatory diagram of the power outage recovery process in the event of power loss according to Embodiment 1. [Figure 4] Configuration diagram of the storage system according to Embodiment 1. [Figure 5] FIG. showing an example of the hardware configuration of the storage system according to Embodiment 1. [Figure 6] FIG. showing an example of the software configuration of the storage system according to Embodiment 1. [Figure 7] FIG. showing an example of the logical configuration of the storage system according to Embodiment 1. [Figure 8] FIG. showing an example of the software module structure of the storage node according to Embodiment 1. [Figure 9] FIG. showing a specific example of the data stored in the memory according to Embodiment 1. [Figure 10] FIG. showing an example of the cache log storage area management table according to Embodiment 1. [Figure 11] FIG. showing an example of the Write log storage area management table according to Embodiment 1. [Figure 12] FIG. showing a specific example of the data stored in the storage device according to Embodiment 1. [Figure 13] FIG. showing a configuration example of the data storage area according to Embodiment 1. [Figure 14] FIG. showing an example of the structure of the Write log header according to Embodiment 1. [Figure 15] FIG. showing an example of the structure of the cache log header according to Embodiment 1. [Figure 16] Flowchart showing the processing procedure of the write process according to Embodiment 1. [Figure 17] Flowchart showing the processing procedure of the cache log creation and evacuation process according to Embodiment 1. [Figure 18] Flowchart showing the processing procedure of the cache log evacuation process according to Embodiment 1. [Figure 19] Flowchart showing the processing procedure of the data writing process according to Embodiment 1. [Figure 20] Flowchart showing the processing procedure of the Write log creation and evacuation process according to Embodiment 1. [Figure 21] Flowchart showing the processing procedure of the power-off recovery process during power loss according to Embodiment 1. [Figure 22] Flowchart showing the processing procedure of Write log creation and evacuation processing according to Embodiment 2. [Figure 23] Flowchart showing the processing procedure of Write log creation and evacuation processing according to Embodiment 3. [Figure 24] Diagram showing a configuration example of a data storage area according to Embodiment 4. [Figure 25] Flowchart showing the processing procedure of write processing according to Embodiment 4. [Figure 26] Flowchart showing the processing procedure of data redundancy processing according to Embodiment 4. [Figure 27] Flowchart showing the processing procedure of data and protection code writing processing according to Embodiment 4. [Figure 28] Flowchart showing the processing procedure of EC parity writing processing according to Embodiment 4. [Embodiment for Implementing the Invention]

[0012] Hereinafter, embodiments of the present invention will be described based on the drawings. The embodiments relate to, for example, a storage system having a plurality of storage nodes in which one or more SDS (Software Defined Storage) are implemented.

[0013] In the following description, for the sake of clarity, the description content and the drawings are appropriately simplified and omitted. Also, not all combinations of features described in the embodiments are necessary for the solution means of the invention.

[0014] In the following description, "tables" may be used to explain information, but the information may be represented by other data structures. In order to indicate independence from the data structure, "XX tables", "XX lists", etc. may be referred to as "XX information". When explaining the content of each information, expressions such as "identification information", "identifier", "name", "ID", "number", etc. are used, but these are mutually replaceable.

[0015] [Embodiment 1] First, we will describe the outline of Embodiment 1 with reference to Figures 1 to 3.

[0016] (Summary of the light processing according to Embodiment 1) The lighting process according to Embodiment 1 will be explained with reference to Figure 1. Figure 1 is an explanatory diagram of the lighting process (light back) according to Embodiment 1. Figure 2 is an explanatory diagram of the lighting process (light through) according to Embodiment 1.

[0017] The storage system 100 consists of a host device 101 and a storage node 103. The storage node 103 is a computer device that provides storage space to the host device 101 for reading and writing data. The host device 101 is an example of a higher-level device and is a computer device that sends read requests or write requests (write requests) to the storage node 103.

[0018] The storage node 103 includes a storage controller 1083, a volatile memory 1032, and a non-volatile storage device 1033. The memory 1032 has a cache area for temporarily storing data received from the host device. The storage device 1033 includes a cache log storage area 1201, a write log storage area 1202, and a data storage area 1203.

[0019] The storage controller 1083 uses the data storage area 1203 to store data requested to be written from the host device 101. The storage controller 1083 uses the write log storage area 1202 to store the update details (write log) before writing the data to the data storage area.

[0020] In this way, the update content is written in advance to the storage device 1033 as a write log. This allows the system to read the update content from the write log storage area 1202 and apply it back to the data storage area to resolve the data error, even if a data error occurs due to power loss or other reasons while writing data to the data storage area 1203.

[0021] Furthermore, the storage controller 1083 uses the cache log storage area 1201 to store the update details (cache log) when data is written to the cache area in memory. In this way, the update details are written to the cache log storage area 1201. This allows the data in the cache area 1102 to be recovered even if data is lost due to power loss or the like, by reading the update details from the cache log storage area 1201 and applying them to the cache area 1102.

[0022] When the host device 101 issues a write request to the storage node 103, the storage controller 1083 selects whether to perform a write-through operation or a write-back operation for that data. As an example of the selection method, for a write request to an area that is not contiguous with the area where the previous write request occurred (Random Write), the write-back operation is selected, and for a write request to an area where the data size is greater than or equal to a predetermined size, or for a write request to an area contiguous with the area where the previous write request occurred (Sequential Write), the write-through operation is selected.

[0023] If write-back operation is selected, as shown in Figure 1(a), data is written to the cache area 1102, and the updated data is written to the cache log storage area 1201.

[0024] Then, when writing data to the data storage area 1203 on the storage device 1033, it is determined whether or not to write the data to the Write log storage area 1202. If write-back operation is selected, as shown in Figure 1(b), the cache update contents are written to the cache log storage area 1201, so it is determined that the Write log should not be written, and the data is written only to the data storage area 1203.

[0025] On the other hand, if write-through operation is selected, as shown in Figure 2, data is written to the cache area 1102 as temporary storage (not shown), but no data is written to the cache log storage area 1201. Then (1) because write-through operation is selected, it is determined to write a write log, a write log is created and written to the write log storage area 1202, and then (2) the data stored in the cache area 1102 is written to the data storage area 1203.

[0026] With this method, data written to the data storage area 1203 is also written to either the cache log storage area 1201 or the write log storage area 1022 as information about the update. Therefore, even if an error occurs in the data storage area 1203 due to power loss or the like during writing to the data storage area 1203, the error can be resolved by writing data from the cache log storage area 1201 or the write log storage area 1022 to the data storage area 1203.

[0027] (Outline of the power outage recovery process in the event of power loss according to Embodiment 1) Figure 3 is an explanatory diagram of the power outage recovery process in the event of power loss according to Embodiment 1. In the event of power loss, the power outage recovery process first (1-1) reads the updated cache contents stored in the cache log storage area 1201 and applies them to the cache area 1102. Then (1-2) writes the recovered data from the cache area 1102 to the data storage area 1203. The updated cache contents stored in the cache log storage area 1201 are data related to the write process of the write-back operation.

[0028] Next, (2-1) the update contents of the data storage area 1203 are read from the Write log storage area 1202, and (2-2) the read update contents are applied to the data storage area 1203. The Write log stored in the Write log storage area 1202 is data related to the write operation of write-through.

[0029] (Configuration of the storage system 100 according to Embodiment 1) Figure 4 is a diagram showing the configuration of the storage system 100 according to Embodiment 1.

[0030] The storage system 100 includes, for example, multiple host devices 101 (Host), multiple storage nodes 103 (Storage Node), and a management node 104 (Management Node). The host devices 101 and storage nodes 103 are interconnected via a network 102 consisting of Ethernet, LAN (Local Area Network), Fibre Channel, etc.

[0031] The host device 101 is a general-purpose computer device that sends read requests or write requests to the storage node 103 in response to user operations or requests from application programs running on the host device 101. Hereinafter, read requests and write requests will be collectively referred to as I / O (Input / Output) requests. Note that the host device 101 may be a virtual computer device such as a virtual machine.

[0032] The storage node 103 is a computer device that provides storage space to the host device 101 for reading and writing data. The storage node 103 is, for example, a general-purpose computer device.

[0033] The management node 104 is a computer device used by the system administrator to manage the entire storage system 100. The management node 104 manages multiple storage nodes 103 as a group called a cluster. Although Figure 1 shows an example with only one cluster, multiple clusters may be provided within the storage system 100.

[0034] Thus, the storage system 100 consists of one or more storage nodes 103, one or more host devices 101, and one management node 104. The configuration shown in the diagram is an example, and the host device 101, storage node 103, and management node 104 may be the same node. Alternatively, they may be implemented using virtual machines or containers, or they may coexist as processes on a single computer device. Furthermore, the network may be redundant, or the management network and storage network may be separated.

[0035] (Hardware configuration of the storage system 100 according to Embodiment 1) Figure 5 shows an example of the hardware configuration of the storage system 100 according to Embodiment 1.

[0036] The storage node 103 includes a CPU (Central Processing Unit) 1031, memory 1032, multiple storage devices 1033 (Drive), and a communication device 1034.

[0037] The CPU 1031 controls the processing of the entire storage node. Memory 1032 consists of semiconductor memory such as SRAM (Static RAM (Random Access Memory)) and DRAM (Dynamic RAM). Memory 1032 is used to temporarily hold various programs and necessary data. The CPU 1031 executes the programs stored in the volatile memory 1032, thereby executing various processes for the entire storage node 103, as described later.

[0038] The storage device 1033 consists of one or more types of high-capacity non-volatile storage devices, such as an SSD (Solid State Drive) or a hard disk drive. The storage device 1033 provides a physical storage area for reading or writing data in response to I / O requests from the host device 101.

[0039] The communication device 1034 is an interface for the storage node 103 to communicate with the host device 101, other storage nodes 103, or management node 104 via the network 102. The communication device 1034 is composed of, for example, a NIC (Network Interface Card), an FC card, etc. The communication device 1034 performs protocol control during communication with the host device 101, other storage nodes 103, or management node 104.

[0040] (Software configuration of the storage system 100 according to Embodiment 1) Figure 6 shows an example of the software configuration of the storage system 100 according to Embodiment 1.

[0041] Storage node 103 is front-end driver 1081 (Front-end It includes a driver, a back-end driver 1087, one or more storage controllers 1083, and a data protection control unit 1086.

[0042] The front-end driver 1081 is software that controls the communication device 1034 and provides the CPU 1031 with an interface for communication between the storage controller 1083, the host device 101, other storage nodes 103, and the management node 104.

[0043] The backend driver 1087 is software that controls each storage device 1033 within its own storage node 103 and provides an abstracted interface to the CPU 1031 for communication with each storage device 1033.

[0044] The storage controller 1083 is software that functions as the controller for the SDS. The storage controller 1083 receives I / O requests from the host device 101 and issues I / O commands corresponding to those I / O requests to the data protection control unit 1086. The storage controller 1083 also has a logical volume configuration function. The logical volume configuration function associates logical chunks configured by the data protection control unit 1086 with logical volumes to be provided to the host. For example, a straight mapping method (where logical chunks and logical volumes are associated one-to-one, and the addresses of the logical chunks and logical volumes are the same) may be used. Alternatively, a virtual volume function (Thin Provisioning) method (where logical volumes and logical chunks are divided into small-sized areas (pages), and the addresses of logical volumes and logical chunks are associated on a page-by-page basis) may be used.

[0045] In this embodiment, each storage controller 1083 implemented on a storage node 103 is managed as a storage controller group 1085 that forms a redundant configuration together with other storage controllers 1083 located on other storage nodes 103. When there are two storage nodes 103 belonging to a storage controller group 1085, they can also be called a storage controller pair.

[0046] In the storage controller group 1085, one storage controller 1083 is configured to accept I / O requests from the host device 101 (this is the active system state, hereinafter referred to as active mode). In the same storage controller group 1085, the other storage controller 1083 is configured to not accept I / O requests from the host device 101 (this is the standby system state, hereinafter referred to as standby mode). The node on which the storage controller 1083 in active mode operates is called the active node, and the node on which the storage controller 1083 in standby mode operates is called the standby node.

[0047] In the storage controller group 1085, if a power loss occurs in the active storage controller or the storage node 103 on which this controller is located, the state of the standby storage controller is switched to active mode. The storage controller 1083 set to active mode is called the active storage controller. The storage controller 1083 set to standby mode is called the standby storage controller. This allows the standby storage controller to take over the I / O processing that the active storage controller was performing if the active storage controller becomes inoperable.

[0048] The data protection control unit 1086 is software that has the function of allocating physical storage space provided by a storage device 1033 in its own storage node 103 or another storage node 103 as a logical chunk to each storage controller group 1085. Furthermore, the data protection control unit 1086 is software that has the function of reading or writing specified data to the corresponding storage device 1033 in accordance with the I / O commands provided by the storage controller 1083.

[0049] There are two methods for allocating the physical storage area of ​​the data protection control unit 1086, and both are applicable to the storage system 100. The first method allocates the physical area of ​​one storage device to one logical chunk. That is, each storage controller group 1085 is allocated the physical area of ​​one storage device 1033 within its own storage node 103 or another storage node 103. The second method allocates the physical area of ​​two or more storage devices 1033 within storage nodes 103 to one logical chunk in order to provide data redundancy among multiple storage nodes 103.

[0050] When the data protection control unit 1086 is allocated physical storage space provided by a storage device 1033 in another storage node 103 to the storage controller group 1085, it performs the following process: The data protection control unit 1086 cooperates with other data protection control units 1086 implemented in the other storage node 103 to exchange data with the other data protection control units 1086 via the network 102. As a result, the data protection control unit 1086 reads or writes data related to I / O commands to the storage space in the other storage node 103 in accordance with I / O commands from the active storage controller of the storage controller group 1085.

[0051] When the data protection control unit 1086 adopts a redundant configuration for allocating physical storage space, there are two methods for storing data in the two or more corresponding storage devices 1033: the mirroring method and the EC (Erasure Coding) method. Either method can be applied to the storage system 100.

[0052] In the mirroring method, the data protection control unit 1086 writes the data provided by the active storage controller of the storage controller group 1085 to the storage devices 1033 on two or more corresponding storage nodes 103 to make it redundant.

[0053] In the EC method, the data protection control unit 1086 divides the data provided by the active storage controller of the storage controller group 1085 into first data and second data. The first data is then stored in the first storage node 103, the second data in the second storage node 103, and the parity calculated from the first and second data is stored in the storage device 1033 of the third storage node 103.

[0054] (Logical configuration of the storage system 100 according to Embodiment 1) Figure 7 shows an example of the logical configuration of the storage system 100 according to Embodiment 1.

[0055] The storage controller 1083 uses the storage area (pool volume) provided by the data protection control unit 1086 to provide a virtual storage area (virtual volume) to the host (thin provisioning method). In addition, the storage controller 1083 reserves a cache area in memory and uses the storage area provided by the backend driver as the cache log storage area 1201.

[0056] The data protection control unit 1086 uses the storage area provided by the backend driver as the data storage area 1203 and the write log storage area 1202. The data protection control unit 1086 creates a storage area (pool volume) associated with the data storage area 1203 in two or more storage nodes 103 using a so-called mirroring method, and provides this to the storage controller 1083.

[0057] When the storage controller 1083 receives a write request to the virtual storage area from the host device 101, it selects whether to perform a write-through operation or a write-back operation for the data related to the write request. If the storage controller 1083 selects a write-back operation, it writes the data to the cache area, logs the update content (cache log), and writes it to the cache log storage area 1201 to make it non-volatile. After writing the cache log, or if the write-through operation is selected, the storage controller 1083 passes the I / O request to the data protection control unit 1086.

[0058] When the data protection control unit 1086 receives an I / O request from the active storage controller, it sends the I / O request to the data protection control unit 1086 of another storage node 103 that has a redundant data write destination storage device 1033. In this case, the data protection control unit 1086 that sends the I / O request is sometimes called the "local data protection control unit," and the data protection control unit 1086 that receives the request is sometimes called the "other system data protection control unit."

[0059] Next, the local data protection control unit and the other system data protection control unit determine whether or not to write the write log to the storage device 1033. The local data protection control unit and the other system data protection control unit determine whether to write the write log if write-through operation is selected in the storage controller 1083. Then, the local data protection control unit and the other system data protection control unit log the data (write log) and write it to the write log storage area 1202 on the storage device on the storage node 103 where they are implemented. After writing the write log, the local data protection control unit and the other system data protection control unit write the data to the data storage area 1203.

[0060] On the other hand, if the local data protection control unit and the other system data protection control unit select write-back operation in the storage controller 1083, they determine not to write a write log and write the data to the data storage area 1203 as is.

[0061] (Software module structure of storage node 103 according to Embodiment 1) Figure 8 shows an example of the software module structure of a storage node 103 according to Embodiment 1. The storage controller 1083 performs write processing 1091, cache log creation and backup processing 1092, and power outage recovery processing 1093. The data protection control unit 1086 performs data redundancy processing 1096, data writing processing 1097, EC parity writing processing 1098, and write log creation and backup processing 1099. Details of each process will be described later. Data redundancy processing 1096 and EC parity writing processing 1098 are processes according to Embodiment 4 described later, and can be omitted in embodiments other than Embodiment 4.

[0062] (Data to be stored in memory 1032 according to Embodiment 1) Figure 9 shows a specific example of data stored in memory 1032 according to Embodiment 1. Within the memory 1032 area managed by the storage controller 1083 of the CPU 1031 of the storage node 103, a cache log storage area management table 1101, a cache area 1102, and a cache log buffer 1103 are arranged. Within the memory 1032 area managed by the data protection control unit 1086, a write log storage area management table 1105 and a write log buffer 1106 are arranged.

[0063] (Cache log storage area management table 1101 according to Embodiment 1) Figure 10 shows an example of a cache log storage area management table 1101 according to Embodiment 1. As an example, we will explain a case in which one or more cache logs are written together to the cache log storage area on the storage device 1033 by appending, as the method for storing the cache logs.

[0064] When this method is adopted, the cache log storage area management table 1101 has the following items: cache log storage area ID, storage device 1033 ID, starting address of the stored log (storage location of the first log), and ending address (end of the last log). The "cache log storage area ID" uniquely identifies the cache log storage area. The "storage device 1033 ID" uniquely identifies the storage device 1033 in which the cache log storage area specified by the cache log storage area ID resides. The "starting address" is the starting address of the log stored in the cache log storage area specified by the cache log storage area ID. The "ending address" is the ending address of the log stored in the cache log storage area specified by the cache log storage area ID.

[0065] (Write log storage area management table 1105 according to Embodiment 1) Figure 11 shows an example of a Write log storage area management table 1105 according to Embodiment 1. Write logs can be stored in a manner in which the Write log storage area on the storage device 1033 is divided into multiple areas, and one Write log is stored in each of these divided areas (see Figure 11(a)). When this method is adopted, the Write log storage area management table has, for each divided area, an entry for the Write log storage area ID that uniquely identifies the area, the ID of the storage device 1033 in which the Write log storage area exists, and the starting address of the area.

[0066] Another log writing method is to append one or more write logs to the write log storage area on the storage device 1033 (see Figure 11(b)). When this method is adopted, the write log storage area management table has the following items: Write log storage area ID, storage device 1033 ID, starting address (storage location of the first log), and ending address (end of the last log). The "Write log storage area ID" uniquely identifies the write log storage area. The "storage device 1033 ID" uniquely identifies the storage device 1033 where the write log storage area identified by the Write log storage area ID resides. The "starting address" is the starting address of the write log stored in the write log storage area identified by the Write log storage area ID. The "ending address" is the ending address of the write log stored in the write log storage area identified by the Write log storage area ID.

[0067] (Data to be stored in the storage device 1033 according to Embodiment 1) Figure 12 shows a specific example of data stored in the storage device 1033 according to Embodiment 1. A cache log storage area 1201, a write log storage area 1202, and a data storage area 1203 are arranged on each storage device 1033. The cache log storage area 1201 is an area for storing cache logs, and the log writing destination address is managed by the cache log storage area management table 1101. The write log storage area 1202 is an area for storing write logs, and the log writing destination address is managed by the write log storage area management table 1105. Details of the data storage area 1203 will be described later with reference to Figure 13.

[0068] (Configuration of data storage area 1203 according to Embodiment 1) Figure 13 shows an example configuration of the data storage area 1203 according to Embodiment 1.

[0069] The data storage area 1203 is used as a physical storage area for storing data received from the host device 101. The data storage area 1203 can be divided into multiple areas, and these divided areas can be assigned to logical chunks. The protection code is a parity code, checksum, cyclic redundancy code, etc., calculated from the data.

[0070] As shown in Figure 13, "(A) Method of storing only data in the data storage area," the inside of the data storage area 1203 is divided into sector units, which are the management units of the storage area. A sector is an example of the smallest unit of data that can be written. The divided areas are provided to the data protection control unit 1086 as physical storage areas. The data protection control unit 1086 allocates the provided physical storage areas into logical chunks, and when it receives an I / O request from the storage controller 1083, it writes the data to the corresponding area on the storage device 1033.

[0071] (Write log header 1301 according to Embodiment 1) Figure 14 shows an example of the structure of the Write log header 1301 according to Embodiment 1.

[0072] The Write log header 1301 is a table included in the Write log that the data protection control unit 1086 writes to the storage device 1033. The Write log header 1301 is added to the beginning of the log when the data protection control unit 1086 creates the Write log.

[0073] The Write log header 1301 contains fields such as the Write log sequence number, destination address, and size. The Write log sequence number field stores the unique Write log sequence number assigned to each Write log. The destination address field stores the address of the data storage area to be updated for each log. The update size field stores the size to be updated.

[0074] (Cache log header 1401 according to Embodiment 1) Figure 15 shows an example of the structure of the cache log header 1401 according to Embodiment 1.

[0075] The cache log header 1401 is a table included in each cache log stored in the cache log storage area on the storage device 1033. The cache log header 1401 is added to the beginning of the cache log when the data protection control unit 1086 creates a cache log from the update contents during a cache update.

[0076] The cache log header 1401 contains fields such as log sequence number, update address, and update size. The log sequence number field stores the log sequence number uniquely assigned to each cache log. The update address field stores the address of the cache data to be updated for each log. The update size field stores the size of the update.

[0077] (Light processing 1091 according to Embodiment 1) Figure 16 is a flowchart showing the processing procedure of the write process 1091 according to Embodiment 1. Figure 16 shows an example of the processing when a write request is received from the host device 101 to the virtual volume provided by the storage controller 1083. The write process 1091 is performed on the active controller side of the pair of storage controllers 1083.

[0078] First, the storage controller 1083 analyzes the command (step S11) and determines whether or not a page has already been allocated to the access destination (step S12). If the page has not been allocated (step S12; No), the storage controller 1083 allocates a physical page on the storage device 1033 to the logical area (thread S13).

[0079] After physical page allocation or if pages have already been allocated to the access destination (Step 12; Yes), the storage controller 1083 selects whether to perform a write-back operation or a write-through operation on the data (Step S14). For example, in this selection, if the area on the virtual volume to which the write request is directed is not contiguous with the data of the previous write request (Random Write), the write-back operation is selected. On the other hand, if the data size of the write request is greater than or equal to a predetermined size, or if the area on the virtual volume for the data of the current write request is contiguous with the data of the previous write request (Sequential Write), the write-through operation is selected.

[0080] If the storage controller 1083 selects write-back operation (step S14; write-back operation), it writes the data to be written to the cache area 1102 on memory 1032 (step S15). Subsequently, the storage controller 1083 executes cache log creation and backup process 1092 to write the cache update contents to the storage device 1033 (step S16) and waits for its completion (step S17). Details of the cache log creation and backup process 1092 in step S16 will be described later with reference to Figure 17.

[0081] Next, after the storage controller 1083 has finished writing the cache update contents to the storage device 1033, it returns a response to the write request to the host device 101 (step S18).

[0082] Next, the data protection control unit 1086 performs data writing processing after receiving a response from the storage controller 1083 to the host device 101 or if it determines that a write-through operation is in progress (step S14; write-through operation). That is, the data protection control unit 1086 writes the data to the storage device 1033 (step S19). Details of the data writing process will be described later with reference to Figure 19.

[0083] Next, the storage controller 1083 determines whether the host has responded after writing to the data storage area (step S20). If the host has not responded (step S20; No), the storage controller 1083 responds to the host device 101 (step S21). After the storage device host has responded or if the host has responded (step S20; Yes), the storage controller 1083 terminates the write process 1091.

[0084] (Cache log creation and backup process 1092 related to Embodiment 1) Figure 17 is a flowchart showing the processing procedure of the cache log creation and backup process 1092 according to Embodiment 1. In the cache log creation process, the storage controller 1083 creates a cache log by adding a cache log header 1041 to the cache update contents. The storage controller 1083 then writes one or more of the created cache logs together to the storage device 1033 on its own storage node and other paired storage nodes.

[0085] Specifically, the storage controller 1083 obtains a log sequence number to be uniquely set for the cache log (step S16a) and creates a cache log header 1041 (step S16b). Next, the storage controller 1083 adds the cache log header 1041 to the data received from the processing caller (step S16c). Then, the storage controller 1083 allocates storage space on the cache log buffer 1103 (step S16d) and stores the log in the allocated space (step S16e).

[0086] Next, the storage controller 1083 verifies whether the total size of the cache logs on the cache log buffer 1103 is greater than or equal to a predetermined size (step S16f). If the total size of the cache logs is greater than or equal to the predetermined size (step S16f; Yes), the storage controller 1083 transfers the logs to the cache log buffer 1103 of the other storage node 103. The storage controller 1083 then sends a cache log backup request (step S16g). The storage controller 1083 then performs the cache log backup process on its own storage node 103 (step S16h). The other storage node 103 that receives the transferred logs performs the same log backup process on its own storage node 103 as in step S16h (step S16h'). Details of the cache log backup processes in steps S16h and S16h' will be described later with reference to Figure 18.

[0087] The storage controller 1083 of the node that sent the evacuation request receives an evacuation completion notification from another node (step S16i), returns a completion response (step S16j), and terminates processing.

[0088] (Cache log backup process according to Embodiment 1) Figure 18 is a flowchart showing the processing procedure for the cache log backup process according to Embodiment 1.

[0089] First, the storage controller 1083 reads the log from the cache log buffer 1103 (step S16h1). Next, the storage controller 1083 selects one cache log storage area to write to from the cache log storage area management table 1101, obtains its log end address, and uses it as the storage address (step S16h2). Then, the storage controller 1083 writes the cache log to the obtained storage address (step S16h3). Subsequently, the storage controller 1083 deletes the log that has already been written to the storage device from the log buffer (step S16h4). Finally, the storage controller 1083 updates the log end address of the cache log storage area held by the cache log storage area management table 1101 to the address that points to the end position of the log written to that area (step S16h5).

[0090] (Data writing process 1097 related to Embodiment 1) Figure 19 is a flowchart showing the processing procedure of the data writing process 1097 according to Embodiment 1.

[0091] First, the data protection control unit 1086 obtains the sequence number for updating the data storage area (step S19a), obtains the assigned address (step S19b), and obtains exclusive access (step S19c).

[0092] Next, the data protection control unit 1086 determines whether a write log needs to be created (step S19d). If a write-back operation is determined in step S14 (Figure 16) and the data is written to the storage device 1033 as a cache log in step S16, the data protection control unit 1086 determines that a write log does not need to be created (step S19d; No). If a write-through operation is determined in step S14, or if the data is not written to the storage device 1033 as a cache log in step S16, the data protection control unit 1086 determines that a write log needs to be created (step S19d; Yes). If the data protection control unit 1086 determines that a write log needs to be created (step S19d; Yes), it performs a write log creation and backup process and writes the data to the write log storage area of ​​the storage device 1033 (step S19e). Details of the write log creation and backup process in step S19e will be described later with reference to Figure 20.

[0093] Next, the data protection control unit 1086 writes the data to the allocated address on the data storage area 1203 (step S19f) after writing the data to the write log storage area, or if it determines that creating a write log is unnecessary (step S19d; NO). Once the data writing is complete, the data protection control unit 1086 releases the exclusive lock (step S19g) and terminates the data writing process 1097.

[0094] (Write log creation and backup process related to Embodiment 1) Figure 20 is a flowchart showing the processing procedure for the Write log creation and backup process according to Embodiment 1. In this embodiment, the Write log storage area 1022 on the storage device 1033 is divided into multiple areas, and one Write log is stored in each of these divided areas.

[0095] The data protection control unit 1086 writes the created Write logs one by one to the storage device 1033. First, the data protection control unit 1086 creates a Write log header 1301 (step S19e1). Next, the data protection control unit 1086 adds the Write log header 1301 to the data received from the processing caller (step S19e2).

[0096] Next, the data protection control unit 1086 acquires an exclusive lock (step S19e3). Next, the data protection control unit 1086 selects one write destination area from the Write log storage area management table 1105, obtains the starting address of that area, and sets it as the storage destination address (step S19e4). Next, the data protection control unit 1086 writes the Write log to the storage destination address (step S19e5). Next, the data protection control unit 1086 releases the exclusive lock (step S19e6). Next, the data protection control unit 1086 returns a completion response to the caller (step S19e7).

[0097] (Power interruption recovery process 1093 according to Embodiment 5) Figure 21 is a flowchart showing the processing procedure for the power outage recovery process 1093 in the event of power loss according to Embodiment 5. Figure 21 shows an example of the process when the storage system 100 recovers power after losing power during the write process 1091.

[0098] First, the storage controller 1083 reads the cache log from the cache log storage area 1201 of the storage device 1033 (step S31). Next, the storage controller 1083 sorts the log read in step S32 in order of cache log sequence number (step S32). Next, the storage controller 1083 applies the cache log sorted in step S32 to the cache area 1102 on memory 1032 (step S33). When applying the cache log, the storage controller 1083 applies the log to the address of the cache area specified in the update address field of the cache log header 1401. Next, the storage controller 1083 writes the recovered data in the cache area 1102 to the allocated address of the storage device 1033 (step S34).

[0099] Next, the storage controller 1083 reads the write log from the storage device 1033 (step S35). Then, the storage controller 1083 sorts the read log in order of the write log sequence number (step S36). Next, the storage controller 1083 extracts data from the write log (step S37) and applies it to the storage device 1033 in the sorted order (step S38). When applying the write log, the storage controller 1083 writes the log to the address on the data storage area 1203 specified in the write destination address field of the write log header 1301.

[0100] (Effects of Embodiment 1) In Embodiment 1, the writing of the Write log is switched depending on whether write-back operation or write-through operation is selected. That is, during write-back operation, the Write log is not written when writing to the storage device 1033, and during write-through operation, the Write log is written when writing to the storage device 1033. This reduces the number of I / O operations of the backend drive during write-back operation, improves performance when the drive is bottlenecked, and reduces the CPU cost required for drive I / O.

[0101] Furthermore, in Embodiment 1, upon recovery from a power outage, data in the cache area 1102 and data storage area 1203 are restored from the data in the cache log storage area 1201, and data in the data storage area 1203 is restored from the data in the write log storage area 1202. That is, regarding the restoration of data in the data storage area 1203, if it can be restored from the data stored in the cache area 1102, it is restored from the data in the cache area 1102. On the other hand, data that cannot be restored from the data in the cache area 1102 is restored from the write log stored in the write log storage area 1202. This reduces the situations in which the write log is necessary, and thus reduces the number of writes to the write log.

[0102] [Embodiment 2] In Embodiment 2, the Write log creation and backup process employs a method in which one or more Write logs are written together to the Write log storage area on the storage device 1033 by appending. In this embodiment, the Write log creation and backup process shown in Figure 22 is executed instead of the Write log creation and backup process shown in Figure 20.

[0103] In Embodiment 2, components and processes similar to those in Embodiment 1 are assigned the same reference numerals and their descriptions are omitted; the explanation will focus primarily on the differences.

[0104] (Write log creation and backup process according to Embodiment 2) Figure 22 is a flowchart showing the processing procedure for the Write log creation and backup process according to Embodiment 2. In the Write log creation and backup process of this embodiment, the data protection control unit 1086 writes one or more created Write logs together to the storage device 1033.

[0105] In the Write log creation and backup process of this embodiment, steps S19e1 and S19e2 are the same as in Embodiment 1. Following step S19e2, the data protection control unit 1086 reserves a storage area for the data with the Write log header on the Write log buffer 1106 (step S19B3). Subsequently, the data protection control unit 1086 stores the Write log in the reserved area (step S19B4).

[0106] Next, the data protection control unit 1086 verifies whether the total size of the write logs on the write log buffer 1106 is greater than or equal to a predetermined size (step S19B5). If the total size of the write logs is greater than or equal to a predetermined size (step S19B5; Yes), the data protection control unit 1086 selects one write log storage area from the write log storage area management table 1105 to be used as the write destination. Then, the data protection control unit 1086 obtains the log termination address of the selected write log storage area and uses it as the storage destination address (step S19B6).

[0107] The data protection control unit 1086 then reads one or more write logs from the write log buffer 1106 (step S19B7). Next, the data protection control unit 1086 writes these write logs together to the acquired storage address (step S19B8). Then, the data protection control unit 1086 deletes the write logs that have already been written to the storage device from the write log buffer 1106 (step S19B9). Next, the data protection control unit 1086 updates the log end address of the write log storage area held by the write log storage area management table 1105 to the address that points to the end position of the logs written to that area (step S19B0). Finally, the data protection control unit 1086 returns a completion response to the caller (step S19e7).

[0108] The data protection control unit 1086 terminates the write log creation and saving process after step S19e7 or if the total size of the write logs on the write log buffer 1106 is less than a predetermined size (step S19B5; No).

[0109] (Effects of Embodiment 2) In Embodiment 2, a specified number or amount of write logs are written to the write log storage area 1202 in batches. By writing the write logs in batches in this way, the number of drive I / O operations can be further reduced, performance during drive bottlenecks can be improved, and the CPU cost per unit required for drive I / O can be reduced.

[0110] [Embodiment 3] Embodiment 3 describes a method in which, in the Write log creation and backup process, one or more Write logs are written together with the cache log to the storage device 1033. In this embodiment, the Write log creation and backup process shown in Figure 23 is executed instead of the Write log creation and backup process shown in Figure 20.

[0111] In Embodiment 3, components and processes similar to those in Embodiments 1 and 2 are assigned the same reference numerals and their descriptions are omitted; the explanation will focus on the differences.

[0112] (Write log creation and backup process related to Embodiment 3) Figure 23 is a flowchart showing the processing procedure for creating and saving a write log according to Embodiment 3.

[0113] In the Write log creation and backup process of this embodiment, steps S19e1 and S19e2 are the same as in Embodiment 1. Following step S19e2, the data protection control unit 1086 receives data (Write logs) with the Write log header 1301 attached and performs the cache log creation and backup process 1092 (Figure 18) (step S19C3). In step S19C3, a specified number or amount of Write logs and a specified number or amount of Cache logs are written together to a predetermined storage area of ​​the storage device.

[0114] Next, the data protection control unit 1086 returns a completion response (step S19e7).

[0115] (Effects of Embodiment 3) In Embodiment 3, the update contents (cache log) of one or more cache areas 1102 and the update contents (Write log) of one or more data storage areas 1203 are written together to a predetermined storage area of ​​the storage device 1033. Therefore, the processing related to writing the cache log in steps S14 to S18 of the write process 1091 (Figure 16) can be omitted. By writing the cache log and write log together to the storage device 1033 in this way, the number of drive I / O operations can be reduced, performance during drive bottlenecks can be improved, and the CPU cost required for drive I / O can be reduced.

[0116] [Embodiment 4] In Embodiment 4, a protection code is assigned to the data to be written, and the data and protection code are stored redundantly in the original storage node and other storage nodes that are redundant targets, or they are distributed across three or more storage nodes that constitute a storage cluster.

[0117] (Configuration of the data storage area 1203 according to Embodiment 4) Figure 24 is a diagram showing an example configuration of the data storage area 1203 according to Embodiment 4.

[0118] There are two methods for writing protection codes for detecting data errors to the data storage area 1203: (B1) a method in which data and its protection codes are stored in the same sector, and (B2) a method in which protection codes for multiple data are stored together in a different sector from the data. The method in which data and its protection codes are stored in the same sector is called the same-sector method. The method in which protection codes for multiple data are stored together in a different sector from the data is called the separate method. Both methods are applicable to the storage system 100.

[0119] In the "(B1) Same Sector Method," the data storage area 1203 is divided into sector units, which are the management units of the storage area, and each divided area is provided to the data protection control unit 1086 as a physical storage area where data and protection codes can be stored together. The storage controller 1083 then calculates the protection code from the data received from the host device 101 and passes an I / O request to the data protection control unit 1086. The data protection control unit 1086 writes the data and protection code received from the storage controller 1083 to the area on the corresponding storage device.

[0120] In the "(B2) Separate Method," the inside of the data storage area 1203 is divided into sector units, which are the management units of the storage area, and each of these areas is provided to the data protection control unit 1086 as a data storage area and a protection code storage area for storing protection codes together. In the "(B2) Separate Method," protection codes for multiple data (hereinafter, this set of protection codes for multiple data will be called a "protection code group") are stored together in one sector.

[0121] Writing data to the storage device 1033 is performed sector by sector. Therefore, in the "(B2) Separate Method," when rewriting one protection code included in a protection code group on the storage device 1033, the following steps must be taken. That is, the data protection control unit 1086 first reads the old protection code group from the storage device 1033. Next, the data protection control unit 1086 updates the protection code portion corresponding to the data and creates a new protection code group. Then, the data protection control unit 1086 writes the newly created protection code group to the storage device 1033.

[0122] The storage controller 1083 calculates a protection code from the data received from the host device 101 and passes an I / O request to the data protection control unit 1086. The data protection control unit 1086 writes the data to the corresponding area on the storage device 1033. Next, due to the aforementioned constraints on writing to the storage device 1033, the data protection control unit 1086 reads the old protection code group from the corresponding area on the storage device 1033 and overwrites it with the protection code received from the storage controller 1083. Then, the data protection control unit 1086 writes the new protection code group to the corresponding area on the storage device. Note that the order in which the data and protection codes are written to the storage device may be reversed (the protection codes are written first) or they may be done simultaneously in parallel.

[0123] In Embodiment 4, the write process 1091 shown in Figure 25 is executed instead of the write process 1091 shown in Figure 16. That is, the write process 1091 in this embodiment is the process when a write request is received from the host device 101 to a virtual volume whose data is redundantly distributed across two or more storage nodes 103. The virtual volume here is a virtual volume consisting of storage devices 1033 on two or more storage nodes 103 and corresponding logical chunk areas. In this embodiment, the write process 1091 is initiated by the active controller of the pair of storage controllers 1083. The data is also protected by a code and stored in the storage device 1033.

[0124] In Embodiment 4, components and processes similar to those in Embodiments 1, 2, and 3 are given the same reference numerals and their descriptions are omitted; the explanation will focus on the differences.

[0125] (Light processing 1091 according to Embodiment 4) Figure 25 is a flowchart showing the processing procedure of the write process 1091 according to Embodiment 4. The write process 1091 according to Embodiment 4 differs from the write process 1091 according to Embodiment 1 (Figure 16) in that step S14D is executed immediately before step S14. It also differs in that step S19D is executed immediately before steps S18 and S20. Other than these differences, the write process 1091 according to Embodiment 4 is the same as the write process 1091 according to Embodiment 1.

[0126] In step S13D, the storage controller 1083 generates a protection code from the data to be written. In step S19D, the storage controller 1083 performs data redundancy processing 1096. Details of the data redundancy processing 1096 in step S19D will be described later with reference to Figure 26.

[0127] (Data redundancy processing 1096 related to Embodiment 4) Figure 26 is a flowchart showing the processing procedure of the data redundancy process 1096 according to Embodiment 4.

[0128] According to Embodiment 4, the data redundancy process 1096 writes the data to be written to the storage device 1033 in the local storage node 103 and the other storage node 103 that is the data redundancy destination.

[0129] First, the data protection control unit 1086 obtains the sequence number for updating the data storage area (step S1901), obtains the assigned address (step S1902), and obtains exclusive access (step S1903).

[0130] Next, the data protection control unit 1086 determines the redundancy method for the I / O request area of ​​the data to be written (step S1904). If the redundancy method for the I / O request area of ​​the data is the Mirror method (step S1904; Mirror method), the data protection control unit 1086 sends the data and protection code to the other storage node 103 which will be the data redundancy destination (step S1905). The data protection control unit 1086 then waits for a response from the other storage node 103 to the transmission of the data and protection code in step S1905 (step S1906).

[0131] On the other hand, the data protection control unit 1086 of the other storage node 103, which has received data from the source storage node 103, performs data redundancy processing 1096 (step S1907) on the storage device 1033 on the other storage node. Details of the data and protection code writing process in step S1917 will be described later with reference to Figure 27. Then, the data protection control unit 1086 of the other storage node 103, similar to step S17, sends a response to the source storage node 103 (step S1908).

[0132] Meanwhile, if the redundancy method is the EC method (step S1904; EC method), the data protection control unit 1086 reads the old data before the update from the assigned address of the storage device 1033 of its own storage node 103 (step S1909). Next, the data protection control unit 1086 generates an intermediate parity (intermediate code) from the data to be written and the old data read in step S1909 (step S1910). Next, the data protection control unit 1086 sends the intermediate parity to the other storage node 103 which will be the data redundancy destination (step S1911) and waits for a response from the other storage node 103 (step S1912).

[0133] Upon receiving the intermediate parity, the data protection control unit 1086 of the other storage node 103 performs an EC parity write process (step S1913) and sends a response to the storage node 103 that sent the intermediate parity (step S1914). Details of the EC parity write process in step S1913 will be described later with reference to Figure 28.

[0134] After receiving a response in step S1906 or step S1912, the data protection control unit 1086 performs a data protection code writing process (step S1915) to the storage device 1033 on its own storage node 103. Details of the data protection code writing process in step S1915 will be described later with reference to Figure 27.

[0135] Next, the data protection control unit 1086 releases the exclusive access (step S1916) and terminates the data redundancy process 1096.

[0136] (Data protection code writing process according to Embodiment 4) Figure 27 shows that in Embodiment 4, if a write-back operation is determined in S14 of Figure 25 and data is written to the storage device 1033 as a cache log in S16, it is determined that a write log creation is unnecessary (step S2011; No). If a write-through operation is determined in S14 of Figure 25 and data is not written to the storage device 1033 as a cache log, it is determined that a write log creation is necessary (step S2011; Yes).

[0137] First, if the data protection control unit 1086 determines in step S2001 that it is not necessary to create a data write log (step S2001; No), it obtains the storage method of the protection codes of the storage device (step S2012). If the protection code storage method is the separate method (step S2013; separate method), the data protection control unit 1086 writes the protection code group to be updated as a write log to the storage device 1033. Specifically, the data protection control unit 1086 reads the protection code group containing the protection codes of the data to be updated from the storage device 1033 (step S2014), and updates the protection codes of the data to be updated from this protection code group (step S2015). Subsequently, the data protection control unit 1086 writes the new protection code group to the storage device 1033 by creating a write log and saving it (step S2016), and waits for its completion (step S2017).

[0138] On the other hand, if the data protection control unit 1086 determines in step S2011 that a write log should be created (step S2011; Yes), it writes the data and protection code to the storage device 1033 as a write log. Specifically, the data protection control unit 1086 obtains the storage method of the protection code in the storage device 1033 (step S2018).

[0139] Next, the data protection control unit 1086 determines the protection code storage method (step S2019). If the protection code storage method is the separate method (step S2019; separate method), the data protection control unit 1086 reads the protection code group containing the protection code of the data to be updated from the storage device 1033 (step S2020). Next, the data protection control unit 1086 updates the protection code of the data to be updated from the protection code group read in step S2020 (step S2021). Next, the data protection control unit 1086 writes the new protection code group and data updated in step S2021 to the storage device 1033 by creating a write log and saving it (step S2022). Then the data protection control unit 1086 waits for the completion of the write in step S2022 (step S2023). When step S2023 is completed, the data protection control unit 1086 moves the process to step S2024.

[0140] On the other hand, if the data protection control unit 1086 is using the same-sector method for storing protection codes (step S2019; same-sector method), it moves the process to step S2022.

[0141] The Write log creation and backup process in steps S2016 and S2022 can be performed using any of the methods described with reference to Figures 20, 22, and 23.

[0142] On the other hand, if the data protection control unit 1086 has made the data non-volatile and the protection code storage method is the same sector method (step S2013; same sector method), it moves the process to step S2024. Alternatively, if the data protection control unit 1086 receives a completion response while waiting for the completion of the Write log backup process (step S2023), it also moves the process to step S2024. In step S2024, it writes the data to be written and the protection code to the allocated address on the storage device 1033.

[0143] (EC parity writing process according to Embodiment 4) Figure 28 is a flowchart showing the processing procedure for the EC parity writing process according to Embodiment 4. In the EC parity writing process, the parity and the parity protection code are written as a log to the storage device 1033, and then the parity and the parity protection code are written to the allocated address in the data storage area 1203.

[0144] First, the data protection control unit 1086 reads the old parity from the assigned address (step S2101). Next, the data protection control unit 1086 generates a new parity from the old parity and the intermediate parity, and generates a protection code from the new parity (step S2102).

[0145] Next, the data protection control unit 1086 obtains the storage method of the protection codes of the storage device (step S2103). Then, the data protection control unit 1086 determines the protection code storage method. If the protection code storage method is the separate method (step S2104; separate method), the data protection control unit 1086 writes the protection code group containing the protection code to be updated as a Write log to the storage device 1033. Specifically, the data protection control unit 1086 reads the protection code group containing the protection code of the data to be updated from the storage device 1033 (step S2105). Then, the data protection control unit 1086 updates the protection code of the data to be updated from this protection code group (step S2106). When step S2106 is completed, the data protection control unit 1086 moves on to step S2107.

[0146] The data protection control unit 1086 executes a write log creation and backup process (step S2107) if the protection code storage method is the same sector method (step S2404; same sector method) or after the completion of step S2106. In the write log creation and backup process, the parity and the new protection code group are written to the storage device 1033 as write logs. Subsequently, the data protection control unit 1086 waits for the completion of the write log creation and backup process in step S2107 (step S2108). The write log creation and backup process in step S2107 can use any of the methods described with reference to Figures 20, 22, and 23.

[0147] Next, when the data protection control unit 1086 receives a completion response during the wait for the Write log backup process to complete (step S2108), it writes the parity and protection code to the assigned address on the storage device 1033 (step S2109).

[0148] (Effects of Embodiment 4) In Embodiment 4, the Write Log is switched on or off depending on whether a write-back operation or a write-through operation is selected for the data and its protection code received from the host device 101. Therefore, even when the data is protected, the number of writes to the Write Log can be reduced.

[0149] Furthermore, in Embodiment 4, by writing the protection code assigned to the data to be written to the same sector as the data, the number of I / O operations can be reduced by limiting the read operation to only the sector related to data storage, thereby suppressing a decrease in I / O performance.

[0150] Furthermore, in Embodiment 4, by writing the protection code assigned to the data to be written to a sector different from the data, the number of sector read operations for the protection code group is limited when updating multiple data, thereby reducing the number of I / O operations and suppressing a decrease in I / O performance.

[0151] In Embodiment 4, when the redundancy method is a mirror method, the data to be written and its protection codes are made redundant between the original storage node 103 and the other storage node 103 that is the redundancy destination. Under this configuration, each storage node 103 switches whether or not to write the write log depending on whether write-back operation or write-through operation is selected. As a result, even in a mirror-type data redundancy configuration, each storage node 103 can reduce the number of drive I / O operations, improve performance during drive bottlenecks, and reduce the CPU cost required for drive I / O.

[0152] In Embodiment 4, when the redundancy method is the EC method, the EC parity of the data to be written is distributed between the original storage node 103 and two or more other storage nodes 103 that are redundancies. Under this configuration, each storage node 103 switches whether or not to write the write log depending on whether write-back operation or write-through operation is selected. As a result, even in an EC data redundancy configuration, each storage node 103 can reduce the number of drive I / O operations, improve performance during drive bottlenecks, and reduce the CPU cost required for drive I / O.

[0153] It should be noted that the present invention is not limited to the embodiments described above, and various modifications are included. Furthermore, the embodiments described above are explained in detail for the purpose of clearly illustrating the present invention, and are not necessarily limited to those having all the configurations described. In addition, it is possible to replace or add configurations, not just delete them. Moreover, forms in which some or all of the above embodiments are appropriately combined in a consistent manner are also included as embodiments of the present invention.

[0154] Furthermore, some or all of the above configurations, functions, processing units, and processing means may be implemented in hardware, for example, by designing them as integrated circuits. The present invention can also be implemented by software program code that realizes the functions of the embodiments. In this case, a recording medium containing the program code is provided to a computer, and the computer's processor reads the program code stored on the recording medium.

[0155] In this case, the program code read from the recording medium itself will realize the functions of the embodiment described above, and the program code itself and the recording medium storing it will constitute the present invention. Examples of recording media used to supply such program code include flexible disks, CD-ROMs, DVD-ROMs, hard disks, SSDs (Solid State Drives), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, non-volatile memory cards, ROMs, and the like.

[0156] Furthermore, the program code that implements the functions described in this embodiment can be implemented in a wide range of programming or scripting languages, such as assembler, C / C++, Perl, Shell, PHP, and Java (registered trademark).

[0157] In the embodiments described above, the control lines and information lines shown are those deemed necessary for illustrative purposes and do not necessarily represent all control lines and information lines in the actual product. All components may be interconnected. [Explanation of symbols]

[0158] 100: Storage system, 101: Host device, 102: Network, 103: Storage node, 1031: CPU, 1032: Memory, 1033: Storage device, 1083: Storage controller, 1086: Data control and protection unit.

Claims

1. Non-volatile memory devices and A storage system comprising one or more storage nodes having a storage controller for reading and writing data to the storage device and a volatile memory, The memory has a cache area for temporarily storing data related to write requests from a higher-level device. The storage device includes a cache log storage area for storing the update contents of the cache area, a data storage area for permanently storing the data relating to the write request, and a Write log storage area for storing the update contents of the data storage area. The aforementioned storage controller The system switches between a write-back operation, in which the data relating to the write request is stored in the cache area and the cache log storage area before responding to the higher-level device and then written to the data storage area after the response, and a write-through operation, in which the data is written to the data storage area and then responded to the higher-level device. In the write-back operation, the updated contents of the data storage area are not written to the Write log storage area before the data is written to the data storage area. In the write-through operation, the updated contents of the data storage area are written to the Write log storage area before the data is written to the data storage area. A storage system characterized by the following features.

2. A storage system according to claim 1, The aforementioned storage controller If a power loss occurs in the storage system between the response and the writing of data to the data storage area, the power loss recovery process shall, in the case of a write-back operation, read the updated contents of the cache area from the cache log storage area of ​​the storage device to restore the data in the cache area of ​​the memory, and write the restored data to the data storage area; in the case of a write-through operation, read the updated contents of the data storage area from the Write log storage area and apply them to the data storage area. A storage system characterized by the following features.

3. A storage system according to claim 1, The aforementioned storage controller Upon receiving the aforementioned write request, a protection code for error detection is added to the data related to the write request. In the write-back operation, the data and the protection code are stored in the cache area and the cache log storage area, and then written to the data storage area. In the write-through operation, the updated contents of the data storage area are written to the Write log storage area, and then the data and the protection code are written to the data storage area. A storage system characterized by the following features.

4. A storage system according to claim 3, The aforementioned storage controller The area within the storage device and the storage area corresponding to that area and provided to the higher-level device are divided into sectors, which are the smallest write units. The data corresponding to the protection code is written to the data storage area in the same sector. A storage system characterized by the following features.

5. A storage system according to claim 3, The area within the storage device and the storage area corresponding to that area and provided to the higher-level device are divided into sectors, which are the smallest write units. The data corresponding to the protection code is written to the data storage area in different sectors. A storage system characterized by the following features.

6. A storage system according to claim 3, The aforementioned storage controller The area within the storage device and the storage area corresponding to that area and provided to the higher-level device are divided into sectors, which are the smallest write units. Multiple protection codes relating to multiple data in multiple sectors are grouped into a protection code group. When writing the aforementioned data to a sector of the data storage area, the protection code group containing the protection code of the data to be written is read from the data storage area, the protection code of the protection code group is rewritten and written to the Write log storage area, and then the protection code group containing the rewritten protection code is written to the data storage area. A storage system characterized by the following features.

7. A storage system according to claim 1, The storage controller writes the update contents of the data storage area related to multiple write requests to the Write log storage area in a batch. A storage system characterized by the following features.

8. A storage system according to claim 1, The storage controller writes the updated contents of the data storage area and the updated contents of one or more cache areas related to multiple write requests to the storage device together. A storage system characterized by the following features.

9. A storage system according to claim 1, The storage controller of one of the storage nodes that received the write request from the higher-level device transfers the data related to the write request to the other storage nodes that constitute the storage system. The storage controller of the storage node that receives the transferred data, The system switches between a write-back operation, in which the transferred data is stored in the cache area and the cache log storage area before responding to the higher-level device and then written to the data storage area after the response, and a write-through operation, in which the data is written to the data storage area and then the system responds to the higher-level device. In the write-back operation, the updated contents of the data storage area are not written to the Write log storage area before the data is written to the data storage area. In the write-through operation, the updated contents of the data storage area are written to the Write log storage area before the data is written to the data storage area. A storage system characterized by the following features.

10. A storage system according to claim 1, The parity of the aforementioned data is stored on a storage node separate from the storage node that stores the aforementioned data. Upon receiving the write request from the higher-level device, the storage controller of one of the storage nodes, The new data related to the write request reads the old data to be updated from the data storage area, generates an intermediate code from the new data and the old data, and transfers the intermediate code to another storage node that constitutes the storage system and stores the parity. Upon receiving the aforementioned intermediate code, the storage controller of the other storage node: The old parity is read from the data storage area, a new parity is generated from the intermediate code and the old parity, the new parity is written to the Write log storage area, and then the new parity is written to the data storage area. A storage system characterized by the following features.

11. A method for controlling a storage system comprising one or more storage nodes having a storage controller for processing data reading and writing and volatile memory, The memory has a cache area for temporarily storing data related to write requests from a higher-level device. The non-volatile storage device includes a cache log storage area for storing the updated contents of the cache area, a data storage area for permanently storing the data related to the write request, and a Write log storage area for storing the updated contents of the data storage area. The aforementioned storage controller The system switches between a write-back operation, in which the data relating to the write request is stored in the cache area and the cache log storage area before responding to the higher-level device and then written to the data storage area after the response, and a write-through operation, in which the data is written to the data storage area and then responded to the higher-level device. In the write-back operation, the updated contents of the data storage area are not written to the Write log storage area before the data is written to the data storage area. In the write-through operation, the updated contents of the data storage area are written to the Write log storage area before the data is written to the data storage area. A method for controlling a storage system characterized by the following features.

Citation Information

Patent Citations

  • Disk control mechanism suitable for random disk write

    JP2001243021A

  • Information processor

    JP2006134125A

  • Access control device, error correction control method and storage device

    JP2012118839A

  • Storage system and monitoring device

    JP2017091025A

  • Page cache write logging in block-based storage

    JP2017515193A