Storage management method, device and computer program product

By selecting the anchor disk in the storage system and allocating spare slices in advance for its associated RAID, the problem of high complexity of spare slice allocation in the prior art is solved, fast and effective data recovery is achieved, and the reliability of the storage system is improved.

CN114721585BActive Publication Date: 2025-07-18EMC IP HLDG CO LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110013590.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-06
Publication Date
2025-07-18
Estimated Expiration
2041-01-06

AI Technical Summary

Technical Problem

The prior art has a high complexity when utilizing spare space, making it difficult to achieve optimal spare slice allocation, resulting in the inaccessible disk failure in the storage system.

Method used

Select an anchor disk in the storage system and assign spare slices in advance to the RAID associated with the disk. By directly backup RAID and metadata management, the backup slice determination process is simplified when the disk is not accessible.

Benefits of technology

Ensure that backup slices can be quickly and efficiently determined when disks are not accessible, avoiding additional time and space complexity, and improving the reliability of the storage system and data recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721585B_ABST
    Figure CN114721585B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a storage management method, an electronic device, and a computer program product. The method includes selecting a first disk as an anchor disk from a plurality of disks of a storage system; allocating a first spare slice from the plurality of disks to an independent disk redundant array (RAID) associated with the first disk, the first RAID including at least slices allocated from the first disk; and if an inaccessible disk is detected among the plurality of disks, determining a spare slice for a slice of the inaccessible disk based on the allocation of the first spare slice of the first RAID for data reconstruction for the inaccessible disk. This can ensure that a spare slice for a slice of an inaccessible disk can always be successfully determined and no additional time complexity is introduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure generally relate to storage systems, and more particularly, to a storage management method, an electronic device, and a computer program product. Background Art

[0002] Redundant Array of Independent Disks (RAID) technology is a data storage virtualization technology that is commonly used to provide various features such as data redundancy and performance improvement. With the development of RAID technology, RAID performs data reading and writing at the slice level of disks rather than at the disk level. Specifically, each of multiple disks in a storage system is divided into multiple slices. Multiple slices from different disks are used to create a RAID to read or write data to it by using a RAID algorithm. Usually, some slices are reserved in the storage system as spare space to cope with the occurrence of failures. In this way, when a disk fails, slices can be allocated from the spare space for the data of the failed disk, thus avoiding the loss of user data.

[0003] Currently, there are problems such as high complexity and difficulty in achieving optimal spare when using spare space. Therefore, there is still a need for a more optimized spare space management scheme. Summary of the Invention

[0004] Embodiments of the present disclosure relate to a storage management scheme.

[0005] In a first aspect of the present disclosure, a storage management method is provided. The method includes: selecting a first disk as an anchor disk from multiple disks of a storage system; allocating a first spare slice from the multiple disks to an independent disk redundant array (RAID) associated with the first disk, the first RAID including at least slices allocated from the first disk; and if an inaccessible disk is detected among the multiple disks, determining a spare slice for a slice of the inaccessible disk based on the allocation of the first spare slice of the first RAID for data reconstruction for the inaccessible disk

[0006] In a second aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processor and at least one memory storing computer program instructions. The at least one memory and the computer program instructions are configured to, together with the at least one processor, cause the electronic device to perform operations. The operations include: selecting a first disk as an anchor disk from multiple disks of a storage system; allocating a first spare slice from the multiple disks to an independent disk redundant array (RAID) associated with the first disk, the first RAID including at least slices allocated from the first disk; and if an inaccessible disk is detected among the multiple disks, determining a spare slice for a slice of the inaccessible disk based on the allocation of the first spare slice of the first RAID for data reconstruction for the inaccessible disk

[0007] In a third aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored on a computer-readable storage medium and includes computer-executable instructions that, when executed by a processor of a device, cause the device to perform the method of the first aspect.

[0008] It should be understood that the content described in the Summary of the Invention section is not intended to limit the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] By referring to the accompanying drawings and reading the following detailed description, the above and other objects, features, and advantages of the embodiments of the present disclosure will become readily understood. In the drawings, several embodiments of the present disclosure are shown by way of illustration and not limitation, in which:

[0010] Figure 1 A block diagram showing an example storage environment in which embodiments of the present disclosure may be implemented;

[0011] Figure 2 An example of allocating a spare slice for an inaccessible disk in a storage system;

[0012] Figure 3 A flowchart showing a storage management method according to some embodiments of the present disclosure;

[0013] Figure 4 An example of allocating a spare slice of an anchor disk according to some embodiments of the present disclosure;

[0014] Figure 5 An example of performing spare slice determination for an anchor disk according to some embodiments of the present disclosure;

[0015] Figure 6A An example of performing spare slice determination for a normal disk according to some embodiments of the present disclosure;

[0016] Figure 6B Another example of performing spare slice determination for a normal disk according to some embodiments of the present disclosure;

[0017] Figure 7A An example of adjusting slice allocation when adding a new disk according to some embodiments of the present disclosure;

[0018] Figure 7B Another example of adjusting slice allocation when adding a new disk according to some embodiments of the present disclosure;

[0019] Figure 8AShows an example of the adjustment of spare slices when adding a new disk after data reconstruction according to some embodiments of the present disclosure;

[0020] Figure 8B Shows another example of the adjustment of spare slices when adding a new disk after data reconstruction according to some embodiments of the present disclosure; and

[0021] Figure 9 Shows a schematic block diagram of a device that can be used to implement the embodiments of the present disclosure.

[0022] Throughout all the figures, the same or similar reference numerals are used to denote the same or similar components. Detailed implementation manners

[0023] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments shown in the accompanying drawings. It should be understood that the description of these specific embodiments is only for enabling those skilled in the art to better understand and implement the present disclosure, rather than limiting the scope of the present disclosure in any way.

[0024] Figure 1 Shows a schematic diagram of an exemplary storage environment 100 in which the embodiments of the present disclosure can be implemented. As Figure 1 shown, the storage environment 100 includes a storage management system 110 and a storage system 120.

[0025] The storage system 120 includes a plurality of disks 122-1, 122-2, 122-3, ……, 122-N (N is an integer greater than or equal to 1), etc., for providing the physical storage space of the storage environment 100. For the convenience of discussion, these disks are sometimes collectively or separately referred to as disks 122. The disks 122 can include various types of devices with storage functions, including but not limited to, hard disks (HDDs), solid state disks (SSDs), removable disks, compact disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks, Blu-ray disks, serial attached small computer system interface (SCSI) disks (SAS), serial advanced technology attachment (SATA) disks, any other magnetic storage devices and any other optical storage devices, or any combination thereof. The storage management system 110 is configured to control and manage the storage system 120, including the storage space allocation of the storage system 120, data access, data reconstruction, data backup, etc.

