WO2014094296A1 - Distributed storage control method, device, and system - Google Patents

Distributed storage control method, device, and system Download PDF

Info

Publication number
WO2014094296A1
WO2014094296A1 PCT/CN2012/087161 CN2012087161W WO2014094296A1 WO 2014094296 A1 WO2014094296 A1 WO 2014094296A1 CN 2012087161 W CN2012087161 W CN 2012087161W WO 2014094296 A1 WO2014094296 A1 WO 2014094296A1
Authority
WO
WIPO (PCT)
Prior art keywords
machine
data
storage
configuration information
policy
Prior art date
Application number
PCT/CN2012/087161
Other languages
French (fr)
Chinese (zh)
Inventor
高贵举
张烽
王志美
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2012/087161 priority Critical patent/WO2014094296A1/en
Priority to CN201280003288.7A priority patent/CN103403666B/en
Publication of WO2014094296A1 publication Critical patent/WO2014094296A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • Embodiments of the present invention relate to distributed storage technologies, and in particular, to a distributed storage control method, apparatus, and system. Background technique
  • the distributed storage system usually consists of a machine rejection (Rack). Each Rack is provided with multiple chassis (Chassis). Each Chassis is placed with a physical storage device as a storage node, and each Rack and each Chassis Each of the storage nodes is separately configured with an independent power source. When storing data, the data is stored in the storage nodes of each chassis.
  • the distributed storage system is further provided with a controller connected to each storage node for maintaining configuration information of each storage node. And data storage strategies.
  • the data storage policy is set to backup and store the same data, and usually uses the Chassis policy for data storage. Specifically, when the distributed storage system performs data storage.
  • the data is backed up based on the data storage policy, and the same data and its backup data are stored in different storage nodes of the Rack, so that when a Chassis power failure causes the storage node on the storage node to be inaccessible, the other data can be accessed.
  • each data copy of the same data may be stored in different storage nodes of the same Rack, so that when the power of the Rack fails, the storage will be stored in the same Rack.
  • the data of the storage nodes on each Chassis in the Rack cannot be used, the security of the data storage is poor, and the reliability of the distributed storage system is poor. Summary of the invention
  • the embodiment of the invention provides a distributed storage control method, device and system, which can overcome the problem of poor data storage security in the prior art, and can improve the security and reliability of data storage of the distributed storage system.
  • the present invention provides a distributed storage control method, which is applied to a distributed storage system, where the distributed storage system includes a controller, and a plurality of storage nodes, where the plurality of storage nodes are placed in the machine rejection.
  • the method includes:
  • the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
  • the data storage policy of the distributed storage system is set to be a first data storage policy, where the first data storage policy is used to indicate that multiple data copies of the same data are stored.
  • the first data storage policy is used to indicate that multiple data copies of the same data are stored.
  • the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
  • the first data storage policy is set to indicate that the plurality of data copies of the same data are respectively stored in the storage nodes of the different machines.
  • the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
  • the acquiring the current configuration information includes: Receiving configuration information of each storage node uploaded by each storage node, where the configuration information of the storage node includes a machine rejection identifier rejected by the storage node;
  • the current configuration information is obtained from the set of configuration information of each storage node.
  • the determining, according to the machine rejection of each storage node in the current configuration information Obtaining the number of machine rejections in the distributed storage system, specifically including:
  • the distributed storage control method further includes:
  • the old machine is rejected, and the machine rejects the update information, and the machine rejection information includes the machine rejection code of the new machine that is accessed and the machine rejection certificate of the old machine that is rejected;
  • the update information is synchronized to each storage node such that the storage node stores data based on the update information and the data storage policy.
  • an embodiment of the present invention provides a distributed storage control method, including: receiving a data storage policy synchronized by a controller of a distributed storage system;
  • the stored data is processed according to the data storage policy, where the data storage policy is a first data storage policy, and the first data storage policy is used to indicate that multiple data copies of the same data are stored in different machines. Rejected in the storage node.
  • the distributed storage control method further includes:
  • Receiving update information of the machine rejection of the controller synchronization, and the update information of the machine rejection includes a machine rejection identifier of the new machine that has been accessed, or a machine rejection identifier of the old machine that has been withdrawn;
  • the processing the stored data based on the data storage policy specifically includes: when the machine rejects the update information, if the new machine rejects the machine rejection identifier, the data storage policy is stored in one machine. Rejecting multiple copies of the same data for different storage nodes At least one of the storage nodes that are migrated to the new machine rejected by the new machine rejection of the access;
  • the data is stored in the storage node rejected by the other machine based on the data.
  • an embodiment of the present invention provides a distributed storage control device, which is applied to a distributed storage system, where the distributed storage system includes multiple storage nodes, and the multiple storage nodes are placed in the machine rejection.
  • the device includes:
  • the configuration information obtaining module is configured to obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
  • the machine rejection number obtaining module is configured to obtain, according to the machine rejection identifier of each storage node in the current configuration information, the number of machine rejections in the distributed storage system;
  • a policy setting module configured to: when the number of the machine rejections is greater than 1, set a data storage policy of the distributed storage system as a first data storage policy, where the first data storage policy is used to indicate that the same data storage policy is used a plurality of data copies of the data are stored in the storage node located in the different machine; the synchronization module is configured to synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node or the client is based on the data storage The policy stores data, wherein the client obtains the data storage policy from a storage node.
  • the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
  • the first data storage policy is set to indicate that the plurality of data copies of the same data are respectively stored in the storage nodes of the different machines.
  • the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
  • the configuration information acquiring module is specifically configured to receive configuration information of each storage node uploaded by each storage node,
  • the configuration information of the storage node includes a machine rejection identifier of the machine node to which the storage node belongs; and configured to obtain current configuration information of the collection of configuration information of each storage node.
  • the machine rejects the number obtaining module, specifically, according to the current configuration information and the In the configuration information obtained last time in the distributed storage system, the machine rejection index of each storage node belongs to the device, and when the current configuration information is different from the machine rejection identifier in the configuration information obtained last time, the current configuration information is determined according to the current configuration information.
  • the number of machine rejections in the distributed storage system is obtained by the machine rejection of each storage node.
  • the distributed storage control device further includes:
  • the machine refusal update information obtaining module is configured to determine whether the distributed storage system is included according to the current configuration information and the machine rejection identifier of each storage node in the configuration information obtained in the distributed system The newly accessed machine rejects or rejects the old machine, and generates the machine rejection information.
  • the machine rejection information includes the machine rejection code of the new machine that has been accessed and the old machine rejection of the withdrawal. Machine rejection identification;
  • the synchronization module is further configured to synchronize the machine rejection update information to each storage node, so that the storage node stores data based on the update information and the data storage policy.
  • an embodiment of the present invention provides a distributed storage control apparatus, including: a receiving module, configured to receive a data storage policy synchronized by a controller of a distributed storage system; and a processing module, configured to: The stored data is processed, wherein the data storage policy is a first data storage policy, and the first data storage policy is used to indicate that multiple data copies of the same data are stored in storage nodes located in different machines.
  • the receiving module is further configured to receive update information of the machine rejection of the controller, where the update information of the machine includes a new machine with access The machine rejection label or the machine rejection certificate of the old machine that has been withdrawn;
  • the processing module is specifically configured to: when the machine rejects the new machine rejecting the machine rejection identifier in the machine rejection update information, based on the data storage policy, storing the same data of different storage nodes in one machine rejection Rejection of at least one of the data copies to the new machine of the access In the storage node of the corresponding new machine rejection; and the machine rejection policy for the old machine rejection in the machine rejection update information, based on the data storage policy, the old
  • the fifth aspect of the present invention provides a distributed storage system, including a controller, where the controller uses the first or second or third or fourth or five possible implementations of the third aspect or the third aspect.
  • a distributed storage control device provided by an embodiment of the present invention.
  • the distributed storage control method, device and system provided in this embodiment can set a storage policy for storing data copies of the same data in storage nodes of different machines when the number of machine rejections in the system is greater than 1.
  • the data copy of the same data may be stored in the storage node of the different machine rejection, so that when one machine refuses to cause the data stored therein to be unavailable, the other machine can be accessed. Rejecting stored data copies can effectively improve the security of data storage and improve the stability and reliability of distributed storage systems.
  • FIG. 1 is a schematic flowchart of a distributed storage control method according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of a distributed storage control method according to Embodiment 2 of the present invention
  • FIG. 4 is a schematic flowchart of a distributed storage control method according to Embodiment 4 of the present invention
  • FIG. 5 is a schematic flowchart of a distributed storage control method according to Embodiment 5 of the present invention
  • FIG. 7 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 7 of the present invention
  • FIG. 8 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 8 of the present invention
  • Embodiment 9 is a schematic structural diagram of a distributed storage system according to Embodiment 9 of the present invention.
  • the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Some embodiments, rather than all of the embodiments, are invented. 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.
  • FIG. 1 is a schematic flowchart diagram of a distributed storage control method according to Embodiment 1 of the present invention.
  • the embodiment can be applied to the data storage control in the distributed storage system.
  • the system controller of the distributed storage system can determine the data storage policy based on the number of machine rejections.
  • the implementation The distributed storage control method includes the following steps:
  • Step 101 Obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
  • Step 102 Obtain, according to the machine rejection identifier of each storage node in the current configuration information, obtain the number of machine rejections in the distributed storage system;
  • Step 103 When the number of machine rejections is greater than 1, set a data storage policy of the distributed storage system as a first data storage policy, where the first data storage policy is used to indicate that multiple data copies of the same data are stored in the first data storage policy. Among the storage nodes that are rejected by different machines;
  • Step 104 Synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node stores the data based on the data storage policy.
  • the embodiment can be applied to the data storage control in the distributed storage system, and the controller obtains the number of machine rejections in the current distributed system according to the configuration information, and can set the storage when the number of rejections is greater than 1.
  • a policy to indicate that multiple copies of data of one data are stored in different storage nodes, so that after the storage node receives the storage policy, the storage node can store data copies of the same data in different machines based on the storage policy.
  • a copy of the data stored by other storage nodes can be utilized.
  • a client connected to a storage node can also obtain a storage policy synchronized by the controller from the storage node, and can store data based on the storage policy.
  • the machine rejection refers to a device that shares a plurality of storage nodes of the machine rejection controller, and the machine rejects a plurality of physical storages as storage nodes, and each physical storage is placed in the chassis.
  • each chassis is configured with a separate power supply for its storage nodes.
  • This data storage policy may also be referred to as a Rack policy, or may be referred to as Rack.
  • the combination of strategy and Chassis strategy may be referred to as Chassis strategy.
  • the Rack policy refers to storing multiple data copies of the same data in different machine rejections, and the combination of the Rack policy and the chassis policy means storing at least two data copies of the same data in at least two machine rejections, and At least one of the machines refuses to store at least two copies of the data.
  • the number of data copies of the same data refers to the number of data copies set when the distributed storage system performs data storage.
  • the distributed storage system in this embodiment refers to a distributed storage system that uses consistent routing.
  • the data copy relationship may be used to express data consistency of the distributed storage system, for example, represented by NWR, where N, W, and R are all natural numbers that are not 0, N represents the number of copies of the same data, that is, the number of copies of the data (Replica); W indicates the number of copies that need to be successfully updated when updating a piece of data. ; R represents the number of copies of the data that need to be read to read a data, that is, the number of copies of Replica.
  • the distributed storage control method provided in this embodiment can store data copies of the same data in storage nodes of different machines, so that when one machine refuses to cause the data stored therein to be unavailable, other machines can be accessed. Rejecting stored data copies can effectively improve the security of data storage and improve the stability and reliability of distributed storage systems.
  • FIG. 2 is a schematic flowchart diagram of a distributed storage control method according to Embodiment 2 of the present invention.
  • the controller of the distributed storage system of the embodiment may set the data storage policy based on the number of machine rejections and the number of data copies of the same data. Specifically, as shown in FIG. 2, the embodiment may include the following steps:
  • Step 201 Obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
  • Step 202 Obtain the number of machine rejections in the distributed storage system according to the machine rejection identifier of each storage node in the current configuration information.
  • Step 203 determining whether the number of machine rejections is greater than 1, then executing step 204, otherwise, performing step 207;
  • Step 204 Determine whether the number of machine rejections is greater than or equal to the number of data copies in the distributed system, if yes, go to step 205; otherwise, go to step 206;
  • Step 205 the setting data policy is the first data storage policy, indicating that the plurality of data copies of the same data are stored in the storage node of the different machine, step 208;
  • Step 208 the setting data policy is the first data storage policy, indicating that the same data of the same number of data rejection is stored in the storage node of the different machines, step 208;
  • Step 207 Set a data policy to be a second data policy, and indicate that multiple data copies of the same data are stored in different storage nodes rejected by the same machine;
  • Step 208 Synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node stores the data based on the data storage policy, and ends.
  • the obtaining the current configuration information may include: receiving configuration information of each storage node uploaded by each storage node, where the configuration information of the storage node includes a machine rejection identifier of the storage node to which the storage node belongs; and configuring the storage node
  • the collection of information gets the current configuration information.
  • each storage node that is rejected by the machine can automatically upload its own configuration information to the controller, so that the controller can upload based on each storage node on the machine rejection.
  • the configuration information is obtained from the current configuration information of the distributed system.
  • the current configuration information of the distributed system can also be manually configured by the network maintenance personnel and sent to the controller.
  • the configuration information is specifically information set by the user, and generally includes identifier information of the machine rejection, a relationship between the storage node and the machine rejection, and the like.
  • the foregoing step 202 may include: determining, according to the current configuration information and the machine rejection identifier of each storage node in the configuration information obtained in the distributed storage system, the current configuration information and the machine rejection in the last obtained configuration information.
  • the identifiers are different, the number of machine rejections in the distributed storage system is obtained according to the machine rejection identifier of each storage node in the current configuration information.
  • the configuration information in the distributed system is changed, the number of machine rejections can be determined based on the configuration information, and when the number of the machine rejections changes, the storage policy can be changed in time to improve the distributed system data. Storage security and reliability.
  • the data copy refers specifically to the number of copies set in the distributed storage system for indicating data storage, and the number of copies is preset by the user.
  • the number of copies of the data is carried in the data storage policy.
  • the number of copies rejected by the machine is 'J
  • the number of copies of the data is stored in a different machine by storing a partial copy of the same data in one machine, so that each Machine rejection A copy of the data is stored; when the number of the machine rejects is greater than or equal to the number of data copies, multiple data copies of the same data may be stored in the storage nodes of different machines, so that each machine rejects each A copy of the data that stores the same data ensures the security and reliability of the data store.
  • the update information rejected by the machine includes the machine rejection identification of the new machine that has been accessed, and the machine rejection identification of the old machine that has been withdrawn, and may reject the machine.
  • the update information is synchronized to each storage node such that the storage node stores the data based on the update information and the data storage policy.
  • the current configuration information includes the machine rejection identifier that is not obtained by the configuration information obtained last time, that is, the machine rejection of the new access, and the last obtained configuration information that the current configuration information does not have the machine rejection identifier is the withdrawal.
  • the old machine rejected the machine rejection logo After the storage node receives the machine rejection update information, the stored data can be processed based on the update information, and a specific implementation thereof will be described in the following embodiments.
  • FIG. 3 is a schematic flowchart diagram of a distributed storage control method according to Embodiment 3 of the present invention.
  • the storage node in the distributed storage system receives the storage policy synchronized by the controller according to the method shown in FIG. 1 or FIG. 2, the storage node can perform data storage processing based on the data storage policy, specifically, as shown in the figure.
  • the method in this embodiment may include the following steps:
  • Step 301 Receive a data storage policy that is synchronized by the controller of the distributed storage system.
  • Step 302 Process the stored data according to the data storage policy, where the data storage policy is a first data storage policy, and the first data storage A policy is used to indicate that multiple copies of data of the same data are stored in storage nodes that are located in different machines.
  • the storage node may further receive the machine rejection update information sent by the controller, and the update information rejected by the machine includes the machine rejection identifier of the new machine that has been accessed, or the machine rejection identifier of the old machine that has been withdrawn;
  • the foregoing step 302 may specifically include: when there is a machine rejection report of the new machine that is accessed in the machine rejection update information, based on the data storage policy, the data is stored in a plurality of data copies of the same data of different storage nodes in one machine.
  • the migrating at least one of the plurality of data copies of the same data stored in one machine to the different storage nodes to the newly accessed machine-rejected storage node is to store the data by Use the Chassis policy to upgrade to the Rack policy, or upgrade to a combination of Chassis and Rack policies to improve data storage security.
  • the data storage policy can be upgraded from a Chassis policy to a Rack policy, that is, when the distributed storage system is upgraded and expanded, the corresponding data storage policy can be upgraded.
  • the embodiment can facilitate the upgrade and expansion of the distributed storage system, and improve the applicability and practicability of the distributed storage system.
  • the Rack policy is downgraded to the Chassis strategy, that is, when the distributed storage system is shrinked, the corresponding data storage policy can be reduced to meet the data storage needs of the reduced distributed storage system. Therefore, the embodiment can further improve the dynamic update performance of the distributed storage system, and improve the applicability and practicability of the system.
  • the data copy when a plurality of data copies of the same data are stored in the machine-rejected storage node, the data copy is substantially stored in a partition of the storage node, where each The storage node may have one or more partitions. Therefore, when performing data storage, a certain algorithm may be used to calculate a storage location of the data copy of the same data, that is, a storage partition. Specifically, the algorithm may be a pseudo-random algorithm or Other algorithms, the specific algorithm calculation process will not be described here.
  • the distributed storage system stores multiple data copies of the same data.
  • the storage partition of the storage node in which the data copy is stored may be determined under the condition of consistent routing. .
  • the consistent route is used to describe the relationship between data copies in a distributed storage system.
  • the specific implementation of the consistent route is the same as or similar to the traditional method.
  • the data is divided into S partitions, and is in R.
  • On the machine save the key with a copy of the value of K.
  • K key Use the K key to associate the R machine.
  • you can use the hash algorithm. Specifically, you can use the formula a K%S to determine K, and then save this value in the machine. a, a+1, a+2, ...a+r, where R represents the number of copies of the data.
  • the data copies of the same data are stored in different storage nodes rejected by the same machine, that is, the Chassis policy specifically refers to satisfying one when storing data.
  • the storage location of different data copies of the same data is determined by an algorithm such as a pseudo-random algorithm to save the data copies in different storage nodes rejected by the same machine; the data copies of the same data are stored in different machine rejections.
  • at least two copies of the data are stored in a machine rejection, that is, the combination of the Rack policy and the Chassis policy specifically means that, in the case of satisfying the consistent routing, the storage location of different data copies of the same data is determined by an algorithm such as a pseudo-random algorithm.
  • the Rack policy specifically refers to determining the storage location of different data copies of the same data by a pseudo-random algorithm and the like in the case of satisfying the consistent routing, so as to store different data copies of the same data in different machine rejections. in.
  • a corresponding data storage condition may be added, that is, the foregoing Rack policy, Chassis policy, or Rack policy and Chassis policy.
  • the combination of restrictions to achieve the storage of data is, the foregoing Rack policy, Chassis policy, or Rack policy and Chassis policy.
  • FIG. 4 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 4 of the present invention.
  • the device in this embodiment is applicable to a distributed storage system, where the distributed storage system includes a plurality of storage nodes, and the plurality of storage nodes are placed in the machine rejection.
  • the device in this embodiment may be specifically in a distributed storage system.
  • the controller may obtain the number of the machine rejection based on the configuration information and set the storage policy.
  • the device in this embodiment may include a configuration information acquiring module 1 1 , a machine rejection number obtaining module 12 , and a policy setting.
  • the configuration information obtaining module 11 is configured to obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
  • the machine rejection number obtaining module 12 is configured to obtain, according to the machine rejection identifier rejected by each storage node in the current configuration information, the number of machine rejections in the distributed storage system;
  • the policy setting module 13 is configured to: when the number of the machine rejections is greater than 1, set a data storage policy of the distributed storage system as a first data storage policy, where the first data storage policy is used to indicate that Multiple data copies of the same data are stored in the storage nodes located in different machines; the synchronization module 14 is configured to synchronize the data storage policies of the distributed storage system to the storage nodes, so that the storage nodes or clients are based on The data storage policy stores data, wherein the client obtains the data storage policy from a storage node.
  • the device in this embodiment can be applied to a distributed storage system.
  • a data storage policy is set based on the number of machine rejections.
  • FIG. 5 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 5 of the present invention.
  • the apparatus of this embodiment may further include a machine rejection update information acquiring module 15 for using the current configuration information and the distributed system.
  • the machine rejection index of each storage node in the configuration information obtained at one time determines whether there is a newly accessed machine in the distributed storage system or the old machine that has been withdrawn, and generates the update information of the machine rejection.
  • the update information of the machine rejection includes a machine rejection identifier of the accessed new machine and a machine rejection identifier of the rejected old machine rejection; the synchronization module 14 may be further configured to synchronize the machine rejection update information to each A storage node, such that the storage node stores data based on the update information and the data storage policy.
  • the foregoing first data storage policy further includes a number of data copies, where the number of data copies is used to indicate the number of copies when the data is stored in the distributed storage system.
  • the first data storage policy may be set to store multiple data copies of the same data in the storage nodes of different machines, And when the number of the machine rejection is less than the number of the data copies, setting the first data storage policy to store the same data copy of the same data as the machine rejection number in different machines In the storage node.
  • the configuration information acquiring module 1 1 is specifically configured to receive configuration information of each storage node uploaded by each storage node, where the configuration information of the storage node includes a machine that the storage node belongs to. Rejecting the identifier; and using the set of configuration information of each storage node to obtain current configuration information.
  • the machine rejection number obtaining module 12 is specifically configured to determine the current configuration information according to the current configuration information and the machine rejection index of each storage node in the configuration information obtained in the distributed storage system. When the machine rejection identifiers in the configuration information obtained in the previous configuration are different, the number of machine rejections in the distributed storage system is obtained according to the machine rejection identifier of each storage node in the current configuration information.
  • FIG. 6 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 6 of the present invention.
  • the apparatus of the embodiment of the present invention includes a processor 100, a communication interface 200, a memory 300, and a bus 400.
  • the processor 100, the communication interface 200, and the memory 300 can pass through a bus.
  • the processor 100 is configured to execute an instruction in the memory 300, where the current configuration information is included, where the current configuration information includes a machine rejection identifier of each storage node, and each machine rejection identifier corresponds to one machine rejection; And determining, according to the machine rejection identifier of each storage node in the current configuration information, obtaining the number of machine rejections in the distributed storage system; and setting the distributed when the number of machine rejections is greater than 1.
  • the data storage policy of the storage system is a first data storage policy, which is used to indicate that multiple copies of data of the same data are stored in storage nodes located in different machines; and may be distributed through the communication interface 200.
  • the data storage policy of the storage system is synchronized to each storage node, so that the storage node or the client stores data based on the data storage policy, wherein the client obtains the data storage policy from the storage node.
  • the foregoing first data storage policy further includes a number of data copies, where the number of data copies is used to indicate the number of copies when the data is stored in the distributed storage system, and the processor 100 is specifically available in the machine.
  • the number of rejections is greater than or equal to the number of copies of the data
  • setting the first data storage policy to store multiple data copies of the same data in storage nodes of different machines, and in the machine
  • the first data storage policy is set to indicate that the data copies of the same data and the machine rejection number are respectively stored in the storage nodes of the different machines.
  • the processor 100 may receive the configuration information of each storage node that is uploaded by each storage node through the communication interface 200, and the configuration information of the storage node includes the machine rejection identifier of the storage node to which the storage node belongs; and The collection of configuration information gets the current configuration information.
  • the processor 100 is specifically configured to determine the current configuration information according to the current configuration information and the machine rejection information of each storage node in the configuration information obtained in the distributed storage system.
  • the processor 100 is specifically configured to determine the current configuration information according to the current configuration information and the machine rejection information of each storage node in the configuration information obtained in the distributed storage system.
  • the machine rejection identifiers in the configuration information obtained in the previous configuration are different, the number of machine rejections in the distributed storage system is obtained according to the machine rejection identifier of each storage node in the current configuration information.
  • the processor 100 may further determine, according to the current configuration information and the machine rejection identifier of each storage node in the configuration information obtained in the distributed system, whether the distributed storage system is in the distributed storage system.
  • the machine with the new access refuses or has the old machine that has been withdrawn, and generates the update information of the machine rejection.
  • the update information of the machine rejection includes the machine rejection of the new machine that has been accessed and the device rejects the The old machine rejects the machine rejection identifier; and the machine rejection update information is synchronized to each storage node through the communication interface 200, so that the storage node stores the data based on the update information and the data storage policy.
  • the distributed storage control device may be a computer device having a computing capability, such as a server, a personal computer PC, or the like.
  • the storage node may be a data storage server having data storage capability. In this way, the device can form a distributed storage system together with the storage nodes distributed on the network to realize data storage.
  • FIG. 7 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 7 of the present invention.
  • the device in this embodiment may be a storage node in a distributed storage system. After receiving the storage policy synchronized by the controller, the device may perform data storage processing based on the storage policy. Specifically, as shown in FIG. 7, the device in this embodiment includes receiving. Module 21 and processing module 22, wherein:
  • the receiving module 21 is configured to receive a data storage policy synchronized by the controller of the distributed storage system
  • the processing module 22 is configured to process the stored data according to the data storage policy, where the data storage policy is a first data storage policy, and the first data storage policy is used to indicate multiple data of the same data.
  • the copy is stored in a storage node that is located on a different machine.
  • the receiving module 21 is further configured to receive the update information of the machine that is synchronized by the controller, where the update information of the machine includes the machine rejection of the new machine that is accessed, or the old one that has been withdrawn.
  • the machine rejection module; the processing module 22 is specifically configured to be used when the machine rejection policy of the new machine that is accessed in the machine rejection update information is based on the data storage policy, and is stored in a machine to reject different storage.
  • At least one of the plurality of data copies of the same data of the node is migrated to the new machine rejecting storage node corresponding to the access denied new machine rejection identifier; and the withdrawal is performed for the machine rejection update information
  • the old machine rejects the machine rejection based on the data storage policy, it will be stored in the storage node.
  • the device in this embodiment can perform data storage processing by using the method steps shown in FIG. 3 above.
  • For the specific implementation process refer to the description of the foregoing method embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a distributed storage device according to Embodiment 8 of the present invention.
  • the apparatus of the embodiment of the present invention includes a processor 100', a communication interface 200', a memory 300', and a bus 400, and the processor 100, the communication interface 200, and the memory 300 are connected.
  • the bus 400 is connected to the memory 300 for storing instructions.
  • the processor 100 is configured to execute the instructions for performing related operations, and can control the communication interface 200' to perform data communication with network devices on the network.
  • the processor 100' can be configured to execute instructions in the memory 300' for receiving a data synchronization policy of the controller of the distributed storage system through the communication interface 200', and for storing the data based on the data storage policy
  • the data is processed, wherein the data storage policy is a first data storage policy, and the first data storage policy is used to indicate that multiple data copies of the same data are stored in storage nodes located in different machines.
  • the processor 100' may further receive the update information of the machine that is synchronized by the controller through the communication interface 200', and the update information of the machine rejection includes the machine rejection of the new machine that is accessed or has And the machine rejection code of the old machine rejected; and the machine rejection policy for the new machine rejection in the machine rejection update information, based on the data storage policy, the storage is stored in a machine rejection different storage At least one of the plurality of data copies of the same data of the node is migrated to the new machine rejecting storage node corresponding to the access denied new machine rejection identifier; and the withdrawal is performed in the machine rejection update information When the old machine rejects the machine rejection identifier, it is stored in the storage node based on the data storage policy.
  • FIG. 9 is a schematic structural diagram of a distributed storage system according to Embodiment 9 of the present invention.
  • the storage system of this embodiment may include a controller 10 and a plurality of storage nodes 20, and the controller 10 may use the distributed storage control device shown in FIG. 4 or FIG. 5 or FIG.
  • the storage node 20 is placed in a different machine rejection, and may specifically be the distributed storage device shown in FIG. 7 or FIG. 8 above.
  • three storage nodes can be stored in the machine rejection A, and each storage node can communicate with the controller 10 separately, and each storage node rejected by each machine can also communicate with each other, as long as The information of one storage node changes, and the controller and other storage nodes can be obtained synchronously.

