Method and apparatus for writing data to disk array in storage system

By using persistent storage with a caching component in the storage system to replace the write log process, the issues of data consistency and response time during disk array rebuilding are resolved, thereby improving the performance of the storage system and the lifespan of the storage disks.

CN121680725APending Publication Date: 2026-03-17EMC IP HLDG CO LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511764724.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2017-10-27
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

During disk array rebuilding in a storage system, existing technologies may lead to data inconsistency when a disk array group in degraded mode receives write requests, and frequent read and write operations increase response time and wear and tear on the storage disks.

Method used

The persistent storage provided by the caching component is used to replace the traditional log writing process. New data and new verification information are first written to the persistent storage of the caching component, and then flushed to the disk array when appropriate, reducing the number of read and write operations on the storage disk.

Benefits of technology

While ensuring data consistency, it reduces write operation response time, improves overall throughput, and extends the lifespan of storage disks, especially for flash drives or solid-state drives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121680725A_ABST
    Figure CN121680725A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a method, equipment and a computer program product for writing data into a disk array in a storage system. The storage system includes a disk array. A method includes, in response to receiving a write request to write new data to a data block in at least one disk array group in a degraded mode of a disk array, reading old data stored in the data block and old check information stored in a check block associated with the data block. The method further includes determining new check information associated with the new data based on the old data, the old check information, and the new data. The method further includes writing the new data and the new check information into at least one cache page provided by a cache component in the storage system, the at least one cache page being allocated in a persistent memory in the cache component. In addition, the method further comprises the step of flushing new data and new verification information into the data blocks and the verification blocks in the at least one disk array group respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Related Applications

[0001] This application is a divisional application of the application for patent with application number 201711022187.5, application date of 2017-10-27, and title of “Method and apparatus for writing data to disk array in storage system”. TECHNICAL FIELD

[0002] Embodiments of the present disclosure generally relate to the field of data storage, and in particular, to a method, apparatus and computer program product for writing data to a disk array in a storage system. BACKGROUND

[0003] A storage system usually has multiple storage disks, and the multiple storage disks can be organized in a disk array. For example, a redundant array of independent disks (RAID) is a data storage virtualization technology that combines multiple storage disks into a single logical unit for the purpose of data redundancy backup and / or performance improvement. Taking RAID5 as an example, a RAID group (RG) can be composed of block-level stripes with distributed parity information. When a single disk in the disk array group fails, subsequent reads can be calculated by the distributed parity information, so that no data is lost. At the same time, a spare disk will be selected to replace the failed disk, and all data on the failed disk will be reconstructed and written to the spare disk. Before the completion of this reconstruction process, the disk array group will be in a degraded mode.

[0004] However, during the reconstruction process, the storage system can still receive I / O requests from upper-layer applications for the disk array group in the degraded mode. When a write request for the disk array group in the degraded mode comes, it is necessary to avoid data inconsistency due to write failure. SUMMARY

[0005] Embodiments of the present disclosure provide a method, apparatus and computer program product for writing data to a disk array in a storage system.

[0006] In a first aspect of the disclosure, a method for writing data to a disk array in a storage system is provided. The method includes, in response to receiving a write request to write new data to a data block in at least one disk array group in a degraded mode in the disk array, reading old data stored in the data block and old check information stored in a check block associated with the data block. The method further includes determining new check information associated with the new data based on the old data, the old check information, and the new data. The method further includes writing the new data and the new check information to at least one cache page provided by a cache component in the storage system, the at least one cache page being allocated in a persistent memory in the cache component. In addition, the method further includes flushing the new data and the new check information into the data block and the check block, respectively, in the at least one disk array group.

[0007] In a second aspect of the disclosure, a method for writing data to a disk array in a storage system is provided. The method includes, in response to receiving a first request from the disk array to allocate at least one cache page for caching data to be written, allocating the at least one cache page in a persistent memory in a cache component in the storage system, the data to be written to be written to at least one storage block in at least one disk array group in a degraded mode in the disk array. The method further includes sending first information about the at least one cache page to the disk array. The method further includes, in response to receiving a first indication from the disk array that the data to be written has been written into the at least one cache page, marking the at least one cache page as to be flushed. In addition, the method further includes sending a second indication to the disk array that the data to be written can be flushed to the at least one disk array group, such that the data to be written in the at least one cache page marked as to be flushed is flushed into the at least one storage block.

