Method, device and computer program product for managing storage pool
By adjusting the storage space of the storage pool to spare space and increasing redundancy, the risk of data loss in a specific storage pool is solved when a fixed number of failed storage devices reaches a fixed number, reducing the probability of data loss and optimizing the usage efficiency of storage devices.
Patent Information
- Application Number
- CN202011011638.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-23
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-09-23
AI Technical Summary
Specific types of storage pools cannot increase redundancy when the number of failed storage devices reaches a fixed allowed number, resulting in an increased risk of data loss. This is especially true when enterprise budgets are limited or storage device purchase cycles are long. Unable to replace in time.
By detecting the number of failed storage devices in the storage pool, when the threshold is reached, the storage space used to store user data in the storage pool is adjusted to spare space to increase redundancy and be used to store data from future failed storage devices, thereby reducing data probability of loss.
It significantly reduces the probability of data loss, reduces the need for users to purchase new storage devices, and optimizes the use efficiency of existing storage devices.
Smart Images

Figure CN114253460B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the field of storage, and more particularly to methods, devices, and computer program products for managing a storage pool. Background Art
[0002] In the storage field, storage pools with mapped independent redundant disk arrays are often used to store data. However, for certain types of storage pools, the number of failed storage devices allowed by the storage pool without causing data loss in the storage pool is fixed. When the number of failed storage devices in the storage pool reaches the allowed number and the failed storage devices are not replaced by new storage devices, data loss may occur in the storage pool. In some cases, such as when the enterprise has a limited budget or the storage device purchase cycle is long, the failed storage device cannot be replaced in time, which increases the risk of data loss. Summary of the invention
[0003] Embodiments of the present disclosure provide methods, devices, and computer program products for managing a storage pool.
[0004] In a first aspect of the present disclosure, a method for managing a storage pool is provided. The method includes: if a storage pool failure is detected, determining the number of failed storage devices in the storage pool; if the number is determined to reach a threshold number, determining whether the redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss in the storage pool; and if it is determined that the redundancy of the storage pool can be increased, adjusting at least a portion of the storage space of the storage pool for storing user data to a spare space of the storage pool for storing data in a storage device that fails in the future.
[0005] In a second aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, cause the device to perform an action, the action including: if a storage pool failure is detected, determine the number of failed storage devices in the storage pool; if the number is determined to reach a threshold number, determine whether the redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss in the storage pool; and if it is determined that the redundancy of the storage pool can be increased, adjust at least a portion of the storage space of the storage pool for storing user data to a spare space of the storage pool for storing data in a storage device that fails in the future.
[0006] In a third aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored in a non-transient computer storage medium and includes machine executable instructions. The machine executable instructions, when executed by a device, cause the device to perform any step of the method described in the first aspect of the present disclosure.
[0007] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. 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 objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.
[0009] Figure 1 A block diagram illustrating an example storage pool management system in which embodiments of the present disclosure can be implemented;
[0010] Figure 2 A schematic diagram showing an example storage pool suitable for use with embodiments of the present disclosure is shown;
[0011] Figure 3 A flowchart illustrating an example method for managing a storage pool according to an embodiment of the present disclosure is shown;
[0012] Figure 4 A flowchart illustrating an example method for adjusting at least a portion of a storage space of a storage pool as spare space according to an embodiment of the present disclosure is shown;
[0013] Figure 5A A schematic diagram showing a storage pool before at least a portion of the storage space of the storage pool is adjusted to a spare space;
[0014] Figure 5B A schematic diagram showing a storage pool during adjustment of at least a portion of storage space of the storage pool as spare space;
[0015] Figure 5C A schematic diagram showing a storage pool after at least a portion of the storage space of the storage pool is adjusted to spare space; and
[0016] Figure 6 A schematic block diagram of an example device that can be used to implement embodiments of the present disclosure is shown.
[0017] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0019] 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.
[0020] In the storage field, storage pools with mapped redundant arrays of independent disks (RAID) are often used to store data. Such storage pools are called dynamic pools. Dynamic pools help achieve the following goals: first, reduce reconstruction time by adding parallelism to the reconstruction process and allowing reconstruction performance to increase with the number of storage devices; second, improve storage pool planning so that the creation and expansion of storage pools are more based on the required capacity (expansion can be one storage device at a time); third, spare management can be performed without dedicated spare storage devices. At the same time, by allocating spare space across storage devices in the storage pool, flash memory loss is reduced and array performance is improved.
[0021] By removing dedicated backup storage devices without reducing storage redundancy, dynamic pools can significantly benefit some enterprise users, such as startup users with limited budgets and unpredictable business growth. In this article, "redundancy" refers to the maximum number of failed storage devices allowed by the storage pool without causing data loss in the storage pool. "Current redundancy" refers to the number of failed storage devices that the storage pool can still allow without causing data loss in the storage pool. As the business grows, disk array groups (RAID groups, RG) of different sizes can be created in the storage pool.
[0022] However, for a certain type of storage pool, the number of failed storage devices allowed by the storage pool without causing data loss in the storage pool is fixed. When the number of failed storage devices in the storage pool reaches the allowed number and the failed storage devices are not replaced by new storage devices, data loss may occur in the storage pool. In some cases, such as when the enterprise has a limited budget or the storage device purchase cycle is long, the failed storage device cannot be replaced in time, which increases the risk of data loss.
[0023] The embodiments of the present disclosure propose a solution for managing a storage pool to solve one or more of the above problems and other potential problems. The solution can increase the redundancy of the storage pool by adjusting at least a portion of the storage space of the storage pool for storing user data as the spare space of the storage pool, thereby increasing the redundancy of the storage pool without replacing the failed storage device, and significantly reducing the probability of data loss. In addition, since the probability of data loss is reduced when the failed storage device is not replaced, the cost of purchasing the storage device for the user is reduced, and the use of the existing storage devices of the storage pool is optimized.
[0024] Figure 1 1 is a block diagram of an example storage pool management system 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, the storage pool management system 100 includes a storage pool management device 110 and a storage pool 120. The storage pool includes storage devices 130-1 to 130-N (collectively referred to as storage devices 130). The storage space 140 and the spare space 150 of the storage pool are distributed across the storage devices 130, and the storage space 140 includes multiple disk array groups (not shown). The various methods according to the embodiments of the present disclosure can be implemented at the storage pool management device 110. It should be understood that the structure of the storage pool management system 100 is described only for exemplary purposes and does not imply any limitation on the scope of the present disclosure. For example, the embodiments of the present disclosure can also be applied to systems different from the storage pool management system 100. It should be understood that the specific numbers of the above-mentioned devices and apparatuses are given only for illustrative purposes and do not imply any limitation on the scope of the present disclosure. For example, the embodiments of the present disclosure can also be applied to more or fewer devices and apparatuses.
[0025] The storage pool management device 110 may determine the number of failed storage devices in the storage pool 120 when a failure of the storage pool 120 is detected. When it is determined that the number reaches a threshold number and the redundancy of the storage pool 120 can be increased, the storage pool management device 110 may adjust at least a portion of the storage space 140 of the storage pool 120 for storing user data to a spare space 150 of the storage pool 120 for storing data in a storage device that fails in the future.
[0026] The storage pool management device 110 may be, for example, a computer, a virtual machine, a server, etc., and the present disclosure is not limited in this respect. The storage device 130 may be, for example, a hard disk, a floppy disk, a magnetic disk, etc., and the present disclosure is not limited in this respect. The storage pool management device 110 and the storage pool 120 communicate with each other via a network, and the network may be, for example, the Internet, an intranet, etc.
[0027] Figure 2 Schematic diagram 200 of an example storage pool suitable for use with embodiments of the present disclosure is shown. Figure 2 As shown, the storage pool 200 includes 10 storage devices, which are represented by 210-1 to 210-10 respectively. That is, each column represents a storage device 210. The space size of each storage device 210 is the same. Three disk array groups are set on a part of the storage device 210, which are represented by 220-1 to 220-3 respectively. These three disk array groups 220 are distributed across the storage devices 210, and together constitute the storage space of the storage pool 200. A part of the storage device 210 is set as a spare space 230. The spare space 230 is set to store data in the failed storage device when a storage device 210 in the storage pool 200 fails. As shown in FIG. Figure 2 As shown, each storage device 210 is divided into 10 parts of the same size, wherein the first 9 parts are set as storage spaces and the last part is set as spare space.
[0028] In such Figure 2 In the example shown, it is assumed that the redundancy of the storage pool 200 is 1. When the storage devices 210 in the storage pool 200 are all operating normally, user data is stored in the disk array group 220, and the spare space 230 is empty. When one of the storage devices, such as the storage device 210-10, fails, the data in the failed storage device 210-10 is copied to the spare space 230. In this case, the current redundancy of the storage pool 210 is 0, and the redundancy is not restored to 1 until the failed storage device is replaced with a new storage device and data reconstruction is completed. Before the failed storage device is replaced, if another storage device, such as the storage device 210-9, fails, there is no spare space 230 to store the data in the failed storage device 210-9, so data loss (DL) occurs.
[0029] In a conventional implementation, a storage pool of a particular type has a particular redundancy. In other words, the number of failed storage devices allowed by a storage pool of a particular type without causing data loss in the storage pool is fixed. For example, for a storage pool of RAID 5 type, the redundancy is 1. For a storage pool of RAID 6 type, the redundancy is 2.
[0030] It should be understood that the example storage pool is shown only for exemplary purposes and does not imply any limitation to the present disclosure. For example, the storage pool may also include more or fewer storage devices. More or fewer disk array groups may also be set on the storage device. The sizes of the disk array groups may be the same or different, etc. The present disclosure is not limited in these aspects.
[0031] Figure 3 FIG. 3 is a flowchart of an exemplary method 300 for managing a storage pool according to an embodiment of the present disclosure. For example, the method 300 may be performed as follows: Figure 1 The method 300 is performed by the storage pool management device 110 shown in the figure. It should be understood that the method 300 can also be performed by other devices, and the scope of the present disclosure is not limited in this respect. It should also be understood that the method 300 can also include additional actions not shown and / or can omit the actions shown, and the scope of the present disclosure is not limited in this respect.
[0032] At 310, the storage pool management device 110 detects whether a failure occurs in the storage pool 120. In some embodiments, the storage pool management device 110 may periodically detect whether a failure occurs in a storage device 130 in the storage pool 120. Additionally or alternatively, in some embodiments, the storage pool management device 110 may receive a notification indicating that the storage pool 120 has failed when a storage device 130 in the storage pool 120 has failed.
[0033] If the storage pool management device 110 detects that the storage pool 120 fails, then at 320, the storage pool management device 110 determines the number of failed storage devices in the storage pool 120. In some embodiments, the storage pool management device 110 may set a counter to indicate the number of failed storage devices. For example, each time the storage pool management device 110 detects that a certain storage device 130 in the storage pool 120 fails, the counter is incremented by one. Additionally or alternatively, in some embodiments, the storage pool management device 110 may set a status identifier to indicate the status of each storage device 130 in the storage pool 120, and determine the number of failed storage devices through the status identifier.
[0034] As mentioned above, the number of failed storage devices allowed by a specific type of storage pool without causing data loss in the storage pool is fixed. For example, for a RAID5 type storage pool, the redundancy is 1, that is, the number of failed storage devices allowed by this type of storage pool without causing data loss in the storage pool is 1. Similarly, for a RAID 6 type storage pool, the redundancy is 2, that is, the number of failed storage devices allowed by this type of storage pool without causing data loss in the storage pool is 2. Therefore, at 330, the storage pool management device 110 determines whether the number of failed storage devices in the storage pool 120 reaches a threshold number, and if it is determined that the number reaches the threshold number, then at 340, the storage pool management device 110 determines whether the redundancy of the storage pool 120 can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss in the storage pool 120.
[0035] In some embodiments, the threshold number may be set to the number of failed storage devices that the storage pool 120 allows without causing data loss. For example, for a storage pool of RAID 5 type, the threshold number may be set to 2. In this case, when the number of failed storage devices in the storage pool 120 reaches the threshold number, if the operation of increasing redundancy described below is not performed, data loss may occur in the storage pool when more storage devices fail.
[0036] Alternatively, in some embodiments, the threshold number may be set to be smaller than the number of failed storage devices that the storage pool 120 allows without causing data loss. For example, for a storage pool of the RAID 5 type, the threshold number may be set to 1. In this case, when the number of failed storage devices in the storage pool 120 reaches the threshold number, the storage pool 120 can actually allow more storage devices to fail without causing data loss. In this case, the operation of increasing redundancy described below can still be performed to further increase the redundancy of the storage pool 120.
[0037] As will be described in detail below, since the operation of increasing redundancy is to adjust at least a portion of the storage space 140 of the storage pool 120 used to store user data to the spare space 150 of the storage pool 120, the storage pool management device 110 first determines whether the redundancy of the storage pool 120 can be increased before performing the adjustment operation, so as to reduce the probability of failure of the operation of increasing redundancy, thereby avoiding unnecessary impact on the performance of the storage pool.
[0038] In some embodiments, the storage pool management device 110 may determine whether the storage pool 120 is accessible and there is no ongoing data replication process. It is easy to understand that if the storage pool 120 is inaccessible, for example, the storage pool 120 is in an offline state, the storage pool management device 110 cannot perform an operation of increasing the redundancy of the storage pool 120. In addition, as will be described in detail below, since the operation of increasing the redundancy of the storage pool 120 involves data replication between disk array groups in the storage pool 120, if there is an ongoing data replication process in the storage pool 120, the storage pool management device 110 determines that the redundancy of the storage pool 120 cannot be increased. Otherwise, if the operation of increasing the redundancy of the storage pool 120 is performed when there is an ongoing data replication process in the storage pool 120, the performance of the storage pool 120 will be affected.
[0039] Additionally or alternatively, in some embodiments, if the storage pool management device 110 determines that the storage pool 120 is accessible and there is no data replication process in progress, the storage pool management device 110 may determine whether there is a target disk array group among the multiple disk array groups distributed across the storage devices 130 in the storage pool 120, and the size of the first data stored in the target disk array group is less than or equal to the size of the free storage space of the remaining disk array groups among the multiple disk array groups.
[0040] In order to adjust at least a portion of the storage space 140 of the storage pool 120 to the spare space 150 of the storage pool 120, the storage pool management device 110 needs to select a disk array group from multiple disk array groups, copy the user data in the selected disk array group to other disk array groups, and then release the storage space of the selected disk array group. Therefore, the size of the free storage space of other disk array groups must be sufficient to accommodate the user data stored in the selected disk array group, otherwise the operation of adjusting at least a portion of the storage space to the spare space may cause data loss.
[0041] In some embodiments, the storage pool management device 110 may check the fixed-size data blocks in each disk array group in the storage pool 120 to determine the size of the data stored in each disk array group. These fixed-size data blocks are sometimes also referred to as "slices". Then, the storage pool management device 110 may determine whether there is a target disk array group in the plurality of disk array groups, so as to copy the data in the target disk array group to other disk array groups without causing data loss.
[0042] Additionally, in some embodiments, the storage pool management device 110 may estimate whether there is enough free storage space in the storage pool to accommodate the data stored in the target disk array group according to the historical storage space consumption rate.
[0043] Additionally, in some embodiments, the storage pool management device 110 may determine the disk array group with the smallest storage space occupied by the stored data from the multiple disk array groups, and then the storage pool management device 110 determines the disk array group as the target disk array group. In such an embodiment, since the disk array group to be copied has the least data, the copy operation occupies the least resources, so that the impact of the operation of increasing redundancy on the storage pool is minimized.
[0044] If the storage pool management device 110 determines that the redundancy of the storage pool 120 can be increased, then at 350, the storage pool management device 110 adjusts at least a portion of the storage space 140 of the storage pool 120 for storing user data to the spare space 150 of the storage pool 120 for storing data in a storage device that fails in the future.
[0045] In some embodiments, the storage pool management device 110 may determine a target disk array group from a plurality of disk array groups, and then set a portion of the storage space of the target disk array group as spare space.
[0046] Additionally, in some embodiments, after determining that the redundancy of the storage pool 120 can be increased, the storage pool management device 110 determines whether a request to increase redundancy is received. If it is determined that a request to increase redundancy is received, the storage pool management device 110 adjusts at least a portion of the storage space 140 of the storage pool 120 to the spare space 150.
[0047] For example, the storage pool management device 110 may generate a user interface to receive a request to increase the redundancy of the storage pool 120 after determining that the redundancy of the storage pool 120 can be increased. In such an embodiment, the user may determine whether to send a request to increase the redundancy of the storage pool 120 to the storage pool management device 110 as needed. For example, when the user has a limited budget and does not intend to purchase a new storage device to replace a faulty storage device, or when the user finds that the space of the storage pool is usually larger than the storage space required for daily use, the user may send a request to increase the redundancy of the storage pool 120 to the storage pool management device 110 to increase the redundancy of the storage pool 120 at the expense of a portion of the storage space of the storage pool 120. On the contrary, if the user does not want to reduce the storage space of the storage pool 120, even if the redundancy of the storage pool 120 can be increased, the user may choose not to increase the redundancy of the storage pool 120 as needed.
[0048] Additionally or alternatively, in some embodiments, if the storage pool management device 110 does not receive a request not to increase redundancy within a predetermined period of time after determining that the redundancy of the storage pool 120 can be increased, the storage pool management device 110 automatically performs the above-described adjustment of the storage space. In the above embodiments, the user can flexibly set whether to increase the redundancy of the storage pool as needed.
[0049] In the above exemplary embodiment, by adjusting at least a portion of the storage space of the storage pool used to store user data as the backup space of the storage pool, the redundancy of the storage pool can be increased, thereby increasing the redundancy of the storage pool without replacing a faulty storage device, significantly reducing the probability of data loss.
[0050] In addition, since the probability of data loss is reduced when a failed storage device is not replaced, the cost of purchasing storage devices for users is reduced, and the use of existing storage devices in the storage pool is optimized.
[0051] Figure 4 FIG. 4 is a flowchart showing an exemplary method 400 for adjusting at least a portion of a storage space of a storage pool as spare space according to an embodiment of the present disclosure. For example, the method 400 may be performed as follows: Figure 1 The method 400 is performed by the storage pool management device 110 shown in the figure. The method 400 is an example embodiment of 350 in the method 300. It should be understood that the method 400 can also be performed by other devices, and the scope of the present disclosure is not limited in this respect. It should also be understood that the method 400 can also include additional actions not shown and / or can omit the actions shown, and the scope of the present disclosure is not limited in this respect.
[0052] The following describes with reference to FIG. 5 Figure 4 . Figure 5A A schematic diagram 510 of a storage pool is shown before at least a portion of the storage space of the storage pool is adjusted as spare space. Figure 5B A schematic diagram 520 of a storage pool is shown during the adjustment of at least a portion of the storage space of the storage pool as spare space. Figure 5C A schematic diagram 530 shows a storage pool after at least a portion of the storage space of the storage pool is adjusted as spare space.
[0053] At 410, the storage pool management device 110 copies the first data stored in the target disk array group to the remaining disk array groups in the plurality of disk array groups. In some embodiments, the storage pool management device 110 may copy the first data stored in the target disk array group to the other disk array groups uniformly. In some embodiments, the storage pool management device 110 may copy the first data stored in the target disk array group to a designated disk array group as long as the free space of the disk array group is sufficient to accommodate the first data stored in the target disk array group.
[0054] like Figure 5A As shown, there are multiple disk array groups 504-2 to 504-N (collectively referred to as "disk array group 504") in the storage pool 502. Assuming that the storage pool management device 110 has determined that the disk array group 504-2 is the target disk array group from the disk array groups 504-2 to 504-N, the storage pool management device 110 can evenly copy the slices in the target disk array group 504-2 to the other disk array groups 504-4 to 504-N.
[0055] Additionally, in some embodiments, the storage pool management device 110 may set a freeze indicator for the target disk array group to set the target disk array group to "read-only" during the data replication from the target disk array group to other disk array groups. In this case, write operations, move operations, etc. to the target disk array group will be blocked. Input and output operations for the target disk array group may be redirected to other disk array groups.
[0056] After the first data stored in the target disk array group is completely copied to the remaining disk array groups in the plurality of disk array groups, at 420, the storage pool management device 110 releases the storage space of the target disk array group. Figure 5C As shown in FIG. 5 , after all the data in the target disk array group 504 - 2 is copied to the disk array groups 504 - 4 to 504 -N, the storage space of the target disk array group 504 - 2 is released.
[0057] In some cases, if data replication from a target disk array group to another disk array group is terminated due to an unexpected situation, the storage pool management device 110 may restore the target disk array group to an initial state before the data replication is performed.
[0058] At 430 , the storage pool management device 110 sets at least a portion of the released storage space as spare space.
[0059] In some embodiments, the storage pool management device 110 may set the storage space of the same size as one storage device 130 in the released storage space as the spare space. Alternatively, in some embodiments, the storage pool management device 110 may set the storage space of a size that is a multiple of the storage space of the storage device 130 as the spare space. Additionally, in some embodiments, the storage pool management device 110 may select the released storage space of the same size from each storage device 130 to combine into the spare space.
[0060] In some embodiments, the storage pool management device 110 may also determine the size of the remaining space in the released storage space that is not set as spare space. If the storage pool management device 110 determines that the size of the remaining space is greater than or equal to the size of the space of one storage device, at least a portion of the remaining space is set as a new disk array group. For example, the storage pool management device 110 may set the storage space in the remaining space that has the same size as one storage device 130 as the new disk array group. The storage pool management device 110 may also set the storage space in the remaining space that is a multiple of the storage space of one storage device 130 as the new disk array group.
[0061] In the above exemplary embodiment, by adjusting at least a portion of the storage space of the storage pool as spare space, it is possible to increase the redundancy of the storage pool. In addition, by setting the remaining space in the released storage space that is not set as spare space as a new disk array group, the released storage space can be fully utilized.
[0062] Figure 6 Schematic block diagram of an example device 600 that can be used to implement embodiments of the present disclosure is shown. Figure 1 The storage pool management device 110 shown may be implemented by the device 600. Figure 6 As shown, the device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 602 or computer program instructions loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0063] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0064] The various processes and processing described above, such as methods 300 and 400, may be performed by the processing device 601. For example, in some embodiments, the methods 300 and 400 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the CPU 601, one or more actions of the methods 300 and 400 described above may be performed.
[0065] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0066] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination of the above. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0067] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0068] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0069] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0070] These computer-readable program instructions can be provided to a processing device of a general-purpose computer, a special-purpose computer or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing device of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0071] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0072] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0073] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for managing a storage pool, comprising: If a storage pool failure is detected, determining the number of failed storage devices in the storage pool; If it is determined that the number reaches a threshold number, determining whether redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss in the storage pool, wherein determining whether the redundancy of the storage pool can be increased comprises: Determining whether there is a target disk array group among a plurality of disk array groups distributed across storage devices in the storage pool, a size of first data stored in the target disk array group being smaller than or equal to a size of free storage space of remaining disk array groups among the plurality of disk array groups; and If it is determined that the target disk array group exists in the plurality of disk array groups, determining that the redundancy of the storage pool can be increased; and If it is determined that the redundancy of the storage pool can be increased, at least a portion of the storage space of the storage pool for storing user data is adjusted to a spare space of the storage pool for storing data in a storage device that fails in the future, wherein adjusting the at least a portion of the storage space to the spare space comprises: Copying the first data stored in the target disk array group to the remaining disk array groups in the multiple disk array groups; releasing storage space of the target disk array group; and At least a portion of the released storage space is set as the spare space.
2. The method according to claim 1, further comprising: Determine the size of remaining space in the released storage space that is not set as the spare space; as well as If it is determined that the size of the remaining space is greater than or equal to the size of a space of a storage device in the storage pool, at least a portion of the remaining space is set as a new disk array group.
3. The method according to claim 1, wherein adjusting the at least a portion of the storage space as the spare space comprises: If a request to increase the redundancy is received, the at least a portion of the storage space is adjusted to the spare space.
4. A method for managing a storage pool, comprising: If a storage pool failure is detected, determining the number of failed storage devices in the storage pool; If it is determined that the number reaches a threshold number, determining whether redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss in the storage pool, wherein determining whether the redundancy of the storage pool can be increased comprises: If it is determined that the storage pool is accessible and there is no ongoing data replication process, determining whether there is a target disk array group among a plurality of disk array groups distributed across storage devices in the storage pool, a size of the first data stored in the target disk array group being smaller than or equal to a size of free storage space of remaining disk array groups among the plurality of disk array groups, and If it is determined that the target disk array group exists in the plurality of disk array groups, determining that the redundancy of the storage pool can be increased; and If it is determined that the redundancy of the storage pool can be increased, at least a portion of the storage space of the storage pool for storing user data is adjusted to a spare space of the storage pool for storing data in a storage device that fails in the future, wherein adjusting the at least a portion of the storage space to the spare space comprises: Copying the first data stored in the target disk array group to the remaining disk array groups in the multiple disk array groups; releasing storage space of the target disk array group; and At least a portion of the released storage space is set as the spare space.
5. The method according to claim 4, further comprising: Determine the size of remaining space in the released storage space that is not set as the spare space; as well as If it is determined that the size of the remaining space is greater than or equal to the size of a space of a storage device in the storage pool, at least a portion of the remaining space is set as a new disk array group.
6. The method according to claim 4, wherein adjusting the at least a portion of the storage space as the spare space comprises: If a request to increase the redundancy is received, the at least a portion of the storage space is adjusted to the spare space.
7. An electronic device comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the apparatus to perform actions comprising: If a storage pool failure is detected, determining the number of failed storage devices in the storage pool; If it is determined that the number reaches a threshold number, determining whether redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss in the storage pool, wherein determining whether the redundancy of the storage pool can be increased comprises: Determining whether there is a target disk array group among a plurality of disk array groups distributed across storage devices in the storage pool, a size of first data stored in the target disk array group being smaller than or equal to a size of free storage space of remaining disk array groups among the plurality of disk array groups; and If it is determined that the target disk array group exists in the plurality of disk array groups, determining that the redundancy of the storage pool can be increased; and If it is determined that the redundancy of the storage pool can be increased, at least a portion of the storage space of the storage pool for storing user data is adjusted to a spare space of the storage pool for storing data in a storage device that fails in the future, wherein adjusting the at least a portion of the storage space to the spare space comprises: Copying the first data stored in the target disk array group to the remaining disk array groups in the multiple disk array groups; releasing storage space of the target disk array group; and At least a portion of the released storage space is set as the spare space.
8. The device of claim 7, wherein the actions further comprise: Determine the size of remaining space in the released storage space that is not set as the spare space; as well as If it is determined that the size of the remaining space is greater than or equal to the size of a space of a storage device in the storage pool, at least a portion of the remaining space is set as a new disk array group.
9. The apparatus according to claim 7, wherein adjusting the at least a portion of the storage space as the spare space comprises: If a request to increase the redundancy is received, the at least a portion of the storage space is adjusted to the spare space.
10. An electronic device comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the apparatus to perform actions comprising: If a storage pool failure is detected, determining the number of failed storage devices in the storage pool; If it is determined that the number reaches a threshold number, determining whether redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss in the storage pool, wherein determining whether the redundancy of the storage pool can be increased comprises: If it is determined that the storage pool is accessible and there is no ongoing data replication process, determining whether there is a target disk array group among a plurality of disk array groups distributed across storage devices in the storage pool, a size of the first data stored in the target disk array group being smaller than or equal to a size of free storage space of remaining disk array groups among the plurality of disk array groups, and If it is determined that the target disk array group exists in the plurality of disk array groups, determining that the redundancy of the storage pool can be increased; and If it is determined that the redundancy of the storage pool can be increased, at least a portion of the storage space of the storage pool for storing user data is adjusted to a spare space of the storage pool for storing data in a storage device that fails in the future, wherein adjusting the at least a portion of the storage space to the spare space comprises: Copying the first data stored in the target disk array group to the remaining disk array groups in the multiple disk array groups; releasing storage space of the target disk array group; and At least a portion of the released storage space is set as the spare space.
11. The device of claim 10, wherein the actions further comprise: Determine the size of remaining space in the released storage space that is not set as the spare space; as well as If it is determined that the size of the remaining space is greater than or equal to the size of a space of a storage device in the storage pool, at least a portion of the remaining space is set as a new disk array group.
12. The apparatus according to claim 10, wherein adjusting the at least a portion of the storage space as the spare space comprises: If a request to increase the redundancy is received, the at least a portion of the storage space is adjusted to the spare space.
13. A computer program product having a non-transitory computer readable medium storing a set of instructions for managing a storage pool; When the instruction set is executed by a computerized circuit, the computerized circuit performs the following method: In response to detecting a failure in a storage pool, determining a number of failed storage devices in the storage pool; In response to the number of failed storage devices in the storage pool reaching a threshold number, determining whether redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss of the storage pool, wherein determining whether the redundancy of the storage pool can be increased comprises: Determine whether there is a target disk array group among multiple disk array groups distributed across storage devices in the storage pool, and the size of the first data stored in the target disk array group is less than or equal to the size of the free storage space of the remaining disk array groups among the multiple disk array groups; as well as If it is determined that the target disk array group exists in the plurality of disk array groups, determining that the redundancy of the storage pool can be increased; as well as In response to determining that the redundancy of the storage pool can be increased, at least a portion of the storage space of the storage pool for storing user data is adjusted to a spare space of the storage pool for storing data in a storage device that fails in the future, wherein adjusting the at least a portion of the storage space to the spare space comprises: Copying the first data stored in the target disk array group to the remaining disk array groups in the multiple disk array groups; releasing storage space of the target disk array group; and At least a portion of the released storage space is set as the spare space.
14. A computer program product having a non-transitory computer readable medium storing a set of instructions for managing a storage pool; When the instruction set is executed by a computerized circuit, the computerized circuit performs the following method: In response to detecting a failure in a storage pool, determining a number of failed storage devices in the storage pool; In response to the number of failed storage devices in the storage pool reaching a threshold number, determining whether redundancy of the storage pool can be increased, the redundancy indicating the number of failed storage devices allowed without causing data loss of the storage pool, wherein determining whether the redundancy of the storage pool can be increased comprises: If it is determined that the storage pool is accessible and there is no ongoing data replication process, determining whether there is a target disk array group among a plurality of disk array groups distributed across storage devices in the storage pool, a size of the first data stored in the target disk array group being smaller than or equal to a size of free storage space of remaining disk array groups among the plurality of disk array groups, and If it is determined that the target disk array group exists in the plurality of disk array groups, it is determined that the redundancy of the storage pool can be increased In response to determining that the redundancy of the storage pool can be increased, at least a portion of the storage space of the storage pool for storing user data is adjusted to a spare space of the storage pool for storing data in a storage device that fails in the future, wherein adjusting the at least a portion of the storage space to the spare space comprises: Copying the first data stored in the target disk array group to the remaining disk array groups in the multiple disk array groups; releasing storage space of the target disk array group; and At least a portion of the released storage space is set as the spare space.
