Method, electronic device and computer program product for managing storage disk

By using fault monitoring windows of different lengths for disk slices of metadata layer and user data layer in the storage system, the problem of timely recovery of metadata layer data in the prior art is solved, and the rapid recovery and data of metadata layer are achieved Improved reliability.

CN113590016BActive Publication Date: 2025-02-14EMC IP HLDG CO LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010360999.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-30
Publication Date
2025-02-14
Estimated Expiration
2040-04-30

AI Technical Summary

Technical Problem

When the physical disk fails, the existing storage system cannot effectively distinguish between the metadata layer and the user data layer, resulting in the data in the metadata layer being unable to be recovered in time, affecting data reliability.

Method used

When a fault occurs, different lengths of fault monitoring windows are used for disk slices of the metadata layer and user data layer, and the faulty disk slices are replaced separately to ensure the rapid recovery of the metadata layer.

Benefits of technology

By performing differentiated processing for different logic layers, the degradation time of the metadata layer is effectively reduced, the data reliability of the metadata layer is improved, and unnecessary disk slice replacement is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590016B_ABST
    Figure CN113590016B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a method, electronic device, and computer program product for managing storage disks. The method proposed herein includes monitoring the duration of a failure of a faulty storage disk, the faulty storage disk including a first disk slice for storing metadata and a second disk slice for storing user data. The method also includes replacing the first disk slice with a first available disk slice in a first non-faulty storage disk in response to the duration reaching a first threshold. The method further includes replacing the second disk slice with a second available disk slice in a second non-faulty storage disk in response to the duration reaching a second threshold greater than the first threshold. According to an embodiment of the present disclosure, fault monitoring windows of different lengths are applied to disk slices for different logical layers in the faulty storage disk. In this way, the reliability of data in the metadata layer can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of data storage, and more particularly, to methods, electronic devices, and computer program products for managing storage disks. 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. While improving data storage capabilities, users have also put forward higher and higher requirements for data reliability. At present, a variety of data storage systems based on redundant arrays of independent disks (RAID) have been developed to improve data reliability. When one or more physical disks in a storage system fail, the data on the failed physical disk can be restored from the data on other normally operating physical disks. Summary of the invention

[0003] Embodiments of the present disclosure provide a method, an electronic device, and a computer program product for managing a storage disk.

[0004] In a first aspect of the present disclosure, a method for managing a storage disk is provided. The method includes monitoring a duration of a failure of a failed storage disk, the failed storage disk including a first disk slice for storing metadata and a second disk slice for storing user data. The method also includes replacing the first disk slice with a first available disk slice in a first non-faulty storage disk in response to the duration reaching a first threshold. The method also includes replacing the second disk slice with a second available disk slice in a second non-faulty storage disk in response to the duration reaching a second threshold greater than the first threshold.

[0005] In a second aspect of the present disclosure, an electronic device is provided. The electronic device includes a processor and a memory coupled to the processor, the memory having instructions stored therein, and the instructions, when executed by the processor, cause the device to perform an action. The action includes monitoring the duration of a failure of a failed storage disk, the failed storage disk including a first disk slice for storing metadata and a second disk slice for storing user data. The action also includes replacing the first disk slice with a first available disk slice in a first non-faulty storage disk in response to the duration reaching a first threshold. The action also includes replacing the second disk slice with a second available disk slice in a second non-faulty storage disk in response to the duration reaching a second threshold greater than the first threshold.

[0006] In a third aspect of the present disclosure, there is provided a computer program product tangibly stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform the method according to the first aspect.

[0007] This Summary is provided to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present disclosure. In the accompanying drawings:

[0009] Figure 1 A schematic diagram illustrating an example environment in which embodiments of the present disclosure may be implemented;

[0010] Figure 2 A flowchart of a method for managing a storage disk according to an embodiment of the present disclosure is shown;

[0011] Figure 3 A schematic diagram showing a slice of a distribution disc according to an embodiment of the present disclosure; and

[0012] Figure 4 A block diagram of an example device that may be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0013] The principles of the present disclosure will be described below with reference to several example embodiments shown in the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that these embodiments are described only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way.

