WO2015035768A1 - System expansion method and apparatus for redundant array of independent disks (raid) - Google Patents

System expansion method and apparatus for redundant array of independent disks (raid) Download PDF

Info

Publication number
WO2015035768A1
WO2015035768A1 PCT/CN2014/074775 CN2014074775W WO2015035768A1 WO 2015035768 A1 WO2015035768 A1 WO 2015035768A1 CN 2014074775 W CN2014074775 W CN 2014074775W WO 2015035768 A1 WO2015035768 A1 WO 2015035768A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual storage
hard disk
storage hard
distribution table
current
Prior art date
Application number
PCT/CN2014/074775
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 WO2015035768A1 publication Critical patent/WO2015035768A1/en

Links

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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0632Configuration or reconfiguration of storage systems by initialisation or re-initialisation of storage systems

Definitions

  • the present invention relates to the field of information network technologies, and in particular, to a method and an apparatus for expanding a redundant array of independent disks.
  • each node device has a separate storage unit, which may be a local storage hard disk or a local LUN (Logical Unit Number), or may be a serial attached SCSI (SAS). Row connection SCSI
  • the nodes form a virtual RAID system.
  • the technology is responsible for coordinating the storage disks of the storage nodes and organizing them into a storage space that can be uniformly accessed.
  • the storage space here can be regarded as a virtual single large-capacity hard disk.
  • the virtualized inter-node RAID scheme is usually used to organize the data. Specifically, the storage hard disk on each storage node is stored in a certain size.
  • the hard disk space is divided into multiple virtual storage disks, and redundant relationships are established between the virtual storage disks on the different storage disks. Therefore, when data in a storage hard disk of a storage node is lost or damaged, the data of the storage node can be restored according to the redundancy relationship described above.
  • the existing technology generally maintains the redundancy relationship between the original virtual storage hard disks.
  • the processing of data balancing between storage nodes makes the storage space utilization of the RAID system too low and the data migration amount is too large.
  • Embodiments of the present invention provide a method and apparatus for expanding a redundant array of independent disks, thereby improving the utilization of the storage space of the system and reducing the amount of data migration.
  • the first aspect provides a method for expanding a redundant array of independent disks, wherein the RAID system includes N storage nodes, and each of the N storage nodes is divided into virtual storage disks of the same size.
  • the virtual storage hard disk stores the data block
  • the verification virtual storage hard disk stores the verification block
  • the method includes:
  • the new virtual storage hard disk distribution table is calculated according to the parameter and the distribution algorithm of the virtual storage disk group in the current RAID system; the new virtual storage hard disk distribution table is compared with the original virtual The storage disk distribution table, in which the number of data virtual storage disks in each virtual storage disk group in the current RAID system remains unchanged, and the number Y of the virtual storage disks is changed.
  • the virtual storage hard disks in the virtual storage disk group are migrated or deleted according to the distribution location of the virtual storage disks in the new virtual storage disk distribution table.
  • a new virtual storage hard disk is calculated according to a parameter and a distribution algorithm of the virtual storage disk group in the current RAID system.
  • the distribution table includes:
  • the parameters of the virtual storage disk group include at least one of the following: a storage node address ID list, a storage node weight list, a The identifier of the virtual storage disk group and the number of virtual storage disks in the virtual storage disk group; wherein the storage node weight list is for each storage The storage space of the storage node currently storing the hard disk.
  • the virtual storage hard disk in the virtual storage disk group is migrated or deleted according to the distribution location of the virtual storage hard disk in the new virtual storage disk distribution table.
  • the method includes: determining, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a verified virtual storage hard disk that needs to be deleted;
  • the current virtual storage hard disk is not a verification virtual storage hard disk that needs to be deleted, determining, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is located and the new virtual storage hard disk distribution table. The position of the match;
  • the current virtual storage hard disk is a verification virtual storage hard disk that needs to be deleted, the verification data in the current virtual storage hard disk and the current virtual storage hard disk is deleted.
  • the method further includes: if the current virtual storage hard disk does not match the location in the virtual storage hard disk distribution table, copying the data in the current virtual storage hard disk to the newly added storage Deleting the data in the current virtual storage hard disk and the current virtual storage hard disk;
  • the current virtual storage hard disk matches the location in the virtual storage hard disk distribution table, the current virtual storage hard disk location is kept unchanged.
  • a RAID expansion system for a redundant array of independent disks includes N storage nodes, and each of the N storage nodes is divided into virtual storage disks of the same size.
  • the virtual storage hard disk stores a data block
  • the verification virtual storage hard disk stores a check block, where the device includes:
  • a distribution table calculation unit configured to calculate a new virtual node according to a parameter and a distribution algorithm of the virtual storage disk group in the current RAID system when the storage node is added to the RAID system
  • the storage virtual disk distribution table ; the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table, and the number of data virtual storage hard disks in each virtual storage disk group in the current RAID system remains unchanged, and the verification is performed.
  • the number of virtual storage hard disks Y changes;
  • a migration unit configured to migrate or delete the virtual storage hard disk in each virtual storage disk group according to a distribution location of each virtual storage disk in the new virtual storage disk distribution table calculated by the distribution table computing unit.
  • the distribution table calculation unit includes:
  • a parameter obtaining module configured to obtain a parameter of the virtual storage disk group when the storage node is added to the RAID system
  • a distribution table calculation module configured to calculate, by using the distribution algorithm and parameters of the virtual storage disk group obtained by the parameter obtaining unit, the new virtual storage disk distribution table of the virtual storage disk group.
  • the parameters of the virtual storage disk group include at least one of the following: a storage node address ID list, a storage node weight list, a The identifier of the virtual storage disk group and the number of virtual storage disks in the virtual storage disk group; wherein the storage node weight list is the usage rate of the storage space of the current storage disk of each storage node.
  • the migration unit includes: a first determining module, configured to determine, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a school that needs to be deleted Verify the virtual storage hard disk;
  • a second determining module configured to determine, according to the new virtual storage hard disk distribution table, whether the location of the current virtual storage hard disk and the new virtual storage hard disk are distributed according to the new virtual storage hard disk distribution table The positions in the table match;
  • a migration module configured to delete the verification data in the current virtual storage hard disk and the current virtual storage hard disk if the first determining module determines that the result is yes.
  • the migration module is further configured to: if the second determining module determines that the result is negative, The data in the current virtual storage hard disk is copied to the storage hard disk of the newly added storage node, and the data in the current virtual storage hard disk and the current virtual storage hard disk at the original location is deleted; If the judgment result of the second judging module is yes, the position of the current virtual storage hard disk is kept unchanged.
  • the RAID system expansion method and device provided by the embodiment of the present invention, when the RAID system is expanded, the new calculation is performed according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added)
  • the virtual storage disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged, the number of virtual storage disks Y is changed, and then the virtual disks in the new virtual storage disk are distributed.
  • the storage location of the storage disk is used to migrate or delete the virtual storage disk in each virtual storage disk group, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization,
  • the invention balances the data of the expanded RAID system by keeping the number of X unchanged, and only modifying the number of Ys, thereby greatly reducing the amount of data and the amount of calculation.
  • FIG. 1 is a schematic flowchart of a method for expanding a RAID system according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another method for expanding a RAID system according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a virtual storage hard disk distribution of a virtual storage disk group according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a new distribution of a virtual storage hard disk of another virtual storage disk group according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a RAID system expansion device according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of another RAID system expansion device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a RAID system expansion device according to another embodiment of the present invention.
  • RAID Redundant Arrays of Inexpensive Disks, Redundant Array of Independent Disks bad 1 J
  • the present invention is applicable to redundancy between node devices, and is also applicable to redundancy of a single storage hard disk in a single node device.
  • the RAID system is composed of several The storage hard disk corresponding to each node device in the node device is composed; when the storage node is any single storage hard disk in one node device, the RAID system is composed of each single storage hard disk in one node device.
  • the foregoing node device is a variety of terminal devices (eg, a PC, a server, etc.), and the storage hard disk corresponding to each node device is composed of at least one single hard disk.
  • the foregoing RAID system includes N storage nodes. And each storage node is composed of at least one storage hard disk.
  • the storage hard disk may be a local hard disk or a local LUN (Logical Unit Number), or may be connected through a network or a Serial Attached SCSI (SAS) bus.
  • SAS Serial Attached SCSI
  • each of the N storage nodes is divided into virtual storage disks of the same size.
  • the virtual storage disks may be referred to as CK (chunk), and the M CKs constitute virtual storage with a certain redundancy relationship.
  • CKG (chunk Group), wherein the number of CKs in each CKG in the RAID system is not necessarily the same, and the number of CKs selected from each storage hard disk is not necessarily the same for each CKG.
  • the above CKG is virtual stored by X block data
  • the RAID system expansion method specifically includes the following steps:
  • the RAID system expansion device calculates a new virtual storage hard disk distribution table according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system.
  • the parameter of the virtual storage disk group includes at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in each virtual storage disk group;
  • the storage node weight list is the usage rate of the storage space of the storage disk of the current storage node.
  • the identifier of the virtual storage disk group is the identifier of each virtual storage disk group of the RAID system, and each of the RAID systems The number of virtual storage disks in a virtual storage disk group can be different.
  • the above-mentioned new virtual storage hard disk distribution table includes the distribution position of each virtual storage hard disk in the current RAID system (that is, the RAID system after the storage node is added), specifically, the above-mentioned new virtual storage hard disk distribution table is compared.
  • the original virtual storage disk distribution table The number of data virtual storage disks in each virtual storage disk group in the current RAID system remains unchanged. The number of virtual storage disks Y is changed.
  • the parameters of each virtual storage disk are obtained, and the new virtual storage disk distribution table is calculated according to the parameters and the distribution algorithm of the obtained virtual storage disk group.
  • the obtained new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table, and according to the calculation formula of the space utilization ratio of the RAID system (X/(X+Y)), the present invention can be seen.
  • the AID system expansion device migrates or deletes the virtual storage hard disk in each virtual storage disk group according to the distribution location of each virtual storage disk in the new virtual storage disk distribution table.
  • the storage node After the storage node is added to the RAID system, part of the data of the original storage node needs to be migrated to the newly added storage node to maintain the balance of the data of each storage node. Before the data migration, the data needs to be newly acquired.
  • the parameters of the virtual storage hard disk are calculated by a distribution algorithm to calculate a new virtual storage hard disk distribution table and compared with the current virtual storage hard disk distribution to know which data needs to be migrated or deleted.
  • the RAID system expansion method provided by the embodiment of the present invention, when the RAID system is expanded, the new virtual storage calculated according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added)
  • the disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged.
  • the number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed.
  • the distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention
  • An embodiment of the present invention provides a method for expanding a redundant array of independent disks. As shown in FIG. 2, the method for expanding a volume includes the following steps:
  • the RAID system expansion device obtains parameters of the virtual storage disk group.
  • the RAID system expansion device first acquires a storage object directory stored in the current RAID system (that is, a RAID system after the storage node is added), where the storage object directory includes the storage in the RAID system.
  • the storage address of each storage object sequentially reads the address of each storage object in the storage object directory, thereby sequentially traversing each virtual storage disk group corresponding to each storage object address in the storage object directory, and further Obtain the storage disk group parameters corresponding to each storage disk group in the RAID system.
  • taking any storage object as an example first, reading the address of any storage object from the storage object directory, thereby searching according to the storage corresponding address.
  • All the virtual storage disk groups in which the storage object data is stored are stored, and then each virtual storage disk group corresponding to any storage object is traversed in order to obtain the storage disk group of each storage disk group of the storage object. parameter.
  • the same storage object only needs to obtain the virtual storage disk group parameter of the virtual storage disk group corresponding to the storage object.
  • the parameters of all virtual storage disk groups corresponding to the storage object includes any one or more of the following: a file, a logical unit LUN, and an object. It should be noted that the user can access all the storage objects in the RAID system through each storage node.
  • the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table.
  • the number of data virtual storage hard disks in each virtual storage disk group in the current RAID system remains unchanged, and the number of virtual storage hard disks is verified. Y changes.
  • the AID system expansion device calculates a new virtual storage hard disk distribution table of the virtual storage disk group by using a distribution algorithm and parameters of the virtual storage disk group.
  • the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table, and according to the calculation formula of the space utilization ratio of the RAID system (X/(X+Y)), the present invention is maintained by
  • the number of data virtual storage disks X in each virtual storage disk group is unchanged, and the number of verified virtual storage disks Y is dynamically adjusted, thereby improving the space utilization of the RAID system, and since the number of Xs is kept unchanged, only Modifying the number of Y reduces the amount of data that needs to be migrated.
  • the redundancy algorithm supports the reduction of Y, it is not necessary to recalculate the check, thereby ensuring high space utilization, making the RAID system The amount of calculation is greatly reduced.
  • the parameters of the virtual storage disk group include the following at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in each virtual storage disk group.
  • the storage node weight list is the usage rate of the storage space of the current storage disk of each storage node
  • the identifier of the virtual storage disk group is the identifier of each virtual storage disk group of the RAID system, and the RAID system
  • the number of virtual storage disks in each virtual storage disk group can be different.
  • the AID system expansion device determines the current state according to the new virtual storage hard disk distribution table. Whether the virtual storage disk in the virtual storage disk group is the verification virtual storage disk that needs to be deleted.
  • step 207 If the current virtual storage hard disk is a verification virtual storage hard disk that needs to be deleted, then go to step 207.
  • the virtual storage hard disk in the virtual storage disk group is determined to be a virtual storage hard disk to be deleted, the virtual storage hard disk is traversed by each virtual storage hard disk in the current RAID system.
  • the storage hard disk of a storage node may be sequentially traversed according to the order of the array or randomly, or the storage hard disk of each storage node may be traversed at the same time; then, when traversing the storage hard disk of a storage node, Each virtual storage disk group is traversed in turn, and each virtual storage disk group can also be traversed in parallel at the same time.
  • traversing a virtual storage disk group you can traverse each virtual storage disk in the virtual storage disk group in turn, or traverse each virtual storage disk in the virtual storage disk group in parallel.
  • the AID system expansion device determines, according to the new virtual storage hard disk distribution table, whether the location of the current virtual storage hard disk matches the position in the new virtual storage hard disk distribution table.
  • step 205 If the current virtual storage hard disk does not match the location in the virtual storage hard disk distribution table, then go to step 205. If the current virtual storage hard disk matches the position in the virtual storage hard disk distribution table, then go to step 206.
  • the RAID system expansion device copies the data in the current virtual storage hard disk to the storage hard disk of the newly added storage node, and deletes the data in the current virtual storage hard disk and the current virtual storage hard disk at the original location.
  • the virtual storage hard disk CK0 in the existing distribution table of the virtual storage hard disk is located at the storage node a
  • the virtual storage hard disk CK1 is located at the storage node b.
  • the CK0 is located at the storage node c
  • the CK1 is at the storage node d. Then CK0 needs to migrate from storage node a to storage node c, and CK1 needs to migrate from storage node b to storage node d.
  • the RAID system expansion device keeps the current virtual storage hard disk position unchanged.
  • the RAID system expansion device deletes the verification data in the current virtual storage hard disk and the current virtual storage hard disk. Specifically, after the storage node is added to the RAID system, part of the data of the original storage node is migrated to the newly added storage node to maintain the balance of the data of each storage node.
  • the parameters of the storage disk group are calculated, and a new virtual storage disk distribution table is calculated by using a distribution algorithm, and the new virtual storage disk distribution table is compared with the specific distribution location of the current virtual storage disk, so as to know which data needs to be migrated. Those that need to be deleted to implement the expansion method of the present invention.
  • the expansion method provided by the present invention is applicable not only to a RAID system composed of multiple storage nodes, but also to a RAID system composed of multiple storage hard disks in a single storage node. There is no limitation here, and the expansion method of the present invention can be implemented as long as the scenario of the RAID system is satisfied.
  • each location corresponding to the location is calculated.
  • the virtual storage disk group corresponds to which storage node, and the identifier of each virtual storage disk group, and then each virtual disk corresponding to the file is viewed according to the parameters of each virtual storage disk group corresponding to the obtained file.
  • the storage disk group is established, if it is established, write data to the corresponding location in the virtual storage disk group, and update the verification; if the RAID system does not find each virtual storage disk corresponding to the file
  • the identifier of the group is calculated by using a distribution algorithm, and the virtual storage hard disk in the virtual storage disk group is specifically distributed on which storage node, and then the virtual storage hard disk is created in each storage node, and each file corresponding to the file is marked.
  • a virtual storage disk group has been created, and finally the data is written to each virtual storage corresponding to the file. The corresponding position in the disk stack, and update the checksum.
  • the RAID system expansion method provided by the embodiment of the present invention, when the RAID system is expanded, the new virtual storage calculated according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added)
  • the disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged.
  • the number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed.
  • the distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention
  • By keeping the number of X not Change only modify the number of Y to data equalization of the expanded RAID system, thereby greatly reducing the amount of data transferred and the amount of calculation.
  • the virtual storage hard disk CK distribution table of the virtual storage disk group CKG shown in FIG. 3 is taken as an example.
  • the CKG is composed of 12 CKs of three storage nodes, wherein the redundancy relationship of each CK in the CKG is 8+4.
  • a new CK distribution table of the CKG as shown in FIG. 4 is obtained by calculation. From FIG. 4, it can be seen that the redundancy relationship of each CK in the CKG becomes 8+3, so that the space utilization rate is 8/12 changed to 8/11.
  • the space utilization can be increased again.
  • the space utilization cannot be improved.
  • the capacity expansion and data migration process of this embodiment is as follows:
  • the original redundancy relationship of each CK is 8+4.
  • a new CK distribution table of each CK in the CKG can be obtained, and the existing CK distribution position is as shown in FIG.
  • the comparison of the new CK distribution table shown shows that CK0 ⁇ CK2 on the storage node 0 on the CKG, CK4 ⁇ CK6 on the storage node 1, and CK8 CK10 on the storage node 2 do not need to be migrated because the position is unchanged.
  • the expansion device since there is no need to calculate the check, the expansion device does not need to read the CKs whose positions are unchanged, such as the data on CK0 ⁇ CK2, CK4 ⁇ CK6, CK8 CK10, which can save a lot of Hard disk IO (Input/Output, input/output) and network bandwidth, as well as a large number of CPU (Central Processing Unit) resources, to reduce the impact on the business when expanding.
  • the number of check CKs is reduced, the inter-node migration that may occur due to the deleted check CK is avoided, and the hard disk 10 and the network bandwidth are saved; the deleted check CK space can be recycled, and the system is also improved. Space utilization.
  • the RAID system expansion method provided by the embodiment of the present invention, when the RAID system is expanded, the new virtual storage calculated according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added)
  • the disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged.
  • the number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed.
  • the distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention
  • An embodiment of the present invention provides a RAID system expansion device, wherein the RAID system includes N storage nodes, and each of the N storage nodes is mapped. Divided into virtual storage disks of the same size, the M virtual storage disks form a virtual storage disk group with redundant relationship.
  • the distribution table calculation unit 3 1 is configured to calculate a new virtual storage hard disk distribution table according to parameters and a distribution algorithm of the virtual storage disk group in the current RAID system when a storage node is added in the RAID system.
  • the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table.
  • the number of data virtual storage hard disks in each virtual storage disk group in the current RAID system remains unchanged, and the number of virtual storage hard disks Y is verified. Variety.
  • the migration unit 32 is configured to migrate or delete the virtual storage hard disk in each virtual storage disk group according to the distribution location of each virtual storage disk in the new virtual storage disk distribution table calculated by the distribution table computing unit 31.
  • the RAID system expansion device calculates a new virtual storage according to a parameter and a distribution algorithm of a virtual storage disk group in a current RAID system (ie, a RAID system after the storage node is added) when the RAID system is expanded.
  • the disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged.
  • the number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed.
  • the distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention
  • the distribution table calculation unit 31 includes: a parameter acquisition module 3 1 1 and a distribution table calculation module 312, where:
  • the parameter obtaining module 31 is configured to obtain parameters of the virtual storage disk group when the storage node is added to the RAID system.
  • a distribution table calculation module 3 12, configured to obtain by the distribution algorithm and the parameter acquisition unit 3 1 1
  • the parameters of the virtual storage disk group calculate the new virtual storage disk distribution table of the virtual storage disk group.
  • the virtual storage disk group parameter includes the following at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in the virtual storage disk group;
  • the node weight list is the usage rate of the storage space of the storage disk currently stored by each storage node.
  • the migration unit 32 includes: a first determining module 321, a second determining module 322, and a migration module 323, where:
  • the first determining module 321, is configured to determine, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a verified virtual storage hard disk that needs to be deleted.
  • the second determining module 322 is configured to determine, according to the new virtual storage hard disk distribution table, whether the location of the current virtual storage hard disk matches the position in the new virtual storage hard disk distribution table, if the first determining module 321 determines that the result is no.
  • the migration module 323 is configured to delete the verification data in the current virtual storage hard disk and the current virtual storage hard disk if the first determination module 321 determines that the result is yes.
  • the migration module 323 is further configured to: if the second determination module 322 determines that the result is no, copy the data in the current virtual storage hard disk to the storage hard disk of the newly added storage node, and Data deletion in the virtual storage hard disk and the current virtual storage hard disk; if the second determination module 322 determines that the result is yes, the current virtual storage hard disk location is kept unchanged.
  • the RAID system expansion device calculates a new virtual storage according to a parameter and a distribution algorithm of a virtual storage disk group in a current RAID system (ie, a RAID system after the storage node is added) when the RAID system is expanded.
  • the disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged.
  • the number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed.
  • An embodiment of the present invention provides a RAID system expansion device, as shown in FIG. 7, wherein the RAID system includes N storage nodes, and each of the N storage nodes is divided into the same size.
  • the virtual storage hard disk and the M virtual storage hard disks form a virtual storage disk group with redundant relationship.
  • the data virtual storage hard disk stores the data block
  • the verification virtual storage hard disk stores the verification block.
  • the expansion device is configured to implement the foregoing expansion method of the RAID system.
  • the expansion device includes: the processor 41 and the communication unit 42.
  • the processor 41 and the communication interface 42 described above are coupled together by a bus system.
  • the bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 7, but it does not mean that there is only one bus or one type of bus. among them:
  • the processor 41 can be: a central processing unit (CPU), an application specific integrated circuit (ASIC), a digital signal processor (DSP), an off-the-shelf programmable gate array (FPGA), or the like. Programmable logic device.
  • the communication unit 42 is for providing instructions and data information to the processor 41, and the processor 41 is connected via a bus.
  • the communication unit 42 is for providing the processor 41 with data and instructions based on the RAID system.
  • the processor 41 is configured to calculate a new virtual storage hard disk distribution table according to a parameter and a distribution algorithm of the virtual storage disk group acquired by the communication unit 42 when the storage node is added in the RAID system.
  • the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table.
  • the number of data virtual storage hard disks in each virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added) remains unchanged. Change, verify that the number of virtual storage hard disks Y changes.
  • the processor 41 is further configured to migrate or delete the virtual storage hard disk in each virtual storage disk group according to the distribution location of each virtual storage disk in the new virtual storage disk distribution table. Except.
  • the processor 41 is specifically configured to: when the storage node is added to the RAID system, receive the instruction sent by the communication unit 42, obtain the parameter of the virtual storage disk group through the communication unit 42; and use the distribution algorithm and the parameter of the virtual storage disk group Calculate the new virtual storage hard disk distribution table for the virtual storage disk group.
  • the virtual storage disk group parameter includes the following at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in the virtual storage disk group;
  • the node weight list is the usage rate of the storage space of the storage disk currently stored by each storage node.
  • the processor 41 is configured to determine, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a verified virtual storage hard disk that needs to be deleted; if the current virtual storage hard disk is not a verified virtual storage hard disk that needs to be deleted According to the new virtual storage hard disk distribution table, it is determined whether the current virtual storage hard disk is in the same position as the new virtual storage hard disk distribution table; if the current virtual storage hard disk is the verified virtual storage hard disk to be deleted, the current deletion is deleted. Verification data in the virtual storage hard disk and the current virtual storage hard disk.
  • the processor 41 is further configured to: if the current virtual storage hard disk does not match the location in the virtual storage hard disk distribution table, copy the data in the current virtual storage hard disk to the storage hard disk of the newly added storage node, The data in the current virtual storage hard disk and the current virtual storage hard disk in the original location is deleted; if the current virtual storage hard disk matches the position in the virtual storage hard disk distribution table, the current virtual storage hard disk location is maintained.
  • the RAID system expansion device calculates a new virtual storage according to a parameter and a distribution algorithm of a virtual storage disk group in a current RAID system (ie, a RAID system after the storage node is added) when the RAID system is expanded.
  • the disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged.
  • the number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed.
  • the disclosed systems, apparatus, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combined or can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or other form.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a USB flash drive, a removable hard disk, a read-only memory (ROM), A medium that can store program codes, such as a random access memory (RAM), a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Embodiments of the present invention relate to the technical field of information networks. Provided are a system expansion method and apparatus for a redundant array of independent disks (RAID). The method and the apparatus can improve the utilization rate of system storage space and ensure a minimum data migration volume. The method comprises: when a storage node is added to an RAID system, calculating a new virtual storage hard disk distribution table according to a parameter of a virtual storage hard disk group in a current RAID system and to a distribution algorithm; when the new virtual storage hard disk distribution table is compared with an original virtual storage disk distribution table, a number X of data virtual storage hard disks in each virtual storage hard disk group of the current RAID system remains unchanged, and a number Y of verification virtual storage hard disks changes; and migrating or deleting the virtual storage hard disk in the virtual storage hard disk group according to the distribution location of the virtual storage hard disk in the new virtual storage hard disk distribution table.