Abstract

Embodiments of the present invention provide a distributed storage control method, device, and system. The method comprises: obtaining current configuration information which comprises rack identifiers of racks that storage nodes belong to, each rack identifier corresponding to one rack; obtaining the number of racks in a distributed storage system according to the rack identifiers of the racks that the storage nodes belong to in the current configuration information; setting a data storage policy of the distributed storage system to be a first data storage policy when the number of the racks is larger than 1, the first data storage policy being used for instructing to store multiple data copies of the same data in the storage nodes of different racks; and synchronizing the data storage policy in the distributed storage system to each storage node, so that the storage node or a client stores the data based on the data storage policy, wherein the client acquires the data storage policy from the storage node. The technical solution of the embodiments of the present invention can effectively improve security and reliability of data storage.

Description

分布式存储控制方法、 装置及***  Distributed storage control method, device and system
技术领域 本发明实施例涉及分布式存储技术, 尤其涉及一种分布式存储控制方 法、 装置及***。 背景技术 TECHNICAL FIELD Embodiments of the present invention relate to distributed storage technologies, and in particular, to a distributed storage control method, apparatus, and system. Background technique
随着计算机及网络技术的快速发展, 大规模数据的存储需求随之产 生, 而基于各种非关系型数据库的分布式存储***不但具有较大的存储容 量空间, 同时还可具有较好的数据读写操作性能, 因此, 分布式存储*** 已成为大规模数据存储的首选。  With the rapid development of computer and network technologies, the storage requirements for large-scale data are generated, and distributed storage systems based on various non-relational databases not only have large storage capacity, but also have better data. Read and write performance, therefore, distributed storage systems have become the first choice for large-scale data storage.
其中, 分布式存储***通常由机拒 (Rack ) 组成, 每个 Rack 内放置 有多个机框 (Chassis ) , 每个 Chassis放置有作为存储节点的物理存储设 备,且每个 Rack以及每个 Chassis均单独配置有独立的电源,存储数据时, 就是将数据存储在各 Chassis的存储节点中; 该分布式存储***还设置有 与各存储节点连接的控制器, 用于维护各存储节点的配置信息以及数据存 储策略。 现有分布式存储***中, 为确保数据存储的安全性, 数据存储策 略设置为对同一数据进行备份存储, 且通常釆用 Chassis策略进行数据存 储, 具体地, 分布式存储***在进行数据存储时, 会基于该数据存储策略 对数据进行备份, 将同一数据及其备份数据存储在 Rack的不同存储节点 中, 这样, 在一个 Chassis的电源故障而导致其上的存储节点无法访问时, 可访问其他 Chassis的存储节点存储的数据副本。 但是, 现有釆用 Chassis策略的数据存储策略进行数据存储时, 同一 数据的各数据副本可能会存储在同一 Rack的不同存储节点中, 这样, 当 Rack的电源出现故障, 则将导致存储在该 Rack中的各 Chassis上的存储 节点的数据无法使用, 数据存储的安全性较差, 分布式存储***的可靠性 较差。 发明内容 本发明实施例提供一种分布式存储控制方法、 装置及***, 可克服现 有技术存在的数据存储安全性较差的问题, 可提高分布式存储***的数据 存储的安全性和可靠性。 The distributed storage system usually consists of a machine rejection (Rack). Each Rack is provided with multiple chassis (Chassis). Each Chassis is placed with a physical storage device as a storage node, and each Rack and each Chassis Each of the storage nodes is separately configured with an independent power source. When storing data, the data is stored in the storage nodes of each chassis. The distributed storage system is further provided with a controller connected to each storage node for maintaining configuration information of each storage node. And data storage strategies. In the existing distributed storage system, in order to ensure the security of data storage, the data storage policy is set to backup and store the same data, and usually uses the Chassis policy for data storage. Specifically, when the distributed storage system performs data storage. The data is backed up based on the data storage policy, and the same data and its backup data are stored in different storage nodes of the Rack, so that when a Chassis power failure causes the storage node on the storage node to be inaccessible, the other data can be accessed. A copy of the data stored by Chassis's storage node. However, when the existing data storage policy of the Chassis strategy is used for data storage, each data copy of the same data may be stored in different storage nodes of the same Rack, so that when the power of the Rack fails, the storage will be stored in the same Rack. The data of the storage nodes on each Chassis in the Rack cannot be used, the security of the data storage is poor, and the reliability of the distributed storage system is poor. Summary of the invention The embodiment of the invention provides a distributed storage control method, device and system, which can overcome the problem of poor data storage security in the prior art, and can improve the security and reliability of data storage of the distributed storage system.
第一方面, 本发明提供一种分布式存储控制方法, 应用于分布式存储 ***中, 所述分布式存储***包括控制器, 以及多个存储节点, 所述多个 存储节点放置在机拒中, 所述方法包括:  In a first aspect, the present invention provides a distributed storage control method, which is applied to a distributed storage system, where the distributed storage system includes a controller, and a plurality of storage nodes, where the plurality of storage nodes are placed in the machine rejection. , the method includes:
获取当前配置信息, 所述当前配置信息包括各存储节点所属机拒的机 拒标识, 每个机拒标识对应一个机拒;  Acquiring current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
根据所述当前配置信息中的各存储节点所属机拒的机拒标识, 获得所 述分布式存储***中机拒的个数;  And obtaining, according to the machine rejection identifier of each storage node in the current configuration information, the number of machine rejections in the distributed storage system;
在所述机拒的个数大于 1时, 设定所述分布式存储***的数据存储策 略为第一数据存储策略, 所述第一数据存储策略用于指示将同一数据的多 个数据副本存储在位于不同机拒的存储节点中;  When the number of the machine rejections is greater than 1, the data storage policy of the distributed storage system is set to be a first data storage policy, where the first data storage policy is used to indicate that multiple data copies of the same data are stored. In a storage node that is located in a different machine;
将所述分布式存储***的数据存储策略同步给各存储节点, 以便存储 节点或客户端基于所述数据存储策略存放数据, 其中, 所述客户端从存储 节点获得所述数据存储策略。  Synchronizing the data storage policy of the distributed storage system to each storage node, so that the storage node or the client stores data based on the data storage policy, wherein the client obtains the data storage policy from the storage node.
结合第一方面, 在第一种可能实现方式中, 所述第一数据存储策略还 包括数据副本个数, 所述数据副本个数用于指示数据存储在所述分布式存 储***时的副本个数;  With reference to the first aspect, in a first possible implementation manner, the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
在所述机拒的个数大于或等于所述数据副本的个数时, 设定所述第一 数据存储策略指示将同一数据的多个数据副本分别存储在不同机拒的存 储节点中。  When the number of the machine rejections is greater than or equal to the number of the data copies, the first data storage policy is set to indicate that the plurality of data copies of the same data are respectively stored in the storage nodes of the different machines.
结合第一方面, 在第二种可能实现方式中, 所述第一数据存储策略还 包括数据副本个数, 所述数据副本个数用于指示数据存储在所述分布式存 储***时的副本个数;  With reference to the first aspect, in a second possible implementation manner, the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
在所述机拒的个数小于所述数据副本的个数时, 设定所述第一数据存 储策略指示将同一数据的与所述机拒个数相同的数据副本分别存储在不 同机拒的存储节点中。  When the number of the machine rejection is less than the number of the data copies, setting the first data storage policy to store the same data copy of the same data as the machine rejection number in different machines In the storage node.
结合第一方面或第一方面的第一或二种可能实现方式, 在第三种可能 实现方式中, 所述获取当前配置信息, 具体包括: 接收各存储节点上传的各存储节点的配置信息, 所述存储节点的配置 信息包括存储节点所属机拒的机拒标识; With reference to the first aspect or the first or the second possible implementation manner of the first aspect, in the third possible implementation manner, the acquiring the current configuration information includes: Receiving configuration information of each storage node uploaded by each storage node, where the configuration information of the storage node includes a machine rejection identifier rejected by the storage node;
将各存储节点的配置信息的集合得到当前配置信息。  The current configuration information is obtained from the set of configuration information of each storage node.
结合第一方面或第一方面的第一或二或三种可能实现方式, 在第四种 可能实现方式中, 所述根据所述当前配置信息中的各存储节点所属机拒的 机拒标识, 获得所述分布式存储***中机拒的个数, 具体包括:  With reference to the first aspect or the first or second or the three possible implementation manners of the first aspect, in a fourth possible implementation manner, the determining, according to the machine rejection of each storage node in the current configuration information, Obtaining the number of machine rejections in the distributed storage system, specifically including:
根据所述当前配置信息和所述分布式存储***中上一次获得的配置 信息中各存储节点所属机拒的机拒标识, 判定所述当前配置信息与上一次 获得的配置信息中的机拒标识不同时, 根据所述当前配置信息中的各存储 节点所属机拒的机拒标识, 获得所述分布式存储***中机拒的个数。  Determining the current configuration information and the machine rejection identifier in the last obtained configuration information according to the current configuration information and the machine rejection identifier of each storage node to which the storage node belongs in the configuration information obtained last time in the distributed storage system. If not, the number of machine rejections in the distributed storage system is obtained according to the machine rejection identifier of each storage node in the current configuration information.
结合第一方面或第一方面的第一或二或三或四种可能实现方式, 在第 五种可能实现方式中, 所述的分布式存储控制方法, 还包括:  With reference to the first aspect or the first or second or third or four possible implementation manners of the first aspect, in the fifth possible implementation manner, the distributed storage control method further includes:
根据所述当前配置信息和所述分布式***中上一次获得的配置信息 中各存储节点所属机拒的机拒标识, 确定所述分布式存储***中是否有新 接入的机拒或者有撤出的旧机拒, 并生成机拒的更新信息, 所述机拒的更 新信息包括有接入的新机拒的机拒标识和撤出的旧机拒的机拒标识; 将所述机拒更新信息同步给各存储节点, 以便存储节点基于所述更新 信息和所述数据存储策略存放数据。  Determining, according to the current configuration information and the machine rejection identifier of each storage node in the configuration information obtained in the distributed system, whether there is a new access machine in the distributed storage system or a withdrawal The old machine is rejected, and the machine rejects the update information, and the machine rejection information includes the machine rejection code of the new machine that is accessed and the machine rejection certificate of the old machine that is rejected; The update information is synchronized to each storage node such that the storage node stores data based on the update information and the data storage policy.
第二方面, 本发明实施例提供一种分布式存储控制方法, 包括: 接收分布式存储***的控制器同步的数据存储策略;  In a second aspect, an embodiment of the present invention provides a distributed storage control method, including: receiving a data storage policy synchronized by a controller of a distributed storage system;
基于所述数据存储策略对存储的数据进行处理, 其中, 所述数据存储 策略为第一数据存储策略, 所述第一数据存储策略用于指示将同一数据的 多个数据副本存储在位于不同机拒的存储节点中。  The stored data is processed according to the data storage policy, where the data storage policy is a first data storage policy, and the first data storage policy is used to indicate that multiple data copies of the same data are stored in different machines. Rejected in the storage node.
结合第二方面, 在第一种可能实现方式中, 所述的分布式存储控制方 法, 还包括:  With reference to the second aspect, in the first possible implementation, the distributed storage control method further includes:
接收所述控制器同步的机拒的更新信息, 所述机拒的更新信息包括有 接入的新机拒的机拒标识或者有撤出的旧机拒的机拒标识;  Receiving update information of the machine rejection of the controller synchronization, and the update information of the machine rejection includes a machine rejection identifier of the new machine that has been accessed, or a machine rejection identifier of the old machine that has been withdrawn;
所述基于所述数据存储策略对存储的数据进行处理, 具体包括: 所述机拒更新信息中有接入的新机拒的机拒标识时, 基于所述数据存 储策略, 将存储在一个机拒中不同存储节点的同一数据的多个数据副本中 的至少一个迁移至所述接入的新机拒的机拒标识对应的新机拒的存储节 点中; The processing the stored data based on the data storage policy specifically includes: when the machine rejects the update information, if the new machine rejects the machine rejection identifier, the data storage policy is stored in one machine. Rejecting multiple copies of the same data for different storage nodes At least one of the storage nodes that are migrated to the new machine rejected by the new machine rejection of the access;
所述机拒更新信息中有撤出的旧机拒的机拒标识时, 基于所述数据存 移至其他机拒的存储节点中。  When there is a machine rejection image of the old machine rejected in the machine rejection update information, the data is stored in the storage node rejected by the other machine based on the data.
第三方面, 本发明实施例提供一种分布式存储控制装置, 应用于分布 式存储***中, 所述分布式存储***包括多个存储节点, 所述多个存储节 点放置在机拒中, 所述装置包括:  In a third aspect, an embodiment of the present invention provides a distributed storage control device, which is applied to a distributed storage system, where the distributed storage system includes multiple storage nodes, and the multiple storage nodes are placed in the machine rejection. The device includes:
配置信息获取模块, 用于获取当前配置信息, 所述当前配置信息包括 各存储节点所属机拒的机拒标识, 每个机拒标识对应一个机拒;  The configuration information obtaining module is configured to obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
机拒个数获取模块, 用于根据所述当前配置信息中的各存储节点所属 机拒的机拒标识, 获得所述分布式存储***中机拒的个数;  The machine rejection number obtaining module is configured to obtain, according to the machine rejection identifier of each storage node in the current configuration information, the number of machine rejections in the distributed storage system;
策略设定模块, 用于在所述机拒的个数大于 1时, 设定所述分布式存 储***的数据存储策略为第一数据存储策略, 所述第一数据存储策略用于 指示将同一数据的多个数据副本存储在位于不同机拒的存储节点中; 同步模块, 用于将所述分布式存储***的数据存储策略同步给各存储 节点, 以便存储节点或客户端基于所述数据存储策略存放数据, 其中, 所 述客户端从存储节点获得所述数据存储策略。  a policy setting module, configured to: when the number of the machine rejections is greater than 1, set a data storage policy of the distributed storage system as a first data storage policy, where the first data storage policy is used to indicate that the same data storage policy is used a plurality of data copies of the data are stored in the storage node located in the different machine; the synchronization module is configured to synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node or the client is based on the data storage The policy stores data, wherein the client obtains the data storage policy from a storage node.
结合第三方面, 在第一种可能实现方式中, 所述第一数据存储策略还 包括数据副本个数, 所述数据副本个数用于指示数据存储在所述分布式存 储***时的副本个数;  With reference to the third aspect, in a first possible implementation manner, the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
在所述机拒的个数大于或等于所述数据副本的个数时, 设定所述第一 数据存储策略指示将同一数据的多个数据副本分别存储在不同机拒的存 储节点中。  When the number of the machine rejections is greater than or equal to the number of the data copies, the first data storage policy is set to indicate that the plurality of data copies of the same data are respectively stored in the storage nodes of the different machines.
结合第三方面, 在第二种可能实现方式中, 所述第一数据存储策略还 包括数据副本个数, 所述数据副本个数用于指示数据存储在所述分布式存 储***时的副本个数;  With reference to the third aspect, in a second possible implementation manner, the first data storage policy further includes a number of data copies, where the number of data copies is used to indicate a copy of the data when the distributed storage system is stored. Number
在所述机拒的个数小于所述数据副本的个数时, 设定所述第一数据存 储策略指示将同一数据的与所述机拒个数相同的数据副本分别存储在不 同机拒的存储节点中。 结合第三方面或第三方面的第一或二种可能实现方式, 在第三种可能 实现方式中, 所述配置信息获取模块, 具体用于接收各存储节点上传的各 存储节点的配置信息, 所述存储节点的配置信息包括存储节点所属机拒的 机拒标识; 以及用于将各存储节点的配置信息的集合得到当前配置信息。 When the number of the machine rejection is less than the number of the data copies, setting the first data storage policy to store the same data copy of the same data as the machine rejection number in different machines In the storage node. With reference to the third aspect or the first or the second possible implementation manner of the third aspect, in a third possible implementation manner, the configuration information acquiring module is specifically configured to receive configuration information of each storage node uploaded by each storage node, The configuration information of the storage node includes a machine rejection identifier of the machine node to which the storage node belongs; and configured to obtain current configuration information of the collection of configuration information of each storage node.
结合第三方面或第三方面的第一或二或三种可能实现方式, 在第四种 可能实现方式中, 所述机拒个数获取模块, 具体用于根据所述当前配置信 息和所述分布式存储***中上一次获得的配置信息中各存储节点所属机 拒的机拒标识, 判定所述当前配置信息与上一次获得的配置信息中的机拒 标识不同时, 根据所述当前配置信息中的各存储节点所属机拒的机拒标 识, 获得所述分布式存储***中机拒的个数。  With reference to the third aspect or the first or second or the three possible implementation manners of the third aspect, in a fourth possible implementation manner, the machine rejects the number obtaining module, specifically, according to the current configuration information and the In the configuration information obtained last time in the distributed storage system, the machine rejection index of each storage node belongs to the device, and when the current configuration information is different from the machine rejection identifier in the configuration information obtained last time, the current configuration information is determined according to the current configuration information. The number of machine rejections in the distributed storage system is obtained by the machine rejection of each storage node.
结合第三方面或第三方面的第一或二或三或四种可能实现方式, 在第 五种可能实现方式中, 所述的分布式存储控制装置, 还包括:  With reference to the third aspect or the first or second or third or the four possible implementation manners of the third aspect, in the fifth possible implementation manner, the distributed storage control device further includes:
机拒更新信息获取模块, 用于根据所述当前配置信息和所述分布式系 统中上一次获得的配置信息中各存储节点所属机拒的机拒标识, 确定所述 分布式存储***中是否有新接入的机拒或者有撤出的旧机拒, 并生成机拒 的更新信息 , 所述机拒的更新信息包括有接入的新机拒的机拒标识和撤出 的旧机拒的机拒标识;  The machine refusal update information obtaining module is configured to determine whether the distributed storage system is included according to the current configuration information and the machine rejection identifier of each storage node in the configuration information obtained in the distributed system The newly accessed machine rejects or rejects the old machine, and generates the machine rejection information. The machine rejection information includes the machine rejection code of the new machine that has been accessed and the old machine rejection of the withdrawal. Machine rejection identification;
所述同步模块, 还用于将所述机拒更新信息同步给各存储节点, 以便 存储节点基于所述更新信息和所述数据存储策略存放数据。  The synchronization module is further configured to synchronize the machine rejection update information to each storage node, so that the storage node stores data based on the update information and the data storage policy.
第四方面, 本发明实施例提供一种分布式存储控制装置, 包括: 接收模块, 用于接收分布式存储***的控制器同步的数据存储策略; 处理模块,用于基于所述数据存储策略对存储的数据进行处理,其中, 所述数据存储策略为第一数据存储策略, 所述第一数据存储策略用于指示 将同一数据的多个数据副本存储在位于不同机拒的存储节点中。  According to a fourth aspect, an embodiment of the present invention provides a distributed storage control apparatus, including: a receiving module, configured to receive a data storage policy synchronized by a controller of a distributed storage system; and a processing module, configured to: The stored data is processed, wherein the data storage policy is a first data storage policy, and the first data storage policy is used to indicate that multiple data copies of the same data are stored in storage nodes located in different machines.
结合第四方面, 在第一种可能实现方式中, 所述接收模块, 还用于接 收所述控制器同步的机拒的更新信息, 所述机拒的更新信息包括有接入的 新机拒的机拒标识或者有撤出的旧机拒的机拒标识;  With reference to the fourth aspect, in a first possible implementation manner, the receiving module is further configured to receive update information of the machine rejection of the controller, where the update information of the machine includes a new machine with access The machine rejection label or the machine rejection certificate of the old machine that has been withdrawn;
所述处理模块, 具体用于所述机拒更新信息中有接入的新机拒的机拒 标识时, 基于所述数据存储策略, 将存储在一个机拒中不同存储节点的同 一数据的多个数据副本中的至少一个迁移至所述接入的新机拒的机拒标 识对应的新机拒的存储节点中; 以及用于所述机拒更新信息中有撤出的旧 机拒的机拒标识时, 基于所述数据存储策略, 将存储在所述撤出的旧机拒 第五方面, 本发明实施例提供一种分布式存储***, 包括控制器, 所 述控制器为釆用第三方面或第三方面的第一或二或三或四或五种可能实 现方式中本发明实施例提供的分布式存储控制装置。 本实施例提供的分布式存储控制方法、 装置及***, 可在***中机拒 的个数大于 1时, 设定将同一数据的数据副本存储在不同机拒的存储节点 的存储策略, 使得机拒的存储节点基于该策略进行数据存储时, 同一数据 的数据副本可存储在不同机拒的存储节点中, 这样, 在一个机拒故障而导 致存储在其中的数据无法使用时, 可访问其他机拒存储的数据副本, 可有 效提高数据存储的安全性, 提高分布式存储***运行的稳定性和可靠性。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见 地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附 图。 The processing module is specifically configured to: when the machine rejects the new machine rejecting the machine rejection identifier in the machine rejection update information, based on the data storage policy, storing the same data of different storage nodes in one machine rejection Rejection of at least one of the data copies to the new machine of the access In the storage node of the corresponding new machine rejection; and the machine rejection policy for the old machine rejection in the machine rejection update information, based on the data storage policy, the old The fifth aspect of the present invention provides a distributed storage system, including a controller, where the controller uses the first or second or third or fourth or five possible implementations of the third aspect or the third aspect. A distributed storage control device provided by an embodiment of the present invention. The distributed storage control method, device and system provided in this embodiment can set a storage policy for storing data copies of the same data in storage nodes of different machines when the number of machine rejections in the system is greater than 1. When the rejected storage node performs data storage based on the policy, the data copy of the same data may be stored in the storage node of the different machine rejection, so that when one machine refuses to cause the data stored therein to be unavailable, the other machine can be accessed. Rejecting stored data copies can effectively improve the security of data storage and improve the stability and reliability of distributed storage systems. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. The drawings are some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
图 1为本发明实施例一提供的分布式存储控制方法的流程示意图; 图 2为本发明实施例二提供的分布式存储控制方法的流程示意图; 图 3为本发明实施例三提供的分布式存储控制方法的流程示意图; 图 4为本发明实施例四提供的分布式存储控制方法的流程示意图; 图 5为本发明实施例五提供的分布式存储控制方法的流程示意图; 图 6为本发明实施例六提供的分布式存储控制方法的流程示意图; 图 7为本发明实施例七提供的分布式存储控制装置的结构示意图; 图 8为本发明实施例八提供的分布式存储控制装置的结构示意图; 图 9为本发明实施例九提供的分布式存储***的结构示意图。 具体实施方式 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合本发明实 施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显 然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动的前提下 所获得的所有其他实施例, 都属于本发明保护的范围。 1 is a schematic flowchart of a distributed storage control method according to Embodiment 1 of the present invention; FIG. 2 is a schematic flowchart of a distributed storage control method according to Embodiment 2 of the present invention; FIG. 4 is a schematic flowchart of a distributed storage control method according to Embodiment 4 of the present invention; FIG. 5 is a schematic flowchart of a distributed storage control method according to Embodiment 5 of the present invention; FIG. 7 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 7 of the present invention; FIG. 8 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 8 of the present invention; FIG. 9 is a schematic structural diagram of a distributed storage system according to Embodiment 9 of the present invention. Detailed ways The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Some embodiments, rather than all of the embodiments, are invented. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图 1为本发明实施例一提供的分布式存储控制方法的流程示意图。 本 实施例可应用于分布式存储***中的数据存储控制中, 分布式存储***的 ***控制器, 可基于机拒的个数, 确定数据存储策略, 具体地, 如图 1所 示, 本实施分布式存储控制方法包括以下步骤:  FIG. 1 is a schematic flowchart diagram of a distributed storage control method according to Embodiment 1 of the present invention. The embodiment can be applied to the data storage control in the distributed storage system. The system controller of the distributed storage system can determine the data storage policy based on the number of machine rejections. Specifically, as shown in FIG. 1 , the implementation The distributed storage control method includes the following steps:
步骤 101、 获取当前配置信息, 当前配置信息包括各存储节点所属机 拒的机拒标识 , 每个机拒标识对应一个机拒;  Step 101: Obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
步骤 102、 根据当前配置信息中的各存储节点所属机拒的机拒标识, 获得分布式存储***中机拒的个数;  Step 102: Obtain, according to the machine rejection identifier of each storage node in the current configuration information, obtain the number of machine rejections in the distributed storage system;
步骤 103、 在机拒的个数大于 1时, 设定分布式存储***的数据存储 策略为第一数据存储策略, 该第一数据存储策略用于指示将同一数据的多 个数据副本存储在位于不同机拒的存储节点中;  Step 103: When the number of machine rejections is greater than 1, set a data storage policy of the distributed storage system as a first data storage policy, where the first data storage policy is used to indicate that multiple data copies of the same data are stored in the first data storage policy. Among the storage nodes that are rejected by different machines;
步骤 104、 将分布式存储***的数据存储策略同步给各存储节点, 以 便存储节点基于数据存储策略存放数据。  Step 104: Synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node stores the data based on the data storage policy.
本实施例可应用于分布式存储***中的数据存储控制中, 由控制器根 据配置信息来获取当前分布式***中机拒的个数, 并可在机拒个数大于 1 时, 设定存储策略, 以指示将一个数据的多个数据副本存储在不同的存储 节点, 这样, 存储节点接收到该存储策略后, 存储节点就可以基于该存储 策略将同一数据的数据副本存储在不同机拒的存储节点上, 以便在一个存 储节点故障而无法使用时, 可利用其它存储节点存储的数据副本。  The embodiment can be applied to the data storage control in the distributed storage system, and the controller obtains the number of machine rejections in the current distributed system according to the configuration information, and can set the storage when the number of rejections is greater than 1. a policy, to indicate that multiple copies of data of one data are stored in different storage nodes, so that after the storage node receives the storage policy, the storage node can store data copies of the same data in different machines based on the storage policy. On a storage node, when a storage node fails and cannot be used, a copy of the data stored by other storage nodes can be utilized.
本领域技术人员可以理解, 实际应用中, 与存储节点连接的客户端也 可从存储节点获得控制器同步的存储策略, 并可基于该存储策略进行数据 的存储。  A person skilled in the art can understand that in a practical application, a client connected to a storage node can also obtain a storage policy synchronized by the controller from the storage node, and can store data based on the storage policy.
本实施例中, 所述的机拒是指共用一个机拒控制器的多个存储节点的 设备, 该机拒内放置有多个作为存储节点的物理存储器, 每个物理存储器 均放置在机框中, 每个机框为其上的存储节点配置有独立的电源。 本实施例中, 当机拒的数量多于 1个时, 可将同一数据的数据副本存 储在不同的机拒中, 这种数据存储策略也可称为 Rack策略, 或者, 也可 称为 Rack策略与 Chassis策略的结合。 其中, Rack策略是指将同一数据 的多个数据副本分别存储在不同的机拒中, 而 Rack策略与 chassis策略的 结合是指将同一数据多个数据副本至少存储在两个机拒中, 且至少一个机 拒内存储有至少两个数据副本。 In this embodiment, the machine rejection refers to a device that shares a plurality of storage nodes of the machine rejection controller, and the machine rejects a plurality of physical storages as storage nodes, and each physical storage is placed in the chassis. In, each chassis is configured with a separate power supply for its storage nodes. In this embodiment, when the number of the machine rejections is more than one, the data copy of the same data may be stored in different machine rejections. This data storage policy may also be referred to as a Rack policy, or may be referred to as Rack. The combination of strategy and Chassis strategy. The Rack policy refers to storing multiple data copies of the same data in different machine rejections, and the combination of the Rack policy and the chassis policy means storing at least two data copies of the same data in at least two machine rejections, and At least one of the machines refuses to store at least two copies of the data.
本实施例中, 所述的同一数据的数据副本的个数, 是指分布式存储系 统进行数据存储时设定的数据副本的个数。 具体地, 本实施例分布式存储 ***是指釆用一致性路由的分布式存储***, 具体而言, 可利用数据副本 关系来表述分布式存储***的数据一致性, 例如可用 NWR来表示, 其中, N、 W、 R均为不为 0的自然数, N表示同一数据的数据副本的个数, 即 数据的副本(Replica )的份数; W表示更新一个数据时, 需要确保成功更 新的份数; R表示读取一个数据需要读取的数据副本的个数, 即 Replica 的份数。  In this embodiment, the number of data copies of the same data refers to the number of data copies set when the distributed storage system performs data storage. Specifically, the distributed storage system in this embodiment refers to a distributed storage system that uses consistent routing. Specifically, the data copy relationship may be used to express data consistency of the distributed storage system, for example, represented by NWR, where N, W, and R are all natural numbers that are not 0, N represents the number of copies of the same data, that is, the number of copies of the data (Replica); W indicates the number of copies that need to be successfully updated when updating a piece of data. ; R represents the number of copies of the data that need to be read to read a data, that is, the number of copies of Replica.
本实施例提供的分布式存储控制方法, 可将同一数据的数据副本存储 在不同机拒的存储节点中, 这样, 在一个机拒故障而导致存储在其中的数 据无法使用时, 可访问其他机拒存储的数据副本, 可有效提高数据存储的 安全性, 提高分布式存储***运行的稳定性和可靠性。  The distributed storage control method provided in this embodiment can store data copies of the same data in storage nodes of different machines, so that when one machine refuses to cause the data stored therein to be unavailable, other machines can be accessed. Rejecting stored data copies can effectively improve the security of data storage and improve the stability and reliability of distributed storage systems.
图 2为本发明实施例二提供的分布式存储控制方法的流程示意图。 本 实施例分布式存储***的控制器可基于机拒的个数以及同一数据的数据 副本个数, 来设定数据存储策略, 具体地, 如图 2所示, 本实施例可包括 如下步骤:  FIG. 2 is a schematic flowchart diagram of a distributed storage control method according to Embodiment 2 of the present invention. The controller of the distributed storage system of the embodiment may set the data storage policy based on the number of machine rejections and the number of data copies of the same data. Specifically, as shown in FIG. 2, the embodiment may include the following steps:
步骤 201、 获取当前配置信息, 当前配置信息包括各存储节点所属机 拒的机拒标识 , 每个机拒标识对应一个机拒;  Step 201: Obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
步骤 202、 根据当前配置信息中的各存储节点所属机拒的机拒标识, 获得分布式存储***中机拒的个数;  Step 202: Obtain the number of machine rejections in the distributed storage system according to the machine rejection identifier of each storage node in the current configuration information.
步骤 203、 判断机拒的个数是否大于 1 , 是则执行步骤 204 , 否则, 执 行步骤 207;  Step 203, determining whether the number of machine rejections is greater than 1, then executing step 204, otherwise, performing step 207;
步骤 204、 判断机拒的个数是否大于或等于分布式***中数据副本的 个数, 是则执行步骤 205 , 否则, 执行步骤 206; 步骤 205、 设定数据策略为第一数据存储策略, 指示将同一数据的多 个数据副本分别存储在不同机拒的存储节点中, 执行步骤 208; Step 204: Determine whether the number of machine rejections is greater than or equal to the number of data copies in the distributed system, if yes, go to step 205; otherwise, go to step 206; Step 205, the setting data policy is the first data storage policy, indicating that the plurality of data copies of the same data are stored in the storage node of the different machine, step 208;
步骤 206、 设定数据策略为第一数据存储策略, 指示将同一数据的与 机拒个数相同的数据副本分别存储在不同机拒的存储节点中, 执行步骤 208;  Step 208, the setting data policy is the first data storage policy, indicating that the same data of the same number of data rejection is stored in the storage node of the different machines, step 208;
步骤 207、 设定数据策略为第二数据策略, 指示将同一数据多个数据 副本存储在同一机拒的不同存储节点中;  Step 207: Set a data policy to be a second data policy, and indicate that multiple data copies of the same data are stored in different storage nodes rejected by the same machine;
步骤 208、 将数据策略将分布式存储***的数据存储策略同步给各存 储节点, 以便存储节点基于数据存储策略存放数据, 结束。  Step 208: Synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node stores the data based on the data storage policy, and ends.
上述步骤 201中, 获取当前配置信息具体可包括: 接收各存储节点上 传的各存储节点的配置信息, 该存储节点的配置信息包括存储节点所属机 拒的机拒标识; 以及将各存储节点的配置信息的集合得到当前配置信息。 本领域技术人员可以理解, 当有机拒接入分布式存储***时, 机拒上的各 存储节点可自动上传自身的配置信息到控制器, 以使得控制器可基于机拒 上的各存储节点上传的配置信息得到分布式***的当前配置信息。 本领域 技术人员可以理解, 分布式***的当前配置信息, 也可以由网络维护人员 来人为配置, 并发送给控制器。 其中, 所述的配置信息具体是用户设定的 信息, 通常包括机拒的标识信息、 存储节点与机拒之间的关系等。  In the foregoing step 201, the obtaining the current configuration information may include: receiving configuration information of each storage node uploaded by each storage node, where the configuration information of the storage node includes a machine rejection identifier of the storage node to which the storage node belongs; and configuring the storage node The collection of information gets the current configuration information. Those skilled in the art can understand that when the organic access is denied to the distributed storage system, each storage node that is rejected by the machine can automatically upload its own configuration information to the controller, so that the controller can upload based on each storage node on the machine rejection. The configuration information is obtained from the current configuration information of the distributed system. Those skilled in the art can understand that the current configuration information of the distributed system can also be manually configured by the network maintenance personnel and sent to the controller. The configuration information is specifically information set by the user, and generally includes identifier information of the machine rejection, a relationship between the storage node and the machine rejection, and the like.
上述步骤 202具体可包括: 根据当前配置信息和分布式存储***中上 一次获得的配置信息中各存储节点所属机拒的机拒标识, 判定当前配置信 息与上一次获得的配置信息中的机拒标识不同时, 根据当前配置信息中的 各存储节点所属机拒的机拒标识, 获得分布式存储***中机拒的个数。 这 样, 当分布式***中的配置信息有变更时, 就可以基于配置信息来确定机 拒的个数, 当机拒的个数有变化时就可以及时进行存储策略的变更, 提高 分布式***数据存储的安全性和可靠性。  The foregoing step 202 may include: determining, according to the current configuration information and the machine rejection identifier of each storage node in the configuration information obtained in the distributed storage system, the current configuration information and the machine rejection in the last obtained configuration information. When the identifiers are different, the number of machine rejections in the distributed storage system is obtained according to the machine rejection identifier of each storage node in the current configuration information. In this way, when the configuration information in the distributed system is changed, the number of machine rejections can be determined based on the configuration information, and when the number of the machine rejections changes, the storage policy can be changed in time to improve the distributed system data. Storage security and reliability.
上述步骤 204-步骤 206中, 所述的数据副本具体是指分布式存储*** 中设定的用于表示数据存储时的副本个数, 该副本个数由用户预先设定 的, 通常而言, 数据副本的个数会携带在数据存储策略中。 当机拒的个数 'J、于数据副本的个数时, 通过将同一数据的部分数据副本存储在一个机拒 中, 而将其他数据副本存储在其他不同的机拒中, 这样, 每一个机拒均可 存储有数据副本; 当机拒的个数大于或等于数据副本的个数时, 则可将同 一数据的多个数据副本分别存储在不同机拒的存储节点中, 这样, 每个机 拒均分别存储有同一数据的一个数据副本, 可确保数据存储的安全性和可 靠性。 In the above steps 204-206, the data copy refers specifically to the number of copies set in the distributed storage system for indicating data storage, and the number of copies is preset by the user. Generally, The number of copies of the data is carried in the data storage policy. When the number of copies rejected by the machine is 'J, the number of copies of the data is stored in a different machine by storing a partial copy of the same data in one machine, so that each Machine rejection A copy of the data is stored; when the number of the machine rejects is greater than or equal to the number of data copies, multiple data copies of the same data may be stored in the storage nodes of different machines, so that each machine rejects each A copy of the data that stores the same data ensures the security and reliability of the data store.
本实施例中, 还可根据当前配置信息和分布式***中上一次获得的配 置信息中各存储节点所属机拒的机拒标识, 确定分布式存储***中是否有 新接入的机拒或者有撤出的旧机拒, 并生成机拒的更新信息, 该机拒的更 新信息包括有接入的新机拒的机拒标识和撤出的旧机拒的机拒标识, 并可 将机拒更新信息同步给各存储节点, 以便存储节点基于更新信息和所述数 据存储策略存放数据。 其中, 所述的当前配置信息中有上一次获得的配置 信息没有的机拒标识即为新接入的机拒, 上一次获得的配置信息中有当前 配置信息没有的机拒标识即为撤出的旧机拒的机拒标识。 当存储节点接收 到机拒更新信息后, 即可基于该更新信息对已存储的数据进行处理, 其具 体实现将在后面实施例进行说明。  In this embodiment, according to the current configuration information and the machine rejection information of each storage node in the configuration information obtained in the distributed system, it is determined whether there is a new access machine in the distributed storage system or has The old machine that has been withdrawn is rejected, and the update information of the machine rejection is generated. The update information rejected by the machine includes the machine rejection identification of the new machine that has been accessed, and the machine rejection identification of the old machine that has been withdrawn, and may reject the machine. The update information is synchronized to each storage node such that the storage node stores the data based on the update information and the data storage policy. The current configuration information includes the machine rejection identifier that is not obtained by the configuration information obtained last time, that is, the machine rejection of the new access, and the last obtained configuration information that the current configuration information does not have the machine rejection identifier is the withdrawal. The old machine rejected the machine rejection logo. After the storage node receives the machine rejection update information, the stored data can be processed based on the update information, and a specific implementation thereof will be described in the following embodiments.
图 3为本发明实施例三提供的分布式存储控制方法的流程示意图。 本 实施例中, 分布式存储***中的存储节点接收到控制器通过上述图 1或图 2所示方法同步的存储策略后, 即可基于该数据存储策略进行数据存储处 理, 具体地, 如图 3所示, 本实施例方法可包括如下步骤:  FIG. 3 is a schematic flowchart diagram of a distributed storage control method according to Embodiment 3 of the present invention. In this embodiment, after the storage node in the distributed storage system receives the storage policy synchronized by the controller according to the method shown in FIG. 1 or FIG. 2, the storage node can perform data storage processing based on the data storage policy, specifically, as shown in the figure. As shown in FIG. 3, the method in this embodiment may include the following steps:
步骤 301、 接收分布式存储***的控制器同步的数据存储策略; 步骤 302、 基于该数据存储策略对存储的数据进行处理, 其中, 该数 据存储策略为第一数据存储策略, 该第一数据存储策略用于指示将同一数 据的多个数据副本存储在位于不同机拒的存储节点中。  Step 301: Receive a data storage policy that is synchronized by the controller of the distributed storage system. Step 302: Process the stored data according to the data storage policy, where the data storage policy is a first data storage policy, and the first data storage A policy is used to indicate that multiple copies of data of the same data are stored in storage nodes that are located in different machines.
本实施例中, 存储节点还可接收控制器发送的机拒更新信息, 该机拒 的更新信息包括有接入的新机拒的机拒标识或者有撤出的旧机拒的机拒 标识; 上述步骤 302具体可包括: 当机拒更新信息中有接入的新机拒的机 拒标识时, 基于数据存储策略, 将存储在一个机拒中不同存储节点的同一 数据的多个数据副本中的至少一个迁移至接入的新机拒的机拒标识对应 的新机拒的存储节点中; 当机拒更新信息中有撤出的旧机拒的机拒标识 时, 基于数据存储策略, 将存储在撤出的旧机拒的机拒标识对应的旧机拒 中的数据迁移至其他机拒的存储节点中。 本实施例中, 所述的将存储在一个机拒中不同存储节点的同一数据的 多个数据副本中的至少一个迁移至新接入的机拒的存储节点中, 就是将数 据的存储方式由釆用 Chassis策略升级为 Rack策略, 或者升级为 Chassis 策略和 Rack策略的结合, 以提高数据存储的安全性。 In this embodiment, the storage node may further receive the machine rejection update information sent by the controller, and the update information rejected by the machine includes the machine rejection identifier of the new machine that has been accessed, or the machine rejection identifier of the old machine that has been withdrawn; The foregoing step 302 may specifically include: when there is a machine rejection report of the new machine that is accessed in the machine rejection update information, based on the data storage policy, the data is stored in a plurality of data copies of the same data of different storage nodes in one machine. At least one of the storage nodes that are migrated to the new machine that is rejected by the new machine that is rejected by the access machine; if there is a machine rejection policy of the old machine that is rejected in the machine rejection update information, based on the data storage policy, The data of the old machine rejection corresponding to the machine rejection ID of the old machine that has been withdrawn is migrated to the storage node of the other machine. In this embodiment, the migrating at least one of the plurality of data copies of the same data stored in one machine to the different storage nodes to the newly accessed machine-rejected storage node is to store the data by Use the Chassis policy to upgrade to the Rack policy, or upgrade to a combination of Chassis and Rack policies to improve data storage security.
本领域技术人员可以理解, 当有新接入的机拒时, 可将数据存储策略 由 Chassis策略升级为 Rack策略, 即在分布式存储***升级扩容时, 相应 的可进行数据存储策略的升级, 以进一步提高数据存储的安全性和可靠 性。 因此, 本实施例可便于分布式存储***的升级扩容, 提高分布式存储 ***的适用性和实用性。  A person skilled in the art can understand that when a newly accessed machine is rejected, the data storage policy can be upgraded from a Chassis policy to a Rack policy, that is, when the distributed storage system is upgraded and expanded, the corresponding data storage policy can be upgraded. To further improve the security and reliability of data storage. Therefore, the embodiment can facilitate the upgrade and expansion of the distributed storage system, and improve the applicability and practicability of the distributed storage system.
本领域技术人员可以理解, 当有机拒撤出时, 可将数据存储策略由 Those skilled in the art can understand that when the organic rejection is withdrawn, the data storage strategy can be
Rack策略降级为 Chassis策略, 即在分布式存储***缩容时, 相应的可进 行数据存储策略的降低, 以满足缩容后的分布式存储***的数据存储需 要。 因此, 本实施例可进一步地提高分布式存储***的可动态更新性能, 提高***的适用性和实用性。 The Rack policy is downgraded to the Chassis strategy, that is, when the distributed storage system is shrinked, the corresponding data storage policy can be reduced to meet the data storage needs of the reduced distributed storage system. Therefore, the embodiment can further improve the dynamic update performance of the distributed storage system, and improve the applicability and practicability of the system.
本领域技术人员可以理解, 上述本发明实施例中, 将同一数据的多个 数据副本存储在机拒的存储节点时, 实质上就是将数据副本存储在存储节 点的分区 (partition ) 上, 其中每个存储节点可具有一个或多个分区, 因 此, 在进行数据存储时, 可利用一定的算法来计算同一数据的数据副本的 存储位置, 即存储分区, 具体地, 该算法可以为伪随机算法或其他算法, 具体算法计算过程在此不再赘述。  It can be understood by those skilled in the art that, in the foregoing embodiment of the present invention, when a plurality of data copies of the same data are stored in the machine-rejected storage node, the data copy is substantially stored in a partition of the storage node, where each The storage node may have one or more partitions. Therefore, when performing data storage, a certain algorithm may be used to calculate a storage location of the data copy of the same data, that is, a storage partition. Specifically, the algorithm may be a pseudo-random algorithm or Other algorithms, the specific algorithm calculation process will not be described here.
实际应用中, 由于分布式存储***存储有同一数据的多个数据副本, 在计算数据副本的存储区分位置时, 具体可在满足一致性路由情况下, 确 定数据副本存放在哪个存储节点的存储分区。 其中, 所述的一致性路由是 指用来描述分布式存储***中数据副本的之间的关系, 一致性路由具体实 现与传统方法相同或类似, 例如, 将数据分成 S个分区, 并且在 R台机器 上面保存键为 K的值的拷贝, 利用 K这个键来关联 R台机器, 例如可通 过哈希算法, 具体地, 可利用公式 a=K%S确定 K, 然后将这个值保存在 机器 a, a+1 , a+2 , ...a+r, 其中 R表示数据的副本数。  In a practical application, the distributed storage system stores multiple data copies of the same data. When calculating the storage location of the data copy, the storage partition of the storage node in which the data copy is stored may be determined under the condition of consistent routing. . The consistent route is used to describe the relationship between data copies in a distributed storage system. The specific implementation of the consistent route is the same as or similar to the traditional method. For example, the data is divided into S partitions, and is in R. On the machine, save the key with a copy of the value of K. Use the K key to associate the R machine. For example, you can use the hash algorithm. Specifically, you can use the formula a=K%S to determine K, and then save this value in the machine. a, a+1, a+2, ...a+r, where R represents the number of copies of the data.
因此, 上述本发明各实施例中, 将同一数据的数据副本保存在同一机 拒的不同存储节点中, 即 Chassis策略具体是指在存储数据时, 在满足一 致性路由情况下, 通过伪随机算法等算法确定同一数据的不同数据副本的 存储位置, 以将数据副本保存在同一机拒的不同存储节点; 将同一数据的 数据副本存储在不同的机拒中, 且的至少两个数据副本保存在一个机拒 中, 即 Rack策略与 Chassis策略结合具体是指在满足一致性路由情况下, 通过伪随机算法等算法确定同一数据的不同数据副本的存储位置, 以将同 一数据的不同数据副本中的至少两个数据副本存储在同一机拒中, 而其他 数据副本可保存在一个机拒或不同的机拒中; 将同一数据的数据副本分别 存储在不同的机拒中, 即 Rack策略具体是指在满足一致性路由情况下, 通过伪随机算法等算法确定同一数据的不同数据副本的存储位置, 以将同 一数据的不同数据副本分别存储在不同的机拒中。 Therefore, in the foregoing embodiments of the present invention, the data copies of the same data are stored in different storage nodes rejected by the same machine, that is, the Chassis policy specifically refers to satisfying one when storing data. In the case of caustic routing, the storage location of different data copies of the same data is determined by an algorithm such as a pseudo-random algorithm to save the data copies in different storage nodes rejected by the same machine; the data copies of the same data are stored in different machine rejections. And at least two copies of the data are stored in a machine rejection, that is, the combination of the Rack policy and the Chassis policy specifically means that, in the case of satisfying the consistent routing, the storage location of different data copies of the same data is determined by an algorithm such as a pseudo-random algorithm. Storing at least two copies of data in different data copies of the same data in the same machine, while other data copies can be stored in one machine or different machine rejections; storing data copies of the same data in different machines The machine rejects, that is, the Rack policy specifically refers to determining the storage location of different data copies of the same data by a pseudo-random algorithm and the like in the case of satisfying the consistent routing, so as to store different data copies of the same data in different machine rejections. in.
上述本发明各实施例中, 基于不同的策略, 在进行伪随机算法等算法 计算数据副本的存储位置时, 可添加相应的数据存储条件, 即上述的 Rack 策略、 Chassis策略或 Rack策略与 Chassis策略结合的限制, 实现对数据 的存储。  In the foregoing embodiments of the present invention, based on different strategies, when performing a pseudo-random algorithm and the like to calculate a storage location of a data copy, a corresponding data storage condition may be added, that is, the foregoing Rack policy, Chassis policy, or Rack policy and Chassis policy. The combination of restrictions to achieve the storage of data.
图 4为本发明实施例四提供的分布式存储控制装置的结构示意图。 本 实施例装置可应用于分布式存储***中, 所述分布式存储***包括多个存 储节点, 所述多个存储节点放置在机拒中, 本实施例装置具体可以是分布 式存储***中的控制器, 可基于配置信息获取机拒个数并设定存储策略, 具体地, 如图 4所示, 本实施例装置可包括配置信息获取模块 1 1、 机拒个 数获取模块 12、 策略设定模块 13和同步模块 14, 其中:  FIG. 4 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 4 of the present invention. The device in this embodiment is applicable to a distributed storage system, where the distributed storage system includes a plurality of storage nodes, and the plurality of storage nodes are placed in the machine rejection. The device in this embodiment may be specifically in a distributed storage system. The controller may obtain the number of the machine rejection based on the configuration information and set the storage policy. Specifically, as shown in FIG. 4, the device in this embodiment may include a configuration information acquiring module 1 1 , a machine rejection number obtaining module 12 , and a policy setting. The module 13 and the synchronization module 14, wherein:
配置信息获取模块 11 , 用于获取当前配置信息, 所述当前配置信息包 括各存储节点所属机拒的机拒标识 , 每个机拒标识对应一个机拒;  The configuration information obtaining module 11 is configured to obtain current configuration information, where the current configuration information includes a machine rejection identifier rejected by each storage node, and each machine rejection identifier corresponds to one machine rejection;
机拒个数获取模块 12 ,用于根据所述当前配置信息中的各存储节点所 属机拒的机拒标识, 获得所述分布式存储***中机拒的个数;  The machine rejection number obtaining module 12 is configured to obtain, according to the machine rejection identifier rejected by each storage node in the current configuration information, the number of machine rejections in the distributed storage system;
策略设定模块 13 , 用于在所述机拒的个数大于 1时, 设定所述分布式 存储***的数据存储策略为第一数据存储策略, 所述第一数据存储策略用 于指示将同一数据的多个数据副本存储在位于不同机拒的存储节点中; 同步模块 14 , , 用于将所述分布式存储***的数据存储策略同步给各 存储节点,以便存储节点或客户端基于所述数据存储策略存放数据,其中, 所述客户端从存储节点获得所述数据存储策略。 本实施例装置可应用于分布式存储***中, 作为控制器, 基于机拒个 数设定数据存储策略, 其具体实现过程可参见上述本发明方法实施例的说 明, 在此不再赘述。 The policy setting module 13 is configured to: when the number of the machine rejections is greater than 1, set a data storage policy of the distributed storage system as a first data storage policy, where the first data storage policy is used to indicate that Multiple data copies of the same data are stored in the storage nodes located in different machines; the synchronization module 14 is configured to synchronize the data storage policies of the distributed storage system to the storage nodes, so that the storage nodes or clients are based on The data storage policy stores data, wherein the client obtains the data storage policy from a storage node. The device in this embodiment can be applied to a distributed storage system. As a controller, a data storage policy is set based on the number of machine rejections. For the specific implementation process, refer to the description of the method embodiment of the present invention, and details are not described herein.
图 5为本发明实施例五提供的分布式存储控制装置的结构示意图。 在 上述图 4所示实施例技术方案基础上, 如图 5所示, 本实施例装置还可包 括机拒更新信息获取模块 15 ,用于根据所述当前配置信息和所述分布式系 统中上一次获得的配置信息中各存储节点所属机拒的机拒标识, 确定所述 分布式存储***中是否有新接入的机拒或者有撤出的旧机拒, 并生成机拒 的更新信息 , 所述机拒的更新信息包括有接入的新机拒的机拒标识和撤出 的旧机拒的机拒标识; 上述的同步模块 14 ,还可用于将所述机拒更新信息 同步给各存储节点, 以便存储节点基于所述更新信息和所述数据存储策略 存放数据。  FIG. 5 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 5 of the present invention. On the basis of the technical solution of the embodiment shown in FIG. 4, as shown in FIG. 5, the apparatus of this embodiment may further include a machine rejection update information acquiring module 15 for using the current configuration information and the distributed system. The machine rejection index of each storage node in the configuration information obtained at one time determines whether there is a newly accessed machine in the distributed storage system or the old machine that has been withdrawn, and generates the update information of the machine rejection. The update information of the machine rejection includes a machine rejection identifier of the accessed new machine and a machine rejection identifier of the rejected old machine rejection; the synchronization module 14 may be further configured to synchronize the machine rejection update information to each A storage node, such that the storage node stores data based on the update information and the data storage policy.
上述图 4或图 5所示实施例中, 上述的第一数据存储策略还包括数据 副本个数, 所述数据副本个数用于指示数据存储在所述分布式存储***时 的副本个数, 在所述机拒的个数大于或等于所述数据副本的个数时, 可设 定所述第一数据存储策略指示将同一数据的多个数据副本分别存储在不 同机拒的存储节点中, 以及在所述机拒的个数小于所述数据副本的个数 时, 设定所述第一数据存储策略指示将同一数据的与所述机拒个数相同的 数据副本分别存储在不同机拒的存储节点中。  In the foregoing embodiment shown in FIG. 4 or FIG. 5, the foregoing first data storage policy further includes a number of data copies, where the number of data copies is used to indicate the number of copies when the data is stored in the distributed storage system. When the number of the machine rejections is greater than or equal to the number of the data copies, the first data storage policy may be set to store multiple data copies of the same data in the storage nodes of different machines, And when the number of the machine rejection is less than the number of the data copies, setting the first data storage policy to store the same data copy of the same data as the machine rejection number in different machines In the storage node.
上述图 4或图 5所示实施例中, 配置信息获取模块 1 1 , 具体可用于接 收各存储节点上传的各存储节点的配置信息, 所述存储节点的配置信息包 括存储节点所属机拒的机拒标识; 以及用于将各存储节点的配置信息的集 合得到当前配置信息。机拒个数获取模块 12 , 具体可用于根据所述当前配 置信息和所述分布式存储***中上一次获得的配置信息中各存储节点所 属机拒的机拒标识, 判定所述当前配置信息与上一次获得的配置信息中的 机拒标识不同时, 根据所述当前配置信息中的各存储节点所属机拒的机拒 标识, 获得所述分布式存储***中机拒的个数。  In the embodiment shown in FIG. 4 or FIG. 5, the configuration information acquiring module 1 1 is specifically configured to receive configuration information of each storage node uploaded by each storage node, where the configuration information of the storage node includes a machine that the storage node belongs to. Rejecting the identifier; and using the set of configuration information of each storage node to obtain current configuration information. The machine rejection number obtaining module 12 is specifically configured to determine the current configuration information according to the current configuration information and the machine rejection index of each storage node in the configuration information obtained in the distributed storage system. When the machine rejection identifiers in the configuration information obtained in the previous configuration are different, the number of machine rejections in the distributed storage system is obtained according to the machine rejection identifier of each storage node in the current configuration information.
图 6为本发明实施例六提供的分布式存储控制装置的结构示意图。 如 图 6所示, 本发明实施例装置包括处理器 100、 通信接口 200、 存储器 300 和总线 400 , 该处理器 100、 通信接口 200和存储器 300之间可通过总线 400连接, 其中, 存储器 300用于存储指令, 处理器 100用于执行该指令 用于执行相关操作, 并可控制通信接口 200与网络上的网络设备进行数据 通信。 具体地, 该处理器 100可用于执行存储器 300中的指令, 用于获取 当前配置信息, 该当前配置信息包括各存储节点所属机拒的机拒标识, 每 个机拒标识对应一个机拒; 以及用于根据当前配置信息中的各存储节点所 属机拒的机拒标识, 获得所述分布式存储***中机拒的个数; 以及用于在 机拒的个数大于 1时, 设定分布式存储***的数据存储策略为第一数据存 储策略, 该第一数据存储策略用于指示将同一数据的多个数据副本存储在 位于不同机拒的存储节点中; 并可通过通信接口 200将分布式存储***的 数据存储策略同步给各存储节点, 以便存储节点或客户端基于数据存储策 略存放数据, 其中, 客户端从存储节点获得所述数据存储策略。 FIG. 6 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 6 of the present invention. As shown in FIG. 6, the apparatus of the embodiment of the present invention includes a processor 100, a communication interface 200, a memory 300, and a bus 400. The processor 100, the communication interface 200, and the memory 300 can pass through a bus. The 400 connection, wherein the memory 300 is used to store instructions, the processor 100 is configured to execute the instructions for performing related operations, and the communication interface 200 can be controlled to perform data communication with network devices on the network. Specifically, the processor 100 is configured to execute an instruction in the memory 300, where the current configuration information is included, where the current configuration information includes a machine rejection identifier of each storage node, and each machine rejection identifier corresponds to one machine rejection; And determining, according to the machine rejection identifier of each storage node in the current configuration information, obtaining the number of machine rejections in the distributed storage system; and setting the distributed when the number of machine rejections is greater than 1. The data storage policy of the storage system is a first data storage policy, which is used to indicate that multiple copies of data of the same data are stored in storage nodes located in different machines; and may be distributed through the communication interface 200. The data storage policy of the storage system is synchronized to each storage node, so that the storage node or the client stores data based on the data storage policy, wherein the client obtains the data storage policy from the storage node.
本实施例中, 上述的第一数据存储策略还包括数据副本个数, 所述数 据副本个数用于指示数据存储在所述分布式存储***时的副本个数, 处理 器 100具体可在机拒的个数大于或等于所述数据副本的个数时, 设定所述 第一数据存储策略指示将同一数据的多个数据副本分别存储在不同机拒 的存储节点中, 以及在所述机拒的个数小于所述数据副本的个数时, 设定 所述第一数据存储策略指示将同一数据的与所述机拒个数相同的数据副 本分别存储在不同机拒的存储节点中。  In this embodiment, the foregoing first data storage policy further includes a number of data copies, where the number of data copies is used to indicate the number of copies when the data is stored in the distributed storage system, and the processor 100 is specifically available in the machine. When the number of rejections is greater than or equal to the number of copies of the data, setting the first data storage policy to store multiple data copies of the same data in storage nodes of different machines, and in the machine When the number of rejections is less than the number of the data copies, the first data storage policy is set to indicate that the data copies of the same data and the machine rejection number are respectively stored in the storage nodes of the different machines.
本实施例中, 处理器 100具体可通过通信接口 200从接收各存储节点 上传的各存储节点的配置信息, 存储节点的配置信息包括存储节点所属机 拒的机拒标识; 以及将各存储节点的配置信息的集合得到当前配置信息。  In this embodiment, the processor 100 may receive the configuration information of each storage node that is uploaded by each storage node through the communication interface 200, and the configuration information of the storage node includes the machine rejection identifier of the storage node to which the storage node belongs; and The collection of configuration information gets the current configuration information.
本实施例中, 处理器 100具体可用于根据所述当前配置信息和所述分 布式存储***中上一次获得的配置信息中各存储节点所属机拒的机拒标 识, 判定所述当前配置信息与上一次获得的配置信息中的机拒标识不同 时, 根据所述当前配置信息中的各存储节点所属机拒的机拒标识, 获得所 述分布式存储***中机拒的个数。  In this embodiment, the processor 100 is specifically configured to determine the current configuration information according to the current configuration information and the machine rejection information of each storage node in the configuration information obtained in the distributed storage system. When the machine rejection identifiers in the configuration information obtained in the previous configuration are different, the number of machine rejections in the distributed storage system is obtained according to the machine rejection identifier of each storage node in the current configuration information.
本实施例中, 处理器 100还可根据所述当前配置信息和所述分布式系 统中上一次获得的配置信息中各存储节点所属机拒的机拒标识, 确定所述 分布式存储***中是否有新接入的机拒或者有撤出的旧机拒, 并生成机拒 的更新信息, 所述机拒的更新信息包括有接入的新机拒的机拒标识和措 t出 的旧机拒的机拒标识; 并可通过通信接口 200将所述机拒更新信息同步给 各存储节点, 以便存储节点基于所述更新信息和所述数据存储策略存放数 据。 In this embodiment, the processor 100 may further determine, according to the current configuration information and the machine rejection identifier of each storage node in the configuration information obtained in the distributed system, whether the distributed storage system is in the distributed storage system. The machine with the new access refuses or has the old machine that has been withdrawn, and generates the update information of the machine rejection. The update information of the machine rejection includes the machine rejection of the new machine that has been accessed and the device rejects the The old machine rejects the machine rejection identifier; and the machine rejection update information is synchronized to each storage node through the communication interface 200, so that the storage node stores the data based on the update information and the data storage policy.
本实施例中, 所述的分布式存储控制装置具体可以是具有计算能力的 计算机设备, 例如服务器、 个人计算机 PC等; 上述的存储节点具体可以 是具有数据存储能力的数据存储服务器。 这样, 该装置可与网络上分布的 存储节点共同构成分布式存储***, 实现数据的存储。  In this embodiment, the distributed storage control device may be a computer device having a computing capability, such as a server, a personal computer PC, or the like. The storage node may be a data storage server having data storage capability. In this way, the device can form a distributed storage system together with the storage nodes distributed on the network to realize data storage.
图 7为本发明实施例七提供的分布式存储控制装置的结构示意图。 本 实施例装置可以为分布式存储***中的存储节点, 可以在接收到控制器同 步的存储策略后,基于存储策略进行数据存储处理, 具体地,如图 7所示, 本实施例装置包括接收模块 21和处理模块 22, 其中:  FIG. 7 is a schematic structural diagram of a distributed storage control apparatus according to Embodiment 7 of the present invention. The device in this embodiment may be a storage node in a distributed storage system. After receiving the storage policy synchronized by the controller, the device may perform data storage processing based on the storage policy. Specifically, as shown in FIG. 7, the device in this embodiment includes receiving. Module 21 and processing module 22, wherein:
接收模块 21 , 用于接收分布式存储***的控制器同步的数据存储策 略;  The receiving module 21 is configured to receive a data storage policy synchronized by the controller of the distributed storage system;
处理模块 22 , 用于基于所述数据存储策略对存储的数据进行处理, 其 中, 所述数据存储策略为第一数据存储策略, 所述第一数据存储策略用于 指示将同一数据的多个数据副本存储在位于不同机拒的存储节点中。  The processing module 22 is configured to process the stored data according to the data storage policy, where the data storage policy is a first data storage policy, and the first data storage policy is used to indicate multiple data of the same data. The copy is stored in a storage node that is located on a different machine.
本实施例中,接收模块 21 ,还可用于接收所述控制器同步的机拒的更 新信息, 所述机拒的更新信息包括有接入的新机拒的机拒标识或者有撤出 的旧机拒的机拒标识; 处理模块 22, 具体可用于所述机拒更新信息中有接 入的新机拒的机拒标识时, 基于所述数据存储策略, 将存储在一个机拒中 不同存储节点的同一数据的多个数据副本中的至少一个迁移至所述接入 的新机拒的机拒标识对应的新机拒的存储节点中; 以及用于所述机拒更新 信息中有撤出的旧机拒的机拒标识时, 基于所述数据存储策略, 将存储在 存储节点中。  In this embodiment, the receiving module 21 is further configured to receive the update information of the machine that is synchronized by the controller, where the update information of the machine includes the machine rejection of the new machine that is accessed, or the old one that has been withdrawn. The machine rejection module; the processing module 22 is specifically configured to be used when the machine rejection policy of the new machine that is accessed in the machine rejection update information is based on the data storage policy, and is stored in a machine to reject different storage. At least one of the plurality of data copies of the same data of the node is migrated to the new machine rejecting storage node corresponding to the access denied new machine rejection identifier; and the withdrawal is performed for the machine rejection update information When the old machine rejects the machine rejection, based on the data storage policy, it will be stored in the storage node.
本实施例装置可通过上述图 3所示方法步骤进行数据存储处理, 具体 实现过程可参见上述本发明方法实施例的说明。  The device in this embodiment can perform data storage processing by using the method steps shown in FIG. 3 above. For the specific implementation process, refer to the description of the foregoing method embodiment of the present invention.
图 8为本发明实施例八提供的分布式存储装置的结构示意图。 如图 8 所示,本发明实施例装置包括处理器 100 ' 、通信接口 200 ' 、存储器 300 ' 和总线 400, , 该处理器 100, 、 通信接口 200, 和存储器 300, 之间可通 过总线 400, 连接, 其中, 存储器 300, 用于存储指令, 处理器 100, 用于 执行该指令用于执行相关操作, 并可控制通信接口 200 ' 与网络上的网络 设备进行数据通信。 具体地, 该处理器 100 ' 可用于执行存储器 300 ' 中 的指令, 用于通过通信接口 200 ' 接收分布式存储***的控制器同步的数 据存储策略, 以及用于基于所述数据存储策略对存储的数据进行处理, 其 中, 所述数据存储策略为第一数据存储策略, 所述第一数据存储策略用于 指示将同一数据的多个数据副本存储在位于不同机拒的存储节点中。 FIG. 8 is a schematic structural diagram of a distributed storage device according to Embodiment 8 of the present invention. As shown in FIG. 8, the apparatus of the embodiment of the present invention includes a processor 100', a communication interface 200', a memory 300', and a bus 400, and the processor 100, the communication interface 200, and the memory 300 are connected. The bus 400 is connected to the memory 300 for storing instructions. The processor 100 is configured to execute the instructions for performing related operations, and can control the communication interface 200' to perform data communication with network devices on the network. Specifically, the processor 100' can be configured to execute instructions in the memory 300' for receiving a data synchronization policy of the controller of the distributed storage system through the communication interface 200', and for storing the data based on the data storage policy The data is processed, wherein the data storage policy is a first data storage policy, and the first data storage policy is used to indicate that multiple data copies of the same data are stored in storage nodes located in different machines.
本实施例中, 处理器 100 ' 还可通过通信接口 200 ' 接收所述控制器 同步的机拒的更新信息, 所述机拒的更新信息包括有接入的新机拒的机拒 标识或者有 出的旧机拒的机拒标识; 以及用于在所述机拒更新信息中有 接入的新机拒的机拒标识时, 基于所述数据存储策略, 将存储在一个机拒 中不同存储节点的同一数据的多个数据副本中的至少一个迁移至所述接 入的新机拒的机拒标识对应的新机拒的存储节点中; 以及在所述机拒更新 信息中有撤出的旧机拒的机拒标识时, 基于所述数据存储策略, 将存储在 存储节点中。  In this embodiment, the processor 100' may further receive the update information of the machine that is synchronized by the controller through the communication interface 200', and the update information of the machine rejection includes the machine rejection of the new machine that is accessed or has And the machine rejection code of the old machine rejected; and the machine rejection policy for the new machine rejection in the machine rejection update information, based on the data storage policy, the storage is stored in a machine rejection different storage At least one of the plurality of data copies of the same data of the node is migrated to the new machine rejecting storage node corresponding to the access denied new machine rejection identifier; and the withdrawal is performed in the machine rejection update information When the old machine rejects the machine rejection identifier, it is stored in the storage node based on the data storage policy.
图 9为本发明实施例九提供的分布式存储***的结构示意图。 如图 9 所示, 本实施例存储***可包括控制器 10和多个存储节点 20, 该控制器 10可釆用上述图 4或图 5或图 6所示的分布式存储控制装置,多个存储节 点 20放置在不同的机拒中, 具体可以为上述图 7或图 8所示的分布式存 储装置。  FIG. 9 is a schematic structural diagram of a distributed storage system according to Embodiment 9 of the present invention. As shown in FIG. 9, the storage system of this embodiment may include a controller 10 and a plurality of storage nodes 20, and the controller 10 may use the distributed storage control device shown in FIG. 4 or FIG. 5 or FIG. The storage node 20 is placed in a different machine rejection, and may specifically be the distributed storage device shown in FIG. 7 or FIG. 8 above.
具体地, 如图 9所示, 机拒 A中可存放有 3个存储节点, 各存储节点 均可以与控制器 10单独通信, 且各机拒的各存储节点之间也可相互通信, 只要其中一个存储节点的信息发生变化, 控制器以及其他存储节点均可同 步获得。  Specifically, as shown in FIG. 9, three storage nodes can be stored in the machine rejection A, and each storage node can communicate with the controller 10 separately, and each storage node rejected by each machine can also communicate with each other, as long as The information of one storage node changes, and the controller and other storage nodes can be obtained synchronously.
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非 对其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的 普通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进 行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或 者替换, 并不使相应技术方案的本质脱离本发明各实施例技术方案的范  It should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. Fan