[0008] In a third aspect of the disclosure, a disk array is provided, the disk array being included in a storage system. The disk array includes at least one processing unit and at least one memory. The at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. The instructions, when executed by the at least one processing unit, cause the device to perform actions including: in response to receiving a write request to write new data to a data block in at least one disk array group in a degraded mode in the disk array, reading old data stored in the data block and old check information stored in a check block associated with the data block; determining new check information associated with the new data based on the old data, the old check information, and the new data; writing the new data and the new check information to at least one cache page provided by a cache component in the storage system, the at least one cache page being allocated in a persistent memory in the cache component; and flushing the new data and the new check information into the data block and the check block, respectively, in the at least one disk array group.

[0009] In a fourth aspect of the disclosure, a cache component is provided, which is included in a storage system. The cache component includes at least one processing unit and at least one memory. The at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. The instructions, when executed by the at least one processing unit, cause the device to perform actions including: responsive to receiving a first request from a disk array in the storage system to allocate at least one cache page of a cache for write pending data, allocating the at least one cache page in a persistent memory in the cache component, the write pending data to be written into at least one storage block in at least one disk array group of the disk array in a degraded mode; sending first information about the at least one cache page to the disk array; responsive to receiving a first indication from the disk array that the write pending data has been written into the at least one cache page, marking the at least one cache page as pending flush; and sending a second indication to the disk array that the write pending data can be flushed to the at least one disk array group, such that the write pending data in the at least one cache page marked as pending flush is flushed into the at least one storage block.

[0010] In a fifth aspect of the disclosure, a computer program product is provided. The computer program product is tangibly stored in a non-transitory computer storage medium and comprises machine executable instructions. The machine executable instructions, when executed by a device, cause the device to perform any of the steps of the method described according to the first aspect of the disclosure.

[0011] In a sixth aspect of the disclosure, a computer program product is provided. The computer program product is tangibly stored in a non-transitory computer storage medium and comprises machine executable instructions. The machine executable instructions, when executed by a device, cause the device to perform any of the steps of the method described according to the second aspect of the disclosure.

[0012] The summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. The summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0013] The above and other objects, features and advantages of the disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings, in which like reference characters designate the same parts throughout the figures, and in which:

[0014] Figures 1A-1E A schematic diagram showing a write operation for a disk array group in a degraded mode in a conventional scheme is shown;

[0015] Figure 2An architectural diagram of a storage system 200 is shown in accordance with an embodiment of the present disclosure;

[0016] Figure 3 A schematic diagram of a process 300 to write data to be written to a cache component in a disk array group in a degraded mode is shown in accordance with an embodiment of the present disclosure;

[0017] Figure 4 A schematic diagram of a first request sent by a disk array to a cache component is shown in accordance with an embodiment of the present disclosure;

[0018] Figure 5 A schematic diagram of a process 500 to flush data to be written from a cache component to a disk array group is shown in accordance with an embodiment of the present disclosure;

[0019] Figure 6 A schematic diagram of a second request sent by a disk array to a cache component is shown in accordance with an embodiment of the present disclosure;

[0020] Figure 7 A schematic diagram of a process 700 to flush dirty pages by a cache component is shown in accordance with an embodiment of the present disclosure;

[0021] Figure 8 A flow diagram of a method 800 to write data to a disk array in a storage system is shown in accordance with an embodiment of the present disclosure;

[0022] Figure 9 A flow diagram of a method 900 to write data to a disk array in a storage system is shown in accordance with an embodiment of the present disclosure; and

[0023] Figure 10 A schematic block diagram of an example device 1000 that can be used to implement embodiments of the present disclosure is shown.

[0024] In the various drawings, like or corresponding elements are denoted by like or corresponding reference numerals. DETAILED DESCRIPTION

[0025] Preferred embodiments of the present disclosure will be described herein below with reference to the accompanying drawings. While preferred embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.

[0026] The term "comprising" and its variations as used herein signify open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0027] For ease of illustration, RAID 5 is used as an example of a disk array in the following text. However, it should be understood that this is merely for descriptive purposes and does not imply any limitation on the scope of this disclosure.

