WO2013023516A1 - 数据冗余处理方法、装置和分布式存储系统 - Google Patents

数据冗余处理方法、装置和分布式存储系统 Download PDF

Info

Publication number
WO2013023516A1
WO2013023516A1 PCT/CN2012/079087 CN2012079087W WO2013023516A1 WO 2013023516 A1 WO2013023516 A1 WO 2013023516A1 CN 2012079087 W CN2012079087 W CN 2012079087W WO 2013023516 A1 WO2013023516 A1 WO 2013023516A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
storage
slice data
pieces
object set
Prior art date
Application number
PCT/CN2012/079087
Other languages
English (en)
French (fr)
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 WO2013023516A1 publication Critical patent/WO2013023516A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1076Parity data used in redundant arrays of independent storages, e.g. in RAID systems

Definitions

  • TECHNICAL FIELD Embodiments of the present invention relate to storage technologies, and in particular, to a data redundancy processing method, apparatus, and distributed storage system.
  • a distributed storage system consists of multiple storage nodes interconnected by a network. Data can be distributed to different storage nodes for high-capacity, high-reliability, and scalable storage applications.
  • the prior art employs multiple mechanisms between storage nodes to ensure the reliability of data storage.
  • the multiple-part mechanism is a backup node of one or a plurality of storage nodes in the distributed storage system as a primary storage node.
  • the multiple-part mechanism is a backup node of one or a plurality of storage nodes in the distributed storage system as a primary storage node.
  • data needs to be written to multiple copies of the same data on these storage nodes, thereby achieving redundant backup of data.
  • one storage node fails, data on other storage nodes is available.
  • the above-mentioned existing multiple-part mechanism simply writes the same data to a plurality of storage nodes, and if it is required to ensure that the data is still available after the N storage nodes are damaged, the data needs to be repeatedly written with N+1 copies.
  • the storage node has a space utilization of at most 1/(N+1). Therefore, the utilization of the storage space is low, and the load of the storage node is increased.
  • the multiple-part mechanism cannot support multiple types of redundant backup modes. Less flexibility. Summary of the invention
  • Embodiments of the present invention provide a data redundancy processing method, apparatus, and distributed storage system.
  • the embodiment of the invention provides a data redundancy processing method, including:
  • the M slice data and the N redundant slice data are respectively stored into objects located on at least two storage nodes, wherein each storage node includes at least one object set, and each object set includes at least one object.
  • An embodiment of the present invention provides a data redundancy processing apparatus, including:
  • a generating module configured to generate, by using a redundancy algorithm, M slice data and N redundant slice data of the data to be written, where the M slice data and the N redundant slice data are arbitrarily damaged to at most N data, Recover corrupted data with undamaged data, where M is a natural number greater than 1, and N is a natural number not less than one;
  • a storage module configured to store the M pieces of slice data and the N pieces of redundant slice data into objects located on at least two storage nodes, where each storage node includes at least one object set, and each object set includes At least one object.
  • the embodiment of the invention provides a distributed storage system comprising at least two storage nodes, wherein at least one storage node comprises the above-mentioned data redundancy processing device.
  • redundancy between storage nodes can be realized by storing slice data and redundant slice data in objects located on at least two storage nodes.
  • the processing can improve the utilization of the storage space and reduce the load of the storage node when the number of the sliced data is greater than 1.
  • the embodiment of the present invention can support different redundancy algorithms to meet different reliability requirements of the customer, and is flexible. Higher sex.
  • FIG. 1 is a schematic structural diagram of a relationship between a RAIS and an ObjectSet according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of relationship between an ObjectSet and an Object according to an embodiment of the present invention
  • FIG. 3 is a storage node, a RAIS, and an ObjectSet according to an embodiment of the present invention; Schematic diagram of the relationship between the two;
  • Embodiment 4 is a flowchart of Embodiment 1 of a data redundancy processing method according to the present invention.
  • FIG. 5 is a flowchart of Embodiment 2 of a data redundancy processing method according to the present invention.
  • FIG. 6 is a schematic diagram of a processing procedure of Embodiment 2 of the method shown in FIG. 5;
  • Embodiment 7 is a flowchart of Embodiment 3 of a data redundancy processing method according to the present invention.
  • FIG. 8 is a schematic diagram of a processing procedure of Embodiment 3 of the method shown in FIG. 7;
  • FIG. 9 is a schematic diagram of a processing procedure of a data redundancy processing method according to Embodiment 4 of the present invention.
  • FIG. 10 is a schematic structural diagram of Embodiment 1 of a data redundancy processing apparatus according to the present invention.
  • Embodiment 11 is a schematic structural diagram of Embodiment 2 of a data redundancy processing apparatus according to the present invention.
  • Embodiment 3 of a data redundancy processing apparatus according to the present invention.
  • FIG. 13 is a schematic structural diagram of Embodiment 4 of a data redundancy processing apparatus according to the present invention. detailed description
  • RA Redundant Array of Independent Object Set
  • object set the combination of objects, the following: ObjectSet
  • object which can be a physical disk, or
  • logical storage space, the relationship between the following cylinders: Object is described in detail.
  • FIG. 1 is a schematic structural diagram of a relationship between a RAIS and an ObjectSet according to an embodiment of the present invention.
  • one RAIS includes multiple ObjectSets.
  • FIG. 2 is a schematic structural diagram of a relationship between an ObjectSet and an Object according to an embodiment of the present invention.
  • an ObjectSet includes multiple Objects. Specifically, the collection of several Objects is an ObjectSet, or the container holding the Object is an ObjectSet.
  • ObjectSet is a logical concept.
  • RAIS is not an entity, it is also a logical concept.
  • Relationship between RAIS and ObjectSet An ObjectSet can only belong to one RAIS.
  • the relationship between ObjectSet and Object An Object can only belong to one ObjectSet.
  • Each ObjectSet belongs to the same physical device, so all objects in the same ObjectSet also belong to the same physical device.
  • FIG. 3 is a schematic structural diagram of a relationship between a storage node, a RAIS, and an ObjectSet according to an embodiment of the present invention.
  • each storage node in the three storage nodes (hereinafter referred to as a Storage Node) includes two ObjectSets.
  • the ObjectSet circled in the first line of the dotted line belongs to the same RAIS, and the RAIS identifier corresponding to the RAIS (hereinafter referred to as: RAISID) can be, for example, 1
  • the ObjectSet circled in the second line of the dotted line belongs to the same RAIS.
  • the RAISID corresponding to the RAIS may be, for example, 2. It should be noted that the structure shown in FIG.
  • FIG. 3 can further expand more Storage Nodes, and can further expand more RAISs. Moreover, in the structure shown in FIG. 3, there can be two or two on one Storage Node.
  • the above ObjectSets belong to the same RAIS, and their logical relationships are similar to each other, and will not be described here.
  • the technical solution of an embodiment of the present invention may be:
  • the M slice data and the N redundant slice data are respectively stored into objects located on at least two storage nodes, wherein each storage node includes at least one object set, and each object set includes at least one object.
  • each storage node includes at least one object set
  • each object set includes at least one object.
  • the related description information of the RAIS can be stored on the independent metadata server.
  • the execution entity of the foregoing embodiment may be a client, and the client may generate a slice data and a redundant slice data of the data to be written by using a redundancy algorithm, and then according to the related description information of the acquired RAIS, The slice data and the redundant slice data can be sent to objects in each object set in the RAIS.
  • the related description information of the RAIS is stored in each storage node of the distributed storage system. Therefore, the execution body of the foregoing embodiment may be any storage node in the distributed storage system.
  • the storage node may generate slice data and redundant slice data of the data to be written by the client, and then the storage node may send the slice data and the redundant slice data to each object in the RAIS according to the locally described related description information of the RAIS. Concentrated objects.
  • the slice data in the foregoing embodiment of the present invention is each slice data obtained by dividing the original data to be written, and the redundant slice data may be obtained by redundant operation on the slice data by using a redundancy algorithm.
  • these redundant data can ensure that when any data in the slice data and the redundant slice data is in error, the remaining data can recover the original data, and specifically allow several If the data is wrong, it is determined by the redundancy algorithm.
  • the slice data and the redundant slice data are respectively stored in the objects located on the at least two storage nodes, so that the redundancy processing between the storage nodes can be implemented, and the utilization of the storage space can be improved when the number of the sliced data is greater than 1.
  • the load of the storage node is reduced.
  • the embodiment of the present invention can support different redundancy algorithms to meet different reliability requirements of the customer, and the flexibility is high.
  • Step 401 To an independent element The data server sends a storage request message.
  • the client When a client writes data to each Storage Node in a distributed storage system, the client can send a Storage Request message to the independent metadata server.
  • Step 402 Receive storage description information fed back by the independent metadata server according to the storage request message, where the storage description information includes storage identifier information;
  • the write data request in this embodiment may include the RAISID of the RAIS to be written and the RAIS to be written.
  • the RAISID may be the RAISID of the RAIS of the first row in the structure shown in FIG. 3, that is, the RAISID of the first row needs to be written to the data to be written.
  • the description information of the RAIS stored in the independent metadata server may include the RAISID, the identification information of each object set in the RAIS, and the identification information of the storage node where each object set is located.
  • the client can query the independent metadata server to obtain the description information of the RAIS.
  • the RAIS description information includes the RAISID, the identification information of each object set in the RAIS, and the identification information of the Storage Node where each object set is located.
  • the format of a RAIS description stored on the independent metadata server is as follows:
  • the storage description information describes the members of the RAIS corresponding to the RAISID, where ObjSetllD, ObjSetnlD is the member of the RAIS, ObjSetllP, ⁇ ⁇ ⁇ , ObjSetnlP is the address of the Storage Node where each member is located. It can be understood that how many RAISs are in the distributed storage system can correspondingly store information on the independent metadata server in a format similar to the description information of the above RAIS.
  • the embodiment does not limit the independent metadata server to feed back the description information of the RAIS to the client.
  • the technical personnel can design the policy to enable the independent metadata server to feed back the RAIS description information to the client according to the preset policy.
  • the policy can be the load on each storage node, and the independent metadata server can preferentially feed back the RAIS corresponding to the smaller load node.
  • Step 403 Generate a M slice data and N redundant slice data of the data to be written by using a redundancy algorithm.
  • the client can use the redundancy algorithm to generate M slice data and N redundant slice data of the data to be written.
  • step 403 may also be performed before step 402 or in parallel with step 402.
  • the M slice data and the N redundant slice data generated by the client respectively correspond to objects in one ObjectSet in the RAIS.
  • this embodiment does not limit which redundancy algorithm is specifically used. Those skilled in the art can understand that as long as the data to be written can generate slice data and use the slice data to generate redundant data redundancy. Other algorithms are available.
  • the redundancy algorithm in this embodiment may be implemented by using an algorithm of a Redundant Array of Independent Disc (RAID) in the prior art.
  • the RAID algorithm includes RAID 1, RAID 5, and RAID 6.
  • the redundancy algorithm in this embodiment may also use a redundancy algorithm of the erasure code.
  • the foregoing redundancy algorithms are all prior art, and are not described in this embodiment. It can be understood that, based on different redundancy algorithms, the number of generated slice data is different from the number of redundant slice data. For example, a RAID 5 redundancy algorithm can generate multiple slice data and one redundancy.
  • Residual data correspondingly, the structure of the distributed storage system using the redundancy algorithm of RAID5 can extend several Storage Nodes based on the structure shown in FIG. 3, and each Storage Node has an ObjectSet, multiple The slice data and a redundant slice data can correspond to objects in the ObjectSet on the Storage Node.
  • the data to be written is generated into M pieces of slice data and N pieces of redundant slice data, and the utilization rate of the storage space is ⁇ / ( ⁇ + ⁇ ), therefore, as long as M > 1
  • the utilization rate of the storage space is inevitably larger than the space utilization ratio 1 / (N+1) of the multiple mechanisms in the prior art.
  • Step 404 Store the M slice data and the N redundant slice data to the at least two storage nodes corresponding to the storage identifier information according to the identifier information of the object set and the identifier information of the storage node where the object set is located. The object in the object set.
  • each storage node further stores object set description information, where the object set description information includes identification information of the object set, identification information of the object, and disk distribution information of the object.
  • the object set description information in this embodiment may adopt the following format:
  • ObjllD, ObjnID is the object in the ObjectSet identified by ObjSetID
  • ObjnDev is the disk distribution information corresponding to each object.
  • the storage controller on each Storage Node can store data in the corresponding object according to the object set description information.
  • the process of reading data by the client may be: querying an independent metadata server, and acquiring storage corresponding to the data to be read. Descriptive information; according to the storage description information, acquiring M slice data from objects of each object set located on at least two storage nodes, and M number of slices According to the integration process, the data to be read is obtained.
  • the client may obtain M pieces of slice data and N pieces of redundant slice data by using various redundancy algorithms, and store them in the objects of each ObjectSet of the RAIS, thereby implementing between the ObjectSets in the RAIS.
  • Data redundancy processing that is, data redundancy processing between Storage Nodes.
  • the technical solution of this embodiment does not store multiple copies on each storage node, but stores slice data on an ObjectSet of several Storage Nodes, and stores redundant data on another ObjectSet of one or several Storage Nodes.
  • the embodiment can support different redundancy algorithms to meet different reliability requirements of the customer, and the flexibility is more flexible. high.
  • FIG. 5 is a flowchart of Embodiment 2 of a data redundancy processing method according to the present invention
  • FIG. 6 is a schematic diagram of a processing procedure of Embodiment 2 of the method shown in FIG. 5.
  • the method in this embodiment may be applied to The distributed architecture, the method in this embodiment may include:
  • Step 501 A Storage Node, which is a Write Initiator (hereinafter referred to as WI), receives a write data request sent by a client, where the write data request includes data to be written.
  • WI Write Initiator
  • Step 502 The storage node that is the storage node of the WI acquires the storage description information that is required to be written by the locally stored slice data and the redundant slice data, where the storage description information includes the storage identification information.
  • the storage description information is stored locally in the Storage Node as the WI, and the storage description information may include a RAISID, identification information of the object set on the storage node, and identification information of other object sets in the RAIS and identification information of the storage node where the storage node is located.
  • the storage description information is stored on each Storage Node, so that the Storage Nodes can be backed up each other.
  • the first storage node in FIG. 6 is the WI, and after receiving the write data request sent by the client, the storage node can query the storage description information stored locally.
  • the format of the storage description information stored locally as the storage node of the WI may be: ⁇ RAISID, ObjSetID, ⁇ ObjSetllD, ObjSetllP ⁇ , ⁇ ⁇ ⁇ ,
  • the storage description information also describes the members of the RAIS corresponding to the RAISID, which differs from the storage description information in the embodiment shown in FIG. 4 in that the ObjSetID is a member of the Storage Node as the WI, ⁇ ObjSetllD , ObjSetllP ⁇ , ⁇ ⁇ ⁇ ,
  • ObjSetnID, ObjSetnIP ⁇ is the address of the other members of the RAIS and the storage node where it is located. It can be understood that how many RAISs in the distributed storage system can correspondingly store the number of letters in the format similar to the foregoing storage description information on the storage node as the WI, step 503, and the redundancy as the storage node of the WI.
  • the algorithm generates slice data and redundant slice data of the data to be written.
  • the client may generate the slice data and the redundant slice data, and the storage node is generated as the storage node of the WI, and the operation of the client in the method shown in FIG. 4 is encapsulated.
  • Step 504 The storage node as the WI stores, according to the identifier information of the object set and the identifier information of the storage node where the object set is located, the M slice data and the N redundant slice data to be located at least corresponding to the storage identifier information. Two objects in the object set on the storage node.
  • the slice data and the redundant slice data can be correspondingly transmitted to the ObjectSet on each Storage Node.
  • the first storage node can send two slice data to the first storage node and the second storage node, and send the redundant slice data to the third storage node.
  • Step 505 Each Storage Node stores data in each object of the object set.
  • each storage node further stores object set description information, where the object set description information includes identification information of the object set, identification information of the object, and disk distribution information of the object.
  • the object set description information in this embodiment may adopt the following format: ⁇ ObjSetID, ⁇ Obj llD, Obj lDev ⁇ , ⁇ ⁇ ⁇ , ⁇ ObjnID, ObjnDev ⁇ ⁇
  • Obj llD , ObjnID is the object in the ObjectSet identified by ObjSetID
  • ObjlDev ObjnDev is the disk distribution information corresponding to each object.
  • the storage controller on each Storage Node can store data in the corresponding object according to the object set description information.
  • Step 506 Each Storage Node sends a storage response to the Storage Node as a WI.
  • Step 507 The storage node that is the WI sends a response to the client.
  • FIG. 6 only shows three Storage Nodes in the distributed storage system. It can be understood by those skilled in the art that the distributed storage system may further include more Storage Nodes not shown.
  • various redundancy algorithms can be used to perform data redundancy processing between ObjectSets in the RAIS, thereby implementing data redundancy processing between the Storage Nodes.
  • the technical solution of this embodiment does not store multiple copies on each storage node, but stores slice data on an ObjectSet of several Storage Nodes, and stores redundant data on another ObjectSet of one or several Storage Nodes.
  • the embodiment can support different redundancy algorithms to meet different reliability requirements of the customer, and the flexibility is more flexible. high.
  • FIG. 7 is a flowchart of Embodiment 3 of a data redundancy processing method according to the present invention
  • FIG. 8 is a schematic diagram of a processing procedure of Embodiment 3 of the method shown in FIG. 7.
  • the method in this embodiment is adopted.
  • the method of reading data after the data is written in the method embodiment shown in FIG. 5, the method in this embodiment may include:
  • Step 701 The Storage Node, which is a Read Initiator (hereinafter referred to as RI), receives a read data request sent by the client.
  • RI Read Initiator
  • the Storage Node as the RI may be the same Storage Node as the Storage Node as the WI, or may be a different Storage. Node.
  • This example also uses the first Storage Node as the Storage Node as the RI as an example.
  • Step 702 The storage node that is the RI obtains the storage description information corresponding to the data to be read stored locally.
  • Step 703 Acquire, according to the storage description information, M pieces of slice data from objects of each object set located on at least two storage nodes.
  • the storage node as the RI in this embodiment may acquire the slice data from each object set according to the storage description information.
  • the first storage node can learn that the first storage node belongs to the same RAIS as the second storage node and the third storage node according to the obtained storage description information. Therefore, the storage node as the RI, that is, the first storage node, can respectively acquire data from the local, second storage node, and the third Storage Node's ObjectSet, and the data includes the slice data.
  • each Storage Node can still learn the distribution information of the objects in its respective ObjectSet by referring to the content of the object set description information.
  • Step 704 The storage node as the RI performs integration processing on the M slice data to obtain data to be read.
  • the slice data can be integrated to obtain the data to be read.
  • the process can be implemented by using the prior art. For example, if the redundancy algorithm used in writing data is RAID5, the slice data is still integrated according to RAID5 when read.
  • Step 705 The storage node as the RI feeds back the data to be read to the client.
  • FIG. 8 only shows three storage nodes in the distributed storage system. It can be understood by those skilled in the art that the distributed storage system may further include more storage nodes not shown.
  • the slice data may be acquired from an ObjectSet that belongs to the same RAIS deployed on different Storage Nodes, respectively. These slice data can be integrated and fed back to the client.
  • FIG. 9 is a schematic diagram of the processing procedure of the fourth embodiment of the data redundancy processing method of the present invention. As shown in FIG. 9, the present embodiment is expanded on the basis of FIG. 4, FIG. 5 or FIG. 7 after using the new Storage Node. A solution for object set decomposition and migration is proposed. Referring to Figure 9, for example, when an ObjectSet satisfies one of the following two conditions, the ObjectSet can be decomposed:
  • FIG. 9 of this embodiment Only the case where a new Storage Node is added is shown in FIG. 9 of this embodiment. It can be understood by those skilled in the art that the processing procedure of the ObjectSet exceeds the threshold, and the processing procedure is similar and will not be described again.
  • the principle of decomposing and migrating the ObjectSet in this embodiment is as follows: Decomposing each object set located on at least two storage nodes into at least two subsets, and decomposing at least two subsets according to the load status on each storage node. A subset of the subset is assigned to the new storage node.
  • RAIS1 includes three ObjectSetls, which are respectively distributed on the first three Storage Nodes
  • RAIS2 includes three 0bjectSet2s, which are respectively distributed on the last three Storage Nodes.
  • Figure 9 shows the addition of a new Storage Node, New Node, based on the original four Storage Nodes. Therefore, this embodiment can migrate part of the data on RAIS1 to New Node. It should be noted that this embodiment can also migrate data on RAIS2 or migrate some data on RAIS1 and RAIS2.
  • RAIS1 The decomposition and migration process performed by RAIS1 in this embodiment is as follows:
  • the foregoing process provides a process of migrating data on each storage node according to the load status after the capacity expansion.
  • the data to be deleted may be deleted first.
  • the data on the storage node is migrated to the reserved storage node, and then the storage node is deleted.
  • corresponding data migration can be performed for the expansion and deletion of the storage node, which not only ensures the reliability of the data storage, but also fully considers the load balancing, and the internal of the distributed storage system.
  • the management of the Storage Node is also very convenient.
  • the data redundancy processing apparatus in this embodiment includes: a generating module 11 and a storage module 12, wherein the generating module 11 is used.
  • the storage module 12 is configured to store the M slice data and the N redundant slice data separately in at least two storages Among the objects on the node, where each storage node contains at least one object set, each object set contains at least one object.
  • the data redundancy processing device in this embodiment may be a storage controller in a storage node in the distributed data redundancy processing device.
  • the data redundancy processing device in this embodiment does not perform multiple storage on each storage node.
  • the slice data is stored on one or several Storage Node ObjectSets in the distributed storage system, and the redundant slice data is stored on another one or several Storage Node ObjectSets, thereby implementing redundancy processing between the Storage Nodes.
  • the number of the slice data is greater than 1, the utilization of the storage space is increased and the load of the storage node is reduced.
  • the embodiment of the present invention can support different redundancy algorithms to meet different reliability requirements of the customer, and the flexibility is more flexible. high. FIG.
  • the data redundancy processing apparatus in this embodiment further includes: a write request receiving module 13 and a description information obtaining module 14 , wherein the write request receiving module 13 is configured to receive a write data request sent by the client, where the write data request includes the data to be written; the description information acquiring module 14 And storing storage description information required for writing the M pieces of slice data and N pieces of redundant slice data, where the storage description information includes storage identification information.
  • the storage module 12 may be specifically configured to store the M slice data and the N redundant slice data into an object in the object set located on the at least two storage nodes corresponding to the storage identification information.
  • the data redundancy processing apparatus of this embodiment may be used to perform the method of the method embodiment shown in FIG. 5, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of Embodiment 3 of a data redundancy processing apparatus according to the present invention.
  • the data redundancy processing apparatus in this embodiment is based on the data redundancy processing apparatus shown in FIG.
  • the method includes: a read request receiving module 15 and a data reading module 16, wherein the read request receiving module 15 is configured to receive a read data request sent by the client; and the data reading module 16 is configured to obtain the locally stored and to be read data.
  • Corresponding storage description information ; acquiring, according to the storage description information, the M slice data from objects of each object set located on at least two storage nodes; performing integration processing on the M slice data to obtain a to-be-read Data is output, and the data to be read is sent to the client.
  • the data redundancy processing apparatus of this embodiment may be used to perform the method of the method embodiment shown in FIG. 7.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 13 is a schematic structural diagram of Embodiment 4 of a data redundancy processing apparatus according to the present invention.
  • the data redundancy processing apparatus in this embodiment is based on the data redundancy processing apparatus shown in FIG.
  • the method further includes: a decomposition migration module 17, configured to decompose each object set located on the at least two storage nodes into at least two subsets, and according to a load status on each storage node, a partial subset of the decomposed at least two subsets Assigned to the new storage node.
  • the data redundancy processing apparatus of this embodiment may be used to perform the processing procedure shown in FIG. 9, and the implementation principle and technical effects thereof are similar, and details are not described herein again.
  • the present invention may further provide a distributed storage system, where the storage system includes at least two storage nodes, and at least one of the storage nodes may include the ones shown in FIGS. 10-13.
  • the data redundancy processing device including the storage node of the data redundancy processing device, may be a Storage Node as a WI or a Storage Node as an RI.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

