Storage system and storage control method
The storage system uses non-volatile storage and efficient data logging to enhance performance and reliability, addressing data integrity issues during power outages and node failures.
Patent Information
- Application Number
- JP2024152110
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-03-31
- Filing Date
- 2024-09-04
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-06-23
AI Technical Summary
Existing storage systems face challenges in achieving high performance and reliability, particularly in maintaining data integrity during power outages and node failures, despite using software-defined storage (SDS) for redundancy.
The system employs a non-volatile storage device and a storage controller that logs data updates in memory, sends a completion response, and asynchronously destages data to a storage device, using methods like base image saving and garbage collection to manage free space efficiently, ensuring data recovery during power outages.
This approach enhances storage systems with both high performance and reliability by efficiently managing data integrity and reducing overhead, allowing quick data recovery and improved response times.
Smart Images

Figure 2024161207000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a storage system and a storage control method. [Background technology]
[0002] Conventionally, a redundant configuration has been adopted in storage systems to improve availability and reliability. For example, Patent Document 1 proposes the following storage system. In a storage system having a plurality of storage nodes, each storage node is provided with one or more storage devices that provide storage areas, and one or more storage control units that read and write requested data to the corresponding storage devices in response to a request from a host device. Each storage control unit holds predetermined configuration information required to read and write requested data to the corresponding storage device in response to a request from the host device, a plurality of control software are managed as a redundancy group, the configuration information held by each control software belonging to the same redundancy group is updated synchronously, and the plurality of control software that constitute the redundancy group are arranged on different storage nodes so as to distribute the load on each storage node. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-101703 A Summary of the Invention [Problem to be solved by the invention]
[0004] According to Patent Document 1, a storage system that can continue reading and writing even in the event of a node failure can be constructed using a technology for constructing a storage system using software (Software Defined Storage: SDS). In order to improve the performance and reliability of such a storage system, it is necessary to efficiently make various data non-volatile. The present invention proposes a method for efficiently storing control information, cache data, etc. in a storage system in a storage device. [Means for solving the problem]
[0005] In order to achieve the above-mentioned object, one representative storage system of the present invention is a storage system comprising a non-volatile storage device, a storage controller which processes data to be read and written to the storage device using a storage function, and a volatile memory, wherein the storage controller, upon receiving a data write request, stores the data related to the received write request in the memory, stores a log related to the data stored in the memory in the storage device, and once the log has been stored in the storage device, sends a completion response to the source of the data write request, processes the data stored in the memory using the storage function and destages it to the storage device, and, if the data in the memory related to the write request is lost due to a power outage, recovers the data in the memory using the log stored in the storage medium. Furthermore, one representative storage control method of the present invention is a storage control method in a storage system including a non-volatile storage device, a storage controller that processes data to be read and written to the storage device using a storage function, and a volatile memory, wherein when the storage controller receives a data write request, it stores data related to the received write request in the memory, stores a log related to the data stored in the memory in the storage device, and once the log has been stored in the storage device, it sends a completion response to the source of the data write request, processes the data stored in the memory using the storage function and destages it to the storage device, and when the data in the memory related to the write request is lost due to a power outage, it recovers the data in the memory using the log stored in the storage medium. Effect of the Invention
[0006] According to the present invention, it is possible to realize a storage system that combines high performance and high reliability. [Brief description of the drawings]
[0007] [Figure 1] FIG. 1 is a diagram showing the configuration of a storage system according to a first embodiment of the present invention. [Diagram 2] FIG. 1 illustrates an example of a physical configuration of a storage node. [Diagram 3] FIG. 1 illustrates an example of a logical configuration of a storage node. [Figure 4] FIG. 1 is a diagram for explaining an overview of the disclosed storage system and storage control method. [Diagram 5] FIG. 1 is a diagram showing an example of a memory configuration diagram. [Figure 6] FIG. 1 is a diagram showing an example of a configuration diagram of a storage device. [Figure 7] FIG. 1 is a diagram showing an example of a software module structure of a storage control unit. [Figure 8] A diagram showing an example of a cache directory. [Figure 9] Diagram showing the structure of a log header [Figure 10] Read Processing Flowchart [Figure 11] Write process flowchart [Figure 12] Asynchronous destage processing flowchart [Figure 13] Flowchart of control information update process [Figure 14] Flowchart of cache data update process [Figure 15] Log creation process flowchart [Figure 16] Flowchart of control information determination process [Figure 17] Log backup process flowchart [Figure 18] Flowchart of base image backup process [Figure 19] Cache Data Log Garbage Collection Process Flowchart [Figure 20] Log recovery process flowchart [Figure 21] FIG. 2 is an explanatory diagram of the second embodiment. [Figure 22] Flowchart of log save processing according to the second embodiment [Diagram 23] Flowchart of base image backup process in the second embodiment [Figure 24] Flowchart of log recovery process of the second embodiment [Diagram 25] FIG. 3 is an explanatory diagram of the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will now be described in detail with reference to the drawings. The embodiment relates to a storage system including a plurality of storage nodes, each having one or more SDSs implemented therein. In the disclosed embodiment, the storage node stores control information and cache data in memory. The storage node includes a nonvolatile device. When updating control information and data in response to a write request from the host, the update data is stored in the nonvolatile device in a log format. This makes it possible to make the update data nonvolatile. After that, a response is made to the host. Then, asynchronously with this, the data in the memory is destaged to the storage device. The destage process reflects the data written to the storage system and writes it to the storage device. In the destage process, various storage functions such as thin provisioning, snapshots, and data redundancy are provided, and a process such as creating a logical-physical conversion address is performed to enable data search and random access. In contrast, nonvolatile device storage in a log format is intended to restore data in the memory when it is lost, so the process for storage is light and fast. Therefore, when a volatile memory is used, the response performance can be improved by quickly storing data in a nonvolatile storage device in a log format and responding to the host device with a completion response. When storing in log format, control information and data are stored in an append format. Since data is stored in an append format, free space needs to be reclaimed. Two methods are used to reclaim free space: the base image save method and the garbage collection method. The base image save method writes the entire target area of a certain amount of control information and cache data to a non-volatile device, and discards all update logs during that time (recovering them as free space). The garbage collection method identifies unnecessary logs that are not the latest among the update logs, and reclaims the log area by transferring logs other than the unnecessary logs to a separate area. In the event of a power outage, the control information and cache data can be restored to memory using this base image save and log, so they are not lost. By using both methods to reclaim free space, the management information for free space management can be reduced, and the overhead for free space recovery can be reduced, improving storage performance. EXAMPLES
[0009] (1) Example 1 (1-1) Configuration of Storage System of Example 1 FIG. 1 shows the storage system of the first embodiment as a whole. The storage system 100, for example, comprises a plurality of host devices 101 (Host), a plurality of storage nodes 103 (Storage Node), and a management node 104. The host devices 101, the storage nodes 103, and the management node 104 are connected to each other via a network 102 configured from a Fibre Channel, Ethernet (registered trademark), a LAN (Local Area Network), or the like.
[0010] The host device 101 is a general-purpose computer device that transmits read requests or write requests (hereinafter, these are collectively referred to as I / O (Input / Output) requests) to the storage node 103 in response to requests from user operations, implemented application programs, etc. The host device 101 may be a virtual computer device such as a virtual machine.
[0011] The storage node 103 is a computer device that provides a storage area for reading and writing data to the host device 101. The storage node 103 is, for example, a general-purpose server device. The management node 104 is a computer device that is used by a system administrator to manage the entire storage system 100. The management node 104 manages a plurality of storage nodes 103 as a group called a cluster. Note that, although an example in which only one cluster is provided is shown in FIG. 1, a plurality of clusters may be provided within the storage system 100.
[0012] FIG. 2 is a diagram showing an example of a physical configuration of the storage node 103. As shown in FIG. The storage node 103 includes a CPU (Central Processing Unit) 1031, a memory 1032, a plurality of storage devices 1033 (Drives), and a communication device 1034 (NIC: Network Interface Card).
[0013] The CPU 1031 is a processor that controls the operation of the entire storage node. The memory 1032 is composed of semiconductor memories such as SRAM (Static RAM (Random Access Memory)) and DRAM (Dynamic RAM). The memory 1032 is used to temporarily store various programs and necessary data. The CPU 1031 executes the programs stored in the volatile memory 1032, thereby executing various processes of the entire storage node 103 as described below.
[0014] The storage device 1033 is composed of one or more types of large-capacity non-volatile storage devices such as an SSD (Solid State Drive), a SAS (Serial Attached SCSI (Small Computer System Interface)) hard disk drive, a SATA (Serial ATA (Advanced Technology Attachment)) hard disk drive, etc. The storage device 1033 provides a physical storage area for reading or writing data in response to an I / O request from the host device 101.
[0015] The communication device 1034 is an interface for the storage node 103 to communicate with the host device 101, other storage nodes 103, or the management node 104 via the network 102. The communication device 1034 is composed of, for example, a NIC, an FC card, etc. The communication device 1034 performs protocol control during communication with the host device 101, other storage nodes 103, or the management node 104.
[0016] FIG. 3 is a diagram showing an example of a logical configuration of the storage node 103. As shown in FIG. The storage node 103 includes a front-end driver 1081, a back-end driver 1087, one or more storage controllers 1083, and a data protection controller 1086.
[0017] The front-end driver 1081 is software having a function of controlling the communication device 1034 and providing the CPU 1031 with an abstracted interface for communication with the host device 101 , other storage nodes 103 or management node 104 for the storage control unit 1083 .
[0018] The back-end driver 1087 is software having a function of controlling each storage device 1033 in its own storage node 103 and providing the CPU 1031 with an abstracted interface for communication with each storage device 1033 .
[0019] The storage control unit 1083 is software that functions as a controller of the SDS. The storage control unit 1083 accepts an I / O request from the host device 101, and issues an I / O command corresponding to the I / O request to the data protection control unit 1086. The storage control unit 1083 also has a logical volume configuration function. The logical volume configuration function associates the logical chunks configured by the data protection control unit with the logical volumes provided to the host. For example, a straight mapping method (a logical chunk and a logical volume are associated with each other on a 1:1 basis, and the address of the logical chunk is the same as the address of the logical volume) may be used, or a virtual volume function (Thin Provisioning) method (a method in which the logical volume and the logical chunk are divided into small-sized areas (pages), and the addresses of the logical volume and the logical chunk are associated with each other on a page basis) may be used.
[0020] In the case of the first embodiment, each storage control unit 1083 implemented in the storage node 103 is managed as a pair constituting a redundant configuration together with another storage control unit 1083 arranged in another storage node 103. Hereinafter, this pair will be referred to as a storage control unit group 1085. 3 shows a case where one storage control unit group 1085 is configured by two storage control units 1083. In the following description, the storage control unit group 1085 is also configured by two storage control units 1083, but one redundant configuration may be configured by three or more storage control units 1083.
[0021] In the storage control unit group 1085, one storage control unit 1083 is set to a state (active system state, hereinafter referred to as active mode) in which it can accept I / O requests from the host device 101. In the storage control unit group 1085, the other storage control unit 1083 is set to a state (standby system state, hereinafter referred to as standby mode) in which it does not accept I / O requests from the host device 101. In the storage control unit group 1085, when a failure occurs in the storage control unit 1083 (hereinafter referred to as the active storage control unit) set to the active mode or in the storage node 103 in which the active storage control unit is arranged, the state of the storage control unit 1083 (hereinafter referred to as the standby storage control unit) that was set to the standby mode up until that point is switched to the active mode. This allows the standby storage control unit to take over the I / O processing that the active storage control unit had been executing when the active storage control unit becomes unable to operate.
[0022] The data protection control unit 1086 is software that has the function of allocating physical storage areas provided by storage devices 1033 in its own storage node 103 or in other storage nodes 103 to each storage control unit group 1085, and reading or writing specified data to the corresponding storage devices 1033 in accordance with the above-mentioned I / O commands provided by the storage control unit 1083. In this case, when the data protection control unit 1086 allocates a physical storage area provided by a storage device 1033 in another storage node 103 to the storage control unit group 1085, it cooperates with the data protection control unit 1086 implemented in that other storage node 103 to exchange data with that data protection control unit 1086 via the network 102, thereby reading or writing the data to that storage area in accordance with an I / O command provided by the active storage control unit of that storage control unit group 1085.
[0023] FIG. 4 is a diagram illustrating an overview of the disclosed storage system and storage control method. The storage control unit updates control information and cache data for I / O processing from the host and various other processes. At this time, the control information / cache data in memory is updated, and the log is stored in the storage device to make it non-volatile. For this purpose, an update log is created in the control information log buffer or cache log buffer. The log consists of the update data itself and a log header, and is information that indicates how the control information and cache data in memory were updated. The log header contains information indicating the update location, update size, and the order relationship between updates, as shown in Figure 9.
[0024] The update log in the log buffer is written to the log area in the storage device in an append-write format. This writing can be done immediately or asynchronously. Because of the append write, the free space in the log area on each device gradually decreases and it becomes impossible to write to it. To avoid this, it is necessary to reclaim the free space. Different methods are used for the log area for control information and the log area for cache data.
[0025] The base image backup method is used for the control information. In the base image backup method, the entire control information is copied to the base image area on the storage device. When the copy is complete, all update logs before the start of the copy are invalidated (reclaimed as free space). On the other hand, a garbage collection method is used to reclaim free space in the log area for cache data. When cache data is overwritten or deleted from the cache (by asynchronous destage, described later), the log of that cache data becomes invalid. The garbage collection method removes invalid logs and copies valid old logs to the end of the log area as new logs, thereby reclaiming the log area as free space.
[0026] 5 is an example of a memory configuration diagram. In the memory, storage control information 10321, a cache data area 10323, a cache data log header management table 10324, a control information log buffer 10325, and a cache data log buffer 10326 are stored.
[0027] The storage control information 10321 is an area in which control information for implementing various storage functions is stored, and one example is a cache directory 10322. The cache directory will be described with reference to FIG. The cache data log header management table 10324 is a table that stores the log headers of all cache data logs on the disk. The control information log buffer 10325 temporarily holds a log of the control information. The cache data log buffer 10326 temporarily holds a log of the cache data.
[0028] 6 is an example of a configuration diagram of a storage device. A control information base image area 10332, a control information log area 10333, a cache data log area 10334, and a permanent area 10335 exist on the storage device. The control information base image area is an area to which the entire control information is copied in the base image backup process described below. The control information log area 10333 and the cache data log area 10334 are areas to which logs are saved in the log backup process described below. The permanent area 10335 is an area that stores user data and is managed by the data protection control unit 1086. Each of these will be explained in the respective processing flows described later.
[0029] FIG. 7 is a diagram showing an example of a software module structure of the storage control unit 1083. As shown in FIG. The storage control unit 1083 executes log creation processing, log evacuation processing, control information update processing, cache data update processing, base image evacuation processing, user data cache area recovery processing, read processing, write processing, and asynchronous destage processing. Each processing will be described in detail later.
[0030] The control information will be described below. 8 is a diagram showing an example of a cache directory. The cache directory is management information for areas (cache segments) obtained by dividing a cache area, and has entries corresponding to each cache segment.
[0031] Each entry has a cache address, a logical volume number, a logical volume address, and an attribute entry. The cache address indicates the address in memory of the cache segment to which each entry corresponds, and the logical volume number and logical volume address indicate which logical volume and which address the data stored in the cache segment belongs to. If no data is stored in the cache segment, a "-" is stored to indicate "no value." If data is stored in the cache segment, the attribute field has a value of Dirty or Clean. Dirty indicates that the data has not yet been destaged and written to the storage device, and Clean indicates that the data has been destaged and matches the value written to the storage device.
[0032] Figure 9 shows the structure of a log header. The log header is a table included in each log stored in the log buffer area in memory or the log area on a storage device. Each log header has fields for a log sequence number, an update address, an update size, an area type, and a valid flag.
[0033] The log sequence number field stores a log sequence number that is uniquely assigned to each log. The update address field stores the address of the control information or cache data to be updated for each log. The update size field stores the size to be updated. The area type field stores a value to identify either control information or cache data. Here, it is assumed that the character string "control information" or "cache data" is stored. The valid flag field is set to a value of "valid" or "invalid".
[0034] FIG. 10 is an example of a flowchart of a read process. The read process is called when a read I / O command is received from the host, and is executed by the storage control unit. First, the read command sent from the host is received via the front-end driver, and the read command is interpreted to obtain the logical volume number and logical volume address of the read target (step 4001). Next, it is determined whether or not there is a cache hit (step 4002). Specifically, the cache directory is referenced, an entry corresponding to the logical volume number and logical volume address is searched for in the cache directory, and if there is an entry (hit), the cache address is referenced from the entry, a branch is taken to Yes, data is read from the cache area (step 4006), and the data is returned to the host (step 4007). If there is no entry corresponding to the logical volume number and logical volume address in the cache directory (miss), a branch is taken to No, and a staging process is called (step 4003). The staging process is a process executed by the data protection control unit, and data corresponding to the logical volume number / logical volume address is read from the permanent area on the storage device. The read data is stored in the cache data area on the memory (step 4004). At this time, the cache data update process, which will be described later, is called with the non-volatilization requirement set to "not required." The cache directory is updated (step 4005). At this time, since the cache directory is a piece of control information, the control information update process, which will be described later, is called. At this time, like the cache data update, the non-volatilization requirement is set to "not required" and called. Then, like in the case of a cache hit, the data is read from the cache (step 4006), and the data is responded to the host (step 4007).
[0035] FIG. 11 is an example of a flowchart showing the write process. The write process is executed by the storage control unit. First, a write command sent from the host via the front-end driver is received, and the write command is interpreted to obtain the logical volume number and logical volume address of the write target (step 4101). Next, it is determined whether or not there is a cache hit (step 4102). Specifically, the cache directory is referenced, and an entry corresponding to the logical volume number and logical volume address is searched for in the cache directory. If there is an entry (hit), the cache address is referenced from the entry, the branch proceeds to Yes, and the data is stored in the cache (step 4104). At this time, the cache data update process described later is called with the non-volatile necessity set to "necessary". Next, the corresponding cache directory is updated (step 4105). At this time, since the cache directory is one of the control information, the control information update process described later is called. At this time, the non-volatile necessity is set to "necessary" and called in the same manner as the cache data update. Next, the control information confirmation process described later is called (step 4106). Finally, a write success is responded to the host (step 4107).
[0036] In the case of a cache miss, the process branches to No and a cache segment is secured (4103). The cache segment is secured by calling the control information update process. At this time, the non-volatile status is set to "Yes." After that, the process proceeds to step 4104, and the subsequent steps are the same as in the case of a hit.
[0037] 12 is a flowchart of the asynchronous destage process. The asynchronous destage process searches the cache directory for an entry whose attribute is "dirty" (step 4201), and ends if there is no such entry (branch No). If there is an entry that is dirty (branch Yes), the destage process is executed for that cache segment (step 4203). The destaging process is executed by the storage control unit and the data protection control unit, and writes data corresponding to the logical volume number / logical volume address to a permanent area on the storage device. In this destaging, various storage functions, such as a thin provisioning function, a snapshot function, and a data redundancy function, are provided. For example, the thin provisioning function dynamically allocates capacity at a fixed size according to writing, and generates a logical-physical conversion address that associates logical space with physical space. The snapshot function virtually saves data at a certain point in time (this is called a snapshot image), and when an update occurs, stores only the updated area in a separate area, and generates a logical-physical conversion address from the logical space of the snapshot image to the physical space of the separate area for referencing the snapshot image. In addition, the data redundancy function uses technologies such as mirroring and EC (Erasure Coding) to make data redundant, so it protects data by creating a copy of the data and storing it in another node, or by creating a redundant code (parity) from the data and storing it in another node. The thin provisioning and snapshot functions are provided by the storage control unit. The data redundancy function is provided by the data protection unit. After the destage process, the entry is deleted from the cache directory (step 4204). At this time, since this is a cache directory update, the control information update process is called with non-volatilization required set to required and updated. Next, the user data cache log is invalidated (step 4205). This process searches the cache data log header management table and invalidates the user data cache log in the same address range as the data destaged in this process.
[0038] Fig. 13 is a flowchart of the control information update process. The control information update process is called when updating control information in memory. When called, the memory address and size for identifying the control information to be updated, the update value, and information indicating whether non-volatilization is required are passed.
[0039] First, the control information in the memory is updated (step 4301). Next, the passed non-volatilization necessity is referenced to determine whether or not non-volatilization is necessary (step 4302). Only if necessary, the log creation process is called (4303).
[0040] FIG. 14 is a flowchart of the cache data update process. Steps 4401 to 4403 are the same as steps 4301 to 4303, except that the update target is cache data, not control information. In the cache data update process, unlike the control information update process, when it is determined in step 4402 that non-volatilization is required, steps 4404 to 4406 are added. First, it is determined whether or not to overwrite (step 4404). That is, the cache data log header management table is referenced to search for a log with the same address, and if there is, it is determined that it should be overwritten. Only if it is an overwrite, is the log with the same address in the log header management table invalidated (the valid flag is set to "invalid"). Finally, the log header of the log created in step 4403 is added to the log header management table (step 4406).
[0041] 15 is a flowchart of the log creation process. In this process, the "log buffer" indicates the control information log buffer when the update target is control information, and indicates the user data cache log buffer when the update target is a user data cache.
[0042] First, a log sequence number is determined (step 4501). Log sequence numbers are assigned in the order in which logs are created, and one log sequence number always corresponds to one log. Next, an area for writing the next log is secured in the log buffer (step 4502).
[0043] The log creation process may be performed by multiple processes operating in parallel, but in that case, exclusive control must be exercised to prevent different processes from acquiring the same log sequence number and from reserving the same log buffer area.
[0044] Next, a log header is created (step 4503). The above-mentioned log sequence number is stored in the sequence number field of the log header, and the update address field and update size field store the values of the update target address and update size in memory passed to this log creation process. The information type field stores "control information" when control information is updated, and "cache data" when cache data is updated.
[0045] Next, the log is stored in the log buffer (step 4504). The log consists of a log header and the data to be updated itself, and the log header is stored at the beginning of the reserved area previously reserved in the log buffer, and the update data itself is stored at a memory address obtained by adding the log header size to the reserved area. Finally, the log valid flag in the log header is set to "valid" (step 4505), and this process ends.
[0046] The control information determination process is shown in Fig. 16. This process simply calls the log save process (step 4601). The flow of the log backup process is shown in Fig. 17. First, the log buffer is referenced and any unsaved logs are read (step 4701). Next, the unsaved logs are stored in the log area on the storage device (step 4702). The write position is immediately after the last log written. When the writing is completed, the log is deleted from the log buffer in memory (step 4703).
[0047] FIG. 18 shows the processing sequence of the base image backup process. This process is executed asynchronously. It may also be called when it is detected that the free space in the control information log area is running low. First, the sequence number is referenced (step 4801). This process is the same as allocating the sequence number in the log creation process. Next, the entire control information is written to the base image area on the storage device (step 4802). Once this is completed, old logs are invalidated (step 4803). Old logs are logs with sequence numbers lower than the sequence number referenced in step 4801. Specifically, the "validity flag" of those logs on the storage device may be set to "invalid", or the number referenced in step 4801 may be stored on the storage device as the "base image backup sequence number".
[0048] FIG. 19 shows the cache data log garbage collection process. First, it is determined whether the free space of the cache data log is equal to or smaller than a threshold (step 4901). If it is not equal to or smaller than the threshold, the process ends without doing anything. If it is equal to or smaller than the threshold, the process refers to the cache log header management table in memory, searches forward from the oldest cache log header (the one with the smallest log sequence number) to find the oldest valid log whose valid flag value is "valid" (step 4902). Once the oldest valid log in the cache data log area is identified, a new log is created for the data pointed to by that log (step 4903). At this time, a new sequence number may be allocated and reassigned. Next, the save process is called to write this log to the storage device (step 4904), and the area in the log area that contains this log and has a smaller address than this log is reclaimed as a log free area (step 4905).
[0049] FIG. 20 is a flowchart of the log recovery process. This function is called before the storage control unit starts when rebooting after a power outage. First, the base image is read from the base image area on the storage device (step 41001). Next, the control information log and cache data log are sorted according to sequence number, and arranged from the oldest log (log with the smallest sequence number) to the newest log (log with the largest sequence number) (step 41002). After that, the oldest log to the newest log are reflected in that order in the control information and cache data areas in memory based on the log addresses (step 41003). This completes the recovery of the control information / cache data after a power outage.
[0050] In this embodiment, the base image saving method is applied to the control information, and the cache data garbage collection method is applied to the cache data area, so that both methods are used selectively. The base image backup method does not require management of the validity / invalidity of each log, but instead backs up all the target areas regardless of whether they have been updated, so the amount of copying required for each backup is large. Therefore, it is suitable for information where it takes a relatively long time for the free space in the log area to be filled, in other words, where the size of the update logs is small.
[0051] On the other hand, the garbage collection method copies only old valid logs, so the amount of copying is small. However, since it has to manage valid / invalid on a log-by-log basis, it is suitable for a small number of logs, i.e., information that is updated relatively infrequently.
[0052] From this perspective, the base image backup method is suitable for control information, as it is characterized by a small update granularity and high update frequency. On the other hand, the cache data area is updated less frequently (in most cases cache data is updated once per I / O), but the size of each update is large. Therefore, the garbage collection method is suitable for cache data. By using both methods appropriately, the size of the log management information can be reduced while also reducing the amount of copying required for free space recovery, achieving low overhead.
[0053] Furthermore, in this embodiment, when updating cache data or the cache directory, the non-volatile necessity is set to "not required" for read processing, and to "required" for write processing, and the log creation process is then called. Since the data to be stored in the cache data during read processing is the same data on the storage device, even if it is lost due to a power outage, it can be staged again, so there is no problem. Furthermore, since there is no overhead for creating and saving logs during read processing, performance is improved. EXAMPLES
[0054] Next, a second embodiment will be described. FIG. 21 is a configuration diagram of a storage device, a base image area, and a log area according to the second embodiment. This embodiment is an example in which there are multiple control information log areas and cache data log areas on the storage device. For example, the control information log area may be in multiple of the storage devices and the cache data log area in the remaining storage device, or both may be in the previous storage device.
[0055] Fig. 22 shows the log save processing in this embodiment. The difference from Fig. 17 is that step 4711 is added after step 4701. Step 4711 is the determination of the destination storage device. A storage device to which the log is to be saved is selected from multiple storage devices. A round robin selection may be used, or the load on each storage device may be monitored to select the storage device with the smallest load. By writing logs to multiple storage devices in parallel, the write performance of the storage devices can be effectively utilized to speed up writing. The control information log and cache data log may be written to separate storage devices, and further, the control information log may be written to multiple storage devices, and the cache data log may be written to multiple storage devices.
[0056] Fig. 23 shows the base image backup process in this embodiment. The difference from Fig. 18 is that step 4811 / step 4812 are added after step 4801. In other words, the base image is divided and stored in base image areas on multiple storage devices. It may be simply divided by size (divided into fixed length or equal size), or the size of each division may be changed depending on the load or free space.
[0057] Fig. 24 shows the log recovery process in this embodiment. It differs from Fig. 20 in that step 41001 has been changed to step 41011, and step 41002 has been changed to step 41012, with each step having multiple read destination storage devices. In step 41011, the base images read from multiple devices are combined and processed as a single base image. In step 41012, the logs read from multiple storage devices are merged / sorted in the same manner as the control information logs / cache data logs. EXAMPLES
[0058] FIG. 25 shows a third embodiment of the present invention. The third embodiment is an example in which a compression function is supported. The compression function is one example of various functions supported by the storage control unit. The compression function reduces capacity consumption, saves disk capacity, and reduces disk costs by compressing and storing data received from the host using a data compression algorithm such as LZ4. In addition, although the compression process time increases, the data is processed in a reduced size after compression, so overall processing time can be expected to be shortened.
[0059] As shown in Figure 25, data received from the host is stored in the cache data area. The processing at this time is the same as the write processing shown in Figure 11, but it differs in that the data to be written to memory is compressed and metadata indicating the compressed data and its position is also written. At this time, the compressed data and metadata are written to the cache data area in an append format because, in the compression function, the size of the compressed data received from the host is indefinite (depending on the compression effect), and even if you try to overwrite the old data with compressed data, it may be larger than the old data and not be possible to replace it. Therefore, an append method is suitable, which always allocates new space for writing and releases the space for old data as free space. Also, because it is an append format, information (metadata) that indicates the storage location of the compressed data is required. This metadata is also stored in the cache data area. The compressed data and metadata stored in the cache data area are stored in a cache data log area on the disk in synchronization with the host I / O (that is, before returning a response to the host).
[0060] When storing cache data or control information in the log area, multiple logs stored in the log buffer can be written together in one disk write process ("bulk write") to increase processing efficiency and reduce the number of disk writes, improving performance. Also, because control information is smaller in size than data, it does not need to be compressed.
[0061] If more logs are to be consolidated in this consolidation, it may be possible to wait for more logs to accumulate in the log buffer before evacuating the logs, but this would result in a delay in the response to the host I / O due to a delay in the response of the control information confirmation process that is executed before the I / O response. To prevent this, the log evacuation process consolidates all the logs that have accumulated in the log buffer at the time it is called, and does not delay the log evacuation process. This method naturally increases the efficiency of consolidation when the I / O load on the storage is high and many logs are simultaneously accumulated in the log buffer, but at low loads, it does not delay the response to host I / O more than necessary, achieving both the high throughput performance required at high loads and the reduced response required at low loads.
[0062] The compressed data and metadata in the cache data area are written to a persistent area on disk asynchronously with the host I / O. This process is the asynchronous destaging process shown in Figure 12. At this time, just like writing to the cache data area, the destaging process also uses append-write format. In asynchronous destaging, adjacent data is bundled together and written in a single disk write process, improving processing efficiency, reducing the number of disk writes, and improving performance. This bulk writing is particularly easy for compressed data that uses append-write format. This is the same as when storing in the cache data log area mentioned above. Destaging involves more processing than log evacuation processing. As described in the description of FIG. 12, in the destage process executed by the data protection unit during the process, data can be made redundant by mirroring or erasure coding (EC).
[0063] FIG. 25 shows an example of EC, where parity data calculated with other data is stored in other nodes for redundancy. In this embodiment 3, it has been shown that processing efficiency can be improved by collectively writing control information and cache data logs in a log area, while at the same time reducing the number of disk writes and improving performance, and that in destaging as well, the collectively writing effect is enhanced, particularly in the compression function, and processing efficiency is improved, reducing the number of disk writes and improving performance. In addition, the compression function reduces the amount of data flowing to the disk compared to when it is not compressed, so the reduced amount of data flowing to the disk allows the disk to be used more efficiently, which also has the effect of improving performance.
[0064] As described above, the disclosed storage system 100 includes a storage control unit 1083 as a storage controller that controls reading and writing for a drive 1033 as a storage having a non-volatile storage device, and when the storage controller performs the reading and writing, it generates a log and stores it in a memory 1032 which is a log memory, and writes the log stored in the memory to the storage device, and the log includes a control information log and a cache data log, and when the log is generated, the generated control information log is stored in the log memory and written collectively to the storage device in memory area units having multiple control information logs, the generated cache data log is stored in the log memory, and the cache data in the log memory is compressed and written to the storage device. In addition, when recovering free space in the memory, the storage controller uses a base image backup method in which free space is recovered by writing to the storage device in units of storage areas having multiple logs, and a garbage collection method in which free space is recovered by writing to the storage device in units of logs. With such a configuration and operation, a storage system that combines high performance and reliability can be realized.
[0065] As an example, when the storage controller updates a log stored in the memory, it stores the updated log in a storage area separate from the storage area in which the pre-update log is stored and invalidates the pre-update log; in the base image backup method, it stores multiple non-invalidated logs in that storage area in the storage device and reclaims that storage area as free space; and in the garbage collection method, it asynchronously performs the process of reclaiming the storage area of the invalidated logs as free space and the process of storing the non-invalidated logs in the storage device and invalidating the logs in the storage area in which those logs were stored. In addition, the log includes a log of control information related to storage control and a log of user data related to the reading and writing, the control information log has a smaller update granularity than the user data log, the base image backup method is applied to the control information log, and the garbage collection method is applied to the user data log. This allows control information, cache data, and the like in the storage system 100 to be efficiently stored in storage devices, achieving high performance and reliability.
[0066] In addition, the storage controller manages the control information log and the user data log by attaching sequence control information indicating the processing sequence to the control information log and the user data log, thereby ensuring consistency in the sequence of the control information log and the user data log. Therefore, even if different management methods are used for the control information log and the user data log, consistency can be easily ensured.
[0067] In addition, in a log recovery process in which data is recovered from the log of the control information and the log of the user data, the storage controller recovers the control information using the base image backup method, and recovers the user data after reserving space in advance. This allows data recovery to be carried out efficiently.
[0068] Furthermore, the storage controller uses the base image save method for data whose update size is less than a predetermined value, and uses the garbage collection method for data whose update size is equal to or greater than the predetermined value. By adopting such an operation, free space can be efficiently managed according to the update size of data.
[0069] Moreover, the disclosed storage system 100 includes a plurality of the storage controllers, and has a configuration in which the storage controllers are made redundant. That is, in a storage system with redundant storage controllers, It efficiently stores information and cache data in storage devices, achieving high performance and reliability. do.
[0070] The present invention is not limited to the above-mentioned embodiment, and various modifications are included. For example, the above-mentioned embodiment is described in detail to easily explain the present invention, and is not necessarily limited to the embodiment having all the described configurations. Moreover, the present invention is not limited to the deletion of the configurations, and it is also possible to replace or add the configurations. For example, in the above embodiment, a configuration in which a sequence number is used as the sequence control information is exemplified, but a timestamp may be added to a log and the timestamp may be used as the sequence control information. Also, a pointer to the next log may be added and used as the sequence control information. Also, the sequence control information is not limited to being added to each log, but may be added to a certain range of logs. [Explanation of symbols]
[0071] 100: storage system, 101: host device, 102: network, 103: storage node, 104: management node, 1031: CPU, 1032: memory, 1033: drive, 1083: storage controller
Claims
1. a non-volatile storage device; a storage controller that processes data to be read from and written to the storage device using a storage function; A volatile memory; A storage system comprising: When the storage controller receives a data write request, storing data related to the received write request in the memory; storing a log related to the data stored in the memory in the storage device; After storing the log in the storage device, a completion response is sent to the source of the data write request; The data stored in the memory is processed using the storage function and destaged to the storage device; When data in the memory related to the write request is lost due to a power outage, the data in the memory is restored using the log stored in the storage medium. A storage system comprising:
2. 2. The storage system according to claim 1, Storing the log related to the data in the storage device is a process with a lighter load than destaging the data. A storage system comprising:
3. 3. The storage system according to claim 2, the log stored in the storage device is a log for restoring data in a memory, The destaging of data to the storage device is for the purpose of exerting the storage function and writing / updating data stored in the storage system. A storage system comprising:
4. 2. The storage system according to claim 1, When the data is destaged, a log in the storage device related to the destaged data is invalidated. A storage system comprising:
5. 5. The storage system according to claim 4, When data that updates data related to the log is written, the log in the storage device that is related to the data before the update is invalidated. A storage system comprising:
6. 2. The storage system according to claim 1, A plurality of the logs are stored in a plurality of the storage devices in parallel. A storage system comprising:
7. 6. The storage system according to claim 5, The storage controller, A storage system characterized by ensuring consistency in the order of control information logs and user data logs by managing the control information logs and user data logs with order control information indicating the order of processing.
8. 6. The storage system according to claim 5, compressing data related to the received write request and storing the data in the memory; storing the compressed log relating to the compressed data in the storage device; Destaging the compressed data. A storage system comprising:
9. 2. The storage system according to claim 1, The logs include a control information log and a cache data log; The control information log and the cache data log are collected separately, and the plurality of control information logs and the plurality of cache data logs are collected and stored in the storage device. A storage system comprising:
10. 10. The storage system according to claim 9, the cache data log is larger in size than the control information log; compressing the cache data log and storing it in the storage device; The control information log is stored in the storage device without being compressed. A storage system comprising:
11. 10. The storage system according to claim 9, The storage controller, A storage system characterized in that, when recovering the capacity of the memory storage area in which the logs written out to the storage device were stored, a base image evacuation method is used for the control information log, in which the control information log is written out to the storage device in units of storage areas each having multiple logs, thereby recovering the free space, and a garbage collection method is used for the cache data log, in which the cache data log is written out to the storage device in units of logs, thereby recovering the free space.
12. 12. The storage system according to claim 11, The storage controller, When updating the log, a post-update log is stored in a storage area different from a storage area in which the pre-update log is stored, and the pre-update log is invalidated; In the base image backup method, a plurality of logs that have not been invalidated in the storage area are stored in the storage device, and the storage area is reclaimed as free space; The garbage collection method asynchronously performs a process of recovering the storage area of the invalidated logs as free space, and a process of storing logs that have not been invalidated in the storage device and invalidating the logs in the storage area in which those logs were stored. A storage system comprising:
13. A storage control method in a storage system including a non-volatile storage device, a storage controller that processes data to be read from and written to the storage device using a storage function, and a volatile memory, comprising: The storage controller, When a data write request is received, storing data related to the received write request in the memory; storing a log related to the data stored in the memory in the storage device; After storing the log in the storage device, a completion response is sent to the source of the data write request; The data stored in the memory is processed using the storage function and destaged to the storage device; When data in the memory related to the write request is lost due to a power outage, the data in the memory is restored using the log stored in the storage medium. A storage control method comprising:
Citation Information
Patent Citations
File system with file management function and file management method
JP2006106868A
Storage system and method for controlling owner rights in a storage system
JP2013517537A
Information processor, information processing method and program
JP2016133976A
Information processing device, information processing system, and program
JP2017162288A
Page cache write logging in block-based storage
JP2017515193A
