Storage system and data protection method
The storage system enhances performance and reliability by using memory replication and log saving methods to manage cache data protection, addressing the degradation issues in write-through methods during controller failures.
Patent Information
- Application Number
- JP2023032035
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2024-09-12
- Estimated Expiration
- 2043-03-02
AI Technical Summary
The performance of storage systems degrades significantly when operating in the write-through method due to controller failure, especially with data protection methods like RAID6, which require multiple drive accesses, leading to prolonged write response times.
A storage system with nonvolatile storage devices and multiple controllers that employ memory replication and log saving methods to protect cache data, switching between these methods based on controller status, ensuring high reliability and performance by minimizing drive accesses.
The system achieves high performance and reliability by reducing drive access times and data loss through efficient data protection and recovery mechanisms, even in controller failure scenarios.
Smart Images

Figure 2024124097000001
Abstract
Description
[Technical field]
[0001] The present invention relates to a storage system and a data protection method. [Background technology]
[0002] A storage system records write data received from a host in a drive via a cache memory (hereafter referred to as cache). In other words, write data requested to be written by the host is temporarily stored in the cache, and then written to a specified drive. Methods for writing data from the cache to a drive can be broadly divided into two types.
[0003] One method is, for example, a write-through method, in which write data is written to the drive before a response to the write request is returned to the host. Another method is, for example, a write-back method or write-after method, in which a response to a write request is returned to the host at the time the write data is stored in the cache. In the case of the write-back method, the write data is written to the drive at a predetermined timing after the write data is stored in the cache.
[0004] Therefore, in the case of the write-back method, a response can be returned to the host without waiting for the write to the drive to be completed, so the response time can be shortened compared to the write-through method. On the other hand, in the case of the write-back method, data that has been written from the host only exists temporarily in the cache. Therefore, the write data in the cache must be properly protected; for example, a storage system has a redundant configuration with multiple controllers, and write data received by one controller is copied to the cache of another controller to ensure redundancy of the write data. Also, to prepare for power outages and power failures, the cache is protected by a battery, for example.
[0005] Storage systems are required to achieve both high reliability and high performance. To achieve this, storage systems can use the above-mentioned write-through and write-back methods depending on the situation, and as described in Patent Document 1, a method of using them is known in which the write-back method is used when the cache can be properly protected, and the write-through method is switched to when the cache cannot be protected. In this way, high-speed responses can be returned using the write-back method under normal circumstances, and reliability can be ensured using the write-through method even if, for example, the controller breaks down and cache redundancy is lost. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Publication No. 6-309232 Summary of the Invention [Problem to be solved by the invention]
[0007] However, the problem with the above conventional method is that when the write-through method is used due to a controller failure or other reason, performance drops significantly compared to normal performance when the write-back method is used. In particular, data protection methods such as RAID6 have become common in recent storage systems, and in order to store write data on a drive, it becomes necessary to read multiple data (old data and multiple pieces of protection data such as parity data) from the drive, update the parity data, and then write the write data and multiple pieces of parity data to the drive. Waiting for these multiple drive accesses significantly worsens the write response time compared to the write-back method.
[0008] An object of the present invention is to ensure high reliability in a storage system while improving performance when cache redundancy is lost due to a controller failure or the like, compared to the write-through method. [Means for solving the problem]
[0009] In order to solve the above problems, a storage system according to the present invention is a storage system comprising a non-volatile storage device and a plurality of storage controllers that control reading and writing to the storage device, wherein the storage device is a drive for storing user data, and each of the plurality of storage controllers has a processor and a memory, and the storage controller comprises a first memory protection method of a memory duplication method in which data in the memory is duplicated on a memory of a corresponding storage controller, and a second memory protection method of a log evacuation method in which a log relating to updates to data in the memory is generated and written to a non-volatile medium, and the storage controller stores a write request from a host to the storage device as cache data in the memory, and after protecting the cache data with the first memory protection method or the second memory protection method, returns a write completion response to the host, and destages the cache data to the storage drive after the write response is completed, and the storage controller switches between using either the first memory protection method or the second memory protection method depending on the operating state of another storage controller. Furthermore, a data protection method according to the present invention is a data protection method for a storage system including a non-volatile storage device and a plurality of storage controllers that control reading and writing to the storage device, wherein the storage device is a drive for storing user data, each of the plurality of storage controllers has a processor and a memory, and the storage controller includes a first memory protection method of a memory replication method in which data in the memory is replicated on a memory of a corresponding storage controller, and a second memory protection method of a log evacuation method in which a log relating to updates to the data in the memory is generated and written to a non-volatile medium, the data protection method including a step of the storage controller storing a write request from a host to the storage device as cache data in the memory, a step of the storage controller protecting the cache data by the first memory protection method or the second memory protection method, a step of the storage controller returning a write completion response to the host, and a step of the storage controller destaging the cache data to the storage drive after the write response is completed, and further including a step of the storage controller switching between the first memory protection method and the second memory protection method depending on the operating state of another storage controller. Effect of the Invention
[0010] According to the present invention, it is possible to realize a storage system and a data protection method that combine high performance and high reliability. [Brief description of the drawings]
[0011] [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] Diagram showing the write operation when both controllers are normal [Diagram 3] Diagram showing the outline of write operation when one controller is blocked [Figure 4] Diagram outlining the distinction between dirty data [Diagram 5] Diagram showing the contents of the storage controller memory [Figure 6] Write process flowchart [Figure 7] Flowchart of memory protection method switching process when one controller fails [Figure 8] Flowchart of memory protection method switching process when controller recovers [Figure 9] Destage process flowchart [Figure 10] Flowchart of destage target dirty selection process [Figure 11] Flowchart of control information update process [Figure 12] Flowchart of cache data update process [Figure 13] Log creation process flowchart [Figure 14] Log backup process flowchart [Figure 15] Flowchart of base image backup process [Figure 16] Log recovery process flowchart [Figure 17] FIG. 2 is a diagram showing the configuration of a storage system according to a second embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The embodiment relates to a storage system including, for example, a plurality of storage controllers. EXAMPLES
[0013] FIG. 1 is a diagram showing an example of the configuration of a storage system according to this embodiment of the present invention. The storage system 100 of this embodiment includes a plurality of controllers 103 and a drive 110 which is a storage device. The controller 103 is a device having a function of providing a volume to be read and written to a host computer (hereinafter referred to as a host). The controller 103 includes a CPU 106, a memory 105, a memory backup drive 107, a front-end interface (FE I / F) 104, and a back-end interface (BE I / F) 108. The drive is, for example, a solid state drive (SSD) using a flash memory as a storage medium, or a hard disk drive (HDD) using a magnetic disk as a storage medium. The memory is, for example, a semiconductor memory such as a DRAM. The memory backup drive is, for example, a drive such as an SSD, and is used to save the contents of the memory when, for example, an external power supply is lost. The FE I / F is, for example, a Fibre Channel host bus adapter (HBA) or a network interface controller (NIC). The BE I / F is, for example, a SAS HBA or a PCI Express (hereinafter, PCIe) adapter or NIC. Each controller and drive are connected, for example, by a switch (BE Switch) 109. Furthermore, the CPUs of multiple controllers are connected to each other by an interconnect such as PCIe. Note that the CPUs may be connected to each other, for example, via a PCIe switch. The storage system is connected to a storage area network (SAN) 101 such as Fibre Channel or Ethernet, and the host 102 is also connected to the SAN 101. The SAN 101 may include a switch or the like. Furthermore, multiple hosts may be connected to the SAN 101.
[0014] 2 is a diagram showing an outline of a write operation when both controllers are normal. In this embodiment, the CPU 106 of the controller 103 receives a write request from the host 102, receives data from the host, and writes the data 201 to the memory 105 in its own controller and to the memory 105 of the other controller. The CPU 106 also updates the control information (Metadata) 200 in the memory. The CPU 106 then returns a write completion response to the host 102. Although not shown in the figure, the CPU 106 also writes the write data written in the memory to the drive at a predetermined timing. In this write operation, the write data and control information in the memory are duplicated between the controllers to protect against controller failure.
[0015] FIG. 3 is a diagram showing an outline of a write operation when one controller of the storage system of this embodiment is blocked. The CPU 106 of the controller 103 of this embodiment receives a write request from the host 102, receives data from the host, and writes the data 201 to the memory 105 in its own controller. The CPU 106 also updates the control information (Metadata) 200 in the memory. The CPU 106 also writes the updated data to the memory backup drive 107 as a log, and also writes the updated control information to the memory backup drive 107 as a log (log evacuation). Then, the CPU 106 returns a write completion response to the host 102. Although not shown in the figure, the CPU 106 writes the write data written on the memory to the drive at a predetermined timing (destaging). In this embodiment, the data and control information logs are described as being stored in the memory backup drive 107, but these logs may be recorded, for example, in a drive for storing user data, or in a separate drive for storing logs.
[0016] In this write operation, the write data and control information in memory are written as a log to the memory backup drive in case the remaining controller fails. If the remaining controller fails, the storage system will temporarily stop (system down), but data loss can be prevented by replacing the controller and then recovering the write data and control information in memory using the log written to the memory backup drive. To prevent confusion in the following explanation, the difference between destaging and log evacuation will be clarified here. Destaging is writing dirty data in the cache to the final storage area of the user data storage drive, which is the final storage medium. Data is stored in the user data storage drive with enhanced data protection, capacity efficiency, I / O performance, etc., using the storage functions provided by the storage system (mainly the controller). For example, data is protected by a method such as RAID6, in which case parity data is generated in the destaging process and is also written to the drive. Once destaging is complete, the data in memory and the data on the drive match (clean), so there is no problem if the data is lost from memory. On the other hand, log evacuation refers to temporarily writing the updated contents of data and control information in memory to a non-volatile storage medium (drive) such as a memory backup drive in preparation for the unlikely event of a controller failure. As mentioned above, once the destaging of the dirty data written to the drive as a log is complete, there is no problem even if the dirty data is lost from memory, so the log can be deleted from the drive when destaging is complete.
[0017] In this embodiment, when the memory backup drive 107 is used for storing logs, the area allocated for saving the memory contents when both controllers are normal may be used as an area for storing logs when one controller is blocked. This eliminates the need for an additional drive or additional storage capacity for storing logs, which is more cost-effective than storing logs on a user data drive or installing a separate drive for storing logs.
[0018] By the way, the log containing the update contents of the cache data (cache data log) is relatively large in granularity because data written from the host is generally handled in block units such as 512 Bytes or 4 KiB, whereas the log containing the update contents of the control information (control information log) is relatively small in granularity because the control information is handled in byte units. Also, the proportion of the cache data area in the entire memory is relatively large. Therefore, for the control information log, the entire memory area storing the control information (base image) is periodically written to the drive, all logs written before that are discarded, and the area where the log was written is reclaimed as free space. This method is called the base image evacuation method. On the other hand, for the cache data log, unnecessary logs that are not the latest among the logs are identified and discarded (invalidated). This creates scattered free space in the log area, so continuous free space is reclaimed by writing only valid logs to another area at a specified timing, starting from the front. This method is called the garbage collection method. By using these two methods appropriately, it is possible to reduce the amount of management information for managing free space while suppressing the capacity consumption for saving the base image, and also to reduce the overhead for recovering free space.
[0019] FIG. 4 is a diagram showing an overview of how dirty data is classified in the storage system of this embodiment. If one of the controllers fails during the operation of the storage system, and write data (dirty data) that has not been stored in the drive remains in memory, if the remaining controller also fails, the dirty data will be lost. This means that data that has been written to the storage system (write completion response has been received) will be lost, which is a serious problem in a storage system that requires high reliability. Therefore, in order to increase the reliability of the storage system, when one of the controllers fails, it is important to write the dirty data in memory to the storage device as quickly as possible. However, the performance of the storage device that stores the dirty data as a log may become a bottleneck, and it may take a long time to write the dirty data. This can be a problem especially in a storage system configured to store logs in a small number of storage devices. Therefore, in the storage system according to the present invention, a distinction is made between dirty data (existing dirty) that exists in memory at the time one of the controllers fails and dirty data (new dirty) that is created after the other controller fails, and the new dirty data is written as a log to the log storage device, while the existing dirty data is written to the user data drive. This avoids or alleviates the bottleneck in the log storage device, shortens the time required to evacuate dirty data, reduces the probability of data loss, and increases reliability. Specifically, in this embodiment, two types of dirty queues, a log-protected dirty queue 400 and a non-log-protected dirty queue 401, are provided in memory, and new dirty queues are connected to the log-protected dirty queue and existing dirty queues are connected to the non-log-protected dirty queue.
[0020] Since the dirty data connected to the log-protected dirty queue is stored in the memory backup drive 107 as a log before the host response, in the destage process for writing the dirty data to the user data drive, the dirty data connected to the non-log-protected dirty queue is preferentially selected as the destage target and written to the drive. The contents of this destage process will be described later using a flowchart.
[0021] In this embodiment, two types of dirty queues are used to distinguish between the different dirty data, but the number of types of dirty queues may be greater. Also, the method of distinguishing between dirty data is not limited to using multiple dirty queues, and may be managed using a data structure such as a list, or a method of distinguishing between dirty data by having identification information such as a flag in the cache control information.
[0022] FIG. 5 is a diagram showing the contents of the memory of the storage system of this embodiment. The memory 105 contains a storage control program 500 , control information 200 , cache data 501 , a control information log buffer 502 , and a cache data log buffer 503 .
[0023] The storage control program 500 is a program for controlling the storage system, and is executed by the CPU 106. Each process, such as a write process described later, is included in the contents of this storage control program.
[0024] The control information 200 is data used by the storage control program 500 to control the execution of the program. The control information 200 includes, for example, cache control information including the correspondence between the address of the cache data and the logical address (LBA) in the volume, the state of the cache data (dirty / clean), configuration information including the type and capacity of the drive and the type and configuration of the RAID group, the state of each controller (normal / blocked, etc.), etc. The dirty queue mentioned above also belongs to the cache control information of this control information 200.
[0025] Incidentally, when updating control information or cache data in memory when one controller is blocked, logs relating to the contents do not necessarily have to be written individually to the drive (memory backup drive 107) one by one, and may be written together in a continuous area on the drive (memory backup drive 107). However, for example, before returning a write completion response to the host, the cache data and control information updated by the write process are written to the drive (memory backup drive 107), thereby preventing the write-completed data from being lost due to a controller failure. The control information log buffer 502 and the cache data log buffer 503 are buffers for temporarily storing logs in memory in this way, and temporarily store the control information log and the cache data log, respectively.
[0026] FIG. 6 is a flowchart of a write process in the storage system of this embodiment, and the CPU 106 executes this process. First, the CPU 106 performs cache allocation (600). Cache allocation refers to allocating a portion of the memory area for storing cache data for I / O processing, etc. In this case, an area of sufficient size to store the write data sent from the host is allocated.
[0027] Next, the CPU 106 performs a cache data update process (601). The contents of the cache data update process will be described later, but in short, it is a process of receiving data from the host and storing that data in the cache area previously allocated.
[0028] Next, CPU 106 judges whether the other controller is blocked (602). If it is blocked (Yes), the cache data duplication process is skipped, and if it is not blocked (No), that is, if both controllers are operating, cache data duplication is performed (603). Cache data duplication is a process of copying data received from the host to the memory of the other controller, and for example, data is copied from the memory of the own controller to the memory of the other controller using a DMA built into CPU 106.
[0029] Next, the CPU 106 performs a control information update process (604). The details of the control information update process will be described later.
[0030] Next, the CPU 106 judges whether the log save mode is selected (605). If the log save mode is selected (Yes), the log save process is performed (606). If the log save mode is not selected (No), the log save process is skipped. The details of the log save process will be described later. After completing the above process, the CPU 106 notifies the host that the write process is complete (607). This completes the write process.
[0031] 7 is a flowchart of the memory protection method switching process when one of the controllers fails in the storage system of this embodiment. This process is executed to switch the memory protection method from dual-controller system to log-based protection when it is detected that the other controller has been blocked due to a failure or the like.
[0032] First, the CPU 106 judges whether or not there is only one normal controller remaining in the system (i.e., only the own controller) (700). If there is only one remaining controller (Yes), the process proceeds to step 701, and if there is not only one remaining controller (No), the process skips all remaining steps and ends this process.
[0033] Next, the CPU 106 sets the emergency destage flag to ON (701). This changes the operation of the destage process, which will be described later. Also, while the emergency destage flag is ON, the CPU 106 increases the frequency of execution of the destage process in order to store dirty data in the drive as quickly as possible.
[0034] Next, the CPU 106 sets the log save mode flag to ON (702), which causes the CPU 106 to create a log when updating the memory. Finally, the CPU 106 executes a base image save process (703), the details of which will be described later. This completes the memory protection method switching process when one of the controllers fails.
[0035] 8 is a flowchart of the memory protection method switching process when a controller recovers in the storage system of this embodiment. This process is executed to switch (return) the memory protection method from log-based protection to inter-controller duplication when it is detected that another controller has recovered due to maintenance replacement or the like and is now able to operate normally.
[0036] First, the CPU 106 performs a control information duplication process (800). This is a process of copying the control information in the memory to the memory of the recovered controller. When all the control information has been copied, the process is complete.
[0037] Next, the CPU 106 performs a duplication process for the dirty data (801). This is a process for copying the dirty data in the memory to the memory of the recovered controller. In addition, each time a piece of dirty data is copied, the cache control information for that dirty data is updated. When all the dirty data has been copied, the process is complete. Note that instead of copying the dirty data to another controller as in this embodiment, a method of protecting the dirty data by destaging it to a drive may be adopted.
[0038] Next, the CPU 106 sets the log save mode flag to OFF (802), so that subsequent memory updates will not be saved to the drive as logs.
[0039] Finally, the CPU 106 performs a log deletion process (803). This is a process for deleting all logs written in the log storage drive (memory backup drive 107) and logs in the log buffer. For example, the logs stored in the drive or memory may be overwritten with invalid data such as all zeros, or all logs may be invalidated by turning off the valid flags in all log headers. This completes the memory protection method switching process when the controller recovers.
[0040] FIG. 9 is a flowchart of the destage process in the storage system of this embodiment. This destage process is started at a predetermined timing when dirty data exists in memory. The frequency of starting the destage process is adjusted according to the amount of dirty data and the state of the storage system. For example, the more dirty data there is, the higher the frequency of starting. Also, when one of the controllers is blocked and there is dirty data that is not stored in the drive and is not subject to log protection, the destage process is started with particularly high frequency.
[0041] In the destage process, the CPU 106 first selects data to be destaged (900). The details of this process will be described later. Once the data to be destaged has been determined, the CPU 106 then determines whether or not all stripe writes can be executed (901). This is, for example, a determination as to whether or not all data for one stripe in a data protection method such as RAID5 or RAID6 exists in the cache. If data for one stripe is available in the cache, new parity data can be generated without reading old data or old parity data from the drive. Therefore, if all stripe writes cannot be executed (No), the CPU 106 reads old data and old parity data required for parity update from the drive (902), and if all stripe writes can be executed (Yes), the CPU 106 skips this process.
[0042] Next, the CPU 106 generates new parity data (903) and writes the data and the parity data to the drive (904). Next, the CPU 106 performs a control information update process to delete the cache (905). In this process, the cache control information is updated and the memory allocation of the cache data for which destaging has been completed is released. Alternatively, identification information such as a flag indicating a dirty state may be turned OFF, and the cache data may be left in memory as clean cache data (whose contents match the data on the drive). The contents of the control information update process will be described later.
[0043] Next, if there are no more dirty queues not subject to log protection, the CPU 106 sets the emergency destage flag to OFF (906). Finally, the CPU 106 invalidates the user data cache log related to the destaged dirty data (907). This completes the destage process.
[0044] FIG. 10 is a flowchart of the destage target dirty selection process in the storage system of this embodiment. First, the CPU 106 judges whether the system is in the log evacuation mode (1000). Information indicating the log evacuation mode is held, for example, as a flag in the control information in the memory, and the CPU 106 judges the mode by referring to this information. If the system is in the log evacuation mode (Yes), the process proceeds to step 1001, and if the system is not in the log evacuation mode (No), the process proceeds to step 1003. In step 1001, the CPU 106 judges whether the system is in an emergency destage. Information indicating that an emergency destage is in progress is also held, for example, as a flag in the control information in the memory. If the system is in an emergency destage mode (Yes), the CPU 106 proceeds to step 1003, and if the system is not in an emergency destage mode (No), the CPU 106 proceeds to step 1002. In step 1002, the CPU 106 selects dirty data to be destaged from the dirty queue to be protected by log protection. Specifically, for example, the CPU 106 takes out dirty data from the head of the dirty queue (dequeues) and sets the dirty data to be destaged. On the other hand, in step 1003, the CPU 106 selects dirty data to be destaged from the dirty queue not to be protected by log protection.
[0045] FIG. 11 is a flowchart of the control information update process in the storage system of this embodiment. First, the CPU 106 updates the control information in the memory (1100). Next, the CPU 106 determines whether non-volatilization is required (1101). If non-volatilization is required (Yes), a log creation process is performed (1102), and if not required (No), the process is skipped. The details of the log creation process will be described later. This completes the control information update process.
[0046] FIG. 12 is a flowchart of the cache data update process in the storage system of this embodiment. First, the CPU 106 updates the cache data in the memory (1200). Specifically, for example, the data received from the host is written to a cache area already allocated in the memory. Next, the CPU 106 determines whether non-volatilization is required (1201). If non-volatilization is required (Yes), the process proceeds to step 1202, and if not required (No), the process skips the subsequent steps and ends the cache data update process. Step 1202 is a log creation process. This process creates a log related to the updated cache data, and the details will be described later.
[0047] Next, the CPU 106 judges whether the current cache data update is an overwrite (1203). That is, it checks whether a log related to the cache data update in the address range included in the range of the currently updated cache area (this is called the "log of the same address") exists among the existing logs, and if so, it is judged to be an overwrite. If it is an overwrite (Yes), the log of the same address written in the log header table is invalidated (1204), and if it is not an overwrite (No), this process is skipped. Finally, the CPU 106 updates the log header table (1205). This completes the cache data update process.
[0048] FIG. 13 is a flowchart of the log creation process in the storage system of this embodiment. First, the CPU 106 allocates a sequence number (1300). The sequence number is a number that indicates the order in which the logs were created, and the value is incremented by one each time a new log is created.
[0049] Next, the CPU 106 secures a log buffer for temporarily storing the log (1301). Specifically, if the data to be stored in the log is control information, an area of a size necessary to store the log to be created is allocated from the control information log buffer, and if the data is cache data, an area of a size necessary to store the log to be created is allocated from the cache data log buffer.
[0050] Next, the CPU 106 creates a log header (1302). The log header includes a sequence number, the address of the target data in memory, the size of the target data, etc. Next, the CPU 106 stores the log data in a log buffer (1303).
[0051] Finally, the CPU 106 performs a process to enable the created log (1304). Specifically, for example, a flag indicating whether the log is enabled or disabled is included in the log header, and the log is enabled by turning this flag ON. This completes the log creation process.
[0052] FIG. 14 is a flowchart of the log evacuation process in the storage system of this embodiment. The log evacuation process is a process for writing logs accumulated in the log buffer to the drive, and is called when it becomes necessary to write logs to the drive, just as it was called before the host response in the write process flowchart described above.
[0053] First, the CPU 106 retrieves unsaved logs, that is, logs that have not yet been written to the log storage drive, from the log buffer in the memory 105 (1400). Next, the CPU 106 writes the log in question to a log storage drive (memory backup drive 107) (1401). When the writing is completed, the CPU 106 deletes the written log from the log buffer (1402). This completes the log save processing.
[0054] FIG. 15 is a flowchart of the base image backup process in the storage system of this embodiment. As mentioned earlier, base image processing is a process in which the entire memory area to be protected is written to the drive, and in this embodiment it is used to protect control information and is executed at a predetermined timing, for example when a certain amount of control information logs has accumulated on the drive.
[0055] First, the CPU 106 refers to the sequence number and stores the latest sequence number at the current time (1500). Next, the CPU 106 writes the entire base image in memory to the drive (1501). When this process is complete, the old logs are no longer necessary, so the CPU 106 then invalidates (1502) all logs prior to the sequence number secured (stored) in step 1500. This completes the base image backup process.
[0056] FIG. 16 is a flowchart of the log recovery process in the storage system of this embodiment. This process is executed during the process of starting up the system after maintenance and replacement work on the controllers, etc. has been performed following a system downtime due to the blockage of both controllers, and this process recovers the control information and dirty data that were stored in the memory before the system went down. This process is executed by the CPU 106 of a specified controller in the system before the acceptance of I / O is resumed.
[0057] First, the CPU 106 reads the base image from the base image area on the log storage drive, and stores it in the control information area on the memory (1600). Next, the CPU 106 reads the control information log and cache data log from the log storage drive and sorts them in order according to the sequence numbers (1601).Then, the contents of the logs from the oldest to the newest are reflected in that order in the control information and cache data areas in memory according to the address information written in the log header (1602).This completes the log recovery process. EXAMPLES
[0058] Next, a second embodiment will be described. FIG. 17 is a diagram illustrating an example of the configuration of a storage system according to this embodiment. The storage system 100 of this embodiment includes a plurality of controllers 103 and drives 110 which are storage devices, and each controller and drive are connected, for example, by a switch (BE Switch) 109. Furthermore, each controller 103 is connected to an interconnect switch 1701, and can communicate with each other. The interconnect switch is, for example, a PCIe switch, an Ethernet switch, an Infiniband switch, or the like.
[0059] The controller of this embodiment includes a CPU, memory, memory backup drive, front-end interface, and back-end interface, similar to the controller of the first embodiment, but these are omitted from the drawing.
[0060] In addition, although the diagram shows an example of a configuration in which two controllers are mounted in one controller enclosure, the configuration for implementing the present invention is not necessarily limited to this configuration. For example, each controller may be in an independent housing, or three or more controllers may be mounted in one controller enclosure.
[0061] Also, in this drawing, a configuration including four controllers in one storage system is exemplified, but in this embodiment, the number of controllers may be three or more, and is not necessarily limited to a configuration of four.
[0062] The storage system is connected to a storage area network (SAN) 101, such as Fibre Channel or Ethernet, and a host computer (hereinafter referred to as a host) 102 is also connected to the SAN 101. The SAN 101 may include a switch, etc. Also, multiple hosts may be connected to the SAN 101.
[0063] As is clear from the figure, the main difference between the first embodiment and this embodiment is the number of controllers. In this embodiment, even if one of three or more controllers fails, data can be made redundant in the memory of the remaining two or more controllers. Therefore, in this embodiment, while there are two or more normal controllers, the system operates in the same manner as when both controllers are normal in embodiment 1, and control information and user data are made redundant between the memories of the controllers. Then, when only one normal controller remains, the system switches to log evacuation mode and operates in the same manner as when one controller is blocked in embodiment 1.
[0064] As described above, the disclosed storage system is a storage system including a drive 110 which is a non-volatile storage device, and a plurality of storage controllers 103 which control reading and writing to the storage device, the storage device being a drive for storing user data, the plurality of storage controllers 103 each including a processor (CPU 106) and a memory 105, the storage controller 103 including a first memory protection method of a memory duplication method in which data in the memory is duplicated in a memory of a corresponding storage controller, and a second memory protection method of a log evacuation method in which a log relating to updates to data in the memory is generated and written to a non-volatile medium, the storage controller stores a write request from a host to the storage device as cache data in the memory, protects the cache data using the first memory protection method or the second memory protection method, and then returns a write completion response to the host and destages the cache data to the storage drive after the write response is completed, and the storage controller switches between using either the first memory protection method or the second memory protection method depending on the operating state of another storage controller. Moreover, the storage controller is associated with another storage controller to form a redundant configuration, and is used as the first memory protection method, and is used as the second memory protection method when the corresponding storage controller is blocked. In this way, the storage controller recognizes the status of the other controllers in the system, and operates in the write-back mode when the other controllers are normal. Also, when the other controllers are in an abnormal state such as a failure, the storage controller generates a log regarding the update of the memory contents during the read / write and writes the log to the storage device. By doing so, compared to the write-through mode, the number of drive accesses required before a host response can be reduced, and response performance can be improved, thereby realizing a storage system and data protection method that combine high performance and high reliability.
[0065] The non-volatile medium to which the log is written is, as an example, the memory backup drive 107 provided inside the storage controller 103 . In this way, by providing the memory backup drive 107 inside the storage controller 103, the time required to complete writing of the log is shortened, and high performance can be achieved.
[0066] Furthermore, a part of the non-volatile storage device may be used as the non-volatile medium to which the log is written. In this configuration, the configuration of the storage controller 103 can be simplified, thereby achieving low costs.
[0067] Furthermore, when the storage controller 103 detects a blockage of the corresponding storage controller, it switches the operation from the memory replication method to the log evacuation method, preferentially destages pre-switching cache data (log-protected dirty queue 401) which is cache data before the operation switch to the storage device, and destages post-switching cache data (log-protected dirty queue) which is cache data after the operation switch after destaging all of the pre-switching cache data. After that, when the storage controller 103 detects recovery from the blockage of the corresponding storage controller, it replicates the data in the memory to the memory of the corresponding storage controller, deletes the log, and switches the operation from the log evacuation method to the memory replication method. Therefore, the pre-switch cache data that is not protected by the memory replication method can be destaged early, reducing the risk of data loss.
[0068] The present invention is not limited to the above-mentioned embodiment, and includes various modified examples. The above-mentioned embodiment has been described in detail to clearly explain the present invention, and is not necessarily limited to the one having all the configurations described. Furthermore, it is possible to not only delete such configurations, but also replace or add configurations. For example, although the description has been given in the case where a controller fails, it may also be applied to a case where one of the controllers is suspended in order to reduce power consumption. [Explanation of symbols]
[0069] 100: storage system, 102: host, 103: storage controller, 105: memory, 107: memory backup drive, 110: drive, 400: log-protected dirty queue, 401: non-log-protected dirty queue.
Claims
1. A storage system comprising a non-volatile storage device and a plurality of storage controllers that control reading and writing to the storage device, the storage device is a drive for storing user data, each of the plurality of storage controllers has a processor and a memory; the storage controller comprises a first memory protection method of a memory duplication method for duplicating data in the memory on a memory of a corresponding storage controller, and a second memory protection method of a log evacuation method for generating a log relating to updates of data in the memory and writing it to a non-volatile medium; the storage controller stores a write request from the host to the storage device as cache data in the memory, protects the cache data by the first memory protection method or the second memory protection method, and then returns a write completion response to the host, and destages the cache data to the storage drive after the write response is completed; The storage controller switches between the first memory protection method and the second memory protection method depending on the operating state of the other storage controller. A storage system comprising:
2. 2. The storage system according to claim 1, A storage system characterized in that the storage controller is associated with another storage controller to form a redundant configuration, and is used as the first memory protection method when the corresponding storage controller is blocked, and is used as the second memory protection method when the corresponding storage controller is blocked.
3. 3. The storage system according to claim 2, A storage system, characterized in that the non-volatile medium to which the log is written is provided inside the storage controller.
4. 3. The storage system according to claim 2, A storage system comprising: a nonvolatile storage device that stores a log; a nonvolatile medium that is a destination for writing the log;
5. 2. The storage system according to claim 1, In the destaging step, the data is stored in a final storage area of the storage drive using a storage function provided by the storage system.
6. 3. The storage system according to claim 2, The storage controller includes: when a blockage of the corresponding storage controller is detected, an operation is switched from the memory replication method to the log evacuation method, pre-switching cache data which is cache data before the operation switching is preferentially destaged to the storage device, and post-switching cache data which is cache data after the operation switching is destaged after all of the pre-switching cache data has been destaged; A storage system characterized in that, when recovery from blockage of the corresponding storage controller is detected, the data in the memory is replicated in the memory of the corresponding storage controller, the log is deleted, and operation is switched from the log evacuation method to the memory replication method.
7. A data protection method for a storage system including a non-volatile storage device and a plurality of storage controllers that control reading and writing to the storage device, comprising: the storage device is a drive for storing user data, each of the plurality of storage controllers has a processor and a memory; the storage controller comprises a first memory protection method of a memory duplication method for duplicating data in the memory on a memory of a corresponding storage controller, and a second memory protection method of a log evacuation method for generating a log relating to updates of data in the memory and writing it to a non-volatile medium; The storage controller stores a write request from the host to the storage device as cache data in the memory; The storage controller protects the cache data in the first memory protection scheme or the second memory protection scheme; the storage controller returning a write completion response to the host; the storage controller destaging the cache data to the storage drive after the write response is completed; The storage controller further includes a step of switching between the first memory protection scheme and the second memory protection scheme depending on an operating state of another storage controller.
2. A data protection method comprising:
Citation Information
Patent Citations
Duplex system for magnetic disk controller
JP1995160432A
Failover and failback of write cache data in dual active controllers
JP2008059558A
Storage device, its control method, and storage system
JP2009104488A
Storage controller and storage control program
JP2021009461A
Storage system
JP2021026375A
Cited By
Storage systems and data protection methods
JP2026110040A
Storage systems and data protection methods
JP2026147508A