[0028] As mentioned above, when a disk in a disk array fails, it is usually necessary to rebuild the failed disk using a spare disk. During the rebuild process, the disk array in degraded mode may still receive I / O requests from upper-layer applications. When a write request arrives for the disk array in degraded mode, to avoid data inconsistency caused by write failures, the new data and calculated new checksum information are typically written to a separate journal space on the storage disk before being written to the specific stripe in the disk array. Then, the new data and new checksum information are written to the corresponding positions in the specific stripe to avoid data inconsistency caused by write failures (e.g., new data has been written but new checksum information has not been written). After a successful write, the user data and checksum data in the journal space are removed.

[0029] Figures 1A-1E This diagram illustrates a write operation performed on an RG 110 in degraded mode using a conventional approach. (Example:) Figure 1A As shown, RG 110 uses five disks, namely disk 120-1, disk 120-2... disk 120-5 (collectively referred to as disk 120). Each stripe in RG 110 (that is, each row in RG 110) may include, for example, four data blocks and one parity block (hereinafter also referred to as "4D+1P" RAID 5). Here, "data block" refers to the storage block storing user data A1-A4, B1-B4, etc., and "parity block" refers to the storage block storing parity information P1, P2, etc. Furthermore, a dedicated log space 130 is allocated on disk 120 to ensure data consistency during read and write operations on RG 110.

[0030] like Figure 1BAs shown, for example, disk 120-3 in RG 110 fails. In this case, all data on the failed disk 120-3 will be rebuilt and written to a spare disk (not shown). RG 110 will be in degraded mode until the rebuild process is complete. During this time, RG 110 still receives write requests from upper-layer applications. For example, an upper-layer application might request to write user data B4' to the data block containing B4.

[0031] like Figure 1C As shown, to ensure data consistency during the write process, the data to be written will first be written to the log space 130. For example, the data written to the log space 130 includes new user data B4' and new verification information P2' calculated based on the new user data B4' (for example, the new verification information P2' can be calculated based on user data B4, verification information P2, and new user data B4').

[0032] After the log writing operation is complete, such as Figure 1D As shown, the new user data B4' and the new verification information P2' are copied from the log space 130 to the corresponding data block and verification block, respectively.

[0033] After the write operation to the RG 110 is successfully completed, as follows Figure 1E As shown, user data B4' and verification information P2' in log space 130 have been removed.

[0034] As can be seen, although the above process ensures data consistency for write operations on disk arrays in degraded mode, it significantly increases the number of read and write operations to the storage disks, thereby increasing the response time of write operations. Furthermore, when the disk array is built using flash drives, this process significantly shortens the lifespan of the flash drives.

[0035] This disclosure presents an example embodiment of a scheme for writing data to a disk array in a storage system. This scheme utilizes persistent storage services provided by a caching component to replace the write log process in traditional schemes. This scheme reduces the number of disk reads and writes while ensuring data consistency during write operations, thereby reducing the response time for write operations on disk array groups in degraded mode. This scheme can significantly improve the overall throughput of the disk array group during degraded mode. Furthermore, when the disks in the disk array are flash drives or solid-state drives, this scheme can significantly reduce disk wear, thereby extending the disk's lifespan.

[0036] Figure 2 An architectural diagram of a storage system 200 according to an embodiment of the present disclosure is shown. (As follows) Figure 2As shown, storage system 200 may include cache component 210 and disk array 230. It should be understood that, as Figure 2 The structure and function of the storage system 200 shown are for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Embodiments of this disclosure may be embodied in different structures and / or functions.

[0037] Cache component 210 can be used to cache frequently accessed data in a high-speed storage medium to respond more quickly to I / O requests for that data. In some embodiments, cache component 210 may include persistent storage 220, which may include any currently known or to be developed persistent storage medium. In virtual paged storage, data replacement between the cache and the storage disk is performed on a page-by-page basis (e.g., the size of a page may correspond to the size of a storage block on the storage disk). In some embodiments, cache component 210 may cache data in one or more cache pages allocated on persistent storage 220.

[0038] In addition, cache component 210 may also include a battery (not shown) for providing power failure protection to the cached data. For example, when a system power failure occurs, cache component 210 may use the battery to write one or more cache pages to a backup disk. When the failure is recovered, cache component 210 may reload one or more cache pages into persistent storage 220.