[0026] In a storage system based on Redundant Array of Independent Disks (RAID), various RAID algorithms can be utilized to organize multiple disks 122. In some embodiments, to achieve higher reliability, the number of disks involved in the data reconstruction process can be restricted. Thus, a finite number of multiple disks in the storage system 120 can be determined as a RAID Resiliency Set (RRS). Multiple RAIDs can be created on the RRS. For example, each RRS can be set to include 25 disks. If the number of disks 122 included in the storage system 120 exceeds 25, multiple additional RRSs can be created. The data reconstruction of the disks 122 between different RRSs is separate.

[0027] Generally, each disk 122 is divided into multiple slices or extents 124. Such a division can be a logical division. The size of a slice 124 depends on the capacity of the disk 122 and the division method. For example, a disk slice 124 can be 4GB. Of course, other extent sizes are possible according to actual deployment requirements.

[0028] RAIDs can be constructed at the slice 124 level. A RAID constructed at the slice level is sometimes also referred to as a RAID block or Uber, and it can also store and access data according to conventional RAID techniques. Each RAID is allocated multiple slices 124 from different disks 122 for storing information, including user data and possibly parity information. In an exemplary embodiment based on RRS, the slices allocated for each RAID can be from different disks 122 within the same RRS.

[0029] Depending on the type of RAID, the number of slices included in each RAID depends on the type of RAID to provide different levels of data redundancy and recovery capabilities. Types of RAID include RAID 2, RAID 3, RAID 4, RAID 5, RAID 6, RAID 7, RAID 10, etc. In Figure 2 and hereinafter, for purposes of explanation, an exemplary embodiment of the present disclosure is discussed in terms of the 4 + 1 RAID 5 type. RAID 5 includes 5 slices 124 for storing user data and parity information. If a slice 124 is 4GB, the size of RAID 5 is 16GB. However, it should be understood that the exemplary embodiments of the present disclosure can be similarly applied to any other type of RAID.

[0030] If a disk 122 of the storage system 120 becomes offline due to a failure or is removed, the disk 122 becomes an inaccessible disk. If one or more of the inaccessible disks are assigned to one or more RAID arrays for storage, then these RAID arrays can be marked as degraded RAID arrays. Depending on the type of RAID, a degraded RAID array may still be used for data storage. For example, RAID 5 supports continuing to operate even when one of its slices is on an inaccessible disk.

[0031] Generally, a certain amount of spare space is also reserved in the storage system 120. This part of the spare space is idle and not assigned to RAID arrays for storage. When there are inaccessible disks in the storage system 120, to ensure data is not lost, the storage management system 110 starts a spare task to determine spare slices from the spare space for the slices in the inaccessible disk 122 for data reconstruction. The slices for which spare slices are to be determined are those slices in the inaccessible disk 122 that are assigned to RAID arrays for storing information. In some implementations, when a disk 122 goes offline, the storage management system 110 starts a spare timer. After an anti-bounce time of the spare timer expires, the storage management system 110 starts the spare task.

[0032] It should be understood that Figure 1 only the units, modules, or components related to the embodiments of the present disclosure in the storage environment 100 are schematically shown. Figure 1 The various components shown in are only an example storage system management architecture. In other RAID-based storage systems, there may be other architecture partitioning methods, other units, modules, or components for other functions, and so on. Therefore, the embodiments of the present disclosure are not limited to Figure 1 the specific devices, units, modules, or components depicted, but generally apply to any storage system based on RAID technology. Figure 1 The various components shown in (except for the disks 122) can be implemented in a single or multiple computing devices.

[0033] According to a conventional solution, when performing the spare task, spare slices are determined one by one for the slices in the inaccessible disks from the spare space in a round-robin manner. An example spare slice determination process is as follows.

[0034] For a slice allocated to a RAID for storing information on an inaccessible disk, an idle slice is selected from the spare space as a spare slice. This spare slice needs to come from a destination disk different from other slices of this RAID, so as to ensure that multiple slices of this RAID are still distributed on different disks after data reconstruction. With the allocation of the spare slice, for a certain slice (e.g., DSj) on the inaccessible disk, it may not be possible to find a destination disk that has an idle slice and no slice is allocated to the RAID (assumed to be represented as RAIDj) including DSj. In this case, the loop process needs to be retraced to find a spare slice DSi and its associated RAIDi. The DSi and RAIDi to be found need to meet two conditions. First, DSi can be allocated as the spare slice of DSj. That is, no other slice on the disk where DSi is located is allocated to RAIDj. Second, a spare slice can be determined from other disks to replace DSj as the spare slice of the slice in RAIDi.

[0035] For example, assume that the storage system has 10 disks, respectively represented as D0, D1, D2, …, D9, and the RAID type created in it is RAID 5. If disk D5 is offline, the degraded RAIDi includes slices allocated from disks D1, D2, D3, D4, and D5. A spare slice from disk D0 is allocated for the slice allocated from D5 in RAIDi. Another degraded RAIDj includes slices allocated from disks D5, D6, D7, D8, and D9. When selecting a spare slice for the slice allocated from D5 in RAIDj, only an idle slice exists on disk D7. Since RAIDj already includes a slice allocated from D7, the idle slice on D7 cannot be selected as the spare slice. By tracing back the spare history, it is found that the slice of RAIDi can be spared to D7, and RAIDj can use the spare slice from disk D0 previously allocated for RAIDi. Therefore, a spare slice is re-allocated for RAIDi from disk D7, and the idle slice on disk D0 is allocated to RAIDj.

[0036] According to the conventional loop-based spare algorithm, it may lead to the inability to determine spare slices for some degraded RAIDs, even if there are still sufficient idle slices in the current storage system. Although it can be remedied by the method of going forward and rolling back the spare steps, not all situations can still be solved.

[0037] Take Figure 2 as an example for illustration. In Figure 2In the storage system 200 shown, it is assumed that there are 10 disks, denoted as D0, D1, D2, …, D9 respectively. Each disk is divided into 10 slices S0, S1, S2, ……, S9. For the convenience of description, the disk number and slice number DS(X, Y) are used to indicate slice Y in disk X. For example, DS(0, 0) refers to slice S0 in disk D0, DS(2, 3) refers to slice S3 in disk D2, and so on. The Ux marked on the slice indicates that this slice is the slice allocated to RAIDx for storing information.

