WO2016134571A1 - Raid-based storage method and storage apparatus - Google Patents

Raid-based storage method and storage apparatus Download PDF

Info

Publication number
WO2016134571A1
WO2016134571A1 PCT/CN2015/082392 CN2015082392W WO2016134571A1 WO 2016134571 A1 WO2016134571 A1 WO 2016134571A1 CN 2015082392 W CN2015082392 W CN 2015082392W WO 2016134571 A1 WO2016134571 A1 WO 2016134571A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
lun
storage
space
raid
Prior art date
Application number
PCT/CN2015/082392
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 中兴通讯股份有限公司
Publication of WO2016134571A1 publication Critical patent/WO2016134571A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • This document relates to the field of hard disk storage, and in particular to a RAID-based storage method and storage device.
  • the RAID (Redundant Array of Independent Disk) technology was born in 1987 and was proposed by the University of California, Berkeley. The original purpose of the development was to replace the large expensive hard disk with a small and expensive hard disk to reduce the cost of large-scale data storage. At the same time, it also hopes to use redundant information, so that the access to the data will not be lost when the hard disk fails. In order to develop a certain level of data protection technology, and can appropriately increase the data transmission speed. In RAID technology, by placing the same data on multiple hard disks, input and output operations can be balanced in a balanced manner, improving performance, and increasing the mean time between failures due to the use of multiple hard disks. Due to the redundant storage of data, when any one of the hard disks in the array fails, the data in the failed disk can be reconstructed through the data of other hard disks in the storage array.
  • FIG. 1 is a schematic diagram of a conventional RAID storage in the related art
  • a hard disk is regarded as a basic unit
  • a RAID group is created by using multiple hard disks (at least two), as shown in FIG. 1 .
  • four hard disks form a RAID group according to the RAID3+1 policy
  • the volume VOL is created by performing space allocation on the basis of the RAID group, thereby obtaining a user LUN (Logical Unit Number) space according to the VOL.
  • the LUN space is user-oriented and is allocated to the user for use according to the user's data storage requirements.
  • the data in the reconstruction process is not guaranteed. If a bad disk occurs before the reconstruction is completed, the data will be lost and cannot be recovered. Therefore, for a storage system, the most important sign of its reliability is that the smaller the RAID reconstruction time, the better, thus reducing the probability of bad disk before the reconstruction is completed.
  • traditional RAID technology has been unable to meet the requirements of using large-capacity hard disks in the system.
  • block virtualization storage has been developed based on traditional RAID technology. The block virtualization storage method integrates the functions of data protection and data distribution across hard disks, and fully meets the storage application requirements in the virtual machine environment.
  • FIG. 2 is a schematic diagram of a block virtualization storage mode.
  • the hard disk is broken into blocks of several sizes, and then these small blocks are aggregated into a large resource pool POOL.
  • the creation of the user LUN is to allocate space in this large POOL.
  • the block virtualization storage mode has excellent performances such as hierarchical storage, deduplication, and fast reconstruction.
  • most vendors usually perform the replacement process in two ways: one way is to perform hardware upgrades, such as purchasing new hardware supporting the block virtualization function, and then upgrading.
  • hardware upgrades such as purchasing new hardware supporting the block virtualization function
  • upgrading To perform data migration between storage arrays, you need to migrate the service data of the original RAID to a new device and then reconfigure it, and finally relocate its services to the new storage array. The other way is, the previous storage.
  • the array itself is an array device that supports both traditional RAID and virtualized POOL functions. Then, the virtualized POOL can be newly created in the original array, and the data on the original traditional RAID can be migrated to the new POOL through the data migration method in the array. This enables storage to migrate to new block virtualization.
  • Both of the above methods involve a problem: data migration, one is data migration between arrays, and the other is data migration within the array, both of which are reflected in long migration time and system reliability during migration.
  • the risk is reduced because the data disk failure may occur during the migration process, which leads to a decrease in system reliability.
  • the above two methods occupy a large amount of system resources during the migration process, thereby affecting system performance.
  • the embodiment of the present invention provides a storage method and a storage device based on a RAID, which are used to solve the problem of long migration time, large system resources, and system reliability caused by data migration in the update of the storage mode in the related art. problem.
  • the embodiment of the invention provides a RAID-based storage method, including:
  • the LUNs of the hard disk occupy the same physical space as the original LUNs in the traditional RAID storage hard disk.
  • the storage block is a storage block block, and the resource pool is a virtual disk VD space;
  • the obtaining the resource pool by using the storage block combination includes:
  • the LD space is combined into a VD space according to the RAID algorithm adopted by the hard disk according to the conventional RAID storage.
  • the mapping the block to the LD space includes: adding the LD space to the storage array, and adding the LD space to the hard disk according to the traditional RAID storage using the same RAID policy.
  • To the LD space when there is no LD space in the storage array and the same RAID policy is established for the hard disk according to the traditional RAID storage, a new LD space is established, and the block is mapped to the LD space. .
  • the method further includes: determining, according to the LUN identifier of the block, the LUN identifier of the small space Chunk in the VD.
  • the determining, according to the LUN identifier of the block, the LUN identifier of the small space Chunk in the VD includes:
  • the LUN identifier is used as the LUN identifier of the stripe strip corresponding to the block in the LD space.
  • the LUN identifier is used as the LUN identifier of the Chunk corresponding to the strip in the VD space according to the LUN identifier corresponding to the strip. .
  • the storage block is a logical block CK; and the obtaining the resource pool by using the storage block combination includes:
  • logical blocks CK from different hard disks are formed into a logical block group CKG;
  • the logical block group CKG is divided into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
  • the method further includes: determining, according to the LUN identifier of the logical block CK, a LUN identifier of the logical small block Extent in the resource pool.
  • the determining, according to the LUN identifier of the logical block CK, the LUN identifier of the logical small block Extent in the resource pool including:
  • the LUN identifier is used as the LUN identifier of the logical block group CKG corresponding to the CK according to the LUN identifier of the logical block CK.
  • the LUN identifier is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool according to the LUN identifier of the CKG.
  • the number of LUNs created by using the combined resource pool is the same as the number of original LUNs in the traditional RAID and the physical space occupied by each LUN.
  • the resource pool obtained by using the combination and the corresponding logical unit number LUN includes: all the resource blocks having the same LUN identifier are allocated to the same LUN according to the LUN identifier of the resource block in the resource pool, where the resource pool is VD In the case of space, the resource block is a Chunk, and when the resource pool is a collection of Extents, the resource block is an Extent.
  • the embodiment of the present invention further provides a storage device based on an independent redundant disk array RAID, wherein the RAID-based storage device is disposed on a storage array, and the storage device includes:
  • a storage block generating unit configured to divide the hard disk stored according to the traditional RAID into a plurality of storage blocks
  • a resource pool generating unit configured to obtain a resource pool by using the storage block combination
  • the LUN update unit is configured to use the resource pool obtained by the combination to establish a corresponding logical unit number LUN, wherein the LUN occupies the same physical space of the hard disk as the original LUN of the hard disk stored in the traditional RAID.
  • the storage block is a storage block block
  • the resource pool is a virtual disk VD space
  • the resource pool generating unit includes a VD generating unit
  • the VD generating unit includes:
  • the LD generation module is configured to map the block to the LD space according to the mapping relationship between the block and the logical hard disk LD;
  • the VD generating module is configured to combine the LD spaces into a VD space according to the RAID algorithm adopted by the hard disks stored according to the conventional RAID.
  • the LD generating module is configured to: when an LD space already exists in the storage array, and the LD space is established by using the same RAID policy as the hard disk according to the traditional RAID storage, Adding the block to the LD space; when there is no LD space in the storage array and the same RAID policy is established by using the traditional RAID storage hard disk, a new LD space is established, and the block is mapped. Go to the LD space.
  • the storage device further includes:
  • the first LUN identifier storage unit is configured to determine the LUN identifier of the small space Chunk in the VD according to the LUN identifier of the block.
  • the first LUN identifier storage unit is configured to: use the LUN identifier as a LUN identifier of a stripe strip corresponding to the block in the LD space according to the LUN identifier of the block; according to the LUN identifier corresponding to the strip, The LUN identifier is used as the LUN identifier of the Chunk corresponding to the Strip in the VD space.
  • the storage block is a logical block CK;
  • the resource pool generating unit includes:
  • the CKG generating module is configured to form the logical block CKG from the different hard disks according to the RAID algorithm adopted by the hard disk according to the traditional RAID storage;
  • the resource pool generating module is configured to divide the logical block group CKG into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
  • the storage device further includes:
  • the second LUN identifier storage unit is configured to determine the LUN identifier of the logical small block Extent in the resource pool according to the LUN identifier of the logical block CK.
  • the second LUN identifier storage unit is configured to: set the LUN identifier as a LUN identifier of a logical block group CKG corresponding to the CK according to the LUN identifier of the logic block CK; according to the LUN identifier of the CKG, The LUN identifier is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool.
  • the number of LUNs created by using the combined resource pool is the same as the number of original LUNs in the traditional RAID and the physical space occupied by each LUN.
  • the LUN update unit is further configured to: allocate resource blocks having the same LUN identifier to the same LUN according to the LUN identifier of the resource block in the resource pool, where the resource block is a Chunk when the resource pool is a VD space.
  • the resource block is an Extent.
  • the embodiment of the invention further provides a computer readable storage medium storing program instructions, which can be implemented when the program instructions are executed.
  • the hard disk stored in the traditional RAID storage in the storage array is divided into multiple storage blocks, and the storage blocks are added to the block virtualization based on the Raid algorithm and the block virtualization storage technology.
  • Storage method in the resource pool Use the newly added storage space in the resource pool to establish the corresponding LUN.
  • the hard disk space occupied by the newly created LUN is still the hard disk space occupied by the LUN in the original RAID.
  • the actual hard disk space is partitioned by the storage block, and the correspondence between the storage block and the resource block in the resource pool and the newly created LUN is increased, for example, The relationship between the BLOCK and the Strip, between the Strip and the Chunk, and between the Chunk and the LUN. Therefore, according to these newly established correspondences, the service data stored in the hard disk stored in the conventional RAID is not required to be data.
  • the storage method of the block virtualization in the entire column is implemented, and the RAID-based storage method provided by the embodiment of the present invention is provided by the hierarchical storage and the fast reconstruction which can be realized by the virtualized storage mode.
  • the update of the block virtualization storage mode is realized, and the traditional RAID data can be directly converted into a storage capable of supporting the virtualized functional data, and the conversion process is updated with respect to the traditional data migration.
  • the time taken by the method can be considered to be completed in an instant, thereby improving the entire system in which the storage array is located. Reliability and ease of use.
  • FIG. 1 is a schematic diagram of a conventional RAID storage in the related art
  • FIG. 2 is a schematic diagram of the principle of a block virtualization storage method
  • FIG. 3 is a schematic flowchart of a RAID-based storage method according to an embodiment of the present disclosure
  • FIGS. 4A and 4B are schematic diagrams of a RAID-based storage method according to an embodiment of the present invention, in which a part of a hard disk is stored and updated according to a conventional RAID mode, and all hard disks are stored in a block virtualization manner;
  • FIG. 5 is a schematic structural diagram of a RAID-based storage device according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a RAID-based storage method according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
  • Step S10 dividing the hard disk stored according to the traditional RAID into a plurality of storage blocks
  • the traditional RAID storage described in this document refers to the way that the RAID is created according to a single physical disk.
  • the virtualized storage in this document refers to the RAID created by creating a RAID according to a granularity.
  • the granularity refers to a continuous segment in the physical disk. space.
  • Step S20 using the storage block combination to obtain a resource pool
  • step S30 the resource pool of the combination is used to establish a corresponding logical unit number LUN, wherein the LUN occupies the same hard disk physical space as the original LUN of the hard disk stored in the traditional RAID.
  • the RAID-based storage method provided by the embodiment of the present invention is described based on the following block virtualization storage technology.
  • the following describes an exemplary block virtualization storage technology, which is a block composed of N hard disks. Virtualization arrays are introduced, including:
  • mapping to the LD space wherein the smallest unit of the LD space is a stripe strip.
  • the mapping between Block and Strip will be established.
  • the virtual disk VD space is combined, wherein the smallest unit in the VD space is a small space Chunk, and the collection of all Chunk is a resource pool POOL.
  • the VD space can be obtained according to different RAID policies.
  • the first VD space and the second VD space are respectively established based on the LD space, where the first VD space is obtained according to the RAID 3+1 policy combination.
  • the second VD space is obtained by combining the RAID 2+1 policies.
  • the LD space in which the first VD space is combined is referred to as a first LD space
  • the LD space in which the second VD space is combined is referred to as a second LD space
  • the first LD space is classified as RAID 3
  • the +1 strategy is combined into a first VD space
  • the second LD space is combined into a second VD space according to a RAID 2+1 policy.
  • Chunk For the entire POOL, some of the Chunk are based on the RAID 3+1 strategy, and some Chunk are based on the RAID 2+1 strategy.
  • the Chunk in the POOL is assigned to each LUN according to the second mapping relationship (for example, a discrete algorithm).
  • the mapping relationship between the Chunk and the LUN is established.
  • the storage array software does not distinguish between different VD spaces when a LUN is created according to the VD space. That is, a Chunk according to different RAID policies may be allocated to the same LUN.
  • LUNs there are two types.
  • the storage array software allocates a physical space for the LUN.
  • the other LUNs cannot occupy the physical space.
  • the storage array software allocates a small amount of physical space to the LUN, and then allocates real physical space to the LUN as the actual data storage needs.
  • the LUN can be created according to the actual physical space occupied by the original LUN of the conventional RAID, and the LUN is created according to the VD and the original LUN.
  • the actual physical address is the same.
  • a RAID-based storage method provided by an embodiment of the present invention includes:
  • Step S110 dividing the hard disk according to the traditional RAID storage into a plurality of storage blocks Block;
  • Step S120 using the block combination to obtain a corresponding virtual hard disk VD space based on the Raid algorithm and the block virtualization storage technology
  • steps S110 and S120 correspond to step S10 and step S20, respectively.
  • step S120 includes:
  • Step S1210 Map the Block to the LD space according to the mapping relationship between the Block and the logical hard disk LD.
  • the basic unit in the LD space is Strip.
  • the mapping relationship between Block and Strip will be established.
  • the mapping of the block to the LD space includes: case 1: when the LD space already exists in the storage array, and the LD space is established by using the same RAID policy as the hard disk stored according to the traditional RAID, adding the block to the The LD space; Case 2: when there is no LD space in the storage array and the same RAID policy is established by using the traditional RAID storage hard disk, a new LD space is established, and the block is mapped to the LD space.
  • the RAID policy in the embodiment of the present invention refers to establishing a RAID storage array by using different RAID algorithms.
  • the RAID policy may be a RAID 3+1 policy or a RAID 2+1 policy.
  • a RAID policy can also refer to the establishment of RAID storage arrays using different RAID standards, such as RAID6, RAID10, and so on.
  • step S1220 the LD space is combined into a virtual hard disk VD space according to a RAID algorithm.
  • the RAID algorithm is the same as the RAID algorithm used by the hard disk according to the conventional RAID storage, that is, the LD space is used.
  • the RAID policy adopted when combining VD space is the same as the RAID policy adopted by the hard disk according to the conventional RAID storage.
  • the VD space is the resource pool POOL.
  • the Chunk is allocated to the corresponding LUN in the smallest unit.
  • the newly added LD creates a newly added Chunk according to the RAID algorithm, and adds the newly added Chunk to the resource pool POOL; if it is case 2, the newly created LD corresponds to the Chunk to be added to Resource pool POOL.
  • the Chunk in the resource pool POOL may be generated based on different Raids. According to the system settings, Chunks established according to different RAID policies may be assigned to the same LUN.
  • Step S130 using the newly added VD in the resource pool to establish a corresponding LUN.
  • the LUN occupies the same physical space of the hard disk as the original LUN in the hard disk stored in the traditional RAID.
  • Step S130 corresponds to step S30.
  • the storage array software establishes a mapping table between the VD and the LUN, that is, establishes the correspondence between the Chunk and the LUN in the VD.
  • the number of LUNs established by using the newly added VD is the same as the number of LUNs established in the hard disk of the conventional RAID.
  • the storage space that belongs to the LUN is stored in the virtualized storage mode. It still belongs to the newly created corresponding LUN. For example, if two LUNs are set in the traditional RAID storage, the size is 10G and 20G respectively.
  • the number of LUNs created by using the newly added VD in the resource pool is also two.
  • the size of the hard disk space occupied by the two newly created LUNs is still the hard disk space occupied by the two LUNs in the original RAID storage.
  • the service data stored in the hard disk stored in the traditional RAID storage can realize the storage mode of the block virtualization in the entire column without requiring data migration, thereby providing virtualized storage.
  • Features such as hierarchical storage and fast reconstruction that can be achieved by the method.
  • the LUN identifier is used as the LUN identifier of the strip corresponding to the block in the LD space.
  • the LUN identifier is used as the LUN identifier of the Chunk corresponding to the strip in the VD space according to the LUN identifier corresponding to the strip.
  • the Chunk with the same LUN ID is assigned to the same LUN according to the LUN ID of the Chunk in the VD.
  • the newly created LUN is the same as the hard disk space occupied by the original LUN in the traditional RAID storage hard disk, which avoids the migration of service data and completes the corresponding block virtualization mode.
  • the establishment of the relationship is the same as the hard disk space occupied by the original LUN in the traditional RAID storage hard disk, which avoids the migration of service data and completes the corresponding block virtualization mode.
  • the original LUN corresponding to the hard disk of the traditional RAID is switched to the LUN corresponding to the VD.
  • the hard disk according to the traditional RAID storage can be converted into the storage mode according to the block virtualization, so that the original service data has the functions of hierarchical storage and rapid reconstruction without data migration.
  • the function of the tiered storage means that the storage software migrates data with high access frequency, that is, hotspot data, to a hard disk space with better read/write performance according to the frequency of access of the service data in the hard disk.
  • the hard disk in the entire column can be stored. It includes one or more of SSD (High Performance Layer), SAS (Performance Layer) or NL-SAS (Capacity Layer), in which SSD has better read and write performance.
  • SSD High Performance Layer
  • SAS Performance Layer
  • NL-SAS Capacity Layer
  • the original stored service data is in a new storage mode, and the hotspot data can be migrated to other hard disks, thereby making the original service.
  • the data has the function of tiered storage.
  • the storage method of block virtualization also has the advantage of rapid reconfiguration.
  • the hard disk according to the traditional RAID storage if one of the hard disks fails, the fault disk needs to be replaced, and data reconstruction is performed in the process of data reconstruction.
  • the data in the newly replaced hard disk needs to be rewritten according to the data in the other hard disks in the RAID group.
  • the RAID group refers to a group of hard disks stored according to the RAID, for example, according to the RAID 3+1 policy.
  • a block hard disk can be called a RAID group.
  • data reconstruction data needs to be read from three hard disks and data is written to one disk. After the block is virtualized, the RAID groups are actually distributed.
  • the RAID-based storage method in the embodiment of the present invention may be applied to, but not limited to, the following storage arrays: some hard disks in the storage array are stored according to a conventional RAID mode, and some hard disks are stored in a block virtualization manner, and are in the storage array. Some areas of the storage have been stored with business data; all the hard disks in the storage array are stored in the traditional RAID mode, and some of the storage arrays are empty. Business data is already stored.
  • the storage mode may be converted by using the RAID-based storage method provided by the embodiment of the present invention.
  • the RAID-based storage method provided by the embodiment of the present invention is described below in conjunction with another block virtualization mode.
  • logical blocks CK from different hard disks are grouped into logical block groups CKG in a RAID mode (such as RAID5, RAID6);
  • the logical block group CKG is divided into a fine-grained logical small block Extent, and the set of the Extent is a resource pool.
  • the size of the logical small block Extent may be 512K to 64MB, for example, it may be configured as 4MB as needed.
  • the logical small block Extent constitutes the resource pool POOL, and the logical small block Extent is the basic unit when the user space is allocated.
  • the logical small block Extent in the resource pool can be allocated to the corresponding LUN.
  • a RAID-based storage method provided by an embodiment of the present invention includes:
  • step S210 the hard disk stored according to the conventional RAID is divided into a plurality of logical blocks CK.
  • Step S220 using the Raid algorithm and the block virtualization storage technology, using the resource pool composed of the Extent obtained by the CK combination;
  • steps S210 and S220 correspond to step S10 and step S20, respectively.
  • Step S220 includes:
  • Step S2210 The logical blocks CK from different hard disks are formed into a logical block group CKG according to the RAID algorithm adopted by the hard disks stored in the conventional RAID. In the above process, the correspondence between Ck and CKG will be established.
  • Step S2220 cutting the logical block group CKG into a finer-grained logical block Extent,
  • the set of Extent is the resource pool.
  • the Extent in the resource pool is allocated to the corresponding LUN.
  • the obtaining the resource pool by using the storage block combination further includes: determining, according to the LUN identifier of the logical block CK, the LUN identifier of the logical small block Extent in the resource pool;
  • the LUN identifier is used as the LUN identifier of the logical block group CKG corresponding to the CK according to the LUN identifier of the logical block CK.
  • the LUN identifier is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool according to the LUN identifier of the CKG.
  • step S230 (corresponding to step S30), the corresponding LUN is established by using the newly added Extent in the resource pool.
  • some of the hard disks in the storage array are stored in the traditional RAID mode. Some of the hard disks are stored in a virtualized manner. According to the service requirements, all the disks in the storage array need to be stored in a virtualized manner.
  • a portion of a hard disk is stored and updated according to a conventional RAID mode, and the entire hard disk is stored in a block virtualization manner, as shown in FIG. 4A.
  • the original part of the storage array is based on the traditional Raid part based on the block virtualization.
  • the storage array includes 9 hard disks and D is the hard disk label.
  • the 4 hard disks D1 to D4 are stored in the traditional RAID mode.
  • the five hard disks of D9 are stored in block virtualization mode; as shown in the external part of the dotted line frame, a block virtualized array consisting of five hard disks, wherein (1) D5 to D9 are divided into five hard disks. Blocks; (2) for these blocks, according to the first mapping relationship (discrete algorithm), mapped to the LD space, (3) based on the LD space, respectively establish a first VD space and a second VD space, wherein the second VD The space is obtained by combining the RAID 3+1 policies. The first VD space is obtained according to the RAID 2+1 policy combination. For the convenience of description, the LD space that combines the first VD space is called the first LD space.
  • the LD space that combines to obtain the second VD space is called the second LD space, that is, the three columns on the right side of the figure, that is, the first LD space is in accordance with the RAID 3+1 strategy.
  • the combination is a first VD space
  • the second LD space is combined into a second VD space according to a RAID 2+1 policy.
  • the first VD space and the second VD space are allocated to each LUN according to the second mapping relationship, respectively.
  • the second mapping relationship may also be a discrete algorithm.
  • the storage array has been set up in the above manner. And some of the four hard disks stored in the traditional RAID mode have been used to store business data.
  • the storage array is updated to be stored in a block virtualization manner, wherein:
  • Step S11 The hard disk stored in the traditional RAID mode is divided into multiple blocks. That is, four hard disks stored based on the traditional RAID mode are divided into multiple storage blocks;
  • step S12 the block is added to the corresponding LD space according to the first mapping relationship between the block and the logical hard disk LD.
  • the first LD space is The LD space corresponding to the storage block is the first LD space, that is, the block corresponding to the block is added to the first LD space.
  • Step S13 Combine the new first LD space into a new first VD space according to the RAID algorithm; as shown in FIG. 4B, the new VD space becomes larger than the original VD space, wherein the outside of the dotted line The VD space is the original VD space, and the VD space in the dotted frame is the newly added VD space;
  • Step S14 Mapping the new first VD space to the LUN according to the mapping relationship between the VD space and the storage volume LUN;
  • the new LUN is replaced with the corresponding LUN in the traditional Raid.
  • the size of the new LUN is unchanged from the original LUN, and the new LUN is actually pointed to the original LUN.
  • the same hard disk space, but the new LUN is built on the basis of block virtualization, so it has hierarchical storage and fast reconfiguration.
  • the previous business data is still stored in In the new LUN, as the service is updated and expanded, data on the new LUN is continuously migrated to achieve data dispersion throughout the pool, thereby improving the reliability requirements and reconstruction speed of the entire system.
  • all the hard disks in the storage array are stored in the traditional RAID mode. According to the service requirements, all the hard disks in the storage array need to be stored in a virtualized manner.
  • the storage array includes four hard disks, and four hard disks are stored in the traditional RAID mode. Among them, four hard disks are stored based on the RAID 3+1 policy.
  • the RAID-based storage method of the embodiment of the present invention is described below in conjunction with the foregoing scenarios. among them:
  • Step S21 dividing four hard disks stored in the traditional RAID mode into multiple blocks
  • Step S22 Add a Block to the LD space according to a first mapping relationship between the Block and the logical hard disk LD.
  • Step S23 combining the foregoing LD spaces into a VD space according to a RAID algorithm
  • Step S24 Map the VD space to each LUN according to the mapping relationship between the VD space and the storage volume LUN.
  • FIG. 5 is a schematic structural diagram of a RAID-based storage device according to an embodiment of the present invention. As shown in FIG. 5, the storage device includes:
  • the storage block generating unit 10 is configured to divide the hard disk stored according to the conventional RAID into a plurality of storage blocks.
  • a resource pool generating unit 20 configured to obtain a resource pool by using the storage block combination based on an algorithm Raid and a block virtualization storage manner;
  • the LUN update unit 30 is configured to use the resource pool obtained by the combination to establish a corresponding logical unit number LUN, wherein the LUN occupies the same hard disk physical space as the original LUN in the traditional RAID storage hard disk.
  • the storage block is a storage block block
  • the resource pool is a VD space
  • the resource pool generating unit 20 includes a VD generating unit, and the method includes:
  • the LD generating module 21 is configured to map the block to the LD space according to the mapping relationship between the block and the logical hard disk LD;
  • the VD generating module 22 is configured to combine the LD space into a virtual hard disk VD space according to a RAID algorithm; wherein the RAID algorithm is the same as the RAID algorithm adopted by the hard disk according to the conventional RAID storage.
  • the LD generating module 21 is configured to: when the LD space already exists in the storage array, and the LD space is established by using the same RAID policy as the hard disk stored according to the traditional RAID, add the block to the LD space; when there is no LD space in the storage array and the same RAID policy is established by the hard disk of the traditional RAID storage, a new LD space is established, and the block is mapped to the LD space.
  • the storage device further includes:
  • the first LUN identifier storage unit 40 is configured to determine a LUN identifier of the Chunk in the VD according to the LUN identifier of the block;
  • the LUN identifier storage unit 40 is configured to: use the LUN identifier as the LUN identifier of the strip corresponding to the block in the LD space according to the LUN identifier of the block; and use the LUN according to the LUN identifier corresponding to the strip. Identifies the LUN ID of the Chunk that corresponds to the Strip in the VD space.
  • the number of LUNs established by using the VDs obtained by the combination is the same as the number of LUNs established by the hard disks stored in the conventional RAID.
  • the LUN update unit 30 is further configured to: according to the LUN identifier of the Chunk in the VD. , the Chunk with the same LUN ID is assigned to the same LUN.
  • the resource pool generating unit 20 when the storage block is a logical block CK, the resource pool generating unit 20 includes:
  • the CKG generating module 26 is configured to form the logical block CKG from the different hard disks according to the RAID algorithm adopted by the hard disk according to the traditional RAID storage;
  • the resource pool generating module 27 is configured to divide the logical block group CKG into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
  • the storage device further includes: a second LUN identifier storage unit, configured to determine a LUN identifier of the logical small block Extent in the resource pool according to the LUN identifier of the logical block CK;
  • the second LUN identifier storage unit is configured to: set the LUN identifier as a LUN identifier of the logical block group CKG corresponding to the CK according to the LUN identifier of the logical block CK; and use the LUN according to the LUN identifier of the CKG Identifies the LUN ID of the Extent that corresponds to the CKG in the resource pool.
  • the LUNs created by using the combined resource pool are the same as the number of original LUNs in the hard disk and the physical space occupied by each LUN.
  • the LUN update unit 30 is also configured to All the resource blocks with the same LUN identifier are allocated to the same LUN according to the LUN identifier of the resource block in the resource pool.
  • the resource pool is a VD space
  • the resource block is a Chunk
  • the resource pool is an Extent set.
  • the resource block is an Extent.
  • the RAID-based storage method provided by the embodiment of the present invention implements the update of the block virtualized storage mode without data migration, and realizes that the traditional RAID data can be directly converted into a storage capable of supporting the virtualized functional data. This improves the reliability and ease of use of the entire system in which the storage array resides.