[0014] 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 embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0015] As mentioned above, in a storage system, various logical layers (also referred to as layers, tiers) created on a backend physical disk may be managed. Such logical layers may include a user data layer for user data and a metadata layer for metadata. In some storage systems, the metadata layer may be further divided, for example, into a mapper boot layer, a metadata storage layer, and a virtual large block (VLB) layer. Generally speaking, the data in the metadata layer is more critical than the data in the user data layer.

[0016] At the back end, the physical disks in the storage system are usually divided into multiple disk slices. Multiple disk slices distributed on one or more physical disks can be organized into storage units for storing data. Storage units can be divided into different types of storage units according to the divided logical layers, for example, metadata storage units and user data storage units. The metadata storage unit logically belonging to the metadata layer can be used to store mapping information, index information, status information, etc. related to the storage system, such as mapping information from storage units to physical disks, the status of storage units (such as normal status or fault status), etc. The user data storage unit logically belonging to the user data layer can be used to store user data.

[0017] Therefore, in such a storage system, a storage unit is composed of multiple disk slices, and a logical layer is composed of at least one storage unit belonging to the layer. Each disk slice in a physical disk may be allocated to a different type of storage unit and thus may be used for different logical layers. In other words, a single physical disk may include both a disk slice for a metadata layer and a disk slice for a user data layer.

[0018] Sometimes, a physical disk failure may result in a temporary failure, that is, the failed physical disk may not be a permanent failure. After a short period of time, the originally failed physical disk may recover from the failure. In order to cope with such a temporary failure, after a physical disk fails, the data of the physical disk is not immediately rebuilt or a failover is performed.

[0019] In current storage system solutions, in order to cope with the temporary failure of a physical disk, a timer is usually maintained for the failed physical disk as a failure monitoring window, and the timer may sometimes be referred to as a spare timer. The timer has a validity period of, for example, 5 minutes. Once a physical disk fails, the timer for the failed physical disk will be started, and the storage unit affected by the failed physical disk (for example, the disk slice included in the failed physical disk) will be marked as "degraded".

[0020] If the failed physical disk recovers from the failure before the timer expires, an incremental reconstruction will be performed for those storage units marked as "degraded". This means that only the data updated during the physical disk failure needs to be restored. Unchanged data does not need to be restored because the data version in the physical disk that failed is correct.

[0021] If the faulty physical disk is not recovered from the fault before the timer expires, the damaged disk slices in each degraded storage unit will be replaced with new disk slices from a physical disk that has not failed. In addition, normal reconstruction will be performed, which means that all data will be recovered for the new disk slices.

[0022] It can be seen that in the current storage system solution, no matter which logical layer the affected storage units or disk slices belong to, all affected storage units or disk slices will be treated indiscriminately.

[0023] If a physical disk fails permanently, all affected storage units can only be restored after the timer expires. If another disk slice included in the affected metadata storage unit fails (for example, the physical disk where it is located also fails) during the monitoring window waiting for the timer to expire, the metadata in the metadata storage unit cannot be restored. Accordingly, the associated user data cannot be read or processed.

[0024] In view of the importance of the metadata layer, the inventor of the present application realizes that the data of the metadata layer should be restored as early as possible. However, if the validity period of the above timer is simply reduced, it is not beneficial to the performance of the storage system. This simple solution will cause unnecessary or even frequent replacement of disk slices (for example, disk slices for the user data layer), increasing background operations.

[0025] In view of the above, the inventors of the present application realize that it would be advantageous to perform different processing for different logical layers when a physical disk fails. Even if both the metadata layer (such as 1+1 mirror) and the user data layer (such as 4+1 RAID 5, or 8+1 RAID 5) have only one disk failure redundancy, it is still desirable to perform special processing for the metadata layer after a failure occurs.

[0026] An embodiment of the present disclosure proposes a solution for managing storage disks to solve one or more of the above-mentioned problems and other potential problems. In the solution, when a fault occurs, fault monitoring windows of different lengths are applied to disk slices for different logical layers in the faulty storage disk. For example, monitoring of the duration of the fault begins in response to the occurrence of the fault. The faulty storage disk includes a metadata disk slice for storing metadata and a user data disk slice for storing user data. If the duration reaches a first threshold, the metadata disk slice can be replaced by a first available disk slice in a first non-faulty storage disk. Continue to monitor the duration of the fault, and if the duration reaches a second threshold greater than the first threshold, the user data disk slice can be replaced by a second available disk slice in a second non-faulty storage disk.