Description

一种独立磁盘冗余阵列 RAID系统扩容方法及装置  Redundant array of independent disks RAID system expansion method and device
技术领域 Technical field
本发明涉及信息网络技术领域, 尤其涉及一种独立磁盘冗余阵列 RAID系统扩容方法及装置。  The present invention relates to the field of information network technologies, and in particular, to a method and an apparatus for expanding a redundant array of independent disks.
背景技术  Background technique
在通信网络中, 每个节点设备都具有一个独立的存储单元, 该存储 单元可以是本地存储硬盘或本地 LUN ( Logical Unit Number, 逻辑单 元),也可以是通过网络或者 SAS ( Serial Attached SCSI , 串行连接 SCSI In a communication network, each node device has a separate storage unit, which may be a local storage hard disk or a local LUN (Logical Unit Number), or may be a serial attached SCSI (SAS). Row connection SCSI
(小型计算机系统接口 ) )总线连接的其他属于这个节点的专属存储单 元。并且为了解决单块磁盘的数据可靠性和性能问题,人们提出了 RAID(Small Computer System Interface) The other dedicated storage unit belonging to this node that is connected to the bus. And in order to solve the data reliability and performance problems of a single disk, people have proposed RAID
( edundant Arrays of Inexpensive Disks, 独立磁盘冗余阵歹1 J )技术, 即 在各个节点设备上运行 "带节点间 RAID技术的软件" , 从而将每个节 点设备作为一个存储节点, 并将这些存储节点组成一个虚拟的 RAID系 统, 具体的, 该技术负责将各个存储节点的存储硬盘统筹起来, 组织成 对外可以统一访问的存储空间,这里的存储空间可以认为是一个虚拟单 台大容量的硬盘。 同时, 为了满足由众多存储节点成的 RAID系统的约 束, 通常会釆用虚拟化的节点间 RAID方案来组织数据, 具体的, 是将 每个存储节点上的存储硬盘以一定大小为单位将存储硬盘空间划分为 多个虚拟存储硬盘,并将这些不同存储硬盘上的虚拟存储硬盘之间建立 冗余关系。 因此, 当有某个存储节点的存储硬盘中的数据出现丟失或损 坏时, 可以根据上述的冗余关系来恢复该存储节点的数据。 (edundant Arrays of Inexpensive Disks, 1 J) technology, which runs "software with inter-node RAID technology" on each node device, thus using each node device as a storage node and storing these The nodes form a virtual RAID system. Specifically, the technology is responsible for coordinating the storage disks of the storage nodes and organizing them into a storage space that can be uniformly accessed. The storage space here can be regarded as a virtual single large-capacity hard disk. At the same time, in order to meet the constraints of the RAID system formed by many storage nodes, the virtualized inter-node RAID scheme is usually used to organize the data. Specifically, the storage hard disk on each storage node is stored in a certain size. The hard disk space is divided into multiple virtual storage disks, and redundant relationships are established between the virtual storage disks on the different storage disks. Therefore, when data in a storage hard disk of a storage node is lost or damaged, the data of the storage node can be restored according to the redundancy relationship described above.
当需要在上述的 RAID系统中增加新的存储节点时, 即在该 RAID 系统实现扩容的情况下,现有技术通常是保持原有的各虚拟存储硬盘之 间的冗余关系不变, 只作存储节点间数据均衡的处理, 从而使得 RAID 系统存储空间利用率过低, 数据迁移量过大。  When a new storage node needs to be added to the RAID system, that is, when the RAID system is expanded, the existing technology generally maintains the redundancy relationship between the original virtual storage hard disks. The processing of data balancing between storage nodes makes the storage space utilization of the RAID system too low and the data migration amount is too large.
因此, 在 RAID系统实现扩容的情况下, 如何在保证高的 RAID系 统空间利用率的同时, 并减少数据的迁移量, 是目前业界期待解决的问 题。 发明内容 Therefore, in the case of RAID system expansion, how to ensure high RAID system space utilization while reducing data migration is a problem that the industry is expected to solve. Summary of the invention
本发明的实施例提供一种独立磁盘冗余阵列 RAID系统扩容的方法 及装置,提高了系统存储空间的利用率的同时,并降低了数据的迁移量。  Embodiments of the present invention provide a method and apparatus for expanding a redundant array of independent disks, thereby improving the utilization of the storage space of the system and reducing the amount of data migration.
为达到上述目的, 本发明的实施例釆用如下技术方案:  In order to achieve the above object, embodiments of the present invention use the following technical solutions:
第一方面, 提供一种独立磁盘冗余阵列 RAID系统扩容方法, 所述 RAID系统包含 N个存储节点,且所述 N个存储节点中的每个存储硬盘 均被划分成相同大小的虚拟存储硬盘, M个虚拟存储硬盘组成具有冗余 关系的虚拟存储硬盘组,所述虚拟存储硬盘组是由 X块数据虚拟存储硬 盘和 Y块校验虚拟存储硬盘组成, M=X+Y, 所述数据虚拟存储硬盘存 储数据块, 所述校验虚拟存储硬盘存储校验块, 所述方法包括:  The first aspect provides a method for expanding a redundant array of independent disks, wherein the RAID system includes N storage nodes, and each of the N storage nodes is divided into virtual storage disks of the same size. The M virtual storage disks constitute a virtual storage disk group having a redundant relationship, and the virtual storage disk group is composed of an X block data virtual storage hard disk and a Y block parity virtual storage hard disk, M=X+Y, the data. The virtual storage hard disk stores the data block, and the verification virtual storage hard disk stores the verification block, and the method includes:
当所述 RAID系统增加存储节点时, 根据当前 RAID系统中所述虚 拟存储硬盘组的参数和分布算法计算新的虚拟存储硬盘分布表; 所述新 的虚拟存储硬盘分布表相比原有的虚拟存储硬盘分布表, 所述当前 RAID 系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X 保持不 变, 校验虚拟存储硬盘数目 Y发生变化;  When the storage system is added to the RAID system, the new virtual storage hard disk distribution table is calculated according to the parameter and the distribution algorithm of the virtual storage disk group in the current RAID system; the new virtual storage hard disk distribution table is compared with the original virtual The storage disk distribution table, in which the number of data virtual storage disks in each virtual storage disk group in the current RAID system remains unchanged, and the number Y of the virtual storage disks is changed.
按照所述新的虚拟存储硬盘分布表中虚拟存储硬盘的分布位置将 所述虚拟存储硬盘组中的虚拟存储硬盘进行迁移或删除。  The virtual storage hard disks in the virtual storage disk group are migrated or deleted according to the distribution location of the virtual storage disks in the new virtual storage disk distribution table.
在第一种可能的实现方式中, 根据第一方面, 所述当所述 RAID系 统中增加存储节点时, 根据当前 RAID系统中所述虚拟存储硬盘组的参 数和分布算法计算新的虚拟存储硬盘分布表包括:  In a first possible implementation manner, according to the first aspect, when a storage node is added to the RAID system, a new virtual storage hard disk is calculated according to a parameter and a distribution algorithm of the virtual storage disk group in the current RAID system. The distribution table includes:
当所述 RAID系统增加所述存储节点时, 获取所述虚拟存储硬盘组 的参数;  Obtaining parameters of the virtual storage disk group when the RAID system adds the storage node;
通过所述分布算法及所述虚拟存储硬盘组的参数计算所述虚拟存 储硬盘组的新的虚拟存储硬盘分布表。  Calculating a new virtual storage hard disk distribution table of the virtual storage disk group by using the distribution algorithm and parameters of the virtual storage disk group.
在第二种可能的实现方式中,结合第一方面或第一种可能的实现方 式,所述虚拟存储硬盘组的参数包括下面的至少一种:存储节点地址 ID 列表、 存储节点权重列表、 所述虚拟存储硬盘组的标识和所述虚拟存储 硬盘组中的虚拟存储硬盘的数目; 其中所述存储节点权重列表为每个存 储节点当前存储硬盘的存储空间的使用率。 In a second possible implementation manner, in combination with the first aspect or the first possible implementation manner, the parameters of the virtual storage disk group include at least one of the following: a storage node address ID list, a storage node weight list, a The identifier of the virtual storage disk group and the number of virtual storage disks in the virtual storage disk group; wherein the storage node weight list is for each storage The storage space of the storage node currently storing the hard disk.
在第三种可能的实现方式中, 根据第一方面, 所述按照所述新的虚 拟存储硬盘分布表中虚拟存储硬盘的分布位置将所述虚拟存储硬盘组 中的虚拟存储硬盘进行迁移或删除包括: 根据所述新的虚拟存储硬盘分布表判断当前的虚拟存储硬盘是否 是需要删除的校验虚拟存储硬盘;  In a third possible implementation manner, according to the first aspect, the virtual storage hard disk in the virtual storage disk group is migrated or deleted according to the distribution location of the virtual storage hard disk in the new virtual storage disk distribution table. The method includes: determining, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a verified virtual storage hard disk that needs to be deleted;
若所述当前虚拟存储硬盘不是需要删除的校验虚拟存储硬盘,则根 据所述新的虚拟存储硬盘分布表判断所述当前虚拟存储硬盘所处位置 是否和所述新的虚拟存储硬盘分布表中的位置相符;  If the current virtual storage hard disk is not a verification virtual storage hard disk that needs to be deleted, determining, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is located and the new virtual storage hard disk distribution table. The position of the match;
若所述当前虚拟存储硬盘是需要删除的校验虚拟存储硬盘,则删除 所述当前虚拟存储硬盘及所述当前虚拟存储硬盘中的校验数据。  If the current virtual storage hard disk is a verification virtual storage hard disk that needs to be deleted, the verification data in the current virtual storage hard disk and the current virtual storage hard disk is deleted.
在第四种可能的实现方式中, 根据第三种可能的实现方式, 所述根 据所述新的虚拟存储硬盘分布表判断所述当前虚拟存储硬盘所处位置 是否和所述新的虚拟存储硬盘分布表中的位置相符之后, 还包括: 若所述当前的虚拟存储硬盘与所述虚拟存储硬盘分布表中的位置 不相符,则将所述当前的虚拟存储硬盘中数据复制到新增加的存储节点 的存储硬盘中,并将所述当前的虚拟存储硬盘及所述当前的虚拟存储硬 盘中的数据删除;  In a fourth possible implementation, according to the third possible implementation manner, determining, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is located and the new virtual storage hard disk After the locations in the distribution table are consistent, the method further includes: if the current virtual storage hard disk does not match the location in the virtual storage hard disk distribution table, copying the data in the current virtual storage hard disk to the newly added storage Deleting the data in the current virtual storage hard disk and the current virtual storage hard disk;
若所述当前的虚拟存储硬盘与所述虚拟存储硬盘分布表中的位置 相符, 则保持所述当前虚拟存储硬盘位置不变。  If the current virtual storage hard disk matches the location in the virtual storage hard disk distribution table, the current virtual storage hard disk location is kept unchanged.
第二方面, 提供一种独立磁盘冗余阵列 RAID系统扩容装置, 所述 RAID系统包含 N个存储节点,且所述 N个存储节点中的每个存储硬盘 均被划分成相同大小的虚拟存储硬盘, M个虚拟存储硬盘组成具有冗余 关系的虚拟存储硬盘组,所述虚拟存储硬盘组是由 X块数据虚拟存储硬 盘和 Y块校验虚拟存储硬盘组成, M=X+Y, 所述数据虚拟存储硬盘存 储数据块, 所述校验虚拟存储硬盘存储校验块, 所述装置包括:  In a second aspect, a RAID expansion system for a redundant array of independent disks is provided. The RAID system includes N storage nodes, and each of the N storage nodes is divided into virtual storage disks of the same size. The M virtual storage disks constitute a virtual storage disk group having a redundant relationship, and the virtual storage disk group is composed of an X block data virtual storage hard disk and a Y block parity virtual storage hard disk, M=X+Y, the data. The virtual storage hard disk stores a data block, and the verification virtual storage hard disk stores a check block, where the device includes:
分布表计算单元, 用于当所述 RAID系统中增加存储节点时, 根据 当前 RAID系统中所述虚拟存储硬盘组的参数和分布算法计算新的虚拟 存储硬盘分布表; 所述新的虚拟存储硬盘分布表相比原有的虚拟存储硬 盘分布表, 所述当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储 硬盘数目 X保持不变, 校验虚拟存储硬盘数目 Y发生变化; a distribution table calculation unit, configured to calculate a new virtual node according to a parameter and a distribution algorithm of the virtual storage disk group in the current RAID system when the storage node is added to the RAID system The storage virtual disk distribution table; the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table, and the number of data virtual storage hard disks in each virtual storage disk group in the current RAID system remains unchanged, and the verification is performed. The number of virtual storage hard disks Y changes;
迁移单元,用于按照所述分布表计算单元计算的所述新的虚拟存储 硬盘分布表中各虚拟存储硬盘的分布位置将所述每个虚拟存储硬盘组 中的虚拟存储硬盘进行迁移或删除。  And a migration unit, configured to migrate or delete the virtual storage hard disk in each virtual storage disk group according to a distribution location of each virtual storage disk in the new virtual storage disk distribution table calculated by the distribution table computing unit.
在第一种可能的实现方式中, 根据第二方面, 所述分布表计算单元 包括:  In a first possible implementation manner, according to the second aspect, the distribution table calculation unit includes:
参数获取模块, 用于当所述 RAID系统中增加所述存储节点时, 获 取所述虚拟存储硬盘组的参数;  a parameter obtaining module, configured to obtain a parameter of the virtual storage disk group when the storage node is added to the RAID system;
分布表计算模块,用于通过所述分布算法及所述参数获取单元获取 的所述虚拟存储硬盘组的参数计算所述虚拟存储硬盘组的所述新的虚 拟存储硬盘分布表。  a distribution table calculation module, configured to calculate, by using the distribution algorithm and parameters of the virtual storage disk group obtained by the parameter obtaining unit, the new virtual storage disk distribution table of the virtual storage disk group.
在第二种可能的实现方式中,结合第二方面或第一种可能的实现方 式,所述虚拟存储硬盘组的参数包括下面的至少一种:存储节点地址 ID 列表、 存储节点权重列表、 所述虚拟存储硬盘组的标识和所述虚拟存储 硬盘组中的虚拟存储硬盘的数目; 其中所述存储节点权重列表为每个存 储节点当前存储硬盘的存储空间的使用率。  In a second possible implementation manner, in combination with the second aspect or the first possible implementation manner, the parameters of the virtual storage disk group include at least one of the following: a storage node address ID list, a storage node weight list, a The identifier of the virtual storage disk group and the number of virtual storage disks in the virtual storage disk group; wherein the storage node weight list is the usage rate of the storage space of the current storage disk of each storage node.
在第三种可能的实现方式中, 根据第二方面, 所述迁移单元包括: 第一判断模块,用于根据所述新的虚拟存储硬盘分布表判断当前的 虚拟存储硬盘是否是需要删除的校验虚拟存储硬盘;  In a third possible implementation, according to the second aspect, the migration unit includes: a first determining module, configured to determine, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a school that needs to be deleted Verify the virtual storage hard disk;
第二判断模块, 用于若所述第一判断模块判断结果为否, 则根据所 述新的虚拟存储硬盘分布表判断所述当前虚拟存储硬盘所处位置是否 和所述新的虚拟存储硬盘分布表中的位置相符;  a second determining module, configured to determine, according to the new virtual storage hard disk distribution table, whether the location of the current virtual storage hard disk and the new virtual storage hard disk are distributed according to the new virtual storage hard disk distribution table The positions in the table match;
迁移模块, 用于若所述第一判断模块判断结果为是, 则删除所述当 前虚拟存储硬盘及所述当前虚拟存储硬盘中的校验数据。  And a migration module, configured to delete the verification data in the current virtual storage hard disk and the current virtual storage hard disk if the first determining module determines that the result is yes.
在第四种可能的实现方式中, 根据第三种可能的实现方式: 所述迁移模块, 还用于若所述第二判断模块判断结果为否, 则将所 述当前的虚拟存储硬盘中数据复制到新增加的存储节点的存储硬盘中, 并将原位置处的所述当前的虚拟存储硬盘及所述当前的虚拟存储硬盘 中的数据删除; 用于若所述第二判断模块判断结果为是, 则保持所述当 前虚拟存储硬盘位置不变。 In a fourth possible implementation, according to the third possible implementation manner, the migration module is further configured to: if the second determining module determines that the result is negative, The data in the current virtual storage hard disk is copied to the storage hard disk of the newly added storage node, and the data in the current virtual storage hard disk and the current virtual storage hard disk at the original location is deleted; If the judgment result of the second judging module is yes, the position of the current virtual storage hard disk is kept unchanged.
本发明的实施例提供的 RAID系统扩容方法及装置, 当 RAID系统 扩容时, 根据当前 RAID系统 (即增加存储节点后的 RAID系统) 中的 虚拟存储硬盘组的参数和分布算法计算出的新的虚拟存储硬盘分布表, 使得当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X 不变,校验虚拟存储硬盘数目 Y发生变化, 然后按照该新的虚拟存储硬 盘分布表中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚 拟存储硬盘进行迁移或删除, 从而提升了系统存储空间的利用率, 并且 与现有技术相比, 在空间利用率相同的情况下, 由于本发明通过保持 X 的数目不变,只对 Y的数目进行修改的方式来对扩容后的 RAID系统进 行数据均衡化, 从而大大的减少了迁移的数据量和计算量。  The RAID system expansion method and device provided by the embodiment of the present invention, when the RAID system is expanded, the new calculation is performed according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added) The virtual storage disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged, the number of virtual storage disks Y is changed, and then the virtual disks in the new virtual storage disk are distributed. The storage location of the storage disk is used to migrate or delete the virtual storage disk in each virtual storage disk group, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, The invention balances the data of the expanded RAID system by keeping the number of X unchanged, and only modifying the number of Ys, thereby greatly reducing the amount of data and the amount of calculation.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描 述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图 仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出 创造性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in view of the drawings.
图 1为本发明实施例提供的一种 RAID系统扩容方法流程示意图; 图 2 为本发明实施例提供的另一种 RAID 系统扩容方法流程示意 图;  1 is a schematic flowchart of a method for expanding a RAID system according to an embodiment of the present invention; FIG. 2 is a schematic flowchart of another method for expanding a RAID system according to an embodiment of the present invention;
图 3 为本发明实施例提供的一种虚拟存储硬盘组的虚拟存储硬盘 分布的示意图;  FIG. 3 is a schematic diagram of a virtual storage hard disk distribution of a virtual storage disk group according to an embodiment of the present disclosure;
图 4 为本发明实施例提供的另一种虚拟存储硬盘组的虚拟存储硬 盘新的分布的示意图;  4 is a schematic diagram of a new distribution of a virtual storage hard disk of another virtual storage disk group according to an embodiment of the present invention;
图 5为本发明实施例提供的一种 RAID系统扩容装置结构示意图; 图 6 为本发明实施例提供的另一种 RAID 系统扩容装置结构示意 图; FIG. 5 is a schematic structural diagram of a RAID system expansion device according to an embodiment of the present invention; FIG. 6 is a schematic structural diagram of another RAID system expansion device according to an embodiment of the present invention; Figure
图 7为本发明另一实施例提供的一种 RAID系统扩容设备结构示意 图。  FIG. 7 is a schematic structural diagram of a RAID system expansion device according to another embodiment of the present invention.
具体实施方式 detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案 进行清楚地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在 没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保 护的范围。  The technical solutions in the embodiments of the present invention will be clearly described in conjunction with the drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
现今, 为了解决单块磁盘中数据的可靠性和性能的问题, 出现了 RAID ( Redundant Arrays of Inexpensive Disks , 独立磁盘冗余阵歹1 J ) 技 术, 即利用该 RAID技术将若干存储节点的存储硬盘组成一个对外可以 统一访问的虚拟 RAID系统。 具体的, 由于本发明即适用于节点设备间 的冗余, 也适用于单个节点设备内的单块存储硬盘的冗余, 因此, 当该 存储节点为节点设备时, 则该 RAID系统是由若干节点设备中的每个节 点设备对应的存储硬盘组成; 当该存储节点为一个节点设备中的任一单 块存储硬盘时, 该 RAID系统是由一个节点设备中的每个单块存储硬盘 组成。 其中, 上述的节点设备为各种终端设备(如, PC机、服务器等), 而每个节点设备对应的存储硬盘是由至少一个单块硬盘组成。 Nowadays, to solve the problems of reliability and performance in a single block of data in the disk, there has been RAID (Redundant Arrays of Inexpensive Disks, Redundant Array of Independent Disks bad 1 J) technique, i.e. the use of the hard disk technology to store a plurality of RAID storage node Form a virtual RAID system that can be accessed uniformly. Specifically, the present invention is applicable to redundancy between node devices, and is also applicable to redundancy of a single storage hard disk in a single node device. Therefore, when the storage node is a node device, the RAID system is composed of several The storage hard disk corresponding to each node device in the node device is composed; when the storage node is any single storage hard disk in one node device, the RAID system is composed of each single storage hard disk in one node device. The foregoing node device is a variety of terminal devices (eg, a PC, a server, etc.), and the storage hard disk corresponding to each node device is composed of at least one single hard disk.
具体的, 上述的 RAID系统包含 N个存储节点。 且每个存储节点是 由至少一个存储硬盘组成。 其中, 上述的存储硬盘可以是本地硬盘或本 地 LUN ( Logical Unit Number, 逻辑单元) , 也可以是通过网络或者 SAS ( Serial Attached SCSI , 串行连接 SCSI (小型计算机系统接口 ) ) 总线连接的其他属于这个节点的专属存储单元。 其次, 上述的 N个存储 节点中的每个存储硬盘均被划分成相同大小的虚拟存储硬盘,该虚拟存 储硬盘可以称为 CK ( Chunk ) , 而 M个 CK组成具有一定冗余关系的 虚拟存储硬盘组 CKG ( Chunk Group ) , 其中, 该 RAID系统中的每个 CKG中的 CK数目不一定相同, 且每个 CKG从每个存储硬盘中所选取 的 CK数目也不一定相同, 具体的, 上述的 CKG是由 X块数据虚拟存 储硬盘和 Y块校验虚拟存储硬盘组成, Μ=Χ+Υ, 其中, 上述的数据虚 拟存储硬盘存储数据块, 上述的校验虚拟存储硬盘存储校验块。 基于上 述的对 RAID系统的描述, 本发明提供了一种新的 RAID系统扩容方法 及装置。 Specifically, the foregoing RAID system includes N storage nodes. And each storage node is composed of at least one storage hard disk. The storage hard disk may be a local hard disk or a local LUN (Logical Unit Number), or may be connected through a network or a Serial Attached SCSI (SAS) bus. The dedicated storage unit for this node. Secondly, each of the N storage nodes is divided into virtual storage disks of the same size. The virtual storage disks may be referred to as CK (chunk), and the M CKs constitute virtual storage with a certain redundancy relationship. CKG (chunk Group), wherein the number of CKs in each CKG in the RAID system is not necessarily the same, and the number of CKs selected from each storage hard disk is not necessarily the same for each CKG. Specifically, the above CKG is virtual stored by X block data The storage hard disk and the Y-block verification virtual storage hard disk are composed of Μ=Χ+Υ, wherein the data virtual storage hard disk stores the data block, and the verification virtual storage hard disk stores the verification block. Based on the above description of the RAID system, the present invention provides a new RAID system expansion method and apparatus.
具体的, 如图 1所示, 该 RAID系统扩容方法具体包括如下步骤: Specifically, as shown in FIG. 1 , the RAID system expansion method specifically includes the following steps:
101、 当 RAID系统中增加存储节点时, RAID系统扩容装置根据当 前 RAID系统中虚拟存储硬盘组的参数和分布算法计算新的虚拟存储硬 盘分布表。 101. When a storage node is added to the RAID system, the RAID system expansion device calculates a new virtual storage hard disk distribution table according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system.
其中, 上述的虚拟存储硬盘组的参数包括下面的至少一种: 存储节 点地址 ID列表、 存储节点权重列表、 虚拟存储硬盘组的标识和每个虚 拟存储硬盘组中的虚拟存储硬盘的数目; 其中上述的存储节点权重列表 为每个存储节点当前存储硬盘的存储空间的使用率,上述的虚拟存储硬 盘组的标识为该 RAID 系统的每个虚拟存储硬盘组的标识, 此外, 该 RAID系统的每个虚拟存储硬盘组中的虚拟存储硬盘数目可以不相同。 而上述的新的虚拟存储硬盘分布表包括该当前 RAID系统(即增加存储 节点后的 RAID系统) 中的每个虚拟存储硬盘的分布位置, 具体的, 上 述的新的虚拟存储硬盘分布表相比原有的虚拟存储硬盘分布表, 当前 RAID 系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X 保持不 变, 校验虚拟存储硬盘数目 Y发生变化。 此外, 在对 RAID系统进行扩 容时, 不仅可以增加一个存储节点, 也可以同时增加多个存储节点。  The parameter of the virtual storage disk group includes at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in each virtual storage disk group; The storage node weight list is the usage rate of the storage space of the storage disk of the current storage node. The identifier of the virtual storage disk group is the identifier of each virtual storage disk group of the RAID system, and each of the RAID systems The number of virtual storage disks in a virtual storage disk group can be different. The above-mentioned new virtual storage hard disk distribution table includes the distribution position of each virtual storage hard disk in the current RAID system (that is, the RAID system after the storage node is added), specifically, the above-mentioned new virtual storage hard disk distribution table is compared. The original virtual storage disk distribution table. The number of data virtual storage disks in each virtual storage disk group in the current RAID system remains unchanged. The number of virtual storage disks Y is changed. In addition, when expanding a RAID system, you can add not only one storage node but also multiple storage nodes at the same time.
具体的, 在 RAID系统中新增存储节点后, 通过获取每个虚拟存储 硬盘的参数, 进而根据前述获取的虚拟存储硬盘组的参数及分布算法, 计算出新的虚拟存储硬盘分布表。 此时, 将获取的新的虚拟存储硬盘分 布表与原有的虚拟存储硬盘分布表对比, 并根据 RAID系统的空间利用 率的计算公式(X/ ( X+Y ) ) 可以看出, 本发明是通过保持每个虚拟存 储硬盘组中数据虚拟存储硬盘数目 X不变,同时对校验虚拟存储硬盘数 目 Y进行动态调节, 从而提高的 RAID系统的空间利用率, 并且由于保 持了 X的数目不变, 只修改 Y的数目, 减少了需要迁移的数据量, 此 外, 由于冗余算法支持在 Y减少时, 可以不需要重新计算校验, 从而保 证了高的空间利用率的情况下, 使得该 RAID系统的计算量大大减少。 102、 AID系统扩容装置按照新的虚拟存储硬盘分布表中各虚拟存 储硬盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬盘进行迁移 或删除。 After the storage node is added to the RAID system, the parameters of each virtual storage disk are obtained, and the new virtual storage disk distribution table is calculated according to the parameters and the distribution algorithm of the obtained virtual storage disk group. At this time, the obtained new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table, and according to the calculation formula of the space utilization ratio of the RAID system (X/(X+Y)), the present invention can be seen. By keeping the number of data virtual storage disks X in each virtual storage disk group unchanged, and dynamically adjusting the number of verified virtual storage disks Y, thereby increasing the space utilization of the RAID system, and because the number of X is maintained, Change, only modify the number of Y, reduce the amount of data that needs to be migrated, and in addition, since the redundancy algorithm supports the reduction of Y, it is not necessary to recalculate the check, thereby ensuring high space utilization, so that The amount of computation of the RAID system is greatly reduced. 102. The AID system expansion device migrates or deletes the virtual storage hard disk in each virtual storage disk group according to the distribution location of each virtual storage disk in the new virtual storage disk distribution table.
具体的, 在 RAID系统中新增存储节点后, 需要将原有存储节点的 部分数据迁移到新增存储节点上, 以保持各个存储节点数据的均衡, 在 进行数据迁移之前, 需要按照新获取的虚拟存储硬盘的参数, 通过分布 算法计算出新的虚拟存储硬盘分布表,并和当前的虚拟存储硬盘分布进 行比对, 从而知道哪些数据需要进行迁移或删除。  Specifically, after the storage node is added to the RAID system, part of the data of the original storage node needs to be migrated to the newly added storage node to maintain the balance of the data of each storage node. Before the data migration, the data needs to be newly acquired. The parameters of the virtual storage hard disk are calculated by a distribution algorithm to calculate a new virtual storage hard disk distribution table and compared with the current virtual storage hard disk distribution to know which data needs to be migrated or deleted.
本发明的实施例提供的 RAID系统扩容方法,当 RAID系统扩容时, 根据当前 RAID系统(即增加存储节点后的 RAID系统) 中的虚拟存储 硬盘组的参数和分布算法计算出的新的虚拟存储硬盘分布表,使得当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X不变, 校 验虚拟存储硬盘数目 Y发生变化,然后按照该新的虚拟存储硬盘分布表 中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬 盘进行迁移或删除, 从而提升了系统存储空间的利用率, 并且与现有技 术相比,在空间利用率相同的情况下, 由于本发明通过保持 X的数目不 变,只对 Y的数目进行修改的方式来对扩容后的 RAID系统进行数据均 衡化, 从而大大的减少了迁移的数据量和计算量。  The RAID system expansion method provided by the embodiment of the present invention, when the RAID system is expanded, the new virtual storage calculated according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added) The disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged. The number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed. The distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention By keeping the number of X unchanged, only the number of Ys is modified to perform data equalization on the expanded RAID system, thereby greatly reducing the amount of data and the amount of computation.
本发明的实施例提供一种独立磁盘冗余阵列 RAID系统扩容方法, 如图 2所示, 该扩容方法具体包括如下步骤:  An embodiment of the present invention provides a method for expanding a redundant array of independent disks. As shown in FIG. 2, the method for expanding a volume includes the following steps:
201、 当 RAID系统中增加存储节点时, RAID系统扩容装置获取虚 拟存储硬盘组的参数。 201. When a storage node is added to the RAID system, the RAID system expansion device obtains parameters of the virtual storage disk group.
具体的, 当 RAID系统中增加存储节点后, RAID系统扩容装置首 先获取该当前 RAID系统(即增加存储节点后的 RAID系统) 中存储的 存储对象目录, 该存储对象目录包括该 RAID系统中存储的每个存储对 象的存储地址, 依次读取该存储对象目录中的每个存储对象的地址, 从 而依次遍历上述存储对象目录中的每个存储对象地址对应存储对象的 每个虚拟存储硬盘组, 进而获取该 RAID系统中的每个存储硬盘组对应 的存储硬盘组参数。 具体的, 以任一存储对象为例, 首先, 从该存储对 象目录中读取该任一存储对象的地址,从而根据该任一存储对应地址找 到存储该任一存储对象数据的所有虚拟存储硬盘组,然后依次遍历该任 一存储对象对应的每个虚拟存储硬盘组,从而获取到该任一存储对象的 每个存储硬盘组的存储硬盘组参数。 当然, 当该 RAID系统中的每个虚 拟存储硬盘中的虚拟存储硬盘数目都相同时, 同一个存储对象只需获取 该存储对象对应的一个虚拟存储硬盘组的虚拟存储硬盘组参数,来作为 该存储对象对应的所有虚拟存储硬盘组的参数。 其中, 上述的存储对象 包括以下任意一种或多种: 文件, 逻辑单元 LUN, 对象。 需要说明的 是,用户可以通过每个存储节点来访问该 RAID系统中的所有存储对象。 Specifically, after the storage node is added to the RAID system, the RAID system expansion device first acquires a storage object directory stored in the current RAID system (that is, a RAID system after the storage node is added), where the storage object directory includes the storage in the RAID system. The storage address of each storage object sequentially reads the address of each storage object in the storage object directory, thereby sequentially traversing each virtual storage disk group corresponding to each storage object address in the storage object directory, and further Obtain the storage disk group parameters corresponding to each storage disk group in the RAID system. Specifically, taking any storage object as an example, first, reading the address of any storage object from the storage object directory, thereby searching according to the storage corresponding address. All the virtual storage disk groups in which the storage object data is stored are stored, and then each virtual storage disk group corresponding to any storage object is traversed in order to obtain the storage disk group of each storage disk group of the storage object. parameter. Of course, when the number of the virtual storage disks in the virtual storage disk is the same, the same storage object only needs to obtain the virtual storage disk group parameter of the virtual storage disk group corresponding to the storage object. The parameters of all virtual storage disk groups corresponding to the storage object. The foregoing storage object includes any one or more of the following: a file, a logical unit LUN, and an object. It should be noted that the user can access all the storage objects in the RAID system through each storage node.
具体的,上述的新的虚拟存储硬盘分布表相比原有的虚拟存储硬盘 分布表, 当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数 目 X保持不变, 校验虚拟存储硬盘数目 Y发生变化。 此外, 在对 RAID 系统进行扩容时, 不仅可以增加一个存储节点, 也可以同时增加多个存 储节点。  Specifically, the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table. The number of data virtual storage hard disks in each virtual storage disk group in the current RAID system remains unchanged, and the number of virtual storage hard disks is verified. Y changes. In addition, when expanding a RAID system, you can add not only one storage node but also multiple storage nodes at the same time.
202 , AID系统扩容装置通过分布算法及虚拟存储硬盘组的参数计 算虚拟存储硬盘组的新的虚拟存储硬盘分布表。  202. The AID system expansion device calculates a new virtual storage hard disk distribution table of the virtual storage disk group by using a distribution algorithm and parameters of the virtual storage disk group.
其中,将新的虚拟存储硬盘分布表与原有的虚拟存储硬盘分布表对 比, 并根据 RAID系统的空间利用率的计算公式 (X/ ( X+Y ) ) 可以看 出, 本发明是通过保持每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X 不变,同时对校验虚拟存储硬盘数目 Y进行动态调节,从而提高的 RAID 系统的空间利用率, 并且由于保持了 X的数目不变, 只修改 Y的数目, 减少了需要迁移的数据量, 此外, 由于冗余算法支持在 Y减少时, 可以 不需要重新计算校验, 从而保证了高的空间利用率的情况下, 使得该 RAID系统的计算量大大减少。  Wherein, the new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table, and according to the calculation formula of the space utilization ratio of the RAID system (X/(X+Y)), the present invention is maintained by The number of data virtual storage disks X in each virtual storage disk group is unchanged, and the number of verified virtual storage disks Y is dynamically adjusted, thereby improving the space utilization of the RAID system, and since the number of Xs is kept unchanged, only Modifying the number of Y reduces the amount of data that needs to be migrated. In addition, since the redundancy algorithm supports the reduction of Y, it is not necessary to recalculate the check, thereby ensuring high space utilization, making the RAID system The amount of calculation is greatly reduced.
可选的, 上述的虚拟存储硬盘组的参数包括下面的至少一种: 存储 节点地址 ID列表、 存储节点权重列表、 虚拟存储硬盘组的标识和每个 虚拟存储硬盘组中的虚拟存储硬盘的数目; 其中上述的存储节点权重列 表为每个存储节点当前存储硬盘的存储空间的使用率,上述的虚拟存储 硬盘组的标识为该 RAID系统的每个虚拟存储硬盘组的标识, 此外, 该 RAID系统的每个虚拟存储硬盘组中的虚拟存储硬盘数目可以不相同。  Optionally, the parameters of the virtual storage disk group include the following at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in each virtual storage disk group. The storage node weight list is the usage rate of the storage space of the current storage disk of each storage node, and the identifier of the virtual storage disk group is the identifier of each virtual storage disk group of the RAID system, and the RAID system The number of virtual storage disks in each virtual storage disk group can be different.
203、 AID系统扩容装置根据新的虚拟存储硬盘分布表判断当前的 虚拟存储硬盘组中的虚拟存储硬盘是否是需要删除的校验虚拟存储硬 盘。 203. The AID system expansion device determines the current state according to the new virtual storage hard disk distribution table. Whether the virtual storage disk in the virtual storage disk group is the verification virtual storage disk that needs to be deleted.
若当前虚拟存储硬盘不是需要删除的校验虚拟存储硬盘,转向步骤 If the current virtual storage hard disk is not a verification virtual storage hard disk that needs to be deleted, go to the step
204, 若当前虚拟存储硬盘是需要删除的校验虚拟存储硬盘, 则转向步 骤 207。 204. If the current virtual storage hard disk is a verification virtual storage hard disk that needs to be deleted, then go to step 207.
具体的,根据新的虚拟存储硬盘分布表判断虚拟存储硬盘组中的虚 拟存储硬盘是否是需要删除的校验虚拟存储硬盘时,具体是通过对当前 RAID系统中的每个虚拟存储硬盘进行遍历来实现的, 遍历时可以按照 阵列顺序或者随意任意选择一个存储节点的存储硬盘依次遍历,也可以 同时遍历每个存储节点的存储硬盘; 然后, 在对某个存储节点的存储硬 盘进行遍历时, 可以依次遍历该每个虚拟存储硬盘组, 也可以同时并行 遍历每个虚拟存储硬盘组。 而在对某个虚拟存储硬盘组进行遍历时, 可 以依次遍历该虚拟存储硬盘组中的每个虚拟存储硬盘,也可以同时并行 遍历该虚拟存储硬盘组中的每个虚拟存储硬盘。  Specifically, when the virtual storage hard disk in the virtual storage disk group is determined to be a virtual storage hard disk to be deleted, the virtual storage hard disk is traversed by each virtual storage hard disk in the current RAID system. In the traversal, the storage hard disk of a storage node may be sequentially traversed according to the order of the array or randomly, or the storage hard disk of each storage node may be traversed at the same time; then, when traversing the storage hard disk of a storage node, Each virtual storage disk group is traversed in turn, and each virtual storage disk group can also be traversed in parallel at the same time. When traversing a virtual storage disk group, you can traverse each virtual storage disk in the virtual storage disk group in turn, or traverse each virtual storage disk in the virtual storage disk group in parallel.
204、 AID系统扩容装置根据新的虚拟存储硬盘分布表判断当前虚 拟存储硬盘所处位置是否和新的虚拟存储硬盘分布表中的位置相符。  204. The AID system expansion device determines, according to the new virtual storage hard disk distribution table, whether the location of the current virtual storage hard disk matches the position in the new virtual storage hard disk distribution table.
若当前的虚拟存储硬盘与虚拟存储硬盘分布表中的位置不相符,则 转向步骤 205, 若当前的虚拟存储硬盘与虚拟存储硬盘分布表中的位置 相符, 则转向步骤 206。  If the current virtual storage hard disk does not match the location in the virtual storage hard disk distribution table, then go to step 205. If the current virtual storage hard disk matches the position in the virtual storage hard disk distribution table, then go to step 206.
205、 RAID系统扩容装置将当前的虚拟存储硬盘中数据复制到新增 加的存储节点的存储硬盘中,并将原位置处的当前的虚拟存储硬盘及当 前的虚拟存储硬盘中的数据删除。  205. The RAID system expansion device copies the data in the current virtual storage hard disk to the storage hard disk of the newly added storage node, and deletes the data in the current virtual storage hard disk and the current virtual storage hard disk at the original location.
具体的, 若虚拟存储硬盘现有分布表中虚拟存储硬盘 CK0位于存 储节点 a, 虚拟存储硬盘 CK1位于存储节点 b。 而在新的虚拟存储硬盘 分布表中该 CK0位于存储节点 c, 该 CK1在存储节点 d。 则 CK0需要 从存储节点 a迁移到存储节点 c, CK1需要从存储节点 b迁移到存储节 点 d。  Specifically, if the virtual storage hard disk CK0 in the existing distribution table of the virtual storage hard disk is located at the storage node a, the virtual storage hard disk CK1 is located at the storage node b. In the new virtual storage hard disk distribution table, the CK0 is located at the storage node c, and the CK1 is at the storage node d. Then CK0 needs to migrate from storage node a to storage node c, and CK1 needs to migrate from storage node b to storage node d.
206、 RAID系统扩容装置保持当前虚拟存储硬盘位置不变。  206. The RAID system expansion device keeps the current virtual storage hard disk position unchanged.
207、 RAID系统扩容装置删除当前虚拟存储硬盘及当前虚拟存储硬 盘中的校验数据。 具体的, 在 RAID系统中新增存储节点后, 需要将原有存储节点的 部分数据迁移到新增存储节点上, 以保持各个存储节点数据的均衡, 在 进行数据迁移之前, 需要按照获取的虚拟存储硬盘组的参数, 通过分布 算法计算出新的虚拟存储硬盘分布表,并将该新的虚拟存储硬盘分布表 与当前虚拟存储硬盘的具体分布位置进行比对,从而知道哪些数据需要 进行迁移, 那些需要删除, 从而实现本发明的扩容方法。 207. The RAID system expansion device deletes the verification data in the current virtual storage hard disk and the current virtual storage hard disk. Specifically, after the storage node is added to the RAID system, part of the data of the original storage node is migrated to the newly added storage node to maintain the balance of the data of each storage node. The parameters of the storage disk group are calculated, and a new virtual storage disk distribution table is calculated by using a distribution algorithm, and the new virtual storage disk distribution table is compared with the specific distribution location of the current virtual storage disk, so as to know which data needs to be migrated. Those that need to be deleted to implement the expansion method of the present invention.
需要说明的是,本发明所提供的扩容方法不仅适用于由多个存储节 点间组成的 RAID系统, 也适用于单个存储节点中多个存储硬盘组成的 RAID系统。 这里并不做限制, 只要是满足 RAID系统的场景均可实现 本发明的扩容方法。  It should be noted that the expansion method provided by the present invention is applicable not only to a RAID system composed of multiple storage nodes, but also to a RAID system composed of multiple storage hard disks in a single storage node. There is no limitation here, and the expansion method of the present invention can be implemented as long as the scenario of the RAID system is satisfied.
此外,当用户需要在该 RAI D系统中新建的一个文件中写入数据时, 首先需要获取该文件在 RAID系统中的位置, 即该文件的文件地址, 其 次,在计算出该位置对应的每个虚拟存储硬盘组分别对应在哪个存储节 点中, 和该每个虚拟存储硬盘组的标识, 进而根据上述获取到的该文件 对应的每个虚拟存储硬盘组的参数查看该文件对应的每个虚拟存储硬 盘组是否被建立, 若已被建立, 则将数据写入该虚拟存储硬盘组中的相 应位置, 并更新校验; 若在该 RAID系统并未查找到该文件对应的每个 虚拟存储硬盘组的标识,则通过分布算法计算出该虚拟存储硬盘组中各 虚拟存储硬盘具体是分布在哪个存储节点上的,然后在各个存储节点中 创建上述的虚拟存储硬盘,并标记该文件对应的每个虚拟存储硬盘组已 建立, 最后将数据写入该文件对应的每个虚拟存储硬盘组中的相应位 置, 并更新校验。  In addition, when the user needs to write data in a file newly created in the RAI D system, firstly, the location of the file in the RAID system, that is, the file address of the file, is required, and secondly, each location corresponding to the location is calculated. The virtual storage disk group corresponds to which storage node, and the identifier of each virtual storage disk group, and then each virtual disk corresponding to the file is viewed according to the parameters of each virtual storage disk group corresponding to the obtained file. Whether the storage disk group is established, if it is established, write data to the corresponding location in the virtual storage disk group, and update the verification; if the RAID system does not find each virtual storage disk corresponding to the file The identifier of the group is calculated by using a distribution algorithm, and the virtual storage hard disk in the virtual storage disk group is specifically distributed on which storage node, and then the virtual storage hard disk is created in each storage node, and each file corresponding to the file is marked. A virtual storage disk group has been created, and finally the data is written to each virtual storage corresponding to the file. The corresponding position in the disk stack, and update the checksum.
本发明的实施例提供的 RAID系统扩容方法,当 RAID系统扩容时, 根据当前 RAID系统(即增加存储节点后的 RAID系统) 中的虚拟存储 硬盘组的参数和分布算法计算出的新的虚拟存储硬盘分布表,使得当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X不变, 校 验虚拟存储硬盘数目 Y发生变化,然后按照该新的虚拟存储硬盘分布表 中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬 盘进行迁移或删除, 从而提升了系统存储空间的利用率, 并且与现有技 术相比,在空间利用率相同的情况下, 由于本发明通过保持 X的数目不 变,只对 Y的数目进行修改的方式来对扩容后的 RAID系统进行数据均 衡化, 从而大大的减少了迁移的数据量和计算量。 The RAID system expansion method provided by the embodiment of the present invention, when the RAID system is expanded, the new virtual storage calculated according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added) The disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged. The number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed. The distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention By keeping the number of X not Change, only modify the number of Y to data equalization of the expanded RAID system, thereby greatly reducing the amount of data transferred and the amount of calculation.
在本实施例中, 以图 3所示的虚拟存储硬盘组 CKG的虚拟存储硬 盘 CK分布表为例。 从图 3中可知, 该 CKG是由 3个存储节点的 12个 CK组成, 其中, 该 CKG中各 CK的冗余关系是 8+4。 当新增一个存储 节点后, 通过计算得到如图 4所示的该 CKG的新的 CK分布表, 从图 4可知该 CKG中各 CK的冗余关系变为了 8+3,使得空间利用率从 8/12 变为了 8/11。 当再增加存储节点时, 空间利用率还可以再次提升, 当然 当增加存储节点增加到一定程度后, 该空间利用率就无法提升了。  In this embodiment, the virtual storage hard disk CK distribution table of the virtual storage disk group CKG shown in FIG. 3 is taken as an example. As can be seen from FIG. 3, the CKG is composed of 12 CKs of three storage nodes, wherein the redundancy relationship of each CK in the CKG is 8+4. After adding a storage node, a new CK distribution table of the CKG as shown in FIG. 4 is obtained by calculation. From FIG. 4, it can be seen that the redundancy relationship of each CK in the CKG becomes 8+3, so that the space utilization rate is 8/12 changed to 8/11. When the storage node is added again, the space utilization can be increased again. Of course, when the storage node is increased to a certain extent, the space utilization cannot be improved.
具体的, 基于上述的应用场景本实施例的扩容及数据迁移流程如 下:  Specifically, the capacity expansion and data migration process of this embodiment is as follows:
首先,根据上述 CKG中各 CK原有的冗余关系是 8+4, 通过 CK分 布算法计算后, 可以得出该 CKG中各 CK 的新 CK分布表,将现有 CK 分布位置与如图 4所示的新 CK分布表进行比对可知, 该 CKG上存储 节点 0上的 CK0~CK2、 存储节点 1 上的 CK4~CK6、 存储节点 2上的 CK8 CK10由于位置不变, 所以不需要迁移。  First, according to the above CKG, the original redundancy relationship of each CK is 8+4. After calculation by the CK distribution algorithm, a new CK distribution table of each CK in the CKG can be obtained, and the existing CK distribution position is as shown in FIG. The comparison of the new CK distribution table shown shows that CK0~CK2 on the storage node 0 on the CKG, CK4~CK6 on the storage node 1, and CK8 CK10 on the storage node 2 do not need to be migrated because the position is unchanged.
其次, 由于扩容前该 CKG的冗余关系是 8+4的关系, 当扩容变成 4个存储节点时, 按容量均衡方式 ( 8+4 ) /4计算得出每个节点需存储 3 个 CK。 此时, 当一个存储节点失效时, 只会丟失 3个 CK, 那么, 该 CKG中各个 CK 的冗余 CK数目就不需要维持 4, 直接减少到 3, 也不 会影响该 RAID系统的可靠性要求(即, 允许一个存储节点失效或同时 允许一个存储节点的存储硬盘中的 2个硬盘失效) 。 因此, 将图 3与图 4进行比对, 可以看出 CK3需要从存储节点 0迁移到新增的存储节点 3 上, CK7需要从存储节点 1迁移到新增存储节点 3上, 而 CK11是不需 要的多余的冗余校验 CK, 可以直接删除。  Secondly, since the redundancy relationship of the CKG before the expansion is 8+4, when the expansion becomes 4 storage nodes, it is calculated according to the capacity equalization method (8+4) /4 that each node needs to store 3 CKs. . At this time, when one storage node fails, only three CKs are lost. Then, the number of redundant CKs of each CK in the CKG does not need to be maintained at 4, and is directly reduced to 3, and the reliability of the RAID system is not affected. Requirements (ie, one storage node is allowed to fail or two hard disks in a storage node's storage hard disk are allowed to fail at the same time). Therefore, comparing FIG. 3 with FIG. 4, it can be seen that CK3 needs to be migrated from storage node 0 to newly added storage node 3, and CK7 needs to be migrated from storage node 1 to newly added storage node 3, and CK11 is not The redundant redundancy check CK required can be deleted directly.
需要说明的是, 由于数据 CK数目不变, 校验 CK数目减少, 并且 校验不需要重新计算(由于 EC算法支持在数据 CK数目不变、校验 CK 数目减少时, 不重新计算校验) , 从而降低了迁移的数据量和计算量。 此外, 由于不需要计算校验, 所以扩容装置不需读取那些位置不变的 CK, 如 CK0~CK2、 CK4~CK6、 CK8 CK10上的数据, 这样可节省大量 硬盘 IO(Input/Output, 输入 /输出)和网络带宽, 以及大量的 CPU (中央 处理器) 资源, 减轻扩容时对业务的影响。 此外, 由于校验 CK数目减 少了, 从而避免了被删除的校验 CK可能发生的节点间迁移, 节省了硬 盘 10和网络带宽; 被删除的校验 CK空间可以回收利用, 也提升了系 统的空间利用率。 It should be noted that, since the number of data CK is unchanged, the number of check CKs is reduced, and the check does not need to be recalculated (since the EC algorithm supports that the number of data CK does not change and the number of check CKs decreases, the check is not recalculated) , which reduces the amount of data and the amount of calculations that are migrated. In addition, since there is no need to calculate the check, the expansion device does not need to read the CKs whose positions are unchanged, such as the data on CK0~CK2, CK4~CK6, CK8 CK10, which can save a lot of Hard disk IO (Input/Output, input/output) and network bandwidth, as well as a large number of CPU (Central Processing Unit) resources, to reduce the impact on the business when expanding. In addition, since the number of check CKs is reduced, the inter-node migration that may occur due to the deleted check CK is avoided, and the hard disk 10 and the network bandwidth are saved; the deleted check CK space can be recycled, and the system is also improved. Space utilization.
Figure imgf000015_0001
Figure imgf000015_0001
表 1  Table 1
此外,由上述表 1所示的空间利用率变化表可知,当增加存储节点, 保持数据 CK不变, 降低校验 CK的同时, RAID 系统空间利用率会明 显的增加。 因此, 当存储节点增加时, 可以通过减少校验 CK的值来保 证系统的可靠性, 同时, 当存储节点减少时, 也可以通过增加校验 CK 的值来保证系统的可靠性。  In addition, from the space utilization change table shown in Table 1 above, it can be seen that when the storage node is increased, the data CK is kept unchanged, and the verification CK is lowered, the RAID system space utilization is remarkably increased. Therefore, when the storage node increases, the reliability of the system can be ensured by reducing the value of the check CK. At the same time, when the storage node is reduced, the reliability of the system can also be ensured by increasing the value of the check CK.
本发明的实施例提供的 RAID系统扩容方法,当 RAID系统扩容时, 根据当前 RAID系统(即增加存储节点后的 RAID系统) 中的虚拟存储 硬盘组的参数和分布算法计算出的新的虚拟存储硬盘分布表,使得当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X不变, 校 验虚拟存储硬盘数目 Y发生变化,然后按照该新的虚拟存储硬盘分布表 中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬 盘进行迁移或删除, 从而提升了系统存储空间的利用率, 并且与现有技 术相比,在空间利用率相同的情况下, 由于本发明通过保持 X的数目不 变,只对 Y的数目进行修改的方式来对扩容后的 RAID系统进行数据均 衡化, 从而大大的减少了迁移的数据量和计算量。  The RAID system expansion method provided by the embodiment of the present invention, when the RAID system is expanded, the new virtual storage calculated according to the parameters and the distribution algorithm of the virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added) The disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged. The number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed. The distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention By keeping the number of X unchanged, only the number of Ys is modified to perform data equalization on the expanded RAID system, thereby greatly reducing the amount of data and the amount of computation.
本发明的实施例提供一种 RAID系统扩容装置,其中,上述的 RAID 系统包含 N个存储节点, 且该 N个存储节点中的每个存储硬盘均被划 分成相同大小的虚拟存储硬盘, M个虚拟存储硬盘组成具有冗余关系的 虚拟存储硬盘组, 该虚拟存储硬盘组是由 X 块数据虚拟存储硬盘和 Y 块校验虚拟存储硬盘组成, M=X+Y, 该数据虚拟存储硬盘存储数据块, 该校验虚拟存储硬盘存储校验块, 如图 5、 6 所示, 具体的, 该 RAID 系统扩容装置用于实现上述的 RAID系统的扩容方法, 如图 5所示, 该 扩容装置 3包括: 分布表计算单元 3 1和迁移单元 32, 其中: An embodiment of the present invention provides a RAID system expansion device, wherein the RAID system includes N storage nodes, and each of the N storage nodes is mapped. Divided into virtual storage disks of the same size, the M virtual storage disks form a virtual storage disk group with redundant relationship. The virtual storage disk group is composed of an X-block data virtual storage hard disk and a Y-block verification virtual storage hard disk, M=X. +Y, the data virtual storage hard disk storage data block, the verification virtual storage hard disk storage check block, as shown in FIG. 5 and 6, specifically, the RAID system expansion device is used to implement the above RAID system expansion method, As shown in FIG. 5, the expansion device 3 includes: a distribution table calculation unit 31 and a migration unit 32, wherein:
分布表计算单元 3 1, 用于当 RAID系统中增加存储节点时,根据当 前 RAID系统中虚拟存储硬盘组的参数和分布算法计算新的虚拟存储硬 盘分布表。  The distribution table calculation unit 3 1 is configured to calculate a new virtual storage hard disk distribution table according to parameters and a distribution algorithm of the virtual storage disk group in the current RAID system when a storage node is added in the RAID system.
其中, 该新的虚拟存储硬盘分布表相比原有的虚拟存储硬盘分布 表, 当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X 保持不变, 校验虚拟存储硬盘数目 Y发生变化。  The new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table. The number of data virtual storage hard disks in each virtual storage disk group in the current RAID system remains unchanged, and the number of virtual storage hard disks Y is verified. Variety.
迁移单元 32, 用于按照分布表计算单元 31计算的新的虚拟存储硬 盘分布表中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚 拟存储硬盘进行迁移或删除。  The migration unit 32 is configured to migrate or delete the virtual storage hard disk in each virtual storage disk group according to the distribution location of each virtual storage disk in the new virtual storage disk distribution table calculated by the distribution table computing unit 31.
本发明的实施例提供的 RAID系统扩容装置,当 RAID系统扩容时, 根据当前 RAID系统(即增加存储节点后的 RAID系统) 中的虚拟存储 硬盘组的参数和分布算法计算出的新的虚拟存储硬盘分布表,使得当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X不变, 校 验虚拟存储硬盘数目 Y发生变化,然后按照该新的虚拟存储硬盘分布表 中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬 盘进行迁移或删除, 从而提升了系统存储空间的利用率, 并且与现有技 术相比,在空间利用率相同的情况下, 由于本发明通过保持 X的数目不 变,只对 Y的数目进行修改的方式来对扩容后的 RAID系统进行数据均 衡化, 从而大大的减少了迁移的数据量和计算量。  The RAID system expansion device provided by the embodiment of the present invention calculates a new virtual storage according to a parameter and a distribution algorithm of a virtual storage disk group in a current RAID system (ie, a RAID system after the storage node is added) when the RAID system is expanded. The disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged. The number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed. The distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention By keeping the number of X unchanged, only the number of Ys is modified to perform data equalization on the expanded RAID system, thereby greatly reducing the amount of data and the amount of computation.
可选的, 如图 6所示, 分布表计算单元 31 包括: 参数获取模块 3 1 1 和分布表计算模块 312, 其中:  Optionally, as shown in FIG. 6, the distribution table calculation unit 31 includes: a parameter acquisition module 3 1 1 and a distribution table calculation module 312, where:
参数获取模块 31 1, 用于当 RAID系统中增加存储节点时, 获取虚 拟存储硬盘组的参数。  The parameter obtaining module 31 is configured to obtain parameters of the virtual storage disk group when the storage node is added to the RAID system.
分布表计算模块 3 12, 用于通过分布算法及参数获取单元 3 1 1获取 的虚拟存储硬盘组的参数计算虚拟存储硬盘组的新的虚拟存储硬盘分 布表。 a distribution table calculation module 3 12, configured to obtain by the distribution algorithm and the parameter acquisition unit 3 1 1 The parameters of the virtual storage disk group calculate the new virtual storage disk distribution table of the virtual storage disk group.
可选的, 上述的虚拟存储硬盘组参数包括下面的至少一种: 存储节 点地址 ID列表、 存储节点权重列表、 虚拟存储硬盘组的标识和虚拟存 储硬盘组中的虚拟存储硬盘的数目; 其中存储节点权重列表为每个存储 节点当前存储硬盘的存储空间的使用率。  Optionally, the virtual storage disk group parameter includes the following at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in the virtual storage disk group; The node weight list is the usage rate of the storage space of the storage disk currently stored by each storage node.
可选的, 如图 6所示, 迁移单元 32 包括: 第一判断模块 321、 第 二判断模块 322和迁移模块 323, 其中:  Optionally, as shown in FIG. 6, the migration unit 32 includes: a first determining module 321, a second determining module 322, and a migration module 323, where:
第一判断模块 321, 用于根据新的虚拟存储硬盘分布表判断当前的 虚拟存储硬盘是否是需要删除的校验虚拟存储硬盘。  The first determining module 321, is configured to determine, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a verified virtual storage hard disk that needs to be deleted.
第二判断模块 322, 用于若第一判断模块 321判断结果为否, 则根 据新的虚拟存储硬盘分布表判断当前虚拟存储硬盘所处位置是否和新 的虚拟存储硬盘分布表中的位置相符。  The second determining module 322 is configured to determine, according to the new virtual storage hard disk distribution table, whether the location of the current virtual storage hard disk matches the position in the new virtual storage hard disk distribution table, if the first determining module 321 determines that the result is no.
迁移模块 323, 用于若第一判断模块 321判断结果为是, 则删除当 前虚拟存储硬盘及所述当前虚拟存储硬盘中的校验数据。  The migration module 323 is configured to delete the verification data in the current virtual storage hard disk and the current virtual storage hard disk if the first determination module 321 determines that the result is yes.
可选的, 迁移模块 323,还用于若第二判断模块 322判断结果为否, 则将当前的虚拟存储硬盘中数据复制到新增加的存储节点的存储硬盘 中,并将原位置处的当前的虚拟存储硬盘及当前的虚拟存储硬盘中的数 据删除; 用于若第二判断模块 322判断结果为是, 则保持当前虚拟存储 硬盘位置不变。  Optionally, the migration module 323 is further configured to: if the second determination module 322 determines that the result is no, copy the data in the current virtual storage hard disk to the storage hard disk of the newly added storage node, and Data deletion in the virtual storage hard disk and the current virtual storage hard disk; if the second determination module 322 determines that the result is yes, the current virtual storage hard disk location is kept unchanged.
本发明的实施例提供的 RAID系统扩容装置,当 RAID系统扩容时, 根据当前 RAID系统(即增加存储节点后的 RAID系统) 中的虚拟存储 硬盘组的参数和分布算法计算出的新的虚拟存储硬盘分布表,使得当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X不变, 校 验虚拟存储硬盘数目 Y发生变化,然后按照该新的虚拟存储硬盘分布表 中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬 盘进行迁移或删除, 从而提升了系统存储空间的利用率, 并且与现有技 术相比,在空间利用率相同的情况下, 由于本发明通过保持 X的数目不 变,只对 Y的数目进行修改的方式来对扩容后的 RAID系统进行数据均 衡化, 从而大大的减少了迁移的数据量和计算量。 本发明的实施例提供一种 RAID系统扩容设备,如图 7所示,其中, 上述的 RAID系统包含 N个存储节点, 且该 N个存储节点中的每个存 储硬盘均被划分成相同大小的虚拟存储硬盘, M个虚拟存储硬盘组成具 有冗余关系的虚拟存储硬盘组,该虚拟存储硬盘组是由 X块数据虚拟存 储硬盘和 Y块校验虚拟存储硬盘组成, M=X+Y, 该数据虚拟存储硬盘 存储数据块, 该校验虚拟存储硬盘存储校验块, 其中, 该扩容装置用于 实现上述的 RAID系统的扩容方法, 具体的, 该扩容设备包括: 处理器 41和通信单元 42, 上述的处理器 41与通信接口 42通过总线系统耦合 在一起。 该总线可以是工业标准体系结构 ( Industry Standard Architecture , 简称 ISA ) 总线、 夕卜部设备互连 ( Peripheral Component, 简称 PCI ) 总线或扩展工业标准体系结构 (Extended Industry Standard Architecture , 简称 EISA ) 总线等。 该总线可以分为地址总线、 数据总 线、 控制总线等。 为便于表示, 图 7中仅用一条粗线表示, 但并不表示 仅有一根总线或一种类型的总线。 其中: The RAID system expansion device provided by the embodiment of the present invention calculates a new virtual storage according to a parameter and a distribution algorithm of a virtual storage disk group in a current RAID system (ie, a RAID system after the storage node is added) when the RAID system is expanded. The disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged. The number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed. The distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention By keeping the number of X unchanged, only the number of Ys is modified to perform data equalization on the expanded RAID system, thereby greatly reducing the amount of data and the amount of computation. An embodiment of the present invention provides a RAID system expansion device, as shown in FIG. 7, wherein the RAID system includes N storage nodes, and each of the N storage nodes is divided into the same size. The virtual storage hard disk and the M virtual storage hard disks form a virtual storage disk group with redundant relationship. The virtual storage disk group is composed of an X-block data virtual storage hard disk and a Y-block verification virtual storage hard disk, M=X+Y, The data virtual storage hard disk stores the data block, and the verification virtual storage hard disk stores the verification block. The expansion device is configured to implement the foregoing expansion method of the RAID system. Specifically, the expansion device includes: the processor 41 and the communication unit 42. The processor 41 and the communication interface 42 described above are coupled together by a bus system. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 7, but it does not mean that there is only one bus or one type of bus. among them:
处理器 41可以是: 通用中央处理器 ( central procession unit, 简称 CPU )、专用集成电路(application specific integrated circuit, 简称 ASIC)、 数字信号处理器 (DSP ) 、 现成可编程门阵列 (FPGA ) 或其他可编程 逻辑器件。 而通信单元 42用于向处理器 41提供指令和数据信息, 和处 理器 41通过总线连接。  The processor 41 can be: a central processing unit (CPU), an application specific integrated circuit (ASIC), a digital signal processor (DSP), an off-the-shelf programmable gate array (FPGA), or the like. Programmable logic device. The communication unit 42 is for providing instructions and data information to the processor 41, and the processor 41 is connected via a bus.
其中, 上述各器件具体的功能实现如下。  The specific functions of the above devices are as follows.
通信单元 42,用于向处理器 41提供基于 RAID系统的数据和指令。 处理器 41, 用于当 RAID系统中增加存储节点时,根据通过通信单 元 42获取的虚拟存储硬盘组的参数和分布算法计算新的虚拟存储硬盘 分布表。  The communication unit 42 is for providing the processor 41 with data and instructions based on the RAID system. The processor 41 is configured to calculate a new virtual storage hard disk distribution table according to a parameter and a distribution algorithm of the virtual storage disk group acquired by the communication unit 42 when the storage node is added in the RAID system.
其中, 该新的虚拟存储硬盘分布表相比原有的虚拟存储硬盘分布 表, 当前 RAID系统 (即增加存储节点后的 RAID系统) 中每个虚拟存 储硬盘组中数据虚拟存储硬盘数目 X保持不变,校验虚拟存储硬盘数目 Y发生变化。  The new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table. The number of data virtual storage hard disks in each virtual storage disk group in the current RAID system (that is, the RAID system after the storage node is added) remains unchanged. Change, verify that the number of virtual storage hard disks Y changes.
处理器 41, 还用于按照新的虚拟存储硬盘分布表中各虚拟存储硬 盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬盘进行迁移或删 除。 The processor 41 is further configured to migrate or delete the virtual storage hard disk in each virtual storage disk group according to the distribution location of each virtual storage disk in the new virtual storage disk distribution table. Except.
可选的, 处理器 41, 具体用于当 RAID系统中增加存储节点时, 接 收通信单元 42发送的指令,通过通信单元 42获取虚拟存储硬盘组的参 数; 通过分布算法及虚拟存储硬盘组的参数计算虚拟存储硬盘组的新的 虚拟存储硬盘分布表。  Optionally, the processor 41 is specifically configured to: when the storage node is added to the RAID system, receive the instruction sent by the communication unit 42, obtain the parameter of the virtual storage disk group through the communication unit 42; and use the distribution algorithm and the parameter of the virtual storage disk group Calculate the new virtual storage hard disk distribution table for the virtual storage disk group.
可选的, 上述的虚拟存储硬盘组参数包括下面的至少一种: 存储节 点地址 ID列表、 存储节点权重列表、 虚拟存储硬盘组的标识和虚拟存 储硬盘组中的虚拟存储硬盘的数目; 其中存储节点权重列表为每个存储 节点当前存储硬盘的存储空间的使用率。  Optionally, the virtual storage disk group parameter includes the following at least one of the following: a storage node address ID list, a storage node weight list, an identifier of the virtual storage disk group, and a number of virtual storage disks in the virtual storage disk group; The node weight list is the usage rate of the storage space of the storage disk currently stored by each storage node.
可选的, 处理器 41, 具体用于根据新的虚拟存储硬盘分布表判断 当前的虚拟存储硬盘是否是需要删除的校验虚拟存储硬盘; 若当前虚拟 存储硬盘不是需要删除的校验虚拟存储硬盘,则根据新的虚拟存储硬盘 分布表判断当前虚拟存储硬盘所处位置是否和新的虚拟存储硬盘分布 表中的位置相符; 若当前虚拟存储硬盘是需要删除的校验虚拟存储硬 盘, 则删除当前虚拟存储硬盘及当前虚拟存储硬盘中的校验数据。  Optionally, the processor 41 is configured to determine, according to the new virtual storage hard disk distribution table, whether the current virtual storage hard disk is a verified virtual storage hard disk that needs to be deleted; if the current virtual storage hard disk is not a verified virtual storage hard disk that needs to be deleted According to the new virtual storage hard disk distribution table, it is determined whether the current virtual storage hard disk is in the same position as the new virtual storage hard disk distribution table; if the current virtual storage hard disk is the verified virtual storage hard disk to be deleted, the current deletion is deleted. Verification data in the virtual storage hard disk and the current virtual storage hard disk.
可选的, 处理器 41, 还用于若当前的虚拟存储硬盘与虚拟存储硬 盘分布表中的位置不相符,则将当前的虚拟存储硬盘中数据复制到新增 加的存储节点的存储硬盘中,并将原位置处的当前的虚拟存储硬盘及当 前的虚拟存储硬盘中的数据删除; 若当前的虚拟存储硬盘与虚拟存储硬 盘分布表中的位置相符, 则保持当前虚拟存储硬盘位置不变。  Optionally, the processor 41 is further configured to: if the current virtual storage hard disk does not match the location in the virtual storage hard disk distribution table, copy the data in the current virtual storage hard disk to the storage hard disk of the newly added storage node, The data in the current virtual storage hard disk and the current virtual storage hard disk in the original location is deleted; if the current virtual storage hard disk matches the position in the virtual storage hard disk distribution table, the current virtual storage hard disk location is maintained.
本发明的实施例提供的 RAID系统扩容装置,当 RAID系统扩容时, 根据当前 RAID系统(即增加存储节点后的 RAID系统) 中的虚拟存储 硬盘组的参数和分布算法计算出的新的虚拟存储硬盘分布表,使得当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X不变, 校 验虚拟存储硬盘数目 Y发生变化,然后按照该新的虚拟存储硬盘分布表 中各虚拟存储硬盘的分布位置将每个虚拟存储硬盘组中的虚拟存储硬 盘进行迁移或删除, 从而提升了系统存储空间的利用率, 并且与现有技 术相比,在空间利用率相同的情况下, 由于本发明通过保持 X的数目不 变,只对 Y的数目进行修改的方式来对扩容后的 RAID系统进行数据均 衡化, 从而大大的减少了迁移的数据量和计算量。 所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 仅 以上述各功能模块的划分进行举例说明, 实际应用中, 可以根据需要而 将上述功能分配由不同的功能模块完成, 即将装置的内部结构划分成不 同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统, 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应过程, 在此不再赘述。 The RAID system expansion device provided by the embodiment of the present invention calculates a new virtual storage according to a parameter and a distribution algorithm of a virtual storage disk group in a current RAID system (ie, a RAID system after the storage node is added) when the RAID system is expanded. The disk distribution table is such that the number of data virtual storage disks in each virtual storage disk group in the current RAID system is unchanged. The number of virtual storage disks Y is changed, and then the virtual storage disks in the new virtual storage disk distribution table are followed. The distribution location of the virtual storage hard disk in each virtual storage disk group is migrated or deleted, thereby improving the utilization of the system storage space, and compared with the prior art, in the case of the same space utilization, due to the present invention By keeping the number of X unchanged, only the number of Ys is modified to perform data equalization on the expanded RAID system, thereby greatly reducing the amount of data and the amount of computation. It will be apparent to those skilled in the art that, for convenience and brevity of description, only the division of each functional module described above is exemplified. In practical applications, the above-mentioned function assignment can be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above. For the specific working process of the system, the device and the unit described above, refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统, 装 置和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例 仅仅是示意性的, 例如, 所述模块或单元的划分, 仅仅为一种逻辑功能 划分, 实际实现时可以有另外的划分方式, 例如多个单元或组件可以结 合或者可以集成到另一个系统, 或一些特征可以忽略, 或不执行。 另一 点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过 一些接口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或其 它的形式。  In the several embodiments provided herein, it should be understood that the disclosed systems, apparatus, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combined or can be integrated into another system, or some features can be ignored, or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开 的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于 一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选 择其中的部分或者全部单元来实现本实施例方案的目的。 另外,在本申请各个实施例中的各功能单元可以集成在一个处理单 元中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集 成在一个单元中。 上述集成的单元既可以釆用硬件的形式实现, 也可以 釆用软件功能单元的形式实现。  The units described as separate components may or may not be physically separate. The components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment. In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产 品销售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样 的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或 者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机 软件产品存储在一个存储介质中, 包括若干指令用以使得一台计算机设 备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor ) 执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质 包括: U盘、 移动硬盘、 只读存储器 (ROM, Read-Only Memory ) 、 随机存取存储器 (RAM, Random Access Memory ) 、 磁碟或者光盘等 各种可以存储程序代码的介质。 The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. The instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a USB flash drive, a removable hard disk, a read-only memory (ROM), A medium that can store program codes, such as a random access memory (RAM), a magnetic disk, or an optical disk.
以上所述, 以上实施例仅用以说明本申请的技术方案, 而非对其限 制; 尽管参照前述实施例对本申请进行了详细的说明, 本领域的普通技 术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。  The above embodiments are only used to illustrate the technical solutions of the present application, and are not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the embodiments are modified, or some of the technical features are equivalently replaced; and the modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