Abstract

A redundant array of independent disk (RAID)-based storage method and apparatus. The method comprises: dividing a hard disk stored according to traditional RAID into a plurality of storage blocks; combining the storage blocks to obtain a resource pool; and using the resource pool obtained through the combination to establish a corresponding logical unit number (LUN), wherein the LUN and an original LUN in the hard disk stored according to traditional RAID occupy the same hard disk physical space.

Description

一种基于RAID的存储方法和存储装置RAID-based storage method and storage device 技术领域Technical field
本文涉及硬盘存储领域,尤其涉及一种基于RAID的存储方法和存储装置。This document relates to the field of hard disk storage, and in particular to a RAID-based storage method and storage device.
背景技术Background technique
RAID(Redundant Array of Independent Disk,独立冗余磁盘阵列)技术诞生于1987年,由美国加州大学伯克利分校提出。最初的研制目的是为了组合小的廉价硬盘来代替大的昂贵硬盘,以降低大批量数据存储的费用,同时也希望采用冗余信息的方式,使得硬盘失效时不会使对数据的访问受损失,从而开发出一定水平的数据保护技术,并且能适当的提升数据传输速度。在RAID技术中,通过把相同的数据放在多个硬盘上,输入输出操作能以平衡的方式交叠,改良性能,并且因为使用多个硬盘也增加了平均故障间隔时间。由于数据的冗余存储,当阵列中的任一个硬盘出现故障时,可以通过存储阵列中其他硬盘的数据,对故障盘中的数据进行重构。The RAID (Redundant Array of Independent Disk) technology was born in 1987 and was proposed by the University of California, Berkeley. The original purpose of the development was to replace the large expensive hard disk with a small and expensive hard disk to reduce the cost of large-scale data storage. At the same time, it also hopes to use redundant information, so that the access to the data will not be lost when the hard disk fails. In order to develop a certain level of data protection technology, and can appropriately increase the data transmission speed. In RAID technology, by placing the same data on multiple hard disks, input and output operations can be balanced in a balanced manner, improving performance, and increasing the mean time between failures due to the use of multiple hard disks. Due to the redundant storage of data, when any one of the hard disks in the array fails, the data in the failed disk can be reconstructed through the data of other hard disks in the storage array.
请参阅图1,为相关技术中传统RAID存储的示意图,如图1所示,传统RAID方式中,将硬盘看作为基本单位,通过多个硬盘(至少两个)创建RAID组,如图1所示,其中4个硬盘按照RAID3+1策略组成RAID组,然后卷VOL的创建是在RAID组的基础上进行空间分配,从而根据VOL得到用户LUN(Logical Unit Number,逻辑单元号)空间。LUN空间是面向用户的,根据用户的数据存储需求,由系统分配给用户使用。Referring to FIG. 1 , which is a schematic diagram of a conventional RAID storage in the related art, as shown in FIG. 1 , in a conventional RAID mode, a hard disk is regarded as a basic unit, and a RAID group is created by using multiple hard disks (at least two), as shown in FIG. 1 . It is shown that four hard disks form a RAID group according to the RAID3+1 policy, and then the volume VOL is created by performing space allocation on the basis of the RAID group, thereby obtaining a user LUN (Logical Unit Number) space according to the VOL. The LUN space is user-oriented and is allocated to the user for use according to the user's data storage requirements.
对于传统RAID系统而言,重构过程中数据没有可靠性保障,如果在重构完成前出现坏盘就将造成数据丢失,且不可恢复。所以对于一个存储系统而言,其可靠性的最重要标志就是其RAID重构时间越小越好,从而降低重构完成前再次坏盘的概率。随着存储技术的发展,传统RAID技术已无法满足在系统中使用大容量硬盘的要求。在过去的几年里,基于传统RAID技术开发了块虚拟化存储方式,块虚拟化存储方式整合了数据保护和跨硬盘规划数据分布的功能,而且充分满足虚拟机环境下对存储的应用需求。 For the traditional RAID system, the data in the reconstruction process is not guaranteed. If a bad disk occurs before the reconstruction is completed, the data will be lost and cannot be recovered. Therefore, for a storage system, the most important sign of its reliability is that the smaller the RAID reconstruction time, the better, thus reducing the probability of bad disk before the reconstruction is completed. With the development of storage technology, traditional RAID technology has been unable to meet the requirements of using large-capacity hard disks in the system. In the past few years, block virtualization storage has been developed based on traditional RAID technology. The block virtualization storage method integrates the functions of data protection and data distribution across hard disks, and fully meets the storage application requirements in the virtual machine environment.
请参阅图2,为块虚拟化存储方式的原理示意图,如图2所示,块虚拟化的方式中,将硬盘打散成若干大小的块,再将这些小块聚合成大的资源池POOL,用户LUN的创建是在这个大的POOL中进行空间分配。Please refer to FIG. 2 , which is a schematic diagram of a block virtualization storage mode. As shown in FIG. 2 , in the block virtualization mode, the hard disk is broken into blocks of several sizes, and then these small blocks are aggregated into a large resource pool POOL. The creation of the user LUN is to allocate space in this large POOL.
对于用户来说,随着用户业务场景的变化,之前部署在传统RAID上的业务不能满足性能、功能需求,需要将其业务切换至能够支持块虚拟化功能的阵列上,相对于传统RAID技术,块虚拟化存储方式具有分级存储、重删、快速重构等优良性能。为了实现传统RAID向块虚拟化存储方式的更换,一般大多数厂商通过两种方式进行更换过程:一种方式是,需要进行硬件升级,比如购买新的支持块虚拟化功能的硬件,升级后再进行存储阵列间的数据迁移,需要将原有的RAID上的业务数据迁移新的设备后再进行重新配置,最终将其业务重新迁至新的存储阵列上;另外一种方式是,之前的存储阵列本身是同时支持传统RAID和虚拟化POOL功能的阵列设备,那么可以直接在原有的阵列内新建虚拟化POOL,将原有传统RAID上的数据通过阵列内数据迁移的方法迁移至新POOL上,从而实现将业务迁移至新的块虚拟化的存储方式。For the user, the service deployed on the traditional RAID cannot meet the performance and function requirements, and the service needs to be switched to the array capable of supporting the block virtualization function. Compared with the traditional RAID technology, The block virtualization storage mode has excellent performances such as hierarchical storage, deduplication, and fast reconstruction. In order to replace the traditional RAID-to-block virtualized storage mode, most vendors usually perform the replacement process in two ways: one way is to perform hardware upgrades, such as purchasing new hardware supporting the block virtualization function, and then upgrading. To perform data migration between storage arrays, you need to migrate the service data of the original RAID to a new device and then reconfigure it, and finally relocate its services to the new storage array. The other way is, the previous storage. The array itself is an array device that supports both traditional RAID and virtualized POOL functions. Then, the virtualized POOL can be newly created in the original array, and the data on the original traditional RAID can be migrated to the new POOL through the data migration method in the array. This enables storage to migrate to new block virtualization.
以上两种方式都涉及到一个问题:数据迁移,一种是阵列间的数据迁移,一种是阵列内的数据迁移,这两种方式都会体现在迁移时间长,且在迁移过程中系统可靠性降低的风险,因为迁移过程中可能存在数据盘故障的情况从而导致系统可靠性降低,同时上述两种方式在迁移的过程中都会占用大量的系统资源,从而影响到系统性能。Both of the above methods involve a problem: data migration, one is data migration between arrays, and the other is data migration within the array, both of which are reflected in long migration time and system reliability during migration. The risk is reduced because the data disk failure may occur during the migration process, which leads to a decrease in system reliability. At the same time, the above two methods occupy a large amount of system resources during the migration process, thereby affecting system performance.
发明内容Summary of the invention
本发明实施例提供一种基于RAID的存储方法和存储装置,用于解决相关技术中在存储方式的更新中由于数据迁移所带来的迁移时间长、占用大量系统资源、以及降低系统可靠性的问题。The embodiment of the present invention provides a storage method and a storage device based on a RAID, which are used to solve the problem of long migration time, large system resources, and system reliability caused by data migration in the update of the storage mode in the related art. problem.
本发明实施例提供了一种基于RAID的存储方法,包括:The embodiment of the invention provides a RAID-based storage method, including:
将按照传统RAID存储的硬盘划分为多个存储块;Dividing a hard disk according to a conventional RAID storage into a plurality of storage blocks;
利用所述存储块组合得到资源池; Obtaining a resource pool by using the storage block combination;
利用组合得到的资源池,建立对应的逻辑单元号LUN,其中,所述LUN与所述按照传统RAID存储的硬盘中原有的LUN占用相同的硬盘物理空间。The LUNs of the hard disk occupy the same physical space as the original LUNs in the traditional RAID storage hard disk.
可选地,所述存储块为存储小块Block,所述资源池为虚拟磁盘VD空间;Optionally, the storage block is a storage block block, and the resource pool is a virtual disk VD space;
所述利用所述存储块组合得到资源池包括:The obtaining the resource pool by using the storage block combination includes:
根据Block与逻辑硬盘LD之间的映射关系,将Block映射到LD空间;Mapping the block to the LD space according to the mapping relationship between the block and the logical hard disk LD;
根据所述按照传统RAID存储的硬盘所采用的RAID算法,将所述LD空间组合为VD空间。The LD space is combined into a VD space according to the RAID algorithm adopted by the hard disk according to the conventional RAID storage.
可选地,所述将Block映射到LD空间包括:当存储阵列中已经存在LD空间,且所述LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立时,将所述Block添加到所述LD空间;当存储阵列中还没有LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立的情况时,建立新的LD空间,并将所述Block映射到所述LD空间。Optionally, the mapping the block to the LD space includes: adding the LD space to the storage array, and adding the LD space to the hard disk according to the traditional RAID storage using the same RAID policy. To the LD space; when there is no LD space in the storage array and the same RAID policy is established for the hard disk according to the traditional RAID storage, a new LD space is established, and the block is mapped to the LD space. .
可选地,所述方法还包括:根据Block的LUN标识,确定VD中小空间Chunk的LUN标识。Optionally, the method further includes: determining, according to the LUN identifier of the block, the LUN identifier of the small space Chunk in the VD.
可选地,所述根据Block的LUN标识,确定VD中小空间Chunk的LUN标识包括:Optionally, the determining, according to the LUN identifier of the block, the LUN identifier of the small space Chunk in the VD includes:
根据Block的LUN标识,将所述LUN标识作为LD空间中与Block对应的条带Strip的LUN标识;根据Strip对应的LUN标识,将所述LUN标识作为VD空间中与Strip对应的Chunk的LUN标识。According to the LUN identifier of the block, the LUN identifier is used as the LUN identifier of the stripe strip corresponding to the block in the LD space. The LUN identifier is used as the LUN identifier of the Chunk corresponding to the strip in the VD space according to the LUN identifier corresponding to the strip. .
可选地,所述存储块为逻辑块CK;所述利用所述存储块组合得到资源池包括:Optionally, the storage block is a logical block CK; and the obtaining the resource pool by using the storage block combination includes:
根据所述按照传统RAID存储的硬盘所采用的RAID算法,将来自不同硬盘上的逻辑块CK组成逻辑块组CKG;According to the RAID algorithm adopted by the hard disk according to the traditional RAID storage, logical blocks CK from different hard disks are formed into a logical block group CKG;
将逻辑块组CKG切分成更细粒度的逻辑小块Extent,所述Extent的集合即为所述资源池。The logical block group CKG is divided into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
可选地,所述方法还包括:根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识。 Optionally, the method further includes: determining, according to the LUN identifier of the logical block CK, a LUN identifier of the logical small block Extent in the resource pool.
可选地,所述根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识,包括:Optionally, the determining, according to the LUN identifier of the logical block CK, the LUN identifier of the logical small block Extent in the resource pool, including:
根据逻辑块CK的LUN标识,将所述LUN标识作为与CK对应的逻辑块组CKG的LUN标识;根据CKG的LUN标识,将所述LUN标识作为资源池中与CKG对应的Extent的LUN标识。The LUN identifier is used as the LUN identifier of the logical block group CKG corresponding to the CK according to the LUN identifier of the logical block CK. The LUN identifier is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool according to the LUN identifier of the CKG.
可选地,利用组合得到的资源池所建立的LUN与按照传统RAID存储的硬盘中原有的LUN的个数以及每个LUN对应占用的物理空间相同;Optionally, the number of LUNs created by using the combined resource pool is the same as the number of original LUNs in the traditional RAID and the physical space occupied by each LUN.
所述利用组合得到的资源池,建立对应的逻辑单元号LUN包括:根据资源池中资源块的LUN标识,将具有相同LUN标识的资源块分配至相同的LUN中,其中,当资源池为VD空间时,所述资源块为Chunk,当资源池为Extent的集合时,所述资源块为Extent。The resource pool obtained by using the combination and the corresponding logical unit number LUN includes: all the resource blocks having the same LUN identifier are allocated to the same LUN according to the LUN identifier of the resource block in the resource pool, where the resource pool is VD In the case of space, the resource block is a Chunk, and when the resource pool is a collection of Extents, the resource block is an Extent.
本发明实施例还提供了一种基于独立冗余磁盘阵列RAID的存储装置,所述基于RAID的存储装置设置在存储阵列上,所述存储装置包括:The embodiment of the present invention further provides a storage device based on an independent redundant disk array RAID, wherein the RAID-based storage device is disposed on a storage array, and the storage device includes:
存储块生成单元,设置为将按照传统RAID存储的硬盘划分为多个存储块;a storage block generating unit, configured to divide the hard disk stored according to the traditional RAID into a plurality of storage blocks;
资源池生成单元,设置为利用所述存储块组合得到资源池;以及a resource pool generating unit configured to obtain a resource pool by using the storage block combination;
LUN更新单元,设置为利用组合得到的资源池,建立对应的逻辑单元号LUN,其中,所述LUN与所述按照传统RAID存储的硬盘中原有的LUN占用相同的硬盘物理空间。The LUN update unit is configured to use the resource pool obtained by the combination to establish a corresponding logical unit number LUN, wherein the LUN occupies the same physical space of the hard disk as the original LUN of the hard disk stored in the traditional RAID.
可选地,所述存储块为存储小块Block,所述资源池为虚拟磁盘VD空间;所述资源池生成单元包括VD生成单元,所述VD生成单元包括:Optionally, the storage block is a storage block block, and the resource pool is a virtual disk VD space; the resource pool generating unit includes a VD generating unit, and the VD generating unit includes:
LD生成模块,设置为根据Block与逻辑硬盘LD之间的映射关系,将Block映射到LD空间;以及The LD generation module is configured to map the block to the LD space according to the mapping relationship between the block and the logical hard disk LD;
VD生成模块,设置为根据所述按照传统RAID存储的硬盘所采用的RAID算法,将所述LD空间组合为VD空间。The VD generating module is configured to combine the LD spaces into a VD space according to the RAID algorithm adopted by the hard disks stored according to the conventional RAID.
可选地,LD生成模块是设置为:当存储阵列中已经存在LD空间,且所述LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立时, 将所述Block添加到所述LD空间;当存储阵列中还没有LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立的情况时,建立新的LD空间,并将所述Block映射到所述LD空间。Optionally, the LD generating module is configured to: when an LD space already exists in the storage array, and the LD space is established by using the same RAID policy as the hard disk according to the traditional RAID storage, Adding the block to the LD space; when there is no LD space in the storage array and the same RAID policy is established by using the traditional RAID storage hard disk, a new LD space is established, and the block is mapped. Go to the LD space.
可选地,所述存储装置还包括:Optionally, the storage device further includes:
第一LUN标识存储单元,设置为根据Block的LUN标识,确定VD中小空间Chunk的LUN标识。The first LUN identifier storage unit is configured to determine the LUN identifier of the small space Chunk in the VD according to the LUN identifier of the block.
可选地,所述第一LUN标识存储单元是设置为:根据Block的LUN标识,将所述LUN标识作为LD空间中与Block对应的条带Strip的LUN标识;根据Strip对应的LUN标识,将所述LUN标识作为VD空间中与Strip对应的Chunk的LUN标识。Optionally, the first LUN identifier storage unit is configured to: use the LUN identifier as a LUN identifier of a stripe strip corresponding to the block in the LD space according to the LUN identifier of the block; according to the LUN identifier corresponding to the strip, The LUN identifier is used as the LUN identifier of the Chunk corresponding to the Strip in the VD space.
可选地,所述存储块为逻辑块CK;所述资源池生成单元包括:Optionally, the storage block is a logical block CK; the resource pool generating unit includes:
CKG生成模块,设置为根据所述按照传统RAID存储的硬盘所采用的RAID算法,将来自不同硬盘上的逻辑块CK组成逻辑块组CKG;以及The CKG generating module is configured to form the logical block CKG from the different hard disks according to the RAID algorithm adopted by the hard disk according to the traditional RAID storage; and
资源池生成模块,设置为将逻辑块组CKG切分成更细粒度的逻辑小块Extent,所述Extent的集合即为所述资源池。The resource pool generating module is configured to divide the logical block group CKG into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
可选地,所述存储装置还包括:Optionally, the storage device further includes:
第二LUN标识存储单元,设置为根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识。The second LUN identifier storage unit is configured to determine the LUN identifier of the logical small block Extent in the resource pool according to the LUN identifier of the logical block CK.
可选地,所述第二LUN标识存储单元是设置为:根据逻辑块CK的LUN标识,将所述LUN标识作为与CK对应的逻辑块组CKG的LUN标识;根据CKG的LUN标识,将所述LUN标识作为资源池中与CKG对应的Extent的LUN标识。Optionally, the second LUN identifier storage unit is configured to: set the LUN identifier as a LUN identifier of a logical block group CKG corresponding to the CK according to the LUN identifier of the logic block CK; according to the LUN identifier of the CKG, The LUN identifier is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool.
可选地,利用组合得到的资源池所建立的LUN与按照传统RAID存储的硬盘中原有的LUN的个数以及每个LUN对应占用的物理空间相同;Optionally, the number of LUNs created by using the combined resource pool is the same as the number of original LUNs in the traditional RAID and the physical space occupied by each LUN.
所述LUN更新单元还设置为:根据资源池中资源块的LUN标识,将具有相同LUN标识的资源块分配至相同的LUN中,其中,当资源池为VD空间时,所述资源块为Chunk,当资源池为Extent的集合时,所述资源块为Extent。 The LUN update unit is further configured to: allocate resource blocks having the same LUN identifier to the same LUN according to the LUN identifier of the resource block in the resource pool, where the resource block is a Chunk when the resource pool is a VD space. When the resource pool is a collection of Extents, the resource block is an Extent.
本发明实施例还提供一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现上述方法。The embodiment of the invention further provides a computer readable storage medium storing program instructions, which can be implemented when the program instructions are executed.
本发明实施例提供的基于RAID的存储方法中,将存储阵列中按照传统RAID存储的硬盘划分为多个存储块,并将这些存储块基于Raid算法和块虚拟化存储技术,添加到块虚拟化存储方式的资源池中。利用资源池中新增加的存储空间来建立对应的LUN,由于新建立的LUN实际占用的硬盘空间依然是原来按照传统RAID存储的硬盘中的LUN所占用的硬盘空间。只是,对于新建立的LUN,在实际硬盘空间以存储块方式进行划分基础上,增加了存储块与资源池中的资源块之间、以及与新建的LUN之间的对应关系,例如,增加了BLOCK与Strip之间,Strip与Chunk之间,以及Chunk与LUN之间的对应关系,因此,根据这些新建立的对应关系,使得按照传统RAID存储的硬盘中存储的业务数据,在不需要进行数据迁移的情形下,实现了存储整列中块虚拟化的存储方式,从而具备了虚拟化的存储方式所能够实现的分级存储和快速重构等特性,通过本发明实施例提供的基于RAID的存储方法,在不需要数据迁移的情况下,实现了块虚拟化存储方式的更新,实现了传统RAID数据能直接转换成能支撑虚拟化功能数据的存储,并且该转换过程相对于传统的数据迁移的更新方法所耗费的时间,可以认为是瞬间完成的,从而提升了存储阵列所在的整个系统的可靠性和易用性。In the RAID-based storage method provided by the embodiment of the present invention, the hard disk stored in the traditional RAID storage in the storage array is divided into multiple storage blocks, and the storage blocks are added to the block virtualization based on the Raid algorithm and the block virtualization storage technology. Storage method in the resource pool. Use the newly added storage space in the resource pool to establish the corresponding LUN. The hard disk space occupied by the newly created LUN is still the hard disk space occupied by the LUN in the original RAID. On the basis of the newly created LUN, the actual hard disk space is partitioned by the storage block, and the correspondence between the storage block and the resource block in the resource pool and the newly created LUN is increased, for example, The relationship between the BLOCK and the Strip, between the Strip and the Chunk, and between the Chunk and the LUN. Therefore, according to these newly established correspondences, the service data stored in the hard disk stored in the conventional RAID is not required to be data. In the case of the migration, the storage method of the block virtualization in the entire column is implemented, and the RAID-based storage method provided by the embodiment of the present invention is provided by the hierarchical storage and the fast reconstruction which can be realized by the virtualized storage mode. In the case that data migration is not required, the update of the block virtualization storage mode is realized, and the traditional RAID data can be directly converted into a storage capable of supporting the virtualized functional data, and the conversion process is updated with respect to the traditional data migration. The time taken by the method can be considered to be completed in an instant, thereby improving the entire system in which the storage array is located. Reliability and ease of use.
附图概述BRIEF abstract
图1为相关技术中传统RAID存储的示意图;1 is a schematic diagram of a conventional RAID storage in the related art;
图2为块虚拟化存储方式的原理示意图;2 is a schematic diagram of the principle of a block virtualization storage method;
图3为本发明实施例提供的一种基于RAID的存储方法的流程示意图;FIG. 3 is a schematic flowchart of a RAID-based storage method according to an embodiment of the present disclosure;
图4A和4B为根据本发明实施例提供的基于RAID的存储方法,将部分硬盘按照传统RAID方式进行存储更新为全部硬盘按照块虚拟化的方式存储的示意图;4A and 4B are schematic diagrams of a RAID-based storage method according to an embodiment of the present invention, in which a part of a hard disk is stored and updated according to a conventional RAID mode, and all hard disks are stored in a block virtualization manner;
图5为本发明实施例提供的基于RAID的存储装置的结构示意图。 FIG. 5 is a schematic structural diagram of a RAID-based storage device according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下面结合附图对本发明实施例提供的基于RAID的存储方法和存储装置进行详细描述。The RAID-based storage method and storage device provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
请参阅图3,为本发明实施例提供的一种基于RAID的存储方法的流程示意图,如图3所示,所述方法包括:FIG. 3 is a schematic flowchart of a RAID-based storage method according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
步骤S10、将按照传统RAID存储的硬盘划分为多个存储块;Step S10, dividing the hard disk stored according to the traditional RAID into a plurality of storage blocks;
本文所述传统RAID存储指的是RAID的创建是按照单个物理盘的方式,本文所述虚拟化存储指的是创建RAID是按照一种粒度创建的RAID,所述粒度指物理盘中一段连续的空间。The traditional RAID storage described in this document refers to the way that the RAID is created according to a single physical disk. The virtualized storage in this document refers to the RAID created by creating a RAID according to a granularity. The granularity refers to a continuous segment in the physical disk. space.
步骤S20、利用所述存储块组合得到资源池;Step S20, using the storage block combination to obtain a resource pool;
步骤S30、利用组合得到的资源池,建立对应的逻辑单元号LUN,其中,所述LUN与所述按照传统RAID存储的硬盘中原有的LUN占用相同的硬盘物理空间。In step S30, the resource pool of the combination is used to establish a corresponding logical unit number LUN, wherein the LUN occupies the same hard disk physical space as the original LUN of the hard disk stored in the traditional RAID.
本发明实施例提供的基于RAID的存储方法是基于如下的块虚拟化存储技术进行说明的,下面对本发明实施例涉及一种示例性的块虚拟化存储技术进行介绍,以N块硬盘组成的块虚拟化阵列进行介绍,包括:The RAID-based storage method provided by the embodiment of the present invention is described based on the following block virtualization storage technology. The following describes an exemplary block virtualization storage technology, which is a block composed of N hard disks. Virtualization arrays are introduced, including:
(1.1)将N块硬盘被划分为多个存储小块Block;(1.1) dividing N hard disks into a plurality of storage small blocks Block;
(1.2)对于这些存储小块Block,按照第一映射关系(例如离散算法),映射到LD空间,其中,LD空间的最小单元为条带Strip。在此过程中,将建立Block和Strip之间的映射关系。(1.2) For these storage tile blocks, according to the first mapping relationship (for example, a discrete algorithm), mapping to the LD space, wherein the smallest unit of the LD space is a stripe strip. In this process, the mapping between Block and Strip will be established.
(1.3)基于LD空间,按照RAID策略,组合得到虚拟磁盘VD空间,其中VD空间中的最小单元为小空间Chunk,所有Chunk的集合为资源池POOL。(1.3) Based on the LD space, according to the RAID policy, the virtual disk VD space is combined, wherein the smallest unit in the VD space is a small space Chunk, and the collection of all Chunk is a resource pool POOL.
其中,可以根据不同的RAID策略组合得到不同的VD空间,例如,基于LD空间,分别建立第一VD空间和第二VD空间,其中,第一VD空间是按照RAID 3+1策略组合得到的,第二VD空间是按照RAID 2+1策略组合得到的。 The VD space can be obtained according to different RAID policies. For example, the first VD space and the second VD space are respectively established based on the LD space, where the first VD space is obtained according to the RAID 3+1 policy combination. The second VD space is obtained by combining the RAID 2+1 policies.
为了描述方便,将组合得到第一VD空间的LD空间称为第一LD空间,将组合得到第二VD空间的LD空间称为第二LD空间,也就是说,将第一LD空间按照RAID 3+1策略,组合为第一VD空间,将第二LD空间按照RAID2+1策略,组合为第二VD空间。For convenience of description, the LD space in which the first VD space is combined is referred to as a first LD space, and the LD space in which the second VD space is combined is referred to as a second LD space, that is, the first LD space is classified as RAID 3 The +1 strategy is combined into a first VD space, and the second LD space is combined into a second VD space according to a RAID 2+1 policy.
对于整个POOL来说,其中的部分Chunk是基于RAID 3+1策略的,部分Chunk是基于RAID 2+1策略的。For the entire POOL, some of the Chunk are based on the RAID 3+1 strategy, and some Chunk are based on the RAID 2+1 strategy.
不同RAID策略对应不同的RAID算法,在确定RAID策略后,根据对应的RAID算法计算Chunk和Strip之间的对应关系。Different RAID policies correspond to different RAID algorithms. After the RAID policy is determined, the correspondence between the Chunk and the Strip is calculated according to the corresponding RAID algorithm.
(1.4)在建立LUN时,按照第二映射关系(例如离散算法),将POOL中的Chunk分配至每个LUN。在这个过程中,会建立Chunk与LUN的映射关系。(1.4) When the LUN is established, the Chunk in the POOL is assigned to each LUN according to the second mapping relationship (for example, a discrete algorithm). In this process, the mapping relationship between the Chunk and the LUN is established.
其中,在根据VD空间建立LUN时,存储阵列软件对于不同的VD空间不做区分,也就是说,按照不同的RAID策略的Chunk可能被分配给同一个LUN使用。The storage array software does not distinguish between different VD spaces when a LUN is created according to the VD space. That is, a Chunk according to different RAID policies may be allocated to the same LUN.
本发明实施例中,LUN可以有两种,一种是在LUN建立时,存储阵列软件为LUN分配对应的物理空间,其他LUN不能够再占用这些物理空间,另一种,在LUN建立时,存储阵列软件为LUN分配少量物理空间,然后随着实际数据存储的需求,为LUN分配真实的物理空间。对于第二种情况,可以根据传统RAID存储的硬盘中原有的LUN所占有的实际的物理空间,来根据VD空间建立对应的LUN,使得根据VD建立的LUN和原有的LUN所占用的硬盘上的实际物理地址相同。In the embodiment of the present invention, there are two types of LUNs. When a LUN is created, the storage array software allocates a physical space for the LUN. The other LUNs cannot occupy the physical space. The storage array software allocates a small amount of physical space to the LUN, and then allocates real physical space to the LUN as the actual data storage needs. In the second case, the LUN can be created according to the actual physical space occupied by the original LUN of the conventional RAID, and the LUN is created according to the VD and the original LUN. The actual physical address is the same.
基于上述块虚拟化存储技术,本发明实施例提供的一种基于RAID的存储方法包括:Based on the foregoing block virtualization storage technology, a RAID-based storage method provided by an embodiment of the present invention includes:
步骤S110,将按照传统RAID存储的硬盘划分为多个存储小块Block;Step S110, dividing the hard disk according to the traditional RAID storage into a plurality of storage blocks Block;
步骤S120,基于Raid算法和块虚拟化存储技术,利用所述Block组合得到对应的虚拟硬盘VD空间;Step S120, using the block combination to obtain a corresponding virtual hard disk VD space based on the Raid algorithm and the block virtualization storage technology;
上述步骤S110和S120分别对应步骤S10和步骤S20。The above steps S110 and S120 correspond to step S10 and step S20, respectively.
其中,步骤S120包括: Wherein, step S120 includes:
步骤S1210,根据Block与逻辑硬盘LD之间的映射关系,将Block映射到LD空间;Step S1210: Map the Block to the LD space according to the mapping relationship between the Block and the logical hard disk LD.
LD空间中的基本单元为Strip,在上述过程中,将建立Block与Strip之间的映射关系。The basic unit in the LD space is Strip. In the above process, the mapping relationship between Block and Strip will be established.
其中,将Block映射到LD空间包括:情况一:当存储阵列中已经存在LD空间,且所述LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立时,将所述Block添加到所述LD空间;情况二:当存储阵列中还没有LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立的情况时,建立新的LD空间,并将所述Block映射到所述LD空间。The mapping of the block to the LD space includes: case 1: when the LD space already exists in the storage array, and the LD space is established by using the same RAID policy as the hard disk stored according to the traditional RAID, adding the block to the The LD space; Case 2: when there is no LD space in the storage array and the same RAID policy is established by using the traditional RAID storage hard disk, a new LD space is established, and the block is mapped to the LD space.
本发明实施例中的RAID策略是指采用不同的RAID算法建立RAID存储阵列,例如,RAID策略可以是RAID3+1策略或RAID2+1策略等。RAID策略也可以指采用不同的RAID标准建立RAID存储阵列,例如RAID6,RAID10等。The RAID policy in the embodiment of the present invention refers to establishing a RAID storage array by using different RAID algorithms. For example, the RAID policy may be a RAID 3+1 policy or a RAID 2+1 policy. A RAID policy can also refer to the establishment of RAID storage arrays using different RAID standards, such as RAID6, RAID10, and so on.
步骤S1220,根据RAID算法,将所述LD空间组合为虚拟硬盘VD空间;其中,所述RAID算法与所述按照传统RAID存储的硬盘所采用的RAID算法相同,也就是说,将所述LD空间组合为VD空间时所采用的RAID策略与所述按照传统RAID存储的硬盘所采用的RAID策略相同。In step S1220, the LD space is combined into a virtual hard disk VD space according to a RAID algorithm. The RAID algorithm is the same as the RAID algorithm used by the hard disk according to the conventional RAID storage, that is, the LD space is used. The RAID policy adopted when combining VD space is the same as the RAID policy adopted by the hard disk according to the conventional RAID storage.
VD空间即为资源池POOL,在根据用户需求建立LUN时,以Chunk为最小单位,将VD中的Chunk分配给对应的LUN。The VD space is the resource pool POOL. When a LUN is created according to user requirements, the Chunk is allocated to the corresponding LUN in the smallest unit.
在将Block映射到LD空间的过程中,如果是情况一,则新的LD相对于原来的LD的空间大小将增加,新的LD对应的新的VD的空间大小也会增加,即空间地址会变大,在新的VD中,新增加的LD根据RAID算法对应建立新增加的Chunk,并将新增加的Chunk添加至资源池POOL中;如果是情况二,新建的LD对应的Chunk将添加至资源池POOL中。In the process of mapping the block to the LD space, if the situation is one, the space size of the new LD relative to the original LD will increase, and the space size of the new VD corresponding to the new LD will also increase, that is, the space address will be In the new VD, the newly added LD creates a newly added Chunk according to the RAID algorithm, and adds the newly added Chunk to the resource pool POOL; if it is case 2, the newly created LD corresponds to the Chunk to be added to Resource pool POOL.
资源池POOL中的Chunk可能是基于不同的Raid生成的,根据系统设置,按照不同的RAID策略建立的Chunk可能被分配给同一个LUN使用。The Chunk in the resource pool POOL may be generated based on different Raids. According to the system settings, Chunks established according to different RAID policies may be assigned to the same LUN.
由于Block和Strip之间,以及Strip和Chunk之间均存在对应的关系,因此,Block和Chunk之间也存在对应的关系。 Since there is a corresponding relationship between the Block and the Strip, and between the Strip and the Chunk, there is a corresponding relationship between the Block and the Chunk.
步骤S130,利用资源池中新增加的VD,建立对应的LUN。其中,所述LUN与所述按照传统RAID存储的硬盘中原有的LUN占用相同的硬盘物理空间。Step S130, using the newly added VD in the resource pool to establish a corresponding LUN. The LUN occupies the same physical space of the hard disk as the original LUN in the hard disk stored in the traditional RAID.
步骤S130对应步骤S30。Step S130 corresponds to step S30.
在此步骤中,存储阵列软件建立了VD与LUN之间的映射表,即,建立了VD中Chunk与LUN之间的对应关系In this step, the storage array software establishes a mapping table between the VD and the LUN, that is, establishes the correspondence between the Chunk and the LUN in the VD.
其中,利用新增加的VD所建立的LUN与按照传统RAID存储的硬盘中建立的LUN的个数和大小相同;并且在硬盘中,之前属于LUN的存储空间,在块虚拟化的存储方式中,依然属于新建的对应的LUN。例如,按照传统RAID存储的硬盘中设置有两个LUN,大小分别为10G和20G,那么块虚拟化的存储方式中,利用资源池中新增加的VD所建立对应的LUN的个数也是两个,大小分别为10G和20G,并且,两个新建立的LUN实际占用的硬盘空间依然是原来按照传统RAID存储的硬盘中那两个LUN所占用的硬盘空间。只是,对于新建立的LUN,在实际硬盘空间以BLOCK的方式进行划分基础上,增加了BLOCK与Strip之间,Strip与Chunk之间,以及Chunk与LUN之间的对应关系。根据这些新建立的对应关系,使得按照传统RAID存储的硬盘中存储的业务数据,在不需要进行数据迁移的情形下,实现了存储整列中块虚拟化的存储方式,从而具备了虚拟化的存储方式所能够实现的分级存储和快速重构等特性。The number of LUNs established by using the newly added VD is the same as the number of LUNs established in the hard disk of the conventional RAID. In the hard disk, the storage space that belongs to the LUN is stored in the virtualized storage mode. It still belongs to the newly created corresponding LUN. For example, if two LUNs are set in the traditional RAID storage, the size is 10G and 20G respectively. In the block virtualization mode, the number of LUNs created by using the newly added VD in the resource pool is also two. The size of the hard disk space occupied by the two newly created LUNs is still the hard disk space occupied by the two LUNs in the original RAID storage. However, for the newly created LUN, the actual hard disk space is divided by the BLOCK method, and the correspondence between the BLOCK and the Strip, between the Strip and the Chunk, and between the Chunk and the LUN is increased. According to these newly established correspondences, the service data stored in the hard disk stored in the traditional RAID storage can realize the storage mode of the block virtualization in the entire column without requiring data migration, thereby providing virtualized storage. Features such as hierarchical storage and fast reconstruction that can be achieved by the method.
为了保证新建立的LUN与按照传统RAID存储的硬盘中原有的LUN所占用的硬盘空间相同,需要根据Block的LUN标识,确定VD中Chunk的LUN标识;包括:To ensure that the newly created LUNs are the same as the hard disk space occupied by the original LUNs in the traditional RAID, you need to determine the LUN ID of the Chunk in the VD based on the LUN ID of the block.
根据Block的LUN标识,将所述LUN标识作为LD空间中与Block对应的Strip的LUN标识;根据Strip对应的LUN标识,将所述LUN标识作为VD空间中与Strip对应的Chunk的LUN标识。According to the LUN identifier of the block, the LUN identifier is used as the LUN identifier of the strip corresponding to the block in the LD space. The LUN identifier is used as the LUN identifier of the Chunk corresponding to the strip in the VD space according to the LUN identifier corresponding to the strip.
在确定VD空间中Chunk的LUN标识之后,根据VD中Chunk的LUN标识,将具有相同LUN标识的Chunk分配至相同的LUN中。通过这样的方式,使得新建立的LUN与按照传统RAID存储的硬盘中原有的LUN所占用的硬盘空间相同,避免了业务数据的迁移,同时完成了块虚拟化方式中对应 关系的建立。After the LUN ID of the Chunk is determined in the VD space, the Chunk with the same LUN ID is assigned to the same LUN according to the LUN ID of the Chunk in the VD. In this way, the newly created LUN is the same as the hard disk space occupied by the original LUN in the traditional RAID storage hard disk, which avoids the migration of service data and completes the corresponding block virtualization mode. The establishment of the relationship.
在VD对应的LUN创建完毕之后,将按照传统RAID存储的硬盘对应的原有的LUN切换至所述VD对应的LUN。After the LUN corresponding to the VD is created, the original LUN corresponding to the hard disk of the traditional RAID is switched to the LUN corresponding to the VD.
通过上述过程,可以将按照传统RAID存储的硬盘转换为按照块虚拟化的存储方式,从而使得原有的业务数据在不进行数据迁移的过程下,具备分级存储和快速重构的功能。Through the above process, the hard disk according to the traditional RAID storage can be converted into the storage mode according to the block virtualization, so that the original service data has the functions of hierarchical storage and rapid reconstruction without data migration.
其中,分级存储的功能是指,存储软件根据硬盘中业务数据被访问的频率,将访问频率高的数据,即热点数据迁移至读写性能更好的硬盘空间,例如,存储整列中的硬盘可包括SSD(高性能层)、SAS(性能层)或者NL-SAS(容量层)中的一种或多种,其中SSD具有更优良的读写性能。当存储软件检测到任一VD中的业务数据为热点数据、且该VD对应的硬盘不是SSD硬盘时,可以将该VD上的数据迁移至SSD硬盘对应的空闲VD中。因此,通过将按照传统RAID存储的硬盘转换为按照块虚拟化的存储方式,使得原来存储的业务数据在新的存储方式下,其中的热点数据可以被迁移至其他的硬盘,从而使得原来的业务数据具备分级存储的功能。The function of the tiered storage means that the storage software migrates data with high access frequency, that is, hotspot data, to a hard disk space with better read/write performance according to the frequency of access of the service data in the hard disk. For example, the hard disk in the entire column can be stored. It includes one or more of SSD (High Performance Layer), SAS (Performance Layer) or NL-SAS (Capacity Layer), in which SSD has better read and write performance. When the storage software detects that the service data in any VD is hotspot data, and the hard disk corresponding to the VD is not an SSD hard disk, the data on the VD may be migrated to the idle VD corresponding to the SSD hard disk. Therefore, by converting the hard disk according to the traditional RAID storage into the storage mode according to the block virtualization, the original stored service data is in a new storage mode, and the hotspot data can be migrated to other hard disks, thereby making the original service. The data has the function of tiered storage.
此外,块虚拟化的存储方式还具备快速重构的优点,在按照传统RAID存储的硬盘中,如果其中的一块硬盘出现故障,需要更换故障盘,并进行数据重构,在数据重构的过程中,需要根据RAID组中的其他硬盘中的数据对新更换的硬盘中的数据进行重写,其中,RAID组是指按照RAID存储的一组硬盘,例如,按照RAID3+1策略进行存储的4块硬盘可以称为一个RAID组,在数据重构的过程中,需要从3块硬盘中读取数据,向1块盘中写数据,而在块虚拟化之后,由于RAID组实际上是分布在整个资源池POOL的多个硬盘中,理想情况下,可以从整个资源池涉及的硬盘中读取数据,并且将数据写入多个硬盘中,因此,参与读写的硬盘数目都增多了,因此,提高了数据重构的速度。In addition, the storage method of block virtualization also has the advantage of rapid reconfiguration. In the hard disk according to the traditional RAID storage, if one of the hard disks fails, the fault disk needs to be replaced, and data reconstruction is performed in the process of data reconstruction. The data in the newly replaced hard disk needs to be rewritten according to the data in the other hard disks in the RAID group. The RAID group refers to a group of hard disks stored according to the RAID, for example, according to the RAID 3+1 policy. A block hard disk can be called a RAID group. In the process of data reconstruction, data needs to be read from three hard disks and data is written to one disk. After the block is virtualized, the RAID groups are actually distributed. In the multiple hard disks of the entire resource pool POOL, ideally, data can be read from the hard disk involved in the entire resource pool, and data is written into multiple hard disks, so the number of hard disks participating in reading and writing is increased, so , improve the speed of data reconstruction.
本发明实施例中的基于RAID的存储方法可以但不限于应用于以下存储阵列:存储阵列中部分硬盘按照传统RAID方式进行存储、且部分硬盘按照块虚拟化的方式进行存储、且存储阵列中的部分空间已经存储有业务数据;存储阵列中全部硬盘按照传统RAID方式进行存储、且存储阵列中的部分空 间已经存储有业务数据。The RAID-based storage method in the embodiment of the present invention may be applied to, but not limited to, the following storage arrays: some hard disks in the storage array are stored according to a conventional RAID mode, and some hard disks are stored in a block virtualization manner, and are in the storage array. Some areas of the storage have been stored with business data; all the hard disks in the storage array are stored in the traditional RAID mode, and some of the storage arrays are empty. Business data is already stored.
需要说明的是,如果是其他的块虚拟化存储技术,也可以采用本发明实施例提供的基于RAID的存储方法对存储方式进行转换。下面结合另一种块虚拟化方式对本发明实施例提供的基于RAID的存储方法进行说明。It should be noted that, if it is another block virtualization storage technology, the storage mode may be converted by using the RAID-based storage method provided by the embodiment of the present invention. The RAID-based storage method provided by the embodiment of the present invention is described below in conjunction with another block virtualization mode.
下面对本发明实施例涉及另一种示例性的块虚拟化存储技术进行介绍,以N块硬盘组成的块虚拟化阵列进行介绍,包括:The following describes an exemplary block virtualization storage technology in the embodiment of the present invention, and introduces a block virtualization array composed of N hard disks, including:
(2.1)将N块硬盘被划分为多个逻辑块CK;例如,逻辑块CK的大小可以是64M;(2.1) dividing the N hard disks into a plurality of logic blocks CK; for example, the size of the logic block CK may be 64M;
(2.2)将来自不同硬盘上的逻辑块CK按RAID方式(比如RAID5,RAID6)组成逻辑块组CKG;(2.2) logical blocks CK from different hard disks are grouped into logical block groups CKG in a RAID mode (such as RAID5, RAID6);
(2.3)将逻辑块组CKG切分成更细粒度的逻辑小块Extent,Extent的集合即为资源池,例如,逻辑小块Extent的大小可以是512K~64MB,例如,可以根据需要配置为4MB。(2.3) The logical block group CKG is divided into a fine-grained logical small block Extent, and the set of the Extent is a resource pool. For example, the size of the logical small block Extent may be 512K to 64MB, for example, it may be configured as 4MB as needed.
逻辑小块Extent组成了资源池POOL,逻辑小块Extent为用户空间分配时的基本单元,当根据用户需要建立LUN时,可以将资源池中的逻辑小块Extent分配给对应的LUN。The logical small block Extent constitutes the resource pool POOL, and the logical small block Extent is the basic unit when the user space is allocated. When the LUN is created according to the user needs, the logical small block Extent in the resource pool can be allocated to the corresponding LUN.
基于上述块虚拟化存储技术,本发明实施例提供的一种基于RAID的存储方法包括:Based on the foregoing block virtualization storage technology, a RAID-based storage method provided by an embodiment of the present invention includes:
步骤S210,将按照传统RAID存储的硬盘划分为多个逻辑块CK。In step S210, the hard disk stored according to the conventional RAID is divided into a plurality of logical blocks CK.
步骤S220,基于Raid算法和块虚拟化存储技术,利用所述CK组合得到的Extent组成的资源池;Step S220, using the Raid algorithm and the block virtualization storage technology, using the resource pool composed of the Extent obtained by the CK combination;
上述步骤S210和步骤S220,分别对应步骤S10和步骤S20。The above steps S210 and S220 correspond to step S10 and step S20, respectively.
步骤S220包括:Step S220 includes:
步骤S2210、根据所述按照传统RAID存储的硬盘所采用的RAID算法,将来自不同硬盘上的逻辑块CK组成逻辑块组CKG。在上述过程中,将建立Ck与CKG的对应关系。Step S2210: The logical blocks CK from different hard disks are formed into a logical block group CKG according to the RAID algorithm adopted by the hard disks stored in the conventional RAID. In the above process, the correspondence between Ck and CKG will be established.
步骤S2220、将逻辑块组CKG切分成更细粒度的逻辑小块Extent,所述 Extent的集合即为所述资源池。Step S2220, cutting the logical block group CKG into a finer-grained logical block Extent, The set of Extent is the resource pool.
在根据用户需求建立LUN时,以资源池中的Extent为最小单位,将资源池中的Extent分配给对应的LUN。When a LUN is created based on the user's requirements, the Extent in the resource pool is allocated to the corresponding LUN.
由于CK和CKG之间,以及CKG和Extent之间均存在对应的关系,因此,CK和Extent之间也存在对应的关系。Since there is a corresponding relationship between CK and CKG, and between CKG and Extent, there is a corresponding relationship between CK and Extent.
其中,所述利用所述存储块组合得到资源池还包括:根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识;包括:The obtaining the resource pool by using the storage block combination further includes: determining, according to the LUN identifier of the logical block CK, the LUN identifier of the logical small block Extent in the resource pool;
根据逻辑块CK的LUN标识,将所述LUN标识作为与CK对应的逻辑块组CKG的LUN标识;根据CKG的LUN标识,将所述LUN标识作为资源池中与CKG对应的Extent的LUN标识。The LUN identifier is used as the LUN identifier of the logical block group CKG corresponding to the CK according to the LUN identifier of the logical block CK. The LUN identifier is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool according to the LUN identifier of the CKG.
步骤S230(对应于步骤S30),利用资源池中新增加的Extent,建立对应的LUN。In step S230 (corresponding to step S30), the corresponding LUN is established by using the newly added Extent in the resource pool.
下面结合两个应用场景进行说明。The following describes two application scenarios.
场景一scene one
该场景中,存储阵列中部分硬盘按照传统RAID方式进行存储,部分硬盘按照块虚拟化的方式进行存储,根据业务需求,需要将存储阵列中全部硬盘按照块虚拟化的方式进行存储。In this scenario, some of the hard disks in the storage array are stored in the traditional RAID mode. Some of the hard disks are stored in a virtualized manner. According to the service requirements, all the disks in the storage array need to be stored in a virtualized manner.
请参阅图4A和4B,为根据本发明实施例提供的基于RAID的存储方法,将部分硬盘按照传统RAID方式进行存储更新为全部硬盘按照块虚拟化的方式存储的示意图,如图4A所示,存储阵列中原有的部分基于传统Raid部分基于块虚拟化的存储方式,其中,存储阵列中包括9块硬盘,D为硬盘标号,其中D1~D4这4块硬盘按照传统RAID方式进行存储,D5~D9这5块硬盘按照块虚拟化方式进行存储;如虚线框外部的部分所示,为其中5块硬盘组成的块虚拟化阵列,其中,(1)D5~D9这5块硬盘被划分为多个Block;(2)对于这些Block,按照第一映射关系(离散算法),被映射到LD空间,(3)基于LD空间,分别建立第一VD空间和第二VD空间,其中,第二VD空间是按照RAID 3+1策略组合得到的,第一VD空间是按照RAID 2+1策略组合得到的,为了描述方便,将组合得到第一VD空间的LD空间称为第一LD空 间,即图中左边的4列,将组合得到第二VD空间的LD空间称为第二LD空间,即图中右边的3列,也就是说,将第一LD空间按照RAID 3+1策略,组合为第一VD空间,将第二LD空间按照RAID 2+1策略,组合为第二VD空间。(4)第一VD空间和第二VD空间,分别按照第二映射关系,被分配至每个LUN。其中,第二映射关系也可以是离散算法。Referring to FIG. 4A and FIG. 4B, in a RAID-based storage method according to an embodiment of the present invention, a portion of a hard disk is stored and updated according to a conventional RAID mode, and the entire hard disk is stored in a block virtualization manner, as shown in FIG. 4A. The original part of the storage array is based on the traditional Raid part based on the block virtualization. The storage array includes 9 hard disks and D is the hard disk label. The 4 hard disks D1 to D4 are stored in the traditional RAID mode. D5~ The five hard disks of D9 are stored in block virtualization mode; as shown in the external part of the dotted line frame, a block virtualized array consisting of five hard disks, wherein (1) D5 to D9 are divided into five hard disks. Blocks; (2) for these blocks, according to the first mapping relationship (discrete algorithm), mapped to the LD space, (3) based on the LD space, respectively establish a first VD space and a second VD space, wherein the second VD The space is obtained by combining the RAID 3+1 policies. The first VD space is obtained according to the RAID 2+1 policy combination. For the convenience of description, the LD space that combines the first VD space is called the first LD space. Between the four columns on the left side of the figure, the LD space that combines to obtain the second VD space is called the second LD space, that is, the three columns on the right side of the figure, that is, the first LD space is in accordance with the RAID 3+1 strategy. The combination is a first VD space, and the second LD space is combined into a second VD space according to a RAID 2+1 policy. (4) The first VD space and the second VD space are allocated to each LUN according to the second mapping relationship, respectively. The second mapping relationship may also be a discrete algorithm.
需要说明的是,在应用本发明实施例提供的基于RAID的存储方法之前,存储阵列已按照上述方式设置完毕。并且在以传统RAID方式来存储的4块硬盘中已有部分空间被用于存储业务数据。It should be noted that, before applying the RAID-based storage method provided by the embodiment of the present invention, the storage array has been set up in the above manner. And some of the four hard disks stored in the traditional RAID mode have been used to store business data.
下面结合上述场景中的存储阵列介绍本发明实施例的基于RAID的存储方法。如图4B所示,为存储阵列更新为全部按照块虚拟化方式存储的示意图,其中:The RAID-based storage method of the embodiment of the present invention is described below in conjunction with the storage array in the above scenario. As shown in FIG. 4B, the storage array is updated to be stored in a block virtualization manner, wherein:
步骤S11、将基于传统RAID方式存储的硬盘划分为多个Block。即,将4块基于传统RAID方式存储的硬盘划分为多个存储小块;Step S11: The hard disk stored in the traditional RAID mode is divided into multiple blocks. That is, four hard disks stored based on the traditional RAID mode are divided into multiple storage blocks;
步骤S12、根据Block与逻辑硬盘LD之间的第一映射关系,将Block添加到对应的LD空间;本实施例中,4块硬盘是基于RAID 3+1策略存储的,而第一LD空间是用于按照RAID 3+1策略组合为VD空间的,因此,上述存储小块对应的LD空间为第一LD空间,也就是说,将上述Block对应添加到第一LD空间中;In step S12, the block is added to the corresponding LD space according to the first mapping relationship between the block and the logical hard disk LD. In this embodiment, four hard disks are stored based on the RAID 3+1 policy, and the first LD space is The LD space corresponding to the storage block is the first LD space, that is, the block corresponding to the block is added to the first LD space.
步骤S13、根据RAID算法,将新的第一LD空间组合为新的第一VD空间;如图4B所示,新的VD空间相对于原有的VD空间变大了,其中,虚线框外的VD空间为原有的VD空间,虚线框内的VD空间为新增加的VD空间;Step S13: Combine the new first LD space into a new first VD space according to the RAID algorithm; as shown in FIG. 4B, the new VD space becomes larger than the original VD space, wherein the outside of the dotted line The VD space is the original VD space, and the VD space in the dotted frame is the newly added VD space;
步骤S14、根据VD空间与存储卷LUN之间的映射关系,将新的第一VD空间映射至LUN;Step S14: Mapping the new first VD space to the LUN according to the mapping relationship between the VD space and the storage volume LUN;
其中,新LUN建好之后,将取代原有的传统Raid硬盘中对应的LUN,相对于原有的LUN,新的LUN的大小不变,并且新的LUN相对于原有的LUN,其实是指向相同的硬盘空间,但是新的LUN由于是基于块虚拟化方式建立的,因此其具备分级存储和快速重构功能,之前的业务数据依然存储在 新的LUN中,随着业务的更新和扩展,新的LUN上的数据不断进行数据迁移从而达到数据分散在整个Pool中,从而提升整个系统的可靠性要求和重构速度。The new LUN is replaced with the corresponding LUN in the traditional Raid. The size of the new LUN is unchanged from the original LUN, and the new LUN is actually pointed to the original LUN. The same hard disk space, but the new LUN is built on the basis of block virtualization, so it has hierarchical storage and fast reconfiguration. The previous business data is still stored in In the new LUN, as the service is updated and expanded, data on the new LUN is continuously migrated to achieve data dispersion throughout the pool, thereby improving the reliability requirements and reconstruction speed of the entire system.
场景二Scene two
该实施例中,存储阵列中全部硬盘按照传统RAID方式进行存储,根据业务需求,需要将存储阵列中全部硬盘按照块虚拟化的方式进行存储。In this embodiment, all the hard disks in the storage array are stored in the traditional RAID mode. According to the service requirements, all the hard disks in the storage array need to be stored in a virtualized manner.
存储阵列中包括4块硬盘,4块硬盘按照传统RAID方式进行存储,其中,4块硬盘是基于RAID 3+1策略进行存储的。下面结合上述场景介绍本发明实施例的基于RAID的存储方法。其中:The storage array includes four hard disks, and four hard disks are stored in the traditional RAID mode. Among them, four hard disks are stored based on the RAID 3+1 policy. The RAID-based storage method of the embodiment of the present invention is described below in conjunction with the foregoing scenarios. among them:
步骤S21、将4块基于传统RAID方式存储的硬盘划分为多个Block;Step S21, dividing four hard disks stored in the traditional RAID mode into multiple blocks;
步骤S22、根据Block与逻辑硬盘LD之间的第一映射关系,将Block添加到LD空间;Step S22: Add a Block to the LD space according to a first mapping relationship between the Block and the logical hard disk LD.
步骤S23、根据RAID算法,将上述LD空间组合为VD空间;Step S23, combining the foregoing LD spaces into a VD space according to a RAID algorithm;
步骤S24、根据VD空间与存储卷LUN之间的映射关系,将VD空间映射至每个LUN。Step S24: Map the VD space to each LUN according to the mapping relationship between the VD space and the storage volume LUN.
本发明实施例还提供一种基于RAID的存储装置,所述基于RAID的存储装置设置在存储阵列上。请参阅图5,为本发明实施例提供的基于RAID的存储装置的结构示意图,如图5所示,所述存储装置包括:An embodiment of the present invention further provides a RAID-based storage device, where the RAID-based storage device is disposed on a storage array. FIG. 5 is a schematic structural diagram of a RAID-based storage device according to an embodiment of the present invention. As shown in FIG. 5, the storage device includes:
存储块生成单元10,设置为将按照传统RAID存储的硬盘划分为多个存储块;。The storage block generating unit 10 is configured to divide the hard disk stored according to the conventional RAID into a plurality of storage blocks.
资源池生成单元20,设置为基于算法Raid和块虚拟化存储方式,利用所述存储块组合得到资源池;以及a resource pool generating unit 20, configured to obtain a resource pool by using the storage block combination based on an algorithm Raid and a block virtualization storage manner;
LUN更新单元30,设置为利用组合得到的资源池,建立对应的逻辑单元号LUN,其中,所述LUN与所述按照传统RAID存储的硬盘中原有的LUN占用相同的硬盘物理空间。The LUN update unit 30 is configured to use the resource pool obtained by the combination to establish a corresponding logical unit number LUN, wherein the LUN occupies the same hard disk physical space as the original LUN in the traditional RAID storage hard disk.
其中,可选地,所述存储块为存储小块Block,所述资源池为VD空间;所述资源池生成单元20包括VD生成单元,其包括: Optionally, the storage block is a storage block block, and the resource pool is a VD space; the resource pool generating unit 20 includes a VD generating unit, and the method includes:
LD生成模块21,设置为根据Block与逻辑硬盘LD之间的映射关系,将Block映射到LD空间;以及The LD generating module 21 is configured to map the block to the LD space according to the mapping relationship between the block and the logical hard disk LD;
VD生成模块22,设置为根据RAID算法,将所述LD空间组合为虚拟硬盘VD空间;其中,所述RAID算法与所述按照传统RAID存储的硬盘所采用的RAID算法相同。The VD generating module 22 is configured to combine the LD space into a virtual hard disk VD space according to a RAID algorithm; wherein the RAID algorithm is the same as the RAID algorithm adopted by the hard disk according to the conventional RAID storage.
可选地,LD生成模块21是设置为:当存储阵列中已经存在LD空间,且所述LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立时,将所述Block添加到所述LD空间;当存储阵列中还没有LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立的情况时,建立新的LD空间,并将所述Block映射到所述LD空间。Optionally, the LD generating module 21 is configured to: when the LD space already exists in the storage array, and the LD space is established by using the same RAID policy as the hard disk stored according to the traditional RAID, add the block to the LD space; when there is no LD space in the storage array and the same RAID policy is established by the hard disk of the traditional RAID storage, a new LD space is established, and the block is mapped to the LD space.
可选地,本发明实施例中,所述存储装置还包括:Optionally, in the embodiment of the present invention, the storage device further includes:
第一LUN标识存储单元40、设置为根据Block的LUN标识,确定VD中Chunk的LUN标识;The first LUN identifier storage unit 40 is configured to determine a LUN identifier of the Chunk in the VD according to the LUN identifier of the block;
其中,所述第一LUN标识存储单元40是设置为:根据Block的LUN标识,将所述LUN标识作为LD空间中与Block对应的Strip的LUN标识;根据Strip对应的LUN标识,将所述LUN标识作为VD空间中与Strip对应的Chunk的LUN标识。本发明实施例中,利用组合得到的VD所建立的LUN与按照传统RAID存储的硬盘中建立的LUN的个数和大小相同;所述LUN更新单元30还设置为:根据VD中Chunk的LUN标识,将具有相同LUN标识的Chunk分配至相同的LUN中。The LUN identifier storage unit 40 is configured to: use the LUN identifier as the LUN identifier of the strip corresponding to the block in the LD space according to the LUN identifier of the block; and use the LUN according to the LUN identifier corresponding to the strip. Identifies the LUN ID of the Chunk that corresponds to the Strip in the VD space. In the embodiment of the present invention, the number of LUNs established by using the VDs obtained by the combination is the same as the number of LUNs established by the hard disks stored in the conventional RAID. The LUN update unit 30 is further configured to: according to the LUN identifier of the Chunk in the VD. , the Chunk with the same LUN ID is assigned to the same LUN.
本发明实施例中,当所述存储块为逻辑块CK时,所述资源池生成单元20包括:In the embodiment of the present invention, when the storage block is a logical block CK, the resource pool generating unit 20 includes:
CKG生成模块26,设置为根据所述按照传统RAID存储的硬盘所采用的RAID算法,将来自不同硬盘上的逻辑块CK组成逻辑块组CKG;以及The CKG generating module 26 is configured to form the logical block CKG from the different hard disks according to the RAID algorithm adopted by the hard disk according to the traditional RAID storage; and
资源池生成模块27,设置为将逻辑块组CKG切分成更细粒度的逻辑小块Extent,所述Extent的集合即为所述资源池。The resource pool generating module 27 is configured to divide the logical block group CKG into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
可选地,所述存储装置还包括:第二LUN标识存储单元,设置为根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识; Optionally, the storage device further includes: a second LUN identifier storage unit, configured to determine a LUN identifier of the logical small block Extent in the resource pool according to the LUN identifier of the logical block CK;
其中,所述第二LUN标识存储单元是设置为:根据逻辑块CK的LUN标识,将所述LUN标识作为与CK对应的逻辑块组CKG的LUN标识;根据CKG的LUN标识,将所述LUN标识作为资源池中与CKG对应的Extent的LUN标识。The second LUN identifier storage unit is configured to: set the LUN identifier as a LUN identifier of the logical block group CKG corresponding to the CK according to the LUN identifier of the logical block CK; and use the LUN according to the LUN identifier of the CKG Identifies the LUN ID of the Extent that corresponds to the CKG in the resource pool.
本发明实施例中,利用组合得到的资源池所建立的LUN与按照传统RAID存储的硬盘中原有的LUN的个数以及每个LUN对应占用的物理空间相同;所述LUN更新单元30还设置为:根据资源池中资源块的LUN标识,将具有相同LUN标识的资源块分配至相同的LUN中,其中,当资源池为VD空间时,所述资源块为Chunk,当资源池为Extent的集合时,所述资源块为Extent。In the embodiment of the present invention, the LUNs created by using the combined resource pool are the same as the number of original LUNs in the hard disk and the physical space occupied by each LUN. The LUN update unit 30 is also configured to All the resource blocks with the same LUN identifier are allocated to the same LUN according to the LUN identifier of the resource block in the resource pool. When the resource pool is a VD space, the resource block is a Chunk, and when the resource pool is an Extent set. The resource block is an Extent.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,上述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本发明实施例不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be accomplished by a program that instructs the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware or in the form of a software function module. Embodiments of the invention are not limited to any specific form of combination of hardware and software.
工业实用性Industrial applicability
通过本发明实施例提供的基于RAID的存储方法,在不需要数据迁移的情况下,实现了块虚拟化存储方式的更新,实现了传统RAID数据能直接转换成能支撑虚拟化功能数据的存储,从而提升了存储阵列所在的整个系统的可靠性和易用性。 The RAID-based storage method provided by the embodiment of the present invention implements the update of the block virtualized storage mode without data migration, and realizes that the traditional RAID data can be directly converted into a storage capable of supporting the virtualized functional data. This improves the reliability and ease of use of the entire system in which the storage array resides.