[0039] Disk array 230 can consist of multiple storage disks, which can be divided into multiple disk array groups 231-1, 231-2...231-N (collectively referred to as disk array group 231). The term "storage disk" as used herein can refer to any currently known or future-developed non-volatile storage medium, such as hard disks, optical disks, or solid-state drives (SSDs). Disk array 230 can be, for example, RAID, and can have different levels depending on the required redundancy and performance, such as RAID 0, RAID 1...RAID 5, etc. For ease of illustration, RAID 5 will be used as an example of disk array 230 below.

[0040] When storage system 200 receives an I / O request from an upper-layer application, the I / O request can first be sent to cache component 210 to determine whether the requested data has already been cached in cache component 210. If the requested data has been cached (also known as a "cache hit"), storage system 200 can retrieve the requested data from cache component 210 as a response to the I / O request. If the requested data has not been cached (also known as a "cache miss"), the I / O request can be sent via cache component 210 to disk array 230 to retrieve the requested data from disk array 230.

[0041] Furthermore, to ensure data consistency, data cached in cache component 210 can be flushed to disk array 230 at appropriate times. In the following description, data or cached pages cached in cache component 210 that have not yet been committed to disk array 230 are also referred to as "dirty data" or "dirty pages".

[0042] When a disk in a disk array group (e.g., disk array group 231-1) fails, a rebuild process for disk array group 231-1 can occur to rebuild the failed disk using a spare disk. During the rebuild process, disk array group 231-1 in degraded mode may still receive I / O requests from upper-layer applications. When a write request arrives for a disk array group in degraded mode, persistent memory 220 provided by cache component 210 can be used instead of log space 130 as shown in FIG. 1 to ensure data consistency during the write process. For example, before writing new data to a specific stripe in disk array group 231-1, new data and calculated new checksum information can be written to persistent memory 220. Then, the new data and new checksum information are flushed to the corresponding positions in the specific stripe in disk array group 231-1.

[0043] Figure 3 A schematic diagram is shown illustrating a process 300 of writing data to be written to a disk array group in degraded mode to a cache component according to an embodiment of the present disclosure. For illustrative purposes, Figure 3 Only disk array group 231-1 and cache component 210 in degraded mode are shown. Furthermore, as shown below... Figure 1A The RG 110 shown is an example of disk array group 231-1. For example, disk array group 231-1 is a 4D+1P RAID 5 RG that uses five disks 120-1, 120-2...120-5. Among them, disk 120-3 fails, and the upper-layer application requests to write user data B4' to the data block where B4 is located.

[0044] In response to receiving a write request, disk array group 231-1 reads the old data B4 and the old parity information P2 in the stripe where B4 is located, and determines (301) the new parity information P2' associated with the new data B4' based on the old data B4, the old parity information P2 and the new data B4'.

[0045] Disk array group 231-1 sends a (302) request (hereinafter also referred to as the “first request”) to cache component 210 to allocate at least one cache page in persistent storage 220 for caching new data B4' and new check information P2'. Figure 4 A schematic diagram of a first request according to an embodiment of the present disclosure is shown. For example, Figure 4An example is shown of some fields included in the first request 400 sent by disk array group 231-1 to cache component 210.

[0046] To ensure data consistency, write operations to disk array groups in degraded mode must be performed in a transactional manner. That is, while a write operation is in progress, no further writes or flushes should be allowed to the same stripe within that disk array group. Therefore, as follows... Figure 4 As shown, the first request 400 may include fields 410 and 420. For example, field 410 may identify the address information of the stripe to be locked (e.g., the starting logical block address LBA), and field 420 may identify the number of memory blocks in the locked stripe. In some embodiments, the write operation may involve one or more memory blocks in the stripe. For this purpose, as... Figure 4 As shown, the first request 400 may include field 430 and one or more fields 440. For example, field 430 may identify the number of storage blocks in one or more storage blocks involved in the write operation, and each field in the one or more fields 440 may identify the address information (e.g., the starting logical block address LBA) of the corresponding storage block in the one or more storage blocks. In some embodiments, such as Figure 1A As shown, since the checksum block containing the checksum information P2 is not on the faulty disk 120-3, the write operation will involve the checksum block in the stripe. In other embodiments, if the checksum block to be written to in the stripe is located on the faulty disk, the checksum information does not need to be updated, so the write operation may not involve the checksum block. To indicate this information, the first request 400 may also include a field 450, which indicates whether the write operation involves the checksum block in the stripe. For example, if the checksum block is not on the faulty disk, field 450 may indicate that the write operation involves the checksum block in the stripe; otherwise, field 450 may indicate that the write operation does not involve the checksum block in the stripe.