提供一种数据冗余处理方法、装置和分布式存储系统。该方法包括:采用冗余算法生成待写入数据的M个切片数据和N个冗余片数据(403),所述M个切片数据和N个冗余片数据中任意损坏至多N个数据时,能够利用未损坏的数据恢复损坏的数据,其中M为大于1的自然数,N为不小于1的自然数;将所述M个切片数据和N个冗余片数据分别存储到位于至少两个存储节点上的对象中(404),其中,每个存储节点包含至少一个对象集,每个对象集包含至少一个对象。该方法可以提高存储空间的利用率且降低了存储负载,另外可以支持不同的冗余算法,从而满足客户不同的可靠性需求,灵活性较高。

Description

数据冗余处理方法、 装置和分布式存储系统 本申请要求于 2011年 8月 18日提交中国专利局、 申请号为
201110237373.7、 发明名称为 "数据冗余处理方法、 装置和分布式存储系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明实施例涉及存储技术, 尤其涉及一种数据冗余处理方法、 装置和 分布式存储系统。
背景技术
分布式存储系统包括通过网络互联的多个存储节点, 数据可以被分散 地存储到不同的存储节点上, 以实现大容量、 高可靠性且易扩展的存储应 用。
现有的分布式存储系统可以采用基于对象的存储方式。 对于这种存储 方式来说, 现有技术采用存储节点间的多份机制以保证数据存储的可靠性。 具体来说, 该多份机制即为将该分布式存储系统中的某一个或者某几个存 储节点作为主存储节点的备份节点。 在写数据时, 需要将数据在这些存储 节点上写入多份相同的数据, 从而实现数据的冗余备份, 在一个一个存储 节点发生故障时, 其它存储节点上的数据是可用的。
但是, 上述现有的多份机制只是筒单地向多个存储节点中写入相同的数 据,如果要保证损坏 N个存储节点后数据仍可用,则数据至少需要重复写 N+1 份, 则存储节点的空间利用率最多为 1/ ( N+1 ) , 因此, 存储空间的利用率较 低, 存储节点的负载增高; 而且, 这种多份机制不能支持多种类型的冗余备份 方式, 灵活性较低。 发明内容
本发明实施例提供一种数据冗余处理方法、 装置和分布式存储系统。 本发明实施例提供一种数据冗余处理方法, 包括:
采用冗余算法生成待写入数据的 M个切片数据和 N个冗余片数据, 所 述 M个切片数据和 N个冗余片数据中任意损坏至多 N个数据时,能够利用 未损坏的数据恢复损坏的数据, 其中 M为大于 1的自然数, N为不小于 1 的自然数;
将所述 M个切片数据和 N个冗余片数据分别存储到位于至少两个存储 节点上的对象中, 其中, 每个存储节点包含至少一个对象集, 每个对象集 包含至少一个对象。
本发明实施例提供一种数据冗余处理装置, 包括:
生成模块, 用于采用冗余算法生成待写入数据的 M个切片数据和 N个 冗余片数据,所述 M个切片数据和 N个冗余片数据中任意损坏至多 N个数 据时, 能够利用未损坏的数据恢复损坏的数据, 其中 M为大于 1的自然数, N为不小于 1的自然数;
存储模块, 用于将所述 M个切片数据和 N个冗余片数据分别存储到位 于至少两个存储节点上的对象中, 其中, 每个存储节点包含至少一个对象 集, 每个对象集包含至少一个对象。
本发明实施例提供一种分布式存储系统包括至少两个存储节点, 其中 至少有一个存储节点包括上述的数据冗余处理装置。
本发明实施例, 并非在各个存储节点上进行多份存储, 而是通过将切片数据 和冗余片数据存储在位于至少两个存储节点上的对象中,从而可以实现存储节 点之间的冗余处理, 在切片数据的个数大于 1时可以提高存储空间地利用率且 降低了存储节点的负载, 另外, 本发明实施例可以支持不同的冗余算法, 从而 满足客户不同的可靠性需求, 灵活性较高。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作一筒单地介绍, 显而易见地, 下面描 述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出 创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例中 RAIS和 ObjectSet之间的关系结构示意图; 图 2为本发明实施例中 ObjectSet和 Object之间的关系结构示意图; 图 3为本发明实施例中存储节点、 RAIS和 ObjectSet之间的关系结构 示意图;
图 4为本发明数据冗余处理方法实施例一的流程图;
图 5为本发明数据冗余处理方法实施例二的流程图;
图 6为图 5所示方法实施例二的处理过程示意图;
图 7为本发明数据冗余处理方法实施例三的流程图;
图 8为图 7所示方法实施例三的处理过程示意图;
图 9为本发明数据冗余处理方法实施例四的处理过程示意图; 图 10为本发明数据冗余处理装置实施例一的结构示意图;
图 11为本发明数据冗余处理装置实施例二的结构示意图;
图 12为本发明数据冗余处理装置实施例三的结构示意图;
图 13为本发明数据冗余处理装置实施例四的结构示意图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。
在具体描述本实施例的技术方案之前, 首先对本发明实施例中所提到 的独立冗余对象集阵歹' J ( Redundant Array of Independent objectSet , 以下筒 称: RAIS ) 、 对象集 (对象的组合, 以下筒称: ObjectSet ) 以及对象(可 以是物理上的磁盘, 也可以是逻辑上的存储空间, 以下筒称: Object )之间 的关系进行详细说明。
图 1为本发明实施例中 RAIS和 ObjectSet之间的关系结构示意图, 如 图 1所示, 在本发明实施例中, 一个 RAIS包括多个 ObjectSet。 图 2为本 发明实施例中 ObjectSet和 Object之间的关系结构示意图, 如图 2所示, 在 本发明实施例中, 一个 ObjectSet包括多个 Object。 具体来说, 若干 Object 的集合就是一个 ObjectSet, 或者说容纳 Object的容器就是一个 ObjectSet。 ObjectSet是逻辑上的概念。 RAIS不是一个实体, 也是一个逻辑概念。
RAIS和 ObjectSet之间的关系: 一个 ObjectSet只能属于一个 RAIS。 ObjectSet和 Object之间的关系: 一个 Object只能属于一个 ObjectSet。 每个 ObjectSet属于同一个物理设备, 因此同一个 ObjectSet内的所有 Object也属于同一个物理设备。
图 3为本发明实施例中存储节点、 RAIS和 ObjectSet之间的关系结构 示意图,如图 3所示,三个存储节点(以下筒称: Storage Node )中每个 Storage Node上均包含两个 ObjectSet, 其中, 第一行虚线框中圈入的 ObjectSet属 于同一个 RAIS , 该 RAIS对应的 RAIS标识 (以下筒称: RAISID ) 例如可 以为 1 , 第二行虚线框中圈入的 ObjectSet属于同一个 RAIS , 该 RAIS对应 的 RAISID例如可以为 2。 需要说明的是, 图 3所示结构可以进一步扩展更 多个 Storage Node, 也可以进一步扩展更多个 RAIS, 而且, 图 3所示的结 构中, 一个 Storage Node上也可以有两个或者两个以上的 ObjectSet同属于 一个 RAIS , 其彼此之间的逻辑关系类似, 此处不再赘述。
基于上述对分布式存储系统的逻辑划分, 本发明实施例提出了下述技 术方案, 以提高存储空间的利用率, 降低存储节点的负载, 且支持多种类 型的冗余备份方式, 灵活性较高。 具体来说, 本发明的一个实施例的技术方案可以为:
采用冗余算法生成待写入数据的 M个切片数据和 N个冗余片数据, 所 述 M个切片数据和 N个冗余片数据中任意损坏至多 N个数据时,能够利用 未损坏的数据恢复损坏的数据, 其中 M为大于 1的自然数, N为不小于 1 的自然数;
将所述 M个切片数据和 N个冗余片数据分别存储到位于至少两个存储 节点上的对象中, 其中, 每个存储节点包含至少一个对象集, 每个对象集 包含至少一个对象。 上述实施例, 可以应用于两种网络架构中, 一种网络 架构是集中式架构, 另一种网络架构是分布式架构。
具体地, 对于集中式架构来说, RAIS的相关描述信息均可以存储于独 立元数据服务器上, 客户端要向分布式存储系统中写入数据时, 需要到元 数据服务器上查询获取 RAIS的相关描述信息。 在这种网络架构下, 上述实 施例的执行主体可以是客户端, 该客户端可以采用冗余算法生成待写入数 据的切片数据和冗余片数据,然后根据获取的 RAIS的相关描述信息即可将 切片数据和冗余片数据发送给该 RAIS中的各对象集中的对象。
对于分布式架构来说, RAIS的相关描述信息均存储在分布式存储系统 的各个存储节点上, 因此, 上述实施例的执行主体可以是分布式存储系统 中的任一存储节点。 该存储节点可以生成客户端待写入数据的切片数据和 冗余片数据,然后存储节点可以根据其本地存储的 RAIS的相关描述信息将 切片数据和冗余片数据发送给该 RAIS中的各对象集中的对象。
需要说明的是, 本发明上述实施例中的切片数据为对原始的待写入数 据进行划分后获取的各片数据, 而冗余片数据可以是采用冗余算法对切片 数据进行冗余运算获取的几个冗余的数据, 这几个冗余的数据可是保证在 切片数据和冗余片数据中任意几个数据出错时, 采用剩余的数据均能够恢 复出原始数据, 而具体可以允许几个数据出错, 则由冗余算法确定。
本发明实施例, 并非在各个 Storage Node上进行多份存储, 而是通过 将切片数据和冗余片数据分别存储在位于至少两个存储节点上的对象中, 从而可以实现 Storage Node之间的冗余处理, 在切片数据的个数大于 1时 可以提高存储空间地利用率且降低了 Storage Node的负载, 另外, 本发明 实施例可以支持不同的冗余算法, 从而满足客户不同的可靠性需求, 灵活 性较高。
下面采用两个具体的实施例, 对上述实施例进行详细说明。
图 4为本发明数据冗余处理方法实施例一的流程图, 如图 4所示, 本 实施例的方法可以适用于集中式网络架构, 本实施例的方法可以包括: 步骤 401、 向独立元数据服务器发送存储请求消息。
在客户端向分布式存储系统中的各个 Storage Node中写入数据时, 该 客户端可以向独立元数据服务器发送存储请求消息。
步骤 402、接收独立元数据服务器根据所述存储请求消息反馈的存储描 述信息, 该存储描述信息包含存储标识信息;
本实施例中的写数据请求中可以包含待写入数据和所需写入的 RAIS 的 RAISID。 举例来说, 该 RAISID可以是图 3所示结构中第一行的 RAIS 的 RAISID, 也即, 该待写入数据需要写入第一行的 RAISID。
具体来说, 在本实施例中, 该独立元数据服务器上存储的 RAIS的描述 信息可以包含 RAISID、 RAIS中各对象集的标识信息和各对象集所在存储 节点的标识信息。
相应地, 客户端可以查询独立元数据服务器, 获取 RAIS的描述信息。 该 RAIS描述信息中包含 RAISID、 RAIS中各对象集的标识信息和各对象集 所在 Storage Node的标识信息。
举例来说,该独立元数据服务器上存储的一个 RAIS的描述信息的格式 如下所示:
{RAISID, {ObjSetllD, ObjSetllP} , · · · , {ObjSetnID, ObjSetnIP} } 该存储描述信息描述了与 RAISID对应的 RAIS的各成员, 其中, ObjSetllD, ObjSetnlD即为该 RAIS中的成员, ObjSetllP, · · · , ObjSetnlP 即为各成员所在的 Storage Node的地址。 可以理解的是, 在分布式存储系 统中有多少个 RAIS , 就可以对应地在独立元数据服务器上存储多少个与上 述 RAIS的描述信息类似格式的信息。
本实施例并不限定独立元数据服务器将那个 RAIS的描述信息反馈给 客户端, 本领域技术人员可以自行设计策略使独立元数据服务器根据预设 策略向客户端反馈 RAIS的描述信息, 举例来说, 该策略可以是各 Storage Node上的负载, 独立元数据月良务器可以优先反馈负载较小的 Storage Node 对应的 RAIS。
步骤 403、 采用冗余算法生成待写入数据的 M个切片数据和 N个冗余 片数据。
客户端可以自行采用冗余算法生成待写入数据的 M个切片数据和 N个 冗余片数据。
需要说明的是, 步骤 403也可以在步骤 402之前执行, 或者与步骤 402 并行执行。
客户端生成的 M个切片数据和 N个冗余片数据分别与 RAIS中的一个 ObjectSet中的对象对应。 以图 3所示结构举例来说, 生成的切片数据有两 个, 冗余片数据有一个, 两个切片数据可以与图 3中第一行的 RAIS的两个 ObjectSet对应, 一个冗余片数据可以与剩下的一个 ObjectSet对应。 需要说 明的是, 本实施例并不限定具体采用哪种冗余算法, 本领域技术人员可以 理解的是, 只要能够将待写入数据生成切片数据, 并利用切片数据生成冗 余片数据的冗余算法均可。 优选地, 本实施例中的冗余算法可以采用现有 技术中独立磁盘冗余阵列(Redundant Array of Independent Disc, 以下筒称: RAID ) 的算法实现, 该 RAID的算法包括 RAID 1 , RAID5、 RAID6等, 或 者本实施例中的冗余算法也可以采用纠删码的冗余算法。 上述冗余算法均 为现有技术, 本实施例不再赘述。 可以理解的是, 基于不同的冗余算法, 所生成的切片数据的个数与冗 余片数据的个数是不同的, 例如采用 RAID5这种冗余算法即可生成多个切 片数据和一个冗余片数据, 相应地, 采用 RAID5这种冗余算法的分布式存 储系统的结构可以在图 3所示结构的基础上再扩展几个 Storage Node,每个 Storage Node上均有一个 ObjectSet, 多个切片数据和一个冗余片数据可以 与 Storage Node上的 ObjectSet中的对象对应。
由上述描述可知, 基于所采用的冗余算法将待写入数据生成 M份切片 数据和 N份冗余片数据, 存储空间的利用率为 Μ/ ( Μ+Ν ) , 因此, 只要 M > 1 , 则存储空间的利用率必然大于现有技术中多份机制的空间利用率 1/ ( N+1 ) 。
步骤 404、 根据对象集的标识信息和对象集所在存储节点的标识信息, 将所述 M个切片数据和 N个冗余片数据存储到与所述存储标识信息对应的 位于至少两个存储节点上的对象集中的对象中。
具体来说, 每个 Storage Node上还存储了对象集描述信息, 该对象集 描述信息中包含所述对象集的标识信息、 对象的标识信息以及对象的磁盘 分布信息。
举例来说, 本实施例中的对象集描述信息可以采用如下格式:
{ObjSetID, {ObjllD, ObjlDev} , · · · , {ObjnID, ObjnDev} }
其中, ObjllD, ObjnID即为 ObjSetID标识的 ObjectSet中的对象, Obj 1 Dev , ObjnDev即为各对象对应的磁盘分布信息。
因此, 每个 Storage Node上的存储控制器可以根据该对象集描述信息 将数据存储在对应的对象中。
上述实施例描述了集中式网络架构下数据的冗余处理方法, 针对这种 冗余处理方法, 客户端读取数据的过程可以为: 查询独立元数据服务器, 获取与待读出数据对应的存储描述信息; 根据该存储描述信息, 从位于至 少两个存储节点上的各对象集的对象中获取 M个切片数据,对 M个切片数 据进行整合处理, 获取待读出数据。
本发明上述实施例, 客户端可以采用各种冗余算法获得 M个切片数据 和 N个冗余片数据, 并存储在 RAIS的各 ObjectSet的对象中, 从而实现在 RAIS中的各 ObjectSet之间进行数据冗余处理, 也即实现 Storage Node之 间的数据冗余处理。 而且, 本实施例的技术方案并非在各个 Storage Node 上进行多份存储, 而是在其中几个 Storage Node的 ObjectSet上存储切片数 据, 在另外一个或者几个 Storage Node的 ObjectSet上存储冗余片数据, 在 切片数据的个数大于 1时可以提高存储空间地利用率且降低了 Storage Node 的负载, 另外, 本实施例可以支持不同的冗余算法, 从而满足客户不同的 可靠性需求, 灵活性较高。
图 5为本发明数据冗余处理方法实施例二的流程图, 图 6为图 5所示 方法实施例二的处理过程示意图, 如图 5和 6所示, 本实施例中的方法可 以适用于分布式架构, 本实施例的方法可以包括:
步骤 501、作为写发起者( Write Initiator,以下筒称: WI )的 Storage Node 接收客户端发送的写数据请求, 该写数据请求中包含待写入数据。
步骤 502、 作为 WI的 Storage Node获取本地存储的所述切片数据和冗 余片数据所需写入的存储描述信息, 该存储描述信息包含存储标识信息。
在本实施例中。 该存储描述信息存储在作为 WI的 Storage Node本地, 该存储描述信息可以包含 RAISID、 该存储节点上的对象集的标识信息以及 所述 RAIS中其它对象集的标识信息和所在存储节点的标识信息。
优选地, 在每个 Storage Node上, 均可以存储存储描述信息, 从而可 使 Storage Node互为备份。
具体来说, 图 6中的第一个 Storage Node即为 WI, 该 Storage Node接 收客户端发送的写数据请求后, 可以查询本地存储的存储描述信息。
举例来说,该作为 WI的 Storage Node本地存储的存储描述信息的格式 可以为: {RAISID, ObjSetID, {ObjSetllD, ObjSetllP} , · · · ,
{ObjSetnID,ObjSetnIP} }
该存储描述信息也描述了与 RAISID对应的 RAIS的各成员, 与图 4所 示实施例中的存储描述信息的不同之处在于, 其中的 ObjSetID即为作为 WI的 Storage Node上的成员, {ObjSetllD, ObjSetllP} , · · · ,
{ ObjSetnID,ObjSetnIP}即为该 RAIS中其它成员和所在的 Storage Node的地 址。 可以理解的是, 在分布式存储系统中有多少个 RAIS, 就可以对应地在 作为 WI的 Storage Node上存储多少个与上述存储描述信息类似格式的信 步骤 503、 作为 WI的 Storage Node采用冗余算法生成待写入数据的切 片数据和冗余片数据。
在本实施例中, 客户端可以不用生成切片数据和冗余片数据, 而又该 作为 WI的 Storage Node生成, 筒化了图 4所示方法中客户端的操作。
步骤 504、 作为 WI的 Storage Node根据对象集的标识信息和对象集所 在存储节点的标识信息, 将所述 M个切片数据和 N个冗余片数据存储到与 所述存储标识信息对应的位于至少两个存储节点上的对象集中的对象中。
具体来说, 在作为 WI的 Storage Node上的存储控制器在获知 RAIS中 各 ObjectSet的分布信息后, 即可将切片数据和冗余片数据对应地发送给各 Storage Node上的 ObjectSet。 举例来说, 本实施例中第一个 Storage Node 可以将两个切片数据发送给第一 Storage Node和第二个 Storage Node ,将冗 余片数据发送给第三个 Storage Node。
步骤 505、 各 Storage Node在对象集的各对象中存储数据。
具体来说, 每个 Storage Node上还存储了对象集描述信息, 该对象集 描述信息中包含所述对象集的标识信息、 对象的标识信息以及对象的磁盘 分布信息。
举例来说, 本实施例中的对象集描述信息可以采用如下格式: {ObjSetID, {Obj llD, Obj lDev} , · · · , {ObjnID, ObjnDev} } 其中, Obj llD , ObjnID即为 ObjSetID标识的 ObjectSet中的对象, ObjlDev, ObjnDev即为各对象对应的磁盘分布信息。
因此, 每个 Storage Node上的存储控制器可以根据该对象集描述信息 将数据存储在对应的对象中。
步骤 506、各 Storage Node将存储响应发送给作为 WI的 Storage Node。 步骤 507、 作为 WI的 Storage Node将响应发送给客户端。
需要说明的是, 图 6仅示出了分布式存储系统中的三个 Storage Node, 本领域技术人员可以理解的是, 该分布式存储系统还可以包括更多没有示 出的 Storage Node。
本发明上述实施例,作为 WI的 Storage Node可以采用各种冗余算法在 RAIS中的各 ObjectSet之间进行数据冗余处理,从而可以实现 Storage Node 之间的数据冗余处理。 而且, 本实施例的技术方案并非在各个 Storage Node 上进行多份存储, 而是在其中几个 Storage Node的 ObjectSet上存储切片数 据, 在另外一个或者几个 Storage Node的 ObjectSet上存储冗余片数据, 在 切片数据的个数大于 1时可以提高存储空间地利用率且降低了 Storage Node 的负载, 另外, 本实施例可以支持不同的冗余算法, 从而满足客户不同的 可靠性需求, 灵活性较高。
图 7为本发明数据冗余处理方法实施例三的流程图, 图 8为图 7所示 方法实施例三的处理过程示意图, 如图 7和 8所示, 本实施例中的方法是 在采用图 5所示方法实施例写入数据后的读数据过程, 本实施例的方法可 以包括:
步骤 701、作为读发起者 ( Read Initiator, 以下筒称: RI )的 Storage Node 接收客户端发送的读数据请求。
需要说明的是, 本实施例中作为 RI的 Storage Node既可以是与上述作 为 WI的 Storage Node是同一个 Storage Node, 也可以是不同的 Storage Node。本实施例也以第一个 Storage Node为作为 RI的 Storage Node为例进 行说明。
步骤 702、 作为 RI的 Storage Node获取本地存储的与待读取数据对应 的存储描述信息。
步骤 703、 根据所述存储描述信息, 从位于至少两个存储节点上的各对 象集的对象中获取 M个切片数据。
具体来说,本实施例中作为 RI的 Storage Node可以根据存储描述信息, 从各对象集中获取切片数据。 参见图 8可知, 第一个 Storage Node可以根 据获取的存储描述信息获知该第一个 Storage Node与第二个 Storage Node 和第三个 Storage Node属于同一个 RAIS。因此,该作为 RI的 Storage Node, 即第一个 Storage Node即可从本地、 第二个 Storage Node和第三个 Storage Node的 ObjectSet上分别获取数据,该数据包括了切片数据。在具体实现时, 各 Storage Node仍然可以参考上述对象集描述信息的内容获知在其各自的 ObjectSet中对象的分布信息等。
步骤 704、 作为 RI的 Storage Node对 M个切片数据进行整合处理, 获 取待读出数据。
当作为 RI的 Storage Node获取到全部切片数据后, 即可将这些切片数 据进行整合处理, 从而获取待读出数据。 该过程可以采用现有技术实现, 举例来说, 若写入数据时采用的冗余算法是 RAID5 , 则读出时也仍然按照 RAID5对切片数据进行整合。
步骤 705、 作为 RI的 Storage Node将待读出数据反馈给客户端。
需要说明的是, 图 8仅示出了分布式存储系统中的三个 Storage Node, 本领域技术人员可以理解的是, 该分布式存储系统还可以包括更多没有示 出的 Storage Node。
本实施例, 基于上述数据写入过程, 在数据读出过程中, 可以分别从 部署在不同 Storage Node上属于同一个 RAIS的 ObjectSet中获取切片数据, 并对这些切片数据进行整合后即可反馈给客户端。
图 9为本发明数据冗余处理方法实施例四的处理过程示意图, 如图 9 所示, 本实施例在图 4、 图 5或者图 7的基础上, 在采用新的 Storage Node 进行扩容后, 提出一种对象集分解和迁移的解决方案。 参考图 9举例来说, 当一个 ObjectSet满足下面两个条件之一时, 即可对 ObjectSet进行分解:
1、 一个 ObjectSet容量超过阈值
2、 一个新的 Storage Node力口入。
本实施例的图 9中仅示出了有新的 Storage Node加入的情况, 本领域 技术人员可以理解的是, 对于 ObjectSet容量超过阈值的情况来说, 其处理 过程类似, 不再赘述。
本实施例中针对 ObjectSet进行分解和迁移的原则为: 将位于至少两个 存储节点上的各对象集分解为至少两个子集, 根据各存储节点上的负载状 态, 将分解后的至少两个子集中的部分子集分配给所述新的存储节点。
参见图 9具体来说, 在原来的四个 Storage Node上, RAIS1包括 3个 ObjectSetl ,分别分布在前三个 Storage Node上, RAIS2包括 3个 0bjectSet2, 分别分布在后三个 Storage Node上。 图 9在原来的四个 Storage Node的基 础上, 新增加了一个 Storage Node , 即 New Node。 因此, 本实施例可以将 RAIS1上的部分数据迁移到 New Node上。 需要说明的是, 本实施例也可以 对 RAIS2上的数据进行迁移,或者将 RAIS1和 RAIS2上的部分数据都迁移。
本实施例对 RAIS1所进行的分解和迁移过程如下:
将前三个 Storage Node上的每个 ObjectSetl分解为两个子 set, 即 0bjectSet3和 0bjectSet4。 因为 ObjectSet是抽象概念,所以该分裂过程并不 涉及数据迁移。
由图 9可以看出, 分解后负载最重的 Storage Node为第二个 Storage Node和第三个 Storage Node, 因此, 本实施例可以将从第二个 Storage Node 和第三个 Storage Node上的 0bjectSet3或者 0bjectSet4对应的数据迁移到 New Node上。 由图 9可以看出, 在数据迁移后, 各 Storage Node上的负载 较为均衡。
上述过程给出了扩容后, 依据负载状态对各 Storage Node上的数据进 行迁移的过程, 本领域技术人员可以理解的是, 如果要删除某一个或几个 Storage Node, 则可以先将待删除的 Storage Node上的数据迁移到保留的 Storage Node上, 然后再删除该 Storage Node。
本实施例, 在前述方法实施例的基础上, 可以针对 Storage Node的扩 容和删除进行相应的数据迁移, 既保证了数据存储的可靠性, 由充分考虑 到负载均衡, 而且, 分布式存储系统内部的 Storage Node的管理也十分方 便。
图 10为本发明数据冗余处理装置实施例一的结构示意图, 如图 10所 示, 本实施例中的数据冗余处理装置包括: 生成模块 11和存储模块 12, 其 中, 生成模块 11 , 用于采用冗余算法生成待写入数据的 M个切片数据和 N 个冗余片数据,所述 M个切片数据和 N个冗余片数据中任意损坏至多 N个 数据时, 能够利用未损坏的数据恢复损坏的数据, 其中 M为大于 1的自然 数, N为不小于 1的自然数; 存储模块 12, 用于将所述 M个切片数据和 N 个冗余片数据分别存储到位于至少两个存储节点上的对象中, 其中, 每个 存储节点包含至少一个对象集, 每个对象集包含至少一个对象。
本实施例的数据冗余处理装置可以是分布式数据冗余处理装置中的一 个 Storage Node中的存储控制器, 本实施例的数据冗余处理装置并非在各 个 Storage Node上进行多份存储, 而是在分布式存储系统中的一个或几个 Storage Node的 ObjectSet上存储切片数据, 在另外一个或者几个 Storage Node的 ObjectSet上存储冗余片数据,从而实现了 Storage Node之间的冗余 处理, 在切片数据的个数大于 1时可以提高存储空间地利用率且降低了 Storage Node的负载, 另外, 本发明实施例可以支持不同的冗余算法, 从而 满足客户不同的可靠性需求, 灵活性较高。 图 11为本发明数据冗余处理装置实施例二的结构示意图, 如图 11所 示, 本实施例中的数据冗余处理装置在图 10所示数据冗余处理装置的基础 上, 进一步包括: 写请求接收模块 13和描述信息获取模块 14, 其中写请求 接收模块 13 , 用于接收客户端发送的写数据请求, 所述写数据请求中包含 所述待写入数据; 描述信息获取模块 14, 用于获取本地存储的写入所述 M 个切片数据和 N个冗余片数据所需的存储描述信息, 所述存储描述信息包 含存储标识信息。 存储模块 12可以具体用于将所述 M个切片数据和 N个 冗余片数据存储到与所述存储标识信息对应的位于至少两个存储节点上的 对象集中的对象中。
本实施例的数据冗余处理装置可以用于执行图 5所示方法实施例的方 法, 其实现原理和技术效果类似, 此处不再赘述。
图 12为本发明数据冗余处理装置实施例三的结构示意图, 如图 12所 示, 本实施例中的数据冗余处理装置在图 10所示数据冗余处理装置的基础 上, 进一步地, 包括: 读请求接收模块 15和数据读取模块 16, 其中, 读请 求接收模块 15 , 用于接收客户端发送的读数据请求; 数据读取模块 16, 用 于获取本地存储的与待读取数据对应的存储描述信息; 根据所述存储描述 信息, 从位于至少两个存储节点上的各对象集的对象中获取所述 M个切片 数据; 对所述 M个切片数据进行整合处理, 获取待读出数据, 并将所述待 读出数据发送给所述客户端。
本实施例的数据冗余处理装置可以用于执行图 7所示方法实施例的方 法, 其实现原理和技术效果类似, 此处不再赘述。
图 13为本发明数据冗余处理装置实施例四的结构示意图, 如图 13所 示, 本实施例中的数据冗余处理装置在图 10所示数据冗余处理装置的基础 上, 进一步地, 还包括: 分解迁移模块 17, 用于将位于至少两个存储节点 上的各对象集分解为至少两个子集, 根据各存储节点上的负载状态, 将分 解后的至少两个子集中的部分子集分配给所述新的存储节点。 本实施例的数据冗余处理装置可以用于执行图 9所示处理过程, 其实 现原理和技术效果类似, 此处不再赘述。
鉴于上述方法和数据冗余处理装置的实施例, 本发明还可以提供一种 分布式存储系统, 该存储系统包括至少两个存储节点, 其中至少有一个存 储节点可以包括图 10~13所示的数据冗余处理装置, 包括该数据冗余处理 装置的存储节点即可为作为 WI的 Storage Node或者作为 RI的 Storage Node。 本实施例的系统, 其实现原理和技术效果在前述方法实施例和对应 的数据冗余处理装置实施例中已经详细描述, 此处不再赘述。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序 代码的介质。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其限 制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术人员 应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其 中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技术方案的 本质脱离本发明各实施例技术方案的精神和范围。