Claims

权 利 要 求 书 claims
1、 一种分布式存储控制方法, 应用于分布式存储***中, 所述分布 式存储***包括控制器, 以及多个存储节点, 所述多个存储节点放置在机 拒中, 其特征在于, 所述方法包括: 1. A distributed storage control method, applied in a distributed storage system. The distributed storage system includes a controller and multiple storage nodes. The multiple storage nodes are placed in the machine. It is characterized in that, The methods include:
获取当前配置信息, 所述当前配置信息包括各存储节点所属机拒的机 拒标识, 每个机拒标识对应一个机拒; Obtain current configuration information. The current configuration information includes the machine identification of the machine to which each storage node belongs, and each machine identification corresponds to a machine;
根据所述当前配置信息中的各存储节点所属机拒的机拒标识, 获得所 述分布式存储***中机拒的个数; Obtain the number of machines in the distributed storage system according to the machine identification of the machine to which each storage node belongs in the current configuration information;
在所述机拒的个数大于 1时, 设定所述分布式存储***的数据存储策 略为第一数据存储策略, 所述第一数据存储策略用于指示将同一数据的多 个数据副本存储在位于不同机拒的存储节点中; When the number of machine rejections is greater than 1, the data storage strategy of the distributed storage system is set to a first data storage strategy, and the first data storage strategy is used to instruct multiple data copies of the same data to be stored. In storage nodes located on different machines;
将所述分布式存储***的数据存储策略同步给各存储节点, 以便存储 节点或客户端基于所述数据存储策略存放数据, 其中, 所述客户端从存储 节点获得所述数据存储策略。 Synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node or client stores data based on the data storage policy, wherein the client obtains the data storage policy from the storage node.
2、 根据权利要求 1所述的分布式存储控制方法, 其特征在于, 所述 第一数据存储策略还包括数据副本个数, 所述数据副本个数用于指示数据 存储在所述分布式存储***时的副本个数; 2. The distributed storage control method according to claim 1, characterized in that, the first data storage strategy further includes a number of data copies, and the number of data copies is used to indicate that data is stored in the distributed storage. The number of copies in the system;
在所述机拒的个数大于或等于所述数据副本的个数时, 设定所述第一 数据存储策略指示将同一数据的多个数据副本分别存储在不同机拒的存 储节点中。 When the number of machines is greater than or equal to the number of data copies, the first data storage policy is set to instruct multiple data copies of the same data to be stored in storage nodes of different machines.
3、 根据权利要求 1所述的分布式存储控制方法, 其特征在于, 所述 第一数据存储策略还包括数据副本个数, 所述数据副本个数用于指示数据 存储在所述分布式存储***时的副本个数; 3. The distributed storage control method according to claim 1, wherein the first data storage strategy further includes a number of data copies, and the number of data copies is used to indicate that data is stored in the distributed storage. The number of copies in the system;
在所述机拒的个数小于所述数据副本的个数时, 设定所述第一数据存 储策略指示将同一数据的与所述机拒个数相同的数据副本分别存储在不 同机拒的存储节点中。 When the number of machines is smaller than the number of data copies, setting the first data storage policy indicates that data copies of the same data that are the same as the number of machines are stored on different machines. in the storage node.
4、 根据权利要求 1-3任一所述的分布式存储控制方法, 其特征在于, 所述获取当前配置信息, 具体包括: 4. The distributed storage control method according to any one of claims 1 to 3, characterized in that: obtaining the current configuration information specifically includes:
接收各存储节点上传的各存储节点的配置信息, 所述存储节点的配置 信息包括存储节点所属机拒的机拒标识; 将各存储节点的配置信息的集合得到当前配置信息。 Receive the configuration information of each storage node uploaded by each storage node, where the configuration information of the storage node includes the machine identification of the machine to which the storage node belongs; The current configuration information is obtained by collecting the configuration information of each storage node.
5、 根据权利要求 1-4任一所述的分布式存储控制方法, 其特征在于, 所述根据所述当前配置信息中的各存储节点所属机拒的机拒标识, 获得所 述分布式存储***中机拒的个数, 具体包括: 5. The distributed storage control method according to any one of claims 1 to 4, characterized in that, the distributed storage is obtained based on the machine identification of the machine to which each storage node belongs in the current configuration information. The number of machine rejections in the system includes:
根据所述当前配置信息和所述分布式存储***中上一次获得的配置 信息中各存储节点所属机拒的机拒标识, 判定所述当前配置信息与上一次 获得的配置信息中的机拒标识不同时, 根据所述当前配置信息中的各存储 节点所属机拒的机拒标识, 获得所述分布式存储***中机拒的个数。 Determine the current configuration information and the machine identification in the last obtained configuration information based on the machine identification of the machine to which each storage node belongs in the current configuration information and the last obtained configuration information in the distributed storage system. At the same time, the number of machines in the distributed storage system is obtained according to the machine ID of the machine to which each storage node belongs in the current configuration information.
6、 根据权利要求 1-5任一所述的分布式存储控制方法, 其特征在于, 还包括: 6. The distributed storage control method according to any one of claims 1 to 5, further comprising:
根据所述当前配置信息和所述分布式***中上一次获得的配置信息 中各存储节点所属机拒的机拒标识, 确定所述分布式存储***中是否有新 接入的机拒或者有撤出的旧机拒, 并生成机拒的更新信息, 所述机拒的更 新信息包括有接入的新机拒的机拒标识和撤出的旧机拒的机拒标识; According to the current configuration information and the machine identification of the machine to which each storage node belongs in the configuration information last obtained in the distributed system, it is determined whether there is a newly accessed machine or a withdrawn machine in the distributed storage system. The old machine is retrieved and the machine's update information is generated. The machine's update information includes the machine's identity of the new machine that has been connected and the machine's identity of the old machine that has been withdrawn;
将所述机拒更新信息同步给各存储节点, 以便存储节点基于所述更新 信息和所述数据存储策略存放数据。 Synchronize the machine update information to each storage node, so that the storage node stores data based on the update information and the data storage policy.
7、 一种分布式存储控制方法, 其特征在于, 包括: 7. A distributed storage control method, characterized by including:
接收分布式存储***的控制器同步的数据存储策略; Receive the data storage strategy synchronized by the controller of the distributed storage system;
基于所述数据存储策略对存储的数据进行处理, 其中, 所述数据存储 策略为第一数据存储策略, 所述第一数据存储策略用于指示将同一数据的 多个数据副本存储在位于不同机拒的存储节点中。 The stored data is processed based on the data storage policy, wherein the data storage policy is a first data storage policy, and the first data storage policy is used to instruct multiple data copies of the same data to be stored on different machines. in the rejected storage node.
8、 根据权利要求 7所述的分布式存储控制方法, 其特征在于, 还包 括: 8. The distributed storage control method according to claim 7, further comprising:
接收所述控制器同步的机拒的更新信息, 所述机拒的更新信息包括有 接入的新机拒的机拒标识或者有撤出的旧机拒的机拒标识; Receive the update information of the machine synchronized by the controller, where the machine update information includes the machine identity of the new machine that is connected or the machine identity of the old machine that has been withdrawn;
所述基于所述数据存储策略对存储的数据进行处理, 具体包括: 所述机拒更新信息中有接入的新机拒的机拒标识时, 基于所述数据存 储策略, 将存储在一个机拒中不同存储节点的同一数据的多个数据副本中 的至少一个迁移至所述接入的新机拒的机拒标识对应的新机拒的存储节 点中; 所述机拒更新信息中有撤出的旧机拒的机拒标识时, 基于所述数据存 移至其他机拒的存储节点中。 Processing the stored data based on the data storage policy specifically includes: when the machine rejection update information contains the machine rejection identification of the accessed new machine, based on the data storage policy, store the data in a machine based on the data storage policy. Migrate at least one of the multiple data copies of the same data in different storage nodes to the storage node of the new machine corresponding to the machine ID of the accessed new machine; When there is a machine identification of the withdrawn old machine in the machine update information, the data is stored and moved to the storage node of the other machine.
9、 一种分布式存储控制装置, 应用于分布式存储***中, 所述分布 式存储***包括多个存储节点, 所述多个存储节点放置在机拒中, 其特征 在于, 所述装置包括: 9. A distributed storage control device applied in a distributed storage system. The distributed storage system includes a plurality of storage nodes. The multiple storage nodes are placed in the machine. The feature is that the device includes :
配置信息获取模块, 用于获取当前配置信息, 所述当前配置信息包括 各存储节点所属机拒的机拒标识, 每个机拒标识对应一个机拒; The configuration information acquisition module is used to obtain the current configuration information. The current configuration information includes the machine identification of the machine to which each storage node belongs. Each machine identification corresponds to a machine;
机拒个数获取模块, 用于根据所述当前配置信息中的各存储节点所属 机拒的机拒标识, 获得所述分布式存储***中机拒的个数; A module for obtaining the number of machine rejections, configured to obtain the number of machine rejections in the distributed storage system according to the machine rejection identification of the machine rejections to which each storage node belongs in the current configuration information;
策略设定模块, 用于在所述机拒的个数大于 1时, 设定所述分布式存 储***的数据存储策略为第一数据存储策略, 所述第一数据存储策略用于 指示将同一数据的多个数据副本存储在位于不同机拒的存储节点中; A policy setting module, configured to set the data storage policy of the distributed storage system as a first data storage policy when the number of machine rejections is greater than 1, and the first data storage policy is used to instruct the same data to be stored in the distributed storage system. Multiple data copies of data are stored in storage nodes located on different machines;
同步模块, 用于将所述分布式存储***的数据存储策略同步给各存储 节点, 以便存储节点或客户端基于所述数据存储策略存放数据, 其中, 所 述客户端从存储节点获得所述数据存储策略。 Synchronization module, used to synchronize the data storage policy of the distributed storage system to each storage node, so that the storage node or client stores data based on the data storage policy, wherein the client obtains the data from the storage node Storage strategy.
10、 根据权利要求 9所述的分布式存储控制装置, 其特征在于, 所述 第一数据存储策略还包括数据副本个数, 所述数据副本个数用于指示数据 存储在所述分布式存储***时的副本个数; 10. The distributed storage control device according to claim 9, wherein the first data storage strategy further includes a number of data copies, and the number of data copies is used to indicate that data is stored in the distributed storage. The number of copies in the system;
在所述机拒的个数大于或等于所述数据副本的个数时, 设定所述第一 数据存储策略指示将同一数据的多个数据副本分别存储在不同机拒的存 储节点中。 When the number of machines is greater than or equal to the number of data copies, the first data storage policy is set to instruct multiple data copies of the same data to be stored in storage nodes of different machines.
1 1、 根据权利要求 9所述的分布式存储控制装置, 其特征在于, 所述 第一数据存储策略还包括数据副本个数, 所述数据副本个数用于指示数据 存储在所述分布式存储***时的副本个数; 1 1. The distributed storage control device according to claim 9, characterized in that the first data storage strategy further includes a number of data copies, and the number of data copies is used to indicate that data is stored in the distributed storage location. The number of copies when storing the system;
在所述机拒的个数小于所述数据副本的个数时, 设定所述第一数据存 储策略指示将同一数据的与所述机拒个数相同的数据副本分别存储在不 同机拒的存储节点中。 When the number of machines is smaller than the number of data copies, setting the first data storage policy indicates that data copies of the same data that are the same as the number of machines are stored on different machines. in the storage node.
12、根据权利要求 9- 1 1任一所述的分布式存储控制装置,其特征在于, 所述配置信息获取模块, 具体用于接收各存储节点上传的各存储节点的配 置信息, 所述存储节点的配置信息包括存储节点所属机拒的机拒标识; 以 及用于将各存储节点的配置信息的集合得到当前配置信息。 12. The distributed storage control device according to any one of claims 9-11, characterized in that the configuration information acquisition module is specifically used to receive the configuration of each storage node uploaded by each storage node. The configuration information of the storage node includes the machine identification of the machine to which the storage node belongs; and is used to obtain the current configuration information by aggregating the configuration information of each storage node.
13、根据权利要求 9- 12任一所述的分布式存储控制装置,其特征在于, 所述机拒个数获取模块, 具体用于根据所述当前配置信息和所述分布式存 储***中上一次获得的配置信息中各存储节点所属机拒的机拒标识, 判定 所述当前配置信息与上一次获得的配置信息中的机拒标识不同时, 根据所 述当前配置信息中的各存储节点所属机拒的机拒标识, 获得所述分布式存 储***中机拒的个数。 13. The distributed storage control device according to any one of claims 9 to 12, characterized in that the machine rejection number acquisition module is specifically used to obtain the number of machines based on the current configuration information and the upper limit of the distributed storage system. The machine identification of the machine to which each storage node belongs in the configuration information obtained once. When it is determined that the machine identification in the current configuration information is different from the machine identification in the configuration information obtained last time, according to the machine identification of each storage node in the current configuration information The machine rejection identifier of the machine rejection is used to obtain the number of machine rejections in the distributed storage system.
14、根据权利要求 9- 13任一所述的分布式存储控制装置,其特征在于, 还包括: 14. The distributed storage control device according to any one of claims 9 to 13, further comprising:
机拒更新信息获取模块, 用于根据所述当前配置信息和所述分布式系 统中上一次获得的配置信息中各存储节点所属机拒的机拒标识, 确定所述 分布式存储***中是否有新接入的机拒或者有撤出的旧机拒, 并生成机拒 的更新信息 , 所述机拒的更新信息包括有接入的新机拒的机拒标识和撤出 的旧机拒的机拒标识; A machine update information acquisition module, configured to determine whether there is a machine in the distributed storage system based on the machine identification of the machine to which each storage node belongs in the current configuration information and the configuration information last obtained in the distributed system. The newly connected machine or the old machine that has been withdrawn is generated, and the update information of the machine is generated. The update information of the machine includes the machine identification of the new machine that is connected and the identity of the old machine that was withdrawn. machine rejection mark;
所述同步模块, 还用于将所述机拒更新信息同步给各存储节点, 以便 存储节点基于所述更新信息和所述数据存储策略存放数据。 The synchronization module is also used to synchronize the machine update information to each storage node, so that the storage node stores data based on the update information and the data storage policy.
15、 一种分布式存储控制装置, 应用于分布式存储***中, 所述分布 式存储***包括多个存储节点, 所述多个存储节点放置在机拒中, 其特征 在于, 所述装置包括: 处理器、 通信接口、 存储器和总线, 所述处理器、 通信接口和存储器之间可通过所述总线连接, 其中, 所述存储器用于存储 指令; 15. A distributed storage control device, applied in a distributed storage system. The distributed storage system includes multiple storage nodes. The multiple storage nodes are placed in the machine. The device is characterized in that: the device includes : processor, communication interface, memory and bus, the processor, communication interface and memory can be connected through the bus, wherein the memory is used to store instructions;
所述处理器执行所述指令, 用于获取当前配置信息, 所述当前配置信 息包括各存储节点所属机拒的机拒标识 , 每个机拒标识对应一个机拒; 以 及用于根据所述当前配置信息中的各存储节点所属机拒的机拒标识, 获得 所述分布式存储***中机拒的个数;以及用于在所述机拒的个数大于 1时, 设定所述分布式存储***的数据存储策略为第一数据存储策略, 所述第一 数据存储策略用于指示将同一数据的多个数据副本存储在位于不同机拒 的存储节点中; 并用于通过通信接口将所述分布式存储***的数据存储策 略同步给各存储节点, 以便存储节点或客户端基于所述数据存储策略存放 数据, 其中, 所述客户端从存储节点获得所述数据存储策略。 The processor executes the instruction to obtain current configuration information. The current configuration information includes a machine identification of the machine to which each storage node belongs, and each machine identification corresponds to a machine; and is used to obtain the current configuration information according to the current configuration information. The machine ID of the machine to which each storage node belongs in the configuration information is used to obtain the number of machines in the distributed storage system; and when the number of machines is greater than 1, set the distributed The data storage policy of the storage system is a first data storage policy. The first data storage policy is used to instruct multiple data copies of the same data to be stored in storage nodes located on different machines; and is used to store the data through a communication interface. The data storage policy of the distributed storage system is synchronized to each storage node so that the storage node or client can store data based on the data storage policy. Data, wherein the client obtains the data storage policy from the storage node.
16、 根据权利要求 15所述的分布式存储控制装置, 其特征在于, 所 述第一数据存储策略还包括数据副本个数, 所述数据副本个数用于指示数 据存储在所述分布式存储***时的副本个数; 所述处理器执行所述指令, 用于在所述机拒的个数大于或等于所述数据副本的个数时, 设定所述第一 数据存储策略指示将同一数据的多个数据副本分别存储在不同机拒的存 储节点中; 或者, 在所述机拒的个数小于所述数据副本的个数时, 设定所 述第一数据存储策略指示将同一数据的与所述机拒个数相同的数据副本 分别存储在不同机拒的存储节点中。 16. The distributed storage control device according to claim 15, wherein the first data storage strategy further includes a number of data copies, and the number of data copies is used to indicate that data is stored in the distributed storage. The number of copies in the system; the processor executes the instruction to set the first data storage policy to indicate that the same data will be stored when the number of machine rejects is greater than or equal to the number of data copies. Multiple data copies of the data are stored in storage nodes of different machines; or, when the number of machines is less than the number of data copies, the first data storage policy is set to indicate that the same data Data copies that are the same as the number of machines are stored in storage nodes of different machines.
17、根据权利要求 15或 16所述的分布式存储控制装置,其特征在于, 所述处理器执行所述指令, 用于通过所述通信接口接收各存储节点上传的 各存储节点的配置信息, 所述存储节点的配置信息包括存储节点所属机拒 的机拒标识; 以及用于将各存储节点的配置信息的集合得到当前配置信 息。 17. The distributed storage control device according to claim 15 or 16, wherein the processor executes the instruction and is configured to receive the configuration information of each storage node uploaded by each storage node through the communication interface, The configuration information of the storage node includes a machine identification of the machine to which the storage node belongs; and is used to obtain the current configuration information from a collection of the configuration information of each storage node.
18、 根据权利要求 15-17任一所述的分布式存储控制装置, 其特征在 于, 所述处理器执行所述指令, 具体用于根据所述当前配置信息和所述分 布式存储***中上一次获得的配置信息中各存储节点所属机拒的机拒标 识, 判定所述当前配置信息与上一次获得的配置信息中的机拒标识不同 时, 根据所述当前配置信息中的各存储节点所属机拒的机拒标识, 获得所 述分布式存储***中机拒的个数。 18. The distributed storage control device according to any one of claims 15 to 17, characterized in that the processor executes the instruction, specifically configured to execute the operation according to the current configuration information and the upper limit of the distributed storage system. The machine identification of the machine to which each storage node belongs in the configuration information obtained once. When it is determined that the machine identification in the current configuration information is different from the machine identification in the configuration information obtained last time, according to the machine identification of each storage node in the current configuration information The machine rejection identifier of the machine rejection is used to obtain the number of machine rejections in the distributed storage system.
19、 根据权利要求 15-18任一所述的分布式存储控制装置, 其特征在 于, 所述处理器执行所述指令, 还用于根据所述当前配置信息和所述分布 式***中上一次获得的配置信息中各存储节点所属机拒的机拒标识, 确定 所述分布式存储***中是否有新接入的机拒或者有撤出的旧机拒, 并生成 机拒的更新信息 , 所述机拒的更新信息包括有接入的新机拒的机拒标识和 •撤出的旧机拒的机拒标识; 以及用于通过所述通信接口将所述机拒更新信 息同步给各存储节点, 以便存储节点基于所述更新信息和所述数据存储策 略存放数据。 19. The distributed storage control device according to any one of claims 15 to 18, characterized in that the processor executes the instruction and is also configured to perform the operation according to the current configuration information and the last time in the distributed system. The machine identification of the machine to which each storage node belongs in the obtained configuration information is used to determine whether there is a newly accessed machine or an old machine that has been withdrawn from the distributed storage system, and the update information of the machine is generated, so The update information of the machine includes the machine ID of the new machine that has been connected and the machine ID of the old machine that has been withdrawn; and is used to synchronize the machine update information to each storage through the communication interface. node, so that the storage node stores data based on the update information and the data storage policy.
20、 一种分布式存储控制装置, 其特征在于, 包括: 20. A distributed storage control device, characterized by including:
接收模块, 用于接收分布式存储***的控制器同步的数据存储策略; 处理模块,用于基于所述数据存储策略对存储的数据进行处理,其中, 所述数据存储策略为第一数据存储策略, 所述第一数据存储策略用于指示 将同一数据的多个数据副本存储在位于不同机拒的存储节点中。 The receiving module is used to receive the data storage strategy synchronized by the controller of the distributed storage system; A processing module, configured to process stored data based on the data storage policy, wherein the data storage policy is a first data storage policy, and the first data storage policy is used to instruct multiple data copies of the same data to be Stored in storage nodes located on different machines.
21、 根据权利要求 20所述的分布式存储控制装置, 其特征在于, 所 述接收模块, 还用于接收所述控制器同步的机拒的更新信息, 所述机拒的 更新信息包括有接入的新机拒的机拒标识或者有撤出的旧机拒的机拒标 识; 21. The distributed storage control device according to claim 20, wherein the receiving module is further configured to receive the update information of the machine synchronized by the controller, and the update information of the machine includes a link. The machine rejection identification of the new machine being imported or the machine rejection identification of the old machine being withdrawn;
所述处理模块, 具体用于所述机拒更新信息中有接入的新机拒的机拒 标识时, 基于所述数据存储策略, 将存储在一个机拒中不同存储节点的同 一数据的多个数据副本中的至少一个迁移至所述接入的新机拒的机拒标 识对应的新机拒的存储节点中; 以及用于所述机拒更新信息中有撤出的旧 机拒的机拒标识时, 基于所述数据存储策略, 将存储在所述撤出的旧机拒 The processing module is specifically used to, based on the data storage policy, store multiple identical data of different storage nodes in one machine when there is a machine identification of an accessed new machine in the machine update information. Migrate at least one of the data copies to the storage node of the new machine corresponding to the machine ID of the accessed new machine; and for the machine containing the withdrawn old machine in the machine update information. When rejecting the identification, based on the data storage policy, reject the old machine stored in the evacuated
22、 一种分布式存储控制装置, 其特征在于, 包括: 处理器、 通信接 口、 存储器和总线, 所述处理器、 通信接口和存储器之间可通过所述总线 连接, 其中, 所述存储器用于存储指令; 22. A distributed storage control device, characterized in that it includes: a processor, a communication interface, a memory and a bus, the processor, the communication interface and the memory can be connected through the bus, wherein the memory is to store instructions;
所述处理器执行所述指令, 用于通过所述通信接口接收分布式存储系 统的控制器同步的数据存储策略; 以及用于基于所述数据存储策略对存储 的数据进行处理, 其中, 所述数据存储策略为第一数据存储策略, 所述第 一数据存储策略用于指示将同一数据的多个数据副本存储在位于不同机 拒的存储节点中。 The processor executes the instructions and is configured to receive a data storage strategy synchronized by a controller of the distributed storage system through the communication interface; and to process the stored data based on the data storage strategy, wherein, The data storage policy is a first data storage policy, and the first data storage policy is used to instruct multiple data copies of the same data to be stored in storage nodes located on different machines.
23、 根据权利要求 22所述的分布式存储控制装置, 其特征在于, 所 述处理器执行所述指令, 还用于通过所述通信接口接收所述控制器同步的 机拒的更新信息 , 所述机拒的更新信息包括有接入的新机拒的机拒标识或 者有撤出的旧机拒的机拒标识; 以及用于所述机拒更新信息中有接入的新 机拒的机拒标识时, 基于所述数据存储策略, 将存储在一个机拒中不同存 储节点的同一数据的多个数据副本中的至少一个迁移至所述接入的新机 拒的机拒标识对应的新机拒的存储节点中; 以及用于所述机拒更新信息中 有撤出的旧机拒的机拒标识时, 基于所述数据存储策略, 将存储在所述撤 点中。 23. The distributed storage control device according to claim 22, wherein the processor executes the instruction and is further configured to receive the update information of the controller synchronized machine through the communication interface, so The above-mentioned machine rejection update information includes the machine rejection identification of the new machine accessed or the machine rejection identification of the withdrawn old machine; and the machine rejection update information is used for the access of the new machine access. When the identification is detected, based on the data storage policy, migrate at least one of multiple data copies of the same data stored in different storage nodes in one machine to a new machine corresponding to the machine identification of the accessed new machine. in the storage node of the machine; and when there is a machine identification of the withdrawn old machine in the machine update information, based on the data storage policy, the machine will be stored in the withdrawn machine. Hit.
24、 一种分布式存储***, 包括控制器, 其特征在于, 所述控制器为 釆用权利要求 9-19任一所述的分布式存储控制装置。 24. A distributed storage system, including a controller, characterized in that the controller adopts the distributed storage control device described in any one of claims 9-19.
PCT/CN2012/087161 2012-12-21 2012-12-21 Distributed storage control method, device, and system WO2014094296A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2012/087161 WO2014094296A1 (en) 2012-12-21 2012-12-21 Distributed storage control method, device, and system
CN201280003288.7A CN103403666B (en) 2012-12-21 2012-12-21 Distributed storage control method, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/087161 WO2014094296A1 (en) 2012-12-21 2012-12-21 Distributed storage control method, device, and system