[0038] In Figure 2 it is assumed that disk D5 is inaccessible due to a fault. Through the spare process, the spare slice DS(6, 8) in disk D6 is allocated to the slice Ui located on disk D5 in RAIDi, and the spare slice DS(1, 9) in disk D1 is allocated to the slice Uj located on disk D5 in RAIDj. When determining the spare slice for the slice Uk located on disk D5 in RAIDk, only the slice DS(7, 9) on disk D7 is idle. However, the slice DS(7, 9) cannot be selected because the slice DS(7, 7) on disk D7 has already been allocated to RAIDk for information storage. In this case, if we only roll back one step and analyze RAIDj and the slice DS(1, 9), we still cannot find a spare slice for RAIDk because the idle slice on disk D7 cannot be allocated to RAIDk either.

[0039] At this time, in Figure 2 the example, we can only roll back the spare process two steps to find that the idle slice DS(7, 9) on disk D7 can be allocated to RAIDi, and the idle slice DS(6, 8) in disk D6 can be allocated to RAIDj, so that finally the slice DS(1, 9) on disk D1 can be allocated to RAIDk.

[0040] According to the conventional loop method, in some special cases, it may be necessary to roll back 3 or more steps to determine the optimal spare slice allocation scheme. Assume that the number of storage disks in the storage system (or the RRS restricted for data reconstruction) is N, the number of slices to be used by each RAID is S, and the number of steps to be rolled back is M (the range of M is [1, S - 1]). The time complexity of viewing the spare history will be O(S M ). The total time complexity is O(S M ) + O(S * N). Therefore, if we need to roll back more than one step, the time complexity and computational complexity are often unacceptable.

[0041] The inventors of the present application have attempted to simulate all possible combinations of cyclic standby steps in some conventional storage systems. In different cases where the maximum number of disks in the RRS is 25 and the total number of disks in the storage system is, for example, 428, 856, 1712, 3424, 6848, etc., the inventors have found that there are a certain number of cyclic standby combinations for which it is impossible to find the optimal spare slice allocation by simply backing up one step, resulting in the failure of the spare slice allocation.

[0042] Therefore, the present disclosure proposes an improved storage management scheme. According to this scheme, an anchor disk is determined among multiple disks in the storage system. The RAID associated with the anchor disk is pre-allocated with spare slices. The direct allocation of the spare slices of the anchor disk can handle extreme cases when determining spare slices for an inaccessible disk, thus ensuring that spare slices can always be successfully determined for the slices of the inaccessible disk without introducing additional time complexity. In addition, the allocation of such spare slices does not require more spare space than that required by a conventional storage system and does not introduce additional space complexity.

[0043] Figure 3 A flowchart of a storage management method 300 according to an embodiment of the present disclosure is shown. In some embodiments, the method 300 may be implemented at the storage management system 110. For ease of description, the storage environment 100 will be referred to hereinafter Figure 1 in the following.

[0044] In block 310, the storage management system 110 selects a first disk as the anchor disk from among multiple disks 122 of the storage system 120. In some embodiments, for an RRS with a disk number limit, the anchor disk for the RRS may be selected from among multiple disks 122 of the RRS.

[0045] In some embodiments, the anchor disk may be selected as a disk 122 having a relatively large storage capacity. The storage management system 110 may select the first disk as the anchor disk based on the respective storage capacities of the multiple disks 122, such that the storage capacity of the selected first batch is greater than the storage capacity of at least one other disk. In one example, the disk 122 having the largest storage capacity may be selected as the anchor disk. In other examples, disks with a relatively high storage capacity ranking, such as the second-largest and third-largest disks 122 in terms of storage capacity, may also be selected as the anchor disk. In some cases, the anchor disk may be selected from among disks 122 having a storage capacity greater than a predetermined threshold. A relatively large storage capacity is beneficial for reserving more free slices on the anchor disk for the spare slice determination process in the event of an inaccessible disk.

[0046] At block 320, the storage management system 110 allocates spare slices (sometimes referred to as "first spare slices") from multiple disks 122 to a RAID associated with a first disk selected as an anchor disk. The RAID associated with the first disk as the anchor disk refers to a RAID that includes at least slices allocated from the first disk. Since the RAID associated with the first disk is allocated with spare slices, it can also be referred to as a directly spareable RAID.

[0047] The allocation of spare slices can be performed when creating a RAID in the storage system 120. In addition to allocating storage slices required for information storage to a RAID, if the RAID is associated with an anchor disk, spare slices are also allocated to the RAID. In some embodiments, the spare slices allocated to the RAID associated with the first disk may be located on a different disk 122 from the multiple slices allocated to the RAID disk for storing information. In some embodiments, the RAID associated with the first disk may include storage slices allocated from the first disk for storing information. For example, for RAID 5, which includes 5 storage slices for storing information (including user data and parity information), one of the slices may come from the first disk. For such a RAID 5, spare slices can be allocated to the RAID 5 from other disks among the multiple disks, and the spare slices are located on a different disk 122 from the 5 storage slices of the RAID 5. In some embodiments, the RAID associated with the first disk may include spare slices allocated from the first disk. The storage slices allocated to the RAID for storing information may come from other disks other than the first disk.

[0048] Figure 4 An example of the allocation of spare slices for an anchor disk in the storage system 120 according to some embodiments of the present disclosure is shown. Assume that the storage system 120 includes 8 disks, respectively represented as D0, D1, D2,... D7. Each disk is divided into slices, respectively represented as S0, S1, S2,... and so on. The number of slices divided for each disk depends on the unit size of the slices and the storage capacity of the disk itself. And Figure 2 Similarly, when describing Figure 4 and subsequent similar drawings, for convenience, the disk number and slice number DS(X,Y) are used to indicate slice Y in disk X. For example, DS(0,0) refers to slice S0 in disk D0, DS(2,3) refers to slice S3 in disk D2, and so on. The Ux marked on the slice indicates that the slice is a slice allocated to RAIDx, which can be a storage slice for storing information or a spare slice. In Figure 4 the example, a 4+1 RAID 5 is taken as an example.

[0049] In Figure 4Among them, it is assumed that disk D0 is selected as the anchor disk. Disks other than the anchor disk, such as disks D1 to D7, can be called ordinary disks. For RAID1 labeled with "U1", the slice D(0,0) in the anchor disk D0 is allocated as the spare slice for it. Therefore, RAID1 is associated with the anchor disk D0 and is a directly available spare RAID. RAID1 is also allocated slices in disks D1, D2, D3, D4, and D5 for storing information.