[0027] In the proposed scheme, fault monitoring windows of different lengths are applied to different logical layers, so that disk slices used for different logical layers can be processed differently when a fault occurs. In this way, the degradation time of the metadata layer can be effectively reduced. Therefore, the scheme can effectively improve the reliability of the data of the metadata layer. In addition, compared with simply reducing the fault monitoring window, the scheme can avoid increasing the replacement of unimportant disk slices.

[0028] Figure 1 1 shows a block diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, environment 100 includes host 110, storage manager 120 and storage resource pool 130. It should be understood that the structure and function of environment 100 are described only for exemplary purposes, and do not imply any limitation on the scope of the present disclosure. For example, embodiments of the present disclosure can also be applied to environments different from environment 100.

[0029] The storage resource pool 130 may include one or more storage disks, such as magnetic disks, optical disks, or solid-state disks (SSDs). Each storage disk may be divided into multiple disk slices. For example, each disk slice may have the same size. Multiple disk slices distributed on multiple physical disks may be organized into storage units for storing data. According to the different data types stored or according to the divided logical layers, the storage resource pool 130 may include various types of storage units, for example, a storage unit for storing user data (also referred to as a "user data storage unit"), a storage unit for storing metadata related to the storage system (also referred to as a "metadata storage unit"), etc. The metadata storage unit may store mapping information, index information, status information, etc. related to the storage system, such as mapping information from the storage unit to the physical disk, the status of the storage unit (such as a normal state or a fault state), etc. The data stored in multiple disk slices in the storage unit may be interrelated. For example, multiple disk slices in the storage unit may be mirrored disk slices. Multiple disk slices in the storage unit may also be organized in a RAID manner.

[0030] In the storage resource pool 130, the storage unit (including the user data storage unit and the metadata storage unit) is composed of multiple disk slices, and the logical layer is composed of at least one storage unit belonging to the layer. Each disk slice in the storage disk may be allocated to different types of storage units and can be used for different logical layers. In other words, a single storage disk in the storage resource pool 130 may include both disk slices for the metadata layer and disk slices for the user data layer.

[0031] The storage manager 120 may include a processor 121 and a memory 122. The memory 122 may be any currently known or future developed volatile storage medium, non-volatile storage medium, or a combination of the two. The storage manager 120 may be configured to manage a storage resource pool 130 and process input / output (I / O) requests from a host 110. The host 110 may be any physical computer, virtual machine, server, etc. that runs a user application.

[0032] The host 110 may send an I / O request to the storage manager 120, for example, to read data from and / or write data to a target storage unit in the storage resource pool 130. The metadata of the target storage unit may be stored in the metadata storage unit. In response to receiving the I / O request from the host 110, the storage manager 120 may first obtain the metadata of the target storage unit from the metadata storage unit, and the metadata may indicate the mapping information of the target storage unit to the physical disk, the state of the target storage unit, etc. If the target storage unit is in a normal state, in response to the I / O request being a read request, the storage manager 120 may forward the I / O request to the target storage unit based on the obtained metadata to read data from the target storage unit, and return the read data to the host 110. In response to the I / O request being a write request, the storage manager 120 may forward the I / O request to the target storage unit based on the obtained metadata to write data to the target storage unit.

[0033] Therefore, if the corresponding metadata storage unit fails, user data cannot be written or read. Due to the importance of the metadata layer, it is expected that the disk slices for the metadata layer and the disk slices for the user data layer are processed differently when the storage disk fails. Figure 2 FIG. 2 is a flowchart of an exemplary method 200 for managing a storage disk according to an embodiment of the present disclosure. The method 200 may be performed by, for example, Figure 1 It should be understood that method 200 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect. Figure 1 The method 200 will be described in detail.

[0034] like Figure 2 As shown, at block 210, the storage manager 120 monitors the duration of the failure of the failed storage disk. The failed storage disk may include a disk slice for storing metadata (also referred to herein as a first disk slice or a metadata disk slice) and a disk slice for storing user data (also referred to herein as a second disk slice or a user data disk slice). It should be understood that the failed storage disk may include more than one metadata disk slice and more than one user data disk slice.