[0047] Return to Figure 3 In response to receiving a first request from disk array group 231-1, cache component 210 allocates (303) at least one cache page in persistent memory for caching new data B4' and new checksum information P2'. In some embodiments, a corresponding cache page may be allocated for each storage block to be cached. For example, cache component 210 may allocate two cache pages for caching new data B4' and new checksum information P2', respectively. The addresses of these cache pages may be recorded in one or more lists (referred to as "scatter list", SGL), and cache component 210 may send (304) information including these lists (hereinafter also referred to as "first information") to disk array group 231-1.

[0048] In response to receiving a first message from cache component 210, disk array group 231-1 may write (305) new data B4' and new checksum information P2' to at least one allocated cache page. When the write is complete, disk array group 231-1 may send (306) an indication that the write is complete (hereinafter also referred to as the "first indication") to cache component 210. In some embodiments, the first indication may instruct cache component 210 to lock the corresponding stripe to prevent further operations on the stripe, and the first request may also instruct cache component 210 to mark at least one cache page as pending flushing.

[0049] In response to receiving a first instruction from disk array group 231-1, cache component 210 may lock (307) the corresponding stripe to prevent further operation on that stripe and mark at least one cache page containing new data B4' and new parity information P2' as pending flush. Additionally or alternatively, cache component 210 may send (308) a second instruction to disk array group 231-1 that the data to be written can be flushed to disk array group 231-1, so that the data to be written in at least one cache page marked as pending flush is flushed to the corresponding storage block.

[0050] Figure 5 A schematic diagram of a process 500 in which data to be written is flushed from cache component 210 to disk array group 231-1 according to an embodiment of the present disclosure is shown.

[0051] like Figure 5 As shown, disk array group 231-1 can send (501) a request to cache component 210 to flush refresh data B4' and new verification information P2' (hereinafter also referred to as "second request"). In some embodiments, disk array group 231-1 can send a second request to cache component 210 in response to receiving the above-described second instruction. Figure 6 A schematic diagram of a second request according to an embodiment of the present disclosure is shown. For example, Figure 6 An example is shown of some fields included in a second request 600 sent by disk array group 231-1 to cache component 210.

[0052] like Figure 6 As shown, the second request 600 may include fields 610 and 620. For example, field 610 may identify the address information of the stripe to be unlocked (e.g., the starting logical block address LBA), and field 620 may identify the number of memory blocks in the stripe to be unlocked. In some embodiments, the write operation may involve one or more memory blocks in the stripe. For this purpose, as... Figure 6As shown, the second request 600 may include field 630 and one or more fields 640. For example, field 630 may identify the number of memory blocks in one or more memory blocks to be flushed, and each of the one or more fields 640 may identify the address information (e.g., the start logical block address LBA) of the corresponding memory block in the one or more memory blocks. Corresponding to the first request, in some embodiments, the second request 600 may also include field 650, which indicates whether to flush the checksum block in the stripe. For example, if the checksum block is not on the faulty disk, field 650 may indicate that the checksum block should be flushed; otherwise, field 650 may indicate that the checksum block will not be flushed.

[0053] Return to Figure 5 In response to receiving a second request from disk array group 231-1, cache component 210 determines (502) information (hereinafter also referred to as "second information") regarding at least one cache page marked as pending flush. To ensure data consistency, one or more cache pages pending flush associated with the same stripe must be flushed to the corresponding storage block at once. Therefore, cache component 210 needs to collect all cache pages pending flush associated with the same stripe and include the addresses of these cache pages in one or more lists (e.g., SGL). Cache component 210 may send (503) a write request including the information (hereinafter also referred to as "second information") to disk array group 231-1.