Claims

权利要求
1、 一种数据冗余处理方法, 其特征在于, 包括:
采用冗余算法生成待写入数据的 M个切片数据和 N个冗余片数据, 所述 M个切片数据和 N个冗余片数据中任意损坏至多 N个数据时, 能 够利用未损坏的数据恢复损坏的数据, 其中 M为大于 1的自然数, N为 不小于 1的自然数;
将所述 M个切片数据和 N个冗余片数据分别存储到位于至少两个 存储节点上的对象中, 其中, 每个存储节点包含至少一个对象集, 每个 对象集包含至少一个对象。
2、 根据权利要求 1所述的方法, 其特征在于, 所述采用冗余算法生 成待写入数据的 M个切片数据和 N个冗余片数据之前, 还包括:
向独立元数据服务器发送存储请求消息;
接收所述独立元数据服务器根据所述存储请求消息反馈的存储描述 信息, 所述存储描述信息包含存储标识信息;
所述将所述 M个切片数据和 N个冗余片数据分别存储到位于至少 两个存储节点上的对象中, 包括:
将所述 M个切片数据和 N个冗余片数据存储到与所述存储标识信 息对应的位于至少两个存储节点上的对象集中的对象中。
3、 根据权利要求 2所述的方法, 其特征在于, 所述存储描述信息还 包含各对象集的标识信息和各对象集所在存储节点的标识信息;
所述将所述 M个切片数据和 N个冗余片数据存储到与所述存储标 识信息对应的位于至少两个存储节点上的对象集中的对象, 包括:
根据所述对象集的标识信息和对象集所在存储节点的标识信息, 将 所述 M个切片数据和 N个冗余片数据对应地存储到各存储节点上的对 象集中的对象中。
4、 根据权利要求 2所述的方法, 其特征在于, 将所述 M个切片数 据和 N个冗余片数据分别存储到位于至少两个存储节点上的对象中之 后, 还包括:
查询所述独立元数据服务器, 获取与待读出数据对应的存储描述信 根据所述存储描述信息, 从位于至少两个存储节点上的各对象集的 对象中获取所述 M个切片数据;
对所述 M个切片数据进行整合处理, 获取待读出数据。
5、 根据权利要求 1所述的方法, 其特征在于, 所述采用冗余算法生 成待写入数据的 M个切片数据和 N个冗余片数据之前, 还包括:
接收客户端发送的写数据请求, 所述写数据请求中包含所述待写入 数据;
所述将所述 M个切片数据和 N个冗余片数据分别存储到位于至少 两个存储节点上的对象中之前, 还包括:
获取本地存储的写入所述 M个切片数据和 N个冗余片数据所需的 存储描述信息, 所述存储描述信息包含存储标识信息;
所述将所述 M个切片数据和 N个冗余片数据分别存储到位于至少 两个存储节点上的对象中, 包括:
将所述 M个切片数据和 N个冗余片数据存储到与所述存储标识信 息对应的位于至少两个存储节点上的对象集中的对象中。
6、 根据权利要求 5所述的方法, 其特征在于, 所述存储描述信息还 包含所述至少两个存储节点中的本地存储节点上的对象集的标识信息以 及其它存储节点上的对象集的标识信息和所述其它存储节点的标识信 所述将所述 M个切片数据和 N个冗余片数据存储到与所述存储标 识信息对应的位于至少两个存储节点上的对象集中的对象中, 包括: 根据所述本地存储节点上的对象集的标识信息以及所述其它存储节 点上的对象集的标识信息和所述其它存储节点的标识信息,将所述 M个 切片数据和 N个冗余片数据对应地存储到各存储节点上的对象集中的对 象中。
7、 根据权利要求 5所述的方法, 其特征在于, 所述将所述 M个切 片数据和 N个冗余片数据分别存储到位于至少两个存储节点上的对象中 之后, 还包括:
接收客户端发送的读数据请求;
获取本地存储的与待读取数据对应的存储描述信息;
根据所述存储描述信息, 从位于至少两个存储节点上的各对象集的 对象中获取所述 M个切片数据;
对所述 M个切片数据进行整合处理, 获取待读出数据, 并将所述待 读出数据发送给所述客户端。
8、 根据权利要求 3、 4、 6或 7所述的方法, 其特征在于, 所述将所 述 M个切片数据和 N个冗余片数据分别存储到位于至少两个存储节点 上的对象中, 包括:
获取与所述对象集的标识信息对应的对象集描述信息, 所述对象集 描述信息中包含所述对象集的标识信息、 对象的标识信息以及对象的磁 盘分布信息;
根据所述对象的标识信息以及对象的磁盘分布信息, 在各对象中存 储数据。
9、 根据权利要求 1~7中任一项所述的方法, 其特征在于, 在采用新 的存储节点进行扩容时, 所述方法还包括:
将位于至少两个存储节点上的各对象集分解为至少两个子集, 根据 各存储节点上的负载状态, 将分解后的至少两个子集中的部分子集分配 给所述新的存储节点。
10、 一种数据冗余处理装置, 其特征在于, 包括:
生成模块,用于采用冗余算法生成待写入数据的 M个切片数据和 N 个冗余片数据,所述 M个切片数据和 N个冗余片数据中任意损坏至多 N 个数据时, 能够利用未损坏的数据恢复损坏的数据, 其中 M为大于 1的 自然数, N为不小于 1的自然数;
存储模块, 用于将所述 M个切片数据和 N个冗余片数据分别存储 到位于至少两个存储节点上的对象中, 其中, 每个存储节点包含至少一 个对象集, 每个对象集包含至少一个对象。
11、 根据权利要求 10所述的设备, 其特征在于, 还包括:
写请求接收模块, 用于接收客户端发送的写数据请求, 所述写数据 请求中包含所述待写入数据;
描述信息获取模块,用于获取本地存储的写入所述 M个切片数据和 N个冗余片数据所需的存储描述信息, 所述存储描述信息包含存储标识 信息;
所述存储模块具体用于将所述 M个切片数据和 N个冗余片数据存 储到与所述存储标识信息对应的位于至少两个存储节点上的对象集中的 对象中。
12、 根据权利要求 11所述的设备, 其特征在于, 还包括:
读请求接收模块, 用于接收客户端发送的读数据请求;
数据读取模块, 用于获取本地存储的与待读取数据对应的存储描述 信息; 根据所述存储描述信息, 从位于至少两个存储节点上的各对象集 的对象中获取所述 M个切片数据; 对所述 M个切片数据进行整合处理, 获取待读出数据, 并将所述待读出数据发送给所述客户端。
13、 根据权利要求 10~12中任一项所述的设备, 其特征在于, 还包 括:
分解迁移模块, 用于将位于至少两个存储节点上的各对象集分解为 至少两个子集, 根据各存储节点上的负载状态, 将分解后的至少两个子 集中的部分子集分配给所述新的存储节点。
14、 一种分布式存储系统, 其特征在于, 包括至少两个存储节点, 其 中至少有一个存储节点包括权利要求 10~13 中任一项所述的数据冗余处理 装置。
PCT/CN2012/079087 2011-08-18 2012-07-24 数据冗余处理方法、装置和分布式存储系统 WO2013023516A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110237373.7A CN102279777B (zh) 2011-08-18 2011-08-18 数据冗余处理方法、装置和分布式存储系统
CN201110237373.7 2011-08-18