Claims (19)

  1. 一种基于独立冗余磁盘阵列RAID的存储方法,所述方法包括:A storage method based on an independent redundant disk array RAID, the method comprising:
    将按照传统RAID存储的硬盘划分为多个存储块;Dividing a hard disk according to a conventional RAID storage into a plurality of storage blocks;
    利用所述存储块组合得到资源池;Obtaining a resource pool by using the storage block combination;
    利用组合得到的资源池,建立对应的逻辑单元号LUN,其中,所述LUN与所述按照传统RAID存储的硬盘中原有的LUN占用相同的硬盘物理空间。The LUNs of the hard disk occupy the same physical space as the original LUNs in the traditional RAID storage hard disk.
  2. 如权利要求1所述的方法,其中,所述存储块为存储小块Block,所述资源池为虚拟磁盘VD空间;The method of claim 1, wherein the memory block is a memory block block, and the resource pool is a virtual disk VD space;
    所述利用所述存储块组合得到资源池包括:The obtaining the resource pool by using the storage block combination includes:
    根据Block与逻辑硬盘LD之间的映射关系,将Block映射到LD空间;Mapping the block to the LD space according to the mapping relationship between the block and the logical hard disk LD;
    根据所述按照传统RAID存储的硬盘所采用的RAID算法,将所述LD空间组合为VD空间。The LD space is combined into a VD space according to the RAID algorithm adopted by the hard disk according to the conventional RAID storage.
  3. 如权利要求2所述的方法,其中,所述将Block映射到LD空间包括:当存储阵列中已经存在LD空间,且所述LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立时,将所述Block添加到所述LD空间;当存储阵列中还没有LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立的情况时,建立新的LD空间,并将所述Block映射到所述LD空间。The method of claim 2, wherein the mapping the block to the LD space comprises: when an LD space already exists in the storage array, and the LD space is established with the same RAID policy as the hard disk according to the conventional RAID storage Adding the block to the LD space; when there is no LD space in the storage array and the same RAID policy is established by using the traditional RAID storage hard disk, a new LD space is established, and the Block is mapped to the LD space.
  4. 如权利要求3所述的方法,所述方法还包括:根据Block的LUN标识,确定VD中小空间Chunk的LUN标识。The method of claim 3, further comprising: determining a LUN identifier of the small space Chunk in the VD according to the LUN identifier of the block.
  5. 如权利要求4所述的方法,其中,所述根据Block的LUN标识,确定VD中小空间Chunk的LUN标识包括:The method of claim 4, wherein determining the LUN identifier of the small space Chunk in the VD according to the LUN identifier of the block comprises:
    根据Block的LUN标识,将所述LUN标识作为LD空间中与Block对应的条带Strip的LUN标识;根据Strip对应的LUN标识,将所述LUN标识作为VD空间中与Strip对应的Chunk的LUN标识。According to the LUN identifier of the block, the LUN identifier is used as the LUN identifier of the stripe strip corresponding to the block in the LD space. The LUN identifier is used as the LUN identifier of the Chunk corresponding to the strip in the VD space according to the LUN identifier corresponding to the strip. .
  6. 如权利要求1所述的方法,其中,所述存储块为逻辑块CK;所述利用所述存储块组合得到资源池包括: The method of claim 1, wherein the storage block is a logical block CK; and the utilizing the storage block combination to obtain a resource pool comprises:
    根据所述按照传统RAID存储的硬盘所采用的RAID算法,将来自不同硬盘上的逻辑块CK组成逻辑块组CKG;According to the RAID algorithm adopted by the hard disk according to the traditional RAID storage, logical blocks CK from different hard disks are formed into a logical block group CKG;
    将逻辑块组CKG切分成更细粒度的逻辑小块Extent,所述Extent的集合即为所述资源池。The logical block group CKG is divided into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
  7. 如权利要求6所述的方法,所述方法还包括:根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识。The method according to claim 6, further comprising: determining, according to the LUN identifier of the logical block CK, a LUN identifier of the logical small block Extent in the resource pool.
  8. 如权利要求7所述的方法,所述根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识,包括:根据逻辑块CK的LUN标识,将所述LUN标识作为与CK对应的逻辑块组CKG的LUN标识;根据CKG的LUN标识,将所述LUN标识作为资源池中与CKG对应的Extent的LUN标识。The method of claim 7, the determining, according to the LUN identifier of the logical block CK, the LUN identifier of the logical small block Extent in the resource pool, comprising: corresponding to the LUN according to the LUN identifier of the logical block CK The LUN ID of the CKG of the logical block group; the LUN identifier of the CKG is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool.
  9. 如权利要求4或5或7或8所述的方法,其中,利用组合得到的资源池所建立的LUN与按照传统RAID存储的硬盘中原有的LUN的个数以及每个LUN对应占用的物理空间相同;The method of claim 4 or 5 or 7 or 8, wherein the number of LUNs created by using the combined resource pool and the number of original LUNs in the hard disk stored in the conventional RAID and the physical space occupied by each LUN the same;
    所述利用组合得到的资源池,建立对应的逻辑单元号LUN包括:根据资源池中资源块的LUN标识,将具有相同LUN标识的资源块分配至相同的LUN中,其中,当资源池为VD空间时,所述资源块为Chunk,当资源池为Extent的集合时,所述资源块为Extent。The resource pool obtained by using the combination and the corresponding logical unit number LUN includes: all the resource blocks having the same LUN identifier are allocated to the same LUN according to the LUN identifier of the resource block in the resource pool, where the resource pool is VD In the case of space, the resource block is a Chunk, and when the resource pool is a collection of Extents, the resource block is an Extent.
  10. 一种基于独立冗余磁盘阵列RAID的存储装置,所述基于RAID的存储装置设置在存储阵列上,所述存储装置包括:A storage device based on an independent redundant disk array RAID, the RAID-based storage device being disposed on a storage array, the storage device comprising:
    存储块生成单元,设置为将按照传统RAID存储的硬盘划分为多个存储块;a storage block generating unit, configured to divide the hard disk stored according to the traditional RAID into a plurality of storage blocks;
    资源池生成单元,设置为利用所述存储块组合得到资源池;以及a resource pool generating unit configured to obtain a resource pool by using the storage block combination;
    LUN更新单元,设置为利用组合得到的资源池,建立对应的逻辑单元号LUN,其中,所述LUN与所述按照传统RAID存储的硬盘中原有的LUN占用相同的硬盘物理空间。The LUN update unit is configured to use the resource pool obtained by the combination to establish a corresponding logical unit number LUN, wherein the LUN occupies the same physical space of the hard disk as the original LUN of the hard disk stored in the traditional RAID.
  11. 如权利要求10所述的存储装置,其中,所述存储块为存储小块Block,所述资源池为虚拟磁盘VD空间;所述资源池生成单元包括VD生成单元, 所述VD生成单元包括:The storage device according to claim 10, wherein said storage block is a storage chunk Block, said resource pool is a virtual disk VD space; said resource pool generating unit comprises a VD generating unit, The VD generating unit includes:
    LD生成模块,设置为根据Block与逻辑硬盘LD之间的映射关系,将Block映射到LD空间;以及The LD generation module is configured to map the block to the LD space according to the mapping relationship between the block and the logical hard disk LD;
    VD生成模块,设置为根据所述按照传统RAID存储的硬盘所采用的RAID算法,将所述LD空间组合为VD空间。The VD generating module is configured to combine the LD spaces into a VD space according to the RAID algorithm adopted by the hard disks stored according to the conventional RAID.
  12. 如权利要求11所述的存储装置,LD生成模块是设置为:当存储阵列中已经存在LD空间,且所述LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立时,将所述Block添加到所述LD空间;当存储阵列中还没有LD空间与所述按照传统RAID存储的硬盘采用相同的RAID策略建立的情况时,建立新的LD空间,并将所述Block映射到所述LD空间。The storage device of claim 11, wherein the LD generation module is configured to: when an LD space already exists in the storage array, and the LD space is established by using the same RAID policy as the hard disk stored according to the conventional RAID, Adding a block to the LD space; when there is no LD space in the storage array and the same RAID policy is established for the hard disk according to the traditional RAID storage, a new LD space is established, and the block is mapped to the LD space. Said LD space.
  13. 如权利要求12所述的存储装置,所述存储装置还包括:The storage device of claim 12, the storage device further comprising:
    第一LUN标识存储单元,设置为根据Block的LUN标识,确定VD中小空间Chunk的LUN标识。The first LUN identifier storage unit is configured to determine the LUN identifier of the small space Chunk in the VD according to the LUN identifier of the block.
  14. 如权利要求13所述的存储装置,所述第一LUN标识存储单元是设置为:根据Block的LUN标识,将所述LUN标识作为LD空间中与Block对应的条带Strip的LUN标识;根据Strip对应的LUN标识,将所述LUN标识作为VD空间中与Strip对应的Chunk的LUN标识。The storage device of claim 13, wherein the first LUN identifier storage unit is configured to: use the LUN identifier as a LUN identifier of a stripe strip corresponding to the block in the LD space according to the LUN identifier of the block; The LUN identifier is used as the LUN identifier of the Chunk corresponding to the Strip in the VD space.
  15. 如权利要求10所述的存储装置,其中,所述存储块为逻辑块CK;所述资源池生成单元包括:The storage device of claim 10, wherein the storage block is a logical block CK; the resource pool generating unit comprises:
    CKG生成模块,设置为根据所述按照传统RAID存储的硬盘所采用的RAID算法,将来自不同硬盘上的逻辑块CK组成逻辑块组CKG;以及The CKG generating module is configured to form the logical block CKG from the different hard disks according to the RAID algorithm adopted by the hard disk according to the traditional RAID storage; and
    资源池生成模块,设置为将逻辑块组CKG切分成更细粒度的逻辑小块Extent,所述Extent的集合即为所述资源池。The resource pool generating module is configured to divide the logical block group CKG into a finer-grained logical tile Extent, and the set of the Extent is the resource pool.
  16. 如权利要求15所述的存储装置,所述存储装置还包括:The storage device of claim 15, the storage device further comprising:
    第二LUN标识存储单元,设置为根据逻辑块CK的LUN标识,确定资源池中逻辑小块Extent的LUN标识。The second LUN identifier storage unit is configured to determine the LUN identifier of the logical small block Extent in the resource pool according to the LUN identifier of the logical block CK.
  17. 如权利要求16所述的存储装置,所述第二LUN标识存储单元是设置为:根据逻辑块CK的LUN标识,将所述LUN标识作为与CK对应的逻 辑块组CKG的LUN标识;根据CKG的LUN标识,将所述LUN标识作为资源池中与CKG对应的Extent的LUN标识。The storage device of claim 16, wherein the second LUN identifier storage unit is configured to: use the LUN identifier as a logic corresponding to CK according to a LUN identifier of the logic block CK The LUN ID of the CKG of the block group. The LUN ID of the CKG is used as the LUN identifier of the Extent corresponding to the CKG in the resource pool.
  18. 如权利要求13或14或16或17所述的存储装置,其中,利用组合得到的资源池所建立的LUN与按照传统RAID存储的硬盘中原有的LUN的个数以及每个LUN对应占用的物理空间相同;The storage device of claim 13 or 14 or 16 or 17, wherein the number of LUNs created by the combined resource pool and the number of original LUNs in the hard disk stored in the conventional RAID and the physics occupied by each LUN The same space;
    所述LUN更新单元还设置为:根据资源池中资源块的LUN标识,将具有相同LUN标识的资源块分配至相同的LUN中,其中,当资源池为VD空间时,所述资源块为Chunk,当资源池为Extent的集合时,所述资源块为Extent。The LUN update unit is further configured to: allocate resource blocks having the same LUN identifier to the same LUN according to the LUN identifier of the resource block in the resource pool, where the resource block is a Chunk when the resource pool is a VD space. When the resource pool is a collection of Extents, the resource block is an Extent.
  19. 一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现权利要求1-9任一项所述的方法。 A computer readable storage medium storing program instructions that, when executed, implement the method of any of claims 1-9.