WO 2015/035768 -fcrt -mf _| PCT/CN2014/074775 权 利 要 求 书 WO 2015/035768 -fcrt -mf _| PCT/CN2014/074775 Claims
1、 一种独立磁盘冗余阵列 RAID 系统扩容方法, 其特征在于, 所 述 RAID系统包含 N个存储节点, 且所述 N个存储节点中的每个存储 硬盘均被划分成相同大小的虚拟存储硬盘, M个虚拟存储硬盘组成具有 冗余关系的虚拟存储硬盘组,所述虚拟存储硬盘组是由 X块数据虚拟存 储硬盘和 Y块校验虚拟存储硬盘组成, M=X+Y, 所述数据虚拟存储硬 盘存储数据块, 所述校验虚拟存储硬盘存储校验块, 所述方法包括: 当所述 RAID系统增加存储节点时, 根据当前 RAID系统中所述虚 拟存储硬盘组的参数和分布算法计算新的虚拟存储硬盘分布表; 所述新 的虚拟存储硬盘分布表相比原有的虚拟存储硬盘分布表, 所述当前 RAID 系统中每个虚拟存储硬盘组中数据虚拟存储硬盘数目 X 保持不 变, 校验虚拟存储硬盘数目 Y发生变化; 1. A redundant array of independent disks RAID system expansion method, characterized in that the RAID system includes N storage nodes, and each storage hard disk in the N storage nodes is divided into virtual storage of the same size Hard disk, M virtual storage hard disks form a virtual storage hard disk group with redundant relationship, the virtual storage hard disk group is composed of X data virtual storage hard disks and Y block verification virtual storage hard disks, M=X+Y, the The data virtual storage hard disk stores data blocks, and the verification virtual storage hard disk stores verification blocks. The method includes: when the RAID system adds storage nodes, according to the parameters and distribution of the virtual storage hard disk group in the current RAID system. The algorithm calculates a new virtual storage hard disk distribution table; compared with the original virtual storage hard disk distribution table, the new virtual storage hard disk distribution table maintains the number X of data virtual storage hard disks in each virtual storage hard disk group in the current RAID system. remains unchanged, verify that the number Y of virtual storage hard disks changes;
按照所述新的虚拟存储硬盘分布表中虚拟存储硬盘的分布位置将 所述虚拟存储硬盘组中的虚拟存储硬盘进行迁移或删除。 Migrate or delete the virtual storage hard disks in the virtual storage hard disk group according to the distribution positions of the virtual storage hard disks in the new virtual storage hard disk distribution table.
2、 根据权利要求 1 所述的方法, 其特征在于, 所述当所述 RAID 系统中增加存储节点时, 根据当前 RAID系统中所述虚拟存储硬盘组的 参数和分布算法计算新的虚拟存储硬盘分布表包括: 2. The method according to claim 1, characterized in that when a storage node is added to the RAID system, a new virtual storage hard disk is calculated according to the parameters and distribution algorithm of the virtual storage hard disk group in the current RAID system. The distribution table includes:
当所述 RAID系统增加所述存储节点时, 获取所述虚拟存储硬盘组 的参数; When the RAID system adds the storage node, obtain the parameters of the virtual storage hard disk group;
通过所述分布算法及所述虚拟存储硬盘组的参数计算所述虚拟存 储硬盘组的新的虚拟存储硬盘分布表。 A new virtual storage hard disk distribution table of the virtual storage hard disk group is calculated through the distribution algorithm and the parameters of the virtual storage hard disk group.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述虚拟存储 硬盘组的参数包括下面的至少一种: 存储节点地址 ID列表、 存储节点 权重列表、所述虚拟存储硬盘组的标识和所述虚拟存储硬盘组中的虚拟 存储硬盘的数目; 其中所述存储节点权重列表为每个存储节点当前存储 硬盘的存储空间的使用率。 3. The method according to claim 1 or 2, characterized in that the parameters of the virtual storage hard disk group include at least one of the following: a storage node address ID list, a storage node weight list, a parameter of the virtual storage hard disk group, The identification and the number of virtual storage hard disks in the virtual storage hard disk group; wherein the storage node weight list is the storage space usage of the current storage hard disk of each storage node.
4、 根据权利要求 1 所述的方法, 其特征在于, 所述按照所述新的 虚拟存储硬盘分布表中虚拟存储硬盘的分布位置将所述虚拟存储硬盘 组中的虚拟存储硬盘进行迁移或删除包括: 根据所述新的虚拟存储硬盘分布表判断当前的虚拟存储硬盘是否 是需要删除的校验虚拟存储硬盘; 若所述当前虚拟存储硬盘不是需要删除的校验虚拟存储硬盘,则根 据所述新的虚拟存储硬盘分布表判断所述当前虚拟存储硬盘所处位置 是否和所述新的虚拟存储硬盘分布表中的位置相符; 若所述当前虚拟存储硬盘是需要删除的校验虚拟存储硬盘,则删除 所述当前虚拟存储硬盘及所述当前虚拟存储硬盘中的校验数据。 4. The method according to claim 1, characterized in that, the virtual storage hard disks in the virtual storage hard disk group are migrated or deleted according to the distribution positions of the virtual storage hard disks in the new virtual storage hard disk distribution table. include: Determine whether the current virtual storage hard disk is a verification virtual storage hard disk that needs to be deleted according to the new virtual storage hard disk distribution table; if the current virtual storage hard disk is not a verification virtual storage hard disk that needs to be deleted, then according to the new The virtual storage hard disk distribution table determines whether the location of the current virtual storage hard disk matches the position in the new virtual storage hard disk distribution table; if the current virtual storage hard disk is a verification virtual storage hard disk that needs to be deleted, delete it. The current virtual storage hard disk and the verification data in the current virtual storage hard disk.
5、 根据权利要求 4所述的方法, 其特征在于, 所述根据所述新的 虚拟存储硬盘分布表判断所述当前虚拟存储硬盘所处位置是否和所述 新的虚拟存储硬盘分布表中的位置相符之后, 还包括: 若所述当前的虚拟存储硬盘与所述虚拟存储硬盘分布表中的位置 不相符,则将所述当前的虚拟存储硬盘中数据复制到新增加的存储节点 的存储硬盘中,并将所述当前的虚拟存储硬盘及所述当前的虚拟存储硬 盘中的数据删除; 若所述当前的虚拟存储硬盘与所述虚拟存储硬盘分布表中的位置 相符, 则保持所述当前虚拟存储硬盘位置不变。 5. The method according to claim 4, wherein the step of determining, based on the new virtual storage hard disk distribution table, whether the current virtual storage hard disk location is consistent with the location of the new virtual storage hard disk distribution table is After the locations match, it also includes: If the current virtual storage hard disk does not match the location in the virtual storage hard disk distribution table, copy the data in the current virtual storage hard disk to the storage hard disk of the newly added storage node. , and delete the current virtual storage hard disk and the data in the current virtual storage hard disk; if the current virtual storage hard disk matches the position in the virtual storage hard disk distribution table, keep the current The location of the virtual storage hard disk remains unchanged.
6、 一种独立磁盘冗余阵列 RAID 系统扩容装置, 其特征在于, 所 述 RAID系统包含 N个存储节点, 且所述 N个存储节点中的每个存储 硬盘均被划分成相同大小的虚拟存储硬盘, M个虚拟存储硬盘组成具有 冗余关系的虚拟存储硬盘组,所述虚拟存储硬盘组是由 X块数据虚拟存 储硬盘和 Y块校验虚拟存储硬盘组成, M=X+Y, 所述数据虚拟存储硬 盘存储数据块, 所述校验虚拟存储硬盘存储校验块, 所述装置包括: 分布表计算单元, 用于当所述 RAID系统中增加存储节点时, 根据 当前 RAID系统中所述虚拟存储硬盘组的参数和分布算法计算新的虚拟 存储硬盘分布表; 所述新的虚拟存储硬盘分布表相比原有的虚拟存储硬 盘分布表, 所述当前 RAID系统中每个虚拟存储硬盘组中数据虚拟存储 硬盘数目 X保持不变, 校验虚拟存储硬盘数目 Y发生变化; 6. An independent disk redundant array RAID system expansion device, characterized in that the RAID system includes N storage nodes, and each storage hard disk in the N storage nodes is divided into virtual storage of the same size. Hard disk, M virtual storage hard disks form a virtual storage hard disk group with a redundant relationship, the virtual storage hard disk group is composed of X data virtual storage hard disks and Y block verification virtual storage hard disks, M=X+Y, the The data virtual storage hard disk stores the data blocks, the verification virtual storage hard disk stores the verification blocks, and the device includes: a distribution table calculation unit, used to perform the calculation according to the current RAID system when a storage node is added to the RAID system. The parameters and distribution algorithm of the virtual storage hard disk group calculate a new virtual storage hard disk distribution table; The new virtual storage hard disk distribution table is compared with the original virtual storage hard disk distribution table. Each virtual storage hard disk group in the current RAID system The number X of virtual storage hard disks for medium data remains unchanged, and the number Y of verification virtual storage hard disks changes;
迁移单元,用于按照所述分布表计算单元计算的所述新的虚拟存储 硬盘分布表中各虚拟存储硬盘的分布位置将所述每个虚拟存储硬盘组 中的虚拟存储硬盘进行迁移或删除。 Migration unit, used for the new virtual storage calculated according to the distribution table calculation unit The virtual storage hard disks in each virtual storage hard disk group are migrated or deleted based on the distribution position of each virtual storage hard disk in the hard disk distribution table.
7、 根据权利要求 6所述的装置, 其特征在于, 所述分布表计算单 元包括: 7. The device according to claim 6, characterized in that the distribution table calculation unit includes:
参数获取模块, 用于当所述 RAID系统中增加所述存储节点时, 获 取所述虚拟存储硬盘组的参数; A parameter acquisition module, used to obtain the parameters of the virtual storage hard disk group when the storage node is added to the RAID system;
分布表计算模块,用于通过所述分布算法及所述参数获取单元获取 的所述虚拟存储硬盘组的参数计算所述虚拟存储硬盘组的所述新的虚 拟存储硬盘分布表。 A distribution table calculation module, configured to calculate the new virtual storage hard disk distribution table of the virtual storage hard disk group through the parameters of the virtual storage hard disk group obtained by the distribution algorithm and the parameter acquisition unit.
8、 根据权利要求 6或 7所述的装置, 其特征在于, 所述虚拟存储 硬盘组的参数包括下面的至少一种: 存储节点地址 ID列表、 存储节点 权重列表、所述虚拟存储硬盘组的标识和所述虚拟存储硬盘组中的虚拟 存储硬盘的数目; 其中所述存储节点权重列表为每个存储节点当前存储 硬盘的存储空间的使用率。 8. The device according to claim 6 or 7, characterized in that the parameters of the virtual storage hard disk group include at least one of the following: a storage node address ID list, a storage node weight list, a parameter of the virtual storage hard disk group, The identification and the number of virtual storage hard disks in the virtual storage hard disk group; wherein the storage node weight list is the storage space usage of the current storage hard disk of each storage node.
9、 根据权利要求 6所述的装置, 其特征在于, 所述迁移单元包括: 第一判断模块,用于根据所述新的虚拟存储硬盘分布表判断当前的 虚拟存储硬盘是否是需要删除的校验虚拟存储硬盘; 9. The device according to claim 6, wherein the migration unit includes: a first judgment module, configured to judge whether the current virtual storage hard disk needs to be deleted based on the new virtual storage hard disk distribution table. Check the virtual storage hard drive;
第二判断模块, 用于若所述第一判断模块判断结果为否, 则根据所 述新的虚拟存储硬盘分布表判断所述当前虚拟存储硬盘所处位置是否 和所述新的虚拟存储硬盘分布表中的位置相符; 迁移模块, 用于若所述第一判断模块判断结果为是, 则删除所述当 前虚拟存储硬盘及所述当前虚拟存储硬盘中的校验数据。 The second judgment module is configured to, if the judgment result of the first judgment module is no, judge whether the location of the current virtual storage hard disk is consistent with the distribution of the new virtual storage hard disk according to the new virtual storage hard disk distribution table. The positions in the table match; a migration module, configured to delete the current virtual storage hard disk and the verification data in the current virtual storage hard disk if the judgment result of the first judgment module is yes.
10、 根据权利要求 9所述的装置, 其特征在于: 所述迁移模块, 还用于若所述第二判断模块判断结果为否, 则将所 述当前的虚拟存储硬盘中数据复制到新增加的存储节点的存储硬盘中, 并将原位置处的所述当前的虚拟存储硬盘及所述当前的虚拟存储硬盘 中的数据删除; 用于若所述第二判断模块判断结果为是, 则保持所述当 前虚拟存储硬盘位置不变。 10. The device according to claim 9, characterized in that: the migration module is also configured to copy the data in the current virtual storage hard disk to the newly added in the storage hard disk of the storage node, and delete the current virtual storage hard disk at the original location and the data in the current virtual storage hard disk; used to keep if the judgment result of the second judgment module is yes. The current virtual storage hard disk location remains unchanged.
PCT/CN2014/074775 2013-09-16 2014-04-04 System expansion method and apparatus for redundant array of independent disks (raid) WO2015035768A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310422855.9A CN103513938B (en) 2013-09-16 2013-09-16 A kind of RAID RAID system expansion method and device
CN201310422855.9 2013-09-16