Publications (1)

Publication Number Publication Date
WO2014094296A1 true WO2014094296A1 (en) 2014-06-26

Family

ID=49565842

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087161 WO2014094296A1 (en) 2012-12-21 2012-12-21 Distributed storage control method, device, and system

Country Status (2)

Country Link
CN (1) CN103403666B (en)
WO (1) WO2014094296A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219312B (en) * 2014-09-05 2017-08-08 无锡天脉聚源传媒科技有限公司 A kind of method and device of installation procedure
CN104486438B (en) * 2014-12-22 2019-02-19 华为技术有限公司 The disaster recovery method and device of distributed memory system
CN108400999B (en) * 2017-02-06 2020-10-30 ***通信集团公司 Load balancing method and device for mirror image nodes of database cluster
CN110532271A (en) * 2019-08-30 2019-12-03 北京浪潮数据技术有限公司 Distributed storage method, control system and the device realized based on DHT algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101611390A (en) * 2007-02-08 2009-12-23 多特希尔***公司 The method and apparatus of identification rack and equipment
CN102394923A (en) * 2011-10-27 2012-03-28 周诗琦 Cloud system platform based on n*n display structure
CN102546813A (en) * 2012-03-15 2012-07-04 北京神州数码思特奇信息技术股份有限公司 High-performance cluster computing system based on x86PC framework
CN102546782A (en) * 2011-12-28 2012-07-04 北京奇虎科技有限公司 Distribution system and data operation method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101611390A (en) * 2007-02-08 2009-12-23 多特希尔***公司 The method and apparatus of identification rack and equipment
CN102394923A (en) * 2011-10-27 2012-03-28 周诗琦 Cloud system platform based on n*n display structure
CN102546782A (en) * 2011-12-28 2012-07-04 北京奇虎科技有限公司 Distribution system and data operation method thereof
CN102546813A (en) * 2012-03-15 2012-07-04 北京神州数码思特奇信息技术股份有限公司 High-performance cluster computing system based on x86PC framework