[0050] For RAID2, RAID3, RAID5, and RAID7 labeled with "U2", "U3", "U5", and "U7", since storage slices DS(0,1), DS(0,2), DS(0,3), and DS(0,4) for storing information are respectively allocated to these RAIDs from the first disk, spare slices DS(1,1), DS(2,3), DS(3,4), and DS(4,1) are also respectively allocated to these RAIDs.

[0051] In some embodiments, if there are multiple RAIDs associated with the anchor disk, when allocating spare slices for the multiple RAIDs in the multiple disks 122, the multiple spare slices are substantially evenly distributed in the multiple disks 122. When not used for data reconstruction, the spare slices are idle. If too many idle spare slices are concentrated in a single or a few disks, it may cause the access frequency of this or these disks to decrease because this or these disks do not store more data. Therefore, the even distribution of the spare slices helps to make the access operations be as evenly distributed as possible in the multiple disks 122.

[0052] In some embodiments, after allocating the spare slices, the storage management system 110 can also generate and store metadata for the RAIDs associated with the anchor disk. The metadata marks the RAIDs associated with the anchor disk as directly available for spare. The metadata can also mark the spare slices allocated to the directly available spare RAIDs. In this way, in the subsequent process, especially when determining the spare slices in case of an inaccessible disk, the storage management system 110 can perform the spare slice determination process based on the metadata.

[0053] In block 330, the storage management system 110 detects whether there is an inaccessible disk among the multiple disks 122. Due to reasons such as a fault or being pulled out, the disk 122 may become offline. Such a disk is inaccessible.

[0054] If there is no inaccessible disk, the storage system 120 can continue to operate normally. If it is detected that there is an inaccessible disk among the multiple disks, in block 340, the storage management system 110 determines the spare slices for the slices of the inaccessible disk based on the allocation of the first spare slices of the RAIDs associated with the anchor disk for data reconstruction for the inaccessible disk.

[0055] Due to the previous allocation of spare slices for RAID, when data reconstruction needs to be performed for an inaccessible disk, the determination of spare slices will become simple. Depending on whether the inaccessible disk is an anchor disk and the availability of free slices for spare among multiple disks 122, there can be different ways to determine spare slices.

[0056] In some embodiments, if an inaccessible disk appears in the storage system 120, the storage management system 110 determines one or more degraded RAID that are affected by the failure or offline of the inaccessible disk. A degraded RAID refers to a RAID that includes storage slices allocated from the inaccessible disk for storing information. Since the storage slices in the inaccessible disk can no longer support data access, the data access of the RAID may be affected. It is necessary to allocate spare slices for the degraded RAID to reconstruct the information originally stored in the storage slices of the inaccessible disk into the spare slices.

[0057] The following is combined with Figure 5 、 Figure 6A and Figure 6B to illustrate examples of the determination of spare slices respectively.

[0058] In some embodiments, if the degraded RAID is a directly available RAID, that is, spare slices have been previously allocated for the degraded RAID, the storage management system 110 can directly determine the spare slices previously allocated to the RAID as the spare slices for the storage slices included in the inaccessible disk of the degraded RAID. The storage management system 110 can use the created associated metadata to determine whether the degraded RAID is a directly available RAID. As a directly available RAID, the degraded RAID can include storage slices allocated from the anchor disk for information storage or can include spare slices allocated from the anchor disk.

[0059] Figure 5 Shows an example of performing spare slice determination for an anchor disk according to some embodiments of the present disclosure. This example continues Figure 4 the spare slice allocation. In Figure 5 the example, it is assumed that the anchor disk D0 is inaccessible. Affected by the inaccessibility of the anchor disk D0, RAID2, RAID3, RAID5, and RAID7 become degraded RAID. Since these RAIDs are all associated with the anchor disk, backup slices have been previously allocated for these RAIDs. The storage management system 110 directly determines the previously allocated spare slices DS(1,1), DS(2,3), DS(3,4), and DS(4,1) as the spare slices for the storage slices DS(0,1), DS(0,2), DS(0,3), and DS(0,4) included in the inaccessible anchor disk of these RAIDs respectively.

[0060] For the slice DS(0,0) in the anchor disk D0, since it is a spare slice of RAID1, the inaccessibility of the anchor D0 does not degrade RAID1. Therefore, there is no need to determine a spare slice for RAID1.

[0061] Figure 6A An example of determining a spare slice for a normal disk according to some embodiments of the present disclosure is shown. In Figure 6A the example, it is assumed that the normal disk D6 is an inaccessible disk. RAID2, RAID3, RAID4, RAID6, and RAID7 respectively include storage slices DS(6,0), DS(6,1), DS(6,2), DS(6,3), and DS(6,4) allocated from D6 for storing information. Therefore, RAID2, RAID3, RAID4, RAID6, and RAID7 are marked as degraded RAIDs.

[0062] Since RAID2, RAID3, and RAID7 are directly spareable RAIDs, they were previously allocated spare slices DS(1,1), DS(4,1), and DS(3,4). Therefore, the data management system directly determines the allocated spare slices as the spare slices of the storage slices DS(6,0), DS(6,1), and DS(6,4) included in these RAIDs in the inaccessible disk D6 respectively.

[0063] In some embodiments, if the degraded RAID is not a directly spareable RAID associated with an anchor disk, the storage management system 110 may determine a spare slice for the storage slice of the degraded RAID on the inaccessible disk from the spare space of the storage system 120. The disk where the determined spare slice is located shall be different from the disk where the storage slice included in the degraded RAID is located. In this way, the slices allocated for the degraded RAID are distributed on different disks. For example, in Figure 6A the example, for the degraded RAID6 that is not directly spareable, the storage management system 110 determines the free slice DS(0,5) of the anchor disk D0 as the spare slice of the storage slice DS(6,2) of RAID6. In

[0064] In some embodiments, if there are no unallocated free slices in the plurality of disks 122 of the storage system 120 available to be allocated as spare slices for the affected storage slices in the degraded RAID, and if the anchor disk is not an inaccessible disk, the storage management system 110 may also determine a spare slice for the degraded RAID based on the spare slices previously allocated to the RAID associated with the anchor disk. The absence of unallocated free slices in the plurality of disks 122 available to be allocated to the degraded RAID may be because there are no free slices, or because the disks with free slices do not allow allocation of slices to the degraded RAID due to duplicate allocation of slices. In this case, since there is no directly available spare slice for the degraded RAID, which means the degraded RAID does not include slices allocated from the anchor disk, it is always allowed to allocate a spare slice from the anchor disk to this degraded RAID.