[0035] Figure 3 Schematic diagram of a distribution disk slice according to an embodiment of the present disclosure is shown. Figure 3As shown, the storage resource pool 130 may include storage disks 311-317, for example. Each disk may be divided into multiple disk slices, some of which have been allocated, while other disk slices are free. In this example, the storage disk 311 may be divided into multiple disk slices 301-307. Disk slices 301-303 may be allocated for storing metadata. Therefore, disk slices 301-303 may be disk slices for metadata layers. Each of the disk slices 301-303 may logically belong to a different metadata storage unit. For example, the metadata storage unit 330 may include disk slice 301.

[0036] Disk slices 304-307 may be allocated for storing user data. Therefore, disk slices 304-307 may be disk slices for user data layers. Each of disk slices 304-307 may logically belong to a different user data storage unit. For example, user data storage unit 340 may include disk slice 307.

[0037] Hereinafter, the storage disk 311 fails and becomes temporarily or permanently unavailable as an example. In addition, the disk slice 301 is described as an example of a first disk slice and the disk slice 307 is described as an example of a second disk slice.

[0038] There are a number of ways to monitor the duration of a failure of a failed storage disk 311. In some embodiments, the storage manager 120 may monitor the duration of a failure by recording the time that has passed since the failure occurred.

[0039] In some embodiments, in response to the occurrence of a fault, the storage manager 120 may monitor the duration by starting a timer. For example, a first timer having a validity period of a first threshold and a second timer having a validity period of a second threshold may be started to monitor the duration. The first threshold may be less than the second threshold. The first timer having a shorter validity period may be used for the metadata layer, and the second timer having a longer validity period may be used for the user data layer. As an example only and not intended to be limiting, the first timer may have a validity period of 1 minute or about 1 minute, and the second timer may have a validity period of 5 minutes or about 5 minutes.

[0040] During the monitoring process, if it is determined that the failed storage disk 311 recovers from the failure, the monitoring duration is stopped. For example, the first timer and the second timer are reset.

[0041] Return to reference Figure 2At block 220, the storage manager 120 determines whether the duration reaches a first threshold. If it is determined at block 220 that the duration reaches the first threshold, the method 200 proceeds to block 230. For example, if the first timer expires and the failed storage disk 311 has not recovered from the failure, the method 200 may proceed to block 230.

[0042] At block 230, the storage manager 120 replaces the first disk slice 301 with the first available disk slice in the first non-failed storage disk. For example, if the first timer expires and the failed storage disk 311 has not recovered from the failure, all disk slices used for the metadata layer in the failed storage disk 311 may be replaced with available disk slices. The data stored in the first disk slice 301 may be written to the free disk slices of the non-failed storage disk. At the same time, the storage manager 120 will not process the disk slices 304-307 used to store user data in the failed storage disk 311.

[0043] In some embodiments, Figure 3 As shown, the storage manager 120 may determine a non-failed storage disk 316 (which may also be referred to as a first non-failed storage disk 316) from a storage resource pool 130 including a plurality of disks. Each of the plurality of disks in the storage resource pool 130 may be divided into a plurality of disk slices. Furthermore, the storage manager 120 may allocate a free disk slice from the first non-failed storage disk 316 as a first available disk slice. For example, the disk slice 308 may be allocated as the first available disk slice. The storage manager 120 may determine metadata stored in the first disk slice, and may write the determined metadata to the first available disk slice 308.

[0044] Since the faulty storage disk 311 fails, it is impossible to directly read the data in the first disk slice 301. Based on the architecture of different storage systems, different methods can be used to determine or restore the data stored in the first disk slice 301.

[0045] In some embodiments, if the storage system includes the storage unit described above, the metadata storage unit 330 including the first disk slice 301 may be used to determine the data stored in the first disk slice 301. Figure 3In the example of , the storage manager 120 may determine the metadata storage unit 330 including the first disk slice 301. As an example, when the storage disk 311 fails, all storage units having disk slices located in the failed storage disk 311 may be marked as "degraded". The storage manager 120 may determine the metadata storage unit 330 based on the "degraded" mark. In addition to the first disk slice 301, the metadata storage unit 330 may also include at least one disk slice in a storage disk different from the failed storage disk 311. The storage manager 120 may determine the metadata stored in the first disk slice 301 based on the data stored in the at least one disk slice.