Publications (1)

Publication Number Publication Date
WO2015035768A1 true WO2015035768A1 (en) 2015-03-19

Family

ID=49896738

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/074775 WO2015035768A1 (en) 2013-09-16 2014-04-04 System expansion method and apparatus for redundant array of independent disks (raid)

Country Status (2)

Country Link
CN (1) CN103513938B (en)
WO (1) WO2015035768A1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103513938B (en) * 2013-09-16 2016-06-29 华为技术有限公司 A kind of RAID RAID system expansion method and device
CN104571947B (en) * 2014-12-05 2017-10-10 华为技术有限公司 A kind of method and controller, storage array that hard disk domain is divided in storage array
CN105138565B (en) * 2015-07-23 2018-05-01 浪潮(北京)电子信息产业有限公司 A kind of document handling method and system
CN108076078A (en) * 2016-11-09 2018-05-25 北京金山云网络技术有限公司 A kind of cloud host creation method, device and cloud service system
WO2018120939A1 (en) * 2016-12-29 2018-07-05 华为技术有限公司 Storage system expanded data migration method and storage system
CN108255413A (en) 2016-12-29 2018-07-06 华为技术有限公司 Method, the storage system of Data Migration after a kind of storage system dilatation
US10783049B2 (en) 2018-02-26 2020-09-22 International Business Machines Corporation Virtual storage drive management in a data storage system
CN110515535B (en) * 2018-05-22 2021-01-01 杭州海康威视数字技术股份有限公司 Hard disk read-write control method and device, electronic equipment and storage medium
CN110858122B (en) * 2018-08-23 2023-10-20 杭州海康威视系统技术有限公司 Method and device for storing data
US10732884B1 (en) * 2019-03-28 2020-08-04 International Business Machines Corporation Implementing redundant array of independent disks (RAID) arrays having compressed data stored therein
CN113126891B (en) * 2020-01-15 2024-05-24 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for storage management
WO2022188184A1 (en) * 2021-03-12 2022-09-15 华为技术有限公司 Data storage method and related device
CN113535088B (en) * 2021-07-15 2024-07-30 深圳市安存数据技术有限公司 Storage device, data processing method and storage system
CN114610245B (en) * 2022-05-09 2022-07-26 深圳佰维存储科技股份有限公司 RAID implementation method and device based on SSD, readable storage medium and electronic equipment
CN115576500B (en) * 2022-12-06 2023-02-28 苏州浪潮智能科技有限公司 RAID array capacity expansion method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7093088B1 (en) * 2003-04-23 2006-08-15 Emc Corporation Method and apparatus for undoing a data migration in a computer system
CN101587425A (en) * 2009-06-16 2009-11-25 杭州华三通信技术有限公司 A kind of method and device that increases magnetic disc redundant array redundancy
CN102184080A (en) * 2011-04-29 2011-09-14 华中科技大学 Curing band based data reading and writing method used after capacity expansion of RAID (Redundant Array of Independent Disk) system
CN103513938A (en) * 2013-09-16 2014-01-15 华为技术有限公司 System expansion method and device of redundant array of independent disks (RAID)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI334564B (en) * 2007-02-14 2010-12-11 Via Tech Inc Data migration systems and methods for independent storage device expansion and adaptation
CN102023902B (en) * 2010-12-28 2013-05-08 创新科存储技术有限公司 Disc array reconstruction method
CN103268202B (en) * 2013-04-23 2017-02-08 华为技术有限公司 Capacity expanding method and capacity expanding equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7093088B1 (en) * 2003-04-23 2006-08-15 Emc Corporation Method and apparatus for undoing a data migration in a computer system
CN101587425A (en) * 2009-06-16 2009-11-25 杭州华三通信技术有限公司 A kind of method and device that increases magnetic disc redundant array redundancy
CN102184080A (en) * 2011-04-29 2011-09-14 华中科技大学 Curing band based data reading and writing method used after capacity expansion of RAID (Redundant Array of Independent Disk) system
CN103513938A (en) * 2013-09-16 2014-01-15 华为技术有限公司 System expansion method and device of redundant array of independent disks (RAID)