[0065] In one embodiment, if the spare slices previously allocated to the RAID associated with the anchor disk are from the anchor disk, the storage management system 110 may determine the allocated spare slices in the anchor disk as the spare slices for the affected storage slices in the degraded RAID, although the spare slices were previously allocated to other RAIDs outside the degraded RAID. For example, in Figure 6A , DS(0,0) in the anchor disk may be allocated as a spare slice for the slice DS(6,2) located on the inaccessible disk D6 in RAID4, although DS(0,0) was previously allocated as a spare slice for RAID1.

[0066] In some examples, in the case where there are no unallocated free slices in the plurality of disks 122 available to be allocated as spare slices for the affected storage slices in the degraded RAID, if the spare slices previously allocated to the RAID associated with the anchor disk are from disks 122 other than the anchor disk, the storage management system 110 may enable allocation of a spare slice from the anchor disk to the degraded RAID through information migration (e.g., through a copy operation). In this case, the disk 122 with the spare slice may be due to duplicate allocation of slices, for example, a slice has already been allocated to the degraded RAID for storing information, so no more spare slices can be allocated to the degraded RAID. The RAID associated with the anchor disk includes storage slices for storing information in the anchor disk, so the storage management system 110 may migrate the information in this storage slice to the spare slice of the RAID associated with the anchor disk. In this way, the storage management system 110 may allocate this slice in the anchor disk to the degraded RAID as a spare slice.

[0067] Figure 6B A special example is shown. In Figure 6BIn this case, it is assumed that there are no free and unallocated slices in disks D0 to D7. The storage management system 110 determines that the slice DS(2, 3) in disk D2 is a spare slice of RAID5, and this spare slice was not used when an inaccessible disk occurred this time. However, the degraded RAID6 without an allocated spare slice cannot directly use this slice DS(2, 3) in disk D2 because the slice DS(2, 4) of disk D2 has already been allocated to RAID6. The storage management system 110 can migrate the information stored in the slice DS(0, 3) in the anchor disk D0 of RAID5 to DS(2, 3). In this way, DS(0, 3) can be allocated to RAID6 as a spare slice of DS(6, 3).

[0068] In such determination of spare slices, although additional information migration operations are introduced, due to the low probability of occurrence of such extreme cases, the overall overhead introduced by the information migration operations is smaller compared to the reduction in the complexity of the spare slice allocation process.

[0069] In some embodiments, if a disk added to the storage system 120 (sometimes referred to as the "second disk" or "new disk"), it may be necessary to re-determine the anchor disk. If the new disk is determined to be the anchor disk, the spare slices of the RAID associated with the anchor disk may need to be updated. Whether the new disk is determined to be the anchor disk can depend on the comparison of the storage capacity of the new disk with the disk that is currently the anchor disk. If the new disk has a larger storage capacity than the current anchor disk, or the storage capacity of the new disk exceeds the storage capacity of the current anchor disk by a predetermined threshold amount, the storage management system 110 can select the new disk as the anchor disk. Otherwise, the current anchor disk can be maintained.

[0070] Generally, after adding a disk to the storage system 120, the storage management system 110 also performs a re-striping operation on the new disk in the storage system 120 to redistribute the previously allocated slices in multiple disks to the existing multiple disks and the new disk to achieve uniform allocation of these disks. Depending on the result of the re-striping for the new disk and whether the anchor disk is to be changed to the new disk, the storage management system 110 also needs to perform corresponding slice allocation adjustments.

[0071] In some embodiments, if the new disk is selected as the anchor disk, the storage management system 110 determines the RAID associated with the new disk based on the result of the re-striping for the new disk in the storage system 120. The RAID associated with the new disk includes the slices in the existing multiple disks that are re-striped to the slices in the new disk. If the re-striped slices in the existing multiple disks were originally storage slices used to store information in the anchor disk, the storage management system 110 migrates the information in this slice to the slice in the new disk.

[0072] Figure 7AShows an example of the adjustment of slice allocation when adding a new disk according to some embodiments of the present disclosure. In FIG. 7, disk D8 is added to the storage system 120, and disk D8 is selected as the new anchor disk due to its larger storage capacity. Assume that the slice DS(0,1) in the original anchor disk D0 is re-striped to the slice DS(8,0) of the new anchor disk D8. Since the slice DS(0,1) is the storage slice used by RAID2 to store information and RAID2 is originally a directly available RAID and has been allocated a spare slice, the storage management system 110 only needs to migrate the information in the slice DS(0,1) to the slice DS(8,0).

[0073] In some embodiments, if the re-striped slice from multiple existing disks comes from a disk other than the anchor disk, the storage management system 110 migrates the information stored in the slice to the corresponding slice in the new disk and determines the slice as the spare slice of the RAID associated with the new disk. In Figure 7A the example, if the slice DS(4,2) is re-striped to DS(8,1), since the slice DS(4,2) is the storage slice used by RAID4 to store information, but RAID4 is not a directly available RAID when D0 is the anchor disk, the storage management system 110 can also determine the spare slice for RAID4. Simply, the storage management system 110 can determine the slice DS(4,2) whose information has been migrated as the spare slice of RAID4. The storage management system 110 can also mark RAID4 as directly available by modifying the metadata and also mark the spare slice of RAID4.

[0074] In some embodiments, if the re-striped slice from multiple existing disks is the spare slice of the RAID associated with the new disk, the storage management system 110 can directly determine the slice in the new disk as the spare slice. In Figure 7A the example, if the slice DS(3,4) is re-striped to the slice DS(8,2) in disk D8, since the slice DS(3,4) is the spare slice of RAID7, the storage management system 110 can directly determine the re-striped slice DS(8,2) as the spare slice of RAID7. For example, the storage management system 110 can mark the spare slice of RAID7 by modifying the metadata.

[0075] In some embodiments, if the anchor disk in the original storage system 120 remains unchanged after adding a new disk, depending on the result of re-striping, the storage management system 110 may also need to re-determine the slice allocation. Figure 7BShows another example of the adjustment of slice allocation when adding a new disk according to some embodiments of the present disclosure. In this example, the newly added disk D8 to the storage system 120 has a smaller storage capacity, and disk D0 remains the anchor disk.

[0076] In some embodiments, if the RAID associated with the anchor disk includes storage slices allocated from the anchor disk, the storage management system 110 determines whether the storage slice is re-striped to a new disk while the anchor disk remains unchanged. If the storage slice is re-striped to a slice in the new disk, the RAID is no longer directly available for standby. The storage management system 110 can release the standby slices allocated for the RAID.