[0054] In response to receiving the write request from cache component 210, disk array group 231-1 can flush (504) the cache page indicated in the second information to the corresponding storage block. That is, disk array group 231-1 can flush the new data B4' and the new parity information P2' to the corresponding data block and parity block, respectively. In response to the completion of the flush, disk array group 231-1 can send (505) an indication that the flush is complete to cache component 210 (hereinafter also referred to as the "third indication").

[0055] In response to receiving a third instruction from disk array group 231-1, cache component 210 may release (506) the allocated cache pages and unlock the corresponding stripe to allow further operation on that stripe.

[0056] As can be seen from the above description, the embodiments of this disclosure can utilize persistent memory provided by a cache component to replace the log space allocated on the storage disk in conventional solutions. Compared with the conventional solution shown in Figure 1, this solution can significantly reduce the number of read / write operations on the storage disk while ensuring data consistency during write operations, thereby reducing the response time for write operations on disk array groups in degraded mode. This solution can significantly improve the overall throughput of the disk array group during degraded mode. Furthermore, when the storage disks in the disk array are flash drives or solid-state drives, this solution can significantly reduce the wear and tear on the storage disks, thereby extending the lifespan of the storage disks.

[0057] In some embodiments, the data in the cache page to be flushed can be protected by persistent storage 220 in the cache component 210 before it is successfully flushed to the storage disk. If the cache page to be flushed fails to be successfully flushed to the storage disk, the cache component 210 can retry flushing the cache page to the storage disk.

[0058] Furthermore, as previously described, cache component 210 may also include a battery for providing power failure protection to the cached data. For example, when a system power failure occurs, cache component 210 may use the battery to write cache pages to be flushed to a backup disk. When the failure is recovered, cache component 210 may first reload the cache pages to be flushed into persistent storage 220, and then attempt to flush dirty pages to the storage disk.

[0059] The above flushing process is similar to... Figure 5 The process shown is similar, except that the flushing process is initiated by the cache component 210 instead of the disk array 230. Figure 7 A schematic diagram of a process 700 for flushing dirty pages by cache component 210 according to an embodiment of the present disclosure is shown. For example, process 700 may be executed by cache component 210 when the aforementioned third instruction is not received or when system power failure is recovered.

[0060] like Figure 7 As shown, cache component 210 scans (710) one or more dirty pages. For the scanned one or more dirty pages, cache component 210 checks (720) the tags associated with the one or more dirty pages, such as lock tags and / or flush tags as described above. Then, cache component 210 determines (730) a set of dirty pages associated with the same stripe. Cache component 210 may flush (740) all dirty pages in the set of dirty pages associated with the same stripe to that stripe simultaneously to avoid data inconsistency. Then, cache component 210 may clear (750) the tags associated with all dirty pages in the set of dirty pages, including lock tags and / or flush tags.

[0061] In this way, embodiments of this disclosure can guarantee data consistency in the event of a failure. Furthermore, by utilizing persistent storage services provided by a caching component to replace the traditional process of writing log space, the performance of the storage system can be improved while ensuring data consistency.

[0062] Figure 8 A flowchart of a method 800 for writing data to a disk array in a storage system according to an embodiment of the present disclosure is shown. For example, method 800 may be performed by, for example, Figure 2 The disk array 230 shown is used to perform this. It should be understood that method 800 may also include additional steps not shown and / or the steps shown may be omitted, and the scope of this disclosure is not limited in this respect.

[0063] In block 810, in response to receiving a write request to write new data to a data block in at least one disk array group in a degraded mode, the old data stored in the data block and the old check information stored in the check block associated with the data block are read.

[0064] In box 820, based on the old data, the old verification information, and the new data, new verification information associated with the new data is determined.

[0065] In box 830, new data and new verification information are written to at least one cache page provided by a caching component in the storage system, the at least one cache page being allocated in persistent storage within the caching component.

[0066] In box 840, new data and new check information are flushed into the data block and check block in at least one disk array group, respectively.

[0067] In some embodiments, writing new data and new verification information to at least one cache page provided by a caching component in a storage system includes: sending a first request to the caching component to allocate at least one cache page in persistent storage; writing new data and new verification information to at least one cache page in response to receiving first information about at least one cache page from the caching component; and sending a first indication of completion of the write to the caching component in response to completion of the write to at least one cache page.