PCT/CN2015/082392 2015-02-25 2015-06-25 Raid-based storage method and storage apparatus WO2016134571A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510087404.3A CN105988727B (en) 2015-02-25 2015-02-25 Storage method and storage device based on RAID
CN201510087404.3 2015-02-25

Publications (1)

Publication Number Publication Date
WO2016134571A1 true WO2016134571A1 (en) 2016-09-01

Family

ID=56787768

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082392 WO2016134571A1 (en) 2015-02-25 2015-06-25 Raid-based storage method and storage apparatus

Country Status (2)

Country Link
CN (1) CN105988727B (en)
WO (1) WO2016134571A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391047B (en) * 2017-08-02 2021-05-28 郑州云海信息技术有限公司 Method and device for managing storage system
WO2019127490A1 (en) * 2017-12-29 2019-07-04 华为技术有限公司 Data access method and storage array
CN109324762A (en) * 2018-10-11 2019-02-12 郑州云海信息技术有限公司 A kind of construction method of storage system, device, equipment and storage medium
CN109634518A (en) * 2018-10-29 2019-04-16 成都华为技术有限公司 A kind of storage resource configuration method and device
CN112748860B (en) * 2019-10-30 2024-04-12 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for storage management
CN113126891A (en) * 2020-01-15 2021-07-16 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for storage management
CN116540949B (en) * 2023-07-04 2024-01-12 苏州浪潮智能科技有限公司 Dynamic allocation method and device for storage space of redundant array of independent disks

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241476A (en) * 2008-01-30 2008-08-13 中国科学院计算技术研究所 Dummy storage system and method
CN102123176A (en) * 2011-03-17 2011-07-13 杭州宏杉科技有限公司 Space distribution and management method and device for network storage system
US20110307660A1 (en) * 2010-06-14 2011-12-15 Chien-Hung Yang Redundant array of independent disks system, method for writing data into redundant array of independent disks system, and method and system for creating virtual disk
CN102880428A (en) * 2012-08-20 2013-01-16 华为技术有限公司 Distributed RAID (redundant array of independent disks) establishing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100392382B1 (en) * 2001-07-27 2003-07-23 한국전자통신연구원 Method of The Logical Volume Manager supporting Dynamic Online resizing and Software RAID
CA2896128C (en) * 2013-06-29 2018-04-03 Huawei Technologies Co., Ltd. Method, apparatus, and controller for managing storage array
CN103634379B (en) * 2013-11-13 2017-02-01 华为技术有限公司 Management method for distributed storage space and distributed storage system
WO2015089798A1 (en) * 2013-12-19 2015-06-25 华为技术有限公司 Data migration method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241476A (en) * 2008-01-30 2008-08-13 中国科学院计算技术研究所 Dummy storage system and method
US20110307660A1 (en) * 2010-06-14 2011-12-15 Chien-Hung Yang Redundant array of independent disks system, method for writing data into redundant array of independent disks system, and method and system for creating virtual disk
CN102123176A (en) * 2011-03-17 2011-07-13 杭州宏杉科技有限公司 Space distribution and management method and device for network storage system
CN102880428A (en) * 2012-08-20 2013-01-16 华为技术有限公司 Distributed RAID (redundant array of independent disks) establishing method and device