[0077] In Figure 7B , if the slice DS(0,1) in the anchor disk D0 is re-striped to the slice D(8,0) of the new disk D8, since the slice DS(0,1) is a slice of the directly available for standby RAID2, but after re-striping, RAID2 no longer includes the slice in the anchor disk D0 (whether it is a standby slice or a storage slice). Therefore, the standby slice originally allocated to RAID2 can be released.

[0078] In some embodiments, if the anchor disk remains unchanged and the standby slices of the RAID associated with the anchor disk are re-striped to the slices of the new disk, the storage management system 110 can determine the slices re-striped to in the new disk as standby slices and release the allocation of the original standby slices. In Figure 7B , if the slice DS(2,3) in disk D2 is re-striped to the slice DS(8,2) in the new disk D8, since the slice DS(2,3) is a standby slice of the directly available for standby RAID5, the re-striped slice DS(8,2) can be determined as a standby slice of the directly available for standby RAID5, and the slice DS(2,3) is released. The storage management system 110 can update the metadata associated with RAID5 accordingly.

[0079] In some embodiments, if the storage slices for storing information in the normal disk are re-striped to the slices of the new disk, the storage management system 110 can migrate the information in the information to the slices of the new disk. The slices in the normal disk become free slices. In Figure 7B , if the storage slice DS(3,2) allocated to RAID4 for storing information in disk D3 is re-striped to the slice DS(8,1) of disk D8, the information stored in the slice DS(3,2) is migrated to the slice DS(8,1). The slice DS(3,2) becomes a free slice.

[0080] In some embodiments, after an inaccessible disk appears, the information stored in the inaccessible disk is reconstructed by allocating spare slices. Due to the allocation of spare slices, the free storage space in the storage system 120 is consumed. In some cases, a new disk (sometimes referred to as a "third disk") can be added to the storage system 120 after the data reconstruction is completed. Such a disk can be referred to as a supplementary disk. Due to the consumption of data reconstruction, the spare slices of the directly available RAID associated with the anchor disk may be consumed, so it is necessary to replenish the spare slices again.

[0081] In some embodiments, after a new disk is added to the storage system 120, a new anchor disk needs to be selected. In addition, as mentioned above, after a disk is added to the storage system 120, the storage management system 110 also performs a re-striping operation on the new disk in the storage system 120 to redistribute the allocated slices in the original multiple disks to the existing multiple disks and the new disk to achieve uniform distribution of these disks. Depending on the selection of the new anchor disk and the result of re-striping, the storage management system 110 also needs to perform corresponding slice allocation adjustments.

[0082] In some embodiments, if the inaccessible disk is an anchor disk, it is necessary to determine a new anchor disk from the new disk and the existing accessible disks. If an existing disk is determined to be the anchor disk, spare slices can be allocated to the RAID associated with the new anchor disk through the re-striping process. Specifically, the storage management system 110 can allocate multiple spare slices from the new disk to the multiple RAIDs associated with the new anchor disk respectively, and the storage slices used to store information in these RAIDs are located in the new anchor disk. When performing re-striping on the new disk in the storage system 120, the multiple spare slices allocated in the new disk are evenly re-striped to the currently accessible disks in the storage system 120, including the new disk.

[0083] Figure 8AShows an example of the adjustment of spare slices when a new disk is added after data reconstruction according to some embodiments of the present disclosure. Assume that after the anchor disk D0 fails and data reconstruction is performed, disk D8 is added to the storage system 120. Since it has a higher storage capacity, disk D1 is selected as the new anchor disk. The storage management system 110 can allocate multiple slices in disk D8 as spare slices for each of RAID1, RAID2, RAID3, RAID6, and RAID7 associated with the anchor disk D1. During the re-striping process, the storage management system 110 re-stripes each spare slice in disk D8 to other disks to achieve a uniform distribution of spare slices. For example, the spare slice DS(8,0) is re-striped to the slice DS(1,0). In this way, the slice DS(1,0) is called the spare slice directly available for RAID1; the spare slice DS(8,1) is re-striped to the slice DS(2,1). In this way, the slice DS(2,1) is called the spare slice directly available for RAID2; and so on. Similar operations are performed for the spare slices DS(8,2), DS(8,3), and DS(8,4) respectively to allocate spare slices for RAID3, RAID6, and RAID7.

[0084] In some embodiments, if the new disk is selected as the anchor disk, the storage management system 110 can also determine the re-striping of slices to ensure that the RAID associated with the new disk is allocated spare slices. Specifically, the storage management system 110 can re-strip the storage slices allocated for storing information in the accessible disks of the storage system 120 to the slices in the new disk. The storage management system 110 can migrate the information stored in the storage slice to the slice in the newly added disk, and then determine the storage slice as the spare slice of the RAID including the slice. Figure 8B Shows another example of the adjustment of spare slices when a new disk is added after data reconstruction according to some embodiments of the present disclosure.

[0085] In Figure 8B , assume that after the anchor disk D0 fails and data reconstruction is performed, disk D8 is added to the storage system 120. Since it has a higher storage capacity, disk D8 is determined as the anchor disk. If the storage slice DS(1,0) allocated for RAID1 in disk D1 is re-striped to the slice DS(8,0) of disk D8, the storage management system 110 can migrate the information in the storage slice DS(1,0) to the slice DS(8,0), and mark the slice DS(1,0) as the spare slice of RAID1. Similarly, similar operations can be performed for the slice DS(2,1) of disk D2, the slice DS(3,2) of disk D3, the slice DS(4,1) of disk D4, and the slice DS(5,4) of disk D5.

[0086] Although only the embodiment of disk replenishment after data reconstruction when the anchor disk is inaccessible has been discussed above, when the DNA is inaccessible in a normal disk and data reconstruction is performed, if a new disk is added as a supplement in the storage system, slices can also be allocated in a similar manner to ensure that the RAID associated with the current anchor disk is allocated with spare slices. In this way, these spare slices can be used to handle the next disk failure or offline caused by other reasons.

[0087] In the example described above, a spare slice is allocated to the RAID allocated to the anchor disk. In other embodiments, two or more spare slices can also be allocated to the RAID allocated to the anchor disk. The number of spare slices can be related to the RAID type. For example, if the RAID type is 4+2 RAID6, two spare slices can be allocated. The allocation method and usage method of the two spare slices are similar to the embodiments discussed above. The allocation of two or more spare slices can support data reconstruction when two or more disks are inaccessible.