[0068] In some embodiments, data blocks and check blocks are included in a stripe within at least one disk array group. The first request instructs the caching component to lock the stripe to prevent further operation on the stripe, and the first request also instructs the caching component to mark at least one cached page as pending flushing upon receiving the first instruction.

[0069] In some embodiments, the first information about at least one cached page includes a data structure that records the address of at least one cached page.

[0070] In some embodiments, writing new data and new verification information to at least one cache page includes: in response to receiving a second indication from the cache component that the new data and new verification information can be flushed to at least one disk array group, sending a second request to the cache component for flushing the new data and new verification information; in response to receiving a write-through request from the cache component for the new data and new verification information, flushing the new data and new verification information to a data block and a verification block, respectively; and in response to the completion of flushing to the data block and the verification block, sending a third indication of completion of flushing to the cache component.

[0071] In some embodiments, the write request includes second information about at least one cached page that has been marked as pending flushing by the caching component.

[0072] In some embodiments, the second request instructs the caching component to release at least one cached page and unlock the stripe upon receiving a third instruction to allow further operations on the stripe.

[0073] Figure 9 A flowchart of a method 900 for writing data to a disk array in a storage system according to an embodiment of the present disclosure is shown. For example, method 900 may be performed by, for example, Figure 2 The disk array 210 shown is used to perform this. It should be understood that method 900 may also include additional steps not shown and / or the steps shown may be omitted, and the scope of this disclosure is not limited in this respect.

[0074] In block 910, in response to receiving a first request from the disk array to allocate at least one cache page for caching data to be written, at least one cache page is allocated in persistent memory in the cache component of the storage system, the data to be written to at least one storage block in at least one disk array group in degraded mode of the disk array.

[0075] In box 920, first information about at least one cached page is sent to the disk array.

[0076] In box 930, in response to receiving a first indication from the disk array that the data to be written has been written to at least one cache page, at least one cache page is marked as pending flushing.

[0077] In box 940, a second indication is sent to the disk array that the data to be written can be flushed to at least one disk array group, so that the data to be written in at least one cache page marked as to be flushed is flushed to at least one storage block.

[0078] Additionally or alternatively, in some embodiments, method 900 further includes: in response to receiving a second request from the disk array for flushing data to be written, determining second information about at least one cache page marked as to be flushed; and sending a write request to the disk array for the data to be written, such that the data to be written is flushed into at least one storage block, the write request including the second information.

[0079] Additionally or alternatively, in some embodiments, at least one storage block is included in a stripe within at least one disk array group. Method 900 may further include: locking the stripe to prevent further operation on the stripe in response to receiving a first request; and releasing at least one cache page and unlocking the stripe to allow further operation on the stripe in response to receiving a third indication from the disk array that data to be written has been flushed into at least one storage block.

[0080] Additionally or alternatively, in some embodiments, method 900 may further include: in response to receiving a fourth indication that flushing of data to be written to at least one storage block has failed, flushing the data to be written in at least one cached page marked as to be flushed back to at least one storage block.

[0081] Additionally or alternatively, in some embodiments, method 900 may further include: writing at least one cache page in persistent memory to a spare disk in response to receiving a first signal indicating a power failure; reloading at least one cache page from the spare disk to persistent memory in response to receiving a second signal indicating a power failure recovery; and flushing the data to be written in at least one cache page marked as to be flushed to at least one storage block. Figure 10 A schematic block diagram of an example device 1000 that can be used to implement embodiments of the present disclosure is shown. For example, such as Figure 2 The cache component 210 and / or disk array 230 shown can be implemented by device 1000. As shown, device 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 1002 or loaded from storage unit 1008 into random access memory (RAM) 1003. Various programs and data required for the operation of device 1000 can also be stored in RAM 1003. CPU 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0082] Multiple components in device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of monitors, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0083] The various processes and procedures described above, such as methods 800 and / or 900, may be executed by processing unit 1001. For example, in some embodiments, methods 800 and / or 900 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by CPU 1001, one or more actions of methods 800 and / or 900 described above may be performed.