[0046] exist Figure 3 In the example of FIG. 3 , in addition to the first disk slice 301, the metadata storage unit 330 may further include disk slices 332-335. The disk slices in the metadata storage unit 330 may be organized, for example, in the form of 4+1 RAID 5. For example, the first disk slice 301 and four disk slices of the disk slices 332-335 may be used to store data, and another disk slice may be used to store parity data. Therefore, the data stored in the first disk slice 301 may be recovered based on the data in the disk slices 332-335.

[0047] In some embodiments, the disk slices in the metadata storage unit 330 may be mirror images of each other, such as 1+1 mirror images. In this case, the data stored in the mirror disk slices may be directly read.

[0048] After replacing the first disk slice 301 with the disk slice 308, the first disk slice 301 may be removed from the metadata storage unit 330, and the disk slice 308 may be added to the metadata storage unit 330. It should be understood that the above operation on replacing the first disk slice 301 may be applied to other disk slices in the failed storage disk 311 for storing metadata, such as the disk slices 302 and 303.

[0049] Return to reference Figure 2 , the storage manager 120 may continue to monitor the duration of the failure while replacing the first disk slice 301 (and optionally, the disk slices 302, 303). For example, the second timer may continue to run. At block 240, the storage manager 120 determines whether the duration has reached a second threshold value that is greater than the first threshold value. If it is determined at block 240 that the duration has reached the second threshold value, the method 200 proceeds to block 250. For example, if the second timer expires and the failed storage disk 311 has not recovered from the failure, the method 200 may proceed to block 250.

[0050] At block 250, the storage manager 120 replaces the second disk slice 307 with a second available disk slice in a second non-failed storage disk. For example, if the second timer expires and the failed storage disk 311 has not recovered from the failure, all disk slices used for the user data layer in the failed storage disk 311, such as disk slices 304-307, may be replaced with a plurality of available disk slices. The data stored in the disk slices 304-307 may be written to a free disk slice of a non-failed storage disk.

[0051] In some embodiments, Figure 3 As shown, the storage manager 120 can determine a non-failed storage disk 317 (which can also be referred to as a second non-failed storage disk 317) from the storage resource pool 130 including a plurality of disks. Furthermore, the storage manager 120 can allocate a free disk slice from the second non-failed storage disk 317 as a second available disk slice. For example, the disk slice 309 can be allocated as the second available disk slice. The storage manager 120 can determine the user data stored in the second disk slice, and write the determined user data into the second available disk slice 309.

[0052] Since the faulty storage disk 311 fails, it is impossible to directly read the data in the second disk slice 307. Based on the architecture of different storage systems, different methods can be used to determine or restore the data stored in the second disk slice 307.

[0053] In some embodiments, if the storage system includes the storage unit described above, the data stored in the second disk slice 307 may be determined using the user data storage unit 340 including the second disk slice 307. Figure 3 In the example of FIG. 3 , the storage manager 120 may determine the user data storage unit 340 including the second disk slice 307. In addition to the second disk slice 307, the user data storage unit 340 may further include at least one disk slice in a storage disk different from the failed storage disk 311. The storage manager 120 may determine the user data stored in the second disk slice 307 based on the data stored in the at least one disk slice.

[0054] exist Figure 3 In the example of FIG. 3 , the user data storage unit 340 may include disk slices in the storage disks 312-315 in addition to the second disk slice 307. The disk slices in the user data storage unit 340 may be organized in the form of 4+1 RAID 5. For example, four disk slices in the user data storage unit 340 may be used to store data, and another disk slice may be used to store verification data. Therefore, the data stored in the second disk slice 307 may be recovered based on the data in the disk slices in the storage disks 312-315.

[0055] In some embodiments, the disk slices in the user data storage unit 340 may be mirror images of each other, such as 1+1 mirror images. In this case, the data stored in the mirror disk slices may be directly read.

[0056] After replacing the second disk slice 307 with the disk slice 309, the second disk slice 307 may be removed from the user data storage unit 340, and the disk slice 309 may be added to the user data storage unit 340. It should be understood that the above operation on replacing the second disk slice 307 may be applied to other disk slices in the failed storage disk 311 for storing user data, such as the disk slices 304-306.

