WO2014101144A1 - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
WO2014101144A1
WO2014101144A1 PCT/CN2012/087922 CN2012087922W WO2014101144A1 WO 2014101144 A1 WO2014101144 A1 WO 2014101144A1 CN 2012087922 W CN2012087922 W CN 2012087922W WO 2014101144 A1 WO2014101144 A1 WO 2014101144A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
resource pool
slice
slices
data
Prior art date
Application number
PCT/CN2012/087922
Other languages
French (fr)
Chinese (zh)
Inventor
田晓波
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2012/087922 priority Critical patent/WO2014101144A1/en
Priority to CN201280003656.8A priority patent/CN103384550B/en
Publication of WO2014101144A1 publication Critical patent/WO2014101144A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2094Redundant storage or storage space

Definitions

  • the present invention relates to the field of electronic information technology, and in particular, to a method and apparatus for storing data.
  • Distributed storage technology is a commonly used data storage technology.
  • all hard disks in the system can be managed as a storage resource pool.
  • the entire storage resource pool serves as a storage area for data interaction.
  • a distributed storage system can map a virtual volume to all the hard disks in the storage resource pool, and divide the space on the volume into several 1M-sized data blocks, each of which corresponds to one of all the hard disks in the resource pool.
  • the block holds the logical partition unit Partition.
  • all the data in a Partition will be saved in multiple copies. For example: In a dual-copy scenario, each data block corresponds to two Partitions in all the hard disks in the resource pool, and these two The contents of Partition are identical.
  • the same two Partitions such as P1 and ⁇ are often assigned to two different hard disks such as: P1 on hard disk 1, ⁇ on hard disk 2, so that Partition can be evenly distributed throughout In the resource pool, this method of allocating Partitions is widely used because it can maximize the read and write speed of hard disks in the resource pool.
  • Hard disk 1 is damaged. Because of Pl, P4, P5, and P8 on hard disk 1, there are corresponding copies on hard disks 2, 3, and 4. , the data of the hard disk 1 can be repaired by the corresponding copy on the hard disks 2, 3, and 4.
  • An embodiment of the present invention provides a method and an apparatus for storing data, which can divide all storage devices in a storage system into at least two resource pools, and store the data in the divided resource pools, because each resource pool The data in the data is independent. Only when two storage devices in the same resource pool are damaged, the data will be completely damaged, thereby reducing the probability of complete data corruption and improving data security.
  • an embodiment of the present invention provides a method for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools.
  • Each sub-resource pool includes an adjacent N storage devices, N > 2, and the method includes:
  • the data to be stored is divided into R slices, and the R slices are distributed into the divided sub-resource pools, and the number of copies to be generated by the data to be stored is less than N, R >2;
  • Each of the slices in the sub-resource pool generates a replica slice and stores the replica slice in a sub-resource pool to which the slice belongs, the replica slice corresponding to the slice having the same data.
  • the storing the copy in a sub-resource pool to which the slice belongs includes: storing the replica slice to correspond to the slice On the storage device in the sub-resource pool to which it belongs, and each of the replica slice stores is stored on a different storage device.
  • the method further includes: dividing the divided sub-resource pool into different levels of sub-resources a pool set, each sub-resource pool set includes at least one sub-resource pool, and each of the different levels of sub-resource pool sets has a different number of replica slices that are expected to be generated; each pair is distributed to each sub-resource pool And generating, by the slice, the replica slice, comprising: generating, according to the number of replica slices that each slice of the slice corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs, the slice-distributed to each of the sub-resource pools Corresponding number of copies of the slice.
  • the replica slice is stored in a sub-resource pool to which the slice belongs After that, it also includes:
  • the replica slice is stored in a sub-resource pool to which the slice belongs After that, it also includes:
  • the replica slice of the slice in the sub-resource pool is re-allocated to the storage device in the sub-resource pool.
  • the distributing the R slices into the pre-divided sub-resource pool includes:
  • R slices are distributed to different levels of child resource pools.
  • an embodiment of the present invention provides an apparatus for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools.
  • Each sub-resource pool includes an adjacent N storage devices, N > 2, and the method includes:
  • a distribution module configured to divide the data to be stored into R slices, and distribute the R pieces into the divided sub-resource pool, where the number of copies to be stored is expected to be less than N, R > 2 ;
  • a copy generation module configured to generate a copy of each of the slices distributed to each of the child resource pools
  • the method further includes: the storage module, configured to store the replica slice to a storage device corresponding to a sub-resource pool to which the slice belongs The storage device stored in each of the replica slices is different from the storage device corresponding to the slice storage, and the replica slices with the same data are stored on different storage devices.
  • the method further includes:
  • a partitioning module configured to divide the divided sub-resource pool into different levels of sub-resource pools, each sub-resource pool set including at least one sub-resource pool, and different levels of sub-resource pools The number of replica slices that are expected to be generated for each of the slices in the collection is different;
  • the copy generation module is further configured to allocate each of the copies to the sub-resource pool according to the number of replica slices that each of the slices corresponding to the sub-resource pool of the sub-resource pool belongs to.
  • the slice generates a corresponding number of copies of the slice.
  • a negative adjustment module configured to reduce the number of storage devices in the sub-resource pool for any one of the sub-resource pools
  • the method further includes:
  • a positive adjustment module configured to increase the number of storage devices in the sub-resource pool for any one of the sub-resource pools
  • the data distribution module is further configured to: when the number of storage devices in the sub-resource pool is increased, re-allocate a replica slice of the slice in the sub-resource pool to a storage device in the sub-resource pool.
  • the method further includes:
  • an embodiment of the present invention provides a storage system for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools, each sub-resource.
  • the pool includes adjacent N storage devices, N > 2, and the storage system includes: a processor, a communication interface, and a bus, and is characterized by further including a storage device, the processor, the communication interface, and all storage The devices complete communication with each other through the bus, wherein:
  • the processor is configured to divide data to be stored into R slices, and distribute the R pieces into the divided sub-resource pools through the communication interface, where the data to be stored is expected to be generated
  • the number is less than N, R > 2;
  • the processor is further configured to generate a replica slice for each of the slices distributed in each sub-resource pool, and store the replica slice in a sub-resource pool to which the slice belongs, the replica slice and The slices of the same data correspond to each other.
  • the method includes: the processor is further configured to store the replica slice to a storage device corresponding to a sub-resource pool to which the slice belongs And the storage device stored in each of the replica slices is different from the storage device corresponding to the slice storage, and the replica slices with the same data are stored on different storage devices.
  • the processor is further configured to divide the divided sub-resource pool For a different set of sub-resource pools, each sub-resource pool set includes at least one sub-resource pool, and each of the different levels of the sub-resource pool sets has a different number of replica slices that are expected to be generated;
  • the processor is further configured to allocate each slice in the sub-resource pool according to the number of replica slices that each slice corresponding to the slice corresponding to the sub-resource pool of the sub-resource pool is expected to generate. Generate a corresponding number of copy tiles.
  • the processor is further configured to store the replica slice in a corresponding location After the sub-resource pool to which the slice belongs, for any one of the sub-resource pools, when the number of storage devices in the sub-resource pool is reduced, the slice in the reduced storage device is used by the communication interface Allocating to other storage devices in the sub-resource pool, the number of remaining storage devices in the sub-resource pool is greater than the number of copies that are expected to be generated.
  • the processor is further configured to store the replica slice in a corresponding location After the sub-resource pool to which the slice belongs, for any one of the sub-resource pools, when the number of storage devices in the sub-resource pool is increased, the slice in the sub-resource pool is The replica slice is reassigned to the storage device in the child resource pool.
  • the processor is further configured to distribute R slices to different levels according to importance of data in the R slices. In the child resource pool.
  • an embodiment of the present invention provides a computer program product for storing data, which is used in a storage system, where the storage system includes a resource pool for storing data, wherein the resource pool is logically divided.
  • the storage system includes a resource pool for storing data, wherein the resource pool is logically divided.
  • each sub-resource pool includes an adjacent N storage devices, N > 2
  • the computer program product includes a computer-readable storage medium storing program code
  • the program code includes instructions In:
  • the data to be stored is divided into R slices, and the R slices are distributed into the divided sub-resource pools, and the number of copies that the data to be stored is expected to be generated is less than N, R >2; Generating a replica slice for each of the slices distributed into each of the sub-resource pools, and storing the replica slice in a sub-resource pool to which the slice belongs, the replica slice corresponding to the same data as the slice corresponding to each other .
  • the method, device, storage system and computer program product for repairing data provided by the embodiments of the present invention can divide all storage devices in the storage system into at least two sub-resource pools, and store the data in the divided sub-resource pools. Because the data in each sub-resource pool is independent, only the two storage devices in the same sub-resource pool are damaged, and the data is completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption. In the embodiment of the present invention, multiple sub-resource pools can be divided, and the data is stored in the divided In a sub-resource pool, only when two storage devices in the same sub-resource pool are damaged, the data is completely damaged.
  • the probability of two storage devices in the same sub-resource pool is less than that in the prior art.
  • the probability of damaging two storage devices is such that the embodiment of the present invention can reduce the probability of complete data corruption relative to the prior art, thereby improving data security.
  • FIG. 1 is a flowchart of a method for storing data according to an embodiment of the present invention
  • FIG. 1a is a schematic diagram of a specific example of a method for storing data according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram of another specific example of a method for storing data according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of another method for storing data according to an embodiment of the present invention
  • FIG. 3 is a flowchart of still another method for storing data according to an embodiment of the present invention
  • FIG. 3a is a schematic diagram of still another specific example of a method for storing data according to an embodiment of the present disclosure
  • FIG. 3 is a flowchart of still another method for storing data according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of another specific example of a method for storing data according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of still another method for storing data according to an embodiment of the present invention
  • FIG. 4b is another flowchart of a method for storing data according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of another apparatus for storing data according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of storing data according to an embodiment of the present invention. Schematic diagram of the network architecture of the storage system.
  • an embodiment of the present invention provides a method for storing data, as shown in FIG. 1, including:
  • the embodiment of the present invention may be used in a storage system, where the storage system includes a resource pool for storing data, wherein the resource pool is logically divided into at least two sub-resource pools, each sub-resource.
  • the pool includes adjacent N storage devices, N > 2.
  • the embodiments of the present invention may be implemented by a device having a data transmission, processing, and storage function, for example, a management server, a mobile workstation, and the like for managing a hard disk array in a distributed storage system.
  • the number of copies that the data to be stored is expected to be generated is less than N, that is, the number of copies of the data to be stored is expected to be smaller than the number of storage devices in the child resource pool, and 1 > 2.
  • the slice allocated to the sub-resource pool 1 is Pl, P2, P3, and the number of copies expected to be generated is 2, then the management server can be allocated according to
  • the slice into the sub-resource pool 1 is P1, P2, P3, and the copy slice ⁇ , ⁇ 2, ⁇ 3' of the first copy, and the copy slice ⁇ , ⁇ 2,,, ⁇ 3, of the second copy are generated.
  • the PI, P2, P3, ⁇ , ⁇ 2, ⁇ 3', ⁇ , ⁇ 2,, ⁇ 3 are stored in the storage device in the sub-resource pool 1 by means of distributed breaking techniques.
  • the management server may divide the data to be stored into multiple data slices by using common technical means.
  • the management server may use the data slicing method in the RAID technology well known to those skilled in the art to store the data.
  • the data is divided into at least 2 data slices, and the divided data slices are distributed on the child resource pool.
  • the data slice can be distributed on the sub-resource pool.
  • the management server can distribute the data slice to the sub-resources by means of distributed distribution in the RAID technology. On the pool, you can also distribute the data slices in the divided sub-resource pools.
  • the management server may divide the storage device in the system into multiple sub-resource pools on a logical level, and each sub-resource pool is composed of multiple storage devices, for example:
  • the management server can divide the 24 hard disks into 3 sub-resource pools through the MDC (Metadata Controller). Each sub-resource pool includes 8 hard disks.
  • the architecture of the multi-sub-resource pool shown in Figure la is formed.
  • the commonly used LBA Logical Block Addressing
  • the commonly used LBA Logical Block Addressing
  • the MDC cluster management node for example: There are n Partitions in each sub-resource pool, and each sub-resource pool There can be multiple Partitions on each hard disk in the MDC.
  • the MDC can record the PartitionID (the block holds the logical partition unit ID) and the sub-resource pool ID in each sub-resource pool, and pass the [[sub-resource pool ID.PartitionID]"
  • the form of the character information identifies each Partition in the entire disk array, so that each Partition has unique identification information; other devices in the system can access the sub-resource pool by using common technical means according to the identification information of each Partition. Partition in .
  • the data to be stored is expected to generate at least two identical copies, and the number of copies of the data to be stored that are expected to be generated is less than N.
  • the duplicate slice corresponds to the same slice of data that needs to be stored, and the copy slice stored in one child resource pool is the same as the other copy slice stored in the child resource pool. That is, a copy slice in one child resource pool is different from a copy slice in another child resource pool. For example: As shown in FIG.
  • the copy slice in the first copy can be divided into P1-P8 by the management server, and the copy slice in the second copy can be divided into ⁇ - ⁇ 8, and the first copy and the second copy are
  • the content is the same, that is, P1 is the same as ⁇ , and ⁇ 2 is the same as ⁇ 2, until ⁇ 8 and ⁇ 8 are the same.
  • the hard disk 1 carries P1, ⁇ 2, ⁇ 5, ⁇ 6, and the hard disk 2 carries ⁇ , ⁇ 2, ⁇ 5, ⁇ 6, that is, the content and the second copy of the first copy in the sub-resource pool 1
  • the content in the sub-resource pool 1 is the same.
  • the content of the first copy in the sub-resource pool 2 is the same as the content of the second copy in the sub-resource pool 2.
  • P1 and ⁇ are in sub-resource pool 1, that is, the same Partition as P1 exists only in sub-resource pool 1.
  • the same Partition is in the same sub-resource pool, so that one sub-resource pool
  • the data in it is content independent of other child resource pools.
  • the data in the sub-resource pool is independent of other sub-resource pools in content, and
  • the copy generated according to the data to be stored is stored in multiple sub-resource pools.
  • the condition that the entire replica data is completely damaged is: 2 storage devices in one sub-resource pool are damaged at the same time, for example: as shown in Figure lb
  • the condition that the entire replica data is completely damaged is: Hard disk 1 and hard disk 2 in the child resource pool 1 are simultaneously damaged, or the hard disk 3 and the hard disk 4 in the child resource pool 2 are simultaneously damaged.
  • the replica data can still be repaired, that is, only when two hard disks in one sub-resource pool are damaged at the same time.
  • the copy data will be corrupted. Since the probability of damage to the hard disk is basically the same, and the probability of damage of the hard disk is A, if the prior art solution is adopted, for example, the prior art solution is that the hard disks 1, 2, 3, and 4 in FIG.
  • the probability of duplicate data corruption (ie, the probability of two hard disks being damaged at the same time) is A 2 , or it can be understood as the probability that the distributed storage system is corrupted during the time window of data reconstruction;
  • the probability of the copy data being damaged is 0.5A 2 , or can be understood as the probability that the distributed storage system is corrupted during the time window of data reconstruction.
  • the failure rate of a storage device such as a hard disk is generally 4%, taking into account the impact of the performance parameters of some commonly used storage devices on the failure rate of the hard disk, according to the solution of the embodiment of the present invention, the data as shown in Table 1 can be obtained:
  • the sub-resource pool includes adjacent N storage devices, and the probability that the adjacent storage devices are damaged at the same time is small, so the damaged storage device is not in the same sub-resource pool.
  • the probability is very large, and when the data in a sub-resource pool is damaged, it can be recovered through the data on other storage devices in the sub-resource pool, thereby increasing the fault tolerance of the distributed storage system and reducing data corruption. The chances of increasing data security.
  • the method for repairing data can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent.
  • the data slices stored in sub-resource pool 1 are ⁇ , ⁇ 2, ⁇ 5, ⁇ 6, ⁇ 1, ⁇ 2, ⁇ 5, ⁇ 6, and there is no data slice and sub-resource pool 2 If the stored data slices are the same, the data in the sub-resource pool 2 will not affect the data in the sub-resource pool 1, and the data in the sub-resource pool 1 need not be extracted to participate in the repair sub-resource pool 2. Data, so the data in each sub-resource pool is independent.
  • each sub-resource pool Since the data in each sub-resource pool is independent, data corruption or data repair in a sub-resource pool does not affect the data in other sub-resource pools, only two of the same sub-resource pools The storage device is damaged and the data is completely damaged. In the prior art, a storage device that stores mutually repairable data may be damaged at the same time, resulting in complete data corruption. In the embodiment of the present invention, since multiple sub-resource pools can be divided, each sub-resource pool includes one adjacent one.
  • the embodiment of the present invention further provides a method for storing data, as shown in FIG. 2, which may further include:
  • the one resource pool may contain at least two adjacent storage devices, and the storage device is used to store data.
  • the obtained sub-resource pool includes a storage device of a specified type, and the types of the storage device include but are not limited to: a hard disk, a solid-state hard disk SSD.
  • the management server may determine the type of the storage device to be used, and store the slice of the data to be stored in a sub-resource pool containing the type of storage device, and then distribute each to each of the sub-resource pools.
  • the slice generates a replica slice and stores the replica slice in a sub-resource pool to which the slice belongs, for example:
  • the mapping relationship between the type of the data and the type of the storage device as shown in Table 2 can be pre-stored in the management server, and the type of the storage device to be used is determined according to the type of data to be stored, and the storage device including the type of storage device is obtained.
  • the child resource pool and finally stores the data to be stored in a sub-resource pool containing the type of storage device.
  • Sub-resource pool where the storage device is located Picture mechanical hard disk sub-resource pool 1 Text SSD sub-resource pool 2
  • the mapping between the size of the data and the type of the storage device as shown in Table 3 can be pre-stored in the management server, and the type of the storage device to be used is determined according to the size of the data to be stored, and the storage device including the type of storage device is obtained.
  • the child resource pool and finally stores the data to be stored in a sub-resource pool containing the type of storage device.
  • the management server determines the type of the storage device to be used, and the specific implementation means may be various. In practical applications, those skilled in the art may also determine the method according to the embodiment of the present invention and the prior art.
  • the type of storage device to use Since the security of different types of storage devices is also different, for example: Many solid state drives are currently less likely to be damaged than mechanical hard disks. Therefore, the management server can select the corresponding type of storage device according to the importance of the data, thereby further improving the security of important data.
  • the embodiment of the present invention further provides a method for storing data, where, as shown in FIG. 3a, the method includes:
  • the duplicate slice corresponds to the same slice of the data to be stored.
  • Each said The copy tiles are stored on different storage devices. E.g:
  • the copy of the first copy is P1-P8, the copy of the second copy is ⁇ - ⁇ 8, and P1 is the same as ⁇ , ⁇ 2 is the same as ⁇ 2, until ⁇ 8 is the same as ⁇ 8.
  • the hard disk 17 carries P1, ⁇ 2, ⁇ 5, ⁇ 6, and the hard disk 27 carries ⁇ , ⁇ 2, ⁇ 5, ⁇ 6, that is, the content and the second copy of the first copy in the sub-resource pool 1
  • the content in the sub-resource pool 1 is the same.
  • the content of the first copy in the sub-resource pool 2 is the same as the content of the second copy in the sub-resource pool 2.
  • both P1 and ⁇ are in sub-resource pool 1, that is, the same Partition as P1 exists only in sub-resource pool 1.
  • the same Partition is in the same sub-resource pool, so that in a sub-resource pool Data is content independent of other child resource pools.
  • the hard disk stored in each copy slice is different from the hard disk corresponding to the slice storage. For example, one copy of the sub-resource pool 1 and any one of the sub-resource pools 2 are different. And the same copy of the data is stored on different storage devices, such as: P1 and ⁇ on different hard disks.
  • the management server can rebuild and restore the data on the failed hard disk in the sub-resource pool, as shown in Figure 3a.
  • the Partition on the hard disk 1 can be migrated to the other three hard disks in the sub-resource pool according to the preset rules. This reduces the number of storage devices in the child resource pool while the child resource pool is running.
  • Parallel may also include:
  • the Partition on the hard disk 1-3 can be evenly distributed in the hard disk 1-4 in the 4 fast hard disks according to the preset rule, thereby the hard disk 1-3 Part of the content was migrated to the hard disk 4.
  • the number of storage devices in the child resource pool is increased during the running of the child resource pool.
  • the management server may re-allocate the slices in the sub-resource pool after adding the storage devices in the sub-resource pool, for example, as shown in FIG. 3b, all the data on the hard disks 1-3. Slice, re-distribute on the hard disk 1-4.
  • the embodiment of the present invention can also implement hot plugging/unplugging of the storage devices in the sub-resource pool, so that each sub-resource pool can be stored in the sub-resource pool when abnormal operation such as storage device damage and storage device shutdown maintenance occurs.
  • the data is not lost, so that the distributed storage system can eliminate the unusable storage devices at any time while ensuring data stability, thereby further improving the security of the data.
  • the method for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. For example, if two storage devices are included in a sub-resource pool, only two storage devices in the same sub-resource pool are damaged, and the data is completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may cause complete data corruption. In the embodiment of the present invention, multiple sub-resource pools can be divided, and the data is stored in the divided In a plurality of sub-resource pools, the data is completely damaged only when two storage devices in the same sub-resource pool are damaged.
  • the probability of damage to two adjacent storage devices in the same sub-resource pool is smaller than that in the prior art. Damage 2 storages with only one resource pool There is a probability that the storage device can perform data recovery with each other, so that the embodiment of the present invention can reduce the probability of complete data corruption relative to the prior art, thereby improving data security.
  • the embodiment of the present invention further provides a method for storing data, which may further include: dividing the divided sub-resource pool into different levels of sub-resource pool sets, where each sub-resource pool set includes at least a sub-resource pool, the number of replica slices that are expected to be generated for each of the slices in the different levels of sub-resource pools is different; the replica slices are generated for each of the slices distributed to each of the sub-resource pools, including: The number of replica slices that each of the slices corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs is generated, and each of the slices distributed to the sub-resource pool generates a corresponding number of replica slices.
  • the method includes:
  • Each sub-resource pool set includes at least one sub-resource pool, and the number of replica slices that are expected to be generated for each of the slices in different levels of the sub-resource pool set is different.
  • the number of copies expected to be generated by the slice stored in the primary sub-resource pool is M
  • the number of copies expected to be generated by the slice stored in the secondary sub-resource pool is 0, and M > 0 > 2, Q > 2, Q, > 2.
  • the number of copies that the source pool stores are expected to generate, for example: the contents of the replicas 1, 2, and 3 are the same, the number of replicas expected to be generated in the sub-resource pool X is 2, and the number of replicas expected to be generated in the sub-resource pool y is 3. .
  • characters for defining the number of copies may be added to the identification information for indicating the attributes of the child resource pool, for example: 010 indicates that the child resource pool allows the expected number of copies of the stored data. The amount is 2, 011 indicates that the sub-resource pool allows the number of copies of the desired data to be stored as 3.
  • the management server determines that the level of the used sub-resource pool can be various.
  • the management server can determine the level of the sub-resource pool according to the type of data to be stored, for example, as shown in Table 4.
  • the management server may pre-store the mapping relationship between the type of the data and the sub-resource pool level, and determine the level of the sub-resource pool required to store the data to be stored according to the type of data to be stored and the mapping relationship shown in Table 4.
  • the embodiments of the present invention can adopt different levels of storage methods for data of different importance levels, and the relatively important data can be guaranteed by storing more copies.
  • Data security, for relatively unimportant data can increase the utilization of storage devices in the system through storage with fewer copies, thereby improving the operating efficiency of the distributed storage system, enabling the management server to be more Storage devices are used to store more important data, further enhancing the security of important data.
  • Parallel as shown in Figure 4b, also includes:
  • Each sub-resource pool set includes at least one sub-resource pool, and different levels of sub-investments
  • the number of replica slices that are expected to be generated for each of the slices in the source pool set is different.
  • the data to be stored is divided into R slices, and the R slices are distributed to different levels of sub-resource pools according to the importance of the data in the R slices.
  • the management server may correspond to the data of the system volume.
  • the slice generates 3 copies and stores them in the first-level sub-resource pool, and generates 2 copies according to the slice corresponding to the data of the user volume and stores them in the second-level sub-resource pool, thereby realizing different data according to the same needs to be stored. Part of the generation of a different number of copies, and stored in the corresponding level of the sub-resource pool.
  • the embodiment of the present invention can adopt different levels of storage methods for data of different degrees of different parts of the data, and the relatively important part of the data may be
  • the storage system with more copies is used to ensure security.
  • the storage device with fewer copies can be used to increase the utilization of storage devices in the system, thereby improving the operating efficiency of the distributed storage system.
  • the management server can use more storage devices to store the more important parts of the data, further enhancing the security of important parts of the data.
  • the method for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. Only when two storage devices in the same sub-resource pool are damaged, the data will be completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption.
  • an embodiment of the present invention provides an apparatus for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools.
  • Each sub-resource pool includes N storage devices, N > 2, as shown in Figure 5, including:
  • the distribution module 51 is configured to divide the data to be stored into R slices, and distribute the R slices into the divided sub-resource pools.
  • the data to be stored is expected to generate a copy number smaller than N, R > 2 resort copy generation module 52, for generating a copy slice for each of the slices distributed to each sub-resource pool.
  • the storage module 53 is configured to store the replica slice in a sub-resource pool corresponding to the slice, where the replica slice and the same slice of the data correspond to each other.
  • the apparatus for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. Only when two storage devices in the same sub-resource pool are damaged, the data will be completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption.
  • multiple sub-resource pools can be divided, and the data is stored in the divided In a sub-resource pool, only when two storage devices in the same sub-resource pool are damaged, the data is completely damaged. The probability of two storage devices in the same sub-resource pool is less than that in the prior art.
  • the apparatus for storing data provided by the embodiment of the present invention may include:
  • a distribution module 62 configured to divide data to be stored into R slices, and cut the R slices The slices are distributed into the divided sub-resource pools.
  • the data to be stored is expected to generate a copy number smaller than N, R > 2 resort copy generation module 63, for generating a copy slice for each of the slices distributed into each sub-resource pool.
  • the storage module 64 is configured to store the replica slice in a sub-resource pool corresponding to the slice, where the replica slice and the same slice of the data correspond to each other.
  • the storage module 64 is further configured to store the replica slice to a storage device corresponding to the sub-resource pool to which the slice belongs. In the case of different data, the same copy of the copy is stored on different storage devices.
  • the apparatus for storing data may further include: a dividing module 61, configured to divide the divided sub-resource pool into different levels of sub-resource pool sets.
  • Each sub-resource pool set includes at least one sub-resource pool, and the number of replica slices that are expected to be generated for each of the slices in different levels of the sub-resource pool set is different.
  • the copy generating module 63 is further configured to generate, according to the number of replica slices that each slice of the slice corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs, to generate the slice into the sub-resource pool. Corresponding number of copies of the slice.
  • the device provided by the embodiments of the present invention can adopt different levels of storage methods for data of different importance levels, and relatively important data can be obtained by having more copies.
  • Storage mode to ensure data security.
  • the storage capacity of the system can be increased by the storage method with fewer copies, thereby improving the operating efficiency of the distributed storage system, so that the management server can More storage devices are used to store more important data, further enhancing the security of important data.
  • the apparatus for storing data may further include:
  • the negative adjustment module 65 is configured to reduce the number of storage devices in the sub-resource pool for any one of the sub-resource pools.
  • the positive adjustment module 66 is configured to increase the number of storage devices in the sub-resource pool for any one of the sub-resource pools.
  • the data distribution module 67 is configured to allocate the slice in the reduced storage device to other storage devices in the sub-resource pool.
  • the number of remaining storage devices in the child resource pool is greater than the number of copies that are expected to be generated.
  • the data distribution module 67 is further configured to: when the number of storage devices in the sub-resource pool is increased, re-allocate a replica slice of the slice in the sub-resource pool to a storage device in the sub-resource pool .
  • the distribution module 62 is further configured to distribute R slices to different levels of sub-resource pools according to the importance of data in the R slices.
  • the embodiment of the present invention can also implement hot plugging/unplugging of the storage devices in the sub-resource pool, so that when the storage devices in the sub-resource pools are damaged or shut down and maintained, the storage devices can be stored in the sub-resource pools.
  • the data is not lost, so that the distributed storage system can eliminate the unusable storage devices at any time while ensuring data stability, thereby further improving the security of the data.
  • the apparatus for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. Only when two storage devices in the same sub-resource pool are damaged, the data will be completely damaged.
  • the damage of the two storage devices may result in complete data corruption.
  • multiple sub-resource pools can be divided, and the data is stored in the divided In a sub-resource pool, only when two storage devices in the same sub-resource pool are damaged, the data is completely damaged.
  • the probability of two storage devices in the same sub-resource pool is less than that in the prior art.
  • the probability of damaging two storage devices in the case of a pool thereby making the embodiment of the present invention
  • the prior art can reduce the probability of complete data corruption, thereby improving data security.
  • the embodiment of the present invention provides a storage system for storing data. As shown in FIG.
  • the storage system includes a storage area 74 for storing data, and the storage area 74 is logically divided into at least 2 a sub-resource pool, each sub-resource pool includes an adjacent N storage devices, N>2, the storage system includes: the processor 71, the communication interface 72, the bus 73, the processor 71, and the communication interface 72 and all the storage devices in the storage area 74, through the bus 73 to complete mutual communication, wherein:
  • the processor 71 is configured to divide data to be stored into R slices, and distribute the R slices to the divided sub-resource pools through the communication interface 72.
  • the number of copies that need to be stored is expected to be less than N, R>2 crizosin.
  • R>2 crizosin. is further configured to generate a replica slice for each of the slices distributed to each sub-resource pool, and the replica is The slice is stored in the sub-resource pool to which the slice belongs.
  • the duplicate slice corresponds to the same slice of the data to be stored.
  • the processor 71 is further configured to store the replica slice to a storage device corresponding to the sub-resource pool to which the slice belongs. Different, the same copy of the data is stored on different storage devices.
  • the processor 71 is further configured to divide the divided sub-resource pool into different sub-resource pool sets.
  • Each sub-resource pool set includes at least one sub-resource pool, and each of the different levels of sub-resource pool sets has a different number of replica slices that are expected to be generated.
  • the processor 71 is further configured to generate, according to the number of replica slices that each of the slices corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs, generate the corresponding one of the slices distributed to the sub-resource pool. The number of copies is sliced. Further, the processor 71 is further configured to: when the replica slice is stored in a sub-resource pool to which the slice belongs, for the sub-resource pool, when the sub-resource pool is reduced The number of storage devices in the reduced storage device is allocated to other storage devices in the sub-resource pool through the communication interface 72.
  • the number of remaining storage devices in the child resource pool is greater than the number of copies that are expected to be generated.
  • the processor 71 is further configured to: when the replica slice is stored in a sub-resource pool to which the slice belongs, for the sub-resource pool, when the sub-resource is added When the number of storage devices in the pool is reached, the copy of the slice in the sub-resource pool is re-allocated to the storage device in the sub-resource pool through the communication interface 72. Further, the processor 71 is further configured to distribute R slices to different levels of sub-resource pools according to the importance of data in the R slices.
  • the storage system for repairing data provided by the embodiment of the present invention can divide all storage devices in the storage system into at least two resource pools, and store the data in the divided resource pools, because the data in each resource pool It is independent.
  • the damage of the two storage devices may result in complete data corruption.
  • multiple resource pools can be divided, and the data is stored in the divided data.
  • the probability of damaging two storage devices is such that the embodiment of the present invention can reduce the probability of complete data corruption relative to the prior art, thereby improving data security.
  • an embodiment of the present invention provides a computer program product for repairing data, which is used in a storage system, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resources. a pool, each sub-resource pool includes an adjacent N storage devices, N>2, the computer program product includes a computer-readable storage medium storing program code, and the program code includes instructions for:
  • the data to be stored is divided into R slices, and the R slices are distributed into the divided sub-resource pools, and the number of copies that need to be stored is expected to be generated less than N, R > 2 radicals.
  • Each of the slices in the sub-resource pool generates a replica slice and stores the replica slice in a sub-resource pool to which the slice belongs, the replica slice corresponding to the slice having the same data.
  • the computer program product for repairing data provided by the embodiment of the present invention can divide all the storage devices in the storage system into at least two resource pools, and store the data in the divided resource pools, because each resource pool The data is independent. Only when 2 storage devices in the same resource pool are damaged, the data will be completely damaged. In the prior art, when there is only one resource pool, multiple resource pools can be divided, and data is stored in the divided resource pools. Only when two storage devices in the same resource pool are damaged, the data is The probability of damage to the two storage devices in the same resource pool is less than the probability of damaging the two storage devices in the case of only one resource pool in the prior art, so that the embodiment of the present invention is relatively current. There are techniques to reduce the chance of complete data corruption, which increases data security.
  • the process may be performed by a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium, and when executed, the program may include a flow of an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, or a read-only storage memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory

Abstract

The present invention relates to the technical field of electronic information. Disclosed in an embodiment of the present invention are a data storage method and device, capable of storing data in a plurality of resource pools to reduce the chance of completely damaging data, thus improving data security. The method of the present invention is used for a storage system; the resource pool in the storage system is logically divided into at least two sub-resource pools; each sub-resource pool comprises N number of neighboring storage devices, N≥2. The method comprises: dividing the to-be-stored data into R number of sections, and distributing the sections into the divided sub-resource pools, the number of copies of the to-be-restored data desired to be generated being less than N, R≥2; and generating a copy section for each section distributed in each sub-resource pool, and storing the generated copy section in the sub-resource pool corresponding to the section, the copy section corresponding to the same section of the to-be-stored data.

Description

储存数据的方法及装置 技术领域  Method and device for storing data
本发明涉及电子信息技术领域, 尤其涉及一种储存数据的方法及装 置。  The present invention relates to the field of electronic information technology, and in particular, to a method and apparatus for storing data.
背景技术 Background technique
分布式存储技术是一种常用的数据存储技术, 在分布式存储场景下, 可以将系统中所有的硬盘作为一个存储资源池进行统一的管理,在系统对 数据进行读写和存储时都是将整个存储资源池作为一个存储区域进行数 据交互的。 例如:  Distributed storage technology is a commonly used data storage technology. In a distributed storage scenario, all hard disks in the system can be managed as a storage resource pool. When the system reads, writes, and stores data, The entire storage resource pool serves as a storage area for data interaction. E.g:
分布式存储系统可以将一个虚拟卷映射到存储资源池中的全部硬盘 上, 并会卷上的空间划分为若干个 1M大小的数据块, 每个数据块对应资 源池中的全部硬盘中的一个块存放逻辑分区单元 Partition。当 Partition有多 个副本时, 一个 Partition内的全部数据会被保存多份, 比如: 在双副本的 场景下, 每个数据块对应资源池中的全部硬盘中的二个 Partition, 并且这 2 个 Partition的内容完全相同。 在根据常用的分配算法, 相同的二个 Partition 如: P1和 ΡΓ , 往往会被分配在二个不同的硬盘上如: P1在硬盘 1 , ΡΓ 在硬盘 2 , 使 Partition可以被平均地分配在整个资源池中, 由于这种分配 Partition的方式能够使资源池中硬盘的读写速度最大化, 从而被广泛地采 用。  A distributed storage system can map a virtual volume to all the hard disks in the storage resource pool, and divide the space on the volume into several 1M-sized data blocks, each of which corresponds to one of all the hard disks in the resource pool. The block holds the logical partition unit Partition. When there are multiple copies of a Partition, all the data in a Partition will be saved in multiple copies. For example: In a dual-copy scenario, each data block corresponds to two Partitions in all the hard disks in the resource pool, and these two The contents of Partition are identical. According to the commonly used allocation algorithm, the same two Partitions such as P1 and ΡΓ are often assigned to two different hard disks such as: P1 on hard disk 1, ΡΓ on hard disk 2, so that Partition can be evenly distributed throughout In the resource pool, this method of allocating Partitions is widely used because it can maximize the read and write speed of hard disks in the resource pool.
当分布式存储系统中任意一个硬盘损坏时,可以进行数据重建,例如: 硬盘 1损坏, 由于硬盘 1上的 Pl、 P4,、 P5、 P8,在硬盘 2、 3、 4上都有对应 的副本, 则可以通过硬盘 2、 3、 4上都对应的副本修复硬盘 1的数据。  When any hard disk in the distributed storage system is damaged, data reconstruction can be performed. For example: Hard disk 1 is damaged. Because of Pl, P4, P5, and P8 on hard disk 1, there are corresponding copies on hard disks 2, 3, and 4. , the data of the hard disk 1 can be repaired by the corresponding copy on the hard disks 2, 3, and 4.
在现有的分布式存储系统中任意一个硬盘损坏, 会进行数据重建, 在 进行数据重建的过程中, 若存储资源池中其他硬盘再故障, 则整个虚拟卷 的数据就会损坏,例如:如图 1所示,在硬盘 1损坏并开始进行数据修复时, 若硬盘 2在损坏,则储存在硬盘 2上的用于修复硬盘 1的对应的副本 P Γ就会 损坏, 从而无法修复数据, 导致整个虚拟卷的数据损坏, 降低了数据的安 全性。 In the existing distributed storage system, if any hard disk is damaged, data reconstruction will be performed. In the process of data reconstruction, if other hard disks in the storage resource pool fail again, the entire virtual volume The data will be corrupted. For example, as shown in Figure 1, when the hard disk 1 is damaged and data repair is started, if the hard disk 2 is damaged, the corresponding copy P of the hard disk 1 stored on the hard disk 2 is repaired. It will be damaged, so the data cannot be repaired, resulting in data corruption of the entire virtual volume and reduced data security.
发明内容 Summary of the invention
本发明的实施例提供一种储存数据的方法及装置,能够将存储系统中 的所有的存储设备划分为至少二个资源池,并将数据储存在所划分出的资 源池中, 由于各个资源池中的数据是独立的, 只有同一个资源池中的 2个 存储设备损坏, 数据才会完全损坏, 从而降低了数据完全损坏的几率, 提 高了数据的安全性。  An embodiment of the present invention provides a method and an apparatus for storing data, which can divide all storage devices in a storage system into at least two resource pools, and store the data in the divided resource pools, because each resource pool The data in the data is independent. Only when two storage devices in the same resource pool are damaged, the data will be completely damaged, thereby reducing the probability of complete data corruption and improving data security.
为达到上述目的, 本发明的实施例采用如下技术方案:  In order to achieve the above object, the embodiment of the present invention adopts the following technical solutions:
第一方面, 本发明的实施例提供了一种储存数据的方法, 用于存储系 统, 所述存储系统中包括用于存储数据的资源池, 所述资源池被逻辑划分 为至少 2个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2 , 所述方法包括:  In a first aspect, an embodiment of the present invention provides a method for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools. Each sub-resource pool includes an adjacent N storage devices, N > 2, and the method includes:
将需要存储的数据划分为 R个切片, 将 R个所述切片分布到划分的所 述子资源池中, 所述需要存储的数据期望生成的副本数量小于 N, R > 2; 对分布到每个子资源池中的每个所述切片生成副本切片,并将所述副 本切片存储在对应所述切片所属的子资源池中,所述副本切片与数据相同 的所述切片相互对应。 结合第一方面, 在第一方面的第一种可能的实现方式中, 所述将所述 副本存储在对应所述切片所属的子资源池中包括:将所述副本切片存储到 对应所述切片所属的子资源池中的存储设备上,且每个所述副本切片存储 储在不同的存储设备上。 结合第一方面, 以及第一方面的第一种可能的实现方式, 在第一方面 的第二种可能的实现方式中, 还包括: 将所述划分的子资源池再次划分为 不同级别子资源池集合, 每个子资源池集合中包括至少一个子资源池, 不 同级别的子资源池集合中每个所述切片的期望生成的副本切片数量不同; 所述对分布到每个子资源池中的每个所述切片生成副本切片, 包括: 按照子资源池所属子资源池集合的级别所对应的每个所述切片期望生成 的副本切片数量,将分布到子资源池中的每个所述切片生成对应数量的副 本切片。 结合第一方面, 以及第一方面的第一种可能的实现方式, 在第一方面 的第三种可能的实现方式中,在将所述副本切片存储在对应所述切片所属 的子资源池中后, 还包括: The data to be stored is divided into R slices, and the R slices are distributed into the divided sub-resource pools, and the number of copies to be generated by the data to be stored is less than N, R >2; Each of the slices in the sub-resource pool generates a replica slice and stores the replica slice in a sub-resource pool to which the slice belongs, the replica slice corresponding to the slice having the same data. With reference to the first aspect, in a first possible implementation manner of the first aspect, the storing the copy in a sub-resource pool to which the slice belongs includes: storing the replica slice to correspond to the slice On the storage device in the sub-resource pool to which it belongs, and each of the replica slice stores is stored on a different storage device. With reference to the first aspect, and the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the method further includes: dividing the divided sub-resource pool into different levels of sub-resources a pool set, each sub-resource pool set includes at least one sub-resource pool, and each of the different levels of sub-resource pool sets has a different number of replica slices that are expected to be generated; each pair is distributed to each sub-resource pool And generating, by the slice, the replica slice, comprising: generating, according to the number of replica slices that each slice of the slice corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs, the slice-distributed to each of the sub-resource pools Corresponding number of copies of the slice. With reference to the first aspect, and the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the replica slice is stored in a sub-resource pool to which the slice belongs After that, it also includes:
针对任一个所述子资源池,当减少所述子资源池中的存储设备的数量 时,将所减少的存储设备中的所述切片分配到所述子资源池中的其他存储 设备上,所述子资源池中的剩余的存储设备数量大于所述期望生成的副本 数。 结合第一方面, 以及第一方面的第一种可能的实现方式, 在第一方面 的第四种可能的实现方式中,在将所述副本切片存储在对应所述切片所属 的子资源池中后, 还包括:  For any one of the sub-resource pools, when the number of storage devices in the sub-resource pool is reduced, the slice in the reduced storage device is allocated to other storage devices in the sub-resource pool, The number of remaining storage devices in the sub-resource pool is greater than the number of replicas expected to be generated. With reference to the first aspect, and the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the replica slice is stored in a sub-resource pool to which the slice belongs After that, it also includes:
针对任一个所述子资源池,当增加所述子资源池中的存储设备的数量 时,将该子资源池中的所述切片的副本切片重新分配到该子资源池中的存 储设备上。 结合第一方面的第二种可能的实现方式,在第五种可能的实现方式 中, 所述将 R个切片分布到预先划分的子资源池中包括: For any one of the sub-resource pools, when the number of storage devices in the sub-resource pool is increased, the replica slice of the slice in the sub-resource pool is re-allocated to the storage device in the sub-resource pool. In combination with the second possible implementation of the first aspect, in a fifth possible implementation The distributing the R slices into the pre-divided sub-resource pool includes:
根据 R个切片中数据的重要程度, 将 R个切片分布到不同级别的子资 源池中。  According to the importance of the data in the R slices, R slices are distributed to different levels of child resource pools.
第二方面, 本发明的实施例提供了一种储存数据的装置, 用于存储系 统, 所述存储系统中包括用于存储数据的资源池, 所述资源池被逻辑划分 为至少 2个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2 , 所述方法包括: In a second aspect, an embodiment of the present invention provides an apparatus for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools. Each sub-resource pool includes an adjacent N storage devices, N > 2, and the method includes:
分布模块, 用于将需要存储的数据划分为 R个切片, 将 R个所述切片 分布到划分的所述子资源池中,所述需要存储的数据期望生成的副本数量 小于 N, R > 2;  a distribution module, configured to divide the data to be stored into R slices, and distribute the R pieces into the divided sub-resource pool, where the number of copies to be stored is expected to be less than N, R > 2 ;
副本生成模块,用于对分布到每个子资源池中的每个所述切片生成副 本切片;  a copy generation module, configured to generate a copy of each of the slices distributed to each of the child resource pools;
储存模块,用于将所述副本切片存储在对应所述切片所属的子资源池 中, 所述副本切片与数据相同的所述切片相互对应。 结合第二方面, 在第二方面的第一种可能的实现方式中, 还包括: 所 述储存模块,还用于将所述副本切片存储到对应所述切片所属的子资源池 中的存储设备上,且每个所述副本切片存储的存储设备与对应所述切片存 储的存储设备不同, 数据相同的副本切片存储在不同的存储设备上。 结合第二方面, 以及第二方面的第一种可能的实现方式, 在第二方面 的第二种可能的实现方式中, 还包括:  And a storage module, configured to store the replica slice in a sub-resource pool corresponding to the slice, where the replica slice and the same slice of the data correspond to each other. With reference to the second aspect, in a first possible implementation of the second aspect, the method further includes: the storage module, configured to store the replica slice to a storage device corresponding to a sub-resource pool to which the slice belongs The storage device stored in each of the replica slices is different from the storage device corresponding to the slice storage, and the replica slices with the same data are stored on different storage devices. With reference to the second aspect, and the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the method further includes:
划分模块,用于将所述划分的子资源池再次划分为不同级别子资源池 集合, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资源池 集合中每个所述切片的期望生成的副本切片数量不同; a partitioning module, configured to divide the divided sub-resource pool into different levels of sub-resource pools, each sub-resource pool set including at least one sub-resource pool, and different levels of sub-resource pools The number of replica slices that are expected to be generated for each of the slices in the collection is different;
所述副本生成模块,还用于按照子资源池所属子资源池集合的级另 'J所 对应的每个所述切片期望生成的副本切片数量,将分布到子资源池中的每 个所述切片生成对应数量的副本切片。 结合第二方面, 以及第二方面的第一种可能的实现方式, 在第二方面 的第三种可能的实现方式中, 还包括:  The copy generation module is further configured to allocate each of the copies to the sub-resource pool according to the number of replica slices that each of the slices corresponding to the sub-resource pool of the sub-resource pool belongs to. The slice generates a corresponding number of copies of the slice. With reference to the second aspect, and the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the method further includes:
负调节模块, 用于针对任一个所述子资源池, 减少所述子资源池中的 存储设备的数量;  a negative adjustment module, configured to reduce the number of storage devices in the sub-resource pool for any one of the sub-resource pools;
数据分配模块,用于将所减少的存储设备中的所述切片分配到所述子 资源池中的其他存储设备上,所述子资源池中的剩余的存储设备数量大于 所述期望生成的副本数。 结合第二方面, 以及第二方面的第一种可能的实现方式, 在第二方面 的第四种可能的实现方式中, 还包括:  a data distribution module, configured to allocate the slice in the reduced storage device to another storage device in the sub resource pool, where a remaining number of storage devices in the sub resource pool is greater than the expected generated copy number. With reference to the second aspect, and the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the method further includes:
正调节模块, 用于针对任一个所述子资源池, 增加所述子资源池中的 存储设备的数量;  a positive adjustment module, configured to increase the number of storage devices in the sub-resource pool for any one of the sub-resource pools;
所述数据分配模块,还用于当增加所述子资源池中的存储设备的数量 时,将该子资源池中的所述切片的副本切片重新分配到该子资源池中的存 储设备上。 结合第二方面的第二种可能的实现方式,在第五种可能的实现方式 中, 还包括:  The data distribution module is further configured to: when the number of storage devices in the sub-resource pool is increased, re-allocate a replica slice of the slice in the sub-resource pool to a storage device in the sub-resource pool. In conjunction with the second possible implementation of the second aspect, in a fifth possible implementation, the method further includes:
所述分布模块, 还用于根据 R个切片中数据的重要程度, 将 R个切片 分布到不同级别的子资源池中。 第三方面, 本发明的实施例提供了一种储存数据的存储系统, 所述存 储系统中包括用于存储数据的资源池, 所述资源池被逻辑划分为至少 2个 子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2 , 所述存储系 统包括: 处理器、 通信接口、 总线, 其特征在于还包括存储设备, 所述处 理器、所述通信接口和所有的存储设备,通过所述总线完成相互间的通信, 其中: The distribution module is further configured to distribute R slices to different levels of sub-resource pools according to the importance of data in the R slices. In a third aspect, an embodiment of the present invention provides a storage system for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools, each sub-resource. The pool includes adjacent N storage devices, N > 2, and the storage system includes: a processor, a communication interface, and a bus, and is characterized by further including a storage device, the processor, the communication interface, and all storage The devices complete communication with each other through the bus, wherein:
所述处理器, 用于将需要存储的数据划分为 R个切片, 通过所述通信 接口将 R个所述切片分布到划分的所述子资源池中, 所述需要存储的数据 期望生成的副本数量小于 N, R > 2;  The processor is configured to divide data to be stored into R slices, and distribute the R pieces into the divided sub-resource pools through the communication interface, where the data to be stored is expected to be generated The number is less than N, R > 2;
所述处理器,还用于对分布到每个子资源池中的每个所述切片生成副 本切片, 并将所述副本切片存储在对应所述切片所属的子资源池中, 所述 副本切片与数据相同的所述切片相互对应。 结合第三方面, 在第三方面的第一种可能的实现方式中, 包括: 所述处理器,还用于将所述副本切片存储到对应所述切片所属的子资 源池中的存储设备上,且每个所述副本切片存储的存储设备与对应所述切 片存储的存储设备不同, 数据相同的副本切片存储在不同的存储设备上。 结合第三方面, 以及第三方面的第一种可能的实现方式, 在第三方面 的第二种可能的实现方式中, 所述处理器, 还用于将所述划分的子资源池 再次划分为不同级别子资源池集合,每个子资源池集合中包括至少一个子 资源池,不同级别的子资源池集合中每个所述切片的期望生成的副本切片 数量不同;  The processor is further configured to generate a replica slice for each of the slices distributed in each sub-resource pool, and store the replica slice in a sub-resource pool to which the slice belongs, the replica slice and The slices of the same data correspond to each other. With reference to the third aspect, in a first possible implementation manner of the third aspect, the method includes: the processor is further configured to store the replica slice to a storage device corresponding to a sub-resource pool to which the slice belongs And the storage device stored in each of the replica slices is different from the storage device corresponding to the slice storage, and the replica slices with the same data are stored on different storage devices. With reference to the third aspect, and the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the processor is further configured to divide the divided sub-resource pool For a different set of sub-resource pools, each sub-resource pool set includes at least one sub-resource pool, and each of the different levels of the sub-resource pool sets has a different number of replica slices that are expected to be generated;
所述处理器,还用于按照子资源池所属子资源池集合的级另 'J所对应的 每个所述切片期望生成的副本切片数量,将分布到子资源池中的每个所述 切片生成对应数量的副本切片。 结合第三方面, 以及第三方面的第一种可能的实现方式, 在第三方面 的第三种可能的实现方式中, 所述处理器, 还用于在将所述副本切片存储 在对应所述切片所属的子资源池中后, 针对任一个所述子资源池, 当减少 所述子资源池中的存储设备的数量时,通过所述通信接口将所减少的存储 设备中的所述切片分配到所述子资源池中的其他存储设备上,所述子资源 池中的剩余的存储设备数量大于所述期望生成的副本数。 结合第三方面, 以及第三方面的第一种可能的实现方式, 在第三方面 的第四种可能的实现方式中, 所述处理器, 还用于在将所述副本切片存储 在对应所述切片所属的子资源池中后, 针对任一个所述子资源池, 当增加 所述子资源池中的存储设备的数量时,通过所述通信接口将该子资源池中 的所述切片的副本切片重新分配到该子资源池中的存储设备上。 结合第三方面的第二种可能的实现方式,在第五种可能的实现方式 中, 所述处理器, 还用于根据 R个切片中数据的重要程度, 将 R个切片分 布到不同级别的子资源池中。 The processor is further configured to allocate each slice in the sub-resource pool according to the number of replica slices that each slice corresponding to the slice corresponding to the sub-resource pool of the sub-resource pool is expected to generate. Generate a corresponding number of copy tiles. With reference to the third aspect, and the first possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the processor is further configured to store the replica slice in a corresponding location After the sub-resource pool to which the slice belongs, for any one of the sub-resource pools, when the number of storage devices in the sub-resource pool is reduced, the slice in the reduced storage device is used by the communication interface Allocating to other storage devices in the sub-resource pool, the number of remaining storage devices in the sub-resource pool is greater than the number of copies that are expected to be generated. With reference to the third aspect, and the first possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the processor is further configured to store the replica slice in a corresponding location After the sub-resource pool to which the slice belongs, for any one of the sub-resource pools, when the number of storage devices in the sub-resource pool is increased, the slice in the sub-resource pool is The replica slice is reassigned to the storage device in the child resource pool. With reference to the second possible implementation manner of the third aspect, in a fifth possible implementation, the processor is further configured to distribute R slices to different levels according to importance of data in the R slices. In the child resource pool.
第四方面, 本发明的实施例提供了一种储存数据的计算机程序产品, 用于存储系统,所述存储系统中包括用于存储数据的资源池,其特征在于, 所述资源池被逻辑划分为至少 2个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2 , 所述计算机程序产品包括存储了程序代码的计算机 可读存储介质, 所述程序代码包括的指令用于: In a fourth aspect, an embodiment of the present invention provides a computer program product for storing data, which is used in a storage system, where the storage system includes a resource pool for storing data, wherein the resource pool is logically divided. For at least two sub-resource pools, each sub-resource pool includes an adjacent N storage devices, N > 2, the computer program product includes a computer-readable storage medium storing program code, and the program code includes instructions In:
将需要存储的数据划分为 R个切片, 将 R个所述切片分布到划分的所 述子资源池中, 所述需要存储的数据期望生成的副本数量小于 N, R > 2; 对分布到每个子资源池中的每个所述切片生成副本切片,并将所述副 本切片存储在对应所述切片所属的子资源池中,所述副本切片与数据相同 的所述切片相互对应。 The data to be stored is divided into R slices, and the R slices are distributed into the divided sub-resource pools, and the number of copies that the data to be stored is expected to be generated is less than N, R >2; Generating a replica slice for each of the slices distributed into each of the sub-resource pools, and storing the replica slice in a sub-resource pool to which the slice belongs, the replica slice corresponding to the same data as the slice corresponding to each other .
本发明实施例提供的修复数据的方法、 装置、 存储系统以及计算机程 序产品, 能够将存储系统中的所有的存储设备划分为至少二个子资源池, 并将数据储存在所划分出的子资源池中,由于各个子资源池中的数据是独 立的, 只有同一个子资源池中的 2个存储设备损坏, 数据才会完全损坏。 现有技术中在只有一个资源池的情况下, 损坏 2个存储设备就会造成数据 完全损坏的情况, 本发明实施例由于能够划分出多个子资源池, 并将数据 储存在所划分出的多个子资源池中, 只有当同一个子资源池中的 2个存储 设备损坏时, 数据才会完全损坏, 由于同一个子资源池中的 2个存储设备 损坏的几率, 小于现有技术中在只有一个资源池的情况下损坏 2个存储设 备的几率,从而使得本发明实施例相对于现有技术能够降低了数据完全损 坏的几率, 从而提高了数据的安全性。  The method, device, storage system and computer program product for repairing data provided by the embodiments of the present invention can divide all storage devices in the storage system into at least two sub-resource pools, and store the data in the divided sub-resource pools. Because the data in each sub-resource pool is independent, only the two storage devices in the same sub-resource pool are damaged, and the data is completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption. In the embodiment of the present invention, multiple sub-resource pools can be divided, and the data is stored in the divided In a sub-resource pool, only when two storage devices in the same sub-resource pool are damaged, the data is completely damaged. The probability of two storage devices in the same sub-resource pool is less than that in the prior art. In the case of a pool, the probability of damaging two storage devices is such that the embodiment of the present invention can reduce the probability of complete data corruption relative to the prior art, thereby improving data security.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所 需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动 的前提下, 还可以根据这些附图获得其它的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图 1为本发明实施例提供的一种储存数据的方法的流程图;  FIG. 1 is a flowchart of a method for storing data according to an embodiment of the present invention;
图 1 a为本发明实施例提供的一种储存数据的方法的一种具体实例的 示意图;  1a is a schematic diagram of a specific example of a method for storing data according to an embodiment of the present invention;
图 l b为本发明实施例提供的一种储存数据的方法的另一种具体实例 的示意图;  FIG. 1 is a schematic diagram of another specific example of a method for storing data according to an embodiment of the present disclosure;
图 2为本发明实施例提供的另一种储存数据的方法的流程图; 图 3 a为本发明实施例提供的又一种储存数据的方法的一种流程图; 图 3a 1为本发明实施例提供的又一种储存数据的方法的一种具体实例 的示意图; FIG. 2 is a flowchart of another method for storing data according to an embodiment of the present invention; FIG. 3 is a flowchart of still another method for storing data according to an embodiment of the present invention; FIG. 3a is a schematic diagram of still another specific example of a method for storing data according to an embodiment of the present disclosure;
图 3b为本发明实施例提供的又一种储存数据的方法的另一种流程图; 图 3 b 1为本发明实施例提供的又一种储存数据的方法的另一种具体实 例的示意图;  FIG. 3 is a flowchart of still another method for storing data according to an embodiment of the present invention; FIG. 3 is a schematic diagram of another specific example of a method for storing data according to an embodiment of the present disclosure;
图 4 a为本发明实施例提供的再一种储存数据的方法的一种流程图; 图 4 b为本发明实施例提供的再一种储存数据的方法的另一种流程图; 图 5为本发明实施例提供的一种储存数据的装置的结构示意图; 图 6为本发明实施例提供的另一种储存数据的装置的结构示意图; 图 7为本发明实施例提供的一种储存数据的存储系统的网络架构示意 图。  FIG. 4 is a flowchart of still another method for storing data according to an embodiment of the present invention; FIG. 4b is another flowchart of a method for storing data according to an embodiment of the present invention; A schematic structural diagram of an apparatus for storing data according to an embodiment of the present invention; FIG. 6 is a schematic structural diagram of another apparatus for storing data according to an embodiment of the present invention; FIG. 7 is a schematic diagram of storing data according to an embodiment of the present invention. Schematic diagram of the network architecture of the storage system.
具体实施方式 detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进 行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的 范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
一方面, 本发明实施例提供了一种储存数据的方法, 如图 1所示, 包 括:  In one aspect, an embodiment of the present invention provides a method for storing data, as shown in FIG. 1, including:
需要说明的是, 本发明实施例可以用于存储系统, 所述存储系统中包 括用于存储数据的资源池, 其特征在于, 所述资源池被逻辑划分为至少 2 个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2。 并且, 本 发明实施例可以由具备数据传输、 处理、 存储功能的设备执行, 例如: 在 分布式存储系统中用于管理硬盘列阵的管理服务器、 移动工作站等设备。  It should be noted that, the embodiment of the present invention may be used in a storage system, where the storage system includes a resource pool for storing data, wherein the resource pool is logically divided into at least two sub-resource pools, each sub-resource. The pool includes adjacent N storage devices, N > 2. Moreover, the embodiments of the present invention may be implemented by a device having a data transmission, processing, and storage function, for example, a management server, a mobile workstation, and the like for managing a hard disk array in a distributed storage system.
101 , 将需要存储的数据划分为 R个切片, 将 R个所述切片分布到划分 的所述子资源池中。 其中, 需要存储的数据期望生成的副本数量小于 N, 即需要存储的数 据期望生成的副本数量小于子资源池中的存储设备的数量, 且1 > 2。 例 如: 可以将数据切片分布打散在分布式存储架构中的技术手段, 比如: 分 配到子资源池 1中的切片为 Pl、 P2、 P3 , 期望生成的副本数量为 2 , 则管 理服务器可以根据分配到子资源池 1中的切片为 Pl、 P2、 P3 , 生成第一副 本的副本切片 ΡΓ、 Ρ2,、 Ρ3' , 和第二副本的副本切片 ΡΓ,、 Ρ2,,、 Ρ3,,。 并通过分布打散的技术手段将 PI、 P2、 P3 、 ΡΓ、 Ρ2,、 Ρ3' 、 ΡΓ,、 Ρ2,,、 Ρ3,,储存在子资源池 1中的存储设备上。 101. Divide the data to be stored into R slices, and distribute the R slices into the divided sub-resource pool. The number of copies that the data to be stored is expected to be generated is less than N, that is, the number of copies of the data to be stored is expected to be smaller than the number of storage devices in the child resource pool, and 1 > 2. For example: technical means that can spread the data slice distribution in the distributed storage architecture, for example: the slice allocated to the sub-resource pool 1 is Pl, P2, P3, and the number of copies expected to be generated is 2, then the management server can be allocated according to The slice into the sub-resource pool 1 is P1, P2, P3, and the copy slice ΡΓ, Ρ2, Ρ3' of the first copy, and the copy slice ΡΓ, Ρ2,,, Ρ3, of the second copy are generated. The PI, P2, P3, ΡΓ, Ρ2, Ρ3', ΡΓ, Ρ2,, Ρ3 are stored in the storage device in the sub-resource pool 1 by means of distributed breaking techniques.
在本实施例中,管理服务器可以通过常用的技术手段将需要存储的数 据划分为多个数据切片, 例如: 管理服务器可以通过本领域技术人员所熟 知的 RAID技术中的数据切片方法将需要存储的数据划分为至少 2个数据 切片,并将所划分出的数据切片分布在子资源池上。并且,在本实施例中, 在子资源池上分布数据切片的具体实施方式可以有多种, 例如: 管理服务 器可以通过 RAID技术中的分布打散的方式将数据切片分布在所划分出的 子资源池上, 也可以将数据切片平局分布在所划分出的子资源池上。  In this embodiment, the management server may divide the data to be stored into multiple data slices by using common technical means. For example, the management server may use the data slicing method in the RAID technology well known to those skilled in the art to store the data. The data is divided into at least 2 data slices, and the divided data slices are distributed on the child resource pool. In this embodiment, the data slice can be distributed on the sub-resource pool. For example, the management server can distribute the data slice to the sub-resources by means of distributed distribution in the RAID technology. On the pool, you can also distribute the data slices in the divided sub-resource pools.
进一步的, 在本实施例中, 管理服务器可以将系统中的存储设备在逻 辑层面上划分为多个子资源池, 每一个子资源池由多个存储设备组成, 例 如:  Further, in this embodiment, the management server may divide the storage device in the system into multiple sub-resource pools on a logical level, and each sub-resource pool is composed of multiple storage devices, for example:
分布式存储系统中总共有 24个硬盘, 管理服务器可以通过 MDC ( Metadata Controller,元数据控制器)将这 24个硬盘划分为 3个子资源池, 每一个子资源池包括了 8个硬盘, 从而可以形成如图 la所示的多子资源池 的架构。  There are a total of 24 hard disks in the distributed storage system. The management server can divide the 24 hard disks into 3 sub-resource pools through the MDC (Metadata Controller). Each sub-resource pool includes 8 hard disks. The architecture of the multi-sub-resource pool shown in Figure la is formed.
在实际应用 中, 在所储存的数据进行寻址的过程中常用的 LBA ( Logical Block Addressing , 逻辑块寻址)可以映射到不同的子资源池中, 各个子资源池以及块存放逻辑分区单元 Partition可以通过 MDC的集群管 理节点进行分配, 比如: 在每个子资源池中有 n个 Partition, 每个子资源池 中的每个硬盘上可以有多个 Partition, 则 MDC中可以记录每个子资源池中 的 PartitionID (块存放逻辑分区单元 ID )和子资源池 ID , 并通过 " [子资源 池 ID.PartitionID] " 这种字符信息的形式标识整个硬盘列阵中的每一个 Partition ,从而使每一个 Partition都有唯一的标识信息; 系统中的其他设备 可以根据每一个 Partition的标识信息采用常用的技术手段访问子资源池中 的 Partition。 In practical applications, the commonly used LBA (Logical Block Addressing) in the process of storing the stored data can be mapped to different sub-resource pools, each sub-resource pool and the block storage logical partition unit Partition It can be distributed through the MDC cluster management node, for example: There are n Partitions in each sub-resource pool, and each sub-resource pool There can be multiple Partitions on each hard disk in the MDC. The MDC can record the PartitionID (the block holds the logical partition unit ID) and the sub-resource pool ID in each sub-resource pool, and pass the [[sub-resource pool ID.PartitionID]" The form of the character information identifies each Partition in the entire disk array, so that each Partition has unique identification information; other devices in the system can access the sub-resource pool by using common technical means according to the identification information of each Partition. Partition in .
102 , 对分布到每个子资源池中的每个所述切片生成副本切片, 并将 所述副本切片存储在对应所述切片所属的子资源池中。  102. Generate a replica slice for each of the slices distributed into each sub-resource pool, and store the replica slice in a sub-resource pool to which the slice belongs.
在本实施例中, 需要存储的数据期望生成至少二个相同的副本, 且所 述需要存储的数据期望生成的副本数小于 N。 并且, 副本切片与需要存储 的数据的相同的切片相互对应,储存在一个子资源池中的副本切片与其他 储存在该子资源池中的副本切片相同。 即, 一个子资源池中的副本切片与 其他子资源池中的副本切片不同。 例如: 如图 lb所示, 第一副本中的副本 切片可以被管理服务器分为 P1-P8 , 第二副本中的副本切片可以被分为 ΡΓ-Ρ8,,并且第一副本与第二副本的内容相同,即 P1与 ΡΓ相同, Ρ2与 Ρ2,相 同, 直至 Ρ8与 Ρ8,相同。  In this embodiment, the data to be stored is expected to generate at least two identical copies, and the number of copies of the data to be stored that are expected to be generated is less than N. Also, the duplicate slice corresponds to the same slice of data that needs to be stored, and the copy slice stored in one child resource pool is the same as the other copy slice stored in the child resource pool. That is, a copy slice in one child resource pool is different from a copy slice in another child resource pool. For example: As shown in FIG. 1b, the copy slice in the first copy can be divided into P1-P8 by the management server, and the copy slice in the second copy can be divided into ΡΓ-Ρ8, and the first copy and the second copy are The content is the same, that is, P1 is the same as ΡΓ, and Ρ2 is the same as Ρ2, until Ρ8 and Ρ8 are the same.
在子资源池 1中, 硬盘 1承载了 Pl、 Ρ2,、 Ρ5、 Ρ6,, 硬盘 2承载了 ΡΓ、 Ρ2、 Ρ5,、 Ρ6 , 即第一副本在子资源池 1中的内容与第二副本在子资源池 1 中的内容相同, 同理, 第一副本在子资源池 2中的内容与第二副本在子资 源池 2中的内容相同。  In the sub-resource pool 1, the hard disk 1 carries P1, Ρ2, Ρ5, Ρ6, and the hard disk 2 carries ΡΓ, Ρ2, Ρ5, Ρ6, that is, the content and the second copy of the first copy in the sub-resource pool 1 The content in the sub-resource pool 1 is the same. Similarly, the content of the first copy in the sub-resource pool 2 is the same as the content of the second copy in the sub-resource pool 2.
进一步的, 比如: P1和 ΡΓ都在子资源池 1中, 即与 P1相同的 Partition 只存在于子资源池 1中, 同理, 相同的 Partition都在同一个子资源池中, 使 得一个子资源池中的数据在内容上独立于其他子资源池。 当硬盘损坏时, 比如:硬盘 1损坏,则只需根据同在子资源池 1中的硬盘 2中的 ΡΓ、 Ρ2、 Ρ5,、 Ρ6 , 即可修复硬盘 1中的 Ρ1、 Ρ2,、 Ρ5、 Ρ6,, 使得当一个子资源池中的硬 盘损坏时,管理服务器只需根据该子资源池中其他硬盘中的数据即可修复 受损硬盘中的数据,在从而使得子资源池中的数据在内容上独立于其他子 资源池。 Further, for example: P1 and ΡΓ are in sub-resource pool 1, that is, the same Partition as P1 exists only in sub-resource pool 1. Similarly, the same Partition is in the same sub-resource pool, so that one sub-resource pool The data in it is content independent of other child resource pools. When the hard disk is damaged, for example, the hard disk 1 is damaged, the Ρ1, Ρ2, Ρ5 in the hard disk 1 can be repaired only according to ΡΓ, Ρ2, Ρ5, Ρ6 in the hard disk 2 in the same sub-resource pool 1. Ρ6, , so that when the hard disk in a sub-resource pool is damaged, the management server can be repaired only according to the data in other hard disks in the sub-resource pool. The data in the damaged hard disk is such that the data in the child resource pool is content independent of other child resource pools.
需要说明的是, 在本发明实施例中, 由于一个子资源池中的副本切片 与其他子资源池中的副本切片不同,使得子资源池中的数据在内容上独立 于其他子资源池,并且根据需要储存的数据所生成的副本是储存在多个子 资源池上的, 则整个副本数据完全损坏的条件是: 在一个子资源池中有 2 个存储设备同时损坏, 例如: 在如图 lb所示的双副本的场景下, 整个副本 数据完全损坏的条件是: 子资源池 1中的硬盘 1和硬盘 2同时损坏, 或子资 源池 2中的硬盘 3和硬盘 4同时损坏。 若出现子资源池 1中只损坏一个硬盘, 同时子资源池 2中也只损坏一个硬盘, 则副本数据依然可以被修复, 即只 有出现一个子资源池中的 2个硬盘同时损坏的情况时,副本数据才会损坏。 由于硬盘的损坏几率基本上是相同的, 设硬盘的损坏几率为 A, 则若采用 现有技术的方案, 比如: 现有技术的方案是图 lb中的硬盘 1、 2、 3、 4都在 一个资源池中, 则副本数据损坏的几率 (即 2个硬盘同时损坏的几率) 为 A 2 ,或可以理解为分布式存储系统在数据重建的时间窗口内副本数据损坏 的几率为 A; 而本发明实施例的方案, 图 lb中的硬盘 1、 2在子资源池 1中, 硬盘 3、 4在子资源池 4中, 并且由于子资源池 1中的数据在内容上独立于子 资源池 2 , 则副本数据损坏的几率(即必须是同一个子资源池中 2个硬盘同 时损坏的几率) 为 0.5A2, 或可以理解为分布式存储系统在数据重建的时 间窗口内副本数据损坏的几率为 0.5A; 由此可知, 在本发明实施例的方案 中, 所划分出的子资源池越多则副本数据损坏的几率越低, 比如: 划分出 100个子资源池, 则在数据重建的时间窗口内副本数据损坏的几率为 0.01A, 若每一个子资源池正好损坏一个硬盘, 则本发明实施例所提供的 方案能够应对最多 100个硬盘损坏这种极端情况, 并且由于各个子资源池 中的数据是相互独立的, 还能够修复数据。 It should be noted that, in the embodiment of the present invention, since the replica slice in one sub-resource pool is different from the replica slice in the other sub-resource pool, the data in the sub-resource pool is independent of other sub-resource pools in content, and The copy generated according to the data to be stored is stored in multiple sub-resource pools. The condition that the entire replica data is completely damaged is: 2 storage devices in one sub-resource pool are damaged at the same time, for example: as shown in Figure lb In the dual-copy scenario, the condition that the entire replica data is completely damaged is: Hard disk 1 and hard disk 2 in the child resource pool 1 are simultaneously damaged, or the hard disk 3 and the hard disk 4 in the child resource pool 2 are simultaneously damaged. If only one hard disk is damaged in sub-resource pool 1, and only one hard disk is damaged in sub-resource pool 2, the replica data can still be repaired, that is, only when two hard disks in one sub-resource pool are damaged at the same time. The copy data will be corrupted. Since the probability of damage to the hard disk is basically the same, and the probability of damage of the hard disk is A, if the prior art solution is adopted, for example, the prior art solution is that the hard disks 1, 2, 3, and 4 in FIG. In a resource pool, the probability of duplicate data corruption (ie, the probability of two hard disks being damaged at the same time) is A 2 , or it can be understood as the probability that the distributed storage system is corrupted during the time window of data reconstruction; In the solution of the embodiment, the hard disks 1 and 2 in FIG. 1b are in the sub-resource pool 1, the hard disks 3 and 4 are in the sub-resource pool 4, and since the data in the sub-resource pool 1 is content-independent from the sub-resource pool 2 , the probability of the copy data being damaged (that is, the probability that the two hard disks in the same sub-resource pool are damaged at the same time) is 0.5A 2 , or can be understood as the probability that the distributed storage system is corrupted during the time window of data reconstruction. 0.5A; It can be seen that, in the solution of the embodiment of the present invention, the more sub-resource pools are divided, the lower the probability of replica data corruption, for example: dividing 100 sub-resource pools, then reconstructing data The probability that the replica data is corrupted in the inter-window is 0.01A. If each sub-resource pool just damages one hard disk, the solution provided by the embodiment of the present invention can cope with the extreme situation of up to 100 hard disk damage, and due to each sub-resource pool The data in the data is independent of each other and can also repair the data.
进一步可以举例, 在实际应用中, 存储设备如硬盘的故障率一般为 4% , 再考虑到一些常用的存储设备的性能参数对硬盘故障率的影响, 根 据本发明实施例的方案, 可以获得如表一所示的数据: For example, in a practical application, the failure rate of a storage device such as a hard disk is generally 4%, taking into account the impact of the performance parameters of some commonly used storage devices on the failure rate of the hard disk, according to the solution of the embodiment of the present invention, the data as shown in Table 1 can be obtained:
Figure imgf000014_0001
Figure imgf000014_0001
表一  Table I
由此可见, 本发明实施例相对于现有技术, 子资源池中包括相邻的 N 个存储设备, 而相邻的存储设备同时损坏的几率很小, 因此损坏的存储设 备不在同一个子资源池中的几率非常大,而当一个子资源池中的数据发生 损坏,就可以通过这个子资源池中的其他存储设备上的数据来恢复从而增 加了分布式存储系统的容错性, 降低了数据损坏的几率, 从而提高数据的 安全性。  It can be seen that, in the embodiment of the present invention, the sub-resource pool includes adjacent N storage devices, and the probability that the adjacent storage devices are damaged at the same time is small, so the damaged storage device is not in the same sub-resource pool. The probability is very large, and when the data in a sub-resource pool is damaged, it can be recovered through the data on other storage devices in the sub-resource pool, thereby increasing the fault tolerance of the distributed storage system and reducing data corruption. The chances of increasing data security.
本发明实施例提供的修复数据的方法,能够将所有的存储设备划分为 至少二个子资源池, 并将数据储存在所划分出的子资源池中, 由于各个子 资源池中的数据是独立的, 例如: 如图 l b所示, 子资源池 1中存储的数据 切片为 ΡΓ、 Ρ2、 Ρ5,、 Ρ6、 Ρ1、 Ρ2,、 Ρ5、 Ρ6,, 没有任何一个数据切片与 子资源池 2中所存储的数据切片相同,则在子资源池 2中的数据损坏与否都 不会影响到子资源池 1中的数据,且不需要提取子资源池 1中的数据参与修 复子资源池 2中的数据, 因此各个子资源池中的数据是独立的。 由于各个 子资源池中的数据是独立, 一个子资源池中的数据损坏与否、数据修复等 过程都不会影响到其他的子资源池中的数据,则只有同一个子资源池中的 2个存储设备损坏, 数据才会完全损坏。 现有技术中, 存储有相互可以修 复的数据的存储设备可能会同时损坏, 造成数据完全损坏的, 本发明实施 例由于能够划分出多个子资源池, 每个子资源池中包括 Ν个相邻的存储设 备, 并将数据储存在所划分出的多个子资源池中, 只有当同一个子资源池 中的相互可以修复的数据所在的存储设备都损坏时, 数据才会完全损坏, 由于同一个子资源池中的相邻的存储设备都损坏的几率很小从而使得本 发明实施例相对于现有技术能够降低了数据完全损坏的几率,从而提高了 数据的安全性。 可选的, 本发明实施例还提供了一种储存数据的方法, 如图 2所示, 还可以包括: The method for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. For example: As shown in Figure lb, the data slices stored in sub-resource pool 1 are ΡΓ, Ρ2, Ρ5, Ρ6, Ρ1, Ρ2, Ρ5, Ρ6, and there is no data slice and sub-resource pool 2 If the stored data slices are the same, the data in the sub-resource pool 2 will not affect the data in the sub-resource pool 1, and the data in the sub-resource pool 1 need not be extracted to participate in the repair sub-resource pool 2. Data, so the data in each sub-resource pool is independent. Since the data in each sub-resource pool is independent, data corruption or data repair in a sub-resource pool does not affect the data in other sub-resource pools, only two of the same sub-resource pools The storage device is damaged and the data is completely damaged. In the prior art, a storage device that stores mutually repairable data may be damaged at the same time, resulting in complete data corruption. In the embodiment of the present invention, since multiple sub-resource pools can be divided, each sub-resource pool includes one adjacent one. Storage device, and store data in multiple sub-resource pools divided, only when the same sub-resource pool When the storage device in which the mutually repairable data is located is damaged, the data is completely damaged, and the probability of damage to the adjacent storage devices in the same sub-resource pool is small, so that the embodiment of the present invention is compared with the prior art. It can reduce the chance of complete data corruption, which improves data security. Optionally, the embodiment of the present invention further provides a method for storing data, as shown in FIG. 2, which may further include:
201 , 将需要存储的数据划分为 R个切片, 将 R个所述切片分布到包含 指定类型的存储设备所述子资源池中。  201. Divide the data to be stored into R slices, and distribute the R slices into the sub-resource pools of the storage device of the specified type.
其中, 一个子资源池可以包含至少 2个相邻的存储设备, 存储设备用 于存储数据。  The one resource pool may contain at least two adjacent storage devices, and the storage device is used to store data.
并且, 所获取的子资源池包含指定类型的存储设备, 存储设备的类型 包括但不限于: 硬盘、 固态硬盘 SSD。  Moreover, the obtained sub-resource pool includes a storage device of a specified type, and the types of the storage device include but are not limited to: a hard disk, a solid-state hard disk SSD.
202 , 对分布到每个子资源池中的每个所述切片生成副本切片, 并将 所述副本切片存储在对应所述切片所属的子资源池中。  202. Generate a replica slice for each of the slices distributed into each sub-resource pool, and store the replica slice in a sub-resource pool to which the slice belongs.
在本实施例中, 管理服务器可以确定所要使用的存储设备的类型, 并 将需要储存的数据的切片储存在包含该类型存储设备的子资源池,再对分 布到每个子资源池中的每个所述切片生成副本切片,并将所述副本切片存 储在对应所述切片所属的子资源池中, 例如:  In this embodiment, the management server may determine the type of the storage device to be used, and store the slice of the data to be stored in a sub-resource pool containing the type of storage device, and then distribute each to each of the sub-resource pools. The slice generates a replica slice and stores the replica slice in a sub-resource pool to which the slice belongs, for example:
可以在管理服务器中预存如表二所示的数据的类型与存储设备的类 型之间的映射关系,并根据需要储存的数据的类型确定所要使用的存储设 备的类型, 再获取包含该类型存储设备的子资源池, 最后将需要储存的数 据储存在包含该类型存储设备的子资源池中。  The mapping relationship between the type of the data and the type of the storage device as shown in Table 2 can be pre-stored in the management server, and the type of the storage device to be used is determined according to the type of data to be stored, and the storage device including the type of storage device is obtained. The child resource pool, and finally stores the data to be stored in a sub-resource pool containing the type of storage device.
数据类型 存储设备类型 存储设备所在的子资源池 图片 机械硬盘 子资源池 1 文字 固态硬盘 子资源池 2
Figure imgf000016_0001
Data type storage device type Sub-resource pool where the storage device is located Picture mechanical hard disk sub-resource pool 1 Text SSD sub-resource pool 2
Figure imgf000016_0001
表二  Table II
再例如:  Another example:
可以在管理服务器中预存如表三所示的数据的大小与存储设备的类 型之间的映射关系,并根据需要储存的数据的大小确定所要使用的存储设 备的类型, 再获取包含该类型存储设备的子资源池, 最后将需要储存的数 据储存在包含该类型存储设备的子资源池中。  The mapping between the size of the data and the type of the storage device as shown in Table 3 can be pre-stored in the management server, and the type of the storage device to be used is determined according to the size of the data to be stored, and the storage device including the type of storage device is obtained. The child resource pool, and finally stores the data to be stored in a sub-resource pool containing the type of storage device.
Figure imgf000016_0002
Figure imgf000016_0002
表三  Table 3
即在本实施例中,管理服务器确定所要使用的存储设备的类型具体实 施手段可以有多种, 在实际应用中, 本领域技术人员也可以在本发明实施 例的基础上结合现有技术手段确定所要使用的存储设备的类型。由于不同 类型的存储设备的安全性也不同, 例如: 目前很多固态硬盘的损坏的几率 小于机械硬盘。从而管理服务器可以根据数据的重要程度选择相应类型的 存储设备, 从而进一步提高了重要数据的安全性。 进一步可选的, 本发明实施例又提供了一种储存数据的方法, 其中如 图 3 a所示, 包括:  That is, in the embodiment, the management server determines the type of the storage device to be used, and the specific implementation means may be various. In practical applications, those skilled in the art may also determine the method according to the embodiment of the present invention and the prior art. The type of storage device to use. Since the security of different types of storage devices is also different, for example: Many solid state drives are currently less likely to be damaged than mechanical hard disks. Therefore, the management server can select the corresponding type of storage device according to the importance of the data, thereby further improving the security of important data. Further, the embodiment of the present invention further provides a method for storing data, where, as shown in FIG. 3a, the method includes:
301 , 将需要存储的数据划分为 R个切片, 将 R个所述切片分布到划分 的所述子资源池中。  301. Divide the data to be stored into R slices, and distribute the R slices into the divided sub-resource pool.
302 , 对分布到每个子资源池中的每个所述切片生成副本切片, 并将 所述副本切片存储到对应所述切片所属的子资源池中的存储设备上。  302. Generate a replica slice for each of the slices distributed to each sub-resource pool, and store the replica slice on a storage device corresponding to the sub-resource pool to which the slice belongs.
其中, 副本切片与需要存储的数据的相同的切片相互对应。 每个所述 的副本切片存储在不同的存储设备上。 例如: Wherein, the duplicate slice corresponds to the same slice of the data to be stored. Each said The copy tiles are stored on different storage devices. E.g:
如图 lb所示, 第一副本的副本切片为 P1-P8 , 第二副本的副本切片为 ΡΓ-Ρ8,,并且 P1与 ΡΓ相同, Ρ2与 Ρ2,相同, 直至 Ρ8与 Ρ8,相同。 在子资源池 1中, 硬盘 17 载了 Pl、 Ρ2,、 Ρ5、 Ρ6,, 硬盘 27 载了 ΡΓ、 Ρ2、 Ρ5,、 Ρ6 , 即第一副本在子资源池 1中的内容与第二副本在子资源池 1中的内容相同, 同理,第一副本在子资源池 2中的内容与第二副本在子资源池 2中的内容相 同。  As shown in Figure lb, the copy of the first copy is P1-P8, the copy of the second copy is ΡΓ-Ρ8, and P1 is the same as ΡΓ, Ρ2 is the same as Ρ2, until Ρ8 is the same as Ρ8. In the sub-resource pool 1, the hard disk 17 carries P1, Ρ2, Ρ5, Ρ6, and the hard disk 27 carries ΡΓ, Ρ2, Ρ5, Ρ6, that is, the content and the second copy of the first copy in the sub-resource pool 1 The content in the sub-resource pool 1 is the same. Similarly, the content of the first copy in the sub-resource pool 2 is the same as the content of the second copy in the sub-resource pool 2.
进一步的, P1和 ΡΓ都在子资源池 1中, 即与 P1相同的 Partition只存在 于子资源池 1中, 同理, 相同的 Partition都在同一个子资源池中, 使得一个 子资源池中的数据在内容上独立于其他子资源池。 并且, 每个副本切片存 储的硬盘与对应切片存储的硬盘不同, 比如: 子资源池 1中的一个副本切 片与子资源池 2中的中的任一个副本的任一个切片都不相同。 且数据相同 的副本切片存储在不同的存储设备上, 比如: P1和 ΡΓ在不同的硬盘上。  Further, both P1 and ΡΓ are in sub-resource pool 1, that is, the same Partition as P1 exists only in sub-resource pool 1. Similarly, the same Partition is in the same sub-resource pool, so that in a sub-resource pool Data is content independent of other child resource pools. Moreover, the hard disk stored in each copy slice is different from the hard disk corresponding to the slice storage. For example, one copy of the sub-resource pool 1 and any one of the sub-resource pools 2 are different. And the same copy of the data is stored on different storage devices, such as: P1 and ΡΓ on different hard disks.
303a, 针对任一个所述子资源池, 减少所述子资源池中的存储设备的 数量。 的存储设备的热插 /拔, 即可以在子资源池正在运行的过程中增加或减少 子资源池中的存储设备的数量。 例如: 当子资源池中的某一块硬盘故障并 需要通过常用的技术手段进行数据重建时,管理服务器可以将故障硬盘上 的数据在本子资源池中进行重建恢复, 如图 3a l所示。 当子资源池 X中的硬 盘 1故障后, 硬盘 1上的 Partition可以按照实现通过事先设定的规律全部迁 移到了子资源池中的其他 3块硬盘中。 从而实现在子资源池正在运行的过 程中减少子资源池中的存储设备的数量。  303a. For any one of the sub-resource pools, reduce the number of storage devices in the sub-resource pool. The hot plug/unplug of the storage device can increase or decrease the number of storage devices in the subresource pool while the subresource pool is running. For example, when a certain hard disk in a sub-resource pool fails and needs to be rebuilt by common technical means, the management server can rebuild and restore the data on the failed hard disk in the sub-resource pool, as shown in Figure 3a. After the hard disk 1 in the sub-resource pool X fails, the Partition on the hard disk 1 can be migrated to the other three hard disks in the sub-resource pool according to the preset rules. This reduces the number of storage devices in the child resource pool while the child resource pool is running.
304a,将所减少的存储设备中的所述切片分配到所述子资源池中的其 他存储设备上。 并列的, 如图 3b所示, 还可以包括: 304a, assigning the slice in the reduced storage device to other storage devices in the sub-resource pool. Parallel, as shown in Figure 3b, may also include:
303b , 针对任一个所述子资源池, 增加所述子资源池中的存储设备的 数量。  303b. Add, for any one of the sub-resource pools, the number of storage devices in the sub-resource pool.
例如: 如图 3b l所示。 当管理服务器对子资源池 X中增加了硬盘 4后, 硬盘 1-3上的 Partition可以按照实现通过事先设定的规律平均分配在硬盘 1—4这 4快硬盘中, 从而将硬盘 1-3上的部分内容迁移到了硬盘 4中。 从而实 现在子资源池正在运行的过程中增加子资源池中的存储设备的数量。  For example: as shown in Figure 3b l. After the management server adds the hard disk 4 to the sub-resource pool X, the Partition on the hard disk 1-3 can be evenly distributed in the hard disk 1-4 in the 4 fast hard disks according to the preset rule, thereby the hard disk 1-3 Part of the content was migrated to the hard disk 4. Thus, the number of storage devices in the child resource pool is increased during the running of the child resource pool.
304b ,将该子资源池中的所述切片的副本切片重新分配到该子资源池 中的存储设备上。  304b, re-allocating a copy of the slice in the sub-resource pool to a storage device in the sub-resource pool.
在本实施例中, 管理服务器可以在增加了子资源池中的存储设备后, 将子资源池中的切片进行重新分配, 比如: 如图 3b l所示, 将硬盘 1-3上的 所有数据切片, 在硬盘 1-4上重新进行分布打散。  In this embodiment, the management server may re-allocate the slices in the sub-resource pool after adding the storage devices in the sub-resource pool, for example, as shown in FIG. 3b, all the data on the hard disks 1-3. Slice, re-distribute on the hard disk 1-4.
本发明实施例还可以实现子资源池中的存储设备的热插 /拔, 使得各 个子资源池在出现存储设备损坏、 存储设备停机维护等非正常运行情况 时, 可以保证储存在子资源池中的数据不丟失, 使得分布式存储系统在运 行时可以在保证数据稳定的情况下随时排除不能用的存储设备,从而进一 步提高了数据的安全性。  The embodiment of the present invention can also implement hot plugging/unplugging of the storage devices in the sub-resource pool, so that each sub-resource pool can be stored in the sub-resource pool when abnormal operation such as storage device damage and storage device shutdown maintenance occurs. The data is not lost, so that the distributed storage system can eliminate the unusable storage devices at any time while ensuring data stability, thereby further improving the security of the data.
本发明实施例提供的修复数据的方法,能够将所有的存储设备划分为 至少二个子资源池, 并将数据储存在所划分出的子资源池中, 由于各个子 资源池中的数据是独立的, 以一个子资源池中包括两个存储设备为例, 只 有同一个子资源池中的 2个存储设备损坏, 数据才会完全损坏。 现有技术 中在只有一个资源池的情况下, 损坏 2个存储设备就可能会造成数据完全 损坏的情况, 本发明实施例由于能够划分出多个子资源池, 并将数据储存 在所划分出的多个子资源池中, 只有当同一个子资源池中的 2个存储设备 损坏时, 数据才会完全损坏, 由于同一个子资源池中的 2个相邻的存储设 备损坏的几率, 小于现有技术中在只有一个资源池的情况下损坏 2个存储 有可以相互进行数据恢复的存储设备的几率,从而使得本发明实施例相对 于现有技术能够降低了数据完全损坏的几率, 从而提高了数据的安全性。 再进一步可选的, 本发明实施例还提供了一种储存数据的方法, 还可 以包括: 将所述划分的子资源池再次划分为不同级别子资源池集合, 每个 子资源池集合中包括至少一个子资源池,不同级别的子资源池集合中每个 所述切片的期望生成的副本切片数量不同;所述对分布到每个子资源池中 的每个所述切片生成副本切片, 包括: 按照子资源池所属子资源池集合的 级别所对应的每个所述切片期望生成的副本切片数量,将分布到子资源池 中的每个所述切片生成对应数量的副本切片。 具体实现中, 可以如图 4 a 所示, 包括: The method for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. For example, if two storage devices are included in a sub-resource pool, only two storage devices in the same sub-resource pool are damaged, and the data is completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may cause complete data corruption. In the embodiment of the present invention, multiple sub-resource pools can be divided, and the data is stored in the divided In a plurality of sub-resource pools, the data is completely damaged only when two storage devices in the same sub-resource pool are damaged. The probability of damage to two adjacent storage devices in the same sub-resource pool is smaller than that in the prior art. Damage 2 storages with only one resource pool There is a probability that the storage device can perform data recovery with each other, so that the embodiment of the present invention can reduce the probability of complete data corruption relative to the prior art, thereby improving data security. Further, optionally, the embodiment of the present invention further provides a method for storing data, which may further include: dividing the divided sub-resource pool into different levels of sub-resource pool sets, where each sub-resource pool set includes at least a sub-resource pool, the number of replica slices that are expected to be generated for each of the slices in the different levels of sub-resource pools is different; the replica slices are generated for each of the slices distributed to each of the sub-resource pools, including: The number of replica slices that each of the slices corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs is generated, and each of the slices distributed to the sub-resource pool generates a corresponding number of replica slices. In a specific implementation, as shown in FIG. 4 a , the method includes:
401a, 将所述划分的子资源池再次划分为不同级别子资源池集合。 其中, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资 源池集合中每个所述切片的期望生成的副本切片数量不同。 例如:  401a: Divide the divided sub-resource pool into different levels of sub-resource pool sets. Each sub-resource pool set includes at least one sub-resource pool, and the number of replica slices that are expected to be generated for each of the slices in different levels of the sub-resource pool set is different. E.g:
确定 Q个一级子资源池, 或 Q,个二级子资源池。 其中, 一级子资源池 储存的切片期望生成的副本数量为 M ,二级子资源池储存的切片期望生成 的副本数量为 0 , 且 M > 0 > 2 , Q > 2 , Q, > 2。 源池储存的切片期望生成的副本数量, 例如: 副本 1、 2、 3的内容相同, 子资源池 X中切片期望生成的副本数量为 2 , 子资源池 y中切片期望生成的 副本数量为 3。 则在子资源池 X中, 在储存了来自副本 1中的副本切片 Pl、 P2、 P3 , 和来自副本 2中的副本切片 Pl'、 P2'、 P3'后, 就不能再储存来自 副本 3中的副本切片 Pl' '、 Ρ2' '、 Ρ3 " , 若要同时储存来自副本 1、 2、 3的全 部或部分内容, 则需要使用子资源池 y。  Determine Q primary resource pools, or Q, secondary secondary resource pools. The number of copies expected to be generated by the slice stored in the primary sub-resource pool is M, and the number of copies expected to be generated by the slice stored in the secondary sub-resource pool is 0, and M > 0 > 2, Q > 2, Q, > 2. The number of copies that the source pool stores are expected to generate, for example: the contents of the replicas 1, 2, and 3 are the same, the number of replicas expected to be generated in the sub-resource pool X is 2, and the number of replicas expected to be generated in the sub-resource pool y is 3. . Then, in the sub-resource pool X, after storing the copy slices P1, P2, P3 from the copy 1, and the copy slices P1', P2', P3' from the copy 2, it is no longer possible to store from the copy 3 The copy of the slice Pl ' ', Ρ 2 ' ', Ρ 3 ", in order to store all or part of the content from the copy 1, 2, 3, you need to use the sub-resource pool y.
并且,可以在用于表示子资源池属性的标识信息中加入用于限定副本 数量的字符, 比如: 010表示子资源池允许所储存的数据期望的副本的数 量为 2 , 011表示子资源池允许所储存的数据期望的副本的数量为 3。 Moreover, characters for defining the number of copies may be added to the identification information for indicating the attributes of the child resource pool, for example: 010 indicates that the child resource pool allows the expected number of copies of the stored data. The amount is 2, 011 indicates that the sub-resource pool allows the number of copies of the desired data to be stored as 3.
402 a ,按照子资源池所属子资源池集合的级另 'J所对应的每个所述切片 期望生成的副本切片数量,将分布到子资源池中的每个所述切片生成对应 数量的副本切片。  402 a, generating a corresponding number of copies for each of the slices distributed to the sub-resource pool according to the number of replica slices that each of the slices corresponding to the sub-resource pool of the sub-resource pool belongs to. slice.
在本实施例中,管理服务器确定所使用的子资源池的等级方式可以由 多种, 例如: 管理服务器可以根据需要储存的数据的类型, 确定子资源池 的等级, 比如: 如表四所示, 管理服务器可以预存数据的类型与子资源池 等级之间的映射关系,并根据需要储存的数据的类型和表四所示的映射关 系确定储存需要储存的数据所需的子资源池的等级。  In this embodiment, the management server determines that the level of the used sub-resource pool can be various. For example, the management server can determine the level of the sub-resource pool according to the type of data to be stored, for example, as shown in Table 4. The management server may pre-store the mapping relationship between the type of the data and the sub-resource pool level, and determine the level of the sub-resource pool required to store the data to be stored according to the type of data to be stored and the mapping relationship shown in Table 4.
Figure imgf000020_0001
Figure imgf000020_0001
表四  Table 4
由于在实际应用中, 不同数据的重要程度也不同, 本发明实施例可以 对不同重要程度的数据采取不同等级的存储方式,对于相对而言重要的数 据可以通过具备较多副本的存储方式以保证数据的安全性,对于相对而言 不重要的数据可以通过具备较少副本的存储方式以增加系统中存储设备 的利用率, 从而提高分布式存储系统的运行效率, 使得管理服务器可以将 更多的存储设备用于储存较为重要的数据,从而进一步提高了重要数据的 安全性。 并列的, 如图 4b所示, 还包括:  Since the importance of different data is different in practical applications, the embodiments of the present invention can adopt different levels of storage methods for data of different importance levels, and the relatively important data can be guaranteed by storing more copies. Data security, for relatively unimportant data, can increase the utilization of storage devices in the system through storage with fewer copies, thereby improving the operating efficiency of the distributed storage system, enabling the management server to be more Storage devices are used to store more important data, further enhancing the security of important data. Parallel, as shown in Figure 4b, also includes:
401b , 将所述划分的子资源池再次划分为不同级别子资源池集合。 其中, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资 源池集合中每个所述切片的期望生成的副本切片数量不同。 401b: Divide the divided sub-resource pool into different levels of sub-resource pool sets. Each sub-resource pool set includes at least one sub-resource pool, and different levels of sub-investments The number of replica slices that are expected to be generated for each of the slices in the source pool set is different.
402b , 将需要存储的数据划分为 R个切片, 根据 R个切片中数据的重 要程度, 将 R个切片分布到不同级别的子资源池中。  402b, the data to be stored is divided into R slices, and the R slices are distributed to different levels of sub-resource pools according to the importance of the data in the R slices.
其中, R > 2。 例如:  Where R > 2. E.g:
在使用虚拟机的过程中需要在子资源池中储存虚拟机的系统卷的数 据和用户卷的数据, 由于系统卷的数据的安全性更加重要, 则管理服务器 可以根据系统卷的数据所对应的切片生成 3个副本并储存在一级子资源池 中, 并根据用户卷的数据所对应的切片生成 2个副本并储存在二级子资源 池中,从而实现根据同一份需要储存的数据的不同部分生成不同数量的副 本, 并储存在相应级别的子资源池中。  In the process of using the virtual machine, the data of the system volume of the virtual machine and the data of the user volume need to be stored in the sub-resource pool. Since the security of the data of the system volume is more important, the management server may correspond to the data of the system volume. The slice generates 3 copies and stores them in the first-level sub-resource pool, and generates 2 copies according to the slice corresponding to the data of the user volume and stores them in the second-level sub-resource pool, thereby realizing different data according to the same needs to be stored. Part of the generation of a different number of copies, and stored in the corresponding level of the sub-resource pool.
由于在实际应用中, 同一份数据的不同部分的重要程度也不同, 本发 明实施例可以针对数据的不同部分的重要程度的数据采取不同等级的存 储方式,对于数据中相对而言重要的部分可以通过具备较多副本的存储方 式以保证安全性,对于相对与不重要的部分可以通过具备较少副本的存储 方式以增加系统中存储设备的利用率,从而提高分布式存储系统的运行效 率,使得管理服务器可以将更多的存储设备用于储存数据中较为重要的部 分, 从而进一步提高了数据中重要部分的安全性。  Since the importance degree of different parts of the same data is different in practical applications, the embodiment of the present invention can adopt different levels of storage methods for data of different degrees of different parts of the data, and the relatively important part of the data may be The storage system with more copies is used to ensure security. For the relatively unimportant parts, the storage device with fewer copies can be used to increase the utilization of storage devices in the system, thereby improving the operating efficiency of the distributed storage system. The management server can use more storage devices to store the more important parts of the data, further enhancing the security of important parts of the data.
本发明实施例提供的修复数据的方法,能够将所有的存储设备划分为 至少二个子资源池, 并将数据储存在所划分出的子资源池中, 由于各个子 资源池中的数据是独立的, 只有同一个子资源池中的 2个存储设备损坏, 数据才会完全损坏。 现有技术中在只有一个资源池的情况下, 损坏 2个存 储设备就会造成数据完全损坏的情况,本发明实施例由于能够划分出多个 子资源池, 并将数据储存在所划分出的多个子资源池中, 只有当同一个子 资源池中的 2个存储设备损坏时, 数据才会完全损坏, 由于同一个子资源 池中的 2个存储设备损坏的几率很小, 从而使得本发明实施例相对于现有 技术能够降低了数据完全损坏的几率, 从而提高了数据的安全性。 另一方面,本发明实施例提供了一种储存数据的装置,用于存储系统, 所述存储系统中包括用于存储数据的资源池,所述资源池被逻辑划分为至 少 2个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2 , 如图 5 所示, 包括: The method for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. Only when two storage devices in the same sub-resource pool are damaged, the data will be completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption. In the embodiment of the present invention, multiple sub-resource pools can be divided, and the data is stored in the divided In the sub-resource pool, only when the two storage devices in the same sub-resource pool are damaged, the data is completely damaged, because the probability of damage to the two storage devices in the same sub-resource pool is small, so that the embodiment of the present invention is relatively The prior art can reduce the probability of complete data corruption, thereby improving data security. On the other hand, an embodiment of the present invention provides an apparatus for storing data, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resource pools. Each sub-resource pool includes N storage devices, N > 2, as shown in Figure 5, including:
分布模块 51 , 用于将需要存储的数据划分为 R个切片, 将 R个所述切 片分布到划分的所述子资源池中。  The distribution module 51 is configured to divide the data to be stored into R slices, and distribute the R slices into the divided sub-resource pools.
其中, 需要存储的数据期望生成的副本数量小于 N , R > 2„ 副本生成模块 52 ,用于对分布到每个子资源池中的每个所述切片生成 副本切片。  Wherein, the data to be stored is expected to generate a copy number smaller than N, R > 2 „ copy generation module 52, for generating a copy slice for each of the slices distributed to each sub-resource pool.
储存模块 53 ,用于将所述副本切片存储在对应所述切片所属的子资源 池中, 所述副本切片与数据相同的所述切片相互对应。  The storage module 53 is configured to store the replica slice in a sub-resource pool corresponding to the slice, where the replica slice and the same slice of the data correspond to each other.
本发明实施例提供的修复数据的装置,能够将所有的存储设备划分为 至少二个子资源池, 并将数据储存在所划分出的子资源池中, 由于各个子 资源池中的数据是独立的, 只有同一个子资源池中的 2个存储设备损坏, 数据才会完全损坏。 现有技术中在只有一个资源池的情况下, 损坏 2个存 储设备就会造成数据完全损坏的情况,本发明实施例由于能够划分出多个 子资源池, 并将数据储存在所划分出的多个子资源池中, 只有当同一个子 资源池中的 2个存储设备损坏时, 数据才会完全损坏, 由于同一个子资源 池中的 2个存储设备损坏的几率, 小于现有技术中在只有一个资源池的情 况下损坏 2个存储设备的几率, 从而使得本发明实施例相对于现有技术能 够降低了数据完全损坏的几率, 从而提高了数据的安全性。 可选的, 如图 6所示, 本发明实施例提供的储存数据的装置的, 可以 包括:  The apparatus for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. Only when two storage devices in the same sub-resource pool are damaged, the data will be completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption. In the embodiment of the present invention, multiple sub-resource pools can be divided, and the data is stored in the divided In a sub-resource pool, only when two storage devices in the same sub-resource pool are damaged, the data is completely damaged. The probability of two storage devices in the same sub-resource pool is less than that in the prior art. In the case of a pool, the probability of damaging two storage devices is such that the embodiment of the present invention can reduce the probability of complete data corruption relative to the prior art, thereby improving data security. Optionally, as shown in FIG. 6, the apparatus for storing data provided by the embodiment of the present invention may include:
分布模块 62 , 用于将需要存储的数据划分为 R个切片, 将 R个所述切 片分布到划分的所述子资源池中。 a distribution module 62, configured to divide data to be stored into R slices, and cut the R slices The slices are distributed into the divided sub-resource pools.
其中, 需要存储的数据期望生成的副本数量小于 N , R > 2„ 副本生成模块 63 ,用于对分布到每个子资源池中的每个所述切片生成 副本切片。  Wherein, the data to be stored is expected to generate a copy number smaller than N, R > 2 „ copy generation module 63, for generating a copy slice for each of the slices distributed into each sub-resource pool.
储存模块 64 ,用于将所述副本切片存储在对应所述切片所属的子资源 池中, 所述副本切片与数据相同的所述切片相互对应。  The storage module 64 is configured to store the replica slice in a sub-resource pool corresponding to the slice, where the replica slice and the same slice of the data correspond to each other.
进一步的, 所述储存模块 64 , 还用于将所述副本切片存储到对应所述 切片所属的子资源池中的存储设备上。 备不同, 数据相同的副本切片存储在不同的存储设备上。  Further, the storage module 64 is further configured to store the replica slice to a storage device corresponding to the sub-resource pool to which the slice belongs. In the case of different data, the same copy of the copy is stored on different storage devices.
进一步可选的, 本发明实施例提供的储存数据的装置还可以包括: 划分模块 61 ,用于将所述划分的子资源池再次划分为不同级别子资源 池集合。  Further, the apparatus for storing data provided by the embodiment of the present invention may further include: a dividing module 61, configured to divide the divided sub-resource pool into different levels of sub-resource pool sets.
其中, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资 源池集合中每个所述切片的期望生成的副本切片数量不同。  Each sub-resource pool set includes at least one sub-resource pool, and the number of replica slices that are expected to be generated for each of the slices in different levels of the sub-resource pool set is different.
所述副本生成模块 63 ,还用于按照子资源池所属子资源池集合的级别 所对应的每个所述切片期望生成的副本切片数量,将分布到子资源池中的 每个所述切片生成对应数量的副本切片。  The copy generating module 63 is further configured to generate, according to the number of replica slices that each slice of the slice corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs, to generate the slice into the sub-resource pool. Corresponding number of copies of the slice.
由于在实际应用中, 不同数据的重要程度也不同, 本发明实施例所提 供的装置可以对不同重要程度的数据采取不同等级的存储方式,对于相对 而言重要的数据可以通过具备较多副本的存储方式以保证数据的安全性, 对于相对而言不重要的数据可以通过具备较少副本的存储方式以增加系 统中存储设备的利用率, 从而提高分布式存储系统的运行效率, 使得管理 服务器可以将更多的存储设备用于储存较为重要的数据,从而进一步提高 了重要数据的安全性。  Since the importance of different data is different in practical applications, the device provided by the embodiments of the present invention can adopt different levels of storage methods for data of different importance levels, and relatively important data can be obtained by having more copies. Storage mode to ensure data security. For relatively unimportant data, the storage capacity of the system can be increased by the storage method with fewer copies, thereby improving the operating efficiency of the distributed storage system, so that the management server can More storage devices are used to store more important data, further enhancing the security of important data.
再进一步可选的, 本发明实施例提供的储存数据的装置还可以包括: 负调节模块 65 , 用于针对任一个所述子资源池, 减少所述子资源池中 的存储设备的数量。 Further, the apparatus for storing data provided by the embodiment of the present invention may further include: The negative adjustment module 65 is configured to reduce the number of storage devices in the sub-resource pool for any one of the sub-resource pools.
正调节模块 66 , 用于针对任一个所述子资源池, 增加所述子资源池中 的存储设备的数量。  The positive adjustment module 66 is configured to increase the number of storage devices in the sub-resource pool for any one of the sub-resource pools.
数据分配模块 67 ,用于将所减少的存储设备中的所述切片分配到所述 子资源池中的其他存储设备上。  The data distribution module 67 is configured to allocate the slice in the reduced storage device to other storage devices in the sub-resource pool.
其中, 子资源池中的剩余的存储设备数量大于所述期望生成的副本 数。  The number of remaining storage devices in the child resource pool is greater than the number of copies that are expected to be generated.
所述数据分配模块 67 ,还用于当增加所述子资源池中的存储设备的数 量时,将该子资源池中的所述切片的副本切片重新分配到该子资源池中的 存储设备上。  The data distribution module 67 is further configured to: when the number of storage devices in the sub-resource pool is increased, re-allocate a replica slice of the slice in the sub-resource pool to a storage device in the sub-resource pool .
更进一步可选的, 所述分布模块 62 , 还用于根据 R个切片中数据的重 要程度, 将 R个切片分布到不同级别的子资源池中。  Further, the distribution module 62 is further configured to distribute R slices to different levels of sub-resource pools according to the importance of data in the R slices.
本发明实施例还可以实现子资源池中的存储设备的热插 /拔, 使得各 个子资源池中的存储设备出现损坏、 停机维护等非正常运行情况时, 可以 保证储存在子资源池中的数据不丟失,使得分布式存储系统在运行时可以 在保证数据稳定的情况下随时排除不能用的存储设备,从而进一步提高了 数据的安全性。 本发明实施例提供的修复数据的装置, 能够将所有的存储 设备划分为至少二个子资源池, 并将数据储存在所划分出的子资源池中, 由于各个子资源池中的数据是独立的, 只有同一个子资源池中的 2个存储 设备损坏, 数据才会完全损坏。 现有技术中在只有一个资源池的情况下, 损坏 2个存储设备就会造成数据完全损坏的情况, 本发明实施例由于能够 划分出多个子资源池, 并将数据储存在所划分出的多个子资源池中, 只有 当同一个子资源池中的 2个存储设备损坏时, 数据才会完全损坏, 由于同 一个子资源池中的 2个存储设备损坏的几率, 小于现有技术中在只有一个 资源池的情况下损坏 2个存储设备的几率, 从而使得本发明实施例相对于 现有技术能够降低了数据完全损坏的几率, 从而提高了数据的安全性。 再一方面, 本发明实施例提供了一种储存数据的存储系统, 如图 7所 示, 所述存储系统中包括用于存储数据的存储区域 74, 所述存储区域 74 被逻辑划分为至少 2个子资源池, 每个子资源池中包括相邻的 N个存储设 备, N> 2, 所述存储系统包括: 处理器 71、 通信接口 72、 总线 73, 的所 述处理器 71、 所述通信接口 72和所述存储区域 74中的所有的存储设备, 通 过所述总线 73完成相互间的通信, 其中: The embodiment of the present invention can also implement hot plugging/unplugging of the storage devices in the sub-resource pool, so that when the storage devices in the sub-resource pools are damaged or shut down and maintained, the storage devices can be stored in the sub-resource pools. The data is not lost, so that the distributed storage system can eliminate the unusable storage devices at any time while ensuring data stability, thereby further improving the security of the data. The apparatus for repairing data provided by the embodiment of the present invention can divide all storage devices into at least two sub-resource pools, and store the data in the divided sub-resource pools, because the data in each sub-resource pool is independent. Only when two storage devices in the same sub-resource pool are damaged, the data will be completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption. In the embodiment of the present invention, multiple sub-resource pools can be divided, and the data is stored in the divided In a sub-resource pool, only when two storage devices in the same sub-resource pool are damaged, the data is completely damaged. The probability of two storage devices in the same sub-resource pool is less than that in the prior art. The probability of damaging two storage devices in the case of a pool, thereby making the embodiment of the present invention The prior art can reduce the probability of complete data corruption, thereby improving data security. In another aspect, the embodiment of the present invention provides a storage system for storing data. As shown in FIG. 7, the storage system includes a storage area 74 for storing data, and the storage area 74 is logically divided into at least 2 a sub-resource pool, each sub-resource pool includes an adjacent N storage devices, N>2, the storage system includes: the processor 71, the communication interface 72, the bus 73, the processor 71, and the communication interface 72 and all the storage devices in the storage area 74, through the bus 73 to complete mutual communication, wherein:
所述处理器 71, 用于将需要存储的数据划分为 R个切片, 通过所述通 信接口 72将 R个所述切片分布到划分的所述子资源池中。  The processor 71 is configured to divide data to be stored into R slices, and distribute the R slices to the divided sub-resource pools through the communication interface 72.
其中, 需要存储的数据期望生成的副本数量小于 N, R>2„ 所述处理器 71,还用于对分布到每个子资源池中的每个所述切片生成 副本切片, 并将所述副本切片存储在对应所述切片所属的子资源池中。  The number of copies that need to be stored is expected to be less than N, R>2 „the processor 71 is further configured to generate a replica slice for each of the slices distributed to each sub-resource pool, and the replica is The slice is stored in the sub-resource pool to which the slice belongs.
其中, 副本切片与需要存储的数据的相同的切片相互对应。  Wherein, the duplicate slice corresponds to the same slice of the data to be stored.
进一步的, 所述处理器 71, 还用于将所述副本切片存储到对应所述切 片所属的子资源池中的存储设备上。 不同, 数据相同的副本切片存储在不同的存储设备上。 可选的, 所述处理器 71, 还用于将所述划分的子资源池再次划分为不 同级别子资源池集合。  Further, the processor 71 is further configured to store the replica slice to a storage device corresponding to the sub-resource pool to which the slice belongs. Different, the same copy of the data is stored on different storage devices. Optionally, the processor 71 is further configured to divide the divided sub-resource pool into different sub-resource pool sets.
其中, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资 源池集合中每个切片的期望生成的副本切片数量不同。  Each sub-resource pool set includes at least one sub-resource pool, and each of the different levels of sub-resource pool sets has a different number of replica slices that are expected to be generated.
所述处理器 71,还用于按照子资源池所属子资源池集合的级别所对应 的每个所述切片期望生成的副本切片数量,将分布到子资源池中的每个所 述切片生成对应数量的副本切片。 进一步可选的, 所述处理器 71 , 还用于在将所述副本切片存储在对应 所述切片所属的子资源池中后, 针对任一个所述子资源池, 当减少所述子 资源池中的存储设备的数量时,通过所述通信接口 72将所减少的存储设备 中的所述切片分配到所述子资源池中的其他存储设备上。 The processor 71 is further configured to generate, according to the number of replica slices that each of the slices corresponding to the level of the sub-resource pool pool to which the sub-resource pool belongs, generate the corresponding one of the slices distributed to the sub-resource pool. The number of copies is sliced. Further, the processor 71 is further configured to: when the replica slice is stored in a sub-resource pool to which the slice belongs, for the sub-resource pool, when the sub-resource pool is reduced The number of storage devices in the reduced storage device is allocated to other storage devices in the sub-resource pool through the communication interface 72.
其中, 子资源池中的剩余的存储设备数量大于所述期望生成的副本 数。  The number of remaining storage devices in the child resource pool is greater than the number of copies that are expected to be generated.
并列的可选的, 所述处理器 71 , 还用于在将所述副本切片存储在对应 所述切片所属的子资源池中后, 针对任一个所述子资源池, 当增加所述子 资源池中的存储设备的数量时,通过所述通信接口 72将该子资源池中的所 述切片的副本切片重新分配到该子资源池中的存储设备上。 更进一步可选的, 所述处理器 71 , 还用于根据 R个切片中数据的重要 程度, 将 R个切片分布到不同级别的子资源池中。 本发明实施例提供的修复数据的存储系统,能够将存储系统中的所有 的存储设备划分为至少二个资源池, 并将数据储存在所划分出的资源池 中, 由于各个资源池中的数据是独立的, 只有同一个资源池中的 2个存储 设备损坏, 数据才会完全损坏。 现有技术中在只有一个资源池的情况下, 损坏 2个存储设备就会造成数据完全损坏的情况, 本发明实施例由于能够 划分出多个资源池, 并将数据储存在所划分出的多个资源池中, 只有当同 一个资源池中的 2个存储设备损坏时, 数据才会完全损坏, 由于同一个资 源池中的 2个存储设备损坏的几率, 小于现有技术中在只有一个资源池的 情况下损坏 2个存储设备的几率, 从而使得本发明实施例相对于现有技术 能够降低了数据完全损坏的几率, 从而提高了数据的安全性。 再一方面, 本发明实施例提供了一种修复数据的计算机程序产品, 用 于存储系统, 所述存储系统中包括用于存储数据的资源池, 所述资源池被 逻辑划分为至少 2个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2, 所述计算机程序产品包括存储了程序代码的计算机可读存储介质, 所述程序代码包括的指令用于: Optionally, the processor 71 is further configured to: when the replica slice is stored in a sub-resource pool to which the slice belongs, for the sub-resource pool, when the sub-resource is added When the number of storage devices in the pool is reached, the copy of the slice in the sub-resource pool is re-allocated to the storage device in the sub-resource pool through the communication interface 72. Further, the processor 71 is further configured to distribute R slices to different levels of sub-resource pools according to the importance of data in the R slices. The storage system for repairing data provided by the embodiment of the present invention can divide all storage devices in the storage system into at least two resource pools, and store the data in the divided resource pools, because the data in each resource pool It is independent. Only when two storage devices in the same resource pool are damaged, the data will be completely damaged. In the prior art, in the case where there is only one resource pool, the damage of the two storage devices may result in complete data corruption. In the embodiment of the present invention, multiple resource pools can be divided, and the data is stored in the divided data. In a resource pool, only when two storage devices in the same resource pool are damaged, the data is completely damaged, because the probability of two storage devices in the same resource pool is less than that in the prior art. In the case of a pool, the probability of damaging two storage devices is such that the embodiment of the present invention can reduce the probability of complete data corruption relative to the prior art, thereby improving data security. In another aspect, an embodiment of the present invention provides a computer program product for repairing data, which is used in a storage system, where the storage system includes a resource pool for storing data, and the resource pool is logically divided into at least two sub-resources. a pool, each sub-resource pool includes an adjacent N storage devices, N>2, the computer program product includes a computer-readable storage medium storing program code, and the program code includes instructions for:
将需要存储的数据划分为 R个切片, 将 R个所述切片分布到划分的所 述子资源池中, 所述需要存储的数据期望生成的副本数量小于 N, R > 2„ 对分布到每个子资源池中的每个所述切片生成副本切片,并将所述副 本切片存储在对应所述切片所属的子资源池中,所述副本切片与数据相同 的所述切片相互对应。  The data to be stored is divided into R slices, and the R slices are distributed into the divided sub-resource pools, and the number of copies that need to be stored is expected to be generated less than N, R > 2 „ Each of the slices in the sub-resource pool generates a replica slice and stores the replica slice in a sub-resource pool to which the slice belongs, the replica slice corresponding to the slice having the same data.
本发明实施例提供的修复数据的计算机程序产品,能够将存储系统中 的所有的存储设备划分为至少二个资源池,并将数据储存在所划分出的资 源池中, 由于各个资源池中的数据是独立的, 只有同一个资源池中的 2个 存储设备损坏, 数据才会完全损坏。 现有技术中在只有一个资源池的情况 能够划分出多个资源池, 并将数据储存在所划分出的多个资源池中, 只有 当同一个资源池中的 2个存储设备损坏时, 数据才会完全损坏, 由于同一 个资源池中的 2个存储设备损坏的几率, 小于现有技术中在只有一个资源 池的情况下损坏 2个存储设备的几率, 从而使得本发明实施例相对于现有 技术能够降低了数据完全损坏的几率, 从而提高了数据的安全性。  The computer program product for repairing data provided by the embodiment of the present invention can divide all the storage devices in the storage system into at least two resource pools, and store the data in the divided resource pools, because each resource pool The data is independent. Only when 2 storage devices in the same resource pool are damaged, the data will be completely damaged. In the prior art, when there is only one resource pool, multiple resource pools can be divided, and data is stored in the divided resource pools. Only when two storage devices in the same resource pool are damaged, the data is The probability of damage to the two storage devices in the same resource pool is less than the probability of damaging the two storage devices in the case of only one resource pool in the prior art, so that the embodiment of the present invention is relatively current. There are techniques to reduce the chance of complete data corruption, which increases data security.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相 同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的 不同之处。 尤其, 对于设备实施例而言, 由于其基本相似于方法实施例, 所以描述得比较筒单, 相关之处参见方法实施例的部分说明即可。  The various embodiments in the specification are described in a progressive manner, and similar parts of the various embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, it is described in a relatively simple manner, and the relevant parts can be referred to the description of the method embodiment.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分 流程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序可存 储于计算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的 实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体One of ordinary skill in the art can understand all or part of the method of implementing the above embodiments. The process may be performed by a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium, and when executed, the program may include a flow of an embodiment of the methods as described above. The storage medium may be a magnetic disk, an optical disk, or a read-only storage memory.
( Read-Only Memory, ROM ) 或随机存储记忆体 ( Random Access Memory, RAM ) 等。 (Read-Only Memory, ROM) or Random Access Memory (RAM).
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局 限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可 轻易想到的变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发 明的保护范围应该以权利要求的保护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any change or replacement that can be easily conceived by those skilled in the art within the technical scope of the present invention is All should be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

权 利 要 求 书 claims
1、 一种储存数据的方法, 用于存储系统, 所述存储系统中包括用于存 储数据的资源池,其特征在于,所述资源池被逻辑划分为至少 2个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2, 所述方法包括: 1. A method of storing data, used in a storage system, the storage system includes a resource pool for storing data, characterized in that the resource pool is logically divided into at least 2 sub-resource pools, each sub-resource pool includes N adjacent storage devices, N > 2, and the method includes:
将需要存储的数据划分为 R个切片, 将 R个所述切片分布到划分的所述 子资源池中, 所述需要存储的数据期望生成的副本数量小于 N, R > 2; 对分布到每个子资源池中的每个所述切片生成副本切片, 并将所述副 本切片存储在对应所述切片所属的子资源池中, 所述副本切片与数据相同 的所述切片相互对应。 Divide the data that needs to be stored into R slices, and distribute the R slices into the divided sub-resource pools. The number of copies expected to be generated for the data that needs to be stored is less than N, R > 2; for distribution to each Each slice in the sub-resource pool generates a replica slice, and stores the replica slice in the sub-resource pool to which the corresponding slice belongs. The replica slice corresponds to the slice with the same data.
2、 根据权利要求 1所述的存储数据的方法, 其特征在于, 所述将所述 副本存储在对应所述切片所属的子资源池中包括: 将所述副本切片存储到 对应所述切片所属的子资源池中的存储设备上, 且每个所述副本切片存储 储在不同的存储设备上。 2. The method of storing data according to claim 1, wherein said storing the copy in a sub-resource pool to which the corresponding slice belongs includes: storing the copy slice into a sub-resource pool to which the corresponding slice belongs. on the storage device in the sub-resource pool, and each copy slice is stored on a different storage device.
3、 根据权利要求 1或 2所述的储存数据的方法, 其特征在于: 3. The method of storing data according to claim 1 or 2, characterized in that:
还包括: 将所述划分的子资源池再次划分为不同级别子资源池集合, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资源池集合中 每个所述切片的期望生成的副本切片数量不同; It also includes: again dividing the divided sub-resource pool into sub-resource pool sets of different levels, each sub-resource pool set including at least one sub-resource pool, and expected generation of each slice in the sub-resource pool set of different levels. The number of replica slices is different;
所述对分布到每个子资源池中的每个所述切片生成副本切片, 包括: 按照子资源池所属子资源池集合的级别所对应的每个所述切片期望生成的 副本切片数量, 将分布到子资源池中的每个所述切片生成对应数量的副本 切片。 The said slice generates a copy slice for each said slice distributed to each sub-resource pool, including: According to the number of replica slices expected to be generated by each slice corresponding to the level of the sub-resource pool set to which the sub-resource pool belongs, a corresponding number of replica slices will be generated for each of the slices distributed in the sub-resource pool.
4、 根据权利要求 1或 2所述的储存数据的方法, 其特征在于, 在将所述 副本切片存储在对应所述切片所属的子资源池中后, 还包括: 4. The method of storing data according to claim 1 or 2, characterized in that, after storing the copy slice in the sub-resource pool to which the corresponding slice belongs, it further includes:
针对任一个所述子资源池, 当减少所述子资源池中的存储设备的数量 时, 将所减少的存储设备中的所述切片分配到所述子资源池中的其他存储 设备上, 所述子资源池中的剩余的存储设备数量大于所述期望生成的副本 数。 For any of the sub-resource pools, when the number of storage devices in the sub-resource pool is reduced, the slices in the reduced storage devices are allocated to other storage devices in the sub-resource pool, so The number of remaining storage devices in the sub-resource pool is greater than the number of copies expected to be generated.
5、 根据权利要求 1或 2所述的储存数据的方法, 其特征在于, 在将所述 副本切片存储在对应所述切片所属的子资源池中后, 还包括: 5. The method of storing data according to claim 1 or 2, characterized in that, after storing the copy slice in the sub-resource pool to which the corresponding slice belongs, it further includes:
针对任一个所述子资源池, 当增加所述子资源池中的存储设备的数量 时, 将该子资源池中的所述切片的副本切片重新分配到该子资源池中的存 储设备上。 For any of the sub-resource pools, when the number of storage devices in the sub-resource pool is increased, the copy slices of the slices in the sub-resource pool are reallocated to the storage devices in the sub-resource pool.
6、 根据权利要求 3所述的储存数据的方法, 其特征在于, 所述将 R个切 片分布到预先划分的子资源池中包括: 6. The method of storing data according to claim 3, characterized in that distributing R slices into pre-divided sub-resource pools includes:
根据 R个切片中数据的重要程度, 将 R个切片分布到不同级别的子资源 池中。 According to the importance of the data in the R slices, the R slices are distributed to different levels of sub-resource pools.
7、 一种储存数据的装置, 用于存储系统, 所述存储系统中包括用于存 储数据的资源池,其特征在于,所述资源池被逻辑划分为至少 2个子资源池, 每个子资源池中包括相邻的 N个存储设备, N > 2, 所述方法包括: 7. A device for storing data, used in a storage system. The storage system includes a device for storing data. A resource pool for storing data, characterized in that the resource pool is logically divided into at least 2 sub-resource pools, each sub-resource pool includes N adjacent storage devices, N > 2, and the method includes:
分布模块, 用于将需要存储的数据划分为 R个切片, 将 R个所述切片分 布到划分的所述子资源池中, 所述需要存储的数据期望生成的副本数量小 于 N, R > 2; A distribution module, used to divide the data that needs to be stored into R slices, and distribute the R slices into the divided sub-resource pools. The number of copies of the data that needs to be stored is expected to be less than N, R > 2 ;
副本生成模块, 用于对分布到每个子资源池中的每个所述切片生成副 本切片; A copy generation module, configured to generate a copy slice for each of the slices distributed to each sub-resource pool;
储存模块, 用于将所述副本切片存储在对应所述切片所属的子资源池 中, 所述副本切片与数据相同的所述切片相互对应。 A storage module, configured to store the copy slice in the sub-resource pool to which the corresponding slice belongs, and the copy slice corresponds to the slice with the same data.
8、 根据权利要求 7所述的储存数据的装置, 其特征在于, 还包括: 所 述储存模块, 还用于将所述副本切片存储到对应所述切片所属的子资源池 中的存储设备上, 且每个所述副本切片存储的存储设备与对应所述切片存 储的存储设备不同, 数据相同的副本切片存储在不同的存储设备上。 8. The device for storing data according to claim 7, further comprising: the storage module, further configured to store the copy slice on a storage device in the sub-resource pool to which the corresponding slice belongs. , and the storage device where each replica slice is stored is different from the storage device where the corresponding slice is stored, and replica slices with the same data are stored on different storage devices.
9、 根据权利要求 7或 8所述的储存数据的装置, 其特征在于, 还包括: 划分模块, 用于将所述划分的子资源池再次划分为不同级别子资源池 集合, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资源池 集合中每个所述切片的期望生成的副本切片数量不同; 9. The device for storing data according to claim 7 or 8, further comprising: a dividing module, configured to divide the divided sub-resource pool into sub-resource pool sets of different levels again, each sub-resource pool The set includes at least one sub-resource pool, and the number of replica slices expected to be generated for each slice in the set of sub-resource pools at different levels is different;
所述副本生成模块, 还用于按照子资源池所属子资源池集合的级别所 对应的每个所述切片期望生成的副本切片数量, 将分布到子资源池中的每 个所述切片生成对应数量的副本切片。 The copy generation module is also configured to generate each copy slice distributed to the sub-resource pool according to the number of copy slices expected to be generated for each slice corresponding to the level of the sub-resource pool set to which the sub-resource pool belongs. Each of the slices generates a corresponding number of replica slices.
10、 根据权利要求 7或 8所述的储存数据的装置, 其特征在于, 还包括: 负调节模块, 用于针对任一个所述子资源池, 减少所述子资源池中的 存储设备的数量; 10. The device for storing data according to claim 7 or 8, further comprising: a negative adjustment module, configured to reduce the number of storage devices in the sub-resource pool for any one of the sub-resource pools. ;
数据分配模块, 用于将所减少的存储设备中的所述切片分配到所述子 资源池中的其他存储设备上, 所述子资源池中的剩余的存储设备数量大于 所述期望生成的副本数。 A data allocation module, configured to allocate the slices in the reduced storage devices to other storage devices in the sub-resource pool, where the number of remaining storage devices in the sub-resource pool is greater than the expected number of copies. number.
11、 根据权利要求 10所述的储存数据的装置, 其特征在于, 还包括: 正调节模块, 用于针对任一个所述子资源池, 增加所述子资源池中的 存储设备的数量; 11. The device for storing data according to claim 10, further comprising: a positive adjustment module, configured to increase the number of storage devices in the sub-resource pool for any one of the sub-resource pools;
所述数据分配模块, 还用于当增加所述子资源池中的存储设备的数量 时, 将该子资源池中的所述切片的副本切片重新分配到该子资源池中的存 储设备上。 The data allocation module is also configured to reallocate the copy slices of the slices in the sub-resource pool to the storage devices in the sub-resource pool when the number of storage devices in the sub-resource pool is increased.
12、 根据权利要求 9所述的储存数据的装置, 其特征在于, 还包括: 所述分布模块, 还用于根据 R个切片中数据的重要程度, 将 R个切片分 布到不同级别的子资源池中。 12. The device for storing data according to claim 9, further comprising: the distribution module, further configured to distribute the R slices to different levels of sub-resources according to the importance of the data in the R slices. in the pool.
13、 一种储存数据的存储系统, 所述存储系统中包括用于存储数据的 资源池, 其特征在于, 所述资源池被逻辑划分为至少 2个子资源池, 每个子 资源池中包括相邻的 N个存储设备, N > 2 , 所述存储系统包括: 处理器、 通信接口、 总线, 其特征在于还包括存储设备, 所述处理器、 所述通信接 口和所有的存储设备, 通过所述总线完成相互间的通信, 其中: 13. A storage system for storing data. The storage system includes a resource pool for storing data. It is characterized in that the resource pool is logically divided into at least 2 sub-resource pools, and each sub-resource pool includes adjacent resource pools. N storage devices, N > 2, the storage system includes: processor, The communication interface and bus are characterized by also including a storage device. The processor, the communication interface and all storage devices complete mutual communication through the bus, where:
所述处理器, 用于将需要存储的数据划分为 R个切片,通过所述通信接 口将 R个所述切片分布到划分的所述子资源池中,所述需要存储的数据期望 生成的副本数量小于 N, R > 2; The processor is configured to divide the data that needs to be stored into R slices, and distribute the R slices into the divided sub-resource pool through the communication interface. The data that needs to be stored is expected to generate a copy. The quantity is less than N, R > 2;
所述处理器, 还用于对分布到每个子资源池中的每个所述切片生成副 本切片, 并将所述副本切片存储在对应所述切片所属的子资源池中, 所述 副本切片与数据相同的所述切片相互对应。 The processor is also configured to generate a copy slice for each of the slices distributed in each sub-resource pool, and store the copy slice in the sub-resource pool to which the corresponding slice belongs, where the copy slice is The slices with the same data correspond to each other.
14、 根据权利要求 13所述的储存数据的存储系统, 其特征在于, 包括: 所述处理器, 还用于将所述副本切片存储到对应所述切片所属的子资 源池中的存储设备上, 且每个所述副本切片存储的存储设备与对应所述切 片存储的存储设备不同, 数据相同的副本切片存储在不同的存储设备上。 14. The storage system for storing data according to claim 13, characterized by comprising: the processor, further configured to store the copy slice on a storage device in the sub-resource pool to which the corresponding slice belongs. , and the storage device where each replica slice is stored is different from the storage device where the corresponding slice is stored, and replica slices with the same data are stored on different storage devices.
15、 根据权利要求 13或 14所述的储存数据的存储系统, 其特征在于, 所述处理器, 还用于将所述划分的子资源池再次划分为不同级别子资源池 集合, 每个子资源池集合中包括至少一个子资源池, 不同级别的子资源池 集合中每个所述切片的期望生成的副本切片数量不同; 15. The storage system for storing data according to claim 13 or 14, characterized in that the processor is further used to divide the divided sub-resource pool into sub-resource pool sets of different levels, each sub-resource The pool set includes at least one sub-resource pool, and the number of expected generated copy slices for each slice in sub-resource pool sets of different levels is different;
所述处理器, 还用于按照子资源池所属子资源池集合的级别所对应的 每个所述切片期望生成的副本切片数量, 将分布到子资源池中的每个所述 切片生成对应数量的副本切片。 The processor is further configured to generate a corresponding number of replica slices for each slice distributed to the sub-resource pool according to the number of copy slices expected to be generated for each slice corresponding to the level of the sub-resource pool set to which the sub-resource pool belongs. copy slice.
16、根据权利要求 13或 14所述的储存数据的存储系统,其特征在于, 所 述处理器, 还用于在将所述副本切片存储在对应所述切片所属的子资源池 中后, 针对任一个所述子资源池, 当减少所述子资源池中的存储设备的数 量时, 通过所述通信接口将所减少的存储设备中的所述切片分配到所述子 资源池中的其他存储设备上, 所述子资源池中的剩余的存储设备数量大于 所述期望生成的副本数。 16. The storage system for storing data according to claim 13 or 14, wherein the processor is further configured to: after storing the copy slice in the sub-resource pool to which the corresponding slice belongs, In any of the sub-resource pools, when the number of storage devices in the sub-resource pool is reduced, allocate the slices in the reduced storage devices to other storage in the sub-resource pool through the communication interface. On the device, the number of remaining storage devices in the sub-resource pool is greater than the number of copies expected to be generated.
17、 根据权利要求 13或 14所述的储存数据的存储系统, 其特征在于, 所述处理器, 还用于在将所述副本切片存储在对应所述切片所属的子资源 池中后, 针对任一个所述子资源池, 当增加所述子资源池中的存储设备的 数量时, 通过所述通信接口将该子资源池中的所述切片的副本切片重新分 配到该子资源池中的存储设备上。 17. The storage system for storing data according to claim 13 or 14, wherein the processor is further configured to: after storing the copy slice in the sub-resource pool to which the corresponding slice belongs, In any of the sub-resource pools, when the number of storage devices in the sub-resource pool is increased, the copy slices of the slices in the sub-resource pool are reallocated to the sub-resource pool through the communication interface. on the storage device.
18、 根据权利要求 15所述的储存数据的存储系统, 其特征在于, 所述 处理器, 还用于根据 R个切片中数据的重要程度, 将 R个切片分布到不同级 别的子资源池中。 18. The storage system for storing data according to claim 15, wherein the processor is further configured to distribute the R slices to sub-resource pools of different levels according to the importance of the data in the R slices. .
19、 一种修复数据的计算机程序产品, 用于存储系统, 所述存储系统 中包括用于存储数据的资源池, 其特征在于, 所述资源池被逻辑划分为至 少 2个子资源池, 每个子资源池中包括 N个相邻的存储设备, N > 2 , 所述计 算机程序产品包括存储了程序代码的计算机可读存储介质, 所述程序代码 包括的指令用于执行如权利要求 1-6任一所述的方法。 19. A computer program product for repairing data, used in a storage system. The storage system includes a resource pool for storing data, characterized in that the resource pool is logically divided into at least 2 sub-resource pools, each sub-resource pool. The resource pool includes N adjacent storage devices, N > 2, and the computer program product includes a computer-readable storage medium storing program code, and the program code includes instructions for executing any of claims 1-6. The method described in 1.
PCT/CN2012/087922 2012-12-28 2012-12-28 Data storage method and device WO2014101144A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2012/087922 WO2014101144A1 (en) 2012-12-28 2012-12-28 Data storage method and device
CN201280003656.8A CN103384550B (en) 2012-12-28 2012-12-28 The method of storage data and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/087922 WO2014101144A1 (en) 2012-12-28 2012-12-28 Data storage method and device

Publications (1)

Publication Number Publication Date
WO2014101144A1 true WO2014101144A1 (en) 2014-07-03

Family

ID=49492132

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087922 WO2014101144A1 (en) 2012-12-28 2012-12-28 Data storage method and device

Country Status (2)

Country Link
CN (1) CN103384550B (en)
WO (1) WO2014101144A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106416405A (en) * 2014-06-27 2017-02-15 夏普株式会社 Resource pool access for device to device communications
US10644955B2 (en) 2015-08-21 2020-05-05 Huawei Technologies Co., Ltd. Method and apparatus for network slicing
WO2017113280A1 (en) * 2015-12-31 2017-07-06 华为技术有限公司 Distributed storage system and metadata managing method
CN106792692B (en) * 2016-12-27 2019-11-05 兴唐通信科技有限公司 A kind of physics dicing method based on SDN technology
EP3595366B1 (en) 2017-03-28 2021-11-24 Huawei Technologies Co., Ltd. Network access method and terminal
CN108667867B (en) * 2017-03-29 2021-05-18 华为技术有限公司 Data storage method and device
CN110275669B (en) * 2018-03-15 2022-11-25 杭州海康威视数字技术股份有限公司 Data storage method and device and electronic equipment
CN110532271A (en) * 2019-08-30 2019-12-03 北京浪潮数据技术有限公司 Distributed storage method, control system and the device realized based on DHT algorithm
CN112181913B (en) * 2020-10-10 2021-05-07 上海威固信息技术股份有限公司 Block chain-based computer storage method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459597A (en) * 2007-12-14 2009-06-17 华为技术有限公司 Method and system for using logic resource
US20100040058A1 (en) * 2008-08-15 2010-02-18 Vmware, Inc. Systems and Methods of Configuring a Resource Pool as a Network End Point
CN102123167A (en) * 2010-12-31 2011-07-13 成都市华为赛门铁克科技有限公司 Distributed file system, and data storage processing method and data storage processing device thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5960169A (en) * 1997-02-27 1999-09-28 International Business Machines Corporation Transformational raid for hierarchical storage management system
CN102073560A (en) * 2011-01-17 2011-05-25 北京深思洛克软件技术股份有限公司 Data backup method and device
CN102843403A (en) * 2011-06-23 2012-12-26 盛大计算机(上海)有限公司 File processing method based on distributed file system, system, and client

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459597A (en) * 2007-12-14 2009-06-17 华为技术有限公司 Method and system for using logic resource
US20100040058A1 (en) * 2008-08-15 2010-02-18 Vmware, Inc. Systems and Methods of Configuring a Resource Pool as a Network End Point
CN102123167A (en) * 2010-12-31 2011-07-13 成都市华为赛门铁克科技有限公司 Distributed file system, and data storage processing method and data storage processing device thereof

Also Published As

Publication number Publication date
CN103384550A (en) 2013-11-06
CN103384550B (en) 2016-05-25

Similar Documents

Publication Publication Date Title
WO2014101144A1 (en) Data storage method and device
US11704066B2 (en) Heterogeneous erase blocks
US11210219B1 (en) Synchronously replicating a dataset across a plurality of storage systems
US11714708B2 (en) Intra-device redundancy scheme
US11520720B1 (en) Weighted resource allocation for workload scheduling
CN110413201B (en) Method, apparatus and computer program product for managing a storage system
US20180024964A1 (en) Disaggregated compute resources and storage resources in a storage system
US20170075741A1 (en) Prioritizing Data Reconstruction in Distributed Storage Systems
CN110023896A (en) The merged block in flash-memory storage system directly mapped
EP4137924A1 (en) Fragment management method and fragment management apparatus
CN110413203B (en) Method, apparatus and computer readable medium for managing a storage system
WO2018132212A1 (en) Garbage collection of data blocks in a storage system with direct-mapped storage devices
TW200901025A (en) Method and system for a self managing and scalable grid storage
JP2018508073A (en) Data removal, allocation and reconstruction
US11579790B1 (en) Servicing input/output (‘I/O’) operations during data migration
US11592985B2 (en) Mapping LUNs in a storage memory
CN105404565B (en) A kind of dual-active data guard method and device
US10592138B1 (en) Avoiding storage device overlap in raid extent sub group and keeping relationship balance on mapped raid system and method
JP6269530B2 (en) Storage system, storage method, and program
CN109814805B (en) Stripe reorganization method in storage system and stripe server
US9785372B2 (en) Storage device and method for configuring raid group
JP5723309B2 (en) Server and program
CN108733307B (en) Storage management method, apparatus and computer readable medium
CN113552998A (en) Method, apparatus and program product for managing stripes in a storage system
CN111045853A (en) Method and device for improving erasure code recovery speed and background server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12891011

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12891011

Country of ref document: EP

Kind code of ref document: A1