Also Published As

Publication number Publication date
CN105988727B (en) 2021-04-16
CN105988727A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
WO2016134571A1 (en) Raid-based storage method and storage apparatus
US11243706B2 (en) Fragment management method and fragment management apparatus
US8539193B2 (en) Virtualized storage system and method of operating thereof
US9378093B2 (en) Controlling data storage in an array of storage devices
JP5112003B2 (en) Storage device and data storage method using the same
US7958304B1 (en) Dynamically adapting the fault tolerance and performance characteristics of a raid-based storage system by merging and splitting raid groups
US8453036B1 (en) System and method for dynamically resizing a parity declustered group
CN111158587B (en) Distributed storage system based on storage pool virtualization management and data read-write method
US9405625B2 (en) Optimizing and enhancing performance for parity based storage
US10852966B1 (en) System and method for creating mapped RAID group during expansion of extent pool
CN110825320A (en) Virtualizing isolated regions of solid-state storage media
US10705907B1 (en) Data protection in a heterogeneous random access storage array
WO2016107167A1 (en) Storage architecture creation method, storage access method and storage system
US10664392B2 (en) Method and device for managing storage system
US11150990B2 (en) Method, apparatus and computer readable medium for managing a plurality of disks
US11809720B2 (en) Techniques for storage management
US20210303178A1 (en) Distributed storage system and storage control method
KR20220083716A (en) Block device configuration
JP6476959B2 (en) Storage control device, storage system, and control program
US11379326B2 (en) Data access method, apparatus and computer program product
KR20220083710A (en) Block device configuration
US20130159656A1 (en) Controller, computer-readable recording medium, and apparatus
US11625183B1 (en) Techniques for data layout on rotating disk drives
WO2017008571A1 (en) Method and device for allocating space for volume
US11544005B2 (en) Storage system and processing method

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: 15883009

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: 15883009

Country of ref document: EP

Kind code of ref document: A1