[0057] Return to reference Figure 2 If, at block 240, the storage manager 120 determines that the duration has not reached a value greater than the second threshold, in some embodiments the method 200 may proceed to block 260. For example, if the failed storage disk 311 recovers from the failure before the second timer expires, the method 200 may proceed to block 260. If the replacement of the first disk slice 301 or the replacement of other metadata disk slices in the failed storage disk 311 performed at block 250 has not been completed when the failed storage disk 311 recovers from the failure, the replacement of the first disk slice 301 or other metadata disk slices may continue.

[0058] In some embodiments, if there is an update related to the second disk slice 307 during the failure, the storage manager 120 may update the user data stored in the second disk slice 307 at block 260. For example, if there is an I / O request (such as a write request) from an upper layer for the user data stored in the second disk slice 307 during the failure, the user data stored in the second disk slice 307 may need to be updated. For example, the storage manager 120 may determine the user data storage unit 340 including the second disk slice 307. Then, the user data stored in the second disk slice 307 may be updated based on the updates of other disk slices included in the user data storage unit 340 during the failure. In other words, at block 260, reconstruction of the user data storage unit 340 is performed.

[0059] Return to reference Figure 2 If, at block 220, the storage manager 120 determines that the duration has not reached the first threshold, in some embodiments, the method 200 may proceed to block 270. For example, if the failed storage disk 311 recovers from the failure before the first timer expires, the method 200 may proceed to block 270.

[0060] In some embodiments, if there are updates related to the first disk slice 301 and / or the second disk slice 307 during the failure, the storage manager 120 may update the metadata stored in the first disk slice 301 and / or the user data stored in the second disk slice 307 at block 260. For example, if during the failure, an I / O request from an upper layer causes the information indicated by the metadata in the first disk slice 301 to be sent to change, the metadata stored in the first disk slice 301 may need to be updated. For example, the storage manager 120 may determine the metadata storage unit 330 including the first disk slice 301. Then, the metadata stored in the first disk slice 301 may be updated based on the updates of other disk slices 332-335 included in the metadata storage unit 330 during the failure. The update of the second disk slice 307 is the same as described above with reference to block 260. Therefore, at block 270, reconstruction of the metadata storage unit 330 and the user data storage unit 340 is performed. Storage units that have not been changed during the failure may not be rebuilt.

[0061] The operations described above for the first disk slice 301 can be applied to any disk slice in the failed storage disk 311 for storing metadata, and the operations described above for the second disk slice 307 can be applied to any disk slice in the failed storage disk 311 for storing user data.

[0062] It can be seen from the above description that the embodiment of the present disclosure proposes a solution for managing storage disks. In the proposed solution, fault monitoring windows of different lengths are applied to different logical layers so as to perform differentiated processing on disk slices used for different logical layers when a fault occurs. In this way, the degradation time of the metadata layer can be effectively reduced. Therefore, the solution can effectively improve the reliability of the data of the metadata layer. In addition, compared with simply reducing the fault monitoring window, the solution can avoid increasing the replacement of unimportant disk slices.

[0063] Figure 4 A schematic block diagram of an example device 400 that can be used to implement an embodiment of the present disclosure is shown. As shown, the device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 402 or loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0064] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0065] The processing unit 401 performs the various methods and processes described above, such as the method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program or a computer program product, which is tangibly contained in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the CPU 401, one or more steps of the method 200 described above may be performed. Alternatively, in other embodiments, the CPU 401 may be configured to perform the method 200 in any other suitable manner (e.g., by means of firmware).

[0066] According to some embodiments of the present disclosure, a computer readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the present disclosure is implemented.

[0067] Those skilled in the art should understand that the various steps of the method disclosed above can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented with program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any specific combination of hardware and software.

[0068] It should be understood that although several devices or sub-devices of the device are mentioned in the detailed description above, this division is only exemplary and not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more devices described above can be embodied in one device. Conversely, the features and functions of one device described above can be further divided into multiple devices to be embodied.

