Method, apparatus and computer program product for managing a storage system
Building a reconstruction queue through address mapping technology and selecting storage devices with lower loads for data reconstruction solves the problem of low reconstruction efficiency and risk of data loss in storage systems when disk failures occur, and achieves efficient storage system reconstruction and load balancing.
Patent Information
- Application Number
- CN201911001210.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-21
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-10-21
AI Technical Summary
The existing storage system has low reconstruction efficiency when a disk fails, resulting in an increased risk of data loss and a long reconstruction time, and cannot effectively manage the load balancing of multiple storage devices.
Address mapping technology is used to build a reconstruction queue. By processing the reconstruction operations of multiple stripes in parallel, a storage device with a lower load is selected for data reconstruction, and the address mapping is updated to optimize the reconstruction process of the storage system.
It improves the reconstruction performance and efficiency of the storage system, reduces the reconstruction time overhead, and ensures the reliability of the data and the load balancing of the storage system.
Smart Images

Figure CN112764661B
Abstract
Description
Technical Field
[0001] Implementations of the present disclosure relate to storage management, and more particularly, to a method, device, and computer program product for rebuilding a storage system when a failed storage device occurs in the storage system. Background Art
[0002] With the development of data storage technology, various data storage devices have been able to provide users with higher and higher data storage capabilities, and the data access speed has also been greatly improved. While improving data storage capabilities, users have also put forward higher and higher requirements for data reliability and storage system response time. At present, a variety of data storage systems based on Redundant Array of Independent Disks (RAID) have been developed to improve data reliability. When one or more disks in a storage system fail, the data on the failed disk can be rebuilt from the data on other normally operating disks.
[0003] Currently, a mapped redundant array of independent disks (Mapped RAID) has been developed. In the mapped RAID, a disk is a logical concept and can include multiple extents. The multiple extents included in a logical disk can be distributed on different physical storage devices in a resource pool. For multiple blocks in a stripe of the mapped RAID, the multiple blocks should be distributed on different physical storage devices so that when a physical storage device where one or more of the multiple blocks are located fails, a reconstruction operation can be performed to recover data from the physical storage devices where other blocks are located.
[0004] Due to the differences in the time when each storage device in the resource pool is put into use and the difference in the usage status, a storage device may fail. It will be understood that based on the different numbers of redundant storage devices in the storage system, the number of failed storage devices that can be included in the storage system without losing data is also different. At this time, how to rebuild the data in the failed storage device as soon as possible to avoid data loss in the storage system becomes a technical problem. Summary of the invention
[0005] Therefore, it is expected to develop and implement a technical solution for rebuilding the storage system in a more efficient manner. It is expected that the technical solution can be compatible with the existing storage system and manage the storage system in a more efficient manner by transforming various configurations of the existing storage system.
[0006] According to a first aspect of the present disclosure, a method for managing a storage system is provided. The storage system includes multiple stripes, multiple blocks included in one of the multiple stripes are respectively located in multiple storage devices in the storage system, and the storage system includes address mappings representing the stripes and the multiple storage devices where the multiple blocks are respectively located. In the method, for one of the multiple blocks, the storage device where the block in the multiple storage devices is located is determined based on the address mapping. According to determining that the storage device is a faulty storage device, the stripe is added to a reconstruction list of the storage system, and the reconstruction list includes the stripes to be reconstructed in the storage system.
[0007] According to a second aspect of the present disclosure, a device for managing a storage system is provided. The storage system includes a plurality of stripes, a plurality of blocks included in one of the plurality of stripes are respectively located in a plurality of storage devices in the storage system, and the storage system includes an address mapping between the stripes and the plurality of storage devices where the plurality of blocks are respectively located. The device includes: at least one processor; and a memory coupled to the at least one processor, the memory having instructions stored therein, which, when executed by the at least one processor, causes the device to perform an action. The action includes: determining the storage device where the blocks in the plurality of storage devices are located based on the address mapping; adding the stripe to a reconstruction list of the storage system based on determining that the storage device is a faulty storage device, the reconstruction list including the stripes to be reconstructed in the storage system; and rebuilding the storage system based on the stripes in the reconstruction list.
[0008] According to a third aspect of the present disclosure, there is provided a computer program product, which is tangibly stored on a non-transitory computer-readable medium and comprises machine-executable instructions for executing the method according to the first aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The features, advantages and other aspects of various implementations of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings, which illustrate several implementations of the present disclosure in an exemplary and non-limiting manner. In the accompanying drawings:
[0010] Figure 1A and 1B Schematic diagrams of storage systems in which the method of the present disclosure can be implemented are schematically shown respectively;
[0011] Figure 2 A block diagram schematically illustrates an exemplary environment in which the method of the present disclosure may be implemented;
[0012] Figure 3 Schematically shows Figure 2 A diagram of the storage resource pool in ;
[0013] Figure 4AA block diagram for managing a storage system according to a technical solution is schematically shown;
[0014] Figure 4B A block diagram for managing a storage system according to an implementation of the present disclosure is schematically shown;
[0015] Figure 5 A flowchart of a method for managing a storage system according to an implementation of the present disclosure is schematically shown;
[0016] Figure 6 A block diagram schematically illustrates a metadata bitmap according to an implementation of the present disclosure;
[0017] Figure 7 A block diagram schematically illustrates the relationship between device blocks in a storage device and blocks in a stripe according to an implementation of the present disclosure;
[0018] Figure 8 A flowchart of a method for managing a storage system according to an implementation of the present disclosure is schematically shown;
[0019] Fig. 9 A block diagram schematically shows a process of reconstructing a strip in a reconstruction list according to an implementation of the present disclosure;
[0020] Fig.10 A block diagram schematically shows an address mapping updated based on a reconstructed stripe according to an implementation of the present disclosure; and
[0021] Fig.11 A block diagram schematically shows a device for managing a storage system according to an exemplary implementation of the present disclosure. DETAILED DESCRIPTION
[0022] The preferred implementations of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the implementations set forth herein. On the contrary, these implementations are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0023] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example implementation" and "an implementation" mean "at least one example implementation". The term "another implementation" means "at least one additional implementation". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0024] In the context of the present disclosure, the storage system may be a RAID-based storage system. A RAID-based storage system may combine multiple storage devices into a disk array. By providing redundant storage devices, the reliability of the entire disk group may be much greater than a single storage device. RAID may provide various advantages over a single storage device, such as enhanced data integrity, enhanced fault tolerance, increased throughput or capacity, and the like. There are multiple RAID standards, such as RAID-1, RAID-2, RAID-3, RAID-4, RAID-5, RAID-6, RAID-10, RAID-50, and the like. For more details on RAID levels, those skilled in the art may refer to, for example, https: / / en.wikipedia.org / wiki / Standard_RAID_levels, and https: / / en.wikipedia.org / wiki / Nested_RAID_levels, and the like.
[0025] Figure 1A A schematic diagram of a storage system 100A in which the method of the present disclosure can be implemented is schematically shown. Figure 1A In the storage system shown, a RAID-5 (4D+1P, where 4D means that the storage system includes four storage devices for storing data, and 1P means that the storage system includes one storage device for storing P parity) array including five independent storage devices (110, 112, 114, 116, and 118) is used as an example to illustrate the working principle of RAID. It should be noted that although Figure 1A Five storage devices are schematically shown in FIG. 1 . In other implementations, more or fewer storage devices may be included depending on the level of the RAID. Figure 1A , 126 are shown. In other examples, the RAID system may include a different number of stripes.
[0026] In RAID, a stripe can span multiple physical storage devices (e.g., stripe 120 spans storage devices 110, 112, 114, 116, and 118). A stripe can be simply understood as a storage area in multiple storage devices that satisfies a certain address range. The data stored in stripe 120 includes multiple parts: data block D00 stored on storage device 110, data block D01 stored on storage device 112, data block D02 stored on storage device 114, data block D03 stored on storage device 116, and data block P0 stored on storage device 118. In this example, data blocks D00, D01, D02, and D03 are stored data, and data block P0 is the P check of the stored data.
[0027] The manner of storing data in the other stripes 122 and 124 is also similar to the stripe 120, except that the checksums for the other data blocks may be stored on a storage device different from the storage device 118. In this way, when a storage device among the plurality of storage devices 110, 112, 114, 116, and 118 fails, the data in the failed device may be recovered from other normal storage devices.
[0028] Figure 1B A schematic diagram 100B schematically shows a reconstruction process of a storage system 110A. Figure 1B As shown, when a storage device (e.g., the storage device 116 shown in shadow) fails, data can be recovered from the remaining normally operating multiple storage devices 110, 112, 114, and 118. At this time, a new backup storage device 118B can be added to the RAID to replace the storage device 118, so that the recovered data can be written to 118B and the system can be rebuilt.
[0029] It should be noted that although in the above reference Figure 1A and Figure 1B A storage system of RAID-5 including 5 storage devices (4 of which are used to store data and 1 storage device to store parity) is described. According to the definition of other RAID levels, there may also be storage systems including other numbers of storage devices. For example, based on the definition of RAID-6, two storage devices may be used to store parity P and Q respectively. For another example, based on the definition of triple-parity RAID, three storage devices may be used to store parity P, Q, and R respectively.
[0030] With the development of distributed storage technology, Figure 1A and 1BThe storage devices 110, 112, 114, 116 and 118 in the storage system shown are no longer limited to physical storage devices, but can be virtual storage devices. For example, each block on the storage device 110 can come from different physical storage devices (hereinafter referred to as storage devices) in the resource pool. Figure 2 Schematically shows a block diagram of an exemplary environment in which the method of the present disclosure can be implemented. Figure 2 As shown, the storage resource pool 270 may include multiple physical storage devices 210, 220, 230, 240, 250, ..., 260. At this time, the storage space in the multiple storage devices may be allocated to multiple storage systems 290, ..., 292. At this time, the storage systems 290, ..., 292 may access the storage space in each storage device in the storage resource pool 270 via the network 280.
[0031] Figure 3 The schematic diagram shows Figure 2 1 is a diagram of more information of the storage resource pool 270 shown. The resource pool 270 may include multiple storage devices 210, 220, 230, 240, 250, ..., 260. Each storage device may include multiple blocks, wherein a blank block (as shown in the legend 320) represents an idle block, a block shown in shade (as shown in the legend 322) represents a block for RAID stripe 1 of the storage system 110A in FIG. 1, and a block shown in stripes (as shown in the legend 324) represents a block for RAID stripe 2 of the storage system 110A in FIG. 1. At this time, blocks D11, D22, D33, and D44 for RAID stripe 1 are respectively used to store data blocks of the stripe, and block D55 is used to store data verification. Blocks D01, D12, D23, and D34 for RAID stripe 2 are respectively used to store data blocks of the second stripe, and block D45 is used to store data verification.
[0032] like Figure 3 As shown in , the address map 330 shows the association between the stripe and the address of the block in the stripe. For example, RAID stripe 1 may include 5 blocks: D11, D22, D33, D44 and D55, which are located in storage devices 210, 220, 230, 240 and 250 respectively. Figure 3 As shown, block D11 is the first block in storage device 220, and block D22 is the second block in storage device 230. Figure 3 As shown, there may also be a reserved free portion 310 in each storage device, so that when a storage device in the resource pool fails, blocks in the free portion 310 in each storage device can be selected to rebuild each block in the failed storage device.
[0033] It should be noted that Figure 3 Only the 4D+1P RAID-5 storage system is used as an example to illustrate how the blocks in each stripe are distributed in multiple storage systems in the resource pool. When other RAID levels are used, those skilled in the art can implement specific details based on the above principles. For example, in a 6D+1P+1Q RAID-6 storage system, the 8 blocks in each stripe can be distributed on multiple storage devices, thereby ensuring load balancing of multiple storage devices.
[0034] It will be understood that as the storage system is used, one or more storage devices among the multiple storage devices may fail, and a reconstruction operation needs to be initiated to restore the data in the failed storage device to a normal storage device to avoid data loss. Technical solutions for storage system reconstruction have been proposed. For example, Figure 4A A block diagram 400A for managing a storage system according to a technical solution is schematically shown. Figure 4A As shown, assuming that the storage device 220 fails, it is necessary to traverse each block in the storage device 220. Based on the address mapping 330, it can be known that the RAID stripe 1 uses the block D11 in the failed storage device, so it is necessary to rebuild the RAID stripe 1. Further, based on the address mapping 330, it can be known that the RAID stripe 2 uses the block D12 in the failed storage device, so it is necessary to rebuild the RAID stripe 2. Each block in the storage device 220 can be traversed one by one to find one or more stripes that use the blocks in the failed storage device 220, and reconstruction is performed on the one or more stripes found.
[0035] although Figure 4A The technical solution shown can rebuild the data in the storage system, but the execution time of the technical solution is long. For example, there may be a large number of blocks that are not allocated to build RAID stripes in the storage device 220. At this time, it is still necessary to traverse each block in the storage device 220, which leads to low reconstruction efficiency and long reconstruction time. If a fault occurs in other storage devices during reconstruction, unrecoverable data loss will occur in the storage system of 4D+1P. Thus, it is expected that the performance of the reconstruction operation can be improved and the time of the reconstruction operation can be reduced as much as possible.
[0036] In order to solve the above-mentioned defects, the implementation of the present disclosure provides a method, device and computer program product for managing a storage system. In the following, the specific implementation of the present disclosure will be described in detail. According to an implementation of the content of the present disclosure, a method for managing a storage system is provided. The storage system includes multiple stripes, and multiple blocks included in one stripe among the multiple stripes are respectively located in multiple storage devices in the storage system, and the storage system includes address mappings between the stripes and the multiple storage devices where the multiple blocks are respectively located. In this method, the concept of a reconstruction queue is proposed, and the reconstruction list here includes stripes to be reconstructed in the storage system.
[0037] On the one hand, there may be blocks in the storage device that are not allocated for building RAID stripes. At this time, by traversing the RAID stripes in the address map to build a reconstruction queue, the additional overhead of processing the unallocated blocks in the storage device can be avoided. On the other hand, the reconstruction queue can be used to perform reconstruction operations on multiple stripes in the reconstruction queue in parallel, so that the stripes in the storage system can be rebuilt in a more efficient manner. Using the exemplary implementation of the present disclosure, the performance of the reconstruction operation can be improved and the time overhead of the reconstruction operation can be reduced.
[0038] In the following, we will refer to Figure 4B An overview of an illustrative implementation of the present disclosure is described. Figure 4B A block diagram 400B for managing a storage system according to an implementation of the present disclosure is schematically shown. Figure 4B As shown, multiple stripes in the address map 330 can be traversed. Here, the stripe may include multiple blocks, and the number of blocks is determined based on the RAID used. For a 4D+1P storage system, the stripe may include 4+1=5 blocks. For a block among the multiple blocks, the storage device where the block is located in the multiple storage devices can be determined based on the address mapping. For example, RAID stripe 1 may include 5 blocks, and each block can be processed one by one. It can be first determined based on the address map 330 which storage device among the multiple storage devices the block D11 is located in, and at this time it can be determined that D11 is located in the device 220.
[0039] Then, it can be determined whether the storage device 220 is a failed storage device. Assuming that the storage device 220 fails, the RAID stripe 1 can be added to the reconstruction list 410 of the storage system. It will be understood that in a 4D+1P storage system, only one storage device is allowed to fail. When two or more storage devices fail, an unrecoverable error will occur. Therefore, when a storage device is found to fail, a reconstruction operation needs to be started. If a 4D+2P storage system is used, two storage devices are allowed to fail at the same time. At this time, the reconstruction operation can be started when one failed storage device is found or when two failed storage devices are found.
[0040] Then, the subsequent stripes in the address map 330 can be processed continuously. For example, RAID stripe 2 includes blocks D01, D12, D23, D34, and D45. It can be determined one by one whether the storage device where each block is located has failed. If the storage device where block D01 is located has not failed, the next block D12 can be processed. Since block D12 is located in the failed storage device 220, RAID stripe 2 can be added to the reconstruction list 410. Other stripes in the address map 330 can be processed in a similar manner. Further, the storage system can be rebuilt based on the stripes in the reconstruction list 410.
[0041] It will be understood that although the resource pool 270 of a RAID-based storage system is used as an example to describe the implementation for managing the storage system in the context of the present disclosure, the exemplary implementation according to the present disclosure can also be implemented in other resource pools including other numbers of storage devices.
[0042] Figure 5 A flowchart of a method 500 for managing a storage system according to an implementation of the present disclosure is schematically shown. The storage system herein may include multiple stripes. For example, the storage system may include Figure 4B RAID stripe 1 and RAID stripe 2 are shown. Multiple blocks included in one of the multiple stripes are respectively located in multiple storage devices in the storage system. For example, block D11 in RAID stripe 1 can be located in storage device 220, block D22 can be located in storage device 230, block D33 can be located in storage device 240, and block D44 can be located in storage device 250, and block D55 can be located in storage device 260. The storage system includes an address mapping 330 between the multiple storage devices where the stripes and the multiple blocks are respectively located.
[0043] At box 510, for a block among the multiple blocks, a storage device in which the block is located among the multiple storage devices is determined based on the address mapping 330. Based on the address mapping 330, it can be known that the suffix of the block identifier can respectively represent the identifier of the storage device in which the block is located, and the address of the block in the storage device. For example, for block D01, the first suffix "0" can indicate that the block D01 is located in the storage device with an identifier of "0", and the second suffix "1" can indicate that the block D01 is the first block in the storage device. For another example, for block D21, the first suffix "2" can indicate that the block D21 is located in the storage device with an identifier of "2", and the second suffix "1" can indicate that the block D21 is the first block in the storage device.
[0044] At block 520, it may be determined whether the storage device is a failed storage device. It may be determined whether a failure has occurred in the storage device based on the identifier of the storage device determined in block 520. If a failure has occurred, the storage device is a failed storage device, and the method 500 proceeds to block 530. At block 530, if it is determined that the storage device is a failed storage device, the stripe is added to the reconstruction list 410 of the storage system, where the reconstruction list 410 may include stripes in the storage system that are to be reconstructed.
[0045] According to an exemplary implementation of the present disclosure, each stripe in the address map 330 may be traversed, and the processes described at boxes 510, 520, and 530 may be performed for each stripe of the storage system. At this point, the reconstruction queue 410 may include one or more stripes to be reconstructed. Then, at box 540, the storage system is reconstructed based on the stripes in the reconstruction list 410. During the reconstruction operation, the reconstruction operation may be performed for each stripe in the reconstruction list 410 in a parallel, serial, or a combination of parallel and serial. In order to rebuild the storage system based on the stripes in the reconstruction list 410, a free block for rebuilding a block may be selected from a group of storage devices other than the failed storage device among the plurality of storage devices, and the data in the block may be reconstructed to the selected free block.
[0046] According to an exemplary implementation of the present disclosure, since it is necessary to ensure the load balance of multiple storage devices, free blocks can be preferentially selected from storage devices with lower workloads. Specifically, the workload of a group of storage devices can be determined first. The workload here can include many aspects. For example, the workload of the storage device can be determined based on the storage space that has been used in the storage device. Alternatively and / or additionally, the workload can also be determined based on other states such as the processing resources and bandwidth of the storage device. The predetermined condition here can be to select the storage device with the lowest workload. Alternatively and / or additionally, the predetermined condition can also be to select a storage device with a lower workload. The storage device with the lowest / lower workload in a group of storage devices can be determined, and free blocks can be selected from the determined storage devices.
[0047] By using the exemplary implementation of the present disclosure, it is possible to ensure that the reconstruction process of the storage system can work in a manner that makes the workload of multiple storage devices as balanced as possible. On the one hand, the storage devices with lower workloads among the multiple storage devices can be used as much as possible to improve the response speed, and on the other hand, it is possible to ensure that the wear states of the multiple storage devices are as consistent as possible.
[0048] According to the exemplary implementation of the present disclosure, the reconstruction operation should comply with the RAID standard. In other words, the multiple blocks in the reconstructed RAID stripe should be located in different storage devices. Therefore, it is necessary to ensure that the free blocks and other blocks in the stripe are located in different storage devices. Specifically, if it is determined that the storage device with a lower workload is different from the storage device where any block in the stripe is located, a free block can be selected from the storage device. Using the exemplary implementation of the present disclosure, it can be ensured that the multiple blocks in the reconstructed stripe are located in different storage devices. In this way, when a storage device where a block in the reconstructed stripe is located fails, reconstruction can be performed again based on the method 500 of the present disclosure.
[0049] It will be appreciated that, during the initialization phase of the storage system, the address mapping 330 may have been established (i.e., blocks have been allocated to the RAID stripe), but no data has been written to the stripe. At this point, the stripe may be considered unused. If a write request has written data to the stripe, the stripe may be considered used. According to an exemplary implementation of the present disclosure, a metadata bitmap may be established, wherein a bit in the metadata bitmap is used to indicate whether a stripe among multiple stripes is used. In the following, reference will be made to the description of the metadata bitmap. Figure 6 Provides more details about the metadata bitmap.
[0050] Figure 6 A block diagram 600 of a metadata bitmap according to an implementation of the present disclosure is schematically shown. Figure 6 As shown, metadata bitmap 610 may include multiple bits, one of which may be used to indicate whether a stripe among multiple stripes is in use. During the initialization operation of the storage system, the metadata bitmap is set to indicate that none of the multiple stripes are in use (e.g., represented by a blank legend). During the operation of the storage system, if a write request to write target data to a stripe is received, the target data may be written to the stripe. For example, if a write request to write data to RAID stripe 1 is received, the data may be written to RAID stripe 1, and bit 612 corresponding to RAID stripe 1 in metadata bitmap 610 may be updated to indicate that the stripe has been in use. Figure 6 As shown, the updated bit 612 is shown in a shaded legend. According to an exemplary implementation of the present disclosure, for example, 1 may be used to indicate that a stripe is not used, and 0 may be used to indicate that a stripe is used. According to an exemplary implementation of the present disclosure, other representations may also be used.
[0051] During the operation of the storage system, data can also be written to other RAID stripes in the storage system. If a write request to write data to RAID stripe 2 is received, data can be written to the RAID stripe 2, and the bit 614 corresponding to the RAID stripe 2 in the metadata bitmap 610 is updated to indicate that the stripe has been used. Using the exemplary implementation of the present disclosure, the metadata bitmap 610 can be used to indicate whether the stripe is used. Therefore, in the process of traversing the address map 330, it can be determined based on the metadata bitmap whether the stripe has been used, and subsequent operations are performed only for the stripe that has been used.
[0052] By using the exemplary implementation of the present disclosure, it is not necessary to perform a reconstruction operation on unused stripes, so that unused stripes can be skipped and the overall performance of the reconstruction operation can be improved. When the storage system is just starting to run, there may be a large number of unused stripes and only a few stripes have data written to them. By using the metadata bitmap, it is easy to distinguish which stripes have been used when executing method 500, thereby improving the performance of the reconstruction operation.
[0053] According to an exemplary implementation of the present disclosure, in order to reconstruct the data in the block to the selected free block, it can be determined based on the metadata bitmap 610 whether the stripe is in use. If it is determined that the stripe has been used, the data in the block is reconstructed to the selected free block based on the data in a group of blocks other than the blocks in the stripe. For example, for RAID stripe 1 in the reconstruction list, it can be known based on bit 612 in the metadata bitmap 610 that the RAID stripe 1 has been used. At this time, the data in the stripe needs to be rebuilt. Since the data in block D11 has been damaged due to the location of block D11 in the faulty storage device, the data in block D11 can be restored based on the data in blocks D22, D33, D44 and D55 located in the normal storage device (for example, it can be performed based on an XOR operation).
[0054] For another example, for RAID stripe 2 in the reconstruction list, based on bit 614 in metadata bitmap 610, it can be known that RAID stripe 2 has been used. At this time, the data in the stripe needs to be rebuilt. Since block D12 is located in a failed storage device, the data in block D12 has been damaged, and the data in block D12 can be restored based on the data in blocks D01, D23, D34, and D45.
[0055] According to an exemplary implementation of the present disclosure, if it is determined that the stripe is not in use, "NULL" is written to the free block. It is not necessary to actually perform an XOR operation to recover the data, but it is only necessary to mark the data in the free block as invalid. Although not shown in the accompanying drawings, the address map 330 may also include more stripes. Assume that the address map 330 includes RAID stripe 3 (D02, D13, D24, D35, D46), and stripe 3 is not in use. Although stripe 3 includes block D13 located in the failed storage device 220, it can be determined based on the metadata bitmap 610 that stripe 3 is not in use, and then "NULL" can be written to the free block.
[0056] It will be understood that since only the actual data reconstruction (for example, based on the XOR operation) will cause computing resources and time overhead in the storage system, and writing "null" does not generate additional computing resources and time overhead, using the exemplary implementation of the present disclosure, the reconstruction operation for unused blocks can be skipped to reduce the reconstruction time.
[0057] According to an exemplary implementation of the present disclosure, in order to improve the access performance of the storage system, multiple servers can be used to provide data writing services and data reading services to users of the storage system. For example, the storage system may include a first server and a second server, and the two servers can serve multiple data access requests in parallel. Each server may include its own metadata bitmap, for example, the first server may include a first metadata bitmap, and the second server may include a second metadata bitmap.
[0058] It will be understood that, since the two servers can serve different write requests in parallel, it is necessary to ensure the consistency of the first metadata bitmap and the second metadata bitmap. According to the exemplary implementation of the present disclosure, if the metadata bitmap at one server is updated, the updated metadata bitmap can be synchronized to the other server. Using the exemplary implementation of the present disclosure, on the one hand, it can be ensured that multiple servers can provide data access services in parallel, and on the other hand, it can also be ensured that each server can operate based on the latest usage status of the RAID stripe. In this way, the stability of the storage system operation and data consistency can be ensured.
[0059] will understand, although Figure 4B Schematically shows that the blocks in the stripe and the blocks in the storage device have the same size. The size of the blocks in the stripe can also be smaller than the blocks in the storage device. According to an exemplary implementation of the present disclosure, the blocks in the stripe can be obtained by dividing one device block among multiple device blocks. Figure 7 Describe in more detail.
[0060] Figure 7 A block diagram 700 schematically shows the relationship between device blocks in a storage device and blocks in a stripe according to an implementation of the present disclosure. For ease of description, Figure 7 Only five storage devices 710, 720, 730, 740 and 750 for constructing a 4D+1P RAID storage system are schematically shown. Each storage device may include one or more device blocks. Figure 7 Only one device block among the device blocks is schematically shown.
[0061] like Figure 7As shown, storage devices 710, 720, 730, 740 and 750 may include device blocks 712, 722, 732, 742 and 752, respectively. RAID stripes may be constructed based on the above-mentioned device blocks 712, 722, 732, 742 and 752. For example, device blocks 712, 722, 732, 742 may be used to store data, and device block 752 may be used to store verification. It will be understood that, since device blocks generally have a large capacity, device blocks may be divided into sub-blocks for ease of management. For example, each device block may be divided into N (N is an integer) sub-blocks, where the size of each sub-block is 1 / N of the device block.
[0062] Sub-blocks 714, 724, 734, 744, and 754 are from device blocks 712, 722, 732, 742, and 752, respectively. RAID stripes can be constructed based on sub-blocks 714, 724, 734, 744, and 754 to provide a more fine-grained storage space management unit. In other words, RAID stripes 760, 762, ..., and 764 can be constructed based on sub-blocks spanning multiple storage devices. At this time, the storage space of the RAID stripes in the address map 330 can have a finer granularity.
[0063] Utilizing the exemplary implementation of the present disclosure, when traversing the address map 330, since the RAID stripe has a finer granularity at this time, the reconstruction process can be controlled at a finer granularity. For the prior art solution that performs reconstruction on the entire device block, once a portion of the device block is used (for example, only 1% of the space is used), the entire device block needs to be rebuilt. Different from the prior art solution, since the RAID stripe in the present disclosure is constructed based on the sub-blocks of the device block, at this time, only the RAID stripe where the used portion is located needs to be rebuilt. For the unused stripes, it is not necessary to actually perform the reconstruction operation, but only to write "empty" to the free blocks.
[0064] Specifically, assume that 1% of the device blocks are used, and the remaining 99% are not used. If the device blocks are divided into 100 sub-blocks, 100 RAID stripes can be generated. When a reconstruction operation needs to be performed, only one used stripe among the 100 RAID stripes needs to be reconstructed. Using the exemplary implementation of the present disclosure, the reconstruction operation can be managed at a finer granularity, thereby improving the performance of the reconstruction operation and reducing the time of the reconstruction operation.
[0065] The above has described how to process a block in a RAID stripe. Figure 8 Describes how to traverse each RAID stripe in the address map and perform processing. Figure 8The flowchart of a method 800 for managing a storage system according to an implementation of the present disclosure is schematically shown. Each RAID stripe in the address map may be traversed, and the method 800 may be executed for each stripe.
[0066] At box 810, a plurality of blocks in a RAID stripe in a storage system may be obtained. At box 820, a counter i may be set so as to process each of the plurality of blocks one by one. Initially, i may be set to 1. At box 830, it may be determined whether a failure has occurred in the storage device where the i-th block is located. If a failure is determined, the method 800 proceeds to box 840 to add the RAID stripe to a reconstruction queue. If a failure is determined not to have occurred, the method 800 proceeds to box 850 to determine whether all blocks in the RAID stripe have been processed. If the determination result is no, the method 800 proceeds to box 850 to determine whether all blocks have been processed. At box 850, if the determination result is no, the method 800 proceeds to box 860 to process the next block. If the determination result is yes, the method 800 proceeds to box 870 to process the next RAID stripe in the storage system.
[0067] Using the exemplary implementation of the present disclosure, blocks in each of the plurality of RAID stripes may be processed one by one according to method 800. In this way, all RAID stripes in the storage system including blocks located in a failed storage device may be added to the reconstruction queue 410. It will be appreciated that the reconstruction list 410 may include a plurality of stripes, and in this case, the plurality of stripes may be reconstructed in parallel. Fig. 9 Describes more details about the rebuild operation.
[0068] Fig. 9 A block diagram 900 schematically illustrates a process of rebuilding stripes in the rebuild list 410 according to an implementation of the present disclosure. Assuming that the address map includes only RAID stripes 1 and 2 as shown by reference numerals 910 and 920, respectively, the two stripes can be rebuilt in parallel. Fig. 9 As shown, RAID stripe 1 includes blocks D11, D22, D33, D44, and D55. Since the storage device 220 where block D11 is located fails, a free block can be selected from the storage system for reconstruction. Based on load balancing and RAID requirements, a free block D09 located in the storage device 210 can be selected, and the data in block D11 can be reconstructed based on an XOR operation. In this way, RAID stripe 1 can be reconstructed.
[0069] RAID stripe 2 includes blocks D01, D12, D23, D34, and D45. Since the storage device 220 where block D12 is located fails, it is necessary to select a free block from the storage system for reconstruction. Based on load balancing and RAID requirements, a free block D59 located in the storage device 260 can be selected, and the data in block D12 can be reconstructed based on an XOR operation. Operations for reconstructing stripe 1 and stripe 2 can be performed in parallel. By using the exemplary implementation of the present disclosure, the parallelism of the reconstruction operation can be improved, thereby improving the performance of the reconstruction operation.
[0070] It will be understood that although the above only refers to Fig. 9 The schematic diagram shows the case where the reconstruction list includes only two stripes. The reconstruction list 410 may include more stripes, and in this case, multiple stripes may be reconstructed in a serial, parallel, or a combination of serial and parallel modes. Fig. 9 The reconstruction list 410 only schematically shows the case where it only includes used stripes, and the reconstruction list 410 may also include unused stripes. At this time, when reconstructing unused stripes, "empty" may be written into the selected free block without performing an XOR operation.
[0071] According to an exemplary implementation of the present disclosure, it is also possible to first determine whether the stripe involved in the faulty storage device is in use. If the stripe is in use, the stripe is added to the reconstruction list 410. If the stripe is not in use, a free block can be directly selected and "empty" can be written to the free block.
[0072] It will be appreciated that after a rebuild operation has been performed, the blocks included in the stripe will have changed, thus requiring the address map to be updated based on the blocks currently included in the RAID stripe. Fig.10 A block diagram 1000 schematically illustrates an address map updated based on a rebuilt stripe according to one implementation of the present disclosure. Since the block D11 in RAID stripe 1 has been replaced with the block D09, and the block D12 in RAID stripe 2 has been replaced with the block D59, in the updated address map 1010, RAID stripe 1 will include blocks (D09, D22, D33, D44, D55), and RAID stripe 2 will include blocks (D01, D59, D23, D34, D45).
[0073] Using the exemplary implementation of the present disclosure, the updated address mapping 1010 can reflect the latest mapping relationship between each RAID stripe and block in the storage system. Based on the updated address mapping 1010, subsequent data read requests and data write requests can be served.
[0074] According to an exemplary implementation of the present disclosure, the method 500 described above can be executed when it is determined that a storage device in a plurality of storage devices fails. It will be understood that the present disclosure provides a technical solution for rebuilding data, and the rebuilding operation will only be started when a failed storage device appears in the storage system. Therefore, if no failed storage device appears in the storage system, the storage system can operate in a conventional manner. Once a failed storage device is found in the storage system, the method 500 described above can be executed.
[0075] According to the exemplary implementation of the present disclosure, the method 500 can perform the reconstruction operation with higher performance, which can reduce the time overhead of the reconstruction operation on the one hand, and can also minimize the possibility of another storage device failure in the storage system during the reconstruction operation on the other hand. In this way, it can ensure that the storage system operates with higher performance and reliability.
[0076] See above for Figures 2 to 10 An example of a method according to the present disclosure is described in detail, and an implementation of a corresponding apparatus will be described below. According to an exemplary implementation of the present disclosure, an apparatus for managing a storage system is provided. The storage system includes a plurality of stripes, a plurality of blocks included in a stripe among the plurality of stripes are respectively located in a plurality of storage devices in the storage system, and the storage system includes an address mapping between the plurality of storage devices representing the stripes and the plurality of blocks respectively located. The apparatus includes: a determination module configured to determine, for one of the plurality of blocks, a storage device where a block among the plurality of storage devices is located based on the address mapping; a adding module configured to add the stripe to a reconstruction list of the storage system based on determining that the storage device is a faulty storage device, the reconstruction list including the stripes to be reconstructed in the storage system; and a reconstruction module configured to rebuild the storage system based on the stripes in the reconstruction list.
[0077] According to an exemplary implementation of the present disclosure, the reconstruction module includes: a selection module, configured to select a free block for rebuilding a block from a group of storage devices other than a faulty storage device among multiple storage devices; a data reconstruction module, configured to reconstruct the data in the block to the selected free block; and an update module, configured to update the address mapping based on the address of the free block.
[0078] According to an exemplary implementation of the present disclosure, the selection module includes: a load module, configured to determine the workload of a group of storage devices; a storage device selection module, configured to determine a storage device in a group of storage devices whose workload meets a predetermined condition; and a block selection module, configured to select a free block from the determined storage devices.
[0079] According to an exemplary implementation of the present disclosure, the storage device selection module is further configured to determine the storage device based on determining that the storage device is different from the storage device where any block in the stripe is located.
[0080] According to an exemplary implementation of the present disclosure, the storage system further includes a metadata bitmap, a bit in the metadata bitmap is used to indicate whether one of the multiple stripes is used, and the device further includes: a setting module, configured to set the metadata bitmap to indicate that none of the multiple stripes are used during the initialization operation of the storage system; a write module, configured to write target data to the stripe based on a write request received to write the target data to the stripe; and a metadata update module, configured to update the bit corresponding to the stripe in the metadata bitmap to indicate that the stripe has been used.
[0081] According to an exemplary implementation of the present disclosure, a data reconstruction module includes: a usage status determination module, configured to determine whether a stripe is used based on a metadata bitmap; an actual reconstruction module, configured to reconstruct the data in a block to a selected free block based on data in a group of blocks other than the block in the stripe, based on a determination that the stripe has been used; and a virtual reconstruction module, configured to write "NULL" to the free block, based on a determination that the stripe is not used.
[0082] According to an exemplary implementation of the present disclosure, the metadata bitmap is located at a server in the storage system for processing read requests and write requests for the storage system, the storage system further includes another server, and the device further includes: a synchronization module configured to synchronize the updated metadata bitmap to the other server based on determining that the metadata bitmap is updated.
[0083] According to an exemplary implementation of the present disclosure, a storage device among a plurality of storage devices includes a plurality of device blocks, wherein a block is obtained by dividing one device block among the plurality of device blocks.
[0084] According to an exemplary implementation of the present disclosure, the reconstruction module includes: a parallel module configured to reconstruct multiple strips in parallel according to determining that the reconstruction list includes multiple strips.
[0085] According to an exemplary implementation of the present disclosure, the apparatus is invoked based on determining that a storage device among a plurality of storage devices fails.
[0086] Fig.11A block diagram of a device 1100 for managing a storage system according to an exemplary implementation of the present disclosure is schematically shown. As shown, the device 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 1102 or computer program instructions loaded from a storage unit 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0087] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0088] The various processes and processing described above, such as methods 500 and 800, may be performed by the processing unit 1101. For example, in some implementations, methods 500 and 800 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some implementations, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the CPU 1101, one or more steps of the methods 500 and 800 described above may be performed. Alternatively, in other implementations, the CPU 1101 may also be configured in any other appropriate manner to implement the above-described processes / methods.
[0089] According to an exemplary implementation of the present disclosure, a device for managing a storage system is provided. The storage system includes multiple stripes, multiple blocks included in one of the multiple stripes are respectively located in multiple storage devices in the storage system, and the storage system includes address mappings representing the stripes and the multiple storage devices where the multiple blocks are respectively located. The device includes: at least one processor; and a memory coupled to the at least one processor, the memory having instructions stored therein, and the instructions, when executed by the at least one processor, cause the device to perform an action. The action includes: determining the storage device where the blocks in the multiple storage devices are located based on the address mapping; adding the stripe to a reconstruction list of the storage system based on determining that the storage device is a faulty storage device, the reconstruction list including the stripes to be reconstructed in the storage system; and rebuilding the storage system based on the stripes in the reconstruction list.
[0090] According to an exemplary implementation of the present disclosure, rebuilding a storage system based on stripes in a reconstruction list includes: selecting a free block for rebuilding a block from a group of storage devices other than a failed storage device among multiple storage devices; rebuilding data in the block to the selected free block; and updating an address mapping based on the address of the free block.
[0091] According to an exemplary implementation of the present disclosure, selecting a free block for rebuilding a block includes: determining a workload of a group of storage devices; determining a storage device in the group of storage devices whose workload meets a predetermined condition; and selecting a free block from the determined storage devices.
[0092] According to an exemplary implementation of the present disclosure, determining a storage device in a group of storage devices whose workload meets a predetermined condition includes: determining a storage device based on determining that the storage device is different from a storage device where any block in a stripe is located.
[0093] According to an exemplary implementation of the present disclosure, the storage system further includes a metadata bitmap, a bit in the metadata bitmap is used to indicate whether one of the multiple stripes is used, and the actions further include: during the initialization operation of the storage system, setting the metadata bitmap to indicate that none of the multiple stripes are used; writing the target data to the stripe in response to receiving a write request to write the target data to the stripe; and updating the bit corresponding to the stripe in the metadata bitmap to indicate that the stripe has been used.
[0094] According to an exemplary implementation of the present disclosure, reconstructing data in a block to a selected free block includes: determining whether a stripe is used according to a metadata bitmap; based on determining that the stripe has been used, reconstructing the data in the block to a selected free block based on data in a group of blocks other than the blocks in the stripe; and writing "empty" to the free block according to determining that the stripe is not used.
[0095] According to an exemplary implementation of the present disclosure, the metadata bitmap is located at a server in the storage system for processing read requests and write requests for the storage system, the storage system further includes another server, and the action further includes: based on determining that the metadata bitmap is updated, synchronizing the updated metadata bitmap to the other server.
[0096] According to an exemplary implementation of the present disclosure, a storage device among a plurality of storage devices includes a plurality of device blocks, wherein a block is obtained by dividing one device block among the plurality of device blocks.
[0097] According to an exemplary implementation of the present disclosure, rebuilding a storage system based on stripes in a reconstruction list includes: rebuilding the multiple stripes in parallel based on determining that the reconstruction list includes multiple stripes.
[0098] According to an exemplary implementation of the present disclosure, the action further includes: executing the action according to determining that a storage device among the plurality of storage devices fails.
[0099] According to an exemplary implementation of the present disclosure, a computer program product is provided, which is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions for executing a method according to the present disclosure.
[0100] According to an exemplary implementation of the present disclosure, a computer-readable medium is provided. The computer-readable medium stores machine-executable instructions, and when the machine-executable instructions are executed by at least one processor, the at least one processor implements the method according to the present disclosure.
[0101] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0102] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0103] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0104] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state 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 "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of 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., using an Internet service provider to connect via the Internet). In some implementations, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0105] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0106] 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 device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0107] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are 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 implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0108] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0109] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the implementations disclosed herein.
Claims
1. A method for managing a storage system, the storage system comprising a plurality of stripes, a plurality of blocks included in one of the plurality of stripes being respectively located in a plurality of storage devices in the storage system, the storage system comprising an address mapping indicating the stripe and the plurality of storage devices where the plurality of blocks are respectively located, the method comprising: For a block among the plurality of blocks, determining a storage device in which the block is located among the plurality of storage devices based on the address mapping; According to determining that the storage device is a faulty storage device, adding the stripe to a reconstruction list of the storage system, the reconstruction list including stripes to be reconstructed in the storage system; as well as Rebuilding the storage system based on the stripes in the reconstruction list; The storage system further comprises a metadata bitmap, wherein a bit in the metadata bitmap is used to indicate whether a stripe in the plurality of stripes is used; and The metadata bitmap is located at a server in the storage system for processing read requests and write requests for the storage system, the storage system further includes another server for processing read requests and write requests for the storage system, and the method further includes: Based on determining that the metadata bitmap is updated, the updated metadata bitmap is synchronized with the other server.
2. The method according to claim 1, wherein rebuilding the storage system based on the stripes in the reconstruction list comprises: Selecting a free block for rebuilding the block from a group of storage devices other than the failed storage device among the plurality of storage devices; Reconstructing the data in the block to the selected free block; as well as Based on the address of the free block, the address map is updated.
3. The method of claim 2, wherein selecting a free block for rebuilding the block comprises: determining a workload of the set of storage devices; Determining a storage device in the group of storage devices whose workload satisfies a predetermined condition; as well as The free block is selected from the determined storage device.
4. The method according to claim 3, wherein determining a storage device in the group of storage devices whose workload satisfies a predetermined condition comprises: The storage device is determined based on determining that the storage device is different from the storage device where any block in the stripe is located.
5. The method according to claim 2, further comprising: During an initialization operation of the storage system, setting the metadata bitmap to indicate that none of the plurality of stripes are in use; Writing the target data into the stripe according to a write request received to write the target data into the stripe; as well as The bit corresponding to the stripe in the metadata bitmap is updated to indicate that the stripe has been used.
6. The method according to claim 5, wherein rebuilding the data in the block to the selected free block comprises: Determining whether the stripe is used according to the metadata bitmap; Reconstructing the data in the block to the selected free block based on data in a group of blocks other than the block in the stripe according to determining that the stripe has been used; as well as Based on determining that the stripe is not in use, "empty" is written into the free block. 7 . The method according to claim 1 , wherein a storage device among the plurality of storage devices comprises a plurality of device blocks, wherein the block is obtained by dividing one device block among the plurality of device blocks.
8. The method according to claim 1, wherein rebuilding the storage system based on the stripes in the reconstruction list comprises: According to determining that the reconstruction list includes a plurality of stripes, the plurality of stripes are reconstructed in parallel.
9. The method according to claim 1, further comprising: Determining based on the address mapping that a second block is located in the storage device, the second block belonging to a second stripe; After determining that the second block is located in the storage device, determining that the second stripe is unused; as well as Adding the second stripe to the reconstruction list is avoided in response to determining that the second stripe is unused.
10. The method of claim 9, wherein determining that the second stripe is unused comprises: A bit in the metadata bitmap is checked, the bit corresponding to the second stripe.
11. A device for managing a storage system, the storage system comprising a plurality of stripes, a plurality of blocks included in one of the plurality of stripes being respectively located in a plurality of storage devices in the storage system, the storage system comprising an address mapping indicating the stripe and the plurality of storage devices where the plurality of blocks are respectively located, the device comprising: at least one processor; as well as a memory coupled to the at least one processor, the memory having instructions stored therein, the instructions, when executed by the at least one processor, causing the device to perform actions, the actions comprising: determining a storage device in which the block is located among the plurality of storage devices based on the address mapping; According to determining that the storage device is a faulty storage device, adding the stripe to a reconstruction list of the storage system, the reconstruction list including stripes to be reconstructed in the storage system; and Rebuilding the storage system based on the stripes in the reconstruction list; The storage system further comprises a metadata bitmap, wherein a bit in the metadata bitmap is used to indicate whether a stripe in the plurality of stripes is used; and The metadata bitmap is located at a server in the storage system for processing read requests and write requests for the storage system, the storage system further includes another server for processing read requests and write requests for the storage system, and the actions further include: Based on determining that the metadata bitmap is updated, the updated metadata bitmap is synchronized with the other server.
12. The device of claim 11, wherein rebuilding the storage system based on the stripes in the reconstruction list comprises: Selecting a free block for rebuilding the block from a group of storage devices other than the failed storage device among the plurality of storage devices; Reconstructing the data in the block to the selected free block; as well as Based on the address of the free block, the address map is updated.
13. The apparatus of claim 12, wherein selecting a free block for rebuilding the block comprises: determining a workload of the set of storage devices; Determining a storage device in the group of storage devices whose workload satisfies a predetermined condition; as well as The free block is selected from the determined storage device.
14. The device according to claim 13, wherein determining a storage device in the group of storage devices whose workload satisfies a predetermined condition comprises: The storage device is determined based on determining that the storage device is different from the storage device where any block in the stripe is located.
15. The apparatus of claim 12, further comprising: During an initialization operation of the storage system, setting the metadata bitmap to indicate that none of the plurality of stripes are in use; Writing the target data into the stripe according to a write request received to write the target data into the stripe; as well as The bit corresponding to the stripe in the metadata bitmap is updated to indicate that the stripe has been used.
16. The apparatus of claim 15, wherein rebuilding the data in the block to the selected free block comprises: Determining whether the stripe is used according to the metadata bitmap; Reconstructing the data in the block to the selected free block based on data in a group of blocks other than the block in the stripe according to determining that the stripe has been used; as well as Based on determining that the stripe is not in use, "empty" is written into the free block.
17. The device according to claim 11, wherein a storage device among the plurality of storage devices comprises a plurality of device blocks, wherein the block is obtained by dividing one device block among the plurality of device blocks.
18. The apparatus of claim 11, wherein rebuilding the storage system based on the stripes in the rebuild list comprises: According to determining that the reconstruction list includes a plurality of stripes, the plurality of stripes are reconstructed in parallel.
19. A non-transitory computer-readable medium storing an instruction set for managing a storage system, the storage system comprising a plurality of stripes, a plurality of blocks included in one of the plurality of stripes being respectively located in a plurality of storage devices in the storage system, the storage system comprising an address mapping between the stripes and the plurality of storage devices where the plurality of blocks are located, the instruction set, when executed by a computerized circuit, causing the computerized system to perform a method, the method comprising: For a block among the plurality of blocks, determining a storage device in which the block is located among the plurality of storage devices based on the address mapping; According to determining that the storage device is a faulty storage device, adding the stripe to a reconstruction list of the storage system, the reconstruction list including stripes to be reconstructed in the storage system; as well as Rebuilding the storage system based on the stripes in the reconstruction list; The storage system further comprises a metadata bitmap, wherein a bit in the metadata bitmap is used to indicate whether a stripe in the plurality of stripes is used; and The metadata bitmap is located at a server in the storage system for processing read requests and write requests for the storage system, the storage system further includes another server for processing read requests and write requests for the storage system, and the method further includes: Based on determining that the metadata bitmap is updated, the updated metadata bitmap is synchronized with the other server.
20. The non-transitory computer readable medium of claim 19, wherein the method further comprises: During an initialization operation of the storage system, setting the metadata bitmap to indicate that none of the plurality of stripes are in use; Writing the target data into the stripe according to a write request received to write the target data into the stripe; as well as The bit corresponding to the stripe in the metadata bitmap is updated to indicate that the stripe has been used.
Citation Information
Patent Citations
Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system
CN101840360A
Raid parity stripe reconstruction
US20160217040A1
Method and system for managing storage system
US20180088857A1
Method and apparatus for managing storage system
US20190220378A1