Publications (1)

Publication Number Publication Date
WO2013023516A1 true WO2013023516A1 (zh) 2013-02-21

Family

ID=45105239

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/079087 WO2013023516A1 (zh) 2011-08-18 2012-07-24 数据冗余处理方法、装置和分布式存储系统

Country Status (2)

Country Link
CN (1) CN102279777B (zh)
WO (1) WO2013023516A1 (zh)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279777B (zh) * 2011-08-18 2014-09-03 华为数字技术(成都)有限公司 数据冗余处理方法、装置和分布式存储系统
CN102662609B (zh) * 2012-04-16 2016-03-30 华为软件技术有限公司 视频访问的方法及装置
CN104782101B (zh) * 2012-07-20 2018-02-13 北京大学深圳研究生院 用于分布式网络存储的自修复码的编码、重构和恢复方法
CN102857554B (zh) * 2012-07-26 2016-07-06 福建网龙计算机网络信息技术有限公司 基于分布式存储系统进行数据冗余处理方法
WO2014059651A1 (zh) * 2012-10-19 2014-04-24 北京大学深圳研究生院 一种射影自修复码的编码、数据重构及修复方法
AU2012395331B2 (en) 2012-11-21 2017-06-01 Huawei Technologies Co., Ltd. Method and apparatus for recovering data
CN103064635B (zh) * 2012-12-19 2016-08-24 华为技术有限公司 分布式存储方法和分布式存储装置
US8862847B2 (en) 2013-02-08 2014-10-14 Huawei Technologies Co., Ltd. Distributed storage method, apparatus, and system for reducing a data loss that may result from a single-point failure
CN103345519B (zh) * 2013-07-11 2017-07-21 华为技术有限公司 无共享分布式数据库的数据分布的方法和装置
CN105335250B (zh) * 2014-07-28 2018-09-28 浙江大华技术股份有限公司 一种基于分布式文件系统的数据恢复方法及装置
CN106201768B (zh) * 2015-04-29 2021-06-01 腾讯科技(深圳)有限公司 数据存储方法及装置
US10241689B1 (en) 2015-06-23 2019-03-26 Amazon Technologies, Inc. Surface-based logical storage units in multi-platter disks
CN105159603B (zh) * 2015-08-18 2018-01-12 福建省海峡信息技术有限公司 一种分布式数据存储系统的修复方法
CN107402841B (zh) * 2016-03-30 2021-01-29 阿里巴巴集团控股有限公司 大规模分布式文件系统数据修复方法及设备
CN105847279A (zh) * 2016-05-03 2016-08-10 深圳市永兴元科技有限公司 分布式数据处理方法及数据中心
CN106201338B (zh) * 2016-06-28 2019-10-22 华为技术有限公司 数据存储方法及装置
CN108628539B (zh) * 2017-03-17 2021-03-26 杭州海康威视数字技术股份有限公司 数据存储、分散、重构、回收方法、装置及数据处理系统
CN107197324B (zh) * 2017-05-15 2020-11-20 苏州浪潮智能科技有限公司 一种分布式文件系统的视频容错方法及装置
CN110244903B (zh) * 2018-03-09 2021-08-13 杭州海康威视系统技术有限公司 一种数据存储方法及装置
CN110244904B (zh) * 2018-03-09 2020-08-28 杭州海康威视系统技术有限公司 一种数据存储系统、方法及装置
CN110278222B (zh) * 2018-03-15 2021-09-14 华为技术有限公司 分布式文件存储系统中数据管理的方法、系统以及相关设备
CN108769036B (zh) * 2018-06-04 2021-11-23 浙江十进制网络有限公司 基于云系统的数据处理系统和处理方法
CN109130558A (zh) * 2018-07-25 2019-01-04 福州市联奇智能科技有限公司 一种基于大数据的多章智能选用自动盖章机器人
CN109298836B (zh) * 2018-09-04 2022-07-08 航天信息股份有限公司 处理数据的方法、装置和存储介质
CN109407976B (zh) * 2018-09-21 2021-09-14 联想(北京)有限公司 一种分布式存储方法及分布式存储装置
CN109388351A (zh) * 2018-12-18 2019-02-26 平安科技(深圳)有限公司 一种分布式数据存储的方法及相关装置
CN111352938B (zh) * 2020-02-26 2023-07-18 深圳市迅雷网络技术有限公司 数据处理方法、计算机设备及存储介质
CN112256201B (zh) * 2020-10-23 2023-10-31 南京鹏云网络科技有限公司 一种分布式块存储系统及其卷信息管理方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834898A (zh) * 2010-04-29 2010-09-15 中科院成都信息技术有限公司 一种网络分布式编码存储方法
US20100318844A1 (en) * 2008-02-08 2010-12-16 Fujitsu Limited Backup method and disk array apparatus
CN101986276A (zh) * 2010-10-21 2011-03-16 成都市华为赛门铁克科技有限公司 文件存储方法、文件恢复方法、系统及服务器
CN102279777A (zh) * 2011-08-18 2011-12-14 成都市华为赛门铁克科技有限公司 数据冗余处理方法、装置和分布式存储系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101282281B (zh) * 2007-04-03 2011-03-30 华为技术有限公司 一种媒体分发系统、装置及流媒体播放方法
US7904749B2 (en) * 2008-10-24 2011-03-08 Hitachi, Ltd. Fast data recovery from HDD failure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100318844A1 (en) * 2008-02-08 2010-12-16 Fujitsu Limited Backup method and disk array apparatus
CN101834898A (zh) * 2010-04-29 2010-09-15 中科院成都信息技术有限公司 一种网络分布式编码存储方法
CN101986276A (zh) * 2010-10-21 2011-03-16 成都市华为赛门铁克科技有限公司 文件存储方法、文件恢复方法、系统及服务器
CN102279777A (zh) * 2011-08-18 2011-12-14 成都市华为赛门铁克科技有限公司 数据冗余处理方法、装置和分布式存储系统