[0069] The above description is only an optional embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for managing a storage disk, comprising: monitoring a duration of a failure of a failed storage disk, the failed storage disk comprising a first disk slice for storing metadata and a second disk slice for storing user data; In response to the duration reaching a first threshold, replacing the first disk slice with a first available disk slice in a first non-failed storage disk; as well as In response to the duration reaching a second threshold greater than the first threshold, replacing the second disk slice with a second available disk slice in a second non-failed storage disk; Wherein replacing the first disk slice with the first available disk slice comprises: Determine the first non-failed storage disk from a storage resource pool including a plurality of storage disks, each of the plurality of storage disks being divided into a plurality of disk slices; Allocating a free disk slice from the first non-faulty storage disk as the first available disk slice; determining metadata stored in the first disk slice; and The determined metadata is written to the first available disk slice.

2. The method of claim 1, wherein determining metadata stored in the first disk slice comprises: determining a metadata storage unit including the first disk slice, the metadata storage unit further comprising at least one disk slice in a storage disk different from the failed storage disk; as well as The metadata stored in the first disk slice is determined based on the data stored in the at least one disk slice.

3. The method of claim 1 , wherein monitoring the duration comprises: In response to the occurrence of the fault, the duration is monitored by starting a first timer having a validity period equal to the first threshold and a second timer having a validity period equal to the second threshold.

4. The method according to claim 1, further comprising: determining a user data storage unit including the second disk slice, the user data storage unit further comprising at least one disk slice in a storage disk different from the failed storage disk; as well as The user data stored in the second disk slice is updated based on the updating of the at least one disk slice during the failure.

5. The method of claim 1 , wherein replacing the second disk slice with the second available disk slice comprises: Determine the second non-failed storage disk from a storage resource pool including a plurality of storage disks, each of the plurality of storage disks being divided into a plurality of disk slices; Allocating a free disk slice from the second non-faulty storage disk as the second available disk slice; Determining user data stored in the second disk slice; as well as The determined user data is written to the second available disk slice.

6. An electronic device comprising: processor; as well as a memory coupled to the processor, the memory having instructions stored therein, the instructions, when executed by the processor, causing the device to perform actions, the actions comprising: monitoring a duration of a failure of a failed storage disk, the failed storage disk comprising a first disk slice for storing metadata and a second disk slice for storing user data; In response to the duration reaching a first threshold, replacing the first disk slice with a first available disk slice in a first non-failed storage disk; and In response to the duration reaching a second threshold greater than the first threshold, replacing the second disk slice with a second available disk slice in a second non-failed storage disk; Wherein replacing the first disk slice with the first available disk slice comprises: Determine the first non-failed storage disk from a storage resource pool including a plurality of storage disks, each of the plurality of storage disks being divided into a plurality of disk slices; Allocating a free disk slice from the first non-faulty storage disk as the first available disk slice; determining metadata stored in the first disk slice; and The determined metadata is written to the first available disk slice.

7. The apparatus of claim 6, wherein determining metadata stored in the first disk slice comprises: determining a metadata storage unit including the first disk slice, the metadata storage unit further comprising at least one disk slice in a storage disk different from the failed storage disk; as well as The metadata stored in the first disk slice is determined based on the data stored in the at least one disk slice.

8. The apparatus of claim 6, wherein monitoring the duration comprises: In response to the occurrence of the fault, the duration is monitored by starting a first timer having a validity period equal to the first threshold and a second timer having a validity period equal to the second threshold.

9. The apparatus of claim 6, wherein the actions further comprise: determining a user data storage unit including the second disk slice, the user data storage unit further comprising at least one disk slice in a storage disk different from the failed storage disk; as well as The user data stored in the second disk slice is updated based on the updating of the at least one disk slice during the failure.

10. The apparatus of claim 6, wherein replacing the second disk slice with the second available disk slice comprises: Determine the second non-failed storage disk from a storage resource pool including a plurality of storage disks, each of the plurality of storage disks being divided into a plurality of disk slices; Allocating a free disk slice from the second non-faulty storage disk as the second available disk slice; Determining user data stored in the second disk slice; as well as The determined user data is written to the second available disk slice.

11. A computer program product tangibly stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Management of a flash memory device

    US20090172248A1

  • Computer-readable medium storing data management program, computer-readable medium storing storage diagnosis program, and multinode storage system

    US20100106907A1