Also Published As

Publication number Publication date
CN103403666B (en) 2016-03-09
CN103403666A (en) 2013-11-20

Similar Documents

Publication Publication Date Title
CN104715001B (en) The method and system of write operation is performed for the shared resource in the cluster to data handling system
US9442673B2 (en) Method and apparatus for storing data using a data mapping algorithm
KR101752928B1 (en) Swarm-based synchronization over a network of object stores
CN102984194B (en) The synchronous method and system of the configuration file of virtual applications distribution frame
WO2019119212A1 (en) Method and device for identifying osd sub-health, and data storage system
US9639437B2 (en) Techniques to manage non-disruptive SAN availability in a partitioned cluster
EP2919130A1 (en) Method and system for synchronizing distributed database
WO2014201982A1 (en) Data synchronization method and device, and distributed system
CN107085539B (en) cloud database system and dynamic cloud database resource adjustment method
US11853588B2 (en) Distributed storage resource reservation for replication, disaster recovery and data protection across multiple sites
WO2016177231A1 (en) Dual-control-based active-backup switching method and device
CN106936623A (en) The management method of distributed cache system and cache cluster
US20130332418A1 (en) Method of managing data in asymmetric cluster file system
WO2014205847A1 (en) Zoning balance subtask delivering method, apparatus and system
US20120151095A1 (en) Enforcing logical unit (lu) persistent reservations upon a shared virtual storage device
WO2019057081A1 (en) Data storage method, data query method, computer device, and storage medium
WO2014094296A1 (en) Distributed storage control method, device, and system
CN105404565B (en) A kind of dual-active data guard method and device
WO2013078611A1 (en) Data processing method, device and client in distributed storage system
US20170017680A1 (en) Method for handling writes in database clusters with temporarily disjoint nodes
CN109299116B (en) Data synchronization method, device, equipment and readable storage medium
CN105511808B (en) Data operation method, system and related device
JP2014175841A (en) Network communication system, communication device, data backup method and program therefor
CN116389233A (en) Container cloud management platform active-standby switching system, method and device and computer equipment
JP5685213B2 (en) Differential replication system, master database device, and slave database device

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201280003288.7

Country of ref document: CN

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

Ref document number: 12890493

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

Country of ref document: EP

Kind code of ref document: A1