[0084] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0085] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0086] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0087] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0088] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0089] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0090] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0092] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method (900) for writing data to a disk array (230) in a storage system (200), the method (900) comprising: in response to receiving a first request from the disk array (230) to allocate at least one cache page to cache data to be written, allocating the at least one cache page in a persistent memory (220) in a cache component (210) in the storage system (200), the data to be written to be written to at least one storage block in at least one disk array group (231-1) in the disk array (230) in a degraded mode; sending first information about the at least one cache page to the disk array (230); in response to receiving an indication from the disk array (230) that the data to be written has been written into the at least one cache page, marking the at least one cache page as to be flushed; and sending a second indication to the disk array (230) that the data to be written can be flushed to the at least one disk array group (231-1) so that the data to be written in the at least one cache page marked as to be flushed is flushed to the at least one storage block.

2. The method (900) of claim 1, further comprising: in response to receiving a second request from the disk array (230) to flush the data to be written, determining second information about the at least one cache page marked as to be flushed; and sending a write-through request for the data to be written to the disk array (230) so that the data to be written is flushed to the at least one storage block, the write-through request including the second information.

3. The method (900) of claim 1, wherein the at least one storage block is included in a stripe in the at least one disk array group (231-1), and the method (900) further comprising: in response to receiving the first request, locking the stripe to prevent further operations on the stripe; and in response to receiving a third indication from the disk array (230) that the data to be written has been flushed to the at least one storage block, releasing the at least one cache page and unlocking the stripe to allow the further operations on the stripe.

4. The method (900) of claim 1, further comprising: in response to receiving a fourth indication that flushing of the data to be written to the at least one storage block failed, flushing the data to be written in the at least one cache page marked as to be flushed to the at least one storage block again.

5. The method (900) of claim 1, further comprising: in response to receiving a first signal indicating a power failure, writing the at least one cache page in the persistent memory (220) to a backup disk; in response to receiving a second signal indicating a recovery of the power failure, reloading the at least one cache page from the backup disk to the persistent memory (220); and ​ flushing the to-write data in the at least one cache page marked to be flushed into the at least one storage block.

6. A cache component (210) included in a storage system, the cache component (210) comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, cause the device to perform acts comprising: in response to receiving a first request from a disk array (230) in the storage system (200) to allocate at least one cache page to cache to-write data, allocating the at least one cache page in a persistent memory (220) in the cache component (210), the to-write data to be written into at least one storage block in at least one disk array group (231-1) in the disk array (230) in a degraded mode; sending first information about the at least one cache page to the disk array (230); in response to receiving an indication from the disk array (230) that the to- write data has been written into the at least one cache page, marking the at least one cache page to be flushed; and sending a second indication to the disk array (230) that the to-write data can be flushed into the at least one disk array group (231-1) to cause the to-write data in the at least one cache page marked to be flushed to be flushed into the at least one storage block.

7. The cache component (210) of claim 6, the acts further comprising: in response to receiving a second request from the disk array (230) to flush the to- write data, determining second information about the at least one cache page marked to be flushed; and sending a write-through request for the to-write data to the disk array (230) to cause the to-write data to be flushed into the at least one storage block, the write-through request including the second information.

8. The cache component (210) of claim 6, wherein the at least one storage block is included in a stripe in the at least one disk array group (231-1), and the acts further comprise: in response to receiving the first request, locking the stripe to prevent further operations on the stripe; and in response to receiving a third indication from the disk array (230) that the to- write data has been flushed into the at least one storage block, releasing the at least one cache page and unlocking the stripe to allow the further operations on the stripe.

9. The cache component (210) of claim 6, the acts further comprising: in response to receiving a fourth indication that a flush of the to-write data into the at least one storage block failed, re-flushing the to-write data in the at least one cache page marked to be flushed into the at least one storage block.

10. The cache component (210) of claim 6, the acts further comprising: in response to receiving a first signal indicating a power failure, writing the at least one cache page in the persistent memory (220) to a backup disk; in response to receiving a second signal indicating a recovery of the power failure, reloading the at least one cache page from the backup disk into the persistent memory (220); and flushing the data to write in the at least one cache page marked to be flushed to the at least one storage block.

11. A computer program product, the computer program product being tangibly stored in a non-transitory computer storage medium and comprising machine executable instructions that, when executed by a device, cause the device to perform the method of any one of claims 1-5. ​