Also Published As

Publication number Publication date
CN103513938B (en) 2016-06-29
CN103513938A (en) 2014-01-15

Similar Documents

Publication Publication Date Title
WO2015035768A1 (en) System expansion method and apparatus for redundant array of independent disks (raid)
US10860555B2 (en) Method and apparatus for two tier data deduplication using weighted graphs
US20200320036A1 (en) Data unit cloning in memory-based file systems
US9134914B1 (en) Deduplication
US10852966B1 (en) System and method for creating mapped RAID group during expansion of extent pool
US10423641B2 (en) Hierarchical coherency log for managing a distributed data storage system
US10146786B2 (en) Managing deduplication in a data storage system using a Bloomier filter data dictionary
US8965856B2 (en) Increase in deduplication efficiency for hierarchical storage system
US11886729B2 (en) Data storage method and apparatus
WO2019148841A1 (en) Distributed storage system, data processing method and storage node
WO2019001521A1 (en) Data storage method, storage device, client and system
WO2021027340A1 (en) Storage method and apparatus for key value (kv) and storage device
US20170017547A1 (en) Protecting data integrity in de-duplicated storage environments in combination with software defined native raid
US11947419B2 (en) Storage device with data deduplication, operation method of storage device, and operation method of storage server
WO2015027731A1 (en) Bloom filter generation method and device
US10782894B1 (en) Reducing overlap through shuffle and keeping relationship balance on mapped RAID system and method
US10592138B1 (en) Avoiding storage device overlap in raid extent sub group and keeping relationship balance on mapped raid system and method
WO2022257685A1 (en) Storage system, network interface card, processor, and data access method, apparatus, and system
US10831714B2 (en) Consistent hashing configurations supporting multi-site replication
CN109840051B (en) Data storage method and device of storage system
CN112115001B (en) Data backup method and device, computer storage medium and electronic equipment
JP5929326B2 (en) Storage system
WO2024055529A1 (en) Placement group member selection method and apparatus, device, and readable storage medium
WO2023050856A1 (en) Data processing method and storage system
US20200249862A1 (en) System and method for optimal order migration into a cache based deduplicated storage array

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

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

Country of ref document: EP

Kind code of ref document: A1