Also Published As

Publication number Publication date
CN102279777B (zh) 2014-09-03
CN102279777A (zh) 2011-12-14

Similar Documents

Publication Publication Date Title
WO2013023516A1 (zh) 数据冗余处理方法、装置和分布式存储系统
US11522808B2 (en) Shared storage model for high availability within cloud environments
US11868213B2 (en) Incremental backup to object store
CN106407040B (zh) 一种远程数据复制方法及系统
US10725691B1 (en) Dynamic recycling algorithm to handle overlapping writes during synchronous replication of application workloads with large number of files
US20200356274A1 (en) Method to address misaligned holes and writes to end of files while performing quick reconcile operation during synchronous filesystem replication
US9477551B1 (en) Method and system for data migration between high performance computing architectures and file system using distributed parity group information structures with non-deterministic data addressing
US20120151255A1 (en) Method of calculating parity in asymetric clustering file system
US8060772B2 (en) Storage redundant array of independent drives
WO2015100627A1 (zh) 一种分布式文件存储系统中的数据处理方法及设备
JP2019101703A (ja) 記憶システム及び制御ソフトウェア配置方法
CN107729536B (zh) 一种数据存储方法和装置
US20010044879A1 (en) System and method for distributed management of data storage
CN101488104A (zh) 一种实现高效安全存储的系统和方法
JP2008516343A (ja) 冗長データストレージの再構成
CN107003920B (zh) 用于处置灾难恢复群集中的多节点故障的系统和方法
CN106528338B (zh) 一种远程数据复制方法、存储设备及存储系统
KR102460568B1 (ko) 대형 키 밸류 객체들을 저장하는 시스템 및 방법
US11327844B1 (en) Automated cloud recovery to provide a full usable application image
US8543864B2 (en) Apparatus and method of performing error recovering process in asymmetric clustering file system
US20240103744A1 (en) Block allocation for persistent memory during aggregate transition
US20230053316A1 (en) Mediator assisted switchover between clusters
CN100535867C (zh) 在两个或多个非对称存储站之间的文件级复制的装置和方法
JP6671708B2 (ja) バックアップリストアシステム及びバックアップリストア方法
CN111752892B (zh) 分布式文件系统及其实现方法、管理系统、设备及介质

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

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

Country of ref document: EP

Kind code of ref document: A1