[0088] Figure 9 A block diagram schematically showing a device 900 that can be used to implement the embodiments of the present disclosure. As Figure 9 shown, the device 900 includes a central processing unit (CPU) 901, which can execute various appropriate actions and processes according to computer program instructions stored in a read-only storage device (ROM) 902 or computer program instructions loaded from a storage unit 908 into a random access storage device (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The CPU 901, ROM 902, and RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0089] Multiple components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, optical disc, etc.; and a communication unit 909, such as a network card, modem, wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0090] Each of the processes and treatments described above, such as method 300, may be executed by processing unit 901. For example, in some embodiments, method 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed onto device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by CPU 901, one or more steps of method 300 described above may be executed.

[0091] As used herein, the term "comprising" and its like should be understood as an open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "an embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions herein.

[0092] As used herein, the term "determine" encompasses a variety of actions. For example, "determine" may include operations, calculations, processing, derivations, investigations, lookups (e.g., looking up in a table, database, or another data structure), ascertaining, etc. Additionally, "determine" may include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), etc. Additionally, "determine" may include parsing, selecting, choosing, establishing, etc.

[0093] It should be noted that the embodiments of the present disclosure may be implemented by hardware, software, or a combination of software and hardware. The hardware part may be implemented using dedicated logic; the software part may be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art can understand that the above devices and methods may be implemented using computer-executable instructions and / or included in processor control code, such as providing such code on a programmable memory or a data carrier such as an optical or electronic signal carrier.

[0094] Furthermore, although the operations of the methods of the present disclosure are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Instead, the steps depicted in the flowchart may be changed in the order of execution. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution. It should also be noted that the features and functions of two or more devices according to the present disclosure may be embodied in one device. Conversely, the features and functions of one device described above may be further divided and embodied by multiple devices.

[0095] Although the present disclosure has been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed. The present disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A storage management method, comprising: selecting a first disk as an anchor disk from a plurality of disks in a storage system; allocating a first spare slice from the plurality of disks to a first redundant array of independent disks (RAID) associated with the first disk, the first RAID including at least slices allocated from the first disk; and if an inaccessible disk is detected among the plurality of disks, determining a spare slice for a slice of the inaccessible disk for data reconstruction of the inaccessible disk based on a degraded RAID including a first storage slice allocated from the inaccessible disk for storing information and the allocation of the first spare slice to the first RAID.

2. The method according to claim 1, wherein selecting the first disk comprises: selecting the first disk based on the respective storage capacities of the plurality of disks, the storage capacity of the first disk being greater than the storage capacity of at least one other disk among the plurality of disks.

3. The method according to claim 1, wherein the first RAID includes at least a storage slice allocated from the first disk for storing information and the first spare slice allocated from other disks among the plurality of disks except the first disk, or wherein the first RAID includes at least the first spare slice allocated from the first disk and a storage slice allocated from other disks among the plurality of disks except the first disk for storing information.

4. The method according to claim 1, wherein determining a spare slice for a slice of the inaccessible disk comprises: if an inaccessible disk is detected among the plurality of disks, determining the degraded RAID; and if it is determined that the degraded RAID does not include the first RAID and the inaccessible disk is not the first disk, determining whether an unallocated free slice among the plurality of disks can be allocated as a spare slice for the first storage slice; if it is determined that no unallocated free slice among the plurality of disks can be allocated as a spare slice for the first storage slice, determining a spare slice for the first storage slice based on the first spare slice allocated to the first RAID.

5. The method according to claim 4, wherein determining a spare slice for the first storage slice based on the first spare slice comprises: if it is determined that the first spare slice is allocated from the first disk, allocating the first spare slice as a spare slice for the first storage slice; if it is determined that the first spare slice is allocated from other disks among the plurality of disks except the first disk and it is determined that the first RAID includes a second storage slice allocated from the first disk for storing information, migrating the information stored in the second storage slice to the first spare slice; and allocating the second storage slice as a spare slice for the first storage slice.

6. The method according to claim 4, wherein determining a spare slice for a slice of the inaccessible disk further comprises: if it is determined that the degraded RAID includes the first RAID, determining the first spare slice allocated to the first RAID as a spare slice for the first storage slice.

7. The method according to claim 1 further includes: Storing metadata for the first RAID, the metadata marking the first RAID as directly available for standby and marking the first standby slice allocated to the first RAID, where determining the standby slice of the first storage slice based on the first standby slice includes: using the metadata to determine the standby slice of the first storage slice.

8. The method according to claim 1 further includes: If it is determined that a second disk is added to the storage system, determining whether the second disk is selected as the anchor disk; If it is determined that the second disk is selected as the anchor disk, determining a second RAID associated with the second disk based on the result of re-striping for the second disk in the storage system, the second RAID including a second slice in the second disk to which a third slice from among the plurality of disks is re-striped; If it is determined that the third slice is a storage slice allocated from the first disk for storing information, migrating the information stored in the third slice to the second slice; If it is determined that the third slice is a storage slice allocated from a disk other than the first disk among the plurality of disks for storing information, migrating the information stored in the third slice to the second slice and determining the third slice as the standby slice of the second RAID; and If it is determined that the third slice is a standby slice already allocated to the second RAID, determining the second slice as the second standby slice of the second RAID.

9. The method according to claim 8, wherein determining whether the second disk is selected as the anchor disk includes: Comparing the storage capacity of the second disk with the storage capacity of the first disk; and If it is determined that the storage capacity of the second disk exceeds the storage capacity of the first disk by a predetermined threshold capacity, determining that the second disk is selected as the anchor disk.

10. The method according to claim 8, wherein the first RAID at least includes a second storage slice allocated from the first disk for storing information, and the method further includes: If it is determined that the first disk remains as the anchor disk, determining whether the second storage slice is re-striped to a third slice in the second disk; and If it is determined that the second storage slice is re-striped to the third slice in the second disk, releasing the allocation of the first standby slice.

11. The method according to claim 8 further includes: If it is determined that the first disk remains as the anchor disk, determining whether the first standby slice allocated to the first RAID is re-striped to a third slice in the second disk; If the first standby slice is re-striped to the third slice in the second disk, determining the third slice in the second disk as the standby slice of the first RAID; and Releasing the allocation of the first standby slice.

12. The method according to claim 1, wherein the inaccessible disk is the first disk, and the method further includes: If it is determined that a third disk is added to the storage system after the data reconstruction is completed, determine whether the third disk or a fourth disk that is accessible among the multiple disks is selected as the anchor disk; If it is determined that the fourth disk is selected as the anchor disk, allocate multiple spare slices for multiple RAIDs associated with the fourth disk from the third disk, where the multiple RAIDs at least include storage slices allocated from the fourth disk for storing information; And Perform re-striping for the third disk in the storage system to evenly re-stripe the multiple spare slices to the third disk and the accessible disks among the multiple disks.

13. The method according to claim 12, further comprising: If it is determined that the third disk is selected as the anchor disk, re-strip the third storage slice allocated for storing information in the accessible disks of the multiple disks to the slices of the third disk, where the third storage slice is allocated to a third RAID; Migrate the information stored in the third storage slice to the slices of the third disk; And Mark the third storage slice as a spare slice including the third RAID.

14. An electronic device, comprising: At least one processor; And At least one memory storing computer program instructions, where the at least one memory and the computer program instructions are configured to, together with the at least one processor, cause the electronic device to perform actions, and the actions include: Select a first disk as the anchor disk from multiple disks of a storage system; Allocate a first spare slice from the multiple disks to a first redundant array of independent disks (RAID) associated with the first disk, where the first RAID at least includes slices allocated from the first disk; and If an inaccessible disk is detected among the multiple disks, determine a spare slice for the slices of the inaccessible disk for data reconstruction of the inaccessible disk based on a degraded RAID including a first storage slice allocated from the inaccessible disk for storing information and the allocation of the first spare slice to the first RAID.

15. The device according to claim 14, where selecting the first disk includes: Selecting the first disk based on the respective storage capacities of the multiple disks, where the storage capacity of the first disk is greater than the storage capacities of at least one other disk among the multiple disks.

16. The device according to claim 14, where the first RAID at least includes a storage slice allocated from the first disk for storing information and the first spare slice allocated from other disks among the multiple disks except the first disk, or where the first RAID at least includes the first spare slice allocated from the first disk and a storage slice allocated from other disks among the multiple disks except the first disk for storing information.

17. The device according to claim 14, where determining the spare slice for the slices of the inaccessible disk includes: If an inaccessible disk is detected among the multiple disks, determine the degraded RAID; And If it is determined that the degraded RAID does not include the first RAID and the inaccessible disk is not the first disk, determine whether unallocated free slices among the multiple disks can be allocated as spare slices for the first storage slice; If it is determined that there are no unallocated free slices among the multiple disks that can be allocated as spare slices for the first storage slice, determine the spare slice for the first storage slice based on the first spare slice allocated to the first RAID.

18. The apparatus according to claim 17, wherein determining the spare slice for the first storage slice based on the first spare slice includes: If it is determined that the first spare slice is allocated from the first disk, allocate the first spare slice as the spare slice for the first storage slice; If it is determined that the first spare slice is allocated from a disk other than the first disk among the multiple disks and it is determined that the first RAID includes a second storage slice allocated from the first disk for storing information, migrate the information stored in the second storage slice to the first spare slice; And Allocate the second storage slice as the spare slice for the first storage slice.

19. The apparatus according to claim 17, wherein determining the spare slice for the slice of the inaccessible disk further includes: If it is determined that the degraded RAID includes the first RAID, determine the first spare slice allocated to the first RAID as the spare slice for the first storage slice.

20. The apparatus according to claim 14, wherein the action further includes: Storing metadata for the first RAID, the metadata marking the first RAID as directly available for standby and marking the first spare slice allocated to the first RAID, wherein determining the spare slice for the first storage slice based on the first spare slice includes: using the metadata to determine the spare slice for the first storage slice.

21. The apparatus according to claim 14, wherein the action further includes: If it is determined that a second disk is added to the storage system, determine whether the second disk is selected as the anchor disk; If it is determined that the second disk is selected as the anchor disk, based on the result of re-striping for the second disk in the storage system, determine a second RAID associated with the second disk, the second RAID including that a third slice among the multiple disks is re-striped to a second slice in the second disk; If it is determined that the third slice is a storage slice allocated from the first disk for storing information, migrate the information stored in the third slice to the second slice; If it is determined that the third slice is a storage slice allocated from a disk other than the first disk among the multiple disks for storing information, migrate the information stored in the third slice to the second slice and determine the third slice as the spare slice for the second RAID; And If it is determined that the third slice has been allocated as a spare slice for the second RAID, determine the second slice as the second spare slice of the second RAID.

22. The apparatus according to claim 21, wherein determining whether the second disk is selected as the anchor disk includes: comparing the storage capacity of the second disk with the storage capacity of the first disk; and if it is determined that the storage capacity of the second disk exceeds the storage capacity of the first disk by a predetermined threshold capacity, determining that the second disk is selected as the anchor disk.

23. The apparatus according to claim 21, wherein the first RAID at least includes a second storage slice allocated from the first disk for storing information, and the operation further includes: if it is determined that the first disk remains as the anchor disk, determining whether the second storage slice is re-striped to a third slice in the second disk; and if it is determined that the second storage slice is re-striped to the third slice in the second disk, releasing the allocation of the first spare slice.

24. The apparatus according to claim 21, wherein the operation further includes: if it is determined that the first disk remains as the anchor disk, determining whether the first spare slice allocated for the first RAID is re-striped to a third slice in the second disk; if the first spare slice is re-striped to the third slice in the second disk, determining the third slice in the second disk as the spare slice of the first RAID; and releasing the allocation of the first spare slice.

25. The apparatus according to claim 14, wherein the inaccessible disk is the first disk, and the operation further includes: if it is determined that a third disk is added to the storage system after the data reconstruction is completed, determining whether the third disk or a fourth accessible disk among the multiple disks is selected as the anchor disk; if it is determined that the fourth disk is selected as the anchor disk, allocating multiple spare slices from the third disk to multiple RAIDs associated with the fourth disk, the multiple RAIDs at least including storage slices allocated from the fourth disk for storing information; and performing re-striping in the storage system for the third disk to evenly re-strip the multiple spare slices to the third disk and the accessible disks among the multiple disks.

26. The apparatus according to claim 25, wherein the operation further includes: if it is determined that the third disk is selected as the anchor disk, re-striping a third storage slice allocated for storing information in the accessible disks of the multiple disks to a slice of the third disk, the third storage slice being allocated to a third RAID; migrating the information stored in the third storage slice to the slice of the third disk; and marking the third storage slice as including the spare slice of the third RAID.

27. A computer program product, the computer program product being tangibly stored on a computer-readable storage medium and comprising computer-executable instructions that, when executed by a processor of a device, cause the device to perform the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Data reconstruction method and device based on storage array, and storage medium

    CN110413454A